Update latest codes
[platform/kernel/u-boot.git] / post / board / lwmon / sysmon.c
index ea8b5a9..fc828b2 100644 (file)
@@ -48,7 +48,7 @@
 #include <watchdog.h>
 #include <i2c.h>
 
-#if CONFIG_POST & CFG_POST_SYSMON
+#if CONFIG_POST & CONFIG_SYS_POST_SYSMON
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -56,8 +56,6 @@ static int sysmon_temp_invalid = 0;
 
 /* #define DEBUG */
 
-#define        RELOC(x) if (x != NULL) x = (void *) ((ulong) (x) + gd->reloc_off)
-
 typedef struct sysmon_s sysmon_t;
 typedef struct sysmon_table_s sysmon_table_t;
 
@@ -76,11 +74,11 @@ struct sysmon_s
 };
 
 static sysmon_t sysmon_lm87 =
-       {CFG_I2C_SYSMON_ADDR, sysmon_lm87_init, sysmon_i2c_read};
+       {CONFIG_SYS_I2C_SYSMON_ADDR, sysmon_lm87_init, sysmon_i2c_read};
 static sysmon_t sysmon_lm87_sgn =
-       {CFG_I2C_SYSMON_ADDR, sysmon_lm87_init, sysmon_i2c_read_sgn};
+       {CONFIG_SYS_I2C_SYSMON_ADDR, sysmon_lm87_init, sysmon_i2c_read_sgn};
 static sysmon_t sysmon_pic =
-       {CFG_I2C_PICIO_ADDR, sysmon_pic_init, sysmon_i2c_read};
+       {CONFIG_SYS_I2C_PICIO_ADDR, sysmon_pic_init, sysmon_i2c_read};
 
 static sysmon_t * sysmon_list[] =
 {
@@ -159,20 +157,7 @@ int sysmon_init_f (void)
 
 void sysmon_reloc (void)
 {
-       sysmon_t ** l;
-       sysmon_table_t * t;
-
-       for (l = sysmon_list; *l; l++) {
-               RELOC(*l);
-               RELOC((*l)->init);
-               RELOC((*l)->read);
-       }
-
-       for (t = sysmon_table; t < sysmon_table + sysmon_table_size; t ++) {
-               RELOC(t->exec_before);
-               RELOC(t->exec_after);
-               RELOC(t->sysmon);
-       }
+       /* Do nothing for now, sysmon_reloc() is required by the sysmon post */
 }
 
 static char *sysmon_unit_value (sysmon_table_t *s, uint val)
@@ -325,4 +310,4 @@ int sysmon_post_test (int flags)
        return res;
 }
 
-#endif /* CONFIG_POST & CFG_POST_SYSMON */
+#endif /* CONFIG_POST & CONFIG_SYS_POST_SYSMON */