s5pc110: Remove unused power control devices
authorKyungmin Park <kyungmin.park@samsung.com>
Thu, 4 Mar 2010 01:26:41 +0000 (10:26 +0900)
committerKyungmin Park <kyungmin.park@samsung.com>
Thu, 4 Mar 2010 01:26:41 +0000 (10:26 +0900)
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
board/samsung/universal/universal.c

index d402faa..6cde6a1 100644 (file)
@@ -2754,161 +2754,6 @@ U_BOOT_CMD(
 #endif
 
 #ifdef CONFIG_CMD_DEVICE_POWER
-
-enum {
-       POWER_NONE,
-       POWER_TOUCH,
-       POWER_LCD,
-       POWER_HAPTIC,
-       POWER_AUDIO_CODEC,
-       POWER_FM_RADIO,
-       POWER_BT_WIFI,
-       POWER_HDMI,
-};
-
-static void power_display_devices(void)
-{
-       printf("devices:\n");
-       printf("\t%d - touch\n", POWER_TOUCH);
-       printf("\t%d - LCD\n", POWER_LCD);
-       printf("\t%d - Haptic\n", POWER_HAPTIC);
-       printf("\t%d - Audio Codec\n", POWER_AUDIO_CODEC);
-       printf("\t%d - FM Radio\n", POWER_FM_RADIO);
-       printf("\t%d - BT/WiFi\n", POWER_BT_WIFI);
-       printf("\t%d - HDMI\n", POWER_HDMI);
-}
-
-static int power_hdmi(int on)
-{
-       /* HDMI_EN1: GPJ2[2] */
-       gpio_direction_output(&s5pc110_gpio->gpio_j2, 2, on);
-       /* MHL_ON: GPJ2[3] */
-       gpio_direction_output(&s5pc110_gpio->gpio_j2, 3, on);
-       return 0;
-}
-
-static int power_bt_wifi(int on)
-{
-       /* WLAN_BT_EN: GPB[5] */
-       gpio_direction_output(&s5pc110_gpio->gpio_b, 5, on);
-       return 0;
-}
-
-static int power_fm_radio(int on)
-{
-       /* FM_BUS_nRST: GPJ2[5] */
-       gpio_direction_output(&s5pc110_gpio->gpio_j2, 5, !on);
-       return 0;
-}
-
-static int power_audio_codec(int on)
-{
-       /* CODEC_LDO_EN: GPF3[4] */
-       gpio_direction_output(&s5pc110_gpio->gpio_f3, 4, on);
-       /* CODEC_XTAL_EN: GPH3[2] */
-       gpio_direction_output(&s5pc110_gpio->gpio_h3, 2, on);
-       return 0;
-}
-
-static int power_haptic(int on)
-{
-       /* HAPTIC_ON: GPJ1[1] */
-       gpio_direction_output(&s5pc110_gpio->gpio_j1, 1, on);
-       return 0;
-}
-
-static int power_lcd(int on)
-{
-       /* MLCD_ON: GPJ1[3] */
-       gpio_direction_output(&s5pc110_gpio->gpio_j1, 3, on);
-       return 0;
-}
-
-static int power_touch(int on)
-{
-       /* TOUCH_EN: GPG3[6] */
-       gpio_direction_output(&s5pc110_gpio->gpio_g3, 6, on);
-       return 0;
-}
-
-static int power_control(int device, int on)
-{
-       switch (device) {
-       case POWER_TOUCH:
-               return power_touch(on);
-       case POWER_LCD:
-               return power_lcd(on);
-       case POWER_HAPTIC:
-               return power_haptic(on);
-       case POWER_AUDIO_CODEC:
-               return power_audio_codec(on);
-       case POWER_FM_RADIO:
-               return power_fm_radio(on);
-       case POWER_BT_WIFI:
-               return power_bt_wifi(on);
-       case POWER_HDMI:
-               return power_hdmi(on);
-       default:
-               printf("I don't know device %d\n", device);
-               break;
-       }
-       return 0;
-}
-
-static int power_on(int on)
-{
-       power_touch(on);
-       power_lcd(on);
-       power_haptic(on);
-       power_audio_codec(on);
-       power_fm_radio(on);
-       power_bt_wifi(on);
-       power_hdmi(on);
-
-       return 0;
-}
-
-static int do_power(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
-{
-       int device, on;
-
-       if (!machine_is_aquila() && !machine_is_kessler())
-               goto out;
-
-       switch (argc) {
-       case 2:
-               if (strncmp(argv[1], "on", 2) == 0)
-                       return power_on(1);
-               if (strncmp(argv[1], "off", 3) == 0)
-                       return power_on(0);
-               break;
-       case 3:
-               device = simple_strtoul(argv[1], NULL, 10);
-               if (device < 0)
-                       break;
-
-               if (strncmp(argv[2], "on", 2) == 0)
-                       on = 1;
-               else if (strncmp(argv[2], "off", 3) == 0)
-                       on = 0;
-               else
-                       break;
-               return power_control(device, on);
-       default:
-               break;
-       }
-out:
-       cmd_usage(cmdtp);
-       power_display_devices();
-       return 1;
-}
-
-U_BOOT_CMD(
-       power,          CONFIG_SYS_MAXARGS,     1, do_power,
-       "Device Power Management control",
-       "device on/off - Turn on/off the device\n"
-);
-
 static int do_microusb(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
        switch (argc) {