All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] ARM: S3C24XX gpio cleanups and fixes
@ 2012-06-30 12:08 ` Sylwester Nawrocki
  0 siblings, 0 replies; 28+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 12:08 UTC (permalink / raw)
  To: kgene.kim
  Cc: ben-linux, linux-samsung-soc, linux-arm-kernel, 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

 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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 00/10] ARM: S3C24XX gpio cleanups and fixes
@ 2012-06-30 12:08 ` Sylwester Nawrocki
  0 siblings, 0 replies; 28+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 12:08 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 01/10] ARM: S3C24XX: Free the backlight gpio requested in Mini2440 board code
  2012-06-30 12:08 ` Sylwester Nawrocki
@ 2012-06-30 12:08   ` Sylwester Nawrocki
  -1 siblings, 0 replies; 28+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 12:08 UTC (permalink / raw)
  To: kgene.kim
  Cc: ben-linux, linux-samsung-soc, linux-arm-kernel, 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.

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
 arch/arm/mach-s3c24xx/mach-mini2440.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
index f092b18..bd6d252 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
@@ -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);
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 01/10] ARM: S3C24XX: Free the backlight gpio requested in Mini2440 board code
@ 2012-06-30 12:08   ` Sylwester Nawrocki
  0 siblings, 0 replies; 28+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 12:08 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
 arch/arm/mach-s3c24xx/mach-mini2440.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c
index f092b18..bd6d252 100644
--- a/arch/arm/mach-s3c24xx/mach-mini2440.c
+++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
@@ -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);
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 02/10] ARM: S3C24XX: Convert SMDK board file to the gpiolib API
  2012-06-30 12:08 ` Sylwester Nawrocki
@ 2012-06-30 12:08   ` Sylwester Nawrocki
  -1 siblings, 0 replies; 28+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 12:08 UTC (permalink / raw)
  To: kgene.kim
  Cc: ben-linux, linux-samsung-soc, linux-arm-kernel, 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.

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
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(-)

diff --git a/arch/arm/mach-s3c24xx/common-smdk.c b/arch/arm/mach-s3c24xx/common-smdk.c
index 084604b..87e75a2 100644
--- a/arch/arm/mach-s3c24xx/common-smdk.c
+++ b/arch/arm/mach-s3c24xx/common-smdk.c
@@ -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;
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 02/10] ARM: S3C24XX: Convert SMDK board file to the gpiolib API
@ 2012-06-30 12:08   ` Sylwester Nawrocki
  0 siblings, 0 replies; 28+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 12:08 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
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(-)

diff --git a/arch/arm/mach-s3c24xx/common-smdk.c b/arch/arm/mach-s3c24xx/common-smdk.c
index 084604b..87e75a2 100644
--- a/arch/arm/mach-s3c24xx/common-smdk.c
+++ b/arch/arm/mach-s3c24xx/common-smdk.c
@@ -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;
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 03/10] ARM: S3C24XX: Convert QT2410 board file to the gpiolib API
  2012-06-30 12:08 ` Sylwester Nawrocki
@ 2012-06-30 12:08   ` Sylwester Nawrocki
  -1 siblings, 0 replies; 28+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 12:08 UTC (permalink / raw)
  To: kgene.kim
  Cc: ben-linux, linux-samsung-soc, linux-arm-kernel,
	Sylwester Nawrocki, laforge

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@openmoko.org
Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
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(-)

diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c24xx/mach-qt2410.c
index b868ddd..678bbca 100644
--- a/arch/arm/mach-s3c24xx/mach-qt2410.c
+++ b/arch/arm/mach-s3c24xx/mach-qt2410.c
@@ -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);
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 03/10] ARM: S3C24XX: Convert QT2410 board file to the gpiolib API
@ 2012-06-30 12:08   ` Sylwester Nawrocki
  0 siblings, 0 replies; 28+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 12:08 UTC (permalink / raw)
  To: linux-arm-kernel

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
Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
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(-)

diff --git a/arch/arm/mach-s3c24xx/mach-qt2410.c b/arch/arm/mach-s3c24xx/mach-qt2410.c
index b868ddd..678bbca 100644
--- a/arch/arm/mach-s3c24xx/mach-qt2410.c
+++ b/arch/arm/mach-s3c24xx/mach-qt2410.c
@@ -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);
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 04/10] ARM: S3C24XX: Convert the PM code to gpiolib API
  2012-06-30 12:08 ` Sylwester Nawrocki
