s5pc110: aquila: set usb path (workaround)
authorMinkyu Kang <mk7.kang@samsung.com>
Fri, 18 Sep 2009 00:24:22 +0000 (09:24 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Fri, 18 Sep 2009 00:24:22 +0000 (09:24 +0900)
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
board/samsung/universal/i2c-gpio.c
board/samsung/universal/universal.c
include/i2c-gpio.h

index fdb07f1..06bb737 100644 (file)
@@ -71,7 +71,7 @@ static struct i2c_gpio_bus i2c_gpio[] = {
        },
 };
 
-inline void i2c_gpio_set_bus(int bus)
+void i2c_gpio_set_bus(int bus)
 {
        bus_index = bus;
 }
index e6f9cf2..7e63568 100644 (file)
@@ -176,7 +176,7 @@ static void check_hw_revision(void)
                        /* Check features */
                        pin = S5PC110_GPIO_BASE(S5PC110_GPIO_H1_OFFSET);
                        pin += S5PC1XX_GPIO_DAT_OFFSET;
-                       if ((readl(pin) & 0xf0) & 0x20)
+                       if ((readl(pin) & (1 << 2)) == 0)
                                board_rev |= LIMO_UNIVERSAL_FEATURE;
 #if 0
                        /* C110 Aquila ScreenSplit */
@@ -403,7 +403,7 @@ static void check_battery(void)
 static void check_mhl(void)
 {
        unsigned char val[2];
-       unsigned char addr = 0x39;      /* SIL9230 */
+       unsigned char addr = 0x64;      /* SIL9230 */
        unsigned int pin, reg;
 
        /* MHL Power enable */
@@ -435,8 +435,18 @@ static void check_mhl(void)
 
        i2c_gpio_set_bus(I2C_GPIO5);
 
-       /* TODO */
        /* set usb path */
+       if (i2c_probe(addr)) {
+               printf("i2c_probe error: %x\n", addr);
+               return;
+       }
+
+       /* quick-start */
+       val[0] = 0x01;
+       if (i2c_write(addr, 0x21, 1, val, 1)) {
+               printf("i2c_write error: %x\n", addr);
+               return;
+       }
 }
 
 int misc_init_r(void)
index 48f038e..a4b5d05 100644 (file)
@@ -38,6 +38,7 @@ struct i2c_gpio_bus {
 void i2c_gpio_dir(int dir);
 void i2c_gpio_set(int line, int value);
 int i2c_gpio_get(void);
+void i2c_gpio_set_bus(int bus);
 
 #endif
 #endif