--- arch/arm/mach-s3c2440/mach-gta02.c | 56 ++++++++++++++++++++++++++++++------ arch/arm/plat-s3c24xx/devs.c | 10 ++++++ include/asm-arm/plat-s3c24xx/devs.h | 1 3 files changed, 59 insertions(+), 8 deletions(-) Index: linux-2.6.22-atheros-ng/arch/arm/plat-s3c24xx/devs.c =================================================================== --- linux-2.6.22-atheros-ng.orig/arch/arm/plat-s3c24xx/devs.c 2007-12-10 23:24:45.000000000 +0100 +++ linux-2.6.22-atheros-ng/arch/arm/plat-s3c24xx/devs.c 2007-12-10 23:24:50.000000000 +0100 @@ -421,6 +421,16 @@ EXPORT_SYMBOL(s3c_device_sdi); +struct platform_device s3c_2440_device_sdi = { + .name = "s3c2440-sdi", + .id = -1, + .num_resources = ARRAY_SIZE(s3c_sdi_resource), + .resource = s3c_sdi_resource, +}; + +EXPORT_SYMBOL(s3c_2440_device_sdi); + + /* High-speed MMC/SD */ static struct resource s3c_hsmmc_resource[] = { Index: linux-2.6.22-atheros-ng/arch/arm/mach-s3c2440/mach-gta02.c =================================================================== --- linux-2.6.22-atheros-ng.orig/arch/arm/mach-s3c2440/mach-gta02.c 2007-12-10 23:24:45.000000000 +0100 +++ linux-2.6.22-atheros-ng/arch/arm/mach-s3c2440/mach-gta02.c 2007-12-10 23:24:50.000000000 +0100 @@ -305,12 +305,41 @@ }, }; +static struct resource gta02_sdio_resources[] = { + [0] = { + .flags = IORESOURCE_IRQ, + .start = IRQ_SDI, + .end = IRQ_SDI, + }, + [1] = { + .flags = IORESOURCE_MEM, + .start = S3C2410_PA_SDI, + .end = S3C2410_PA_SDI + S3C24XX_SZ_SDI - 1, + }, + [2] = { + .flags = IORESOURCE_DMA, + .start = 0, /* Channel 0 for SDI */ + .end = 0, + }, +}; + + +static struct platform_device gta02_sdio_dev = { + .name = "s3c24xx-sdio", + .id = -1, + .dev = { + .coherent_dma_mask = 0xffffffff, + }, + .resource = gta02_sdio_resources, + .num_resources = ARRAY_SIZE(gta02_sdio_resources), +}; + static struct platform_device *gta02_devices[] __initdata = { &s3c_device_usb, &s3c_device_wdt, &s3c_device_i2c, &s3c_device_iis, - &s3c_device_sdi, + &s3c_2440_device_sdi, &s3c_device_usbgadget, &s3c_device_nand, &s3c_device_ts, @@ -633,13 +662,14 @@ { s3c_device_usb.dev.platform_data = >a02_usb_info; s3c_device_nand.dev.platform_data = >a02_nand_info; - s3c_device_sdi.dev.platform_data = >a02_mmc_cfg; + s3c_2440_device_sdi.dev.platform_data = >a02_mmc_cfg; s3c_device_spi1.dev.platform_data = >a02_spi_acc_cfg; /* Only GTA02v1 has a SD_DETECT GPIO. Since the slot is not * hot-pluggable, this is not required anyway */ switch (system_rev) { case GTA02v1_SYSTEM_REV: + case GTA02v2_SYSTEM_REV: break; default: gta02_mmc_cfg.gpio_detect = 0; @@ -650,18 +680,26 @@ s3c24xx_udc_set_platdata(>a02_udc_cfg); set_s3c2410ts_info(>a02_ts_cfg); - /* FIXME: hardcoded WLAN module power-up */ - s3c2410_gpio_cfgpin(GTA02_CHIP_PWD, S3C2410_GPIO_OUTPUT); - s3c2410_gpio_setpin(GTA02_CHIP_PWD, 0); - s3c2410_gpio_cfgpin(GTA02_GPIO_nWLAN_RESET, S3C2410_GPIO_OUTPUT); + + /* Power is down */ + s3c2410_gpio_setpin(GTA02_CHIP_PWD, 1); + mdelay(100); + switch (system_rev) { case GTA02v1_SYSTEM_REV: + s3c2410_gpio_setpin(GTA02_CHIP_PWD, 0); break; default: + printk("Powering up the module\n"); + s3c2410_gpio_cfgpin(GTA02_GPIO_nWLAN_RESET, S3C2410_GPIO_OUTPUT); + /* Chip is in reset state */ s3c2410_gpio_setpin(GTA02_GPIO_nWLAN_RESET, 0); - udelay(2000); - udelay(2000); + mdelay(100); + /* Power is up */ + s3c2410_gpio_setpin(GTA02_CHIP_PWD, 0); + mdelay(100); + /* Chip is out of reset */ s3c2410_gpio_setpin(GTA02_GPIO_nWLAN_RESET, 1); break; } @@ -677,6 +715,8 @@ mangle_glamo_res_by_system_rev(); platform_device_register(>a02_glamo_dev); + platform_device_register(>a02_sdio_dev); + platform_add_devices(gta02_devices, ARRAY_SIZE(gta02_devices)); s3c2410_pm_init(); Index: linux-2.6.22-atheros-ng/include/asm-arm/plat-s3c24xx/devs.h =================================================================== --- linux-2.6.22-atheros-ng.orig/include/asm-arm/plat-s3c24xx/devs.h 2007-12-10 23:24:45.000000000 +0100 +++ linux-2.6.22-atheros-ng/include/asm-arm/plat-s3c24xx/devs.h 2007-12-10 23:24:50.000000000 +0100 @@ -29,6 +29,7 @@ extern struct platform_device s3c_device_rtc; extern struct platform_device s3c_device_adc; extern struct platform_device s3c_device_sdi; +extern struct platform_device s3c_2440_device_sdi; extern struct platform_device s3c_device_hsmmc; extern struct platform_device s3c_device_spi0;