r3190 - branches/src/target/kernel/2.6.23.x/patches
shoragan at sita.openmoko.org
shoragan at sita.openmoko.org
Tue Oct 16 17:02:39 CEST 2007
Author: shoragan
Date: 2007-10-16 17:02:36 +0200 (Tue, 16 Oct 2007)
New Revision: 3190
Modified:
branches/src/target/kernel/2.6.23.x/patches/gta02-core.patch
Log:
Follow change in 2.6.22:
(orig r3155): laforge | 2007-10-13 03:03:57 +0200
GTA02: add missing GPIO definitions for GTA02v1 .. GTA02v4
Modified: branches/src/target/kernel/2.6.23.x/patches/gta02-core.patch
===================================================================
--- branches/src/target/kernel/2.6.23.x/patches/gta02-core.patch 2007-10-16 14:59:51 UTC (rev 3189)
+++ branches/src/target/kernel/2.6.23.x/patches/gta02-core.patch 2007-10-16 15:02:36 UTC (rev 3190)
@@ -2,7 +2,7 @@
===================================================================
--- /dev/null
+++ linux-2.6.22/arch/arm/mach-s3c2440/mach-gta02.c
-@@ -0,0 +1,600 @@
+@@ -0,0 +1,614 @@
+/*
+ * linux/arch/arm/mach-s3c2440/mach-gta02.c
+ *
@@ -253,6 +253,8 @@
+ PMU_VRAIL_F_SUSPEND_ON;
+ break;
+ case GTA02v2_SYSTEM_REV:
++ case GTA02v3_SYSTEM_REV:
++ case GTA02v4_SYSTEM_REV:
+ /* we need to keep the 1.8V going since this is the SDRAM
+ * self-refresh voltage */
+ gta02_pcf_pdata.rails[PCF50633_REGULATOR_DOWN2].flags =
@@ -346,13 +348,15 @@
+ switch (system_rev) {
+ case GTA02v1_SYSTEM_REV:
+ case GTA02v2_SYSTEM_REV:
++ case GTA02v3_SYSTEM_REV:
++ case GTA02v4_SYSTEM_REV:
+ /* FIXME */
+ break;
+ }
+}
+
+static struct s3c24xx_mci_pdata gta02_mmc_cfg = {
-+ .gpio_detect = GTA02_GPIO_nSD_DETECT,
++ .gpio_detect = GTA02v1_GPIO_nSD_DETECT,
+ .set_power = >a02_mmc_set_power,
+ .ocr_avail = MMC_VDD_32_33,
+};
@@ -521,8 +525,8 @@
+ .flags = IORESOURCE_IRQ,
+ },
+ [2] = {
-+ .start = GTA02_GPIO_3D_RESET,
-+ .end = GTA02_GPIO_3D_RESET,
++ .start = GTA02v1_GPIO_3D_RESET,
++ .end = GTA02v1_GPIO_3D_RESET,
+ },
+};
+
@@ -540,9 +544,9 @@
+ switch (system_rev) {
+ case GTA02v1_SYSTEM_REV:
+ break;
-+ case GTA02v2_SYSTEM_REV:
-+ gta02_glamo_resources[2].start = GTA02v2_GPIO_3D_RESET;
-+ gta02_glamo_resources[2].end = GTA02v2_GPIO_3D_RESET;
++ default:
++ gta02_glamo_resources[2].start = GTA02_GPIO_3D_RESET;
++ gta02_glamo_resources[2].end = GTA02_GPIO_3D_RESET;
+ break;
+ }
+}
@@ -566,6 +570,16 @@
+ s3c_device_nand.dev.platform_data = >a02_nand_info;
+ s3c_device_sdi.dev.platform_data = >a02_mmc_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:
++ break;
++ default:
++ gta02_mmc_cfg.gpio_detect = 0;
++ break;
++ }
++
+ INIT_WORK(>a02_udc_vbus_drawer.work, __gta02_udc_vbus_draw);
+ s3c24xx_udc_set_platdata(>a02_udc_cfg);
+ set_s3c2410ts_info(>a02_ts_cfg);
@@ -607,7 +621,7 @@
===================================================================
--- /dev/null
+++ linux-2.6.22/include/asm-arm/arch-s3c2410/gta02.h
-@@ -0,0 +1,32 @@
+@@ -0,0 +1,94 @@
+#ifndef _GTA02_H
+#define _GTA02_H
+
@@ -617,28 +631,90 @@
+/* Different hardware revisions, passed in ATAG_REVISION by u-boot */
+#define GTA02v1_SYSTEM_REV 0x00000310
+#define GTA02v2_SYSTEM_REV 0x00000320
++#define GTA02v3_SYSTEM_REV 0x00000330
++#define GTA02v4_SYSTEM_REV 0x00000340
+
-+#define GTA02_GPIO_3D_IRQ S3C2410_GPG4
-+#define GTA02_GPIO_3D_RESET S3C2440_GPJ0
-+#define GTA02_GPIO_nSD_DETECT S3C2410_GPF5
-+#define GTA02_GPIO_USB_PULLUP S3C2410_GPB9
++#define GTA02_GPIO_n3DL_GSM S3C2410_GPA13 /* v1 + v2 + v3 only */
++
+#define GTA02_GPIO_VIBRATOR_ON S3C2410_GPB3
-+#define GTA02_GPIO_HOLD_KEY S3C2410_GPF7
-+#define GTA02_GPIO_AUX_KEY S3C2410_GPF6
-+#define GTA02_GPIO_JACK_INSERT S3C2410_GPF4
++#define GTA02v1_GPIO_GPS_PWRON S3C2410_GPB4 /* v1 only */
++#define GTA02_GPIO_MODEM_RST S3C2410_GPB5
+#define GTA02_GPIO_BT_EN S3C2410_GPB6
-+#define GTA02_GPIO_GSENSOR1_CS S3C2410_GPD12
-+#define GTA02_GPIO_GSENSOR2_CS S3C2410_GPD13
++#define GTA02_GPIO_MODEM_ON S3C2410_GPB7
++#define GTA02v1_GPIO_EN_AGPS3V S3C2410_GPB8 /* v1 only */
++#define GTA02_GPIO_EXTINT8 S3C2410_GPB8
++#define GTA02_GPIO_USB_PULLUP S3C2410_GPB9
+
++#define GTA02v1_GPIO_nGPS_RST S3C2410_GPC0 /* v1 only */
++#define GTA02v12_GPIO_PIO3 S3C2410_GPC5 /* v1 + v2 only */
++#define GTA02_GPIO_PIO5 S3C2410_GPC5 /* v3 + v4 only */
++#define GTA02_GPIO_LCD_RESET S3C2410_GPC6 /* v1 + v2 only */
++#define GTA02v12_GPIO_PIO2 S3C2410_GPC7 /* v1 + v2 only */
++#define GTA02v2_nUSB_FLT S3C2410_GPC9 /* v2 only */
++#define GTA02v2_nUSB_OC S3C2410_GPC10 /* v2 only */
++#define GTA02v2_nGSM_OC S3C2410_GPC12 /* v2 only */
++
++#define GTA02v3_GPIO_nG1_CS S3C2410_GPD12 /* v3 + v4 only */
++#define GTA02v3_GPIO_nG2_CS S3C2410_GPD13 /* v3 + v4 only */
++
++#define GTA02_GPIO_nG1_INT S3C2410_GPF0
++#define GTA02_GPIO_IO1 S3C2410_GPF1
++#define GTA02v1_GPIO_nG2_INT S3C2410_GPF2 /* v1 only */
++#define GTA02_GPIO_PIO_2 S3C2410_GPF2 /* v2 + v3 + v4 only */
++#define GTA02_GPIO_JACK_INSERT S3C2410_GPF4
++#define GTA02v1_GPIO_nSD_DETECT S3C2410_GPF5 /* v1 only */
++#define GTA02_GPIO_WLAN_GPIO1 S3C2410_GPF5 /* v2 + v3 + v4 only */
++#define GTA02_GPIO_AUX_KEY S3C2410_GPF6
++#define GTA02_GPIO_HOLD_KEY S3C2410_GPF7
++
++#define GTA02_GPIO_3D_IRQ S3C2410_GPG4
++#define GTA02v1_GPIO_nG1_CS S3C2410_GPG8 /* v1 only */
++#define GTA02v2_GPIO_nG2_INT S3C2410_GPG8 /* v2 + v3 + v4 only */
++#define GTA02v3_GPIO_nUSB_OC S3C2410_GPG9 /* v3 + v4 only */
++#define GTA02v3_GPIO_nUSB_FLT S3C2410_GPG10 /* v3 + v4 only */
++#define GTA02v1_GPIO_nG2_CS S3C2410_GPG11 /* v1 only */
++#define GTA02v3_GPIO_nGSM_OC S3C2410_GPG11 /* v3 + v4 only */
++
++#define GTA02v1_GPIO_3D_RESET S3C2440_GPJ0 /* v1 only */
++#define GTA02v2_GPIO_BAT_ID S3C2440_GPJ0 /* v2 only */
++#define GTA02v1_GPIO_WLAN_GPIO8 S3C2440_GPJ1 /* v1 only */
++#define GTA02_GPIO_AMP_SHUT S3C2440_GPJ1 /* v2 + v3 + v4 only */
++#define GTA02v1_GPIO_WLAN_GPIO10 S3C2440_GPJ2
++#define GTA02_GPIO_HP_IN S3C2440_GPJ2 /* v2 + v3 + v4 only */
++#define GTA02v1_GPIO_KEEPACT S3C2440_GPJ3 /* v1 only */
++#define GTA02_GPIO_INT0 S3C2440_GPJ3 /* v2 + v3 + v4 only */
++#define GTA02_GPIO_nGSM_EN S3C2440_GPJ4
++#define GTA02_GPIO_3D_RESET S3C2440_GPJ5
++#define GTA02v4_GPIO_nDL_GSM S3C2440_GPJ6 /* v4 only */
++#define GTA02_GPIO_WLAN_GPIO0 S3C2440_GPJ7
++#define GTA02v1_GPIO_BAT_ID S3C2440_GPJ8
++#define GTA02_GPIO_KEEPACT S3C2440_GPJ8
++#define GTA02v1_GPIO_AMP_SHUT S3C2440_GPJ9 /* v1 only */
++#define GTA02v2_nG1_CS S3C2440_GPJ9 /* v2 only */
++#define GTA02v1_GPIO_HP_IN S3C2440_GPJ10
++#define GTA02v2_nG2_CS S3C2440_GPJ10 /* v2 only */
++#define GTA02v1_GPIO_INT0 S3C2440_GPJ11 /* v1 only */
++#define GTA02_CHIP_PWD S3C2440_GPJ11 /* v2 + v3 + v4 only */
++#define GTA02v1_GPIO_nGSM_EN S3C2440_GPJ12 /* v1 only */
++#define GTA02_GPIO_nWLAN_RESET S3C2440_GPJ12 /* v2 + v3 + v4 only */
++
++#define GTA02_IRQ_GSENSOR_1 IRQ_EINT0
+#define GTA02_IRQ_MODEM IRQ_EINT1
++#define GTA02v1_IRQ_GSENSOR_2 IRQ_EINT2 /* v1 only */
++#define GTA02_IRQ_PIO_2 IRQ_EINT2 /* v2 + v3 + v4 only */
++#define GTA02_IRQ_nJACK_INSERT IRQ_EINT4
++#define GTA02v1_IRQ_nSD_CD IRQ_EINT5 /* v1 only */
++#define GTA02_IRQ_WLAN_GPIO1 IRQ_EINT5
++#define GTA02_IRQ_AUX IRQ_EINT6
++#define GTA02_IRQ_nHOLD IRQ_EINT7
++#define GTA02v1_IRQ_nSIM_CD IRQ_EINT8 /* v1 only */
++#define GTA02_IRQ_PCF50633 IRQ_EINT9
+#define GTA02_IRQ_3D IRQ_EINT12
-+#define GTA02_IRQ_PCF50633 IRQ_EINT9
-+#define GTA02_IRQ_GSENSOR_1 IRQ_EINT0
-+#define GTA02_IRQ_GSENSOR_2 IRQ_EINT16
++#define GTA02_IRQ_GSENSOR_2 IRQ_EINT16 /* v2 + v3 + v4 only */
++#define GTA02v3_IRQ_nUSB_OC IRQ_EINT17 /* v3 + v4 only */
++#define GTA02v3_IRQ_nUSB_FLT IRQ_EINT18 /* v3 + v4 only */
++#define GTA02v3_IRQ_nGSM_OC IRQ_EINT19 /* v3 + v4 only */
+
-+/* Changes in GTA02v2 */
-+#define GTA02v2_GPIO_3D_RESET S3C2440_GPJ4
-+
+#endif /* _GTA02_H */
Index: linux-2.6.22/arch/arm/mach-s3c2440/Kconfig
===================================================================
More information about the commitlog
mailing list