s5pc110: universal: change board name from "Neptune" to "Limo SDK"
[kernel/u-boot.git] / board / samsung / universal / universal.c
index a796bbc..b1c23b2 100644 (file)
@@ -239,6 +239,11 @@ static int board_is_limo_real(void)
        return mach_is_aquila() && (board_rev & LIMO_REAL_BOARD);
 }
 
+static int board_is_bamboo(void)
+{
+       return mach_is_aquila() && (board_rev & BAMBOO_BOARD);
+}
+
 static int board_is_media(void)
 {
        return mach_is_aquila() && (board_rev & MEDIA_BOARD);
@@ -369,7 +374,7 @@ static const char *board_name[] = {
        "P1P2",         /* Don't remove it */
        "Geminus",
        "Cypress",
-       "Neptune",
+       "Limo SDK",
 };
 
 enum {
@@ -403,7 +408,7 @@ static char *display_features(int board, int board_rev)
                        name = "Bamboo";
        } else if (board == MACH_KESSLER) {
                if (board_rev & NEPTUNE_BOARD)
-                       name = "Neptune";
+                       name = "Limo SDK";
                if (board_rev & S1_BOARD)
                        name = "S1";
        }
@@ -685,8 +690,13 @@ static void show_hw_revision(void)
                        if ((board_rev & 0xf) < 8)
                                s5pc1xx_set_cpu_rev(0);
                }
+               else if (board_is_bamboo())
+                       s5pc1xx_set_cpu_rev(0);
        } else if (mach_is_kessler()) {
-               s5pc1xx_set_cpu_rev(1);
+               if (board_is_neptune() && hwrevision(2))
+                       s5pc1xx_set_cpu_rev(2); /* EVT1-Fused */
+               else
+                       s5pc1xx_set_cpu_rev(1);
        } else if (mach_is_geminus()) {
                if ((board_rev & 0xf) < 1)
                        s5pc1xx_set_cpu_rev(0);
@@ -697,7 +707,7 @@ static void show_hw_revision(void)
        }
 
        if (cpu_is_s5pc110())
