diff options
Diffstat (limited to '')
-rw-r--r-- | arch/arm/mach-s3c/mach-vr1000.c (renamed from arch/arm/mach-s3c24xx/mach-vr1000.c) | 60 |
1 files changed, 43 insertions, 17 deletions
diff --git a/arch/arm/mach-s3c24xx/mach-vr1000.c b/arch/arm/mach-s3c/mach-vr1000.c index 853e74f9b8b5..c85033e6ef8f 100644 --- a/arch/arm/mach-s3c24xx/mach-vr1000.c +++ b/arch/arm/mach-s3c/mach-vr1000.c @@ -13,6 +13,7 @@ #include <linux/timer.h> #include <linux/init.h> #include <linux/gpio.h> +#include <linux/gpio/machine.h> #include <linux/dm9000.h> #include <linux/i2c.h> @@ -34,16 +35,15 @@ #include <linux/platform_data/i2c-s3c2410.h> #include <linux/platform_data/asoc-s3c24xx_simtec.h> -#include <mach/hardware.h> -#include <mach/regs-gpio.h> -#include <mach/gpio-samsung.h> +#include "regs-gpio.h" +#include "gpio-samsung.h" +#include "gpio-cfg.h" -#include <plat/cpu.h> -#include <plat/devs.h> -#include <plat/samsung-time.h> +#include "cpu.h" +#include "devs.h" #include "bast.h" -#include "common.h" +#include "s3c24xx.h" #include "simtec.h" #include "vr1000.h" @@ -67,11 +67,6 @@ static struct map_desc vr1000_iodesc[] __initdata = { .pfn = PA_CS2(BAST_PA_ISAIO), .length = SZ_16M, .type = MT_DEVICE, - }, { - .virtual = (u32)S3C24XX_VA_ISA_WORD, - .pfn = PA_CS3(BAST_PA_ISAIO), - .length = SZ_16M, - .type = MT_DEVICE, }, /* CPLD control registers, and external interrupt controls */ @@ -223,21 +218,42 @@ static struct platform_device vr1000_dm9k1 = { /* LEDS */ +static struct gpiod_lookup_table vr1000_led1_gpio_table = { + .dev_id = "s3c24xx_led.1", + .table = { + GPIO_LOOKUP("GPB", 0, NULL, GPIO_ACTIVE_HIGH), + { }, + }, +}; + +static struct gpiod_lookup_table vr1000_led2_gpio_table = { + .dev_id = "s3c24xx_led.2", + .table = { + GPIO_LOOKUP("GPB", 1, NULL, GPIO_ACTIVE_HIGH), + { }, + }, +}; + +static struct gpiod_lookup_table vr1000_led3_gpio_table = { + .dev_id = "s3c24xx_led.3", + .table = { + GPIO_LOOKUP("GPB", 2, NULL, GPIO_ACTIVE_HIGH), + { }, + }, +}; + static struct s3c24xx_led_platdata vr1000_led1_pdata = { .name = "led1", - .gpio = S3C2410_GPB(0), .def_trigger = "", }; static struct s3c24xx_led_platdata vr1000_led2_pdata = { .name = "led2", - .gpio = S3C2410_GPB(1), .def_trigger = "", }; static struct s3c24xx_led_platdata vr1000_led3_pdata = { .name = "led3", - .gpio = S3C2410_GPB(2), .def_trigger = "", }; @@ -305,18 +321,27 @@ static void __init vr1000_map_io(void) s3c24xx_init_io(vr1000_iodesc, ARRAY_SIZE(vr1000_iodesc)); s3c24xx_init_uarts(vr1000_uartcfgs, ARRAY_SIZE(vr1000_uartcfgs)); - samsung_set_timer_source(SAMSUNG_PWM3, SAMSUNG_PWM4); + s3c24xx_set_timer_source(S3C24XX_PWM3, S3C24XX_PWM4); } static void __init vr1000_init_time(void) { s3c2410_init_clocks(12000000); - samsung_timer_init(); + s3c24xx_timer_init(); } static void __init vr1000_init(void) { s3c_i2c0_set_platdata(NULL); + + /* Disable pull-up on LED lines and register GPIO lookups */ + s3c_gpio_setpull(S3C2410_GPB(0), S3C_GPIO_PULL_NONE); + s3c_gpio_setpull(S3C2410_GPB(1), S3C_GPIO_PULL_NONE); + s3c_gpio_setpull(S3C2410_GPB(2), S3C_GPIO_PULL_NONE); + gpiod_add_lookup_table(&vr1000_led1_gpio_table); + gpiod_add_lookup_table(&vr1000_led2_gpio_table); + gpiod_add_lookup_table(&vr1000_led3_gpio_table); + platform_add_devices(vr1000_devices, ARRAY_SIZE(vr1000_devices)); i2c_register_board_info(0, vr1000_i2c_devs, @@ -331,6 +356,7 @@ static void __init vr1000_init(void) MACHINE_START(VR1000, "Thorcom-VR1000") /* Maintainer: Ben Dooks <ben@simtec.co.uk> */ .atag_offset = 0x100, + .nr_irqs = NR_IRQS_S3C2410, .map_io = vr1000_map_io, .init_machine = vr1000_init, .init_irq = s3c2410_init_irq, |