From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 13/17] post/i2c: Add ability to ignore I2C devices
Date: Thu, 30 Sep 2010 08:50:24 +0200 [thread overview]
Message-ID: <4CA43330.8030009@denx.de> (raw)
In-Reply-To: <1285828543.20234.5.camel@ptyser-laptop>
Hello Peter,
Peter Tyser wrote:
> On Thu, 2010-09-30 at 08:10 +0200, Heiko Schocher wrote:
>> Hello Peter,
>>
>> Peter Tyser wrote:
>>> Add the ability to not report an I2C POST error for a set of given I2C
>>> addresses on bootup. This is useful for the following cases:
>>>
>>> - Some form factors such as XMC and Compact PCI Express have an I2C
>>> EEPROM whose address changes based on geographical address. Eg
>>> installed in one slot its EEPROM address is, 0x50, in another its
>>> 0x51, etc. This allows multiple devices to have their EEPROMs present
>>> on the same I2C bus. Thus the I2C devices present for an XMC or
>>> CPCIe card depend on if and where other cards are installed in the
>>> same system.
>>>
>>> - Some cards have optional I2C devices. Eg one hardware build
>>> configuration has different I2C devices than another.
>>>
>>> - Some cards have optional daughtercards with I2C devices on them.
>>>
>>> - I2C EEPROMs address range depends on their size. Its possible to
>>> support differently size EEPROMs by only probing the EEPROM's base
>>> address and ignoring the other addresses that are impacted by its
>>> size.
>>>
>>> A new I2C_ADDR_IGNORE_LIST define has been added which specifies a list
>>> of I2C addresses for the I2C POST to ignore.
>>>
>>> Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
>>> CC: hs at denx.de
>>> ---
>>> post/drivers/i2c.c | 16 ++++++++++++++++
>>> 1 files changed, 16 insertions(+), 0 deletions(-)
>> Maybe you can add a little info in the README?
>
> The existing I2C_ADDR_LIST isn't documented, so I didn't document this
> addition. I'll mention them both in doc/README.POST.
Thanks!
>>> diff --git a/post/drivers/i2c.c b/post/drivers/i2c.c
>>> index 2dd128e..9e1fd50 100644
>>> --- a/post/drivers/i2c.c
>>> +++ b/post/drivers/i2c.c
>>> @@ -40,6 +40,20 @@
>>>
>>> #if CONFIG_POST & CONFIG_SYS_POST_I2C
>>>
>>> +static int i2c_ignore_device(unsigned int chip)
>>> +{
>>> +#ifdef I2C_ADDR_IGNORE_LIST
>> Hmm.. as this is only used in post code, this should be visible
>> in the defines name, what with:
>>
>> I2C_POST_ADDR_IGNORE_LIST
>
> I was following the lead of the existing I2C_ADDR_LIST define. Agreed
> it should be named differently. I'll go with CONFIG_SYS_POST_I2C_ADDRS
> and CONFIG_SYS_POST_I2C_IGNORES unless someone else chimes in.
Ack. Thanks!
bye,
heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
next prev parent reply other threads:[~2010-09-30 6:50 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-29 19:05 [U-Boot] [PATCH 01/17] XPedite5500 board support Peter Tyser
2010-09-29 19:05 ` [U-Boot] [PATCH 02/17] mpc8640: Update the io_sel fields for PCI Express Peter Tyser
2010-09-30 4:41 ` Kumar Gala
2010-09-30 14:54 ` Peter Tyser
2010-10-20 6:41 ` Kumar Gala
2010-09-29 19:05 ` [U-Boot] [PATCH 03/17] xes: Use common PCI initialization code Peter Tyser
2010-09-29 19:05 ` [U-Boot] [PATCH 04/17] pci: Add ability to re-enumerate PCI buses Peter Tyser
2010-10-20 6:45 ` Kumar Gala
2010-10-20 19:57 ` Wolfgang Denk
2010-10-21 5:31 ` Peter Tyser
2010-09-29 19:05 ` [U-Boot] [PATCH 05/17] ppc: Don't initialize write protected NOR flashes Peter Tyser
2010-10-20 6:46 ` Kumar Gala
2010-10-20 7:21 ` Stefan Roese
2010-10-20 19:58 ` Wolfgang Denk
2010-09-29 19:05 ` [U-Boot] [PATCH 06/17] xes: Consolidate checkboard() Peter Tyser
2010-09-29 19:05 ` [U-Boot] [PATCH 07/17] xes: Add board_flash_wp_on() Peter Tyser
2010-09-29 19:05 ` [U-Boot] [PATCH 08/17] xes: Make X-ES board names more generic Peter Tyser
2010-09-29 19:05 ` [U-Boot] [PATCH 09/17] xes: Add POST support for 8xxx boards Peter Tyser
2010-09-29 19:05 ` [U-Boot] [PATCH 10/17] post/i2c: General clean up Peter Tyser
2010-09-30 6:09 ` Heiko Schocher
2010-09-29 19:05 ` [U-Boot] [PATCH 11/17] post/i2c: Clean up detection logic Peter Tyser
2010-09-30 6:10 ` Heiko Schocher
2010-09-29 19:05 ` [U-Boot] [PATCH 12/17] post/i2c: Don't probe address 0 Peter Tyser
2010-09-30 6:10 ` Heiko Schocher
2010-09-29 19:05 ` [U-Boot] [PATCH 13/17] post/i2c: Add ability to ignore I2C devices Peter Tyser
2010-09-30 6:10 ` Heiko Schocher
2010-09-30 6:35 ` Peter Tyser
2010-09-30 6:50 ` Heiko Schocher [this message]
2010-09-30 7:44 ` Wolfgang Denk
2010-09-30 13:00 ` Peter Tyser
2010-09-30 17:21 ` Wolfgang Denk
2010-09-30 17:40 ` Peter Tyser
2010-09-30 17:54 ` Wolfgang Denk
2010-10-01 6:29 ` Heiko Schocher
2010-09-30 11:00 ` Sergei Shtylyov
2010-09-30 11:04 ` Reinhard Meyer
2010-09-30 14:38 ` Peter Tyser
2010-09-30 15:04 ` Sergei Shtylyov
2010-09-30 15:42 ` Peter Tyser
2010-09-30 16:36 ` Sergei Shtylyov
2010-09-29 19:05 ` [U-Boot] [PATCH 14/17] xes: Ignore XMC EEPROMs during I2C POST Peter Tyser
2010-09-29 19:05 ` [U-Boot] [PATCH 15/17] 86xx: Create common linker script Peter Tyser
2010-09-29 23:24 ` Timur Tabi
2010-09-30 0:54 ` Peter Tyser
2010-10-20 6:36 ` Kumar Gala
2010-09-29 19:05 ` [U-Boot] [PATCH 16/17] 86xx: Use gc-sections to reduce image size Peter Tyser
2010-10-20 6:36 ` Kumar Gala
2010-09-29 19:05 ` [U-Boot] [PATCH 17/17] 85xx: " Peter Tyser
2010-10-20 6:36 ` Kumar Gala
2010-10-04 22:11 ` [U-Boot] [PATCH 01/17] XPedite5500 board support Timur Tabi
2010-10-20 6:46 ` Kumar Gala
2010-10-21 5:29 ` Peter Tyser
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=4CA43330.8030009@denx.de \
--to=hs@denx.de \
--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