Skip to contentSkip to conversation

No subject

PATCH New Marek Szyprowski 3 participants 18 messages May 18, 2010 – May 19, 2010

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

Hello,

This patch series perform a general cleanup in Samsung S5PC100 SoC support. This chip is moved from custom s5pc1xx platform framework to new plat-s5p framework, so more common code can be easily reused in upcomming extensions for S5PV210/S5PC110 SoCs.

This patch series is prepared against next-samsung tree, with assumption that the "[PATCH v3] ARM: S5PC100: Pre-requisite clock patch for plat-s5pc1xx to plat-s5p" has been applied as well as the '[PATCH v6]
ARM: S5PV210: Add Ext interrupt support' (with additional bug fixes).

I've tried to split my changes as much as possible to clearly show how the transition from plat-s5pc1xx to plat-s5p is being done.

Changes since v2:
- fixed some whitespace/tabs errors
- removed external interrupt code, a common code from plat-s5p will be used
- moved SMDKC100 fixes to separate patch series

Changes since v1:
- bases on completely new clock code provided by Kukjin Kim
- added some plat-s5p fixes required for transition
- removed custom functions from gpiolib implementation (now uses common code from plat-samsung)
- restructured the changes to avoid breaking the functionality beteen the patches
- some other minor cleanups (mainly c1xx to c100 renames)

This patch series includes:

[PATCH 01/11] drivers: serial: S5PC100 serial driver cleanup
[PATCH 02/11] ARM: S5PC100: Use common functions for gpiolib implementation [PATCH 03/11] ARM: S5PC100: Move gpio support from plat-s5pc1xx to mach-s5pc100 [PATCH 04/11] ARM: S5PC100: gpio.h cleanup
[PATCH 05/11] ARM: S5PC100: Move frame buffer helpers from plat-s5pc1xx to mach-s5pc100 [PATCH 06/11] ARM: S5PC100: Move i2c helpers from plat-s5pc1xx to mach-s5pc100 [PATCH 07/11] ARM: S5PC100: Move sdhci helpers from plat-s5pc1xx to mach-s5pc100 [PATCH 08/11] ARM: Samsung: move S5PC100 support from plat-s5pc1xx to plat-s5p framework [PATCH 09/11] ARM: S5PC100: Add support for gpio interrupt
[PATCH 10/11] ARM: S5PC100: use common plat-s5p external interrupt code [PATCH 11/11] ARM: remove obsolete plat-s5pc1xx directory

Best regards
--
Marek Szyprowski
Samsung Poland R&D Center

#1 lore raw

PATCH 1/11 drivers: serial: S5PC100 serial driver cleanup

Remove unnecessary Kconfig entry. S5PC100 has exactly the same driver as S3C6400/S3C6410/S5P6440.

---
 drivers/serial/Kconfig  |   16 ++++------------
 drivers/serial/Makefile |    1 -
 2 files changed, 4 insertions(+), 13 deletions(-)
drivers/serial/Kconfig +4 -12
index 5f3f03d..302836a 100644
@@ -534,21 +534,13 @@ config SERIAL_S3C24A0
 	  Serial port support for the Samsung S3C24A0 SoC
 
 config SERIAL_S3C6400
-	tristate "Samsung S3C6400/S3C6410/S5P6440 Seria port support"
-	depends on SERIAL_SAMSUNG && (CPU_S3C6400 || CPU_S3C6410 || CPU_S5P6440)
+	tristate "Samsung S3C6400/S3C6410/S5P6440/S5PC100 Serial port support"
+	depends on SERIAL_SAMSUNG && (CPU_S3C6400 || CPU_S3C6410 || CPU_S5P6440 || CPU_S5PC100)
 	select SERIAL_SAMSUNG_UARTS_4
 	default y
 	help
-	  Serial port support for the Samsung S3C6400, S3C6410 and S5P6440
-	  SoCs
-
-config SERIAL_S5PC100
-	tristate "Samsung S5PC100 Serial port support"
-	depends on SERIAL_SAMSUNG && CPU_S5PC100
-	select SERIAL_SAMSUNG_UARTS_4
-	default y
-	help
-	  Serial port support for the Samsung S5PC100 SoCs
+	  Serial port support for the Samsung S3C6400, S3C6410, S5P6440
+	  and S5PC100 SoCs
 
 config SERIAL_S5PV210
 	tristate "Samsung S5PV210 Serial port support"
drivers/serial/Makefile +0 -1
index 6aa4723..328f107 100644
@@ -44,7 +44,6 @@ obj-$(CONFIG_SERIAL_S3C2412) += s3c2412.o
 obj-$(CONFIG_SERIAL_S3C2440) += s3c2440.o
 obj-$(CONFIG_SERIAL_S3C24A0) += s3c24a0.o
 obj-$(CONFIG_SERIAL_S3C6400) += s3c6400.o
-obj-$(CONFIG_SERIAL_S5PC100) += s3c6400.o
 obj-$(CONFIG_SERIAL_S5PV210) += s5pv210.o
 obj-$(CONFIG_SERIAL_MAX3100) += max3100.o
 obj-$(CONFIG_SERIAL_IP22_ZILOG) += ip22zilog.o
Signature · 1 line
1.6.4
#2 lore raw

PATCH 2/11 ARM: S5PC100: Use common functions for gpiolib implementation

In reply to Marek Szyprowski

GPIOlib helpers from plat-samsung already have functions for accessing 4bit gpio banks. This patch removes the duplicated functions from plat-s5pc1xx/gpiolib.c.

---
 arch/arm/plat-s5pc1xx/Kconfig   |    1 +
 arch/arm/plat-s5pc1xx/gpiolib.c |   96 ++++-----------------------------------
 2 files changed, 10 insertions(+), 87 deletions(-)
arch/arm/plat-s5pc1xx/Kconfig +1 -0
index 79d3be7..98bbaf9 100644
@@ -19,6 +19,7 @@ config PLAT_S5PC1XX
 	select S5P_GPIO_DRVSTR
 	select S3C_GPIO_CFG_S3C24XX
 	select S3C_GPIO_CFG_S3C64XX
+	select SAMSUNG_GPIOLIB_4BIT
 	help
 	  Base platform code for any Samsung S5PC1XX device
 
arch/arm/plat-s5pc1xx/gpiolib.c +9 -87

120 lines not on this page · raw message

Signature · 1 line
1.6.4
#3 lore raw

PATCH 3/11 ARM: S5PC100: Move gpio support from plat-s5pc1xx to mach-s5pc100

In reply to Marek Szyprowski

Move gpio-lib support from plat-s5pc1xx to mach-s5pc100. Only basic gpio functionality is now supported. Gpio interrupts are disabled temporarly and will be added later.

---
 arch/arm/mach-s5pc100/Makefile                     |    2 +-
 arch/arm/{plat-s5pc1xx => mach-s5pc100}/gpiolib.c  |   11 +++++++----
 .../plat => mach-s5pc100/include/mach}/regs-gpio.h |    0
 arch/arm/mach-s5pc100/mach-smdkc100.c              |    1 -
 arch/arm/plat-s5pc1xx/Makefile                     |    3 +--
 5 files changed, 9 insertions(+), 8 deletions(-)
 rename arch/arm/{plat-s5pc1xx => mach-s5pc100}/gpiolib.c (99%)
 rename arch/arm/{plat-s5pc1xx/include/plat => mach-s5pc100/include/mach}/regs-gpio.h (100%)
arch/arm/mach-s5pc100/Makefile +1 -1
index 809ff10..4199ce2 100644
@@ -11,7 +11,7 @@ obj-				:=
 
 # Core support for S5PC100 system
 
-obj-$(CONFIG_CPU_S5PC100)	+= cpu.o
+obj-$(CONFIG_CPU_S5PC100)	+= cpu.o gpiolib.o
 
 # Helper and device support
 
arch/arm/mach-s5pc100/gpiolib.c renamed from arch/arm/plat-s5pc1xx/gpiolib.c +7 -4
similarity index 99%
rename from arch/arm/plat-s5pc1xx/gpiolib.c
rename to arch/arm/mach-s5pc100/gpiolib.c
index 5a97a8f..c8e8336 100644
@@ -17,11 +17,11 @@
 #include <linux/gpio.h>
 
 #include <mach/map.h>
+#include <mach/regs-gpio.h>
 
 #include <plat/gpio-core.h>
 #include <plat/gpio-cfg.h>
 #include <plat/gpio-cfg-helpers.h>
-#include <plat/regs-gpio.h>
 
 /* S5PC100 GPIO bank summary:
  *
@@ -61,6 +61,7 @@
  * L3	8	4Bit	None
  */
 
+#if 0
 static int s5pc1xx_gpiolib_to_irq(struct gpio_chip *chip, unsigned int offset)
 {
 	return S3C_IRQ_GPIO(chip->base + offset);
@@ -84,7 +85,7 @@ static int s5pc1xx_gpiolib_to_eint(struct gpio_chip *chip, unsigned int offset)
 		return IRQ_EINT(24 + offset);
 	return -EINVAL;
 }
-
+#endif
 static struct s3c_gpio_cfg gpio_cfg = {
 	.set_config	= s3c_gpio_setcfg_s3c64xx_4bit,
 	.set_pull	= s3c_gpio_setpull_updown,
@@ -386,7 +387,7 @@ extern void s5pc1xx_irq_gpioint_handler(unsigned int irq, struct irq_desc *desc)
 
 static __init void s5pc100_gpiolib_link(struct s3c_gpio_chip *chip)
 {
-
+#if 0
 	/* Interrupt */
 	if (chip->config == &gpio_cfg) {
 		int i, irq;
@@ -402,6 +403,7 @@ static __init void s5pc100_gpiolib_link(struct s3c_gpio_chip *chip)
 		}
 	} else if (chip->config == &gpio_cfg_eint)
 		chip->chip.to_irq = s5pc1xx_gpiolib_to_eint;
+#endif
 }
 
 static __init int s5pc1xx_gpiolib_init(void)
@@ -417,9 +419,10 @@ static __init int s5pc1xx_gpiolib_init(void)
 
 	samsung_gpiolib_add_4bit_chips(s5pc100_gpio_chips,
 				       ARRAY_SIZE(s5pc100_gpio_chips));
+#if 0
 	/* Interrupt */
 	set_irq_chained_handler(IRQ_GPIOINT, s5pc1xx_irq_gpioint_handler);
-
+#endif
 	return 0;
 }
 core_initcall(s5pc1xx_gpiolib_init);
arch/arm/mach-s5pc100/include/mach/regs-gpio.h renamed from arch/arm/plat-s5pc1xx/include/plat/regs-gpio.h +0 -0
similarity index 100%
rename from arch/arm/plat-s5pc1xx/include/plat/regs-gpio.h
rename to arch/arm/mach-s5pc100/include/mach/regs-gpio.h
arch/arm/mach-s5pc100/mach-smdkc100.c +0 -1
index 3a7dc3e..b6f8a58 100644
@@ -35,7 +35,6 @@
 
 #include <plat/regs-serial.h>
 #include <plat/gpio-cfg.h>
-#include <plat/regs-gpio.h>
 
 #include <plat/clock.h>
 #include <plat/devs.h>
arch/arm/plat-s5pc1xx/Makefile +1 -2
index 66a8f3e..540fca5 100644
@@ -13,9 +13,8 @@ obj-				:=
 
 obj-y				+= dev-uart.o
 obj-y				+= cpu.o
-obj-y				+= irq.o irq-gpio.o irq-eint.o
+obj-y				+= irq.o
 obj-y				+= clock.o
-obj-y				+= gpiolib.o
 
 # CPU support
 
Signature · 1 line
1.6.4
#4 lore raw

PATCH 4/11 ARM: S5PC100: gpio.h cleanup

In reply to Marek Szyprowski

This patch renames gpio related registers from s5pc1xx to s5pc100 to better match the plat-s5p framework style. GPIO_MP* defines now used anywhere thus has been removed.

---
 arch/arm/mach-s5pc100/include/mach/gpio.h      |   95 +++++++++++-------------
 arch/arm/mach-s5pc100/include/mach/regs-gpio.h |    8 +-
 2 files changed, 46 insertions(+), 57 deletions(-)
arch/arm/mach-s5pc100/include/mach/gpio.h +42 -53
index 2c4cbe8..29a8a12 100644
@@ -12,6 +12,9 @@
  * published by the Free Software Foundation.
 */
 
+#ifndef __ASM_ARCH_GPIO_H
+#define __ASM_ARCH_GPIO_H __FILE__
+
 #define gpio_get_value	__gpio_get_value
 #define gpio_set_value	__gpio_set_value
 #define gpio_cansleep	__gpio_cansleep
@@ -52,11 +55,6 @@
 #define S5PC100_GPIO_L2_NR	(8)
 #define S5PC100_GPIO_L3_NR	(8)
 #define S5PC100_GPIO_L4_NR	(8)
-#define S5PC100_GPIO_MP00_NR	(8)
-#define S5PC100_GPIO_MP01_NR	(8)
-#define S5PC100_GPIO_MP02_NR	(8)
-#define S5PC100_GPIO_MP03_NR	(8)
-#define S5PC100_GPIO_MP04_NR	(5)
 
 /* GPIO bank numbes */
 
@@ -65,50 +63,45 @@
  * change from one gpio bank to another can be caught.
 */
 
-#define S5PC1XX_GPIO_NEXT(__gpio) \
+#define S5PC100_GPIO_NEXT(__gpio) \
 	((__gpio##_START) + (__gpio##_NR) + CONFIG_S3C_GPIO_SPACE + 1)
 
-enum s3c_gpio_number {
+enum s5p_gpio_number {
 	S5PC100_GPIO_A0_START	= 0,
-	S5PC100_GPIO_A1_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_A0),
-	S5PC100_GPIO_B_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_A1),
-	S5PC100_GPIO_C_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_B),
-	S5PC100_GPIO_D_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_C),
-	S5PC100_GPIO_E0_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_D),
-	S5PC100_GPIO_E1_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_E0),
-	S5PC100_GPIO_F0_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_E1),
-	S5PC100_GPIO_F1_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_F0),
-	S5PC100_GPIO_F2_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_F1),
-	S5PC100_GPIO_F3_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_F2),
-	S5PC100_GPIO_G0_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_F3),
-	S5PC100_GPIO_G1_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_G0),
-	S5PC100_GPIO_G2_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_G1),
-	S5PC100_GPIO_G3_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_G2),
-	S5PC100_GPIO_H0_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_G3),
-	S5PC100_GPIO_H1_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_H0),
-	S5PC100_GPIO_H2_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_H1),
-	S5PC100_GPIO_H3_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_H2),
-	S5PC100_GPIO_I_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_H3),
-	S5PC100_GPIO_J0_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_I),
-	S5PC100_GPIO_J1_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_J0),
-	S5PC100_GPIO_J2_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_J1),
-	S5PC100_GPIO_J3_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_J2),
-	S5PC100_GPIO_J4_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_J3),
-	S5PC100_GPIO_K0_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_J4),
-	S5PC100_GPIO_K1_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_K0),
-	S5PC100_GPIO_K2_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_K1),
-	S5PC100_GPIO_K3_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_K2),
-	S5PC100_GPIO_L0_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_K3),
-	S5PC100_GPIO_L1_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_L0),
-	S5PC100_GPIO_L2_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_L1),
-	S5PC100_GPIO_L3_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_L2),
-	S5PC100_GPIO_L4_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_L3),
-	S5PC100_GPIO_MP00_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_L4),
-	S5PC100_GPIO_MP01_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_MP00),
-	S5PC100_GPIO_MP02_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_MP01),
-	S5PC100_GPIO_MP03_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_MP02),
-	S5PC100_GPIO_MP04_START	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_MP03),
-	S5PC100_GPIO_END	= S5PC1XX_GPIO_NEXT(S5PC100_GPIO_MP04),
+	S5PC100_GPIO_A1_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_A0),
+	S5PC100_GPIO_B_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_A1),
+	S5PC100_GPIO_C_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_B),
+	S5PC100_GPIO_D_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_C),
+	S5PC100_GPIO_E0_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_D),
+	S5PC100_GPIO_E1_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_E0),
+	S5PC100_GPIO_F0_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_E1),
+	S5PC100_GPIO_F1_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_F0),
+	S5PC100_GPIO_F2_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_F1),
+	S5PC100_GPIO_F3_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_F2),
+	S5PC100_GPIO_G0_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_F3),
+	S5PC100_GPIO_G1_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_G0),
+	S5PC100_GPIO_G2_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_G1),
+	S5PC100_GPIO_G3_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_G2),
+	S5PC100_GPIO_H0_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_G3),
+	S5PC100_GPIO_H1_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_H0),
+	S5PC100_GPIO_H2_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_H1),
+	S5PC100_GPIO_H3_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_H2),
+	S5PC100_GPIO_I_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_H3),
+	S5PC100_GPIO_J0_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_I),
+	S5PC100_GPIO_J1_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_J0),
+	S5PC100_GPIO_J2_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_J1),
+	S5PC100_GPIO_J3_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_J2),
+	S5PC100_GPIO_J4_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_J3),
+	S5PC100_GPIO_K0_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_J4),
+	S5PC100_GPIO_K1_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_K0),
+	S5PC100_GPIO_K2_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_K1),
+	S5PC100_GPIO_K3_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_K2),
+	S5PC100_GPIO_L0_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_K3),
+	S5PC100_GPIO_L1_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_L0),
+	S5PC100_GPIO_L2_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_L1),
+	S5PC100_GPIO_L3_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_L2),
+	S5PC100_GPIO_L4_START	= S5PC100_GPIO_NEXT(S5PC100_GPIO_L3),
+	S5PC100_GPIO_END	= S5PC100_GPIO_NEXT(S5PC100_GPIO_L4),
 };
 
 /* S5PC100 GPIO number definitions. */
