[PATCH] NOR flash: reduce size of cfiword_t if not using 64-bit bus.
Krzysztof Halasa
khc at pm.waw.pl
Sat May 12 15:09:35 EDT 2012
Hi,
Sascha Hauer <s.hauer at pengutronix.de> writes:
>> +++ b/drivers/nor/cfi_flash.h
>> @@ -30,7 +30,17 @@
>> #include <linux/mtd/mtd.h>
>>
>> typedef unsigned long flash_sect_t;
>> +
>> +#if defined(CONFIG_DRIVER_CFI_BANK_WIDTH_8)
>> typedef u64 cfiword_t;
>> +#elif defined(CONFIG_DRIVER_CFI_BANK_WIDTH_4)
>> +typedef u32 cfiword_t;
>> +#elif defined(CONFIG_DRIVER_CFI_BANK_WIDTH_2)
>> +typedef u16 cfiword_t;
>> +#else
>> +typedef u8 cfiword_t;
>> +#endif
>
> Is this worth it? Do we safe binary size or what else is the reasoning
> for this patch?
Well, I haven't done any measurments :-(
But I guess long long operations on a 32-bit CPU aren't very effective.
Just checked, with WIDTH_2 on my IXP425 the barebox.bin shrunk from
239456 to 239264 bytes. That's 192 bytes saved with this patch.
--
Krzysztof Halasa
More information about the barebox
mailing list