ARM: S3C24XX: Add setname core function and S3C2416 NAND
Subsystems (3)
cover ARM: S3C24XX: Add setname core function and S3C2416 NAND
This patch adds setname core function for S3C24XX NAND and support S3C2416 NAND
This patch set consists of the following patches.
[PATCH 1/2] ARM: SAMSUNG: Add setname core function for S3C24XX NAND [PATCH 2/2] ARM: S3C2416: Change S3C2416 NAND platform device name
PATCH 1/2 ARM: SAMSUNG: Add setname core function for S3C24XX NAND
From: Atul Dahiya <[email protected]>
This patch replaces the device name assignment method from string assignment to set_name method for all s3c24xx machines and adds device core file.
--- arch/arm/mach-s3c2412/s3c2412.c | 3 +- arch/arm/mach-s3c2416/s3c2416.c | 3 +- arch/arm/mach-s3c2440/s3c244x.c | 3 +- arch/arm/mach-s3c2443/s3c2443.c | 3 +- arch/arm/plat-samsung/include/plat/nand-core.h | 28 ++++++++++++++++++++++++ 5 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 arch/arm/plat-samsung/include/plat/nand-core.h
arch/arm/mach-s3c2412/s3c2412.c +2 -1
@@ -51,6 +51,7 @@#include <plat/clock.h> #include <plat/pm.h> #include <plat/pll.h> +#include <plat/nand-core.h> #ifndef CONFIG_CPU_S3C2412_ONLY void __iomem *s3c24xx_va_gpio2 =S3C24XX_VA_GPIO ;
@@ -92,7 +93,7 @@ void __init s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no)/* rename devices that are s3c2412/s3c2413 specific */ s3c_device_sdi.name ="s3c2412-sdi" ; s3c_device_lcd.name ="s3c2412-lcd" ; - s3c_device_nand.name ="s3c2412-nand" ; +s3c_nand_setname ("s3c2412-nand" );/* alter IRQ of SDI controller */
arch/arm/mach-s3c2416/s3c2416.c +2 -1
@@ -55,6 +55,7 @@#include <plat/cpu.h> #include <plat/iic-core.h> +#include <plat/nand-core.h> static struct map_desc s3c2416_iodesc[]__initdata = {IODESC_ENT (WATCHDOG ),
@@ -99,7 +100,7 @@ void __init s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no) {s3c24xx_init_uartdevs ("s3c2440-uart" , s3c2410_uart_resources, cfg, no); - s3c_device_nand.name ="s3c2416-nand" ; +s3c_nand_setname ("s3c2416-nand" ); }/* s3c2416_map_io
arch/arm/mach-s3c2440/s3c244x.c +2 -1
@@ -44,6 +44,7 @@#include <plat/cpu.h> #include <plat/pm.h> #include <plat/pll.h> +#include <plat/nand-core.h> static struct map_desc s3c244x_iodesc[]__initdata = {IODESC_ENT (CLKPWR ),
@@ -68,7 +69,7 @@ void __init s3c244x_map_io(void) s3c_device_sdi.name ="s3c2440-sdi" ; s3c_device_i2c0.name ="s3c2440-i2c" ; - s3c_device_nand.name ="s3c2440-nand" ; +s3c_nand_setname ("s3c2440-nand" ); s3c_device_ts.name ="s3c2440-ts" ; s3c_device_usbgadget.name ="s3c2440-usbgadget" ; }
arch/arm/mach-s3c2443/s3c2443.c +2 -1
@@ -35,6 +35,7 @@#include <plat/s3c2443.h> #include <plat/devs.h> #include <plat/cpu.h> +#include <plat/nand-core.h> static struct map_desc s3c2443_iodesc[]__initdata = {IODESC_ENT (WATCHDOG ),
@@ -61,7 +62,7 @@ int __init s3c2443_init(void) s3c24xx_reset_hook = s3c2443_hard_reset; - s3c_device_nand.name ="s3c2412-nand" ; +s3c_nand_setname ("s3c2412-nand" );/* change WDT IRQ number */ s3c_device_wdt.resource[1 ].start =IRQ_S3C2443_WDT ;
arch/arm/plat-samsung/include/plat/nand-core.h new file +28 -0
@@ -0,0 +1,28 @@ +/* arch/arm/plat-samsung/include/plat/nand-core.h +* +* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* http://www.samsung.com/ +* +* S3C - Nand Controller core functions +* +* 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. +*/ + +#ifndef __ASM_ARCH_NAND_CORE_H +#define __ASM_ARCH_NAND_CORE_H __FILE__ + +/* These functions are only for use with the core support code, such as +* the cpu specific initialisation code +*/ + +/* re-define device name depending on support. */ +static inline void s3c_nand_setname (char *name) +{ +#ifdef CONFIG_S3C_DEV_NAND + s3c_device_nand.name = name; +#endif +} + +#endif /* __ASM_ARCH_NAND_CORE_H */
Signature · 1 line
1.6.2.5
PATCH 1/2 ARM: SAMSUNG: Add setname core function for S3C24XX NAND
Quoted 4 lines · Sangbeom Kim
From: Atul Dahiya <[email protected]>
This patch replaces the device name assignment method from string
assignment
arch/arm/mach-s3c2412/s3c2412.c void __init s3c2412_init_uarts(struct s3c2410_uartcfg
Quoted 28 lines
to
set_namemethod for all s3c24xx machines and adds device core file.Signed-off-by Atul Dahiya <[email protected]>Signed-off-by Sangbeom Kim <[email protected]>--- arch/arm/mach-s3c2412/s3c2412.c | 3 +- arch/arm/mach-s3c2416/s3c2416.c | 3 +- arch/arm/mach-s3c2440/s3c244x.c | 3 +- arch/arm/mach-s3c2443/s3c2443.c | 3 +- arch/arm/plat-samsung/include/plat/nand-core.h | 28 ++++++++++++++++++++++++ 5 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 arch/arm/plat-samsung/include/plat/nand-core.harch/arm/mach- renamed from arch/arm/mach-s3c2412/s3c2412.c +0
-0
s3c2412/s3c2412.c
index bef39f7..4c6df51 100644arch/arm/mach-s3c2412/s3c2412.c +1
-0@@ -51,6 +51,7 @@#include <plat/clock.h> #include <plat/pm.h> #include <plat/pll.h> +#include <plat/nand-core.h> #ifndef CONFIG_CPU_S3C2412_ONLY void __iomem *s3c24xx_va_gpio2 =S3C24XX_VA_GPIO ;@@ -92,7 +93,7 @@ void __init s3c2412_init_uarts(struct s3c2410_uartcfg
*cfg,
arch/arm/mach-s3c2416/s3c2416.c void __init s3c2416_init_uarts(struct s3c2410_uartcfg
Quoted 23 lines
arch/arm/mach-s3c2412/s3c2412.c +1
-1int no)/* rename devices that are s3c2412/s3c2413 specific */ s3c_device_sdi.name = "s3c2412-sdi"; s3c_device_lcd.name ="s3c2412-lcd" ; - s3c_device_nand.name ="s3c2412-nand" ; +s3c_nand_setname ("s3c2412-nand" );/* alter IRQ of SDI controller */ arch/arm/mach- renamed from arch/arm/mach-s3c2416/s3c2416.c +0
-0
s3c2416/s3c2416.c
index 35dabcc..bfe674f 100644arch/arm/mach-s3c2416/s3c2416.c +1
-0@@ -55,6 +55,7 @@#include <plat/cpu.h> #include <plat/iic-core.h> +#include <plat/nand-core.h> static struct map_desc s3c2416_iodesc[]__initdata = {IODESC_ENT (WATCHDOG ),@@ -99,7 +100,7 @@ void __init s3c2416_init_uarts(struct s3c2410_uartcfg
*cfg,
arch/arm/mach-s3c2416/s3c2416.c void __init s3c2416_init_uarts(struct s3c2410_uartcfg · line 102
Quoted 3 lines
arch/arm/mach-s3c2416/s3c2416.c +0
-0int no) { s3c24xx_init_uartdevs("s3c2440-uart", s3c2410_uart_resources, cfg,
no);
Review
Quoted 51 lines
arch/arm/mach-s3c2416/s3c2416.c +1
-1- s3c_device_nand.name ="s3c2416-nand" ; +s3c_nand_setname ("s3c2416-nand" ); }/* s3c2416_map_io arch/arm/mach- renamed from arch/arm/mach-s3c2440/s3c244x.c +0
-0
s3c2440/s3c244x.c
index 5e4a97e..90c1707 100644arch/arm/mach-s3c2440/s3c244x.c +2
-1@@ -44,6 +44,7 @@#include <plat/cpu.h> #include <plat/pm.h> #include <plat/pll.h> +#include <plat/nand-core.h> static struct map_desc s3c244x_iodesc[]__initdata = {IODESC_ENT (CLKPWR ),@@ -68,7 +69,7 @@ void __init s3c244x_map_io(void) s3c_device_sdi.name ="s3c2440-sdi" ; s3c_device_i2c0.name ="s3c2440-i2c" ; - s3c_device_nand.name ="s3c2440-nand" ; +s3c_nand_setname ("s3c2440-nand" ); s3c_device_ts.name ="s3c2440-ts" ; s3c_device_usbgadget.name ="s3c2440-usbgadget" ; }arch/arm/mach- renamed from arch/arm/mach-s3c2443/s3c2443.c +0
-0
s3c2443/s3c2443.c
index ce2ec32..a64615e 100644arch/arm/mach-s3c2443/s3c2443.c +2
-1@@ -35,6 +35,7 @@#include <plat/s3c2443.h> #include <plat/devs.h> #include <plat/cpu.h> +#include <plat/nand-core.h> static struct map_desc s3c2443_iodesc[]__initdata = {IODESC_ENT (WATCHDOG ),@@ -61,7 +62,7 @@ int __init s3c2443_init(void) s3c24xx_reset_hook = s3c2443_hard_reset; - s3c_device_nand.name ="s3c2412-nand" ; +s3c_nand_setname ("s3c2412-nand" );/* change WDT IRQ number */ s3c_device_wdt.resource[1 ].start =IRQ_S3C2443_WDT ;(quoted diff) +0
-0
b/arch/arm/plat-
Quoted 25 lines
samsung/include/plat/nand-core.h
new file mode 100644
index 0000000..6de2078arch/arm/plat-samsung/include/plat/nand-core.h new file +19
-0@@ -0,0 +1,28 @@ +/* arch/arm/plat-samsung/include/plat/nand-core.h +* +* Copyright (c) 2010 Samsung Electronics Co., Ltd. +* http://www.samsung.com/ +* +* S3C - Nand Controller core functions +* +* 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. +*/ + +#ifndef __ASM_ARCH_NAND_CORE_H +#define __ASM_ARCH_NAND_CORE_H __FILE__ + +/* These functions are only for use with the core support code, such as +* the cpu specific initialisation code +*/ +
arch/arm/plat-samsung/include/plat/nand-core.h
Quoted 10 lines
arch/arm/plat-samsung/include/plat/nand-core.h new file +9
-1+/* re-define device name depending on support. */ +static inline void s3c_nand_setname (char *name) +{ +#ifdef CONFIG_S3C_DEV_NAND + s3c_device_nand.name = name; +#endif +} + +#endif /* __ASM_ARCH_NAND_CORE_H */ --
Ok...will apply.
Ben, if any problems, please let me know.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 2/2 ARM: S3C2416: Change S3C2416 NAND platform device name
In reply to Sangbeom KimFrom: Atul Dahiya <[email protected]>
This patch changes the platform device name from 's3c2416-nand' to 's3c2412-nand' so that S3C2416 can reuse the nand functionality available on S3C2412.
--- arch/arm/mach-s3c2416/s3c2416.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-s3c2416/s3c2416.c +1 -1
@@ -100,7 +100,7 @@ void __init s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no) {s3c24xx_init_uartdevs ("s3c2440-uart" , s3c2410_uart_resources, cfg, no); -s3c_nand_setname ("s3c2416-nand" ); +s3c_nand_setname ("s3c2412-nand" ); }/* s3c2416_map_io
Signature · 1 line
1.6.2.5
PATCH 2/2 ARM: S3C2416: Change S3C2416 NAND platform device name
Quoted 19 lines · Sangbeom Kim
From: Atul Dahiya <[email protected]>
This patch changes the platform device name from 's3c2416-nand' to 's3c2412-nand' so that S3C2416 can reuse the nand functionality available on S3C2412.
Signed-off-by Atul Dahiya <[email protected]>Signed-off-by Sangbeom Kim <[email protected]>--- arch/arm/mach-s3c2416/s3c2416.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/mach- renamed from arch/arm/mach-s3c2416/s3c2416.c +0
-0
s3c2416/s3c2416.c
index bfe674f..6468b6c 100644
arch/arm/mach-s3c2416/s3c2416.c void __init s3c2416_init_uarts(struct s3c2410_uartcfg · line 102
Quoted 3 lines
arch/arm/mach-s3c2416/s3c2416.c +0
-0@@ -100,7 +100,7 @@ void __init s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no) { s3c24xx_init_uartdevs("s3c2440-uart", s3c2410_uart_resources, cfg,
no);
arch/arm/mach-s3c2416/s3c2416.c void __init s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no)
Quoted 7 lines
arch/arm/mach-s3c2416/s3c2416.c +1
-2-s3c_nand_setname ("s3c2416-nand" ); +s3c_nand_setname ("s3c2412-nand" ); }/* s3c2416_map_io --
Ok...will apply.
Ben, if any problems, please let me know.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.