@ 2012-06-30 12:08   ` Sylwester Nawrocki
  -1 siblings, 0 replies; 28+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 12:08 UTC (permalink / raw)
  To: kgene.kim
  Cc: ben-linux, linux-samsung-soc, linux-arm-kernel, Sylwester Nawrocki

Replace deprecated functions with the gpiolib ones.

Cc: ben-linux@fluff.org
Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
 arch/arm/mach-s3c24xx/pm-s3c2410.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/pm-s3c2410.c b/arch/arm/mach-s3c24xx/pm-s3c2410.c
index 03f706d..949ae05 100644
--- a/arch/arm/mach-s3c24xx/pm-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/pm-s3c2410.c
@@ -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 = {
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 04/10] ARM: S3C24XX: Convert the PM code to gpiolib API
@ 2012-06-30 12:08   ` Sylwester Nawrocki
  0 siblings, 0 replies; 28+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 12:08 UTC (permalink / raw)
  To: linux-arm-kernel

Replace deprecated functions with the gpiolib ones.

Cc: ben-linux at fluff.org
Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
 arch/arm/mach-s3c24xx/pm-s3c2410.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/pm-s3c2410.c b/arch/arm/mach-s3c24xx/pm-s3c2410.c
index 03f706d..949ae05 100644
--- a/arch/arm/mach-s3c24xx/pm-s3c2410.c
+++ b/arch/arm/mach-s3c24xx/pm-s3c2410.c
@@ -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 = {
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 05/10] ARM: S3C24XX: Convert the touchscreen setup code to common GPIO API
  2012-06-30 12:08 ` Sylwester Nawrocki
@ 2012-06-30 12:08   ` Sylwester Nawrocki
  -1 siblings, 0 replies; 28+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 12:08 UTC (permalink / raw)
  To: kgene.kim
  Cc: ben-linux, linux-samsung-soc, linux-arm-kernel, Sylwester Nawrocki

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

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
Tested on Micro2440-SDK.
---
 arch/arm/mach-s3c24xx/setup-ts.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/setup-ts.c b/arch/arm/mach-s3c24xx/setup-ts.c
index ed26386..4e11aff 100644
--- a/arch/arm/mach-s3c24xx/setup-ts.c
+++ b/arch/arm/mach-s3c24xx/setup-ts.c
@@ -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));
 }
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 05/10] ARM: S3C24XX: Convert the touchscreen setup code to common GPIO API
@ 2012-06-30 12:08   ` Sylwester Nawrocki
  0 siblings, 0 replies; 28+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 12:08 UTC (permalink / raw)
  To: linux-arm-kernel

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

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
Tested on Micro2440-SDK.
---
 arch/arm/mach-s3c24xx/setup-ts.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/setup-ts.c b/arch/arm/mach-s3c24xx/setup-ts.c
index ed26386..4e11aff 100644
--- a/arch/arm/mach-s3c24xx/setup-ts.c
+++ b/arch/arm/mach-s3c24xx/setup-ts.c
@@ -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));
 }
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 06/10] ARM: S3C24XX: Remove unused GPA, GPE, GPH bank GPIO aliases
  2012-06-30 12:08 ` Sylwester Nawrocki
@ 2012-06-30 12:08   ` Sylwester Nawrocki
  -1 siblings, 0 replies; 28+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 12:08 UTC (permalink / raw)
  To: kgene.kim
  Cc: ben-linux, linux-samsung-soc, linux-arm-kernel, Sylwester Nawrocki

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

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
 arch/arm/mach-s3c24xx/include/mach/gpio-nrs.h |   21 ---------------------
 1 files changed, 0 insertions(+), 21 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/include/mach/gpio-nrs.h b/arch/arm/mach-s3c24xx/include/mach/gpio-nrs.h
index 019ea86..3890a05 100644
--- a/arch/arm/mach-s3c24xx/include/mach/gpio-nrs.h
+++ b/arch/arm/mach-s3c24xx/include/mach/gpio-nrs.h
@@ -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 */
 
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 06/10] ARM: S3C24XX: Remove unused GPA, GPE, GPH bank GPIO aliases
@ 2012-06-30 12:08   ` Sylwester Nawrocki
  0 siblings, 0 replies; 28+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 12:08 UTC (permalink / raw)
  To: linux-arm-kernel

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

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
 arch/arm/mach-s3c24xx/include/mach/gpio-nrs.h |   21 ---------------------
 1 files changed, 0 insertions(+), 21 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/include/mach/gpio-nrs.h b/arch/arm/mach-s3c24xx/include/mach/gpio-nrs.h
