Skip to content
Snippets Groups Projects
Commit eccfb490 authored by Anatolij Gustschin's avatar Anatolij Gustschin Committed by Wolfgang Denk
Browse files

mpc5200: digsy_mtc: fix extension board EEPROM I2C address for rev5


On newer rev5 hardware the extension board EEPROM I2C address
has been changed to 0x54. Make this I2C address configurable
depending on CONFIG_DIGSY_REV5 so that extention board presence
detection works correctly on newer hardware.

Signed-off-by: default avatarAnatolij Gustschin <agust@denx.de>
parent 780f13a9
No related branches found
No related tags found
No related merge requests found
...@@ -220,9 +220,6 @@ int checkboard(void) ...@@ -220,9 +220,6 @@ int checkboard(void)
#define GPT_GPIO_ON 0x00000034 /* GPT as simple GPIO, high */ #define GPT_GPIO_ON 0x00000034 /* GPT as simple GPIO, high */
/* ExBo I2C Addresses */
#define EXBO_EE_I2C_ADDRESS 0x56
static void exbo_hw_init(void) static void exbo_hw_init(void)
{ {
struct mpc5xxx_gpt *gpt = (struct mpc5xxx_gpt *)MPC5XXX_GPT; struct mpc5xxx_gpt *gpt = (struct mpc5xxx_gpt *)MPC5XXX_GPT;
...@@ -232,7 +229,7 @@ static void exbo_hw_init(void) ...@@ -232,7 +229,7 @@ static void exbo_hw_init(void)
unsigned char val; unsigned char val;
/* 1st, check if extension board is present */ /* 1st, check if extension board is present */
if (i2c_read(EXBO_EE_I2C_ADDRESS, 0, 1, &val, 1)) if (i2c_read(CONFIG_SYS_EXBO_EE_I2C_ADDRESS, 0, 1, &val, 1))
return; return;
/* configure IrDA pins (PSC6 port) as gpios */ /* configure IrDA pins (PSC6 port) as gpios */
......
...@@ -288,6 +288,13 @@ ...@@ -288,6 +288,13 @@
#define CONFIG_SYS_DS1339_TCR_VAL 0xAB /* diode + 4k resistor */ #define CONFIG_SYS_DS1339_TCR_VAL 0xAB /* diode + 4k resistor */
#endif #endif
/* ExBo I2C Addresses */
#if defined(CONFIG_DIGSY_REV5)
#define CONFIG_SYS_EXBO_EE_I2C_ADDRESS 0x54
#else
#define CONFIG_SYS_EXBO_EE_I2C_ADDRESS 0x56
#endif
/* /*
* Flash configuration * Flash configuration
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment