summaryrefslogtreecommitdiffstats
path: root/post/drivers/i2c.c
Commit message (Collapse)AuthorAgeFilesLines
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-241-17/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* post: fix I2C POST failure for devices in CONFIG_SYS_POST_I2C_IGNORESAnatolij Gustschin2013-05-011-0/+2
| | | | | | | | | | | Devices in CONFIG_SYS_POST_I2C_IGNORES list may be absent and the rule is not to report I2C POST failure for devices in this list. Currently this doesn't work since probing for these devices isn't done and thus they are not marked as successfully probed. Ignore optional devices when checking for devices that didn't respond. Signed-off-by: Anatolij Gustschin <agust@denx.de>
* post, i2c: add missing curly bracket in i2c_post_testHeiko Schocher2010-11-171-1/+2
| | | | | | | | If CONFIG_SYS_POST_I2C_ADDRS is not defined and CONFIG_SYS_POST_I2C is activated, i2c_probe() is not called in the for statement, because missing curly bracket. Signed-off-by: Heiko Schocher <hs@denx.de>
* post/drivers/i2c.c: fix compile errorWolfgang Denk2010-10-271-1/+1
| | | | | | | | | | | | | | | | | Commit 7e263ce "post/i2c: Clean up detection logic" added a "const" qualifier to the declaration of i2c_addr_list[], missing the fact that the list gets modified later in the code, which results in build errors like these: i2c.c: In function 'i2c_post_test': i2c.c:88: error: assignment of read-only location Remove the incorrect "const". Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Heiko Schocher <hs@denx.de> Acked-by: Heiko Schocher <hs@denx.de>
* post/i2c: Add ability to ignore I2C devicesPeter Tyser2010-10-221-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the ability to not report an I2C POST error for a set of given I2C addresses on bootup. This is useful for cases when a device may or may not be present, and neither case is considered an error. For example: - 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 and software can't determine if the optional device should be present or not. - 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 CONFIG_SYS_POST_I2C_IGNORES 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> Acked-by: Heiko Schocher <hs@denx.de> Acked-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* post/i2c: Rename I2C_ADDR_LIST to CONFIG_SYS_POST_I2C_ADDRSPeter Tyser2010-10-221-4/+4
| | | | | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Acked-by: Heiko Schocher <hs@denx.de> Acked-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* post/i2c: Don't probe address 0Peter Tyser2010-10-221-2/+4
| | | | | | | | | | | | | | | | | According to the I2C specification device address 0 is the "general call address", ie a broadcast address. The I2C specification states that the format of a general call uses at least 2 bytes, which U-Boot's probing routine does not adhere to. Not probing device address 0 will prevent possible issues with devices that accept general calls. Additionally, this change shouldn't reduce POST coverage since each I2C device should still be accessed via its own, unique address. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Acked-by: Heiko Schocher <hs@denx.de> Acked-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* post/i2c: Clean up detection logicPeter Tyser2010-10-221-16/+13
| | | | | | | | | The logic previously used in the I2C post was a bit convoluted. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Acked-by: Heiko Schocher <hs@denx.de> Acked-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* post/i2c: General clean upPeter Tyser2010-10-221-25/+23
| | | | | | | | | | | | - Clean up ifdeffery - Update coding style No functional change should have occurred. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Acked-by: Heiko Schocher <hs@denx.de> Acked-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD2008-10-181-2/+2
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* POST: preparations for moving CONFIG_POST to MakefilesYuri Tikhonov2008-04-221-3/+0
| | | | | | | Remove CONFIG_POST ifdefs from the post/ source files. Signed-off-by: Yuri Tikhonov <yur@emcraft.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
* Restructure POST directory to support of other CPUs, boards, etc.Wolfgang Denk2007-03-061-0/+94
OpenPOWER on IntegriCloud