Browse Source

post/i2c: Rename I2C_ADDR_LIST to CONFIG_SYS_POST_I2C_ADDRS

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>
master
Peter Tyser 10 years ago
committed by Kumar Gala
parent
commit
60aaaa0782
10 changed files with 62 additions and 62 deletions
  1. +5
    -6
      doc/README.POST
  2. +3
    -3
      include/configs/KUP4K.h
  3. +3
    -3
      include/configs/KUP4X.h
  4. +4
    -4
      include/configs/TB5200.h
  5. +4
    -4
      include/configs/TQM5200.h
  6. +3
    -1
      include/configs/cm5200.h
  7. +25
    -25
      include/configs/lwmon.h
  8. +7
    -8
      include/configs/lwmon5.h
  9. +4
    -4
      include/configs/spieval.h
  10. +4
    -4
      post/drivers/i2c.c

+ 5
- 6
doc/README.POST View File

@ -659,12 +659,11 @@ not need any modifications for porting them to another board/CPU.
2.2.2.1. I2C test
For verifying the I2C bus, a full I2C bus scanning will be performed
using the i2c_probe() routine. If any I2C device is found, the test
will be considered as passed, otherwise failed. This particular way
will be used because it provides the most common method of testing.
For example, using the internal loopback mode of the CPM I2C
controller for testing would not work on boards where the software
I2C driver (also known as bit-banged driver) is used.
using the i2c_probe() routine. If a board defines
CONFIG_SYS_POST_I2C_ADDRS the I2C test will pass if all devices
listed in CONFIG_SYS_POST_I2C_ADDRS are found, and no additional
devices are detected. If CONFIG_SYS_POST_I2C_ADDRS is not defined
the test will pass if any I2C device is found.
2.2.2.2. Watchdog timer test


+ 3
- 3
include/configs/KUP4K.h View File

@ -139,9 +139,9 @@
/* List of I2C addresses to be verified by POST */
#define I2C_ADDR_LIST {CONFIG_SYS_I2C_PICIO_ADDR, \
CONFIG_SYS_I2C_RTC_ADDR, \
}
#define CONFIG_SYS_POST_I2C_ADDRS {CONFIG_SYS_I2C_PICIO_ADDR, \
CONFIG_SYS_I2C_RTC_ADDR, \
}
#define CONFIG_RTC_PCF8563 /* use Philips PCF8563 RTC */


+ 3
- 3
include/configs/KUP4X.h View File

@ -149,9 +149,9 @@
/* List of I2C addresses to be verified by POST */
#define I2C_ADDR_LIST {CONFIG_SYS_I2C_PICIO_ADDR, \
CONFIG_SYS_I2C_RTC_ADDR, \
}
#define CONFIG_SYS_POST_I2C_ADDRS {CONFIG_SYS_I2C_PICIO_ADDR, \
CONFIG_SYS_I2C_RTC_ADDR, \
}
#define CONFIG_RTC_PCF8563 /* use Philips PCF8563 RTC */


+ 4
- 4
include/configs/TB5200.h View File

@ -251,10 +251,10 @@
#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 20
/* List of I2C addresses to be verified by POST */
#undef I2C_ADDR_LIST
#define I2C_ADDR_LIST { CONFIG_SYS_I2C_EEPROM_ADDR, \
CONFIG_SYS_I2C_RTC_ADDR, \
CONFIG_SYS_I2C_SLAVE }
#undef CONFIG_SYS_POST_I2C_ADDRS
#define CONFIG_SYS_POST_I2C_ADDRS {CONFIG_SYS_I2C_EEPROM_ADDR, \
CONFIG_SYS_I2C_RTC_ADDR, \
CONFIG_SYS_I2C_SLAVE}
/*
* Flash configuration


+ 4
- 4
include/configs/TQM5200.h View File

@ -370,10 +370,10 @@
/* List of I2C addresses to be verified by POST */
#if defined (CONFIG_MINIFAP)
#undef I2C_ADDR_LIST
#define I2C_ADDR_LIST { CONFIG_SYS_I2C_EEPROM_ADDR, \
CONFIG_SYS_I2C_HWMON_ADDR, \
CONFIG_SYS_I2C_SLAVE }
#undef CONFIG_SYS_POST_I2C_ADDRS
#define CONFIG_SYS_POST_I2C_ADDRS {CONFIG_SYS_I2C_EEPROM_ADDR, \
CONFIG_SYS_I2C_HWMON_ADDR, \
CONFIG_SYS_I2C_SLAVE}
#endif
/*


+ 3
- 1
include/configs/cm5200.h View File

@ -80,7 +80,9 @@
#define CONFIG_POST (CONFIG_SYS_POST_MEMORY | CONFIG_SYS_POST_CPU | CONFIG_SYS_POST_I2C)
#define MPC5XXX_SRAM_POST_SIZE (MPC5XXX_SRAM_SIZE - 4)
/* List of I2C addresses to be verified by POST */
#define I2C_ADDR_LIST { CONFIG_SYS_I2C_SLAVE, CONFIG_SYS_I2C_IO, CONFIG_SYS_I2C_EEPROM }
#define CONFIG_SYS_POST_I2C_ADDRS {CONFIG_SYS_I2C_SLAVE, \
CONFIG_SYS_I2C_IO, \
CONFIG_SYS_I2C_EEPROM}
/* display image timestamps */
#define CONFIG_TIMESTAMP 1