@@ -146,17 +139,13 @@ enum s3c_gpio_number {
 #define S5PC100_GPL2(_nr)	(S5PC100_GPIO_L2_START + (_nr))
 #define S5PC100_GPL3(_nr)	(S5PC100_GPIO_L3_START + (_nr))
 #define S5PC100_GPL4(_nr)	(S5PC100_GPIO_L4_START + (_nr))
-#define S5PC100_MP00(_nr)	(S5PC100_GPIO_MP00_START + (_nr))
-#define S5PC100_MP01(_nr)	(S5PC100_GPIO_MP01_START + (_nr))
-#define S5PC100_MP02(_nr)	(S5PC100_GPIO_MP02_START + (_nr))
-#define S5PC100_MP03(_nr)	(S5PC100_GPIO_MP03_START + (_nr))
-#define S5PC100_MP04(_nr)	(S5PC100_GPIO_MP04_START + (_nr))
-#define S5PC100_MP05(_nr)	(S5PC100_GPIO_MP05_START + (_nr))
 
-/* It used the end of the S5PC1XX gpios */
+/* It used the end of the S5PC100 gpios */
 #define S3C_GPIO_END		S5PC100_GPIO_END
 
 /* define the number of gpios we need to the one after the MP04() range */
 #define ARCH_NR_GPIOS		(S5PC100_GPIO_END + 1)
 
 #include <asm-generic/gpio.h>
+
+#endif /* __ASM_ARCH_GPIO_H */
arch/arm/mach-s5pc100/include/mach/regs-gpio.h +4 -4
index 43c7bc8..6866691 100644
@@ -3,11 +3,11 @@
  * Copyright 2009 Samsung Electronics Co.
  *      Byungho Min <[email protected]>
  *
- * S5PC1XX - GPIO register definitions
+ * S5PC100 - GPIO register definitions
  */
 
-#ifndef __ASM_PLAT_S5PC1XX_REGS_GPIO_H
-#define __ASM_PLAT_S5PC1XX_REGS_GPIO_H __FILE__
+#ifndef __ASM_MACH_S5PC100_REGS_GPIO_H
+#define __ASM_MACH_S5PC100_REGS_GPIO_H __FILE__
 
 #include <mach/map.h>
 
@@ -66,5 +66,5 @@
 #define S5PC100_GPx_OUTPUT(__gpio)	(0x1 << ((__gpio) * 4))
 #define S5PC100_GPx_CONMASK(__gpio)	(0xf << ((__gpio) * 4))
 
-#endif /* __ASM_PLAT_S5PC1XX_REGS_GPIO_H */
+#endif /* __ASM_MACH_S5PC100_REGS_GPIO_H */
 
Signature · 1 line
1.6.4
#5 lore raw

PATCH 5/11 ARM: S5PC100: Move frame buffer helpers from plat-s5pc1xx to mach-s5pc100

In reply to Marek Szyprowski

Move frame buffer helpers from plat-s5pc1xx to mach-s5pc100.

---
 arch/arm/mach-s5pc100/Kconfig                      |    7 ++++++-
 arch/arm/mach-s5pc100/Makefile                     |    1 +
 .../setup-fb-24bpp.c                               |    4 ++--
 arch/arm/plat-s5pc1xx/Kconfig                      |    5 -----
 arch/arm/plat-s5pc1xx/Makefile                     |    1 -
 5 files changed, 9 insertions(+), 9 deletions(-)
 rename arch/arm/{plat-s5pc1xx => mach-s5pc100}/setup-fb-24bpp.c (91%)
arch/arm/mach-s5pc100/Kconfig +6 -1
index 27ec167..7d9b68c 100644
@@ -12,6 +12,11 @@ config CPU_S5PC100
 	help
 	  Enable S5PC100 CPU support
 
+config S5PC100_SETUP_FB_24BPP
+	bool
+	help
+	  Common setup code for S5PC1XX with an 24bpp RGB display helper.
+
 config S5PC100_SETUP_SDHCI
         bool
         select S5PC1XX_SETUP_SDHCI_GPIO
@@ -28,7 +33,7 @@ config MACH_SMDKC100
 	select S3C_DEV_HSMMC2
 	select S5PC1XX_SETUP_I2C0
 	select S5PC1XX_SETUP_I2C1
-	select S5PC1XX_SETUP_FB_24BPP
+	select S5PC100_SETUP_FB_24BPP
 	select S5PC100_SETUP_SDHCI
 	help
 	  Machine support for the Samsung SMDKC100
arch/arm/mach-s5pc100/Makefile +1 -0
index 4199ce2..1d1276c 100644
@@ -15,6 +15,7 @@ obj-$(CONFIG_CPU_S5PC100)	+= cpu.o gpiolib.o
 
 # Helper and device support
 
+obj-$(CONFIG_S5PC100_SETUP_FB_24BPP)	+= setup-fb-24bpp.o
 obj-$(CONFIG_S5PC100_SETUP_SDHCI)       += setup-sdhci.o
 
 # machine support
arch/arm/mach-s5pc100/setup-fb-24bpp.c renamed from arch/arm/plat-s5pc1xx/setup-fb-24bpp.c +2 -2
similarity index 91%
rename from arch/arm/plat-s5pc1xx/setup-fb-24bpp.c
rename to arch/arm/mach-s5pc100/setup-fb-24bpp.c
index b02c36f..6eba6cb 100644
@@ -1,9 +1,9 @@
 /*
- * linux/arch/arm/plat-s5pc100/setup-fb-24bpp.c
+ * linux/arch/arm/mach-s5pc100/setup-fb-24bpp.c
  *
  * Copyright 2009 Samsung Electronics
  *
- * Base S5PC1XX setup information for 24bpp LCD framebuffer
+ * Base S5PC100 setup information for 24bpp LCD framebuffer
  *
  * 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
arch/arm/plat-s5pc1xx/Kconfig +0 -5
index 98bbaf9..708f7a0 100644
@@ -39,11 +39,6 @@ config CPU_S5PC100_CLOCK
 
 # platform specific device setup
 
-config S5PC1XX_SETUP_FB_24BPP
-	bool
-	help
-          Common setup code for S5PC1XX with an 24bpp RGB display helper.
-
 config S5PC1XX_SETUP_I2C0
 	bool
 	default y
arch/arm/plat-s5pc1xx/Makefile +0 -1
index 540fca5..a5b90c0 100644
@@ -23,7 +23,6 @@ obj-$(CONFIG_CPU_S5PC100_CLOCK)	+= s5pc100-clock.o
 
 # Device setup
 
-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
 obj-$(CONFIG_S5PC1XX_SETUP_SDHCI_GPIO)	+= setup-sdhci-gpio.o
Signature · 1 line
1.6.4
#6 lore raw

PATCH 6/11 ARM: S5PC100: Move i2c helpers from plat-s5pc1xx to mach-s5pc100

In reply to Marek Szyprowski

Move i2c helpers from plat-s5pc1xx to mach-s5pc100.

---
 arch/arm/mach-s5pc100/Kconfig                      |    8 ++++++--
 arch/arm/mach-s5pc100/Makefile                     |    2 ++
 .../{plat-s5pc1xx => mach-s5pc100}/setup-i2c0.c    |    4 ++--
 .../{plat-s5pc1xx => mach-s5pc100}/setup-i2c1.c    |    4 ++--
 arch/arm/plat-s5pc1xx/Kconfig                      |   14 --------------
 arch/arm/plat-s5pc1xx/Makefile                     |    2 --
 6 files changed, 12 insertions(+), 22 deletions(-)
 rename arch/arm/{plat-s5pc1xx => mach-s5pc100}/setup-i2c0.c (89%)
 rename arch/arm/{plat-s5pc1xx => mach-s5pc100}/setup-i2c1.c (89%)
arch/arm/mach-s5pc100/Kconfig +6 -2
index 7d9b68c..8593337 100644
@@ -23,6 +23,11 @@ config S5PC100_SETUP_SDHCI
         help
           Internal helper functions for S5PC100 based SDHCI systems
 
+config S5PC100_SETUP_I2C1
+	bool
+	help
+	  Common setup code for i2c bus 1.
+
 config MACH_SMDKC100
 	bool "SMDKC100"
 	select CPU_S5PC100
@@ -31,9 +36,8 @@ config MACH_SMDKC100
 	select S3C_DEV_HSMMC
 	select S3C_DEV_HSMMC1
 	select S3C_DEV_HSMMC2
-	select S5PC1XX_SETUP_I2C0
-	select S5PC1XX_SETUP_I2C1
 	select S5PC100_SETUP_FB_24BPP
+	select S5PC100_SETUP_I2C1
 	select S5PC100_SETUP_SDHCI
 	help
 	  Machine support for the Samsung SMDKC100
arch/arm/mach-s5pc100/Makefile +2 -0
index 1d1276c..373bc54 100644
@@ -12,10 +12,12 @@ obj-				:=
 # Core support for S5PC100 system
 
 obj-$(CONFIG_CPU_S5PC100)	+= cpu.o gpiolib.o
+obj-$(CONFIG_CPU_S5PC100)	+= setup-i2c0.o
 
 # Helper and device support
 
 obj-$(CONFIG_S5PC100_SETUP_FB_24BPP)	+= setup-fb-24bpp.o
+obj-$(CONFIG_S5PC100_SETUP_I2C1)	+= setup-i2c1.o
 obj-$(CONFIG_S5PC100_SETUP_SDHCI)       += setup-sdhci.o
 
 # machine support
arch/arm/mach-s5pc100/setup-i2c0.c renamed from arch/arm/plat-s5pc1xx/setup-i2c0.c +2 -2
similarity index 89%
rename from arch/arm/plat-s5pc1xx/setup-i2c0.c
rename to arch/arm/mach-s5pc100/setup-i2c0.c
index 5e4a7c3..dd3174e 100644
@@ -1,9 +1,9 @@
-/* linux/arch/arm/plat-s5pc1xx/setup-i2c0.c
+/* linux/arch/arm/mach-s5pc100/setup-i2c0.c
  *
  * Copyright 2009 Samsung Electronics Co.
  *	Byungho Min <[email protected]>
  *
- * Base S5PC1XX I2C bus 0 gpio configuration
+ * Base S5PC100 I2C bus 0 gpio configuration
  *
  * Based on plat-s3c64xx/setup-i2c0.c
  *
arch/arm/mach-s5pc100/setup-i2c1.c renamed from arch/arm/plat-s5pc1xx/setup-i2c1.c +2 -2
similarity index 89%
rename from arch/arm/plat-s5pc1xx/setup-i2c1.c
rename to arch/arm/mach-s5pc100/setup-i2c1.c
index a0a8b4a..d1fec26 100644
@@ -1,9 +1,9 @@
-/* linux/arch/arm/plat-s3c64xx/setup-i2c1.c
+/* linux/arch/arm/mach-s5pc100/setup-i2c1.c
  *
  * Copyright 2009 Samsung Electronics Co.
  *	Byungho Min <[email protected]>
  *
- * Base S5PC1XX I2C bus 1 gpio configuration
+ * Base S5PC100 I2C bus 1 gpio configuration
  *
  * Based on plat-s3c64xx/setup-i2c1.c
  *
arch/arm/plat-s5pc1xx/Kconfig +0 -14
index 708f7a0..c7bd2bb 100644
@@ -39,20 +39,6 @@ config CPU_S5PC100_CLOCK
 
 # platform specific device setup
 
-config S5PC1XX_SETUP_I2C0
-	bool
-	default y
-	help
-	  Common setup code for i2c bus 0.
-
-	  Note, currently since i2c0 is always compiled, this setup helper
-	  is always compiled with it.
-
-config S5PC1XX_SETUP_I2C1
-	bool
-	help
-	  Common setup code for i2c bus 1.
-
 config S5PC1XX_SETUP_SDHCI_GPIO
 	bool
 	help
arch/arm/plat-s5pc1xx/Makefile +0 -2
index a5b90c0..9ce6409 100644
@@ -23,6 +23,4 @@ obj-$(CONFIG_CPU_S5PC100_CLOCK)	+= s5pc100-clock.o
 
 # Device setup
 
-obj-$(CONFIG_S5PC1XX_SETUP_I2C0) += setup-i2c0.o
-obj-$(CONFIG_S5PC1XX_SETUP_I2C1) += setup-i2c1.o
 obj-$(CONFIG_S5PC1XX_SETUP_SDHCI_GPIO)	+= setup-sdhci-gpio.o
Signature · 1 line
1.6.4
#7 lore raw

PATCH 7/11 ARM: S5PC100: Move sdhci helpers from plat-s5pc1xx to mach-s5pc100

In reply to Marek Szyprowski

Move sdhci helpers from plat-s5pc1xx to mach-s5pc100.

---
 arch/arm/mach-s5pc100/Kconfig                      |   17 +++++++++++------
 arch/arm/mach-s5pc100/Makefile                     |    3 ++-
 .../setup-sdhci-gpio.c                             |    4 ++--
 arch/arm/plat-s5pc1xx/Kconfig                      |    5 -----
 arch/arm/plat-s5pc1xx/Makefile                     |    1 -
 5 files changed, 15 insertions(+), 15 deletions(-)
 rename arch/arm/{plat-s5pc1xx => mach-s5pc100}/setup-sdhci-gpio.c (95%)
arch/arm/mach-s5pc100/Kconfig +11 -6
index 8593337..70b57d1 100644
@@ -17,17 +17,22 @@ config S5PC100_SETUP_FB_24BPP
 	help
 	  Common setup code for S5PC1XX with an 24bpp RGB display helper.
 
-config S5PC100_SETUP_SDHCI
-        bool
-        select S5PC1XX_SETUP_SDHCI_GPIO
-        help
-          Internal helper functions for S5PC100 based SDHCI systems
-
 config S5PC100_SETUP_I2C1
 	bool
 	help
 	  Common setup code for i2c bus 1.
 
+config S5PC100_SETUP_SDHCI
+	bool
+	select S5PC100_SETUP_SDHCI_GPIO
+	help
+	  Internal helper functions for S5PC100 based SDHCI systems
+
+config S5PC100_SETUP_SDHCI_GPIO
+	bool
+	help
+	  Common setup code for SDHCI gpio.
+
 config MACH_SMDKC100
 	bool "SMDKC100"
 	select CPU_S5PC100
arch/arm/mach-s5pc100/Makefile +2 -1
index 373bc54..9a545ca 100644
@@ -18,7 +18,8 @@ obj-$(CONFIG_CPU_S5PC100)	+= setup-i2c0.o
 
 obj-$(CONFIG_S5PC100_SETUP_FB_24BPP)	+= setup-fb-24bpp.o
 obj-$(CONFIG_S5PC100_SETUP_I2C1)	+= setup-i2c1.o
-obj-$(CONFIG_S5PC100_SETUP_SDHCI)       += setup-sdhci.o
+obj-$(CONFIG_S5PC100_SETUP_SDHCI)	+= setup-sdhci.o
+obj-$(CONFIG_S5PC100_SETUP_SDHCI_GPIO)	+= setup-sdhci-gpio.o
 
 # machine support
 obj-$(CONFIG_MACH_SMDKC100)	+= mach-smdkc100.o
arch/arm/mach-s5pc100/setup-sdhci-gpio.c renamed from arch/arm/plat-s5pc1xx/setup-sdhci-gpio.c +2 -2
similarity index 95%
rename from arch/arm/plat-s5pc1xx/setup-sdhci-gpio.c
rename to arch/arm/mach-s5pc100/setup-sdhci-gpio.c
index 185c894..7769c76 100644
@@ -1,8 +1,8 @@
-/* linux/arch/arm/plat-s5pc1xx/setup-sdhci-gpio.c
+/* linux/arch/arm/plat-s5pc100/setup-sdhci-gpio.c
  *
  * Copyright 2009 Samsung Eletronics
  *
- * S5PC1XX - Helper functions for setting up SDHCI device(s) GPIO (HSMMC)
+ * S5PC100 - Helper functions for setting up SDHCI device(s) GPIO (HSMMC)
  *
  * 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
arch/arm/plat-s5pc1xx/Kconfig +0 -5
index c7bd2bb..ab58758 100644
@@ -39,9 +39,4 @@ config CPU_S5PC100_CLOCK
 
 # platform specific device setup
 
-config S5PC1XX_SETUP_SDHCI_GPIO
-	bool
-	help
-	  Common setup code for SDHCI gpio.
-
 endif
arch/arm/plat-s5pc1xx/Makefile +0 -1
index 9ce6409..d490543 100644
@@ -23,4 +23,3 @@ obj-$(CONFIG_CPU_S5PC100_CLOCK)	+= s5pc100-clock.o
 
 # Device setup
 
-obj-$(CONFIG_S5PC1XX_SETUP_SDHCI_GPIO)	+= setup-sdhci-gpio.o
Signature · 1 line
1.6.4
#8 lore raw

PATCH 8/11 ARM: Samsung: move S5PC100 support from plat-s5pc1xx to plat-s5p framework

In reply to Marek Szyprowski

This patch moves S5PC100 SoC support to plat-s5p framework. Most periperal support code has been already moved from plat-s5pc1xx to mach-s5pc100.

---
 arch/arm/Kconfig                                   |    9 +-
 arch/arm/Makefile                                  |    3 +-
 arch/arm/mach-s5pc100/Kconfig                      |    7 +-
 arch/arm/mach-s5pc100/Makefile                     |    3 +-
 arch/arm/mach-s5pc100/cpu.c                        |   56 ++++---
 arch/arm/mach-s5pc100/gpiolib.c                    |   24 ++--
 arch/arm/mach-s5pc100/include/mach/debug-macro.S   |    6 +-
 arch/arm/mach-s5pc100/include/mach/entry-macro.S   |    8 +-
 arch/arm/mach-s5pc100/include/mach/irqs.h          |  101 +++++++++++++-
 arch/arm/mach-s5pc100/include/mach/map.h           |  156 +++++---------------
 arch/arm/mach-s5pc100/include/mach/regs-clock.h    |    6 +
 arch/arm/mach-s5pc100/include/mach/regs-gpio.h     |    6 +-
 arch/arm/mach-s5pc100/include/mach/regs-irq.h      |    7 +-
 arch/arm/mach-s5pc100/include/mach/system.h        |    9 +-
 arch/arm/mach-s5pc100/include/mach/tick.h          |    4 +-
 .../s5pc100-init.c => mach-s5pc100/init.c}         |    7 +-
 arch/arm/mach-s5pc100/mach-smdkc100.c              |   11 +-
 arch/arm/plat-s5p/Kconfig                          |    2 +-
 arch/arm/plat-s5p/cpu.c                            |   10 ++
 arch/arm/plat-s5p/include/plat/s5pc100.h           |   33 ++++
 arch/arm/plat-samsung/Kconfig                      |    2 +-
 21 files changed, 267 insertions(+), 203 deletions(-)
 rename arch/arm/{plat-s5pc1xx/s5pc100-init.c => mach-s5pc100/init.c} (68%)
 create mode 100644 arch/arm/plat-s5p/include/plat/s5pc100.h
arch/arm/Kconfig +3 -6
index 3f8718f..1cb098f 100644
@@ -699,14 +699,14 @@ config ARCH_S5P6442
 	help
 	  Samsung S5P6442 CPU based systems
 
-config ARCH_S5PC1XX
-	bool "Samsung S5PC1XX"
+config ARCH_S5PC100
+	bool "Samsung S5PC100"
 	select GENERIC_GPIO
 	select HAVE_CLK
 	select CPU_V7
 	select ARM_L1_CACHE_SHIFT_6
 	help
-	  Samsung S5PC1XX series based systems
+	  Samsung S5PC100 series based systems
 
 config ARCH_S5PV210
 	bool "Samsung S5PV210/S5PC110"
@@ -890,7 +890,6 @@ source "arch/arm/mach-sa1100/Kconfig"
 source "arch/arm/plat-samsung/Kconfig"
 source "arch/arm/plat-s3c24xx/Kconfig"
 source "arch/arm/plat-s5p/Kconfig"
-source "arch/arm/plat-s5pc1xx/Kconfig"
 
 if ARCH_S3C2410
 source "arch/arm/mach-s3c2400/Kconfig"
@@ -909,9 +908,7 @@ source "arch/arm/mach-s5p6440/Kconfig"
 
 source "arch/arm/mach-s5p6442/Kconfig"
 
-if ARCH_S5PC1XX
 source "arch/arm/mach-s5pc100/Kconfig"
-endif
 
 source "arch/arm/mach-s5pv210/Kconfig"
 
arch/arm/Makefile +1 -2
index 9505a70..f7cb6d4 100644
@@ -167,7 +167,7 @@ machine-$(CONFIG_ARCH_S3C24A0)		:= s3c24a0
 machine-$(CONFIG_ARCH_S3C64XX)		:= s3c64xx
 machine-$(CONFIG_ARCH_S5P6440)		:= s5p6440
 machine-$(CONFIG_ARCH_S5P6442)		:= s5p6442
-machine-$(CONFIG_ARCH_S5PC1XX)		:= s5pc100
+machine-$(CONFIG_ARCH_S5PC100)		:= s5pc100
 machine-$(CONFIG_ARCH_S5PV210)		:= s5pv210
 machine-$(CONFIG_ARCH_SA1100)		:= sa1100
 machine-$(CONFIG_ARCH_SHARK)		:= shark
@@ -192,7 +192,6 @@ plat-$(CONFIG_PLAT_NOMADIK)	:= nomadik
 plat-$(CONFIG_PLAT_ORION)	:= orion
 plat-$(CONFIG_PLAT_PXA)		:= pxa
 plat-$(CONFIG_PLAT_S3C24XX)	:= s3c24xx samsung
-plat-$(CONFIG_PLAT_S5PC1XX)	:= s5pc1xx samsung
 plat-$(CONFIG_PLAT_S5P)		:= s5p samsung
 
 ifeq ($(CONFIG_ARCH_EBSA110),y)
arch/arm/mach-s5pc100/Kconfig +5 -2
index 70b57d1..fe1216b 100644
@@ -5,10 +5,11 @@
 
 # Configuration options for the S5PC100 CPU
 
+if ARCH_S5PC100
+
 config CPU_S5PC100
 	bool
-	select CPU_S5PC100_INIT
-	select CPU_S5PC100_CLOCK
+	select PLAT_S5P
 	help
 	  Enable S5PC100 CPU support
 
@@ -46,3 +47,5 @@ config MACH_SMDKC100
 	select S5PC100_SETUP_SDHCI
 	help
 	  Machine support for the Samsung SMDKC100
+
+endif
arch/arm/mach-s5pc100/Makefile +2 -1
index 9a545ca..9b52d2a 100644
@@ -11,7 +11,7 @@ obj-				:=
 
 # Core support for S5PC100 system
 
-obj-$(CONFIG_CPU_S5PC100)	+= cpu.o gpiolib.o
+obj-$(CONFIG_CPU_S5PC100)	+= cpu.o init.o clock.o gpiolib.o
 obj-$(CONFIG_CPU_S5PC100)	+= setup-i2c0.o
 
 # Helper and device support
@@ -22,4 +22,5 @@ obj-$(CONFIG_S5PC100_SETUP_SDHCI)	+= setup-sdhci.o
 obj-$(CONFIG_S5PC100_SETUP_SDHCI_GPIO)	+= setup-sdhci-gpio.o
 
 # machine support
+
 obj-$(CONFIG_MACH_SMDKC100)	+= mach-smdkc100.o
arch/arm/mach-s5pc100/cpu.c +32 -24

110 lines not on this page · raw message

arch/arm/mach-s5pc100/gpiolib.c +12 -12
index c8e8336..494a53b 100644
@@ -1,10 +1,10 @@
 /*
- * arch/arm/plat-s5pc1xx/gpiolib.c
+ * arch/arm/plat-s5pc100/gpiolib.c
  *
  *  Copyright 2009 Samsung Electronics Co
  *  Kyungmin Park <[email protected]>
  *
- * S5PC1XX - GPIOlib support
+ * S5PC100 - GPIOlib support
  *
  * 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
@@ -62,12 +62,12 @@
  */
 
 #if 0
-static int s5pc1xx_gpiolib_to_irq(struct gpio_chip *chip, unsigned int offset)
+static int s5pc100_gpiolib_to_irq(struct gpio_chip *chip, unsigned int offset)
 {
 	return S3C_IRQ_GPIO(chip->base + offset);
 }
 
-static int s5pc1xx_gpiolib_to_eint(struct gpio_chip *chip, unsigned int offset)
+static int s5pc100_gpiolib_to_eint(struct gpio_chip *chip, unsigned int offset)
 {
 	int base;
 
@@ -382,8 +382,8 @@ static struct s3c_gpio_chip s5pc100_gpio_chips[] = {
 };
 
 /* FIXME move from irq-gpio.c */
-extern struct irq_chip s5pc1xx_gpioint;
-extern void s5pc1xx_irq_gpioint_handler(unsigned int irq, struct irq_desc *desc);
+extern struct irq_chip s5pc100_gpioint;
+extern void s5pc100_irq_gpioint_handler(unsigned int irq, struct irq_desc *desc);
 
 static __init void s5pc100_gpiolib_link(struct s3c_gpio_chip *chip)
 {
@@ -392,21 +392,21 @@ static __init void s5pc100_gpiolib_link(struct s3c_gpio_chip *chip)
 	if (chip->config == &gpio_cfg) {
 		int i, irq;
 
-		chip->chip.to_irq = s5pc1xx_gpiolib_to_irq;
+		chip->chip.to_irq = s5pc100_gpiolib_to_irq;
 
 		for (i = 0;  i < chip->chip.ngpio; i++) {
 			irq = S3C_IRQ_GPIO_BASE + chip->chip.base + i;
-			set_irq_chip(irq, &s5pc1xx_gpioint);
+			set_irq_chip(irq, &s5pc100_gpioint);
 			set_irq_data(irq, &chip->chip);
 			set_irq_handler(irq, handle_level_irq);
 			set_irq_flags(irq, IRQF_VALID);
 		}
 	} else if (chip->config == &gpio_cfg_eint)
-		chip->chip.to_irq = s5pc1xx_gpiolib_to_eint;
+		chip->chip.to_irq = s5pc100_gpiolib_to_eint;
 #endif
 }
 
-static __init int s5pc1xx_gpiolib_init(void)
+static __init int s5pc100_gpiolib_init(void)
 {
 	struct s3c_gpio_chip *chip;
 	int nr_chips;
@@ -421,8 +421,8 @@ static __init int s5pc1xx_gpiolib_init(void)
 				       ARRAY_SIZE(s5pc100_gpio_chips));
 #if 0
 	/* Interrupt */
-	set_irq_chained_handler(IRQ_GPIOINT, s5pc1xx_irq_gpioint_handler);
+	set_irq_chained_handler(IRQ_GPIOINT, s5pc100_irq_gpioint_handler);
 #endif
 	return 0;
 }
-core_initcall(s5pc1xx_gpiolib_init);
+core_initcall(s5pc100_gpiolib_init);
arch/arm/mach-s5pc100/include/mach/debug-macro.S +4 -2
index e181f57..70e02e9 100644
@@ -22,12 +22,14 @@
 	 * aligned and add in the offset when we load the value here.
 	 */
 
-	.macro addruart, rx, tmp
+	.macro addruart, rx, rtmp
 		mrc	p15, 0, \rx, c1, c0
 		tst	\rx, #1
 		ldreq	\rx, = S3C_PA_UART
-		ldrne	\rx, = (S3C_VA_UART + S3C_PA_UART & 0xfffff)
+		ldrne	\rx, = S3C_VA_UART
+#if CONFIG_DEBUG_S3C_UART != 0
 		add	\rx, \rx, #(0x400 * CONFIG_DEBUG_S3C_UART)
+#endif
 	.endm
 
 /* include the reset of the code which will do the work, we're only
arch/arm/mach-s5pc100/include/mach/entry-macro.S +4 -4
index 6713193..ba76af0 100644
@@ -20,7 +20,7 @@
 	.endm
 
 	.macro	get_irqnr_preamble, base, tmp
-	ldr	\base, =S3C_VA_VIC0
+	ldr	\base, =VA_VIC0
 	.endm
 
 	.macro	arch_ret_to_user, tmp1, tmp2
@@ -29,18 +29,18 @@
 	.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
 
 	@ check the vic0
-	mov	\irqnr, # S3C_IRQ_OFFSET + 31
+	mov	\irqnr, # S5P_IRQ_OFFSET + 31
 	ldr	\irqstat, [ \base, # VIC_IRQ_STATUS ]
 	teq	\irqstat, #0
 
 	@ otherwise try vic1
-	addeq	\tmp, \base, #(S3C_VA_VIC1 - S3C_VA_VIC0)
+	addeq	\tmp, \base, #(VA_VIC1 - VA_VIC0)
 	addeq	\irqnr, \irqnr, #32
 	ldreq	\irqstat, [ \tmp, # VIC_IRQ_STATUS ]
 	teqeq	\irqstat, #0
 
 	@ otherwise try vic2
-	addeq	\tmp, \base, #(S3C_VA_VIC2 - S3C_VA_VIC0)
+	addeq	\tmp, \base, #(VA_VIC2 - VA_VIC0)
 	addeq	\irqnr, \irqnr, #32
 	ldreq	\irqstat, [ \tmp, # VIC_IRQ_STATUS ]
 	teqeq	\irqstat, #0
arch/arm/mach-s5pc100/include/mach/irqs.h +99 -2

108 lines not on this page · raw message

arch/arm/mach-s5pc100/include/mach/map.h +39 -117

183 lines not on this page · raw message

arch/arm/mach-s5pc100/include/mach/regs-clock.h +6 -0
index f2283bd..5d27d28 100644
@@ -17,6 +17,8 @@
 
 #define S5P_CLKREG(x)		(S3C_VA_SYS + (x))
 
+#define S5PC100_REG_OTHERS(x)	(S5PC100_VA_OTHERS + (x))
+
 #define S5P_APLL_LOCK		S5P_CLKREG(0x00)
 #define S5P_MPLL_LOCK		S5P_CLKREG(0x04)
 #define S5P_EPLL_LOCK		S5P_CLKREG(0x08)
@@ -68,4 +70,8 @@
 #define S5P_CLKDIV1_PCLKD1_MASK		(0x7<<16)
 #define S5P_CLKDIV1_PCLKD1_SHIFT	(16)
 
+#define S5PC100_SWRESET		S5PC100_REG_OTHERS(0x000)
+
+#define S5PC100_SWRESET_RESETVAL	0xc100
+
 #endif /* __ASM_ARCH_REGS_CLOCK_H */
arch/arm/mach-s5pc100/include/mach/regs-gpio.h +3 -3
index 6866691..cd6200a 100644
@@ -1,4 +1,4 @@
-/* linux/arch/arm/plat-s5pc1xx/include/plat/regs-gpio.h
+/* linux/arch/arm/plat-s5pc100/include/plat/regs-gpio.h
  *
  * Copyright 2009 Samsung Electronics Co.
  *      Byungho Min <[email protected]>
@@ -12,7 +12,7 @@
 #include <mach/map.h>
 
 /* S5PC100 */
-#define S5PC100_GPIO_BASE	S5PC1XX_VA_GPIO
+#define S5PC100_GPIO_BASE	S5P_VA_GPIO
 #define S5PC100_GPA0_BASE	(S5PC100_GPIO_BASE + 0x0000)
 #define S5PC100_GPA1_BASE	(S5PC100_GPIO_BASE + 0x0020)
 #define S5PC100_GPB_BASE	(S5PC100_GPIO_BASE + 0x0040)
@@ -60,7 +60,7 @@
 
 /* Common part */
 /* External interrupt base is same at both s5pc100 and s5pc110 */
-#define S5PC1XX_EINT_BASE	(S5PC100_EINT_BASE)
+#define S5P_EINT_BASE			(S5PC100_EINT_BASE)
 
 #define S5PC100_GPx_INPUT(__gpio)	(0x0 << ((__gpio) * 4))
 #define S5PC100_GPx_OUTPUT(__gpio)	(0x1 << ((__gpio) * 4))
arch/arm/mach-s5pc100/include/mach/regs-irq.h +1 -6
index 751ac15..4d9036d 100644
@@ -3,7 +3,7 @@
  * Copyright 2009 Samsung Electronics Co.
  *	Byungho Min <[email protected]>
  *
- * S5PC1XX - IRQ register definitions
+ * S5PC100 - IRQ register definitions
  *
  * 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
@@ -16,9 +16,4 @@
 #include <mach/map.h>
 #include <asm/hardware/vic.h>
 
-/* interrupt controller */
-#define S5PC1XX_VIC0REG(x)          		((x) + S5PC1XX_VA_VIC(0))
-#define S5PC1XX_VIC1REG(x)          		((x) + S5PC1XX_VA_VIC(1))
-#define S5PC1XX_VIC2REG(x)         		((x) + S5PC1XX_VA_VIC(2))
-
 #endif /* __ASM_ARCH_REGS_IRQ_H */
arch/arm/mach-s5pc100/include/mach/system.h +3 -6
index f0d31a2..681f626 100644
@@ -3,7 +3,7 @@
  * Copyright 2009 Samsung Electronics Co.
  *      Byungho Min <[email protected]>
  *
- * S5PC1XX - system implementation
+ * S5PC100 - system implementation
  *
  * Based on mach-s3c6400/include/mach/system.h
  */
@@ -13,14 +13,11 @@
 
 #include <linux/io.h>
 #include <mach/map.h>
-#include <plat/regs-clock.h>
-
-void (*s5pc1xx_idle)(void);
+#include <mach/regs-clock.h>
 
 static void arch_idle(void)
 {
-	if (s5pc1xx_idle)
-		s5pc1xx_idle();
+	/* nothing here yet */
 }
 
 static void arch_reset(char mode, const char *cmd)
arch/arm/mach-s5pc100/include/mach/tick.h +2 -2
index f338c9e..20f6873 100644
@@ -20,8 +20,8 @@
  */
 static inline u32 s3c24xx_ostimer_pending(void)
 {
-	u32 pend = __raw_readl(S3C_VA_VIC0 + VIC_RAW_STATUS);
-	return pend & 1 << (IRQ_TIMER4_VIC - S5PC1XX_IRQ_VIC0(0));
+	u32 pend = __raw_readl(VA_VIC0 + VIC_RAW_STATUS);
+	return pend & (1 << (IRQ_TIMER4_VIC - S5P_IRQ_VIC0(0)));
 }
 
 #define TICK_MAX	(0xffffffff)
arch/arm/mach-s5pc100/init.c renamed from arch/arm/plat-s5pc1xx/s5pc100-init.c +2 -5
similarity index 68%
rename from arch/arm/plat-s5pc1xx/s5pc100-init.c
rename to arch/arm/mach-s5pc100/init.c
index c587108..19d7b52 100644
@@ -1,9 +1,8 @@
-/* linux/arch/arm/plat-s5pc1xx/s5pc100-init.c
+/* linux/arch/arm/plat-s5pc100/s5pc100-init.c
  *
  * Copyright 2009 Samsung Electronics Co.
  *      Byungho Min <[email protected]>
  *
- * S5PC100 - CPU initialisation (common with other S5PC1XX chips)
  *
  * 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
@@ -19,9 +18,7 @@
 #include <plat/s5pc100.h>
 
 /* uart registration process */
-
 void __init s5pc100_common_init_uarts(struct s3c2410_uartcfg *cfg, int no)
 {
-	/* The driver name is s3c6400-uart to reuse s3c6400_serial_drv  */
-	s3c24xx_init_uartdevs("s3c6400-uart", s5pc1xx_uart_resources, cfg, no);
+	s3c24xx_init_uartdevs("s3c6400-uart", s5p_uart_resources, cfg, no);
 }
arch/arm/mach-s5pc100/mach-smdkc100.c +4 -7
index b6f8a58..a95d8f7 100644
@@ -149,8 +149,6 @@ static struct s3c_fb_platdata smdkc100_lcd_pdata __initdata = {
 	.setup_gpio	= s5pc100_fb_gpio_setup_24bpp,
 };
 
-static struct map_desc smdkc100_iodesc[] = {};
-
 static struct platform_device *smdkc100_devices[] __initdata = {
 	&s3c_device_i2c0,
 	&s3c_device_i2c1,
@@ -163,7 +161,7 @@ static struct platform_device *smdkc100_devices[] __initdata = {
 
 static void __init smdkc100_map_io(void)
 {
-	s5pc1xx_init_io(smdkc100_iodesc, ARRAY_SIZE(smdkc100_iodesc));
+	s5p_init_io(NULL, 0, S5P_VA_CHIPID);
 	s3c24xx_init_clocks(12000000);
 	s3c24xx_init_uarts(smdkc100_uartcfgs, ARRAY_SIZE(smdkc100_uartcfgs));
 }
@@ -187,10 +185,9 @@ static void __init smdkc100_machine_init(void)
 
 MACHINE_START(SMDKC100, "SMDKC100")
 	/* Maintainer: Byungho Min <[email protected]> */
-	.phys_io	= S5PC100_PA_UART & 0xfff00000,
-	.io_pg_offst	= (((u32)S5PC1XX_VA_UART) >> 18) & 0xfffc,
-	.boot_params	= S5PC100_PA_SDRAM + 0x100,
-
+	.phys_io	= S3C_PA_UART & 0xfff00000,
+	.io_pg_offst	= (((u32)S3C_VA_UART) >> 18) & 0xfffc,
+	.boot_params	= S5P_PA_SDRAM + 0x100,
 	.init_irq	= s5pc100_init_irq,
 	.map_io		= smdkc100_map_io,
 	.init_machine	= smdkc100_machine_init,
arch/arm/plat-s5p/Kconfig +1 -1
index c236113..5cb2dd1 100644
@@ -7,7 +7,7 @@
 
 config PLAT_S5P
 	bool
-	depends on (ARCH_S5P6440 || ARCH_S5P6442 || ARCH_S5PV210)
+	depends on (ARCH_S5P6440 || ARCH_S5P6442 || ARCH_S5PC100 || ARCH_S5PV210)
 	default y
 	select ARM_VIC
 	select NO_IOPORT
arch/arm/plat-s5p/cpu.c +10 -0
index f92e5de..75cb8c3 100644
@@ -19,12 +19,14 @@
 #include <plat/cpu.h>
 #include <plat/s5p6440.h>
 #include <plat/s5p6442.h>
+#include <plat/s5pc100.h>
 #include <plat/s5pv210.h>
 
 /* table of supported CPUs */
 
 static const char name_s5p6440[] = "S5P6440";
 static const char name_s5p6442[] = "S5P6442";
+static const char name_s5pc100[] = "S5PC100";
 static const char name_s5pv210[] = "S5PV210/S5PC110";
 
 static struct cpu_table cpu_ids[] __initdata = {
@@ -45,6 +47,14 @@ static struct cpu_table cpu_ids[] __initdata = {
 		.init		= s5p6442_init,
 		.name		= name_s5p6442,
 	}, {
+		.idcode		= 0x43100000,
+		.idmask		= 0xfffff000,
+		.map_io		= s5pc100_map_io,
+		.init_clocks	= s5pc100_init_clocks,
+		.init_uarts	= s5pc100_init_uarts,
+		.init		= s5pc100_init,
+		.name		= name_s5pc100,
+	}, {
 		.idcode		= 0x43110000,
 		.idmask		= 0xfffff000,
 		.map_io		= s5pv210_map_io,
arch/arm/plat-s5p/include/plat/s5pc100.h new file +33 -0
new file mode 100644
index 0000000..5f6099d
@@ -0,0 +1,33 @@
+/* arch/arm/plat-s5p/include/plat/s5pc100.h
+ *
+ * Copyright (c) 2010 Samsung Electronics Co., Ltd.
+ *		http://www.samsung.com/
+ *
+ * Header file for s5pc100 cpu support
+ *
+ * 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.
+*/
+
+/* Common init code for S5PC100 related SoCs */
+
+extern void s5pc100_common_init_uarts(struct s3c2410_uartcfg *cfg, int no);
+extern void s5pc100_register_clocks(void);
+extern void s5pc100_setup_clocks(void);
+
+#ifdef CONFIG_CPU_S5PC100
+
+extern  int s5pc100_init(void);
+extern void s5pc100_init_irq(void);
+extern void s5pc100_map_io(void);
+extern void s5pc100_init_clocks(int xtal);
+
+#define s5pc100_init_uarts s5pc100_common_init_uarts
+
+#else
+#define s5pc100_init_clocks NULL
+#define s5pc100_init_uarts NULL
+#define s5pc100_map_io NULL
+#define s5pc100_init NULL
+#endif
arch/arm/plat-samsung/Kconfig +1 -1
index 6ccfd60..2b1b938 100644
@@ -6,7 +6,7 @@
 
 config PLAT_SAMSUNG
 	bool
-	depends on ARCH_S3C2410 || ARCH_S3C24A0 || ARCH_S3C64XX || ARCH_S5PC1XX
+	depends on ARCH_S3C2410 || ARCH_S3C24A0 || ARCH_S3C64XX
 	select NO_IOPORT
 	default y
 	help
Signature · 1 line
1.6.4
#9 lore raw

PATCH 9/11 ARM: S5PC100: Add support for gpio interrupt

In reply to Marek Szyprowski

This patch moves support for gpio interrupts from plat-s5pc1xx to mach-s5pc100 directory.

---
 arch/arm/mach-s5pc100/Makefile                     |    2 +-
 arch/arm/mach-s5pc100/gpiolib.c                    |    9 +-
 arch/arm/{plat-s5pc1xx => mach-s5pc100}/irq-gpio.c |   78 ++++++++++----------
 3 files changed, 44 insertions(+), 45 deletions(-)
 rename arch/arm/{plat-s5pc1xx => mach-s5pc100}/irq-gpio.c (72%)
arch/arm/mach-s5pc100/Makefile +1 -1
index 9b52d2a..6e3f57c 100644
@@ -11,7 +11,7 @@ obj-				:=
 
 # Core support for S5PC100 system
 
-obj-$(CONFIG_CPU_S5PC100)	+= cpu.o init.o clock.o gpiolib.o
+obj-$(CONFIG_CPU_S5PC100)	+= cpu.o init.o clock.o gpiolib.o irq-gpio.o
 obj-$(CONFIG_CPU_S5PC100)	+= setup-i2c0.o
 
 # Helper and device support
arch/arm/mach-s5pc100/gpiolib.c +4 -5
index 494a53b..88dd913 100644
@@ -387,7 +387,6 @@ extern void s5pc100_irq_gpioint_handler(unsigned int irq, struct irq_desc *desc)
 
 static __init void s5pc100_gpiolib_link(struct s3c_gpio_chip *chip)
 {
-#if 0
 	/* Interrupt */
 	if (chip->config == &gpio_cfg) {
 		int i, irq;
@@ -401,9 +400,9 @@ static __init void s5pc100_gpiolib_link(struct s3c_gpio_chip *chip)
 			set_irq_handler(irq, handle_level_irq);
 			set_irq_flags(irq, IRQF_VALID);
 		}
-	} else if (chip->config == &gpio_cfg_eint)
+	} else if (chip->config == &gpio_cfg_eint) {
 		chip->chip.to_irq = s5pc100_gpiolib_to_eint;
-#endif
+	}
 }
 
 static __init int s5pc100_gpiolib_init(void)
@@ -419,10 +418,10 @@ static __init int s5pc100_gpiolib_init(void)
 
 	samsung_gpiolib_add_4bit_chips(s5pc100_gpio_chips,
 				       ARRAY_SIZE(s5pc100_gpio_chips));
-#if 0
+
 	/* Interrupt */
 	set_irq_chained_handler(IRQ_GPIOINT, s5pc100_irq_gpioint_handler);
-#endif
+
 	return 0;
 }
 core_initcall(s5pc100_gpiolib_init);
arch/arm/mach-s5pc100/irq-gpio.c renamed from arch/arm/plat-s5pc1xx/irq-gpio.c +39 -39

177 lines not on this page · raw message

Signature · 1 line
1.6.4
#10 lore raw

PATCH 10/11 ARM: S5PC100: use common plat-s5p external interrupt code

In reply to Marek Szyprowski
---
 arch/arm/mach-s5pc100/Kconfig                  |    1 +
 arch/arm/mach-s5pc100/gpiolib.c                |    3 +-
 arch/arm/mach-s5pc100/include/mach/irqs.h      |   15 ++++++++--
 arch/arm/mach-s5pc100/include/mach/regs-gpio.h |   36 ++++++++++++++---------
 4 files changed, 36 insertions(+), 19 deletions(-)
arch/arm/mach-s5pc100/Kconfig +1 -0
index fe1216b..2eb9497 100644
@@ -10,6 +10,7 @@ if ARCH_S5PC100
 config CPU_S5PC100
 	bool
 	select PLAT_S5P
+	select S5P_EXT_INT
 	help
 	  Enable S5PC100 CPU support
 
arch/arm/mach-s5pc100/gpiolib.c +1 -2
index 88dd913..0fab7f2 100644
@@ -61,7 +61,6 @@
  * L3	8	4Bit	None
  */
 
-#if 0
 static int s5pc100_gpiolib_to_irq(struct gpio_chip *chip, unsigned int offset)
 {
 	return S3C_IRQ_GPIO(chip->base + offset);
@@ -85,7 +84,7 @@ static int s5pc100_gpiolib_to_eint(struct gpio_chip *chip, unsigned int offset)
 		return IRQ_EINT(24 + offset);
 	return -EINVAL;
 }
-#endif
+
 static struct s3c_gpio_cfg gpio_cfg = {
 	.set_config	= s3c_gpio_setcfg_s3c64xx_4bit,
 	.set_pull	= s3c_gpio_setpull_updown,
arch/arm/mach-s5pc100/include/mach/irqs.h +12 -3
index 84c74ac..f26c4d9 100644
@@ -97,10 +97,19 @@
 #define IRQ_SDMFIQ		S5P_IRQ_VIC2(31)
 #define IRQ_VIC_END		S5P_IRQ_VIC2(31)
 
-#define S5P_IRQ_EINT_BASE	(IRQ_VIC_END + 1)
+#define S5P_EINT_16_31_BASE	(IRQ_VIC_END + 1)
 
-#define IRQ_EINT(x)             ((x) < 16 ? S5P_IRQ_VIC0(x) : \
-					(S5P_IRQ_EINT_BASE + (x)-16))
+#define S3C_IRQ_EINT_BASE	(IRQ_VIC_END + 1)
+
+#define EINT_MODE		S3C_GPIO_SFN(0x2)
+
+#define IRQ_EINT(x)		((x) < 16 ? ((x) + S5P_IRQ_VIC0(0)) \
+					: ((x) + S5P_EINT_16_31_BASE))
+
+#define EINT_GPIO_0(x)		S5PC100_GPH0(x)
+#define EINT_GPIO_1(x)		S5PC100_GPH1(x)
+#define EINT_GPIO_2(x)		S5PC100_GPH2(x)
+#define EINT_GPIO_3(x)		S5PC100_GPH3(x)
 
 #define S3C_IRQ_GPIO_BASE	(IRQ_EINT(31) + 1)
 #define S3C_IRQ_GPIO(x)		(S3C_IRQ_GPIO_BASE + (x))
arch/arm/mach-s5pc100/include/mach/regs-gpio.h +22 -14
index cd6200a..57a884f 100644
@@ -47,24 +47,32 @@
 #define S5PC100_GPL2_BASE	(S5PC100_GPIO_BASE + 0x0360)
 #define S5PC100_GPL3_BASE	(S5PC100_GPIO_BASE + 0x0380)
 #define S5PC100_GPL4_BASE	(S5PC100_GPIO_BASE + 0x03A0)
-#define S5PC100_EINT_BASE	(S5PC100_GPIO_BASE + 0x0E00)
 
-#define S5PC100_UHOST		(S5PC100_GPIO_BASE + 0x0B68)
-#define S5PC100_PDNEN		(S5PC100_GPIO_BASE + 0x0F80)
+#define S5PC100_EINT30CON		(S5PC100_GPIO_BASE + 0xE00)
+#define S5P_EINT_CON(x)			(S5PC100_EINT30CON + ((x) * 0x4))
 
-/* PDNEN */
-#define S5PC100_PDNEN_CFG_PDNEN	(1 << 1)
-#define S5PC100_PDNEN_CFG_AUTO	(0 << 1)
-#define S5PC100_PDNEN_POWERDOWN	(1 << 0)
-#define S5PC100_PDNEN_NORMAL	(0 << 0)
+#define S5PC100_EINT30FLTCON0		(S5PC100_GPIO_BASE + 0xE80)
+#define S5P_EINT_FLTCON(x)		(S5PC100_EINT30FLTCON0 + ((x) * 0x4))
 
-/* Common part */
-/* External interrupt base is same@both s5pc100 and s5pc110 */
-#define S5P_EINT_BASE			(S5PC100_EINT_BASE)
+#define S5PC100_EINT30MASK		(S5PC100_GPIO_BASE + 0xF00)
+#define S5P_EINT_MASK(x)		(S5PC100_EINT30MASK + ((x) * 0x4))
 
-#define S5PC100_GPx_INPUT(__gpio)	(0x0 << ((__gpio) * 4))
-#define S5PC100_GPx_OUTPUT(__gpio)	(0x1 << ((__gpio) * 4))
-#define S5PC100_GPx_CONMASK(__gpio)	(0xf << ((__gpio) * 4))
+#define S5PC100_EINT30PEND		(S5PC100_GPIO_BASE + 0xF40)
+#define S5P_EINT_PEND(x)		(S5PC100_EINT30PEND + ((x) * 0x4))
+
+#define eint_offset(irq)	((irq) < IRQ_EINT16_31 ? ((irq) - IRQ_EINT(0)) \
+						: ((irq) - S5P_EINT_16_31_BASE))
+
+#define EINT_REG_NR(x)			(eint_offset(x) >> 3)
+
+#define eint_irq_to_bit(irq)		(1 << (eint_offset(irq) & 0x7))
+
+/* values for S5P_EXTINT0 */
+#define S5P_EXTINT_LOWLEV		(0x00)
+#define S5P_EXTINT_HILEV		(0x01)
+#define S5P_EXTINT_FALLEDGE		(0x02)
+#define S5P_EXTINT_RISEEDGE		(0x03)
+#define S5P_EXTINT_BOTHEDGE		(0x04)
 
 #endif /* __ASM_MACH_S5PC100_REGS_GPIO_H */
 
