Skip to contentSkip to conversation

Common plat-s5p fixes

PATCH New Marek Szyprowski 3 participants 7 messages May 17, 2010

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

Hello,

This patch series contains some core plat-s5p fixes, required for both plat-s5pc1xx cleanup series as well as patches that add Samsung Aquila board support. This patch series has been rebase onto next-samsung git tree.

This is a resend of these patches. They were already posted as a part of other patch series. However most of them are outdated and do not apply onto the current next-samsung tree.

The series contain the following patches:

[PATCH 1/3] ARM: Samsung: fix broken timer irq base
[PATCH 2/3] ARM: Samsung: move common I2C0 device helpers to machine directories [PATCH 3/3] ARM: Samsung: move driver strength gpio configuration helper to common dir

#1 lore raw

PATCH 1/3 ARM: Samsung: fix broken timer irq base

Timer interrupts range was defined as 43-47, what overlaps with VIC0 range (32-64). This was caused probably by a typo while the common interrupts definition was refactored. This patch moves timer interrupt range to safe area of 11-15 (just before uart range).

---
 arch/arm/plat-s5p/include/plat/irqs.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-s5p/include/plat/irqs.h +1 -1
index 42e757f..9ff3d71 100644
@@ -79,7 +79,7 @@
 #define S5P_IRQ_VIC2(x)		(S5P_VIC2_BASE + (x))
 #define S5P_IRQ_VIC3(x)		(S5P_VIC3_BASE + (x))
 
-#define S5P_TIMER_IRQ(x)	S5P_IRQ(11 + (x))
+#define S5P_TIMER_IRQ(x)	(11 + (x))
 
 #define IRQ_TIMER0		S5P_TIMER_IRQ(0)
 #define IRQ_TIMER1		S5P_TIMER_IRQ(1)
Signature · 1 line
1.6.4
#2 lore raw

PATCH 1/3 ARM: Samsung: fix broken timer irq base

Quoted 16 lines · Marek Szyprowski

Timer interrupts range was defined as 43-47, what overlaps with VIC0 range (32-64). This was caused probably by a typo while the common interrupts definition was refactored. This patch moves timer interrupt range to safe area of 11-15 (just before uart range).

---
 arch/arm/plat-s5p/include/plat/irqs.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-s5p/include/plat/irqs.h +0 -0
index 42e757f..9ff3d71 100644

arch/arm/plat-s5p/include/plat/irqs.h line 82

Quoted 5 lines
arch/arm/plat-s5p/include/plat/irqs.h +1 -1
@@ -79,7 +79,7 @@
 #define S5P_IRQ_VIC2(x)		(S5P_VIC2_BASE + (x))
 #define S5P_IRQ_VIC3(x)		(S5P_VIC3_BASE + (x))
 
-#define S5P_TIMER_IRQ(x)	S5P_IRQ(11 + (x))
+#define S5P_TIMER_IRQ(x)	(11 + (x))

87aef30e (Atul Dahiya 2010-01-29 09:08:28 +0900 82) #define S5P_TIMER_IRQ(x) S5P_IRQ(11 + (x))

is the one to blame here.

ARM: S5P: Change S5P_TIMER_IRQ based to 11 for SAMSUNG S5P series.

Currently, S5P_TIMER_IRQ is based at the end of VICs. This patch changes the S5P_TIMER_IRQ base from end of VICs to 11 in ISA IRQ space. No of VICs varies between SOCs. This causes an exception on S5P6442.

So it looks like this was intended to re-use the ISA interrupt range but didn't get it quite right.

Signature · 4 lines
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.
#3 lore raw

PATCH 2/3 ARM: Samsung: move common I2C0 device helpers to machine directories

In reply to Marek Szyprowski

I2C0 device helper depend on GPIO pin defines that are SoC specific. This patch copies the dummy i2c0 setup code to the respective mach-s5p* directories, so each SoC will be able to implement using its own defines.