-               writel(0xc1100000 | (0xffff & s5pc1xx_get_cpu_rev()),
+               writel(0xc1100000 | (0xffff & (s5pc1xx_get_cpu_rev() ? 1 : 0)),
                                S5PC110_INFORM3);
 
        empty_device_info_buffer();
@@ -714,11 +724,11 @@ static void check_auto_burn(void)
        char buf[64];
 
        if (readl(magic_base) == 0x426f6f74) {  /* ASICC: Boot */
-               printf("Auto burning bootloader\n");
+               puts("Auto burning bootloader\n");
                count += sprintf(buf + count, "run updateb; ");
        }
        if (readl(magic_base + 0x04) == 0x4b65726e) {   /* ASICC: Kern */
-               printf("Auto burning kernel\n");
+               puts("Auto burning kernel\n");
                count += sprintf(buf + count, "run updatek; ");
        }
 
@@ -897,10 +907,14 @@ static void check_keypad(void)
                /* volume down */
                if (row_state[1] & 0x2)
                        display_info = 1;
-               if (board_is_neptune()) {
+               if (board_is_neptune() && hwrevision(0)) {
                        /* home & volume down */
                        if ((row_state[1] & 0x1) && (row_state[1] & 0x2))
                                auto_download = 1;
+               } else if (board_is_neptune() && hwrevision(2)) {
+                       /* cam full shot & volume down */
+                       if ((row_state[1] & 0x6) && (row_state[2] & 0x4))
+                               auto_download = 1;
                } else {
                        /* cam full shot & volume down */
                        if ((row_state[0] & 0x1) && (row_state[1] & 0x2))
@@ -936,7 +950,7 @@ static void check_battery(int mode)
                return;
 
        if (i2c_probe(addr)) {
-               printf("Can't found max17040 fuel gauge\n");
+               puts("Can't found max17040 fuel gauge\n");
                return;
        }
 
@@ -974,7 +988,7 @@ static void check_mhl(void)
 
        /* set usb path */
        if (i2c_probe(addr)) {
-               printf("Can't found MHL Chip\n");
+               puts("Can't found MHL Chip\n");
                return;
        }
 
@@ -1004,7 +1018,7 @@ static int max8998_probe(void)
        i2c_set_bus_num(I2C_PMIC);
 
        if (i2c_probe(addr)) {
-               printf("Can't found max8998\n");
+               puts("Can't found max8998\n");
                return 1;
        }
 
@@ -1248,7 +1262,7 @@ static void charger_en(int enable)
                return;
 
        if (!enable) {
-               printf("Disable the charger.\n");
+               puts("Disable the charger.\n");
                i2c_read(addr, 0x0D, 1, val, 1);
                val[0] &= ~(0x1);
                val[0] |= 0x1;
@@ -1290,7 +1304,7 @@ static void into_charge_mode(void)
 
        max8998_clear_interrupt();
 
-       printf("Charge Mode\n");
+       puts("Charge Mode\n");
        charger_en(charger_speed);
 
 #ifdef CONFIG_S5PC1XXFB
@@ -1385,7 +1399,7 @@ static void into_charge_mode(void)
                                wakeup_stat = do_sleep(&ctt, 0, 1, argv);
                        }
                } else {
-                       printf("\n\n\nERROR: this is not S5PC110.\n\n\n");
+                       puts("\n\n\nERROR: this is not S5PC110.\n\n\n");
                        return;
                }
 
@@ -1472,7 +1486,7 @@ static int fsa9480_probe(void)
        }
 
        if (i2c_probe(addr)) {
-               printf("Can't found fsa9480\n");
+               puts("Can't found fsa9480\n");
                return 1;
        }
 
@@ -1802,7 +1816,7 @@ void lcd_cfg_gpio(void)
        /* LCD_BACKLIGHT_EN */
        if (mach_is_geminus())
                gpio_cfg_pin(&gpio_base->gpio_mp0_5, 0, GPIO_OUTPUT);
-       if (board_is_neptune()) {
+       if (board_is_neptune() && hwrevision(0)) {
                gpio_cfg_pin(&gpio_base->gpio_mp0_4, 4, GPIO_OUTPUT);
                gpio_direction_output(&gpio_base->gpio_mp0_4, 4, 0);
        }
@@ -1903,7 +1917,7 @@ void backlight_on(unsigned int onoff)
                addr = 0x76;
                if (i2c_probe(addr)) {
                        if (i2c_probe(addr)) {
-                               printf("Can't found s6d16a0x backlight i2c\n");
+                               puts("Can't found s6d16a0x backlight i2c\n");
                                return;
                        }
                }
@@ -2324,9 +2338,12 @@ int dram_init(void)
                 * Aquila Rev0.5 4G3G1G
                 * Aquila Rev0.8 4G3G1G
                 * Aquila Rev0.9 4G3G1G
+                * Neptune Rev 0.2 4G3G1G
                 */
                if (mach_is_aquila() || mach_is_kessler()) {
-                       if (hwrevision(5) || hwrevision(8) || hwrevision(9)) {
+                       if ((!board_is_neptune() && (hwrevision(5) ||
+                               hwrevision(8) || hwrevision(9))) ||
+                               (board_is_neptune() && hwrevision(2))) {
                                memconfig1 = readl(base + MEMCONFIG1_OFFSET);
 
                                sz = (memconfig1 >> 16) & 0xFF;
@@ -2476,7 +2493,7 @@ void board_sleep_resume(void)
        /* Set ONOFF4 */
        i2c_write(addr, MAX8998_REG_ONOFF3+1, 1, saved_val[3], 1);
        i2c_read(addr, MAX8998_REG_ONOFF3+1, 1, val, 1);
-       printf("Waked up.\n");
+       puts("Waked up.\n");
 
        /* check max17040 */
        check_battery(0);
@@ -2555,7 +2572,7 @@ int usb_board_init(void)
 
                /* PMIC */
                if (i2c_read(0x66, 0, 1, val, 2)) {
-                       printf("i2c_read error\n");
+                       puts("i2c_read error\n");
                        return 1;
                }
 
@@ -2563,7 +2580,7 @@ int usb_board_init(void)
                val[1] |= (1 << 5);
 
                if (i2c_write(0x66, 0, 1, val, 2)) {
-                       printf("i2c_write error\n");
+                       puts("i2c_write error\n");
                        return 1;
                }
                i2c_read(0x66, 0, 1, val, 2);