Signature · 1 line
1.6.4
#11 lore raw

PATCH 10/11 ARM: S5PC100: use common plat-s5p external interrupt code

Quoted 46 lines · Marek Szyprowski
---
 arch/arm/mach-s5pc100/Kconfig                  |    1 +
 arch/arm/mach-s5pc100/gpiolib.c                |    3 +-
 arch/arm/mach-s5pc100/include/mach/irqs.h      |   15 ++++++++--
 arch/arm/mach-s5pc100/include/mach/regs-gpio.h |   36 ++++++++++++++---------
 4 files changed, 36 insertions(+), 19 deletions(-)
arch/arm/mach-s5pc100/Kconfig +1 -0
index fe1216b..2eb9497 100644
@@ -10,6 +10,7 @@ if ARCH_S5PC100
 config CPU_S5PC100
 	bool
 	select PLAT_S5P
+	select S5P_EXT_INT
 	help
 	  Enable S5PC100 CPU support
 
arch/arm/mach-s5pc100/gpiolib.c +1 -2
index 88dd913..0fab7f2 100644
@@ -61,7 +61,6 @@
  * L3	8	4Bit	None
  */
 
-#if 0
 static int s5pc100_gpiolib_to_irq(struct gpio_chip *chip, unsigned int offset)
 {
 	return S3C_IRQ_GPIO(chip->base + offset);
@@ -85,7 +84,7 @@ static int s5pc100_gpiolib_to_eint(struct gpio_chip *chip, unsigned int offset)
 		return IRQ_EINT(24 + offset);
 	return -EINVAL;
 }
