Skip to contentSkip to conversation

ARM: S3C24XX gpio cleanups and fixes

PATCH New Sylwester Nawrocki 4 participants 14 messages Jun 30, 2012 – Jul 12, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover ARM: S3C24XX gpio cleanups and fixes

This changset attempts to remove the users of an obsolete GPIO API in Samsung S3C24XX platform and instead use the gpiolib API. It should allow to drop some s3c24xx SoC specific headers as a next step and simplify drivers/gpio/gpio-samsung.c driver a little. With the introduction of the pinctrl GPIO driver we're going to have three distinct GPIO APIs. Let's avoid this and drop the s3c24xx_gpio_* functions, which have been scheduled for removal since about v2.6.35.

Additionally this changeset includes two minor fixes, for AC97 clock and CAMIF interrupts.

Sylwester Nawrocki (10):
ARM: S3C24XX: Free the backlight gpio requested in Mini2440 board code
ARM: S3C24XX: Convert SMDK board file to the gpiolib API
ARM: S3C24XX: Convert QT2410 board file to the gpiolib API
ARM: S3C24XX: Convert the PM code to gpiolib API
ARM: S3C24XX: Convert the touchscreen setup code to common GPIO API
ARM: S3C24XX: Remove unused GPA, GPE, GPH bank GPIO aliases
ARM: S3C24XX: Remove unused GPIO definitions for port J
ARM: S3C24XX: Remove unused GPIO definitions for Openmoko GTA02 board
ARM: S3C24XX: Correct AC97 clock control bit for S3C2440
ARM: S3C24XX: Correct CAMIF interrupt definitions

 arch/arm/mach-s3c24xx/clock-s3c2440.c           |    2 +-
 arch/arm/mach-s3c24xx/common-smdk.c             |   20 ++++---
 arch/arm/mach-s3c24xx/include/mach/gpio-nrs.h   |   21 -------
 arch/arm/mach-s3c24xx/include/mach/gta02.h      |   69 ----------------------
 arch/arm/mach-s3c24xx/include/mach/regs-gpio.h  |   17 +++++-
 arch/arm/mach-s3c24xx/include/mach/regs-gpioj.h |   70 -----------------------
 arch/arm/mach-s3c24xx/mach-gta02.c              |    1 -
 arch/arm/mach-s3c24xx/mach-mini2440.c           |    4 +-
 arch/arm/mach-s3c24xx/mach-qt2410.c             |    6 +-
 arch/arm/mach-s3c24xx/mach-rx1950.c             |    1 -
 arch/arm/mach-s3c24xx/pm-s3c2410.c              |   12 +++-
 arch/arm/mach-s3c24xx/pm-s3c2412.c              |    1 -
 arch/arm/mach-s3c24xx/s3c2412.c                 |    1 -
 arch/arm/mach-s3c24xx/s3c244x.c                 |    1 -
 arch/arm/mach-s3c24xx/setup-ts.c                |    6 +--
 arch/arm/plat-samsung/devs.c                    |    3 +-
 16 files changed, 43 insertions(+), 192 deletions(-)
 delete mode 100644 arch/arm/mach-s3c24xx/include/mach/regs-gpioj.h

--
1.7.4.1

#1 lore raw

PATCH 1/10 ARM: S3C24XX: Free the backlight gpio requested in Mini2440 board code

The backlight gpio must not be left requested in the board code, otherwise s3c24xx_led driver can't successfully claim it. So request the backlight gpio, configure it to proper state and gpio_free right away.

This change is required for converting the s3c24xx_led driver to the gpiolib API.

---
 arch/arm/mach-s3c24xx/mach-mini2440.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-s3c24xx/mach-mini2440.c +2 -2
index f092b18..bd6d252 100644
@@ -634,8 +634,8 @@ static void __init mini2440_init(void)
 	s3c_gpio_cfgpin(S3C2410_GPC(0), S3C2410_GPC0_LEND);
 
 	/* Turn the backlight early on */