index 019ea86..3890a05 100644
--- a/arch/arm/mach-s3c24xx/include/mach/gpio-nrs.h
+++ b/arch/arm/mach-s3c24xx/include/mach/gpio-nrs.h
@@ -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 */
 
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 07/10] ARM: S3C24XX: Remove unused GPIO definitions for port J
  2012-06-30 12:08 ` Sylwester Nawrocki
@ 2012-06-30 12:08   ` Sylwester Nawrocki
  -1 siblings, 0 replies; 28+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 12:08 UTC (permalink / raw)
  To: kgene.kim
  Cc: ben-linux, linux-samsung-soc, linux-arm-kernel, 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);

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
 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

diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h b/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
index cac1ad6..a11a638 100644
--- a/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
+++ b/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
@@ -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)
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-gpioj.h b/arch/arm/mach-s3c24xx/include/mach/regs-gpioj.h
deleted file mode 100644
index 19575e0..0000000
--- a/arch/arm/mach-s3c24xx/include/mach/regs-gpioj.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* arch/arm/mach-s3c2410/include/mach/regs-gpioj.h
- *
- * Copyright (c) 2004 Simtec Electronics <linux@simtec.co.uk>
- *		      http://www.simtec.co.uk/products/SWLINUX/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * S3C2440 GPIO J register definitions
-*/
-
-
-#ifndef __ASM_ARCH_REGS_GPIOJ_H
-#define __ASM_ARCH_REGS_GPIOJ_H "gpioj"
-
-/* Port J consists of 13 GPIO/Camera pins
- *
- * GPJCON has 2 bits for each of the input pins on port F
- *   00 = 0 input, 1 output, 2 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)
-
-#define S3C2440_GPJ0_OUTP       (0x01 << 0)
-#define S3C2440_GPJ0_CAMDATA0   (0x02 << 0)
-
-#define S3C2440_GPJ1_OUTP       (0x01 << 2)
-#define S3C2440_GPJ1_CAMDATA1   (0x02 << 2)
-
-#define S3C2440_GPJ2_OUTP       (0x01 << 4)
-#define S3C2440_GPJ2_CAMDATA2   (0x02 << 4)
-
-#define S3C2440_GPJ3_OUTP       (0x01 << 6)
-#define S3C2440_GPJ3_CAMDATA3   (0x02 << 6)
-
-#define S3C2440_GPJ4_OUTP       (0x01 << 8)
-#define S3C2440_GPJ4_CAMDATA4   (0x02 << 8)
-
-#define S3C2440_GPJ5_OUTP       (0x01 << 10)
-#define S3C2440_GPJ5_CAMDATA5   (0x02 << 10)
-
-#define S3C2440_GPJ6_OUTP       (0x01 << 12)
-#define S3C2440_GPJ6_CAMDATA6   (0x02 << 12)
-
-#define S3C2440_GPJ7_OUTP       (0x01 << 14)
-#define S3C2440_GPJ7_CAMDATA7   (0x02 << 14)
-
-#define S3C2440_GPJ8_OUTP       (0x01 << 16)
-#define S3C2440_GPJ8_CAMPCLK    (0x02 << 16)
-
-#define S3C2440_GPJ9_OUTP       (0x01 << 18)
-#define S3C2440_GPJ9_CAMVSYNC   (0x02 << 18)
-
-#define S3C2440_GPJ10_OUTP      (0x01 << 20)
-#define S3C2440_GPJ10_CAMHREF   (0x02 << 20)
-
-#define S3C2440_GPJ11_OUTP      (0x01 << 22)
-#define S3C2440_GPJ11_CAMCLKOUT (0x02 << 22)
-
-#define S3C2440_GPJ12_OUTP      (0x01 << 24)
-#define S3C2440_GPJ12_CAMRESET  (0x02 << 24)
-
-#endif	/* __ASM_ARCH_REGS_GPIOJ_H */
-
diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx/mach-gta02.c
index 0f29f64..92e1f93 100644
--- a/arch/arm/mach-s3c24xx/mach-gta02.c
+++ b/arch/arm/mach-s3c24xx/mach-gta02.c
@@ -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>
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index a6762aa..7ee73f2 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -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>
diff --git a/arch/arm/mach-s3c24xx/pm-s3c2412.c b/arch/arm/mach-s3c24xx/pm-s3c2412.c
index d045885..c60f67a 100644
--- a/arch/arm/mach-s3c24xx/pm-s3c2412.c
+++ b/arch/arm/mach-s3c24xx/pm-s3c2412.c
@@ -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>
 
diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c
index d4bc7f9..6c5f403 100644
--- a/arch/arm/mach-s3c24xx/s3c2412.c
+++ b/arch/arm/mach-s3c24xx/s3c2412.c
@@ -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>
diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c
index 6f74118..b0b60a1 100644
--- a/arch/arm/mach-s3c24xx/s3c244x.c
+++ b/arch/arm/mach-s3c24xx/s3c244x.c
@@ -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>
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 07/10] ARM: S3C24XX: Remove unused GPIO definitions for port J
@ 2012-06-30 12:08   ` Sylwester Nawrocki
  0 siblings, 0 replies; 28+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 12:08 UTC (permalink / raw)
  To: linux-arm-kernel

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);

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
 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

diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h b/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
index cac1ad6..a11a638 100644
--- a/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
+++ b/arch/arm/mach-s3c24xx/include/mach/regs-gpio.h
@@ -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)
diff --git a/arch/arm/mach-s3c24xx/include/mach/regs-gpioj.h b/arch/arm/mach-s3c24xx/include/mach/regs-gpioj.h
deleted file mode 100644
index 19575e0..0000000
--- a/arch/arm/mach-s3c24xx/include/mach/regs-gpioj.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* arch/arm/mach-s3c2410/include/mach/regs-gpioj.h
- *
- * Copyright (c) 2004 Simtec Electronics <linux@simtec.co.uk>
- *		      http://www.simtec.co.uk/products/SWLINUX/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * S3C2440 GPIO J register definitions
-*/
-
-
-#ifndef __ASM_ARCH_REGS_GPIOJ_H
-#define __ASM_ARCH_REGS_GPIOJ_H "gpioj"
-
-/* Port J consists of 13 GPIO/Camera pins
- *
- * GPJCON has 2 bits for each of the input pins on port F
- *   00 = 0 input, 1 output, 2 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)
-
-#define S3C2440_GPJ0_OUTP       (0x01 << 0)
-#define S3C2440_GPJ0_CAMDATA0   (0x02 << 0)
-
-#define S3C2440_GPJ1_OUTP       (0x01 << 2)
-#define S3C2440_GPJ1_CAMDATA1   (0x02 << 2)
-
-#define S3C2440_GPJ2_OUTP       (0x01 << 4)
-#define S3C2440_GPJ2_CAMDATA2   (0x02 << 4)
-
-#define S3C2440_GPJ3_OUTP       (0x01 << 6)
-#define S3C2440_GPJ3_CAMDATA3   (0x02 << 6)
-
-#define S3C2440_GPJ4_OUTP       (0x01 << 8)
-#define S3C2440_GPJ4_CAMDATA4   (0x02 << 8)
-
-#define S3C2440_GPJ5_OUTP       (0x01 << 10)
-#define S3C2440_GPJ5_CAMDATA5   (0x02 << 10)
-
-#define S3C2440_GPJ6_OUTP       (0x01 << 12)
-#define S3C2440_GPJ6_CAMDATA6   (0x02 << 12)
-
-#define S3C2440_GPJ7_OUTP       (0x01 << 14)
-#define S3C2440_GPJ7_CAMDATA7   (0x02 << 14)
-
-#define S3C2440_GPJ8_OUTP       (0x01 << 16)
-#define S3C2440_GPJ8_CAMPCLK    (0x02 << 16)
-
-#define S3C2440_GPJ9_OUTP       (0x01 << 18)
-#define S3C2440_GPJ9_CAMVSYNC   (0x02 << 18)
-
-#define S3C2440_GPJ10_OUTP      (0x01 << 20)
-#define S3C2440_GPJ10_CAMHREF   (0x02 << 20)
-
-#define S3C2440_GPJ11_OUTP      (0x01 << 22)
-#define S3C2440_GPJ11_CAMCLKOUT (0x02 << 22)
-
-#define S3C2440_GPJ12_OUTP      (0x01 << 24)
-#define S3C2440_GPJ12_CAMRESET  (0x02 << 24)
-
-#endif	/* __ASM_ARCH_REGS_GPIOJ_H */
-
diff --git a/arch/arm/mach-s3c24xx/mach-gta02.c b/arch/arm/mach-s3c24xx/mach-gta02.c
index 0f29f64..92e1f93 100644
--- a/arch/arm/mach-s3c24xx/mach-gta02.c
+++ b/arch/arm/mach-s3c24xx/mach-gta02.c
@@ -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>
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index a6762aa..7ee73f2 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -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>
diff --git a/arch/arm/mach-s3c24xx/pm-s3c2412.c b/arch/arm/mach-s3c24xx/pm-s3c2412.c
index d045885..c60f67a 100644
--- a/arch/arm/mach-s3c24xx/pm-s3c2412.c
+++ b/arch/arm/mach-s3c24xx/pm-s3c2412.c
@@ -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>
 
diff --git a/arch/arm/mach-s3c24xx/s3c2412.c b/arch/arm/mach-s3c24xx/s3c2412.c
index d4bc7f9..6c5f403 100644
--- a/arch/arm/mach-s3c24xx/s3c2412.c
+++ b/arch/arm/mach-s3c24xx/s3c2412.c
@@ -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>
diff --git a/arch/arm/mach-s3c24xx/s3c244x.c b/arch/arm/mach-s3c24xx/s3c244x.c
index 6f74118..b0b60a1 100644
--- a/arch/arm/mach-s3c24xx/s3c244x.c
+++ b/arch/arm/mach-s3c24xx/s3c244x.c
@@ -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>
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 08/10] ARM: S3C24XX: Remove unused GPIO definitions for Openmoko GTA02 board
  2012-06-30 12:08 ` Sylwester Nawrocki