+ 25
- 25
include/configs/lwmon.h View File

@ -349,32 +349,32 @@
/* List of I2C addresses to be verified by POST */
#ifdef CONFIG_USE_FRAM
#define I2C_ADDR_LIST { /* CONFIG_SYS_I2C_AUDIO_ADDR, */ \
CONFIG_SYS_I2C_SYSMON_ADDR, \
CONFIG_SYS_I2C_RTC_ADDR, \
CONFIG_SYS_I2C_POWER_A_ADDR, \
CONFIG_SYS_I2C_POWER_B_ADDR, \
CONFIG_SYS_I2C_KEYBD_ADDR, \
CONFIG_SYS_I2C_PICIO_ADDR, \
CONFIG_SYS_I2C_EEPROM_ADDR, \
}
#define CONFIG_SYS_POST_I2C_ADDRS {/* CONFIG_SYS_I2C_AUDIO_ADDR, */ \
CONFIG_SYS_I2C_SYSMON_ADDR, \
CONFIG_SYS_I2C_RTC_ADDR, \
CONFIG_SYS_I2C_POWER_A_ADDR, \
CONFIG_SYS_I2C_POWER_B_ADDR, \
CONFIG_SYS_I2C_KEYBD_ADDR, \
CONFIG_SYS_I2C_PICIO_ADDR, \
CONFIG_SYS_I2C_EEPROM_ADDR, \
}
#else /* Use EEPROM - which show up on 8 consequtive addresses */
#define I2C_ADDR_LIST { /* CONFIG_SYS_I2C_AUDIO_ADDR, */ \
CONFIG_SYS_I2C_SYSMON_ADDR, \
CONFIG_SYS_I2C_RTC_ADDR, \
CONFIG_SYS_I2C_POWER_A_ADDR, \
CONFIG_SYS_I2C_POWER_B_ADDR, \
CONFIG_SYS_I2C_KEYBD_ADDR, \
CONFIG_SYS_I2C_PICIO_ADDR, \
CONFIG_SYS_I2C_EEPROM_ADDR+0, \
CONFIG_SYS_I2C_EEPROM_ADDR+1, \
CONFIG_SYS_I2C_EEPROM_ADDR+2, \
CONFIG_SYS_I2C_EEPROM_ADDR+3, \
CONFIG_SYS_I2C_EEPROM_ADDR+4, \
CONFIG_SYS_I2C_EEPROM_ADDR+5, \
CONFIG_SYS_I2C_EEPROM_ADDR+6, \
CONFIG_SYS_I2C_EEPROM_ADDR+7, \
}
#define CONFIG_SYS_POST_I2C_ADDRS {/* CONFIG_SYS_I2C_AUDIO_ADDR, */ \
CONFIG_SYS_I2C_SYSMON_ADDR, \
CONFIG_SYS_I2C_RTC_ADDR, \
CONFIG_SYS_I2C_POWER_A_ADDR, \
CONFIG_SYS_I2C_POWER_B_ADDR, \
CONFIG_SYS_I2C_KEYBD_ADDR, \
CONFIG_SYS_I2C_PICIO_ADDR, \
CONFIG_SYS_I2C_EEPROM_ADDR+0, \
CONFIG_SYS_I2C_EEPROM_ADDR+1, \
CONFIG_SYS_I2C_EEPROM_ADDR+2, \
CONFIG_SYS_I2C_EEPROM_ADDR+3, \
CONFIG_SYS_I2C_EEPROM_ADDR+4, \
CONFIG_SYS_I2C_EEPROM_ADDR+5, \
CONFIG_SYS_I2C_EEPROM_ADDR+6, \
CONFIG_SYS_I2C_EEPROM_ADDR+7, \
}
#endif /* CONFIG_USE_FRAM */
/*-----------------------------------------------------------------------


+ 7
- 8
include/configs/lwmon5.h View File

@ -306,14 +306,13 @@
#define CONFIG_SYS_I2C_KEYBD_ADDR 0x56 /* PIC LWE keyboard */
#define CONFIG_SYS_I2C_DSPIC_IO_ADDR 0x57 /* PIC I/O addr */
#define I2C_ADDR_LIST { \
CONFIG_SYS_I2C_RTC_ADDR, \
CONFIG_SYS_I2C_EEPROM_CPU_ADDR, \
CONFIG_SYS_I2C_EEPROM_MB_ADDR, \
CONFIG_SYS_I2C_DSPIC_ADDR, \
CONFIG_SYS_I2C_DSPIC_2_ADDR, \
CONFIG_SYS_I2C_DSPIC_KEYB_ADDR, \
CONFIG_SYS_I2C_DSPIC_IO_ADDR }
#define CONFIG_SYS_POST_I2C_ADDRS {CONFIG_SYS_I2C_RTC_ADDR, \
CONFIG_SYS_I2C_EEPROM_CPU_ADDR,\
CONFIG_SYS_I2C_EEPROM_MB_ADDR, \
CONFIG_SYS_I2C_DSPIC_ADDR, \
CONFIG_SYS_I2C_DSPIC_2_ADDR, \
CONFIG_SYS_I2C_DSPIC_KEYB_ADDR,\
CONFIG_SYS_I2C_DSPIC_IO_ADDR }
/*
* Pass open firmware flat tree


+ 4
- 4
include/configs/spieval.h View File

@ -271,10 +271,10 @@
/* List of I2C addresses to be verified by POST */
#if defined (CONFIG_MINIFAP)
#undef I2C_ADDR_LIST
#define I2C_ADDR_LIST { CONFIG_SYS_I2C_EEPROM_ADDR, \
CONFIG_SYS_I2C_HWMON_ADDR, \
CONFIG_SYS_I2C_SLAVE }
#undef CONFIG_SYS_POST_I2C_ADDRS
#define CONFIG_SYS_POST_I2C_ADDRS {CONFIG_SYS_I2C_EEPROM_ADDR, \
CONFIG_SYS_I2C_HWMON_ADDR, \
CONFIG_SYS_I2C_SLAVE}
#endif
/*


+ 4
- 4
post/drivers/i2c.c View File

@ -26,10 +26,10 @@
*
* For verifying the I2C bus, a full I2C bus scanning is performed.
*
* #ifdef I2C_ADDR_LIST
* #ifdef CONFIG_SYS_POST_I2C_ADDRS
* The test is considered as passed if all the devices and
* only the devices in the list are found.
* #else [ ! I2C_ADDR_LIST ]
* #else [ ! CONFIG_SYS_POST_I2C_ADDRS ]
* The test is considered as passed if any I2C device is found.
* #endif
*/
@ -43,7 +43,7 @@
int i2c_post_test (int flags)
{
unsigned int i;
#ifndef I2C_ADDR_LIST
#ifndef CONFIG_SYS_POST_I2C_ADDRS
/* Start at address 1, address 0 is the general call address */
for (i = 1; i < 128; i++)
if (i2c_probe (i) == 0)
@ -54,7 +54,7 @@ int i2c_post_test (int flags)
#else
unsigned int ret = 0;
int j;
const unsigned char i2c_addr_list[] = I2C_ADDR_LIST;
const unsigned char i2c_addr_list[] = CONFIG_SYS_POST_I2C_ADDRS;
/* Start at address 1, address 0 is the general call address */
for (i = 1; i < 128; i++) {


Loading…
Cancel
Save