---
 arch/arm/mach-s5p6440/Makefile     |    1 +
 arch/arm/mach-s5p6440/setup-i2c0.c |   25 +++++++++++++++++++++++++
 arch/arm/mach-s5p6442/Makefile     |    1 +
 arch/arm/mach-s5p6442/setup-i2c0.c |   25 +++++++++++++++++++++++++
 arch/arm/mach-s5pv210/Makefile     |    1 +
 arch/arm/mach-s5pv210/setup-i2c0.c |   25 +++++++++++++++++++++++++
 arch/arm/plat-s5p/Makefile         |    1 -
 arch/arm/plat-s5p/setup-i2c0.c     |   25 -------------------------
 8 files changed, 78 insertions(+), 26 deletions(-)
 create mode 100644 arch/arm/mach-s5p6440/setup-i2c0.c
 create mode 100644 arch/arm/mach-s5p6442/setup-i2c0.c
 create mode 100644 arch/arm/mach-s5pv210/setup-i2c0.c
 delete mode 100644 arch/arm/plat-s5p/setup-i2c0.c
arch/arm/mach-s5p6440/Makefile +1 -0
index 1ad894b..9646cdf 100644
@@ -13,6 +13,7 @@ obj-				:=
 # Core support for S5P6440 system
 
 obj-$(CONFIG_CPU_S5P6440)	+= cpu.o init.o clock.o gpio.o
+obj-$(CONFIG_CPU_S5P6440)	+= setup-i2c0.o
 
 # machine support
 
arch/arm/mach-s5p6440/setup-i2c0.c new file +25 -0
new file mode 100644
index 0000000..69e8a66
@@ -0,0 +1,25 @@
+/* linux/arch/arm/mach-s5p6440/setup-i2c0.c
+ *
+ * Copyright (c) 2009 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com/
+ *
+ * I2C0 GPIO configuration.
+ *
+ * Based on plat-s3c64xx/setup-i2c0.c
+ *
+ * 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.
+*/
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+
+struct platform_device; /* don't need the contents */
+
+#include <plat/iic.h>
+
+void s3c_i2c0_cfg_gpio(struct platform_device *dev)
+{
+	/* Will be populated later */
+}
arch/arm/mach-s5p6442/Makefile +1 -0
index dde39a6..4942c14 100644
@@ -13,6 +13,7 @@ obj-				:=
 # Core support for S5P6442 system
 
 obj-$(CONFIG_CPU_S5P6442)	+= cpu.o init.o clock.o
+obj-$(CONFIG_CPU_S5P6442)	+= setup-i2c0.o
 
 # machine support
 
arch/arm/mach-s5p6442/setup-i2c0.c new file +25 -0
new file mode 100644
index 0000000..662695d
@@ -0,0 +1,25 @@
+/* linux/arch/arm/mach-s5p6442/setup-i2c0.c
+ *
+ * Copyright (c) 2009 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com/
+ *
+ * I2C0 GPIO configuration.
+ *
+ * Based on plat-s3c64xx/setup-i2c0.c
+ *
+ * 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.
+*/
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+
+struct platform_device; /* don't need the contents */
+
+#include <plat/iic.h>
+
+void s3c_i2c0_cfg_gpio(struct platform_device *dev)
+{
+	/* Will be populated later */
+}
arch/arm/mach-s5pv210/Makefile +1 -0
index 8ebf51c..1a972a5 100644
@@ -13,6 +13,7 @@ obj-				:=
 # Core support for S5PV210 system
 
 obj-$(CONFIG_CPU_S5PV210)	+= cpu.o init.o clock.o
+obj-$(CONFIG_CPU_S5PV210)	+= setup-i2c0.o
 
 # machine support
 