-#endif
+
 static struct s3c_gpio_cfg gpio_cfg = {
 	.set_config	= s3c_gpio_setcfg_s3c64xx_4bit,
 	.set_pull	= s3c_gpio_setpull_updown,
arch/arm/mach-s5pc100/include/mach/irqs.h +0 -0
index 84c74ac..f26c4d9 100644

arch/arm/mach-s5pc100/include/mach/irqs.h line 102

Quoted 9 lines
arch/arm/mach-s5pc100/include/mach/irqs.h +2 -3
@@ -97,10 +97,19 @@
 #define IRQ_SDMFIQ		S5P_IRQ_VIC2(31)
 #define IRQ_VIC_END		S5P_IRQ_VIC2(31)
 
-#define S5P_IRQ_EINT_BASE	(IRQ_VIC_END + 1)
+#define S5P_EINT_16_31_BASE	(IRQ_VIC_END + 1)
 
-#define IRQ_EINT(x)             ((x) < 16 ? S5P_IRQ_VIC0(x) : \
-					(S5P_IRQ_EINT_BASE + (x)-16))
+#define S3C_IRQ_EINT_BASE	(IRQ_VIC_END + 1)

we seem to have this and S5P_EINT_16_31_BASE? Let's use just the one.

arch/arm/mach-s5pc100/include/mach/irqs.h line 107

