aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mmp
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@marvell.com>2009-10-13 03:24:55 -0400
committerEric Miao <eric.y.miao@gmail.com>2009-11-30 20:02:43 -0500
commita0f266c1fa040e1fe61b51e3de75b6a11e32ceb1 (patch)
tree0e8c5576e3c6926c874d2960bc1b1e4dd31c5e41 /arch/arm/mach-mmp
parent82b95ecb96122896fd5b7b75001fdda3e047ef38 (diff)
[ARM] pxa: add nand device and clock for pxa168/pxa910
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-mmp')
-rw-r--r--arch/arm/mach-mmp/include/mach/pxa168.h7
-rw-r--r--arch/arm/mach-mmp/include/mach/pxa910.h7
-rw-r--r--arch/arm/mach-mmp/pxa168.c5
-rw-r--r--arch/arm/mach-mmp/pxa910.c4
4 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/mach-mmp/include/mach/pxa168.h b/arch/arm/mach-mmp/include/mach/pxa168.h
index 6bf1f0eefcd1..3ad612cbdf09 100644
--- a/arch/arm/mach-mmp/include/mach/pxa168.h
+++ b/arch/arm/mach-mmp/include/mach/pxa168.h
@@ -4,6 +4,7 @@
4#include <linux/i2c.h> 4#include <linux/i2c.h>
5#include <mach/devices.h> 5#include <mach/devices.h>
6#include <plat/i2c.h> 6#include <plat/i2c.h>
7#include <plat/pxa3xx_nand.h>
7 8
8extern struct pxa_device_desc pxa168_device_uart1; 9extern struct pxa_device_desc pxa168_device_uart1;
9extern struct pxa_device_desc pxa168_device_uart2; 10extern struct pxa_device_desc pxa168_device_uart2;
@@ -13,6 +14,7 @@ extern struct pxa_device_desc pxa168_device_pwm1;
13extern struct pxa_device_desc pxa168_device_pwm2; 14extern struct pxa_device_desc pxa168_device_pwm2;
14extern struct pxa_device_desc pxa168_device_pwm3; 15extern struct pxa_device_desc pxa168_device_pwm3;
15extern struct pxa_device_desc pxa168_device_pwm4; 16extern struct pxa_device_desc pxa168_device_pwm4;
17extern struct pxa_device_desc pxa168_device_nand;
16 18
17static inline int pxa168_add_uart(int id) 19static inline int pxa168_add_uart(int id)
18{ 20{
@@ -64,4 +66,9 @@ static inline int pxa168_add_pwm(int id)
64 66
65 return pxa_register_device(d, NULL, 0); 67 return pxa_register_device(d, NULL, 0);
66} 68}
69
70static inline int pxa168_add_nand(struct pxa3xx_nand_platform_data *info)
71{
72 return pxa_register_device(&pxa168_device_nand, info, sizeof(*info));
73}
67#endif /* __ASM_MACH_PXA168_H */ 74#endif /* __ASM_MACH_PXA168_H */
diff --git a/arch/arm/mach-mmp/include/mach/pxa910.h b/arch/arm/mach-mmp/include/mach/pxa910.h
index 6ae1ed7a0a9f..4f0b4ec6f5d0 100644
--- a/arch/arm/mach-mmp/include/mach/pxa910.h
+++ b/arch/arm/mach-mmp/include/mach/pxa910.h
@@ -4,6 +4,7 @@
4#include <linux/i2c.h> 4#include <linux/i2c.h>
5#include <mach/devices.h> 5#include <mach/devices.h>
6#include <plat/i2c.h> 6#include <plat/i2c.h>
7#include <plat/pxa3xx_nand.h>
7 8
8extern struct pxa_device_desc pxa910_device_uart1; 9extern struct pxa_device_desc pxa910_device_uart1;
9extern struct pxa_device_desc pxa910_device_uart2; 10extern struct pxa_device_desc pxa910_device_uart2;
@@ -13,6 +14,7 @@ extern struct pxa_device_desc pxa910_device_pwm1;
13extern struct pxa_device_desc pxa910_device_pwm2; 14extern struct pxa_device_desc pxa910_device_pwm2;
14extern struct pxa_device_desc pxa910_device_pwm3; 15extern struct pxa_device_desc pxa910_device_pwm3;
15extern struct pxa_device_desc pxa910_device_pwm4; 16extern struct pxa_device_desc pxa910_device_pwm4;
17extern struct pxa_device_desc pxa910_device_nand;
16 18
17static inline int pxa910_add_uart(int id) 19static inline int pxa910_add_uart(int id)
18{ 20{
@@ -64,4 +66,9 @@ static inline int pxa910_add_pwm(int id)
64 66
65 return pxa_register_device(d, NULL, 0); 67 return pxa_register_device(d, NULL, 0);
66} 68}
69
70static inline int pxa910_add_nand(struct pxa3xx_nand_platform_data *info)
71{
72 return pxa_register_device(&pxa910_device_nand, info, sizeof(*info));
73}
67#endif /* __ASM_MACH_PXA910_H */ 74#endif /* __ASM_MACH_PXA910_H */
diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c
index 71b1ae338753..37dbdde17fac 100644
--- a/arch/arm/mach-mmp/pxa168.c
+++ b/arch/arm/mach-mmp/pxa168.c
@@ -19,6 +19,7 @@
19#include <mach/addr-map.h> 19#include <mach/addr-map.h>
20#include <mach/cputype.h> 20#include <mach/cputype.h>
21#include <mach/regs-apbc.h> 21#include <mach/regs-apbc.h>
22#include <mach/regs-apmu.h>
22#include <mach/irqs.h> 23#include <mach/irqs.h>
23#include <mach/gpio.h> 24#include <mach/gpio.h>
24#include <mach/dma.h> 25#include <mach/dma.h>
@@ -72,6 +73,8 @@ static APBC_CLK(pwm2, PXA168_PWM2, 1, 13000000);
72static APBC_CLK(pwm3, PXA168_PWM3, 1, 13000000); 73static APBC_CLK(pwm3, PXA168_PWM3, 1, 13000000);
73static APBC_CLK(pwm4, PXA168_PWM4, 1, 13000000); 74static APBC_CLK(pwm4, PXA168_PWM4, 1, 13000000);
74 75
76static APMU_CLK(nand, NAND, 0x01db, 208000000);
77
75/* device and clock bindings */ 78/* device and clock bindings */
76static struct clk_lookup pxa168_clkregs[] = { 79static struct clk_lookup pxa168_clkregs[] = {
77 INIT_CLKREG(&clk_uart1, "pxa2xx-uart.0", NULL), 80 INIT_CLKREG(&clk_uart1, "pxa2xx-uart.0", NULL),
@@ -82,6 +85,7 @@ static struct clk_lookup pxa168_clkregs[] = {
82 INIT_CLKREG(&clk_pwm2, "pxa168-pwm.1", NULL), 85 INIT_CLKREG(&clk_pwm2, "pxa168-pwm.1", NULL),
83 INIT_CLKREG(&clk_pwm3, "pxa168-pwm.2", NULL), 86 INIT_CLKREG(&clk_pwm3, "pxa168-pwm.2", NULL),
84 INIT_CLKREG(&clk_pwm4, "pxa168-pwm.3", NULL), 87 INIT_CLKREG(&clk_pwm4, "pxa168-pwm.3", NULL),
88 INIT_CLKREG(&clk_nand, "pxa3xx-nand", NULL),
85}; 89};
86 90
87static int __init pxa168_init(void) 91static int __init pxa168_init(void)
@@ -127,3 +131,4 @@ PXA168_DEVICE(pwm1, "pxa168-pwm", 0, NONE, 0xd401a000, 0x10);
127PXA168_DEVICE(pwm2, "pxa168-pwm", 1, NONE, 0xd401a400, 0x10); 131PXA168_DEVICE(pwm2, "pxa168-pwm", 1, NONE, 0xd401a400, 0x10);
128PXA168_DEVICE(pwm3, "pxa168-pwm", 2, NONE, 0xd401a800, 0x10); 132PXA168_DEVICE(pwm3, "pxa168-pwm", 2, NONE, 0xd401a800, 0x10);
129PXA168_DEVICE(pwm4, "pxa168-pwm", 3, NONE, 0xd401ac00, 0x10); 133PXA168_DEVICE(pwm4, "pxa168-pwm", 3, NONE, 0xd401ac00, 0x10);
134PXA168_DEVICE(nand, "pxa3xx-nand", -1, NAND, 0xd4283000, 0x80, 97, 99);
diff --git a/arch/arm/mach-mmp/pxa910.c b/arch/arm/mach-mmp/pxa910.c
index 5882ca6b49fb..d4049508a4df 100644
--- a/arch/arm/mach-mmp/pxa910.c
+++ b/arch/arm/mach-mmp/pxa910.c
@@ -110,6 +110,8 @@ static APBC_CLK(pwm2, PXA910_PWM2, 1, 13000000);
110static APBC_CLK(pwm3, PXA910_PWM3, 1, 13000000); 110static APBC_CLK(pwm3, PXA910_PWM3, 1, 13000000);
111static APBC_CLK(pwm4, PXA910_PWM4, 1, 13000000); 111static APBC_CLK(pwm4, PXA910_PWM4, 1, 13000000);
112 112
113static APMU_CLK(nand, NAND, 0x01db, 208000000);
114
113/* device and clock bindings */ 115/* device and clock bindings */
114static struct clk_lookup pxa910_clkregs[] = { 116static struct clk_lookup pxa910_clkregs[] = {
115 INIT_CLKREG(&clk_uart1, "pxa2xx-uart.0", NULL), 117 INIT_CLKREG(&clk_uart1, "pxa2xx-uart.0", NULL),
@@ -120,6 +122,7 @@ static struct clk_lookup pxa910_clkregs[] = {
120 INIT_CLKREG(&clk_pwm2, "pxa910-pwm.1", NULL), 122 INIT_CLKREG(&clk_pwm2, "pxa910-pwm.1", NULL),
121 INIT_CLKREG(&clk_pwm3, "pxa910-pwm.2", NULL), 123 INIT_CLKREG(&clk_pwm3, "pxa910-pwm.2", NULL),
122 INIT_CLKREG(&clk_pwm4, "pxa910-pwm.3", NULL), 124 INIT_CLKREG(&clk_pwm4, "pxa910-pwm.3", NULL),
125 INIT_CLKREG(&clk_nand, "pxa3xx-nand", NULL),
123}; 126};
124 127
125static int __init pxa910_init(void) 128static int __init pxa910_init(void)
@@ -174,3 +177,4 @@ PXA910_DEVICE(pwm1, "pxa910-pwm", 0, NONE, 0xd401a000, 0x10);
174PXA910_DEVICE(pwm2, "pxa910-pwm", 1, NONE, 0xd401a400, 0x10); 177PXA910_DEVICE(pwm2, "pxa910-pwm", 1, NONE, 0xd401a400, 0x10);
175PXA910_DEVICE(pwm3, "pxa910-pwm", 2, NONE, 0xd401a800, 0x10); 178PXA910_DEVICE(pwm3, "pxa910-pwm", 2, NONE, 0xd401a800, 0x10);
176PXA910_DEVICE(pwm4, "pxa910-pwm", 3, NONE, 0xd401ac00, 0x10); 179PXA910_DEVICE(pwm4, "pxa910-pwm", 3, NONE, 0xd401ac00, 0x10);
180PXA910_DEVICE(nand, "pxa3xx-nand", -1, NAND, 0xd4283000, 0x80, 97, 99);