ARM: S5P64X0: Add S5P6450 GPIOlib support
Subsystems (3)
cover ARM: S5P64X0: Add S5P6450 GPIOlib support
This patch adds S5P6450 GPIOlib support. S5P6440 GPIOlib already can be supported, this patch just adds GPIO chips for S5P6450 and changes the file name according to other S5P SoCs.
[PATCH 1/4] ARM: S5P64X0: Add GPIOlib support for S5P6450 [PATCH 2/4] ARM: SAMSUNG: Cleanup GPIOlib adding 2bit chips [PATCH 3/4] ARM: S5P64X0: Cleanup S5P64X0 GPIOlib adding 2bit chips [PATCH 4/4] ARM: S5P64X0: Rename GPIOlib file to gpiolib.c
PATCH 1/4 ARM: S5P64X0: Add GPIOlib support for S5P6450
Already can support S5P6440 GPIOlib but S5P6450. This patch changes regarding S5P6440 GPIO definitions so that can be used it from S5P6450 and adds S5P6450 GPIO chips.
--- arch/arm/mach-s5p64x0/Makefile | 4 +- arch/arm/mach-s5p64x0/gpio.c | 224 +++++++++++++++++++++--- arch/arm/mach-s5p64x0/include/mach/regs-gpio.h | 57 ++----- 3 files changed, 217 insertions(+), 68 deletions(-)
arch/arm/mach-s5p64x0/Makefile +2 -2
@@ -12,9 +12,9 @@ obj- := # Core support for S5P64X0 system -obj-$(CONFIG_ARCH_S5P64X0) += cpu.o init.o clock.o dma.o +obj-$(CONFIG_ARCH_S5P64X0) += cpu.o init.o clock.o dma.o gpio.o obj-$(CONFIG_ARCH_S5P64X0) += setup-i2c0.o -obj-$(CONFIG_CPU_S5P6440) += clock-s5p6440.o gpio.o +obj-$(CONFIG_CPU_S5P6440) += clock-s5p6440.o obj-$(CONFIG_CPU_S5P6450) += clock-s5p6450.o # machine support
arch/arm/mach-s5p64x0/gpio.c +199 -25
327 lines not on this page · raw message
arch/arm/mach-s5p64x0/include/mach/regs-gpio.h +16 -41
64 lines not on this page · raw message
Signature · 1 line
1.6.2.5
PATCH 2/4 ARM: SAMSUNG: Cleanup GPIOlib adding 2bit chips
In reply to Kukjin KimThis patch adds samsung_gpiolib_add_2bit_chips() for cleanup regarding GPIOlib adding 2bit chips.
--- arch/arm/plat-samsung/gpiolib.c | 7 +++++++ arch/arm/plat-samsung/include/plat/gpio-core.h | 2 ++ 2 files changed, 9 insertions(+), 0 deletions(-)
arch/arm/plat-samsung/gpiolib.c +7 -0
@@ -197,3 +197,10 @@ void __init samsung_gpiolib_add_4bit2_chips(struct s3c_gpio_chip *chip,s3c_gpiolib_add (chip); } } + +void __init samsung_gpiolib_add_2bit_chips (struct s3c_gpio_chip *chip, +int nr_chips) +{ +for (; nr_chips >0 ; nr_chips--, chip++) +s3c_gpiolib_add (chip); +}
arch/arm/plat-samsung/include/plat/gpio-core.h +2 -0
@@ -118,6 +118,8 @@ extern void samsung_gpiolib_add_4bit_chips(struct s3c_gpio_chip *chip, int nr_chips);extern void samsung_gpiolib_add_4bit2_chips (struct s3c_gpio_chip *chip,int nr_chips); +extern void samsung_gpiolib_add_2bit_chips (struct s3c_gpio_chip *chip, +int nr_chips);extern void samsung_gpiolib_add_4bit (struct s3c_gpio_chip *chip);extern void samsung_gpiolib_add_4bit2 (struct s3c_gpio_chip *chip);
Signature · 1 line
1.6.2.5
PATCH 3/4 ARM: S5P64X0: Cleanup S5P64X0 GPIOlib adding 2bit chips
In reply to Kukjin KimThis patch changes S5P6440 and S5P6450 GPIOlib adding 2bit chips.
--- arch/arm/mach-s5p64x0/gpio.c | 17 ++++++----------- 1 files changed, 6 insertions(+), 11 deletions(-)
arch/arm/mach-s5p64x0/gpio.c +6 -11
@@ -473,21 +473,16 @@ static void __init s5p64x0_gpio_add_rbank_4bit2(struct s3c_gpio_chip *chip,static int __init s5p64x0_gpiolib_init (void ) { -struct s3c_gpio_chip *s5p6440_chips = s5p6440_gpio_2bit; -int s5p6440_nr_chips =ARRAY_SIZE (s5p6440_gpio_2bit); - -struct s3c_gpio_chip *s5p6450_chips = s5p6450_gpio_2bit; -int s5p6450_nr_chips =ARRAY_SIZE (s5p6450_gpio_2bit); -unsigned int chipid; + chipid =__raw_readl (S5P64X0_SYS_ID ); +s5p64x0_gpiolib_set_cfg (s5p64x0_gpio_cfgs,ARRAY_SIZE (s5p64x0_gpio_cfgs)); - chipid =__raw_readl (S5P64X0_SYS_ID );if ((chipid &0xff000 ) ==0x50000 ) { -for (; s5p6450_nr_chips >0 ; s5p6450_nr_chips--, s5p6450_chips++) -s3c_gpiolib_add (s5p6450_chips); +samsung_gpiolib_add_2bit_chips (s5p6450_gpio_2bit, +ARRAY_SIZE (s5p6450_gpio_2bit));samsung_gpiolib_add_4bit_chips (s5p6450_gpio_4bit,ARRAY_SIZE (s5p6450_gpio_4bit));
@@ -498,8 +493,8 @@ static int __init s5p64x0_gpiolib_init(void)s5p64x0_gpio_add_rbank_4bit2 (s5p6450_gpio_rbank_4bit2,ARRAY_SIZE (s5p6450_gpio_rbank_4bit2)); }else { -for (; s5p6440_nr_chips >0 ; s5p6440_nr_chips--, s5p6440_chips++) -s3c_gpiolib_add (s5p6440_chips); +samsung_gpiolib_add_2bit_chips (s5p6440_gpio_2bit, +ARRAY_SIZE (s5p6440_gpio_2bit));samsung_gpiolib_add_4bit_chips (s5p6440_gpio_4bit,ARRAY_SIZE (s5p6440_gpio_4bit));
Signature · 1 line
1.6.2.5
PATCH 4/4 ARM: S5P64X0: Rename GPIOlib file to gpiolib.c
In reply to Kukjin KimThis patch renames S5P64X0 GPIOlib file according to other S5P SoCs.
---
arch/arm/mach-s5p64x0/Makefile | 2 +-
arch/arm/mach-s5p64x0/{gpio.c => gpiolib.c} | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
rename arch/arm/mach-s5p64x0/{gpio.c => gpiolib.c} (99%)arch/arm/mach-s5p64x0/Makefile +1 -1
@@ -12,7 +12,7 @@ obj- := # Core support for S5P64X0 system -obj-$(CONFIG_ARCH_S5P64X0) += cpu.o init.o clock.o dma.o gpio.o +obj-$(CONFIG_ARCH_S5P64X0) += cpu.o init.o clock.o dma.o gpiolib.o obj-$(CONFIG_ARCH_S5P64X0) += setup-i2c0.o obj-$(CONFIG_CPU_S5P6440) += clock-s5p6440.o obj-$(CONFIG_CPU_S5P6450) += clock-s5p6450.o
arch/arm/mach-s5p64x0/gpiolib.c renamed from arch/arm/mach-s5p64x0/gpio.c +1 -1
@@ -1,4 +1,4 @@ -/* linux/arch/arm/mach-s5p64x0/gpio.c +/* linux/arch/arm/mach-s5p64x0/gpiolib.c * * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd. * http://www.samsung.com
Signature · 1 line
1.6.2.5