]> git.sur5r.net Git - u-boot/commitdiff
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 eeb218d39c64c064cd69143a848676074f3b9404..695497e4beffbfa1580cb87bc5f3587992a28a5d 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 9702d63eb8114ea4dd09e9b1137069c2a0d81af0..c8e0ff287bc1057b7e190c325c0a7d687ef60674 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 9613ed9a824f757ffb43e4f01267b09cd8eec021..ce731e387d819c5ff70f7427f679e9a774cb1299 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 ad86e2e23a3f01ed7a93a26c6dfa49c74c724a1f..f336e8d0bc31003a5b9dce5e539e21ff80b500d8 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 2612c7a50ba28f9415a9b1ac7b23adec50152d4a..794e11b024d764da64c9a5f8fc2a91bb4adc0964 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 1b129a2e667ec446838df0ad988462539a359d8f..af6769b18d533e427ea47ad7c627afaee506faaa 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 1062765f03662813afc02a367545b64c4eaa3679..9e48857308bf77417ba2cb739e260f52c09caada 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 a4e92cce3b7b5bbb203ef9e2c24816411f861f22..63e22d400c0b4c9e8a7f8a90ae01c24709a3dc38 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 b5ac1689b886831e2d191a7ce4582255bd84e598..880c8a30575d322f268302d9032b132996a85353 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 35081776b3cb8289a7f8e7b3d2c8b86e0765d07e..e6f4c6a1f213d4894c8bab43f18ff2a607d13c93 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++) {