[PATCH] nor flash: integrate into mtd

Sascha Hauer s.hauer at pengutronix.de
Tue Feb 19 13:45:46 EST 2013


On Tue, Feb 19, 2013 at 02:23:10PM +0100, Alexander Aring wrote:
> Hi,
> 
> I was thinking to add a "depends on MTD" to these drivers. But I
> detect that cfi_flashs doesn't need a MTD support.
> 
> With this move we got a mtd layer in barebox, when we uses
> cfi_flash only.
> 
> The cfi_flashs only uses struct mtd_info to save information about
> common flashs like erasesize, etc... and a little callback to call
> the erase function.
> 
> I mean it's a good move to move this into mtd section, but will the other
> mtd functions which are not necessary not get into barebox because size
> optimiziation?

Yes, that's the downside of this patch. Unfortunately we have the
situation that UBI attaches to mtd, so the cfi flash driver was broken
for cfi flashes. We used to add a fake mtd struct especially for UBI
on nor flashes, but the recently introduced ubiformat didn't cope with
that. This patch fixes this with the cost of increasing the binary size.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list