diff -Naur linux-2.6.27.38.original/arch/arm/mach-s3c2412/Kconfig linux-2.6.27.38/arch/arm/mach-s3c2412/Kconfig --- linux-2.6.27.38.original/arch/arm/mach-s3c2412/Kconfig 2009-10-22 08:22:46.000000000 +0100 +++ linux-2.6.27.38/arch/arm/mach-s3c2412/Kconfig 2009-11-04 09:15:46.000000000 +0000 @@ -60,13 +60,10 @@ selected config MACH_SMDK2412 - bool "SMDK2412" - select MACH_SMDK2413 + bool "SX560" + select CPU_S3C2412 help - Say Y here if you are using an SMDK2412 - - Note, this shares support with SMDK2413, so will automatically - select MACH_SMDK2413. + Say Y here if you are using a Silex SX-560 embedded WLAN module. config MACH_VSTMS bool "VMSTMS" diff -Naur linux-2.6.27.38.original/arch/arm/mach-s3c2412/mach-sx560.c linux-2.6.27.38/arch/arm/mach-s3c2412/mach-sx560.c --- linux-2.6.27.38.original/arch/arm/mach-s3c2412/mach-sx560.c 1970-01-01 01:00:00.000000000 +0100 +++ linux-2.6.27.38/arch/arm/mach-s3c2412/mach-sx560.c 2009-11-04 10:03:27.000000000 +0000 @@ -0,0 +1,135 @@ +/* linux/arch/arm/mach-s3c2412/mach-sx560.c + * + * Copyright (c) 2009 INOV - INESC Inovacao + * Jose Goncalves + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include +#include +#include +#include +#include + +static struct map_desc sx560_iodesc[] __initdata = { +}; + +static struct s3c2410_uartcfg sx560_uartcfgs[] __initdata = { + [0] = { + .hwport = 0, + .flags = 0, + .ucon = 0x3c5, + .ulcon = 0x03, + .ufcon = 0x51, + }, + [1] = { + .hwport = 1, + .flags = 0, + .ucon = 0x3c5, + .ulcon = 0x03, + .ufcon = 0x51, + }, + [2] = { + .hwport = 2, + .flags = 0, + .ucon = 0x3c5, + .ulcon = 0x03, + .ufcon = 0x51, + } +}; + +static struct platform_device *sx560_devices[] __initdata = { + &s3c_device_usb, + &s3c_device_wdt, + &s3c_device_rtc, + &s3c_device_i2c, + &s3c_device_spi0, + &s3c_device_usbgadget, + &s3c_device_sdi, +}; + +static void __init sx560_fixup(struct machine_desc *desc, + struct tag *tags, char **cmdline, + struct meminfo *mi) +{ + if (tags != phys_to_virt(S3C2410_SDRAM_PA + 0x100)) { + mi->nr_banks=1; + mi->bank[0].start = 0x30000000; + mi->bank[0].size = SZ_16M; + mi->bank[0].node = 0; + } +} + +static void __init sx560_map_io(void) +{ + s3c24xx_init_io(sx560_iodesc, ARRAY_SIZE(sx560_iodesc)); + s3c24xx_init_clocks(0); + s3c24xx_init_uarts(sx560_uartcfgs, ARRAY_SIZE(sx560_uartcfgs)); +} + +static void __init sx560_machine_init(void) +{ + /* Configure temperature sensor chip enable pin + * as output and disable the sensor */ + s3c2410_gpio_setpin(S3C2410_GPF3, 0); + s3c2410_gpio_cfgpin(S3C2410_GPF3, S3C2410_GPIO_OUTPUT); + + /* Configure SPI0 usage on pins GPE11, 12 and 13 */ + s3c2410_gpio_cfgpin(S3C2410_GPE13, S3C2410_GPE13_SPICLK0); + s3c2410_gpio_cfgpin(S3C2410_GPE12, S3C2410_GPE12_SPIMOSI0); + s3c2410_gpio_cfgpin(S3C2410_GPE11, S3C2410_GPE11_SPIMISO0); + s3c2410_gpio_pullup(S3C2410_GPE11, 0); + s3c2410_gpio_pullup(S3C2410_GPE13, 0); + + /* Turn off suspend for the selectable USB port and + * switch it to USB host mode. Turn on suspend for the + * host port since it is not connected on the SX-560. */ + s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST | + S3C2410_MISCCR_USBSUSPND0 | + S3C2410_MISCCR_USBSUSPND1, + S3C2410_MISCCR_USBHOST | + S3C2410_MISCCR_USBSUSPND0); + + platform_add_devices(sx560_devices, ARRAY_SIZE(sx560_devices)); +} + +MACHINE_START(SMDK2412, "SMDK2412") + /* Maintainer: Jose Goncalves */ + .phys_io = S3C2410_PA_UART, + .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, + .boot_params = S3C2410_SDRAM_PA + 0x100, + + .fixup = sx560_fixup, + .init_irq = s3c24xx_init_irq, + .map_io = sx560_map_io, + .init_machine = sx560_machine_init, + .timer = &s3c24xx_timer, +MACHINE_END diff -Naur linux-2.6.27.38.original/arch/arm/mach-s3c2412/Makefile linux-2.6.27.38/arch/arm/mach-s3c2412/Makefile --- linux-2.6.27.38.original/arch/arm/mach-s3c2412/Makefile 2009-10-22 08:22:46.000000000 +0100 +++ linux-2.6.27.38/arch/arm/mach-s3c2412/Makefile 2009-11-04 09:15:46.000000000 +0000 @@ -21,3 +21,4 @@ obj-$(CONFIG_MACH_JIVE) += mach-jive.o obj-$(CONFIG_MACH_SMDK2413) += mach-smdk2413.o obj-$(CONFIG_MACH_VSTMS) += mach-vstms.o +obj-$(CONFIG_MACH_SMDK2412) += mach-sx560.o