-	WARN_ON(gpio_request(S3C2410_GPG(4), "backlight"));
-	gpio_direction_output(S3C2410_GPG(4), 1);
+	WARN_ON(gpio_request_one(S3C2410_GPG(4), GPIOF_OUT_INIT_HIGH, NULL));
+	gpio_free(S3C2410_GPG(4));
 
 	/* remove pullup on optional PWM backlight -- unused on 3.5 and 7"s */
 	s3c_gpio_setpull(S3C2410_GPB(1), S3C_GPIO_PULL_UP);
Signature · 1 line
1.7.4.1
#2 lore raw

PATCH 1/10 ARM: S3C24XX: Free the backlight gpio requested in Mini2440 board code

Quoted 18 lines · Sylwester Nawrocki

The backlight gpio must not be left requested in the board code, otherwise s3c24xx_led driver can't successfully claim it. So request the backlight gpio, configure it to proper state and gpio_free right away.

This change is required for converting the s3c24xx_led driver to the gpiolib API.

---
 arch/arm/mach-s3c24xx/mach-mini2440.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-s3c24xx/mach-mini2440.c index f092b18..bd6d252 100644

arch/arm/mach-s3c24xx/mach-mini2440.c static void __init mini2440_init(void) · line 641

Quoted 10 lines
arch/arm/mach-s3c24xx/mach-mini2440.c +2 -2
@@ -634,8 +634,8 @@ static void __init mini2440_init(void)
 	s3c_gpio_cfgpin(S3C2410_GPC(0), S3C2410_GPC0_LEND);
 
 	/* Turn the backlight early on */
-	WARN_ON(gpio_request(S3C2410_GPG(4), "backlight"));
-	gpio_direction_output(S3C2410_GPG(4), 1);
+	WARN_ON(gpio_request_one(S3C2410_GPG(4), GPIOF_OUT_INIT_HIGH, NULL));
+	gpio_free(S3C2410_GPG(4));
 
 	/* remove pullup on optional PWM backlight -- unused on 3.5 and 7"s */
 	s3c_gpio_setpull(S3C2410_GPB(1), S3C_GPIO_PULL_UP);
Acked-by jbe at pengutronix.de
Signature · 2 lines
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |
#3 lore raw

PATCH 2/10 ARM: S3C24XX: Convert SMDK board file to the gpiolib API

In reply to Sylwester Nawrocki

Replace SoC specific GPIO functions with the gpiolib API. The LED gpios are freed right after they are initially configured so they can be acquired in the s3c24xx_led driver.

This change is required for converting the s3c24xx_led driver to the gpiolib API.

---
This change is only compile tested, since I don't have the board. Thus it would be good if someone could test this and provide a Tested-by tag.

---
 arch/arm/mach-s3c24xx/common-smdk.c |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)
arch/arm/mach-s3c24xx/common-smdk.c +11 -9
index 084604b..87e75a2 100644
@@ -182,19 +182,21 @@ static struct platform_device __initdata *smdk_devs[] = {
 	&smdk_led7,
 };
 
