mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Krzysztof Halasa <khc@pm.waw.pl>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] NOR flash: reduce size of cfiword_t if not using 64-bit bus.
Date: Sat, 12 May 2012 21:09:35 +0200	[thread overview]
Message-ID: <m3likx2p3k.fsf@intrepid.localdomain> (raw)
In-Reply-To: <20120511184056.GO27341@pengutronix.de> (Sascha Hauer's message of "Fri, 11 May 2012 20:40:56 +0200")

Hi,

Sascha Hauer <s.hauer@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

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2012-05-12 19:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-05 21:35 Krzysztof Halasa
2012-05-11 18:40 ` Sascha Hauer
2012-05-12 19:09   ` Krzysztof Halasa [this message]
2012-05-13  9:03 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3likx2p3k.fsf@intrepid.localdomain \
    --to=khc@pm.waw.pl \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox