r2288 - trunk/src/target/kernel/patches
laforge at sita.openmoko.org
laforge at sita.openmoko.org
Sun Jun 17 10:53:57 CEST 2007
Author: laforge
Date: 2007-06-17 10:53:53 +0200 (Sun, 17 Jun 2007)
New Revision: 2288
Modified:
trunk/src/target/kernel/patches/gta02-core.patch
Log:
* use correct 12MHz clock setting for GTA02
* don't export platform devices globally, but mark them static
* temporarily 'fix' the bluetooth power platform device (ugly hack)
Modified: trunk/src/target/kernel/patches/gta02-core.patch
===================================================================
--- trunk/src/target/kernel/patches/gta02-core.patch 2007-06-17 07:27:59 UTC (rev 2287)
+++ trunk/src/target/kernel/patches/gta02-core.patch 2007-06-17 08:53:53 UTC (rev 2288)
@@ -490,7 +490,7 @@
+ },
+};
+
-+struct platform_device gta01_button_dev = {
++static struct platform_device gta01_button_dev = {
+ .name = "gta01-button",
+ .num_resources = ARRAY_SIZE(gta01_button_resources),
+ .resource = gta01_button_resources,
@@ -561,7 +561,7 @@
+static void __init gta02_map_io(void)
+{
+ s3c24xx_init_io(gta02_iodesc, ARRAY_SIZE(gta02_iodesc));
-+ s3c24xx_init_clocks(16934400);
++ s3c24xx_init_clocks(12000000);
+ s3c24xx_init_uarts(gta02_uartcfgs, ARRAY_SIZE(gta02_uartcfgs));
+ s3c24xx_set_board(>a02_board);
+}
@@ -662,3 +662,94 @@
obj-$(CONFIG_MACH_NEXCODER_2440) += mach-nexcoder.o
obj-$(CONFIG_MACH_HXD8) += mach-hxd8.o
+obj-$(CONFIG_MACH_NEO1973_GTA02) += mach-gta02.o
+Index: linux-2.6.21.3-moko/arch/arm/common/gta01_pm_bt.c
+===================================================================
+--- linux-2.6.21.3-moko.orig/arch/arm/common/gta01_pm_bt.c
++++ linux-2.6.21.3-moko/arch/arm/common/gta01_pm_bt.c
+@@ -19,6 +19,7 @@
+ #include <linux/pcf50606.h>
+
+ #include <asm/hardware.h>
++#include <asm/mach-types.h>
+ #include <asm/arch/gta01.h>
+
+ #define DRVMSG "FIC GTA01 (Neo1973) Bluetooth Power Management"
+@@ -27,11 +28,18 @@
+ char *buf)
+ {
+ if (!strcmp(attr->attr.name, "power_on")) {
+- if (pcf50606_onoff_get(pcf50606_global,
+- PCF50606_REGULATOR_D1REG) &&
+- pcf50606_voltage_get(pcf50606_global,
+- PCF50606_REGULATOR_D1REG) == 3100)
+- goto out_1;
++ switch (machine_arch_type) {
++ case MACH_TYPE_NEO1973_GTA01:
++ if (pcf50606_onoff_get(pcf50606_global,
++ PCF50606_REGULATOR_D1REG) &&
++ pcf50606_voltage_get(pcf50606_global,
++ PCF50606_REGULATOR_D1REG) == 3100)
++ goto out_1;
++ break;
++ case MACH_TYPE_NEO1973_GTA02:
++ /* FIXME: implementation using PCF50633 */
++ break;
++ }
+ } else if (!strcmp(attr->attr.name, "reset")) {
+ if (s3c2410_gpio_getpin(GTA01_GPIO_BT_EN) == 0)
+ goto out_1;
+@@ -48,17 +56,24 @@
+ unsigned long on = simple_strtoul(buf, NULL, 10);
+
+ if (!strcmp(attr->attr.name, "power_on")) {
+- /* if we are powering up, assert reset, then power, then
+- * release reset */
+- if (on) {
+- s3c2410_gpio_setpin(GTA01_GPIO_BT_EN, 0);
+- pcf50606_voltage_set(pcf50606_global,
+- PCF50606_REGULATOR_D1REG,
+- 3100);
++ switch (machine_arch_type) {
++ case MACH_TYPE_NEO1973_GTA01:
++ /* if we are powering up, assert reset, then power, then
++ * release reset */
++ if (on) {
++ s3c2410_gpio_setpin(GTA01_GPIO_BT_EN, 0);
++ pcf50606_voltage_set(pcf50606_global,
++ PCF50606_REGULATOR_D1REG,
++ 3100);
++ }
++ pcf50606_onoff_set(pcf50606_global,
++ PCF50606_REGULATOR_D1REG, on);
++ s3c2410_gpio_setpin(GTA01_GPIO_BT_EN, on);
++ break;
++ case MACH_TYPE_NEO1973_GTA02:
++ /* FIXME: implementation */
++ break;
+ }
+- pcf50606_onoff_set(pcf50606_global,
+- PCF50606_REGULATOR_D1REG, on);
+- s3c2410_gpio_setpin(GTA01_GPIO_BT_EN, on);
+ } else if (!strcmp(attr->attr.name, "reset")) {
+ /* reset is low-active, so we need to invert */
+ s3c2410_gpio_setpin(GTA01_GPIO_BT_EN, on ? 0 : 1 );
+@@ -107,9 +122,16 @@
+ {
+ dev_info(&pdev->dev, DRVMSG ": starting\n");
+
+- /* we make sure that the voltage is off */
+- pcf50606_onoff_set(pcf50606_global,
+- PCF50606_REGULATOR_D1REG, 0);
++ switch (machine_arch_type) {
++ case MACH_TYPE_NEO1973_GTA01:
++ /* we make sure that the voltage is off */
++ pcf50606_onoff_set(pcf50606_global,
++ PCF50606_REGULATOR_D1REG, 0);
++ break;
++ case MACH_TYPE_NEO1973_GTA02:
++ /* FIXME: implementation */
++ break;
++ }
+ /* we pull reset to low to make sure that the chip doesn't
+ * drain power through the reset line */
+ s3c2410_gpio_setpin(GTA01_GPIO_BT_EN, 0);
More information about the commitlog
mailing list