arch/arm/mach-s5pv210/setup-i2c0.c new file +25 -0
new file mode 100644
index 0000000..27de0c1
@@ -0,0 +1,25 @@
+/*
+ * linux/arch/arm/mach-s5pv210/setup-i2c2.c
+ *
+ * Copyright 2009 Samsung Electronics Co.
+ *
+ * Base S5PV210 I2C bus 0 gpio configuration
+ *
+ * Based on mach-s3c64xx/setup-i2c0.c
+ *
+ * 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.
+*/
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+
+struct platform_device; /* don't need the contents */
+
+#include <plat/iic.h>
+
+void s3c_i2c0_cfg_gpio(struct platform_device *dev)
+{
+	/* Will be populated later */
+}
arch/arm/plat-s5p/Makefile +0 -1
index a7c54b3..0ec09a9 100644
@@ -16,4 +16,3 @@ obj-y				+= dev-uart.o
 obj-y				+= cpu.o
 obj-y				+= clock.o
 obj-y				+= irq.o
-obj-y				+= setup-i2c0.o
arch/arm/plat-s5p/setup-i2c0.c deleted +0 -25
deleted file mode 100644
index 67a66e0..0000000
@@ -1,25 +0,0 @@
-/* linux/arch/arm/plat-s5p/setup-i2c0.c
- *
- * Copyright (c) 2009 Samsung Electronics Co., Ltd.
- *		http://www.samsung.com/
- *
- * I2C0 GPIO configuration.
- *
- * Based on plat-s3c64xx/setup-i2c0.c
- *
- * 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.
-*/
-
-#include <linux/kernel.h>
-#include <linux/types.h>
-
-struct platform_device; /* don't need the contents */
-
-#include <plat/iic.h>
-
-void s3c_i2c0_cfg_gpio(struct platform_device *dev)
-{
-	/* Will be populated later */
-}
Signature · 1 line
1.6.4
#4 lore raw

PATCH 2/3 ARM: Samsung: move common I2C0 device helpers to machine directories

Quoted 5 lines · Marek Szyprowski

I2C0 device helper depend on GPIO pin defines that are SoC specific. This patch copies the dummy i2c0 setup code to the respective mach-s5p* directories, so each SoC will be able to implement using its own defines.

Yes, right.

Looks good except header of mach-s5pv210/setup-i2c0.c

And as I reviewed, how about re-submitting this patch with c100 i2c moving?

Quoted 18 lines
---
 arch/arm/mach-s5p6440/Makefile     |    1 +
 arch/arm/mach-s5p6440/setup-i2c0.c |   25 +++++++++++++++++++++++++
 arch/arm/mach-s5p6442/Makefile     |    1 +
 arch/arm/mach-s5p6442/setup-i2c0.c |   25 +++++++++++++++++++++++++
 arch/arm/mach-s5pv210/Makefile     |    1 +
 arch/arm/mach-s5pv210/setup-i2c0.c |   25 +++++++++++++++++++++++++
 arch/arm/plat-s5p/Makefile         |    1 -
 arch/arm/plat-s5p/setup-i2c0.c     |   25 -------------------------
 8 files changed, 78 insertions(+), 26 deletions(-)
 create mode 100644 arch/arm/mach-s5p6440/setup-i2c0.c
 create mode 100644 arch/arm/mach-s5p6442/setup-i2c0.c
 create mode 100644 arch/arm/mach-s5pv210/setup-i2c0.c
 delete mode 100644 arch/arm/plat-s5p/setup-i2c0.c

Review

Quoted 1 line
(quoted diff) +0 -0

b/arch/arm/mach-s5p6440/Makefile

Review

Quoted 12 lines

index 1ad894b..9646cdf 100644

arch/arm/mach-s5p6440/Makefile +1 -0
@@ -13,6 +13,7 @@ obj-				:=
 # Core support for S5P6440 system
 
 obj-$(CONFIG_CPU_S5P6440)	+= cpu.o init.o clock.o gpio.o
+obj-$(CONFIG_CPU_S5P6440)	+= setup-i2c0.o
 
 # machine support
 