@ 2012-06-30 12:09   ` Sylwester Nawrocki
  -1 siblings, 0 replies; 28+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 12:09 UTC (permalink / raw)
  To: kgene.kim
  Cc: ben-linux, linux-samsung-soc, linux-arm-kernel,
	Sylwester Nawrocki, Nelson Castillo

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

Cc: Nelson Castillo <arhuaco@freaks-unidos.net>
Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
 arch/arm/mach-s3c24xx/include/mach/gta02.h |   69 ----------------------------
 1 files changed, 0 insertions(+), 69 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/include/mach/gta02.h b/arch/arm/mach-s3c24xx/include/mach/gta02.h
index 3a56a22..2173934 100644
--- a/arch/arm/mach-s3c24xx/include/mach/gta02.h
+++ b/arch/arm/mach-s3c24xx/include/mach/gta02.h
@@ -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 */
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 08/10] ARM: S3C24XX: Remove unused GPIO definitions for Openmoko GTA02 board
@ 2012-06-30 12:09   ` Sylwester Nawrocki
  0 siblings, 0 replies; 28+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 12:09 UTC (permalink / raw)
  To: linux-arm-kernel

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

Cc: Nelson Castillo <arhuaco@freaks-unidos.net>
Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
 arch/arm/mach-s3c24xx/include/mach/gta02.h |   69 ----------------------------
 1 files changed, 0 insertions(+), 69 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/include/mach/gta02.h b/arch/arm/mach-s3c24xx/include/mach/gta02.h
index 3a56a22..2173934 100644
--- a/arch/arm/mach-s3c24xx/include/mach/gta02.h
+++ b/arch/arm/mach-s3c24xx/include/mach/gta02.h
@@ -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 */
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 09/10] ARM: S3C24XX: Correct AC97 clock control bit for S3C2440
  2012-06-30 12:08 ` Sylwester Nawrocki
@ 2012-06-30 12:09   ` Sylwester Nawrocki
  -1 siblings, 0 replies; 28+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 12:09 UTC (permalink / raw)
  To: kgene.kim
  Cc: ben-linux, linux-samsung-soc, linux-arm-kernel, Sylwester Nawrocki

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

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
 arch/arm/mach-s3c24xx/clock-s3c2440.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/clock-s3c2440.c b/arch/arm/mach-s3c24xx/clock-s3c2440.c
