From: Matthias Fuchs <matthias.fuchs@esd.eu>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3] Add "cpu_config" command for PPC4xx bootstrap configuration
Date: Sat, 18 Jul 2009 11:55:27 +0200 [thread overview]
Message-ID: <4A619C0F.20103@esd.eu> (raw)
In-Reply-To: <20090717205848.95BDA832E416@gemini.denx.de>
Hi Wolfgang,
Wolfgang Denk schrieb:
> Dear Matthias Fuchs,
>
> In message <200907172157.12244.matthias.fuchs@esd.eu> you wrote:
> ...
>
> [450+ lines of full quote deleted.]
>
> Please quote only relevant code snippets. Thanks.
>
>>> + for (i = 0; i < ppc4xx_config_count; i++) {
>>> + /*
>>> + * Search for configuration name/label
>>> + */
>>> + if (strcmp(argv[1], ppc4xx_config_val[i].label) == 0) {
>>> + printf("Using configuration:\n%-16s - %s\n",
>>> + ppc4xx_config_val[i].label,
>>> + ppc4xx_config_val[i].description);
>>> +
>>> + ret = i2c_write(CONFIG_4xx_CONFIG_I2C_EEPROM_ADDR, 0, 1,
>>> + ppc4xx_config_val[i].val,
>>> + CONFIG_4xx_CONFIG_BLOCKSIZE);
>> I would like to see eeprom_write() here. On 405EP the strapping data is 0x20
>> bytes but the/our EEPROM has a page size of 16 bytes so i2c_write makes
>> problems with the 2nd half of data. Also eeprom_write handles the write
>> protection stuff. See some esd boards or the recent sbe command implementation
>> in my last PMC405DE patch.
>
> I disagree here. There is no guarantee (and actually no need) that
> CONFIG_CMD_EEPROM is enabled in a configuration that want to use this
> feature.
correct.
>
> If i2c_write() has issues on your boards that is IMO a bug that needs
> to be fixed (but that's another story).
It's not an issue on our boards! And it's not a bug with i2c_write().
When writing more bytes to an eeprom than it's actual pagesize you have
to take special care. This is done in eeprom_write(). i2c_write() to
an eeprom only works with up to pagesize bytes!
Either we use eeprom_write() or we use multiple call of i2c_write().
If we do not change this, Stefan's code does not work with 405EP cpus.
On these you have 0x20 strapping bytes and typicall EEPROMs with 8 or 16
bytes pagesize (24W01/02/04/08/16).
Matthias
next prev parent reply other threads:[~2009-07-18 9:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-17 13:53 [U-Boot] [PATCH v3] Add "cpu_config" command for PPC4xx bootstrap configuration Stefan Roese
2009-07-17 14:39 ` Wolfgang Denk
2009-07-17 14:45 ` Stefan Roese
2009-07-17 15:38 ` Kumar Gala
2009-07-17 17:05 ` Stefan Roese
2009-07-17 18:26 ` Wolfgang Denk
2009-07-17 19:57 ` Matthias Fuchs
2009-07-17 20:58 ` Wolfgang Denk
2009-07-18 9:55 ` Matthias Fuchs [this message]
2009-07-19 7:55 ` Wolfgang Denk
2009-07-19 11:23 ` Matthias Fuchs
2009-07-19 17:03 ` Stefan Roese
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=4A619C0F.20103@esd.eu \
--to=matthias.fuchs@esd.eu \
--cc=u-boot@lists.denx.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