(quoted diff) +0 -0

b/arch/arm/mach-s5p6440/setup-

Review

Quoted 32 lines

i2c0.c
new file mode 100644
index 0000000..69e8a66

arch/arm/mach-s5p6440/setup-i2c0.c new file +25 -0
@@ -0,0 +1,25 @@
+/* linux/arch/arm/mach-s5p6440/setup-i2c0.c
+ *
+ * Copyright (c) 2009 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com/
+ *
+ * I2C0 GPIO configuration.
+ *
+ * Based on plat-s3c64xx/setup-i2c0.c
+ *
+ * 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.
+*/
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+
+struct platform_device; /* don't need the contents */
+
+#include <plat/iic.h>
+
+void s3c_i2c0_cfg_gpio(struct platform_device *dev)
+{
+	/* Will be populated later */
+}
(quoted diff) +0 -0

b/arch/arm/mach-s5p6442/Makefile

Review

Quoted 12 lines

index dde39a6..4942c14 100644

arch/arm/mach-s5p6442/Makefile +1 -0
@@ -13,6 +13,7 @@ obj-				:=
 # Core support for S5P6442 system
 
 obj-$(CONFIG_CPU_S5P6442)	+= cpu.o init.o clock.o
+obj-$(CONFIG_CPU_S5P6442)	+= setup-i2c0.o
 
 # machine support
 
(quoted diff) +0 -0

b/arch/arm/mach-s5p6442/setup-

Review

Quoted 32 lines

i2c0.c
new file mode 100644
index 0000000..662695d

arch/arm/mach-s5p6442/setup-i2c0.c new file +25 -0
@@ -0,0 +1,25 @@
+/* linux/arch/arm/mach-s5p6442/setup-i2c0.c
+ *
+ * Copyright (c) 2009 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com/
+ *
+ * I2C0 GPIO configuration.
+ *
+ * Based on plat-s3c64xx/setup-i2c0.c
+ *
+ * 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.
+*/
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+
+struct platform_device; /* don't need the contents */
+
+#include <plat/iic.h>
+
+void s3c_i2c0_cfg_gpio(struct platform_device *dev)
+{
+	/* Will be populated later */
+}
(quoted diff) +0 -0

b/arch/arm/mach-s5pv210/Makefile

Review

Quoted 12 lines

index 8ebf51c..1a972a5 100644

arch/arm/mach-s5pv210/Makefile +1 -0
@@ -13,6 +13,7 @@ obj-				:=
 # Core support for S5PV210 system
 
 obj-$(CONFIG_CPU_S5PV210)	+= cpu.o init.o clock.o
+obj-$(CONFIG_CPU_S5PV210)	+= setup-i2c0.o
 
 # machine support
 
(quoted diff) +0 -0

b/arch/arm/mach-s5pv210/setup-

Quoted 6 lines

i2c0.c
new file mode 100644
index 0000000..27de0c1

arch/arm/mach-s5pv210/setup-i2c0.c line 8

Quoted 8 lines
arch/arm/mach-s5pv210/setup-i2c0.c new file +8 -0
@@ -0,0 +1,25 @@
+/*
+ * linux/arch/arm/mach-s5pv210/setup-i2c2.c
+ *
+ * Copyright 2009 Samsung Electronics Co.
+ *
+ * Base S5PV210 I2C bus 0 gpio configuration
+ *
+ * Based on mach-s3c64xx/setup-i2c0.c

Pleae keep the original header from plat-s5p/setup-i2c

Review

Quoted 27 lines
arch/arm/mach-s5pv210/setup-i2c0.c new file +17 -0
+ *
+ * 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.
+*/
+
+#include <linux/kernel.h>
+#include <linux/types.h>
+
+struct platform_device; /* don't need the contents */
+
+#include <plat/iic.h>
+
+void s3c_i2c0_cfg_gpio(struct platform_device *dev)
+{
+	/* Will be populated later */
+}
arch/arm/plat-s5p/Makefile +0 -1
index a7c54b3..0ec09a9 100644
@@ -16,4 +16,3 @@ obj-y				+= dev-uart.o
 obj-y				+= cpu.o
 obj-y				+= clock.o
 obj-y				+= irq.o