index 414364e..cb2883d 100644
--- a/arch/arm/mach-s3c24xx/clock-s3c2440.c
+++ b/arch/arm/mach-s3c24xx/clock-s3c2440.c
@@ -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)
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 09/10] ARM: S3C24XX: Correct AC97 clock control bit for S3C2440
@ 2012-06-30 12:09   ` Sylwester Nawrocki
  0 siblings, 0 replies; 28+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 12:09 UTC (permalink / raw)
  To: linux-arm-kernel

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

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
 arch/arm/mach-s3c24xx/clock-s3c2440.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/clock-s3c2440.c b/arch/arm/mach-s3c24xx/clock-s3c2440.c
index 414364e..cb2883d 100644
--- a/arch/arm/mach-s3c24xx/clock-s3c2440.c
+++ b/arch/arm/mach-s3c24xx/clock-s3c2440.c
@@ -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)
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 10/10] ARM: S3C24XX: Correct CAMIF interrupt definitions
  2012-06-30 12:08 ` Sylwester Nawrocki
@ 2012-06-30 12:09   ` Sylwester Nawrocki
  -1 siblings, 0 replies; 28+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 12:09 UTC (permalink / raw)
  To: kgene.kim
  Cc: ben-linux, linux-samsung-soc, linux-arm-kernel, 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.

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
 arch/arm/plat-samsung/devs.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index 1d214cb..6303974 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -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 = {
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* [PATCH 10/10] ARM: S3C24XX: Correct CAMIF interrupt definitions
@ 2012-06-30 12:09   ` Sylwester Nawrocki
  0 siblings, 0 replies; 28+ messages in thread
From: Sylwester Nawrocki @ 2012-06-30 12:09 UTC (permalink / raw)
  To: linux-arm-kernel

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.

Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
---
 arch/arm/plat-samsung/devs.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index 1d214cb..6303974 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -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 = {
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: [PATCH 03/10] ARM: S3C24XX: Convert QT2410 board file to the gpiolib API
  2012-06-30 12:08   ` Sylwester Nawrocki
@ 2012-07-01  5:46     ` Harald Welte
  -1 siblings, 0 replies; 28+ messages in thread
From: Harald Welte @ 2012-07-01  5:46 UTC (permalink / raw)
  To: Sylwester Nawrocki
  Cc: linux-samsung-soc, kgene.kim, linux-arm-kernel, ben-linux

On Sat, Jun 30, 2012 at 02:08:55PM +0200, Sylwester Nawrocki wrote:
> Cc: laforge@openmoko.org
> Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>

Acked-by: Harald Welte <laforge@gnumonks.org>

> 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
-- 
- Harald Welte <laforge@gnumonks.org>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 03/10] ARM: S3C24XX: Convert QT2410 board file to the gpiolib API
@ 2012-07-01  5:46     ` Harald Welte
  0 siblings, 0 replies; 28+ messages in thread
From: Harald Welte @ 2012-07-01  5:46 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Jun 30, 2012 at 02:08:55PM +0200, Sylwester Nawrocki wrote:
> Cc: laforge at openmoko.org
> Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>

Acked-by: Harald Welte <laforge@gnumonks.org>

> 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
-- 
- Harald Welte <laforge@gnumonks.org>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH 01/10] ARM: S3C24XX: Free the backlight gpio requested in Mini2440 board code
  2012-06-30 12:08   ` Sylwester Nawrocki
@ 2012-07-01 17:36     ` Juergen Beisert
  -1 siblings, 0 replies; 28+ messages in thread
From: Juergen Beisert @ 2012-07-01 17:36 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Sylwester Nawrocki, kgene.kim, linux-samsung-soc, ben-linux

Sylwester Nawrocki wrote:
> 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.
>
> Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
> ---
>  arch/arm/mach-s3c24xx/mach-mini2440.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c
> b/arch/arm/mach-s3c24xx/mach-mini2440.c index f092b18..bd6d252 100644
> --- a/arch/arm/mach-s3c24xx/mach-mini2440.c
> +++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
> @@ -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@pengutronix.de

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 01/10] ARM: S3C24XX: Free the backlight gpio requested in Mini2440 board code
@ 2012-07-01 17:36     ` Juergen Beisert
  0 siblings, 0 replies; 28+ messages in thread
From: Juergen Beisert @ 2012-07-01 17:36 UTC (permalink / raw)
  To: linux-arm-kernel

