aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorAndy Green <andy@openmoko.com>2008-11-21 11:56:56 +0000
committerAndy Green <agreen@pads.home.warmcat.com>2008-11-21 11:56:56 +0000
commit0bb3d4b86c7e1847fe072d0953f858136cbda08e (patch)
tree933b4f6c1e04805407d83f973be284d5dd873104 /arch
parent41a07b0e8f1c2dcb4eed14a4754324a1a578e44b (diff)
meddle-try-get-sdio-wlan-up.patch
Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-s3c6410/mach-om-gta03.c39
-rw-r--r--arch/arm/mach-s3c6410/setup-sdhci.c4
2 files changed, 39 insertions, 4 deletions
diff --git a/arch/arm/mach-s3c6410/mach-om-gta03.c b/arch/arm/mach-s3c6410/mach-om-gta03.c
index 1fc4d8ac110..8ff50822d7f 100644
--- a/arch/arm/mach-s3c6410/mach-om-gta03.c
+++ b/arch/arm/mach-s3c6410/mach-om-gta03.c
@@ -45,7 +45,7 @@
#include <plat/regs-serial.h>
#include <plat/iic.h>
#include <plat/fb.h>
-
+#include <plat/gpio-cfg.h>
#include <plat/s3c6410.h>
#include <plat/clock.h>
@@ -311,6 +311,7 @@ struct pcf50633_platform_data om_gta03_pcf_pdata = {
.num_consumer_supplies = 0,
/* .consumer_supplies = hcldo_consumers, */
},
+
/* GTA03: Accel 3V3 */
[PCF50633_REGULATOR_LDO1] = {
.constraints = {
@@ -408,7 +409,6 @@ static struct platform_device *om_gta03_devices[] __initdata = {
&s3c_device_fb,
&s3c_device_i2c0,
&s3c_device_hsmmc1, /* SDIO to WLAN */
- &om_gta03_button_dev,
};
static void om_gta03_pmu_regulator_registered(struct pcf50633 *pcf, int id)
@@ -433,6 +433,7 @@ static void om_gta03_pmu_regulator_registered(struct pcf50633 *pcf, int id)
}
static struct platform_device *om_gta03_devices_pmu_children[] = {
+ &om_gta03_button_dev,
};
/* this is called when pc50633 is probed, unfortunately quite late in the
@@ -476,6 +477,40 @@ static void __init om_gta03_machine_init(void)
s3c_i2c0_set_platdata(NULL);
s3c_fb_set_platdata(&om_gta03_lcd_pdata);
+ s3c_gpio_setpull(S3C64XX_GPH(0), S3C_GPIO_PULL_UP);
+ s3c_gpio_setpull(S3C64XX_GPH(1), S3C_GPIO_PULL_UP);
+ s3c_gpio_setpull(S3C64XX_GPH(2), S3C_GPIO_PULL_UP);
+ s3c_gpio_setpull(S3C64XX_GPH(3), S3C_GPIO_PULL_UP);
+ s3c_gpio_setpull(S3C64XX_GPH(4), S3C_GPIO_PULL_UP);
+ s3c_gpio_setpull(S3C64XX_GPH(5), S3C_GPIO_PULL_UP);
+
+
+ /* give power to WLAN / BT module */
+ s3c_gpio_setpull(S3C64XX_GPK(0), S3C_GPIO_PULL_NONE);
+ s3c_gpio_cfgpin(S3C64XX_GPK(0), S3C_GPIO_SFN(1));
+ gpio_direction_output(S3C64XX_GPK(0), 0);
+
+ mdelay(50);
+
+ s3c_gpio_setpull(S3C64XX_GPH(6), S3C_GPIO_PULL_NONE);
+ s3c_gpio_cfgpin(S3C64XX_GPH(6), S3C_GPIO_SFN(1));
+ gpio_direction_output(S3C64XX_GPH(6), 0);
+ mdelay(1);
+ gpio_direction_output(S3C64XX_GPH(6), 1);
+
+ s3c_gpio_setpull(S3C64XX_GPH(8), S3C_GPIO_PULL_NONE);
+ s3c_gpio_cfgpin(S3C64XX_GPH(8), S3C_GPIO_SFN(1));
+ gpio_direction_output(S3C64XX_GPH(8), 1);
+
+ s3c_gpio_setpull(S3C64XX_GPJ(8), S3C_GPIO_PULL_NONE);
+ s3c_gpio_cfgpin(S3C64XX_GPJ(8), S3C_GPIO_SFN(2));
+ s3c_gpio_setpull(S3C64XX_GPK(9), S3C_GPIO_PULL_NONE);
+ s3c_gpio_cfgpin(S3C64XX_GPK(9), S3C_GPIO_SFN(1));
+ s3c_gpio_setpull(S3C64XX_GPK(10), S3C_GPIO_PULL_NONE);
+ s3c_gpio_cfgpin(S3C64XX_GPK(10), S3C_GPIO_SFN(1));
+ s3c_gpio_setpull(S3C64XX_GPK(11), S3C_GPIO_PULL_NONE);
+ s3c_gpio_cfgpin(S3C64XX_GPK(11), S3C_GPIO_SFN(1));
+
i2c_register_board_info(0, om_gta03_i2c_devs,
ARRAY_SIZE(om_gta03_i2c_devs));
diff --git a/arch/arm/mach-s3c6410/setup-sdhci.c b/arch/arm/mach-s3c6410/setup-sdhci.c
index a254bcb9502..413a3819d82 100644
--- a/arch/arm/mach-s3c6410/setup-sdhci.c
+++ b/arch/arm/mach-s3c6410/setup-sdhci.c
@@ -80,7 +80,7 @@ void s3c6410_setup_sdhci0_cfg_card(struct platform_device *dev,
else
ctrl3 = (S3C_SDHCI_CTRL3_FCSEL1 | S3C_SDHCI_CTRL3_FCSEL0);
- printk(KERN_INFO "%s: CTRL 2=%08x, 3=%08x\n", __func__, ctrl2, ctrl3);
+ printk(KERN_INFO "%s: %p CTRL 2=%08x, 3=%08x\n", __func__, r, ctrl2, ctrl3);
writel(ctrl2, r + S3C_SDHCI_CONTROL2);
writel(ctrl3, r + S3C_SDHCI_CONTROL3);
}
@@ -95,7 +95,7 @@ void s3c6410_setup_sdhci1_cfg_gpio(struct platform_device *dev, int width)
/* Set all the necessary GPG pins to special-function 0 */
for (gpio = S3C64XX_GPH(0); gpio < end; gpio++) {
s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));
- s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
+ s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
}
// s3c_gpio_setpull(S3C64XX_GPG(6), S3C_GPIO_PULL_UP);