Quoted 4 lines
arch/arm/mach-s5pc100/include/mach/irqs.h +4 -0
+#define EINT_MODE		S3C_GPIO_SFN(0x2)
+
+#define IRQ_EINT(x)		((x) < 16 ? ((x) + S5P_IRQ_VIC0(0)) \
+					: ((x) + S5P_EINT_16_31_BASE))

ok, could we put this in arch/arm/plat-s5p/include/plat/irqs.h and just have the per-platform files defining the base?

Quoted 65 lines
arch/arm/mach-s5pc100/include/mach/irqs.h +4 -0
+#define EINT_GPIO_0(x)		S5PC100_GPH0(x)
+#define EINT_GPIO_1(x)		S5PC100_GPH1(x)
+#define EINT_GPIO_2(x)		S5PC100_GPH2(x)
+#define EINT_GPIO_3(x)		S5PC100_GPH3(x)
 
 #define S3C_IRQ_GPIO_BASE	(IRQ_EINT(31) + 1)
 #define S3C_IRQ_GPIO(x)		(S3C_IRQ_GPIO_BASE + (x))
arch/arm/mach-s5pc100/include/mach/regs-gpio.h +22 -14
index cd6200a..57a884f 100644
@@ -47,24 +47,32 @@
 #define S5PC100_GPL2_BASE	(S5PC100_GPIO_BASE + 0x0360)
 #define S5PC100_GPL3_BASE	(S5PC100_GPIO_BASE + 0x0380)
 #define S5PC100_GPL4_BASE	(S5PC100_GPIO_BASE + 0x03A0)
-#define S5PC100_EINT_BASE	(S5PC100_GPIO_BASE + 0x0E00)
 
-#define S5PC100_UHOST		(S5PC100_GPIO_BASE + 0x0B68)
-#define S5PC100_PDNEN		(S5PC100_GPIO_BASE + 0x0F80)
+#define S5PC100_EINT30CON		(S5PC100_GPIO_BASE + 0xE00)
+#define S5P_EINT_CON(x)			(S5PC100_EINT30CON + ((x) * 0x4))
 
-/* PDNEN */
-#define S5PC100_PDNEN_CFG_PDNEN	(1 << 1)
-#define S5PC100_PDNEN_CFG_AUTO	(0 << 1)
-#define S5PC100_PDNEN_POWERDOWN	(1 << 0)
-#define S5PC100_PDNEN_NORMAL	(0 << 0)
+#define S5PC100_EINT30FLTCON0		(S5PC100_GPIO_BASE + 0xE80)
+#define S5P_EINT_FLTCON(x)		(S5PC100_EINT30FLTCON0 + ((x) * 0x4))
 
-/* Common part */
-/* External interrupt base is same at both s5pc100 and s5pc110 */
-#define S5P_EINT_BASE			(S5PC100_EINT_BASE)
+#define S5PC100_EINT30MASK		(S5PC100_GPIO_BASE + 0xF00)
+#define S5P_EINT_MASK(x)		(S5PC100_EINT30MASK + ((x) * 0x4))
 
-#define S5PC100_GPx_INPUT(__gpio)	(0x0 << ((__gpio) * 4))
-#define S5PC100_GPx_OUTPUT(__gpio)	(0x1 << ((__gpio) * 4))
-#define S5PC100_GPx_CONMASK(__gpio)	(0xf << ((__gpio) * 4))
+#define S5PC100_EINT30PEND		(S5PC100_GPIO_BASE + 0xF40)
+#define S5P_EINT_PEND(x)		(S5PC100_EINT30PEND + ((x) * 0x4))
+
+#define eint_offset(irq)	((irq) < IRQ_EINT16_31 ? ((irq) - IRQ_EINT(0)) \
+						: ((irq) - S5P_EINT_16_31_BASE))
+
+#define EINT_REG_NR(x)			(eint_offset(x) >> 3)
+
+#define eint_irq_to_bit(irq)		(1 << (eint_offset(irq) & 0x7))
+
+/* values for S5P_EXTINT0 */
+#define S5P_EXTINT_LOWLEV		(0x00)
+#define S5P_EXTINT_HILEV		(0x01)
+#define S5P_EXTINT_FALLEDGE		(0x02)
+#define S5P_EXTINT_RISEEDGE		(0x03)
+#define S5P_EXTINT_BOTHEDGE		(0x04)
 
 #endif /* __ASM_MACH_S5PC100_REGS_GPIO_H */
 
Signature · 6 lines
1.6.4

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 5 lines
-- 
Ben

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

PATCH 10/11 ARM: S5PC100: use common plat-s5p external interrupt code

Hello,

Quoted 65 lines · Ben Dooks
Quoted 6 lines · Marek Szyprowski
---
 arch/arm/mach-s5pc100/Kconfig                  |    1 +
 arch/arm/mach-s5pc100/gpiolib.c                |    3 +-
 arch/arm/mach-s5pc100/include/mach/irqs.h      |   15 ++++++++--
 arch/arm/mach-s5pc100/include/mach/regs-gpio.h |   36 ++++++++++++++----

-----

arch/arm/mach-

Quoted 3 lines
 4 files changed, 36 insertions(+), 19 deletions(-)
arch/arm/mach- renamed from arch/arm/mach-s5pc100/Kconfig +0 -0

s5pc100/Kconfig

arch/arm/mach-

Quoted 12 lines

index fe1216b..2eb9497 100644

arch/arm/mach-s5pc100/Kconfig +1 -0
@@ -10,6 +10,7 @@ if ARCH_S5PC100
 config CPU_S5PC100
 	bool
 	select PLAT_S5P
+	select S5P_EXT_INT
 	help
 	  Enable S5PC100 CPU support
 
arch/arm/mach- renamed from arch/arm/mach-s5pc100/gpiolib.c +0 -0

s5pc100/gpiolib.c

arch/arm/mach-s5pc100/gpiolib.c line 64

Quoted 9 lines

index 88dd913..0fab7f2 100644

arch/arm/mach-s5pc100/gpiolib.c +0 -1
@@ -61,7 +61,6 @@
  * L3	8	4Bit	None
  */
 
-#if 0
 static int s5pc100_gpiolib_to_irq(struct gpio_chip *chip, unsigned int

offset)

arch/arm/mach-s5pc100/gpiolib.c static int s5pc100_gpiolib_to_eint(struct gpio_chip

Quoted 3 lines
arch/arm/mach-s5pc100/gpiolib.c +0 -0
 {
 	return S3C_IRQ_GPIO(chip->base + offset);
@@ -85,7 +84,7 @@ static int s5pc100_gpiolib_to_eint(struct gpio_chip

*chip, unsigned int offset)

arch/arm/mach-

Quoted 9 lines
arch/arm/mach-s5pc100/gpiolib.c +1 -1
 		return IRQ_EINT(24 + offset);
 	return -EINVAL;
 }
-#endif
+
 static struct s3c_gpio_cfg gpio_cfg = {
 	.set_config	= s3c_gpio_setcfg_s3c64xx_4bit,
 	.set_pull	= s3c_gpio_setpull_updown,
arch/arm/mach- renamed from arch/arm/mach-s5pc100/include/mach/irqs.h +0 -0

s5pc100/include/mach/irqs.h

arch/arm/mach-s5pc100/include/mach/irqs.h line 102

Quoted 13 lines

index 84c74ac..f26c4d9 100644

arch/arm/mach-s5pc100/include/mach/irqs.h +2 -3
@@ -97,10 +97,19 @@
 #define IRQ_SDMFIQ		S5P_IRQ_VIC2(31)
 #define IRQ_VIC_END		S5P_IRQ_VIC2(31)
 
-#define S5P_IRQ_EINT_BASE	(IRQ_VIC_END + 1)
+#define S5P_EINT_16_31_BASE	(IRQ_VIC_END + 1)
 
-#define IRQ_EINT(x)             ((x) < 16 ? S5P_IRQ_VIC0(x) : \
-					(S5P_IRQ_EINT_BASE + (x)-16))
+#define S3C_IRQ_EINT_BASE	(IRQ_VIC_END + 1)

we seem to have this and S5P_EINT_16_31_BASE? Let's use just the one.

Quoted 7 lines

arch/arm/mach-s5pc100/include/mach/irqs.h line 107

Quoted 4 lines
arch/arm/mach-s5pc100/include/mach/irqs.h +4 -0
+#define EINT_MODE		S3C_GPIO_SFN(0x2)
+
+#define IRQ_EINT(x)		((x) < 16 ? ((x) + S5P_IRQ_VIC0(0)) \
+					: ((x) + S5P_EINT_16_31_BASE))