+static const struct gpio smdk_led_gpios[] = {
+	{ S3C2410_GPF(4), GPIOF_OUT_INIT_HIGH, NULL },
+	{ S3C2410_GPF(5), GPIOF_OUT_INIT_HIGH, NULL },
+	{ S3C2410_GPF(6), GPIOF_OUT_INIT_HIGH, NULL },
+	{ S3C2410_GPF(7), GPIOF_OUT_INIT_HIGH, NULL },
+};
+
 void __init smdk_machine_init(void)
 {
 	/* Configure the LEDs (even if we have no LED support)*/
 
-	s3c_gpio_cfgpin(S3C2410_GPF(4), S3C2410_GPIO_OUTPUT);
-	s3c_gpio_cfgpin(S3C2410_GPF(5), S3C2410_GPIO_OUTPUT);
-	s3c_gpio_cfgpin(S3C2410_GPF(6), S3C2410_GPIO_OUTPUT);
-	s3c_gpio_cfgpin(S3C2410_GPF(7), S3C2410_GPIO_OUTPUT);
-
-	s3c2410_gpio_setpin(S3C2410_GPF(4), 1);
-	s3c2410_gpio_setpin(S3C2410_GPF(5), 1);
-	s3c2410_gpio_setpin(S3C2410_GPF(6), 1);
-	s3c2410_gpio_setpin(S3C2410_GPF(7), 1);
+	int ret = gpio_request_array(smdk_led_gpios,
+				     ARRAY_SIZE(smdk_led_gpios));
+	if (!WARN_ON(ret < 0))
+		gpio_free_array(smdk_led_gpios, ARRAY_SIZE(smdk_led_gpios));
 
 	if (machine_is_smdk2443())
 		smdk_nand_info.twrph0 = 50;
Signature · 1 line
1.7.4.1
#4 lore raw

PATCH 3/10 ARM: S3C24XX: Convert QT2410 board file to the gpiolib API

In reply to Sylwester Nawrocki

Replace SoC specific GPIO functions with the gpiolib API. The LED gpio is freed right after it is configured so it can be acquired in the s3c24xx_led driver.

This change is required for converting the s3c24xx_led driver to the gpiolib API.

Cc laforge at openmoko.org

---
This change was only compile tested. If there is someone still using this board please provide a "Tested-by" tag.

---
 arch/arm/mach-s3c24xx/mach-qt2410.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-s3c24xx/mach-qt2410.c +3 -3
index b868ddd..678bbca 100644
@@ -47,7 +47,6 @@
 #include <asm/irq.h>
 #include <asm/mach-types.h>
 
-#include <mach/regs-gpio.h>
 #include <mach/leds-gpio.h>
 #include <mach/regs-lcd.h>
 #include <plat/regs-serial.h>
@@ -325,8 +324,9 @@ static void __init qt2410_machine_init(void)
 	}
 	s3c24xx_fb_set_platdata(&qt2410_fb_info);
 
-	s3c_gpio_cfgpin(S3C2410_GPB(0), S3C2410_GPIO_OUTPUT);
-	s3c2410_gpio_setpin(S3C2410_GPB(0), 1);
+	/* set initial state of the LED GPIO */
+	WARN_ON(gpio_request_one(S3C2410_GPB(0), GPIOF_OUT_INIT_HIGH, NULL));
+	gpio_free(S3C2410_GPB(0));
 
 	s3c24xx_udc_set_platdata(&qt2410_udc_cfg);
 	s3c_i2c0_set_platdata(NULL);
Signature · 1 line
1.7.4.1
#5 lore raw

PATCH 3/10 ARM: S3C24XX: Convert QT2410 board file to the gpiolib API

Quoted 2 lines · Sylwester Nawrocki
Cc laforge at openmoko.org
Quoted 2 lines

This change was only compile tested. If there is someone still using this board please provide a "Tested-by" tag.

I unfortuntely also don't have access to a QT2410 anymore, sorry.

Regards,
Harald

Signature · 4 lines
- Harald Welte <[email protected]>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)
#6 lore raw

PATCH 4/10 ARM: S3C24XX: Convert the PM code to gpiolib API

In reply to Sylwester Nawrocki

Replace deprecated functions with the gpiolib ones.

Cc ben-linux at fluff.org
---
 arch/arm/mach-s3c24xx/pm-s3c2410.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
arch/arm/mach-s3c24xx/pm-s3c2410.c +8 -4
index 03f706d..949ae05 100644
@@ -77,8 +77,10 @@ static void s3c2410_pm_prepare(void)
 		__raw_writel(calc, phys_to_virt(H1940_SUSPEND_CHECKSUM));
 	}
 
