post/i2c: Rename I2C_ADDR_LIST to CONFIG_SYS_POST_I2C_ADDRS
authorPeter Tyser <ptyser@xes-inc.com>
Fri, 22 Oct 2010 05:20:30 +0000 (00:20 -0500)
committerKumar Gala <galak@kernel.crashing.org>
Fri, 22 Oct 2010 07:19:00 +0000 (02:19 -0500)
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>
doc/README.POST
include/configs/KUP4K.h
include/configs/KUP4X.h
include/configs/TB5200.h
include/configs/TQM5200.h
include/configs/cm5200.h
include/configs/lwmon.h
include/configs/lwmon5.h
include/configs/spieval.h
post/drivers/i2c.c

index eeb218d..695497e 100644 (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
 
index 9702d63..c8e0ff2 100644 (file)
 
 /* 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      */
 
index 9613ed9..ce731e3 100644 (file)
 
 /* 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      */
index ad86e2e..f336e8d 100644 (file)
 #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
index 2612c7a..794e11b 100644 (file)
 
 /* 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
 
 /*
index 1b129a2..af6769b 100644 (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
index 1062765..9e48857 100644 (file)
 
 /* 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 */
 
 /*-----------------------------------------------------------------------
index a4e92cc..63e22d4 100644 (file)
 #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
index b5ac168..880c8a3 100644 (file)
 
 /* 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
 
 /*
index 3508177..e6f4c6a 100644 (file)
  *
  * 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++) {