r3849 - branches/src/target/kernel/2.6.24.x/patches

werner at sita.openmoko.org werner at sita.openmoko.org
Tue Jan 15 22:12:29 CET 2008


Author: werner
Date: 2008-01-15 22:12:26 +0100 (Tue, 15 Jan 2008)
New Revision: 3849

Modified:
   branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch
Log:
Applied most of "mach-gta02_wifi.patch",
http://git.openmoko.org/?p=kernel.git;a=commit;h=2066e0986693a33c77ae214b4d41071c4f556932

gta02-core.patch:
- arch/arm/mach-s3c2440/mach-gta02.c (gta02_sdio_resources, gta02_sdio_dev,
  gta02_machine_init): added SDIO resources
- arch/arm/mach-s3c2440/mach-gta02.c (gta02_machine_init): added power up and
  reset logic for WLAN



Modified: branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch
===================================================================
--- branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch	2008-01-15 21:02:05 UTC (rev 3848)
+++ branches/src/target/kernel/2.6.24.x/patches/gta02-core.patch	2008-01-15 21:12:26 UTC (rev 3849)
@@ -2,7 +2,7 @@
 ===================================================================
 --- /dev/null
 +++ linux-2.6.24-rc7/arch/arm/mach-s3c2440/mach-gta02.c
-@@ -0,0 +1,711 @@
+@@ -0,0 +1,753 @@
 +/*
 + * linux/arch/arm/mach-s3c2440/mach-gta02.c
 + *
@@ -338,6 +338,35 @@
 +
 +
 +
++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,
@@ -665,14 +694,25 @@
 +	set_s3c2410ts_info(&gta02_ts_cfg);
 +
 +	/* FIXME: hardcoded WLAN module power-up */
-+	s3c2410_gpio_setpin(GTA02_CHIP_PWD, 0);
++	s3c2410_gpio_cfgpin(GTA02_CHIP_PWD, 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:
++		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;
 +	}
@@ -688,6 +728,8 @@
 +	mangle_glamo_res_by_system_rev();
 +	platform_device_register(&gta02_glamo_dev);
 +
++	platform_device_register(&gta02_sdio_dev);
++
 +	platform_add_devices(gta02_devices, ARRAY_SIZE(gta02_devices));
 +
 +	s3c2410_pm_init();





More information about the commitlog mailing list