diff options
author | Ben Dooks <ben-linux@fluff.org> | 2006-06-18 18:04:05 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-06-18 18:04:05 -0400 |
commit | 66a9b49a370baac75d90b7da9a2445997a8a9438 (patch) | |
tree | 62b22d1559c1c1d1e02428f27c08dca0fb66aa83 /arch/arm/mach-s3c2410/devs.c | |
parent | 810c894f2b27b634883723f9fee10a7cf1d0bcb4 (diff) |
[ARM] 3557/1: S3C24XX: centralise and cleanup uart registration
Patch from Ben Dooks
All the S3C24XX based devices currently have similar
uart blocks, in the same location. Make the process
of adding new uart blocks easier by commonising the
device definitions and adding a new init function
for the cpu code.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-s3c2410/devs.c')
-rw-r--r-- | arch/arm/mach-s3c2410/devs.c | 78 |
1 files changed, 77 insertions, 1 deletions
diff --git a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.c index ca09ba516e4c..ad3845e329ba 100644 --- a/arch/arm/mach-s3c2410/devs.c +++ b/arch/arm/mach-s3c2410/devs.c | |||
@@ -38,10 +38,86 @@ | |||
38 | #include <asm/arch/regs-serial.h> | 38 | #include <asm/arch/regs-serial.h> |
39 | 39 | ||
40 | #include "devs.h" | 40 | #include "devs.h" |
41 | #include "cpu.h" | ||
41 | 42 | ||
42 | /* Serial port registrations */ | 43 | /* Serial port registrations */ |
43 | 44 | ||
44 | struct platform_device *s3c24xx_uart_devs[3]; | 45 | static struct resource s3c2410_uart0_resource[] = { |
46 | [0] = { | ||
47 | .start = S3C2410_PA_UART0, | ||
48 | .end = S3C2410_PA_UART0 + 0x3fff, | ||
49 | .flags = IORESOURCE_MEM, | ||
50 | }, | ||
51 | [1] = { | ||
52 | .start = IRQ_S3CUART_RX0, | ||
53 | .end = IRQ_S3CUART_ERR0, | ||
54 | .flags = IORESOURCE_IRQ, | ||
55 | } | ||
56 | }; | ||
57 | |||
58 | static struct resource s3c2410_uart1_resource[] = { | ||
59 | [0] = { | ||
60 | .start = S3C2410_PA_UART1, | ||
61 | .end = S3C2410_PA_UART1 + 0x3fff, | ||
62 | .flags = IORESOURCE_MEM, | ||
63 | }, | ||
64 | [1] = { | ||
65 | .start = IRQ_S3CUART_RX1, | ||
66 | .end = IRQ_S3CUART_ERR1, | ||
67 | .flags = IORESOURCE_IRQ, | ||
68 | } | ||
69 | }; | ||
70 | |||
71 | static struct resource s3c2410_uart2_resource[] = { | ||
72 | [0] = { | ||
73 | .start = S3C2410_PA_UART2, | ||
74 | .end = S3C2410_PA_UART2 + 0x3fff, | ||
75 | .flags = IORESOURCE_MEM, | ||
76 | }, | ||
77 | [1] = { | ||
78 | .start = IRQ_S3CUART_RX2, | ||
79 | .end = IRQ_S3CUART_ERR2, | ||
80 | .flags = IORESOURCE_IRQ, | ||
81 | } | ||
82 | }; | ||
83 | |||
84 | struct s3c24xx_uart_resources s3c2410_uart_resources[] __initdata = { | ||
85 | [0] = { | ||
86 | .resources = s3c2410_uart0_resource, | ||
87 | .nr_resources = ARRAY_SIZE(s3c2410_uart0_resource), | ||
88 | }, | ||
89 | [1] = { | ||
90 | .resources = s3c2410_uart1_resource, | ||
91 | .nr_resources = ARRAY_SIZE(s3c2410_uart1_resource), | ||
92 | }, | ||
93 | [2] = { | ||
94 | .resources = s3c2410_uart2_resource, | ||
95 | .nr_resources = ARRAY_SIZE(s3c2410_uart2_resource), | ||
96 | }, | ||
97 | }; | ||
98 | |||
99 | /* yart devices */ | ||
100 | |||
101 | static struct platform_device s3c24xx_uart_device0 = { | ||
102 | .id = 0, | ||
103 | }; | ||
104 | |||
105 | static struct platform_device s3c24xx_uart_device1 = { | ||
106 | .id = 1, | ||
107 | }; | ||
108 | |||
109 | static struct platform_device s3c24xx_uart_device2 = { | ||
110 | .id = 2, | ||
111 | }; | ||
112 | |||
113 | struct platform_device *s3c24xx_uart_src[3] = { | ||
114 | &s3c24xx_uart_device0, | ||
115 | &s3c24xx_uart_device1, | ||
116 | &s3c24xx_uart_device2, | ||
117 | }; | ||
118 | |||
119 | struct platform_device *s3c24xx_uart_devs[3] = { | ||
120 | }; | ||
45 | 121 | ||
46 | /* USB Host Controller */ | 122 | /* USB Host Controller */ |
47 | 123 | ||