-obj-y				+= setup-i2c0.o
(quoted diff) +0 -0

b/arch/arm/plat-s5p/setup-i2c0.c

Quoted 21 lines

deleted file mode 100644
index 67a66e0..0000000

arch/arm/plat-s5p/setup-i2c0.c deleted +0 -16
@@ -1,25 +0,0 @@
-/* linux/arch/arm/plat-s5p/setup-i2c0.c
- *
- * Copyright (c) 2009 Samsung Electronics Co., Ltd.
- *		http://www.samsung.com/
- *
- * I2C0 GPIO configuration.
- *
- * Based on plat-s3c64xx/setup-i2c0.c
- *
- * 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.
-*/
-
-#include <linux/kernel.h>
-#include <linux/types.h>

arch/arm/plat-s5p/setup-i2c0.c

Quoted 10 lines
arch/arm/plat-s5p/setup-i2c0.c deleted +0 -10
-
-struct platform_device; /* don't need the contents */
-
-#include <plat/iic.h>
-
-void s3c_i2c0_cfg_gpio(struct platform_device *dev)
-{
-	/* Will be populated later */
-}
--

Thanks.

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

#5 lore raw

PATCH 2/3 ARM: Samsung: move common I2C0 device helpers to machine directories

In reply to Marek Szyprowski
Quoted 5 lines · Marek Szyprowski

I2C0 device helper depend on GPIO pin defines that are SoC specific. This patch copies the dummy i2c0 setup code to the respective mach-s5p* directories, so each SoC will be able to implement using its own defines.

One more, moving from plat-s5p/ is better than creating.

Quoted 18 lines
---
 arch/arm/mach-s5p6440/Makefile     |    1 +
 arch/arm/mach-s5p6440/setup-i2c0.c |   25 +++++++++++++++++++++++++
 arch/arm/mach-s5p6442/Makefile     |    1 +
 arch/arm/mach-s5p6442/setup-i2c0.c |   25 +++++++++++++++++++++++++
 arch/arm/mach-s5pv210/Makefile     |    1 +
 arch/arm/mach-s5pv210/setup-i2c0.c |   25 +++++++++++++++++++++++++
 arch/arm/plat-s5p/Makefile         |    1 -
 arch/arm/plat-s5p/setup-i2c0.c     |   25 -------------------------
 8 files changed, 78 insertions(+), 26 deletions(-)
 create mode 100644 arch/arm/mach-s5p6440/setup-i2c0.c
 create mode 100644 arch/arm/mach-s5p6442/setup-i2c0.c
 create mode 100644 arch/arm/mach-s5pv210/setup-i2c0.c
 delete mode 100644 arch/arm/plat-s5p/setup-i2c0.c

(snip)

Thanks.

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

#6 lore raw

PATCH 3/3 ARM: Samsung: move driver strength gpio configuration helper to common dir

In reply to Marek Szyprowski

Driver strength parameter can be changed not only on S5PC100 but also on S5PV210/S5PC110 platforms, so move the helper functions to the common plat-samsung directory.

