diff options
author | Atul Dahiya <atul.dahiya@samsung.com> | 2010-10-18 06:56:45 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-10-18 06:56:45 -0400 |
commit | ef3f2dd4810cca5bf5b1d3648968b50fb267d5e2 (patch) | |
tree | 3715885664d99f3a092dbb1563ee5d5eb3691799 /arch/arm | |
parent | 66ad4eea7ec50fe131755c80058b1157d160294d (diff) |
ARM: SAMSUNG: Add setname core function for S3C24XX NAND
This patch replaces the device name assignment method from string assignment
to set_name method for all s3c24xx machines and adds device core file.
Signed-off-by: Atul Dahiya <atul.dahiya@samsung.com>
Signed-off-by: Sangbeom Kim <sbkim73@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-s3c2412/s3c2412.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-s3c2416/s3c2416.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/s3c244x.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-s3c2443/s3c2443.c | 3 | ||||
-rw-r--r-- | arch/arm/plat-samsung/include/plat/nand-core.h | 28 |
5 files changed, 36 insertions, 4 deletions
diff --git a/arch/arm/mach-s3c2412/s3c2412.c b/arch/arm/mach-s3c2412/s3c2412.c index bef39f77729d..4c6df51ddf33 100644 --- a/arch/arm/mach-s3c2412/s3c2412.c +++ b/arch/arm/mach-s3c2412/s3c2412.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <plat/clock.h> | 51 | #include <plat/clock.h> |
52 | #include <plat/pm.h> | 52 | #include <plat/pm.h> |
53 | #include <plat/pll.h> | 53 | #include <plat/pll.h> |
54 | #include <plat/nand-core.h> | ||
54 | 55 | ||
55 | #ifndef CONFIG_CPU_S3C2412_ONLY | 56 | #ifndef CONFIG_CPU_S3C2412_ONLY |
56 | void __iomem *s3c24xx_va_gpio2 = S3C24XX_VA_GPIO; | 57 | void __iomem *s3c24xx_va_gpio2 = S3C24XX_VA_GPIO; |
@@ -92,7 +93,7 @@ void __init s3c2412_init_uarts(struct s3c2410_uartcfg *cfg, int no) | |||
92 | /* rename devices that are s3c2412/s3c2413 specific */ | 93 | /* rename devices that are s3c2412/s3c2413 specific */ |
93 | s3c_device_sdi.name = "s3c2412-sdi"; | 94 | s3c_device_sdi.name = "s3c2412-sdi"; |
94 | s3c_device_lcd.name = "s3c2412-lcd"; | 95 | s3c_device_lcd.name = "s3c2412-lcd"; |
95 | s3c_device_nand.name = "s3c2412-nand"; | 96 | s3c_nand_setname("s3c2412-nand"); |
96 | 97 | ||
97 | /* alter IRQ of SDI controller */ | 98 | /* alter IRQ of SDI controller */ |
98 | 99 | ||
diff --git a/arch/arm/mach-s3c2416/s3c2416.c b/arch/arm/mach-s3c2416/s3c2416.c index bc30245e133b..620718939628 100644 --- a/arch/arm/mach-s3c2416/s3c2416.c +++ b/arch/arm/mach-s3c2416/s3c2416.c | |||
@@ -56,6 +56,7 @@ | |||
56 | 56 | ||
57 | #include <plat/iic-core.h> | 57 | #include <plat/iic-core.h> |
58 | #include <plat/fb-core.h> | 58 | #include <plat/fb-core.h> |
59 | #include <plat/nand-core.h> | ||
59 | 60 | ||
60 | static struct map_desc s3c2416_iodesc[] __initdata = { | 61 | static struct map_desc s3c2416_iodesc[] __initdata = { |
61 | IODESC_ENT(WATCHDOG), | 62 | IODESC_ENT(WATCHDOG), |
@@ -100,7 +101,7 @@ void __init s3c2416_init_uarts(struct s3c2410_uartcfg *cfg, int no) | |||
100 | { | 101 | { |
101 | s3c24xx_init_uartdevs("s3c2440-uart", s3c2410_uart_resources, cfg, no); | 102 | s3c24xx_init_uartdevs("s3c2440-uart", s3c2410_uart_resources, cfg, no); |
102 | 103 | ||
103 | s3c_device_nand.name = "s3c2416-nand"; | 104 | s3c_nand_setname("s3c2416-nand"); |
104 | } | 105 | } |
105 | 106 | ||
106 | /* s3c2416_map_io | 107 | /* s3c2416_map_io |
diff --git a/arch/arm/mach-s3c2440/s3c244x.c b/arch/arm/mach-s3c2440/s3c244x.c index 5e4a97e76533..90c1707b9c95 100644 --- a/arch/arm/mach-s3c2440/s3c244x.c +++ b/arch/arm/mach-s3c2440/s3c244x.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <plat/cpu.h> | 44 | #include <plat/cpu.h> |
45 | #include <plat/pm.h> | 45 | #include <plat/pm.h> |
46 | #include <plat/pll.h> | 46 | #include <plat/pll.h> |
47 | #include <plat/nand-core.h> | ||
47 | 48 | ||
48 | static struct map_desc s3c244x_iodesc[] __initdata = { | 49 | static struct map_desc s3c244x_iodesc[] __initdata = { |
49 | IODESC_ENT(CLKPWR), | 50 | IODESC_ENT(CLKPWR), |
@@ -68,7 +69,7 @@ void __init s3c244x_map_io(void) | |||
68 | 69 | ||
69 | s3c_device_sdi.name = "s3c2440-sdi"; | 70 | s3c_device_sdi.name = "s3c2440-sdi"; |
70 | s3c_device_i2c0.name = "s3c2440-i2c"; | 71 | s3c_device_i2c0.name = "s3c2440-i2c"; |
71 | s3c_device_nand.name = "s3c2440-nand"; | 72 | s3c_nand_setname("s3c2440-nand"); |
72 | s3c_device_ts.name = "s3c2440-ts"; | 73 | s3c_device_ts.name = "s3c2440-ts"; |
73 | s3c_device_usbgadget.name = "s3c2440-usbgadget"; | 74 | s3c_device_usbgadget.name = "s3c2440-usbgadget"; |
74 | } | 75 | } |
diff --git a/arch/arm/mach-s3c2443/s3c2443.c b/arch/arm/mach-s3c2443/s3c2443.c index 839b6b2ced74..33d18dd1ebd5 100644 --- a/arch/arm/mach-s3c2443/s3c2443.c +++ b/arch/arm/mach-s3c2443/s3c2443.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <plat/devs.h> | 36 | #include <plat/devs.h> |
37 | #include <plat/cpu.h> | 37 | #include <plat/cpu.h> |
38 | #include <plat/fb-core.h> | 38 | #include <plat/fb-core.h> |
39 | #include <plat/nand-core.h> | ||
39 | 40 | ||
40 | static struct map_desc s3c2443_iodesc[] __initdata = { | 41 | static struct map_desc s3c2443_iodesc[] __initdata = { |
41 | IODESC_ENT(WATCHDOG), | 42 | IODESC_ENT(WATCHDOG), |
@@ -62,7 +63,7 @@ int __init s3c2443_init(void) | |||
62 | 63 | ||
63 | s3c24xx_reset_hook = s3c2443_hard_reset; | 64 | s3c24xx_reset_hook = s3c2443_hard_reset; |
64 | 65 | ||
65 | s3c_device_nand.name = "s3c2412-nand"; | 66 | s3c_nand_setname("s3c2412-nand"); |
66 | s3c_fb_setname("s3c2443-fb"); | 67 | s3c_fb_setname("s3c2443-fb"); |
67 | 68 | ||
68 | /* change WDT IRQ number */ | 69 | /* change WDT IRQ number */ |
diff --git a/arch/arm/plat-samsung/include/plat/nand-core.h b/arch/arm/plat-samsung/include/plat/nand-core.h new file mode 100644 index 000000000000..6de20789a95e --- /dev/null +++ b/arch/arm/plat-samsung/include/plat/nand-core.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* arch/arm/plat-samsung/include/plat/nand-core.h | ||
2 | * | ||
3 | * Copyright (c) 2010 Samsung Electronics Co., Ltd. | ||
4 | * http://www.samsung.com/ | ||
5 | * | ||
6 | * S3C - Nand Controller core functions | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_NAND_CORE_H | ||
14 | #define __ASM_ARCH_NAND_CORE_H __FILE__ | ||
15 | |||
16 | /* These functions are only for use with the core support code, such as | ||
17 | * the cpu specific initialisation code | ||
18 | */ | ||
19 | |||
20 | /* re-define device name depending on support. */ | ||
21 | static inline void s3c_nand_setname(char *name) | ||
22 | { | ||
23 | #ifdef CONFIG_S3C_DEV_NAND | ||
24 | s3c_device_nand.name = name; | ||
25 | #endif | ||
26 | } | ||
27 | |||
28 | #endif /* __ASM_ARCH_NAND_CORE_H */ | ||