Sylwester Nawrocki wrote:
> 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.
>
> Signed-off-by: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
> ---
>  arch/arm/mach-s3c24xx/mach-mini2440.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c
> b/arch/arm/mach-s3c24xx/mach-mini2440.c index f092b18..bd6d252 100644
> --- a/arch/arm/mach-s3c24xx/mach-mini2440.c
> +++ b/arch/arm/mach-s3c24xx/mach-mini2440.c
> @@ -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

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 28+ messages in thread

* RE: [PATCH 00/10] ARM: S3C24XX gpio cleanups and fixes
  2012-06-30 12:08 ` Sylwester Nawrocki
@ 2012-07-12  9:19   ` Kukjin Kim
  -1 siblings, 0 replies; 28+ messages in thread
From: Kukjin Kim @ 2012-07-12  9:19 UTC (permalink / raw)
  To: 'Sylwester Nawrocki'
  Cc: ben-linux, linux-samsung-soc, linux-arm-kernel

Sylwester Nawrocki wrote:
> 
> 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

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 <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH 00/10] ARM: S3C24XX gpio cleanups and fixes
@ 2012-07-12  9:19   ` Kukjin Kim
  0 siblings, 0 replies; 28+ messages in thread
From: Kukjin Kim @ 2012-07-12  9:19 UTC (permalink / raw)
  To: linux-arm-kernel

Sylwester Nawrocki wrote:
> 
> 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

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 <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2012-07-12  9:19 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-30 12:08 [PATCH 00/10] ARM: S3C24XX gpio cleanups and fixes Sylwester Nawrocki
2012-06-30 12:08 ` Sylwester Nawrocki
2012-06-30 12:08 ` [PATCH 01/10] ARM: S3C24XX: Free the backlight gpio requested in Mini2440 board code Sylwester Nawrocki
2012-06-30 12:08   ` Sylwester Nawrocki
2012-07-01 17:36   ` Juergen Beisert
2012-07-01 17:36     ` Juergen Beisert
2012-06-30 12:08 ` [PATCH 02/10] ARM: S3C24XX: Convert SMDK board file to the gpiolib API Sylwester Nawrocki
2012-06-30 12:08   ` Sylwester Nawrocki
2012-06-30 12:08 ` [PATCH 03/10] ARM: S3C24XX: Convert QT2410 " Sylwester Nawrocki
2012-06-30 12:08   ` Sylwester Nawrocki
2012-07-01  5:46   ` Harald Welte
2012-07-01  5:46     ` Harald Welte
2012-06-30 12:08 ` [PATCH 04/10] ARM: S3C24XX: Convert the PM code to " Sylwester Nawrocki
2012-06-30 12:08   ` Sylwester Nawrocki
2012-06-30 12:08 ` [PATCH 05/10] ARM: S3C24XX: Convert the touchscreen setup code to common GPIO API Sylwester Nawrocki
2012-06-30 12:08   ` Sylwester Nawrocki
2012-06-30 12:08 ` [PATCH 06/10] ARM: S3C24XX: Remove unused GPA, GPE, GPH bank GPIO aliases Sylwester Nawrocki
2012-06-30 12:08   ` Sylwester Nawrocki
2012-06-30 12:08 ` [PATCH 07/10] ARM: S3C24XX: Remove unused GPIO definitions for port J Sylwester Nawrocki
2012-06-30 12:08   ` Sylwester Nawrocki
2012-06-30 12:09 ` [PATCH 08/10] ARM: S3C24XX: Remove unused GPIO definitions for Openmoko GTA02 board Sylwester Nawrocki
2012-06-30 12:09   ` Sylwester Nawrocki
2012-06-30 12:09 ` [PATCH 09/10] ARM: S3C24XX: Correct AC97 clock control bit for S3C2440 Sylwester Nawrocki
2012-06-30 12:09   ` Sylwester Nawrocki
2012-06-30 12:09 ` [PATCH 10/10] ARM: S3C24XX: Correct CAMIF interrupt definitions Sylwester Nawrocki
2012-06-30 12:09   ` Sylwester Nawrocki
2012-07-12  9:19 ` [PATCH 00/10] ARM: S3C24XX gpio cleanups and fixes Kukjin Kim
2012-07-12  9:19   ` Kukjin Kim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.