---
 arch/arm/plat-s5p/Kconfig                          |    1 +
 arch/arm/plat-s5pc1xx/Kconfig                      |    2 +-
 arch/arm/plat-s5pc1xx/Makefile                     |    1 -
 arch/arm/plat-s5pc1xx/gpio-config.c                |   62 --------------------
 .../plat-s5pc1xx/include/plat/gpio-cfg-s5pc1xx.h   |   32 ----------
 arch/arm/plat-s5pc1xx/setup-fb-24bpp.c             |    1 -
 arch/arm/plat-samsung/Kconfig                      |   12 ++--
 arch/arm/plat-samsung/gpio-config.c                |   48 +++++++++++++++
 arch/arm/plat-samsung/include/plat/gpio-cfg.h      |   30 ++++++++++
 9 files changed, 86 insertions(+), 103 deletions(-)
 delete mode 100644 arch/arm/plat-s5pc1xx/gpio-config.c
 delete mode 100644 arch/arm/plat-s5pc1xx/include/plat/gpio-cfg-s5pc1xx.h
arch/arm/plat-s5p/Kconfig +1 -0
index d400a6a..92bd756 100644
@@ -13,6 +13,7 @@ config PLAT_S5P
 	select NO_IOPORT
 	select ARCH_REQUIRE_GPIOLIB
 	select S3C_GPIO_TRACK
+	select S5P_GPIO_DRVSTR
 	select SAMSUNG_GPIOLIB_4BIT
 	select S3C_GPIO_CFG_S3C64XX
 	select S3C_GPIO_PULL_UPDOWN
arch/arm/plat-s5pc1xx/Kconfig +1 -1
index c7ccdf2..79d3be7 100644
@@ -16,9 +16,9 @@ config PLAT_S5PC1XX
 	select SAMSUNG_IRQ_VIC_TIMER
 	select S3C_GPIO_TRACK
 	select S3C_GPIO_PULL_UPDOWN
+	select S5P_GPIO_DRVSTR
 	select S3C_GPIO_CFG_S3C24XX
 	select S3C_GPIO_CFG_S3C64XX
-	select S5P_GPIO_CFG_S5PC1XX
 	help
 	  Base platform code for any Samsung S5PC1XX device
 
arch/arm/plat-s5pc1xx/Makefile +0 -1
index 278f268..66a8f3e 100644
@@ -24,7 +24,6 @@ obj-$(CONFIG_CPU_S5PC100_CLOCK)	+= s5pc100-clock.o
 
 # Device setup
 
-obj-$(CONFIG_S5P_GPIO_CFG_S5PC1XX) += gpio-config.o
 obj-$(CONFIG_S5PC1XX_SETUP_FB_24BPP) += setup-fb-24bpp.o
 obj-$(CONFIG_S5PC1XX_SETUP_I2C0) += setup-i2c0.o
 obj-$(CONFIG_S5PC1XX_SETUP_I2C1) += setup-i2c1.o
arch/arm/plat-s5pc1xx/gpio-config.c deleted +0 -62

62 lines not on this page · raw message

arch/arm/plat-s5pc1xx/include/plat/gpio-cfg-s5pc1xx.h deleted +0 -32
deleted file mode 100644
index 72ad59f..0000000
@@ -1,32 +0,0 @@
-/* linux/arch/arm/plat-s5pc1xx/include/plat/gpio-cfg.h
- *
- * Copyright 2009 Samsung Electronic
- *
- * S5PC1XX Platform - GPIO pin configuration
- *
- * 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.
-*/
-
-/* This file contains the necessary definitions to get the basic gpio
- * pin configuration done such as setting a pin to input or output or
- * changing the pull-{up,down} configurations.
- */
-
-#ifndef __GPIO_CFG_S5PC1XX_H
-#define __GPIO_CFG_S5PC1XX_H __FILE__
-
-typedef unsigned int __bitwise__ s5p_gpio_drvstr_t;
-
-#define S5P_GPIO_DRVSTR_LV1	0x00
-#define S5P_GPIO_DRVSTR_LV2	0x01
-#define S5P_GPIO_DRVSTR_LV3	0x10
-#define S5P_GPIO_DRVSTR_LV4	0x11
-
-extern s5p_gpio_drvstr_t s5p_gpio_get_drvstr(unsigned int pin, unsigned int off);
-
-extern int s5p_gpio_set_drvstr(unsigned int pin, unsigned int off,
-			s5p_gpio_drvstr_t drvstr);
-
-#endif /* __GPIO_CFG_S5PC1XX_H */
arch/arm/plat-s5pc1xx/setup-fb-24bpp.c +0 -1
index 1a63768..b02c36f 100644
@@ -19,7 +19,6 @@
 #include <mach/map.h>
 #include <plat/fb.h>
 #include <plat/gpio-cfg.h>