ok, could we put this in arch/arm/plat-s5p/include/plat/irqs.h and just have the per-platform files defining the base?

I'm not sure if this is a good idea. Although this code works for s5pc100 and s5pv210, there might be problems with s5p6440, which has external interrupts designed like s3c6410. But I'm not sure if this would cause the problems. If so then we can always just move it from plat/irqs.h to mach/irqs.h again.

Quoted 8 lines

arch/arm/mach-s5pc100/include/mach/irqs.h line 115

Quoted 8 lines
arch/arm/mach-s5pc100/include/mach/irqs.h +4 -0
+#define EINT_GPIO_0(x)		S5PC100_GPH0(x)
+#define EINT_GPIO_1(x)		S5PC100_GPH1(x)
+#define EINT_GPIO_2(x)		S5PC100_GPH2(x)
+#define EINT_GPIO_3(x)		S5PC100_GPH3(x)
 
 #define S3C_IRQ_GPIO_BASE	(IRQ_EINT(31) + 1)
 #define S3C_IRQ_GPIO(x)		(S3C_IRQ_GPIO_BASE + (x))

What about moving these to mach/gpio.h? IMHO mach/irqs.h is not the best place for them.

Quoted 1 line

...

Best regards
--
Marek Szyprowski
Samsung Poland R&D Center

#13 lore raw

PATCH 10/11 ARM: S5PC100: use common plat-s5p external interrupt code

Quoted 77 lines · Marek Szyprowski

Hello,

Quoted 65 lines · Ben Dooks
Quoted 6 lines · Marek Szyprowski
---
 arch/arm/mach-s5pc100/Kconfig                  |    1 +
 arch/arm/mach-s5pc100/gpiolib.c                |    3 +-
 arch/arm/mach-s5pc100/include/mach/irqs.h      |   15 ++++++++--
 arch/arm/mach-s5pc100/include/mach/regs-gpio.h |   36 ++++++++++++++----

-----

arch/arm/mach-

Quoted 3 lines
 4 files changed, 36 insertions(+), 19 deletions(-)
arch/arm/mach- renamed from arch/arm/mach-s5pc100/Kconfig +0 -0

s5pc100/Kconfig

arch/arm/mach-

Quoted 12 lines

index fe1216b..2eb9497 100644

arch/arm/mach-s5pc100/Kconfig +1 -0
@@ -10,6 +10,7 @@ if ARCH_S5PC100
 config CPU_S5PC100
 	bool
 	select PLAT_S5P
+	select S5P_EXT_INT
 	help
 	  Enable S5PC100 CPU support
 
arch/arm/mach- renamed from arch/arm/mach-s5pc100/gpiolib.c +0 -0

s5pc100/gpiolib.c

arch/arm/mach-s5pc100/gpiolib.c line 64

Quoted 9 lines

index 88dd913..0fab7f2 100644

arch/arm/mach-s5pc100/gpiolib.c +0 -1
@@ -61,7 +61,6 @@
  * L3	8	4Bit	None
  */
 
-#if 0
 static int s5pc100_gpiolib_to_irq(struct gpio_chip *chip, unsigned int

offset)

arch/arm/mach-s5pc100/gpiolib.c static int s5pc100_gpiolib_to_eint(struct gpio_chip

Quoted 3 lines
arch/arm/mach-s5pc100/gpiolib.c +0 -0
 {
 	return S3C_IRQ_GPIO(chip->base + offset);
@@ -85,7 +84,7 @@ static int s5pc100_gpiolib_to_eint(struct gpio_chip

*chip, unsigned int offset)

arch/arm/mach-

Quoted 9 lines
arch/arm/mach-s5pc100/gpiolib.c +1 -1
 		return IRQ_EINT(24 + offset);
 	return -EINVAL;
 }
-#endif
+
 static struct s3c_gpio_cfg gpio_cfg = {
 	.set_config	= s3c_gpio_setcfg_s3c64xx_4bit,
 	.set_pull	= s3c_gpio_setpull_updown,
arch/arm/mach- renamed from arch/arm/mach-s5pc100/include/mach/irqs.h +0 -0

s5pc100/include/mach/irqs.h

arch/arm/mach-s5pc100/include/mach/irqs.h line 102

Quoted 13 lines

index 84c74ac..f26c4d9 100644

arch/arm/mach-s5pc100/include/mach/irqs.h +2 -3
@@ -97,10 +97,19 @@
 #define IRQ_SDMFIQ		S5P_IRQ_VIC2(31)
 #define IRQ_VIC_END		S5P_IRQ_VIC2(31)
 
-#define S5P_IRQ_EINT_BASE	(IRQ_VIC_END + 1)
+#define S5P_EINT_16_31_BASE	(IRQ_VIC_END + 1)
 
-#define IRQ_EINT(x)             ((x) < 16 ? S5P_IRQ_VIC0(x) : \
-					(S5P_IRQ_EINT_BASE + (x)-16))
+#define S3C_IRQ_EINT_BASE	(IRQ_VIC_END + 1)

we seem to have this and S5P_EINT_16_31_BASE? Let's use just the one.

Quoted 7 lines

arch/arm/mach-s5pc100/include/mach/irqs.h line 107

Quoted 4 lines
arch/arm/mach-s5pc100/include/mach/irqs.h +4 -0
+#define EINT_MODE		S3C_GPIO_SFN(0x2)
+
+#define IRQ_EINT(x)		((x) < 16 ? ((x) + S5P_IRQ_VIC0(0)) \
+					: ((x) + S5P_EINT_16_31_BASE))

ok, could we put this in arch/arm/plat-s5p/include/plat/irqs.h and just have the per-platform files defining the base?

Quoted 5 lines

I'm not sure if this is a good idea. Although this code works for s5pc100 and s5pv210, there might be problems with s5p6440, which has external interrupts designed like s3c6410. But I'm not sure if this would cause the problems. If so then we can always just move it from plat/irqs.h to mach/irqs.h again.

Hmm, you're right that the s5p6440 is a bit of a problem here... Maybe we should have a common file for these elsewhere.

Quoted 11 lines
Quoted 8 lines

arch/arm/mach-s5pc100/include/mach/irqs.h line 115

Quoted 8 lines
arch/arm/mach-s5pc100/include/mach/irqs.h +4 -0
+#define EINT_GPIO_0(x)		S5PC100_GPH0(x)
+#define EINT_GPIO_1(x)		S5PC100_GPH1(x)
+#define EINT_GPIO_2(x)		S5PC100_GPH2(x)
+#define EINT_GPIO_3(x)		S5PC100_GPH3(x)
 
 #define S3C_IRQ_GPIO_BASE	(IRQ_EINT(31) + 1)
 #define S3C_IRQ_GPIO(x)		(S3C_IRQ_GPIO_BASE + (x))

What about moving these to mach/gpio.h? IMHO mach/irqs.h is not the best place for them.

Hmm, maybe they could go there, since we have to include the gpio numbering to get the S5PC100_GPH3() definitions.

Quoted 12 lines
Quoted 1 line

...

Best regards
--
Marek Szyprowski
Samsung Poland R&D Center

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 5 lines
-- 
Ben

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

PATCH 10/11 ARM: S5PC100: use common plat-s5p external interrupt code

In reply to Marek Szyprowski
Quoted 77 lines · Marek Szyprowski

Hello,

Quoted 65 lines · Ben Dooks
Quoted 6 lines · Marek Szyprowski
---
 arch/arm/mach-s5pc100/Kconfig                  |    1 +
 arch/arm/mach-s5pc100/gpiolib.c                |    3 +-
 arch/arm/mach-s5pc100/include/mach/irqs.h      |   15 ++++++++--
 arch/arm/mach-s5pc100/include/mach/regs-gpio.h |   36 ++++++++++++++----

-----

arch/arm/mach-

Quoted 3 lines
 4 files changed, 36 insertions(+), 19 deletions(-)
arch/arm/mach- renamed from arch/arm/mach-s5pc100/Kconfig +0 -0

s5pc100/Kconfig

arch/arm/mach-

Quoted 12 lines

index fe1216b..2eb9497 100644

arch/arm/mach-s5pc100/Kconfig +1 -0
@@ -10,6 +10,7 @@ if ARCH_S5PC100
 config CPU_S5PC100
 	bool
 	select PLAT_S5P
+	select S5P_EXT_INT
 	help
 	  Enable S5PC100 CPU support
 
arch/arm/mach- renamed from arch/arm/mach-s5pc100/gpiolib.c +0 -0

s5pc100/gpiolib.c

arch/arm/mach-s5pc100/gpiolib.c line 64

Quoted 9 lines

index 88dd913..0fab7f2 100644

arch/arm/mach-s5pc100/gpiolib.c +0 -1
@@ -61,7 +61,6 @@
  * L3	8	4Bit	None
  */
 
-#if 0
 static int s5pc100_gpiolib_to_irq(struct gpio_chip *chip, unsigned int

offset)

arch/arm/mach-s5pc100/gpiolib.c static int s5pc100_gpiolib_to_eint(struct gpio_chip

Quoted 3 lines
arch/arm/mach-s5pc100/gpiolib.c +0 -0
 {
 	return S3C_IRQ_GPIO(chip->base + offset);
@@ -85,7 +84,7 @@ static int s5pc100_gpiolib_to_eint(struct gpio_chip

*chip, unsigned int offset)

arch/arm/mach-

Quoted 9 lines
arch/arm/mach-s5pc100/gpiolib.c +1 -1
 		return IRQ_EINT(24 + offset);
 	return -EINVAL;
 }
-#endif
+
 static struct s3c_gpio_cfg gpio_cfg = {
 	.set_config	= s3c_gpio_setcfg_s3c64xx_4bit,
 	.set_pull	= s3c_gpio_setpull_updown,
arch/arm/mach- renamed from arch/arm/mach-s5pc100/include/mach/irqs.h +0 -0

s5pc100/include/mach/irqs.h

arch/arm/mach-s5pc100/include/mach/irqs.h line 102

Quoted 13 lines

index 84c74ac..f26c4d9 100644

arch/arm/mach-s5pc100/include/mach/irqs.h +2 -3
@@ -97,10 +97,19 @@
 #define IRQ_SDMFIQ		S5P_IRQ_VIC2(31)
 #define IRQ_VIC_END		S5P_IRQ_VIC2(31)
 
-#define S5P_IRQ_EINT_BASE	(IRQ_VIC_END + 1)
+#define S5P_EINT_16_31_BASE	(IRQ_VIC_END + 1)
 
-#define IRQ_EINT(x)             ((x) < 16 ? S5P_IRQ_VIC0(x) : \
-					(S5P_IRQ_EINT_BASE + (x)-16))
+#define S3C_IRQ_EINT_BASE	(IRQ_VIC_END + 1)

we seem to have this and S5P_EINT_16_31_BASE? Let's use just the one.

Quoted 7 lines

arch/arm/mach-s5pc100/include/mach/irqs.h line 107

Quoted 4 lines
arch/arm/mach-s5pc100/include/mach/irqs.h +4 -0
+#define EINT_MODE		S3C_GPIO_SFN(0x2)
+
+#define IRQ_EINT(x)		((x) < 16 ? ((x) + S5P_IRQ_VIC0(0)) \
+					: ((x) + S5P_EINT_16_31_BASE))

ok, could we put this in arch/arm/plat-s5p/include/plat/irqs.h and just have the per-platform files defining the base?

Quoted 5 lines

I'm not sure if this is a good idea. Although this code works for s5pc100 and s5pv210, there might be problems with s5p6440, which has external interrupts designed like s3c6410. But I'm not sure if this would cause the problems. If so then we can always just move it from plat/irqs.h to mach/irqs.h again.

I've just had a look, and whilst the S5P6440 is similar to the 64XX case, it only has 16 EINTs and the rest are gpio-style ones.

So, we could define S5P_IRQ_EINT_LOW_BASE for all cases and use the S5P_EINT_16_31_BASE for the higher ones and have it all in plat/irqs.h

Quoted 23 lines
Quoted 7 lines

arch/arm/mach-s5pc100/include/mach/irqs.h line 115

Quoted 7 lines
arch/arm/mach-s5pc100/include/mach/irqs.h +4 -0
+#define EINT_GPIO_0(x)		S5PC100_GPH0(x)
+#define EINT_GPIO_1(x)		S5PC100_GPH1(x)
+#define EINT_GPIO_2(x)		S5PC100_GPH2(x)
+#define EINT_GPIO_3(x)		S5PC100_GPH3(x)
 
 #define S3C_IRQ_GPIO_BASE	(IRQ_EINT(31) + 1)
 #define S3C_IRQ_GPIO(x)		(S3C_IRQ_GPIO_BASE + (x))

