diff options
author | Kukjin Kim <kgene.kim@samsung.com> | 2010-11-23 21:00:16 -0500 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-12-29 19:37:28 -0500 |
commit | bb1d7002bbfd1471368e1c830a1e6ddcfdff1767 (patch) | |
tree | cefeb45b1b9779c52e76f9e77538101edad9d19d /arch/arm | |
parent | 4603089d7c5186d255c4718171187d00ee4d3452 (diff) |
ARM: S5P64X0: Cleanup S5P64X0 GPIOlib adding 2bit chips
This patch changes S5P6440 and S5P6450 GPIOlib adding 2bit chips.
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-s5p64x0/gpio.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/arch/arm/mach-s5p64x0/gpio.c b/arch/arm/mach-s5p64x0/gpio.c index 17a2eee3da72..0670fcceed49 100644 --- a/arch/arm/mach-s5p64x0/gpio.c +++ b/arch/arm/mach-s5p64x0/gpio.c | |||
@@ -473,21 +473,16 @@ static void __init s5p64x0_gpio_add_rbank_4bit2(struct s3c_gpio_chip *chip, | |||
473 | 473 | ||
474 | static int __init s5p64x0_gpiolib_init(void) | 474 | static int __init s5p64x0_gpiolib_init(void) |
475 | { | 475 | { |
476 | struct s3c_gpio_chip *s5p6440_chips = s5p6440_gpio_2bit; | ||
477 | int s5p6440_nr_chips = ARRAY_SIZE(s5p6440_gpio_2bit); | ||
478 | |||
479 | struct s3c_gpio_chip *s5p6450_chips = s5p6450_gpio_2bit; | ||
480 | int s5p6450_nr_chips = ARRAY_SIZE(s5p6450_gpio_2bit); | ||
481 | |||
482 | unsigned int chipid; | 476 | unsigned int chipid; |
483 | 477 | ||
478 | chipid = __raw_readl(S5P64X0_SYS_ID); | ||
479 | |||
484 | s5p64x0_gpiolib_set_cfg(s5p64x0_gpio_cfgs, | 480 | s5p64x0_gpiolib_set_cfg(s5p64x0_gpio_cfgs, |
485 | ARRAY_SIZE(s5p64x0_gpio_cfgs)); | 481 | ARRAY_SIZE(s5p64x0_gpio_cfgs)); |
486 | chipid = __raw_readl(S5P64X0_SYS_ID); | ||
487 | 482 | ||
488 | if ((chipid & 0xff000) == 0x50000) { | 483 | if ((chipid & 0xff000) == 0x50000) { |
489 | for (; s5p6450_nr_chips > 0; s5p6450_nr_chips--, s5p6450_chips++) | 484 | samsung_gpiolib_add_2bit_chips(s5p6450_gpio_2bit, |
490 | s3c_gpiolib_add(s5p6450_chips); | 485 | ARRAY_SIZE(s5p6450_gpio_2bit)); |
491 | 486 | ||
492 | samsung_gpiolib_add_4bit_chips(s5p6450_gpio_4bit, | 487 | samsung_gpiolib_add_4bit_chips(s5p6450_gpio_4bit, |
493 | ARRAY_SIZE(s5p6450_gpio_4bit)); | 488 | ARRAY_SIZE(s5p6450_gpio_4bit)); |
@@ -498,8 +493,8 @@ static int __init s5p64x0_gpiolib_init(void) | |||
498 | s5p64x0_gpio_add_rbank_4bit2(s5p6450_gpio_rbank_4bit2, | 493 | s5p64x0_gpio_add_rbank_4bit2(s5p6450_gpio_rbank_4bit2, |
499 | ARRAY_SIZE(s5p6450_gpio_rbank_4bit2)); | 494 | ARRAY_SIZE(s5p6450_gpio_rbank_4bit2)); |
500 | } else { | 495 | } else { |
501 | for (; s5p6440_nr_chips > 0; s5p6440_nr_chips--, s5p6440_chips++) | 496 | samsung_gpiolib_add_2bit_chips(s5p6440_gpio_2bit, |
502 | s3c_gpiolib_add(s5p6440_chips); | 497 | ARRAY_SIZE(s5p6440_gpio_2bit)); |
503 | 498 | ||
504 | samsung_gpiolib_add_4bit_chips(s5p6440_gpio_4bit, | 499 | samsung_gpiolib_add_4bit_chips(s5p6440_gpio_4bit, |
505 | ARRAY_SIZE(s5p6440_gpio_4bit)); | 500 | ARRAY_SIZE(s5p6440_gpio_4bit)); |