Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
[sfrench/cifs-2.6.git] / arch / arm / mach-s3c / mach-tct_hammer.c
similarity index 81%
rename from arch/arm/mach-s3c24xx/mach-tct_hammer.c
rename to arch/arm/mach-s3c/mach-tct_hammer.c
index 8d8ddd6ea3057211cb845d245e23d9288a48e87e..2a61df316e8ced5ae1524acf0327e01d2b385958 100644 (file)
@@ -7,6 +7,7 @@
 // derived from linux/arch/arm/mach-s3c2410/mach-bast.c, written by
 // Ben Dooks <ben@simtec.co.uk>
 
+#include <linux/gpio/machine.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/interrupt.h>
 #include <asm/mach/irq.h>
 #include <asm/mach/flash.h>
 
-#include <mach/hardware.h>
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <plat/devs.h>
-#include <plat/cpu.h>
+#include "devs.h"
+#include "cpu.h"
 
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <linux/mtd/map.h>
 #include <linux/mtd/physmap.h>
-#include <plat/samsung-time.h>
 
-#include "common.h"
+#include "s3c24xx.h"
 
 static struct resource tct_hammer_nor_resource =
                        DEFINE_RES_MEM(0x00000000, SZ_16M);
@@ -103,6 +102,19 @@ static struct s3c2410_uartcfg tct_hammer_uartcfgs[] = {
        }
 };
 
+static struct gpiod_lookup_table tct_hammer_mmc_gpio_table = {
+       .dev_id = "s3c2410-sdi",
+       .table = {
+               /* bus pins */
+               GPIO_LOOKUP_IDX("GPIOE",  5, "bus", 0, GPIO_ACTIVE_HIGH),
+               GPIO_LOOKUP_IDX("GPIOE",  6, "bus", 1, GPIO_ACTIVE_HIGH),
+               GPIO_LOOKUP_IDX("GPIOE",  7, "bus", 2, GPIO_ACTIVE_HIGH),
+               GPIO_LOOKUP_IDX("GPIOE",  8, "bus", 3, GPIO_ACTIVE_HIGH),
+               GPIO_LOOKUP_IDX("GPIOE",  9, "bus", 4, GPIO_ACTIVE_HIGH),
+               GPIO_LOOKUP_IDX("GPIOE", 10, "bus", 5, GPIO_ACTIVE_HIGH),
+               { },
+       },
+};
 
 static struct platform_device *tct_hammer_devices[] __initdata = {
        &s3c_device_adc,
@@ -119,18 +131,19 @@ static void __init tct_hammer_map_io(void)
 {
        s3c24xx_init_io(tct_hammer_iodesc, ARRAY_SIZE(tct_hammer_iodesc));
        s3c24xx_init_uarts(tct_hammer_uartcfgs, ARRAY_SIZE(tct_hammer_uartcfgs));
-       samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4);
+       s3c24xx_set_timer_source(S3C24XX_PWM3, S3C24XX_PWM4);
 }
 
 static void __init tct_hammer_init_time(void)
 {
        s3c2410_init_clocks(12000000);
-       samsung_timer_init();
+       s3c24xx_timer_init();
 }
 
 static void __init tct_hammer_init(void)
 {
        s3c_i2c0_set_platdata(NULL);
+       gpiod_add_lookup_table(&tct_hammer_mmc_gpio_table);
        platform_add_devices(tct_hammer_devices, ARRAY_SIZE(tct_hammer_devices));
 }