What about moving these to mach/gpio.h? IMHO mach/irqs.h is not the best place for them.

Quoted 1 line

...

Best regards
--
Marek Szyprowski
Samsung Poland R&D Center

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 5 lines
-- 
Ben

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

PATCH 11/11 ARM: remove obsolete plat-s5pc1xx directory

In reply to Marek Szyprowski

This patch removes all obsolete files from plat-s5pc1xx. This directory is no longer needed. S5PC100 SoC is now completely supported in plat-s5p framework.

---
 arch/arm/plat-s5pc1xx/Kconfig                   |   42 --
 arch/arm/plat-s5pc1xx/Makefile                  |   25 -
 arch/arm/plat-s5pc1xx/clock.c                   |  709 ------------------
 arch/arm/plat-s5pc1xx/cpu.c                     |  122 ----
 arch/arm/plat-s5pc1xx/dev-uart.c                |  145 ----
 arch/arm/plat-s5pc1xx/include/plat/gpio-ext.h   |   44 --
 arch/arm/plat-s5pc1xx/include/plat/irqs.h       |  198 -----
 arch/arm/plat-s5pc1xx/include/plat/pll.h        |   38 -
 arch/arm/plat-s5pc1xx/include/plat/regs-clock.h |  252 -------
 arch/arm/plat-s5pc1xx/include/plat/regs-power.h |   84 ---
 arch/arm/plat-s5pc1xx/include/plat/s5pc100.h    |   64 --
 arch/arm/plat-s5pc1xx/irq-eint.c                |  281 --------
 arch/arm/plat-s5pc1xx/irq.c                     |   75 --
 arch/arm/plat-s5pc1xx/s5pc100-clock.c           |  876 -----------------------
 14 files changed, 0 insertions(+), 2955 deletions(-)
 delete mode 100644 arch/arm/plat-s5pc1xx/Kconfig
 delete mode 100644 arch/arm/plat-s5pc1xx/Makefile
 delete mode 100644 arch/arm/plat-s5pc1xx/clock.c
 delete mode 100644 arch/arm/plat-s5pc1xx/cpu.c
 delete mode 100644 arch/arm/plat-s5pc1xx/dev-uart.c
 delete mode 100644 arch/arm/plat-s5pc1xx/include/plat/gpio-ext.h
 delete mode 100644 arch/arm/plat-s5pc1xx/include/plat/irqs.h
 delete mode 100644 arch/arm/plat-s5pc1xx/include/plat/pll.h
 delete mode 100644 arch/arm/plat-s5pc1xx/include/plat/regs-clock.h
 delete mode 100644 arch/arm/plat-s5pc1xx/include/plat/regs-power.h
 delete mode 100644 arch/arm/plat-s5pc1xx/include/plat/s5pc100.h
 delete mode 100644 arch/arm/plat-s5pc1xx/irq-eint.c
 delete mode 100644 arch/arm/plat-s5pc1xx/irq.c
 delete mode 100644 arch/arm/plat-s5pc1xx/s5pc100-clock.c
arch/arm/plat-s5pc1xx/Kconfig deleted +0 -42
deleted file mode 100644
index ab58758..0000000
@@ -1,42 +0,0 @@
-# Copyright 2009 Samsung Electronics Co.
-#	Byungho Min <[email protected]>
-#
-# Licensed under GPLv2
-
-config PLAT_S5PC1XX
-	bool
-	depends on ARCH_S5PC1XX
-	default y
-	select PLAT_S3C
-	select ARM_VIC
-	select NO_IOPORT
-	select ARCH_REQUIRE_GPIOLIB
-	select SAMSUNG_CLKSRC
-	select SAMSUNG_IRQ_UART
-	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 SAMSUNG_GPIOLIB_4BIT
-	help
-	  Base platform code for any Samsung S5PC1XX device
-
-if PLAT_S5PC1XX
-
-# Configuration options shared by all S3C64XX implementations
-
-config CPU_S5PC100_INIT
-	bool
-	help
-	  Common initialisation code for the S5PC1XX
-
-config CPU_S5PC100_CLOCK
-	bool
-	help
-	  Common clock support code for the S5PC1XX
-
-# platform specific device setup
-
-endif
arch/arm/plat-s5pc1xx/Makefile deleted +0 -25
deleted file mode 100644
index d490543..0000000
@@ -1,25 +0,0 @@
-# arch/arm/plat-s5pc1xx/Makefile
-#
-# Copyright 2009 Samsung Electronics Co.
-#
-# Licensed under GPLv2
-
-obj-y				:=
-obj-m				:=
-obj-n				:= dummy.o
-obj-				:=
-
-# Core files
-
-obj-y				+= dev-uart.o
-obj-y				+= cpu.o
-obj-y				+= irq.o
-obj-y				+= clock.o
-
-# CPU support
-
-obj-$(CONFIG_CPU_S5PC100_INIT)	+= s5pc100-init.o
-obj-$(CONFIG_CPU_S5PC100_CLOCK)	+= s5pc100-clock.o
-
-# Device setup
-
arch/arm/plat-s5pc1xx/clock.c deleted +0 -709

709 lines not on this page · raw message

arch/arm/plat-s5pc1xx/cpu.c deleted +0 -122

122 lines not on this page · raw message

arch/arm/plat-s5pc1xx/dev-uart.c deleted +0 -145

145 lines not on this page · raw message

arch/arm/plat-s5pc1xx/include/plat/gpio-ext.h deleted +0 -44

44 lines not on this page · raw message

arch/arm/plat-s5pc1xx/include/plat/irqs.h deleted +0 -198

198 lines not on this page · raw message

arch/arm/plat-s5pc1xx/include/plat/pll.h deleted +0 -38
deleted file mode 100644
index 21afef1..0000000
@@ -1,38 +0,0 @@
-/* arch/arm/plat-s5pc1xx/include/plat/pll.h
- *
- * Copyright 2009 Samsung Electronics Co.
- *	Byungho Min <[email protected]>
- *
- * S5PC1XX PLL code
- *
- * Based on plat-s3c64xx/include/plat/pll.h
- *
- * 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.
-*/
-
-#define S5P_PLL_MDIV_MASK	((1 << (25-16+1)) - 1)
-#define S5P_PLL_PDIV_MASK	((1 << (13-8+1)) - 1)
-#define S5P_PLL_SDIV_MASK	((1 << (2-0+1)) - 1)
-#define S5P_PLL_MDIV_SHIFT	(16)
-#define S5P_PLL_PDIV_SHIFT	(8)
-#define S5P_PLL_SDIV_SHIFT	(0)
-
-#include <asm/div64.h>
-
-static inline unsigned long s5pc1xx_get_pll(unsigned long baseclk,
-					    u32 pllcon)
-{
-	u32 mdiv, pdiv, sdiv;
-	u64 fvco = baseclk;
-
-	mdiv = (pllcon >> S5P_PLL_MDIV_SHIFT) & S5P_PLL_MDIV_MASK;
-	pdiv = (pllcon >> S5P_PLL_PDIV_SHIFT) & S5P_PLL_PDIV_MASK;
-	sdiv = (pllcon >> S5P_PLL_SDIV_SHIFT) & S5P_PLL_SDIV_MASK;
-
-	fvco *= mdiv;
-	do_div(fvco, (pdiv << sdiv));
-
-	return (unsigned long)fvco;
-}
arch/arm/plat-s5pc1xx/include/plat/regs-clock.h deleted +0 -252

252 lines not on this page · raw message

arch/arm/plat-s5pc1xx/include/plat/regs-power.h deleted +0 -84

84 lines not on this page · raw message

arch/arm/plat-s5pc1xx/include/plat/s5pc100.h deleted +0 -64

64 lines not on this page · raw message

arch/arm/plat-s5pc1xx/irq-eint.c deleted +0 -281

281 lines not on this page · raw message

arch/arm/plat-s5pc1xx/irq.c deleted +0 -75

75 lines not on this page · raw message

arch/arm/plat-s5pc1xx/s5pc100-clock.c deleted +0 -876

876 lines not on this page · raw message

Signature · 1 line
1.6.4
#16 lore raw

In reply to Marek Szyprowski
Quoted 8 lines · Marek Szyprowski

Hello,

This patch series perform a general cleanup in Samsung S5PC100 SoC support. This chip is moved from custom s5pc1xx platform framework to new plat-s5p framework, so more common code can be easily reused in upcomming extensions for S5PV210/S5PC110 SoCs.

Quoted 7 lines

This patch series is prepared against next-samsung tree, with assumption that the "[PATCH v3] ARM: S5PC100: Pre-requisite clock patch for plat-s5pc1xx to plat-s5p" has been applied as well as the '[PATCH v6]
ARM: S5PV210: Add Ext interrupt support' (with additional bug fixes).

I've tried to split my changes as much as possible to clearly show how the transition from plat-s5pc1xx to plat-s5p is being done.

Hi,

Looks good :-)

Quoted 17 lines

Changes since v2:
- fixed some whitespace/tabs errors
- removed external interrupt code, a common code from plat-s5p will be used
- moved SMDKC100 fixes to separate patch series

Changes since v1:
- bases on completely new clock code provided by Kukjin Kim
- added some plat-s5p fixes required for transition
- removed custom functions from gpiolib implementation (now uses common code from plat-samsung)
- restructured the changes to avoid breaking the functionality beteen the patches
- some other minor cleanups (mainly c1xx to c100 renames)

This patch series includes:

Quoted 17 lines

[PATCH 01/11] drivers: serial: S5PC100 serial driver cleanup [PATCH 02/11] ARM: S5PC100: Use common functions for gpiolib implementation [PATCH 03/11] ARM: S5PC100: Move gpio support from plat-s5pc1xx to mach- s5pc100
[PATCH 04/11] ARM: S5PC100: gpio.h cleanup
[PATCH 05/11] ARM: S5PC100: Move frame buffer helpers from plat-s5pc1xx to mach-s5pc100
[PATCH 06/11] ARM: S5PC100: Move i2c helpers from plat-s5pc1xx to mach- s5pc100
[PATCH 07/11] ARM: S5PC100: Move sdhci helpers from plat-s5pc1xx to mach- s5pc100
[PATCH 08/11] ARM: Samsung: move S5PC100 support from plat-s5pc1xx to plat- s5p framework
[PATCH 09/11] ARM: S5PC100: Add support for gpio interrupt [PATCH 10/11] ARM: S5PC100: use common plat-s5p external interrupt code [PATCH 11/11] ARM: remove obsolete plat-s5pc1xx directory

Thanks.

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

#17 lore raw

your mail

In reply to Marek Szyprowski
Quoted 1 line · Marek Szyprowski

Hello,

Hi, messages are supposed to have subjects... please supply one next timne.

Quoted 5 lines

This patch series perform a general cleanup in Samsung S5PC100 SoC support. This chip is moved from custom s5pc1xx platform framework to new plat-s5p framework, so more common code can be easily reused in upcomming extensions for S5PV210/S5PC110 SoCs.

Quoted 7 lines

This patch series is prepared against next-samsung tree, with assumption that the "[PATCH v3] ARM: S5PC100: Pre-requisite clock patch for plat-s5pc1xx to plat-s5p" has been applied as well as the '[PATCH v6]
ARM: S5PV210: Add Ext interrupt support' (with additional bug fixes).

I've tried to split my changes as much as possible to clearly show how the transition from plat-s5pc1xx to plat-s5p is being done.

Ok, this seems to be a pretty good progression from one to the other.

I will chase up the EINT support, it got dropped from the first pull due to your bug reports.

Will start sorting out a second round of branches with a view to trying to get this into the current merge window. I hope to have something to test by the end of today.

Quoted 37 lines

Changes since v2:
- fixed some whitespace/tabs errors
- removed external interrupt code, a common code from plat-s5p will be used
- moved SMDKC100 fixes to separate patch series

Changes since v1:
- bases on completely new clock code provided by Kukjin Kim
- added some plat-s5p fixes required for transition
- removed custom functions from gpiolib implementation (now uses common code from plat-samsung)
- restructured the changes to avoid breaking the functionality beteen the patches
- some other minor cleanups (mainly c1xx to c100 renames)

This patch series includes:

[PATCH 01/11] drivers: serial: S5PC100 serial driver cleanup
[PATCH 02/11] ARM: S5PC100: Use common functions for gpiolib implementation [PATCH 03/11] ARM: S5PC100: Move gpio support from plat-s5pc1xx to mach-s5pc100 [PATCH 04/11] ARM: S5PC100: gpio.h cleanup
[PATCH 05/11] ARM: S5PC100: Move frame buffer helpers from plat-s5pc1xx to mach-s5pc100 [PATCH 06/11] ARM: S5PC100: Move i2c helpers from plat-s5pc1xx to mach-s5pc100 [PATCH 07/11] ARM: S5PC100: Move sdhci helpers from plat-s5pc1xx to mach-s5pc100 [PATCH 08/11] ARM: Samsung: move S5PC100 support from plat-s5pc1xx to plat-s5p framework [PATCH 09/11] ARM: S5PC100: Add support for gpio interrupt
[PATCH 10/11] ARM: S5PC100: use common plat-s5p external interrupt code [PATCH 11/11] ARM: remove obsolete plat-s5pc1xx directory

Best regards
--
Marek Szyprowski
Samsung Poland R&D Center

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 5 lines
-- 
Ben

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