-#include <plat/gpio-cfg-s5pc1xx.h>
 
 #define DISR_OFFSET	0x7008
 
arch/arm/plat-samsung/Kconfig +6 -6
index 287e6f7..6ccfd60 100644
@@ -90,12 +90,6 @@ config S3C_GPIO_CFG_S3C64XX
 	  Internal configuration to enable S3C64XX style GPIO configuration
 	  functions.
 
-config S5P_GPIO_CFG_S5PC1XX
-	bool
-	help
-	  Internal configuration to enable S5PC1XX style GPIO configuration
-	  functions.
-
 config S3C_GPIO_PULL_UPDOWN
 	bool
 	help
@@ -111,6 +105,12 @@ config S3C_GPIO_PULL_UP
 	help
 	  Internal configuration to enable the correct GPIO pull helper
 
+config S5P_GPIO_DRVSTR
+	bool
+	help
+	  Internal configuration to get and set correct GPIO driver strength
+	  helper
+
 config SAMSUNG_GPIO_EXTRA
 	int "Number of additional GPIO pins"
 	default 0
arch/arm/plat-samsung/gpio-config.c +48 -0

51 lines not on this page · raw message

arch/arm/plat-samsung/include/plat/gpio-cfg.h +30 -0
index 8d01e85..34efdd2 100644
@@ -25,6 +25,7 @@
 #define __PLAT_GPIO_CFG_H __FILE__
 
 typedef unsigned int __bitwise__ s3c_gpio_pull_t;
+typedef unsigned int __bitwise__ s5p_gpio_drvstr_t;
 
 /* forward declaration if gpio-core.h hasn't been included */
 struct s3c_gpio_chip;
@@ -118,4 +119,33 @@ extern int s3c_gpio_setpull(unsigned int pin, s3c_gpio_pull_t pull);
 */
 extern s3c_gpio_pull_t s3c_gpio_getpull(unsigned int pin);
 
+/* Define values for the drvstr available for each gpio pin.
+ *
+ * These values control the value of the output signal driver strength,
+ * configurable on most pins on the S5C series.
+ */
+#define S5P_GPIO_DRVSTR_LV1	((__force s5p_gpio_drvstr_t)0x00)
+#define S5P_GPIO_DRVSTR_LV2	((__force s5p_gpio_drvstr_t)0x01)
+#define S5P_GPIO_DRVSTR_LV3	((__force s5p_gpio_drvstr_t)0x10)
+#define S5P_GPIO_DRVSTR_LV4	((__force s5p_gpio_drvstr_t)0x11)
+
+/**
+ * s5c_gpio_get_drvstr() - get the driver streght value of a gpio pin
+ * @pin: The pin number to get the settings for
+ *
+ * Read the driver streght value for the specified pin.
+*/
+extern s5p_gpio_drvstr_t s5p_gpio_get_drvstr(unsigned int pin);
+
+/**
+ * s3c_gpio_set_drvstr() - set the driver streght value of a gpio pin
+ * @pin: The pin number to configure the driver streght value
+ * @drvstr: The new value of the driver strength
+ *
+ * This function sets the driver strength value for the specified pin.
+ * It will return 0 if successfull, or a negative error code if the pin
+ * cannot support the requested setting.
+*/
+extern int s5p_gpio_set_drvstr(unsigned int pin, s5p_gpio_drvstr_t drvstr);
+
 #endif /* __PLAT_GPIO_CFG_H */
Signature · 1 line
1.6.4