]> git.sur5r.net Git - u-boot/blobdiff - board/samsung/common/misc.c
Merge branch 'master' of git://git.denx.de/u-boot-imx
[u-boot] / board / samsung / common / misc.c
index 9e5245230a5d37ca549dde860d8fca23fe3d589d..4538ac7f2a2fc2d2a91f840944d13ec542e35e11 100644 (file)
@@ -14,7 +14,6 @@
 #include <malloc.h>
 #include <linux/sizes.h>
 #include <asm/arch/cpu.h>
-#include <asm/arch/gpio.h>
 #include <asm/gpio.h>
 #include <linux/input.h>
 #include <power/pmic.h>
@@ -79,8 +78,16 @@ void set_board_info(void)
        setenv("board_rev", info);
 #endif
 #ifdef CONFIG_OF_LIBFDT
-       snprintf(info, ARRAY_SIZE(info),  "%s%x-%s.dtb",
-                CONFIG_SYS_SOC, s5p_cpu_id, CONFIG_SYS_BOARD);
+       const char *bdtype = "";
+       const char *bdname = CONFIG_SYS_BOARD;
+
+#ifdef CONFIG_BOARD_TYPES
+       bdtype = get_board_type();
+       sprintf(info, "%s%s", bdname, bdtype);
+       setenv("boardname", info);
+#endif
+       snprintf(info, ARRAY_SIZE(info),  "%s%x-%s%s.dtb",
+                CONFIG_SYS_SOC, s5p_cpu_id, bdname, bdtype);
        setenv("fdtfile", info);
 #endif
 }
@@ -404,6 +411,8 @@ void check_boot_mode(void)
 void keys_init(void)
 {
        /* Set direction to input */
+       gpio_request(KEY_VOL_UP_GPIO, "volume-up");
+       gpio_request(KEY_VOL_DOWN_GPIO, "volume-down");
        gpio_direction_input(KEY_VOL_UP_GPIO);
        gpio_direction_input(KEY_VOL_DOWN_GPIO);
 }