-	if ( machine_is_aml_m5900() )
-		s3c2410_gpio_setpin(S3C2410_GPF(2), 1);
+	if (machine_is_aml_m5900()) {
+		gpio_request_one(S3C2410_GPF(2), GPIOF_OUT_INIT_HIGH, NULL);
+		gpio_free(S3C2410_GPF(2));
+	}
 
 	if (machine_is_rx1950()) {
 		/* According to S3C2442 user's manual, page 7-17,
@@ -103,8 +105,10 @@ static void s3c2410_pm_resume(void)
 	tmp &= S3C2410_GSTATUS2_OFFRESET;
 	__raw_writel(tmp, S3C2410_GSTATUS2);
 
-	if ( machine_is_aml_m5900() )
-		s3c2410_gpio_setpin(S3C2410_GPF(2), 0);
+	if (machine_is_aml_m5900()) {
+		gpio_request_one(S3C2410_GPF(2), GPIOF_OUT_INIT_LOW, NULL);
+		gpio_free(S3C2410_GPF(2));
+	}
 }
 
 struct syscore_ops s3c2410_pm_syscore_ops = {
Signature · 1 line
1.7.4.1
#7 lore raw

PATCH 5/10 ARM: S3C24XX: Convert the touchscreen setup code to common GPIO API

In reply to Sylwester Nawrocki

Replace the S3C24XX SoC specific calls with the common gpiolib API. This removes one more user of an obsolete GPIO API.

---
Tested on Micro2440-SDK.

---
 arch/arm/mach-s3c24xx/setup-ts.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
arch/arm/mach-s3c24xx/setup-ts.c +1 -5
index ed26386..4e11aff 100644
@@ -16,7 +16,6 @@
 struct platform_device; /* don't need the contents */
 
 #include <mach/hardware.h>
-#include <mach/regs-gpio.h>
 
 /**
  * s3c24xx_ts_cfg_gpio - configure gpio for s3c2410 systems
@@ -27,8 +26,5 @@ struct platform_device; /* don't need the contents */
  */
 void s3c24xx_ts_cfg_gpio(struct platform_device *dev)
 {
-	s3c2410_gpio_cfgpin(S3C2410_GPG(12), S3C2410_GPG12_XMON);
-	s3c2410_gpio_cfgpin(S3C2410_GPG(13), S3C2410_GPG13_nXPON);
-	s3c2410_gpio_cfgpin(S3C2410_GPG(14), S3C2410_GPG14_YMON);
-	s3c2410_gpio_cfgpin(S3C2410_GPG(15), S3C2410_GPG15_nYPON);
+	s3c_gpio_cfgpin_range(S3C2410_GPG(12), 4, S3C_GPIO_SFN(3));
 }
Signature · 1 line
1.7.4.1
#8 lore raw

PATCH 6/10 ARM: S3C24XX: Remove unused GPA, GPE, GPH bank GPIO aliases

In reply to Sylwester Nawrocki

There is now no more users of these compatibility definitions, so remove them.

---
 arch/arm/mach-s3c24xx/include/mach/gpio-nrs.h |   21 ---------------------
 1 files changed, 0 insertions(+), 21 deletions(-)
arch/arm/mach-s3c24xx/include/mach/gpio-nrs.h +0 -21
index 019ea86..3890a05 100644
@@ -93,26 +93,5 @@ enum s3c_gpio_number {
 #define S3C2410_GPL(_nr)	(S3C2410_GPIO_L_START + (_nr))
 #define S3C2410_GPM(_nr)	(S3C2410_GPIO_M_START + (_nr))
 
-/* compatibility until drivers can be modified */
-
-#define S3C2410_GPA0	S3C2410_GPA(0)
-#define S3C2410_GPA1	S3C2410_GPA(1)
-#define S3C2410_GPA3	S3C2410_GPA(3)
-#define S3C2410_GPA7	S3C2410_GPA(7)
-
-#define S3C2410_GPE0	S3C2410_GPE(0)
-#define S3C2410_GPE1	S3C2410_GPE(1)
-#define S3C2410_GPE2	S3C2410_GPE(2)
-#define S3C2410_GPE3	S3C2410_GPE(3)
-#define S3C2410_GPE4	S3C2410_GPE(4)
-#define S3C2410_GPE5	S3C2410_GPE(5)
-#define S3C2410_GPE6	S3C2410_GPE(6)
-#define S3C2410_GPE7	S3C2410_GPE(7)
-#define S3C2410_GPE8	S3C2410_GPE(8)
-#define S3C2410_GPE9	S3C2410_GPE(9)
-#define S3C2410_GPE10	S3C2410_GPE(10)
-
-#define S3C2410_GPH10	S3C2410_GPH(10)
-
 #endif /* __MACH_GPIONRS_H */
 
Signature · 1 line
1.7.4.1
#9 lore raw

PATCH 7/10 ARM: S3C24XX: Remove unused GPIO definitions for port J

In reply to Sylwester Nawrocki

There is no need now for individual GPIO port J pin control bit definitions, the GPIO0..12 pins can be configured using the gpiolib API. The GPJ* register address offset definitions for S3C2413 are moved to the common mach-s3c24xx/include/mach/regs-gpio.h header. These are still used outside of the gpio-samsung driver by PM code.

Switching GPJ port to camera function can be done for example with:
s3c_gpio_cfgall_range(S3C2410_GPJ(0), 13, S3C_GPIO_SFN(2), S3C_GPIO_PULL_NONE);

---
 arch/arm/mach-s3c24xx/include/mach/regs-gpio.h  |   17 +++++-
 arch/arm/mach-s3c24xx/include/mach/regs-gpioj.h |   70 -----------------------
 arch/arm/mach-s3c24xx/mach-gta02.c              |    1 -
 arch/arm/mach-s3c24xx/mach-rx1950.c             |    1 -
 arch/arm/mach-s3c24xx/pm-s3c2412.c              |    1 -
 arch/arm/mach-s3c24xx/s3c2412.c                 |    1 -
 arch/arm/mach-s3c24xx/s3c244x.c                 |    1 -
 7 files changed, 15 insertions(+), 77 deletions(-)
 delete mode 100644 arch/arm/mach-s3c24xx/include/mach/regs-gpioj.h
arch/arm/mach-s3c24xx/include/mach/regs-gpio.h +15 -2
index cac1ad6..a11a638 100644
@@ -302,7 +302,7 @@
 /* S3C2410:
  * Port G consists of 8 GPIO/IRQ/Special function
  *
- * GPGCON has 2 bits for each of the input pins on port F
+ * GPGCON has 2 bits for each of the input pins on port G
  *   00 = 0 input, 1 output, 2 interrupt (EINT0..7), 3 special func
  *
  * pull up works like all other ports.
@@ -366,7 +366,7 @@
 
 /* Port H consists of11 GPIO/serial/Misc pins
  *
- * GPGCON has 2 bits for each of the input pins on port F
+ * GPHCON has 2 bits for each of the input pins on port H
  *   00 = 0 input, 1 output, 2 interrupt (EINT0..7), 3 special func
  *
  * pull up works like all other ports.
@@ -427,6 +427,19 @@
  * for the 2412/2413 from the 2410/2440/2442
 */
 
+/*
+ * Port J consists of 13 GPIO/Camera pins. GPJCON has 2 bits
+ * for each of the pins on port J.
+ *   00 - input, 01 output, 10 - camera
+ *
+ * Pull up works like all other ports.
+ */
+
+#define S3C2413_GPJCON	   S3C2410_GPIOREG(0x80)
+#define S3C2413_GPJDAT	   S3C2410_GPIOREG(0x84)
+#define S3C2413_GPJUP	   S3C2410_GPIOREG(0x88)
+#define S3C2413_GPJSLPCON  S3C2410_GPIOREG(0x8C)
+
 /* S3C2443 and above */
 #define S3C2440_GPJCON	   S3C2410_GPIOREG(0xD0)
 #define S3C2440_GPJDAT	   S3C2410_GPIOREG(0xD4)
arch/arm/mach-s3c24xx/include/mach/regs-gpioj.h deleted +0 -70

70 lines not on this page · raw message

arch/arm/mach-s3c24xx/mach-gta02.c +0 -1
index 0f29f64..92e1f93 100644
@@ -71,7 +71,6 @@
 
 #include <mach/regs-irq.h>
 #include <mach/regs-gpio.h>
-#include <mach/regs-gpioj.h>
 #include <mach/fb.h>
 
 #include <plat/usb-control.h>
arch/arm/mach-s3c24xx/mach-rx1950.c +0 -1
index a6762aa..7ee73f2 100644
@@ -42,7 +42,6 @@
 #include <asm/mach-types.h>
 
 #include <mach/regs-gpio.h>
-#include <mach/regs-gpioj.h>
 #include <mach/regs-lcd.h>
 #include <mach/h1940.h>
 #include <mach/fb.h>
arch/arm/mach-s3c24xx/pm-s3c2412.c +0 -1
index d045885..c60f67a 100644
@@ -26,7 +26,6 @@
 #include <asm/irq.h>
 
 #include <mach/regs-power.h>
-#include <mach/regs-gpioj.h>
 #include <mach/regs-gpio.h>
 #include <mach/regs-dsc.h>
 
arch/arm/mach-s3c24xx/s3c2412.c +0 -1
index d4bc7f9..6c5f403 100644
@@ -39,7 +39,6 @@
 #include <plat/regs-serial.h>
 #include <mach/regs-power.h>
 #include <mach/regs-gpio.h>
-#include <mach/regs-gpioj.h>
 #include <mach/regs-dsc.h>
 #include <plat/regs-spi.h>
 #include <mach/regs-s3c2412.h>
arch/arm/mach-s3c24xx/s3c244x.c +0 -1
index 6f74118..b0b60a1 100644
@@ -36,7 +36,6 @@
 #include <mach/regs-clock.h>
 #include <plat/regs-serial.h>
 #include <mach/regs-gpio.h>
-#include <mach/regs-gpioj.h>
 #include <mach/regs-dsc.h>
 
 #include <plat/s3c2410.h>
Signature · 1 line
1.7.4.1
#10 lore raw

PATCH 8/10 ARM: S3C24XX: Remove unused GPIO definitions for Openmoko GTA02 board

In reply to Sylwester Nawrocki

mach-s3c24xx/include/mach/gta02.h header file contains defines which are now not used anywhere, remove them.

---
 arch/arm/mach-s3c24xx/include/mach/gta02.h |   69 ----------------------------
 1 files changed, 0 insertions(+), 69 deletions(-)
arch/arm/mach-s3c24xx/include/mach/gta02.h +0 -69
index 3a56a22..2173934 100644
@@ -3,82 +3,13 @@
 
 #include <mach/regs-gpio.h>
 
-/* 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 GTA02v5_SYSTEM_REV	0x00000350
-/* since A7 is basically same as A6, we use A6 PCB ID */
-#define GTA02v6_SYSTEM_REV	0x00000360
-
-#define GTA02_GPIO_n3DL_GSM	S3C2410_GPA(13)	/* v1 + v2 + v3 only */
-
-#define GTA02_GPIO_PWR_LED1	S3C2410_GPB(0)
-#define GTA02_GPIO_PWR_LED2	S3C2410_GPB(1)
 #define GTA02_GPIO_AUX_LED	S3C2410_GPB(2)
-#define GTA02_GPIO_VIBRATOR_ON	S3C2410_GPB(3)
-#define GTA02_GPIO_MODEM_RST	S3C2410_GPB(5)
-#define GTA02_GPIO_BT_EN	S3C2410_GPB(6)
-#define GTA02_GPIO_MODEM_ON	S3C2410_GPB(7)
-#define GTA02_GPIO_EXTINT8	S3C2410_GPB(8)
 #define GTA02_GPIO_USB_PULLUP	S3C2410_GPB(9)
-
-#define GTA02_GPIO_PIO5		S3C2410_GPC(5)	/* v3 + v4 only */
-
-#define GTA02v3_GPIO_nG1_CS	S3C2410_GPD(12)	/* v3 + v4 only */
-#define GTA02v3_GPIO_nG2_CS	S3C2410_GPD(13)	/* v3 + v4 only */
-#define GTA02v5_GPIO_HDQ	S3C2410_GPD(14)   /* v5 + */
-
-#define GTA02_GPIO_nG1_INT	S3C2410_GPF(0)
-#define GTA02_GPIO_IO1		S3C2410_GPF(1)
-#define GTA02_GPIO_PIO_2	S3C2410_GPF(2)	/* v2 + v3 + v4 only */
-#define GTA02_GPIO_JACK_INSERT	S3C2410_GPF(4)
-#define GTA02_GPIO_WLAN_GPIO1	S3C2410_GPF(5)	/* v2 + v3 + v4 only */
 #define GTA02_GPIO_AUX_KEY	S3C2410_GPF(6)
 #define GTA02_GPIO_HOLD_KEY	S3C2410_GPF(7)
-
-#define GTA02_GPIO_3D_IRQ	S3C2410_GPG(4)
-#define GTA02v2_GPIO_nG2_INT	S3C2410_GPG(8)	/* v2 + v3 + v4 only */
-#define GTA02v3_GPIO_nUSB_OC	S3C2410_GPG(9)	/* v3 + v4 only */
-#define GTA02v3_GPIO_nUSB_FLT	S3C2410_GPG(10)	/* v3 + v4 only */
-#define GTA02v3_GPIO_nGSM_OC	S3C2410_GPG(11)	/* v3 + v4 only */
-
 #define GTA02_GPIO_AMP_SHUT	S3C2410_GPJ(1)	/* v2 + v3 + v4 only */
-#define GTA02v1_GPIO_WLAN_GPIO10	S3C2410_GPJ(2)
 #define GTA02_GPIO_HP_IN	S3C2410_GPJ(2)	/* v2 + v3 + v4 only */
-#define GTA02_GPIO_INT0		S3C2410_GPJ(3)	/* v2 + v3 + v4 only */
-#define GTA02_GPIO_nGSM_EN	S3C2410_GPJ(4)
-#define GTA02_GPIO_3D_RESET	S3C2410_GPJ(5)
-#define GTA02_GPIO_nDL_GSM	S3C2410_GPJ(6)	/* v4 + v5 only */
-#define GTA02_GPIO_WLAN_GPIO0	S3C2410_GPJ(7)
-#define GTA02v1_GPIO_BAT_ID	S3C2410_GPJ(8)
-#define GTA02_GPIO_KEEPACT	S3C2410_GPJ(8)
-#define GTA02v1_GPIO_HP_IN	S3C2410_GPJ(10)
-#define GTA02_CHIP_PWD		S3C2410_GPJ(11)	/* v2 + v3 + v4 only */
-#define GTA02_GPIO_nWLAN_RESET	S3C2410_GPJ(12)	/* v2 + v3 + v4 only */
 
-#define GTA02_IRQ_GSENSOR_1	IRQ_EINT0
-#define GTA02_IRQ_MODEM		IRQ_EINT1
-#define GTA02_IRQ_PIO_2		IRQ_EINT2	/* v2 + v3 + v4 only */
-#define GTA02_IRQ_nJACK_INSERT	IRQ_EINT4
-#define GTA02_IRQ_WLAN_GPIO1	IRQ_EINT5
-#define GTA02_IRQ_AUX		IRQ_EINT6
-#define GTA02_IRQ_nHOLD		IRQ_EINT7
 #define GTA02_IRQ_PCF50633	IRQ_EINT9
-#define GTA02_IRQ_3D		IRQ_EINT12
-#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 */
-
-/* returns 00 000 on GTA02 A5 and earlier, A6 returns 01 001 */
-#define GTA02_PCB_ID1_0		S3C2410_GPC(13)
-#define GTA02_PCB_ID1_1		S3C2410_GPC(15)
-#define GTA02_PCB_ID1_2		S3C2410_GPD(0)
-#define GTA02_PCB_ID2_0		S3C2410_GPD(3)
-#define GTA02_PCB_ID2_1		S3C2410_GPD(4)
-
-int gta02_get_pcb_revision(void);
 
 #endif /* _GTA02_H */
Signature · 1 line
1.7.4.1
#11 lore raw

PATCH 9/10 ARM: S3C24XX: Correct AC97 clock control bit for S3C2440

In reply to Sylwester Nawrocki

Use correct gate control bit for AC97 clock which is S3C2440_CLKCON_AC97, not S3C2440_CLKCON_CAMERA.

---
 arch/arm/mach-s3c24xx/clock-s3c2440.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-s3c24xx/clock-s3c2440.c +1 -1
index 414364e..cb2883d 100644
@@ -106,7 +106,7 @@ static struct clk s3c2440_clk_cam_upll = {
 static struct clk s3c2440_clk_ac97 = {
 	.name		= "ac97",
 	.enable		= s3c2410_clkcon_enable,
-	.ctrlbit	= S3C2440_CLKCON_CAMERA,
+	.ctrlbit	= S3C2440_CLKCON_AC97,
 };
 
 static unsigned long  s3c2440_fclk_n_getrate(struct clk *clk)
Signature · 1 line
1.7.4.1
#12 lore raw

PATCH 10/10 ARM: S3C24XX: Correct CAMIF interrupt definitions

In reply to Sylwester Nawrocki

Properly define the CAMIF interrupt resources. This device have two interrupts - corresponding to the "codec" and "preview" data paths. IRQ_CAM is handled internally by the architecture and demultiplexed to IRQ_S3C2440_CAM_C and IRQ_S3C2440_CAM_P - these interrupts only should be handled in the driver.

---
 arch/arm/plat-samsung/devs.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/plat-samsung/devs.c +2 -1
index 1d214cb..6303974 100644
@@ -126,7 +126,8 @@ struct platform_device s3c_device_adc = {
 #ifdef CONFIG_CPU_S3C2440
 static struct resource s3c_camif_resource[] = {
 	[0] = DEFINE_RES_MEM(S3C2440_PA_CAMIF, S3C2440_SZ_CAMIF),
-	[1] = DEFINE_RES_IRQ(IRQ_CAM),
+	[1] = DEFINE_RES_IRQ(IRQ_S3C2440_CAM_C),
+	[2] = DEFINE_RES_IRQ(IRQ_S3C2440_CAM_P),
 };
 
 struct platform_device s3c_device_camif = {
Signature · 1 line
1.7.4.1
#13 lore raw

cover ARM: S3C24XX gpio cleanups and fixes

In reply to Sylwester Nawrocki
Quoted 25 lines · Sylwester Nawrocki

This changset attempts to remove the users of an obsolete GPIO API in Samsung S3C24XX platform and instead use the gpiolib API. It should allow to drop some s3c24xx SoC specific headers as a next step and simplify drivers/gpio/gpio-samsung.c driver a little. With the introduction of the pinctrl GPIO driver we're going to have three distinct GPIO APIs. Let's avoid this and drop the s3c24xx_gpio_* functions, which have been scheduled for removal since about v2.6.35.

Additionally this changeset includes two minor fixes, for AC97 clock and CAMIF interrupts.

Sylwester Nawrocki (10):
ARM: S3C24XX: Free the backlight gpio requested in Mini2440 board code
ARM: S3C24XX: Convert SMDK board file to the gpiolib API
ARM: S3C24XX: Convert QT2410 board file to the gpiolib API
ARM: S3C24XX: Convert the PM code to gpiolib API
ARM: S3C24XX: Convert the touchscreen setup code to common GPIO API
ARM: S3C24XX: Remove unused GPA, GPE, GPH bank GPIO aliases
ARM: S3C24XX: Remove unused GPIO definitions for port J
ARM: S3C24XX: Remove unused GPIO definitions for Openmoko GTA02 board
ARM: S3C24XX: Correct AC97 clock control bit for S3C2440
ARM: S3C24XX: Correct CAMIF interrupt definitions

Quoted 4 lines
 arch/arm/mach-s3c24xx/clock-s3c2440.c           |    2 +-
 arch/arm/mach-s3c24xx/common-smdk.c             |   20 ++++---
 arch/arm/mach-s3c24xx/include/mach/gpio-nrs.h   |   21 -------
 arch/arm/mach-s3c24xx/include/mach/gta02.h      |   69

--------------------

Quoted 3 lines

--

 arch/arm/mach-s3c24xx/include/mach/regs-gpio.h  |   17 +++++-
 arch/arm/mach-s3c24xx/include/mach/regs-gpioj.h |   70

-------------------

Quoted 14 lines

----

 arch/arm/mach-s3c24xx/mach-gta02.c              |    1 -
 arch/arm/mach-s3c24xx/mach-mini2440.c           |    4 +-
 arch/arm/mach-s3c24xx/mach-qt2410.c             |    6 +-
 arch/arm/mach-s3c24xx/mach-rx1950.c             |    1 -
 arch/arm/mach-s3c24xx/pm-s3c2410.c              |   12 +++-
 arch/arm/mach-s3c24xx/pm-s3c2412.c              |    1 -
 arch/arm/mach-s3c24xx/s3c2412.c                 |    1 -
 arch/arm/mach-s3c24xx/s3c244x.c                 |    1 -
 arch/arm/mach-s3c24xx/setup-ts.c                |    6 +--
 arch/arm/plat-samsung/devs.c                    |    3 +-
 16 files changed, 43 insertions(+), 192 deletions(-)
 delete mode 100644 arch/arm/mach-s3c24xx/include/mach/regs-gpioj.h
Quoted 2 lines

--
1.7.4.1

Basically, looks ok to me :)

I need to check in detail then will apply this series with some guys' ack.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.