diff options
| author | Heiko Stuebner <heiko@sntech.de> | 2012-05-12 03:22:17 -0400 |
|---|---|---|
| committer | Kukjin Kim <kgene.kim@samsung.com> | 2012-05-12 03:22:17 -0400 |
| commit | 618ae08a8804cc545e692f12293e3dd165c4dd77 (patch) | |
| tree | 31d370a5cefca66d9ff556e9c4817ab62abc4c65 | |
| parent | 4a9f52fd8959481e75af2f1e17283813892fdd72 (diff) | |
ARM: S3C24XX: move plat-s3c24xx/dev-uart.c into common.c
The uart devices are used on all s3c24xx machines, so they can reside
in the common code for all machines.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
| -rw-r--r-- | arch/arm/mach-s3c24xx/common.c | 73 | ||||
| -rw-r--r-- | arch/arm/plat-s3c24xx/Makefile | 1 | ||||
| -rw-r--r-- | arch/arm/plat-s3c24xx/dev-uart.c | 100 |
3 files changed, 73 insertions, 101 deletions
diff --git a/arch/arm/mach-s3c24xx/common.c b/arch/arm/mach-s3c24xx/common.c index dc9927b13746..5e4ac347f01e 100644 --- a/arch/arm/mach-s3c24xx/common.c +++ b/arch/arm/mach-s3c24xx/common.c | |||
| @@ -234,3 +234,76 @@ void __init s3c24xx_init_io(struct map_desc *mach_desc, int size) | |||
| 234 | 234 | ||
| 235 | s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); | 235 | s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids)); |
| 236 | } | 236 | } |
| 237 | |||
| 238 | /* Serial port registrations */ | ||
| 239 | |||
| 240 | static struct resource s3c2410_uart0_resource[] = { | ||
| 241 | [0] = { | ||
| 242 | .start = S3C2410_PA_UART0, | ||
| 243 | .end = S3C2410_PA_UART0 + 0x3fff, | ||
| 244 | .flags = IORESOURCE_MEM, | ||
| 245 | }, | ||
| 246 | [1] = { | ||
| 247 | .start = IRQ_S3CUART_RX0, | ||
| 248 | .end = IRQ_S3CUART_ERR0, | ||
| 249 | .flags = IORESOURCE_IRQ, | ||
| 250 | } | ||
| 251 | }; | ||
| 252 | |||
| 253 | static struct resource s3c2410_uart1_resource[] = { | ||
| 254 | [0] = { | ||
| 255 | .start = S3C2410_PA_UART1, | ||
| 256 | .end = S3C2410_PA_UART1 + 0x3fff, | ||
| 257 | .flags = IORESOURCE_MEM, | ||
| 258 | }, | ||
| 259 | [1] = { | ||
| 260 | .start = IRQ_S3CUART_RX1, | ||
| 261 | .end = IRQ_S3CUART_ERR1, | ||
| 262 | .flags = IORESOURCE_IRQ, | ||
| 263 | } | ||
| 264 | }; | ||
| 265 | |||
| 266 | static struct resource s3c2410_uart2_resource[] = { | ||
| 267 | [0] = { | ||
| 268 | .start = S3C2410_PA_UART2, | ||
| 269 | .end = S3C2410_PA_UART2 + 0x3fff, | ||
| 270 | .flags = IORESOURCE_MEM, | ||
| 271 | }, | ||
| 272 | [1] = { | ||
| 273 | .start = IRQ_S3CUART_RX2, | ||
| 274 | .end = IRQ_S3CUART_ERR2, | ||
| 275 | .flags = IORESOURCE_IRQ, | ||
| 276 | } | ||
| 277 | }; | ||
| 278 | |||
| 279 | static struct resource s3c2410_uart3_resource[] = { | ||
| 280 | [0] = { | ||
| 281 | .start = S3C2443_PA_UART3, | ||
| 282 | .end = S3C2443_PA_UART3 + 0x3fff, | ||
| 283 | .flags = IORESOURCE_MEM, | ||
| 284 | }, | ||
| 285 | [1] = { | ||
| 286 | .start = IRQ_S3CUART_RX3, | ||
| 287 | .end = IRQ_S3CUART_ERR3, | ||
| 288 | .flags = IORESOURCE_IRQ, | ||
| 289 | }, | ||
| 290 | }; | ||
| 291 | |||
| 292 | struct s3c24xx_uart_resources s3c2410_uart_resources[] __initdata = { | ||
| 293 | [0] = { | ||
| 294 | .resources = s3c2410_uart0_resource, | ||
| 295 | .nr_resources = ARRAY_SIZE(s3c2410_uart0_resource), | ||
| 296 | }, | ||
| 297 | [1] = { | ||
| 298 | .resources = s3c2410_uart1_resource, | ||
| 299 | .nr_resources = ARRAY_SIZE(s3c2410_uart1_resource), | ||
| 300 | }, | ||
| 301 | [2] = { | ||
| 302 | .resources = s3c2410_uart2_resource, | ||
| 303 | .nr_resources = ARRAY_SIZE(s3c2410_uart2_resource), | ||
| 304 | }, | ||
| 305 | [3] = { | ||
| 306 | .resources = s3c2410_uart3_resource, | ||
| 307 | .nr_resources = ARRAY_SIZE(s3c2410_uart3_resource), | ||
| 308 | }, | ||
| 309 | }; | ||
diff --git a/arch/arm/plat-s3c24xx/Makefile b/arch/arm/plat-s3c24xx/Makefile index f7fe935b8525..1e3126a2902e 100644 --- a/arch/arm/plat-s3c24xx/Makefile +++ b/arch/arm/plat-s3c24xx/Makefile | |||
| @@ -13,7 +13,6 @@ obj- := | |||
| 13 | # Core files | 13 | # Core files |
| 14 | 14 | ||
| 15 | obj-y += irq.o | 15 | obj-y += irq.o |
| 16 | obj-y += dev-uart.o | ||
| 17 | obj-y += clock.o | 16 | obj-y += clock.o |
| 18 | obj-$(CONFIG_S3C24XX_DCLK) += clock-dclk.o | 17 | obj-$(CONFIG_S3C24XX_DCLK) += clock-dclk.o |
| 19 | 18 | ||
diff --git a/arch/arm/plat-s3c24xx/dev-uart.c b/arch/arm/plat-s3c24xx/dev-uart.c deleted file mode 100644 index 9ab22e662fff..000000000000 --- a/arch/arm/plat-s3c24xx/dev-uart.c +++ /dev/null | |||
| @@ -1,100 +0,0 @@ | |||
| 1 | /* linux/arch/arm/plat-s3c24xx/dev-uart.c | ||
| 2 | * | ||
| 3 | * Copyright (c) 2004 Simtec Electronics | ||
| 4 | * Ben Dooks <ben@simtec.co.uk> | ||
| 5 | * | ||
| 6 | * Base S3C24XX UART resource and platform device definitions | ||
| 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 | #include <linux/kernel.h> | ||
| 14 | #include <linux/types.h> | ||
| 15 | #include <linux/interrupt.h> | ||
| 16 | #include <linux/list.h> | ||
| 17 | #include <linux/serial_core.h> | ||
| 18 | #include <linux/platform_device.h> | ||
| 19 | |||
| 20 | #include <asm/mach/arch.h> | ||
| 21 | #include <asm/mach/map.h> | ||
| 22 | #include <asm/mach/irq.h> | ||
| 23 | #include <mach/hardware.h> | ||
| 24 | #include <mach/map.h> | ||
| 25 | |||
| 26 | #include <plat/devs.h> | ||
| 27 | #include <plat/regs-serial.h> | ||
| 28 | |||
| 29 | /* Serial port registrations */ | ||
| 30 | |||
| 31 | static struct resource s3c2410_uart0_resource[] = { | ||
| 32 | [0] = { | ||
| 33 | .start = S3C2410_PA_UART0, | ||
| 34 | .end = S3C2410_PA_UART0 + 0x3fff, | ||
| 35 | .flags = IORESOURCE_MEM, | ||
| 36 | }, | ||
| 37 | [1] = { | ||
| 38 | .start = IRQ_S3CUART_RX0, | ||
| 39 | .end = IRQ_S3CUART_ERR0, | ||
| 40 | .flags = IORESOURCE_IRQ, | ||
| 41 | } | ||
| 42 | }; | ||
| 43 | |||
| 44 | static struct resource s3c2410_uart1_resource[] = { | ||
| 45 | [0] = { | ||
| 46 | .start = S3C2410_PA_UART1, | ||
| 47 | .end = S3C2410_PA_UART1 + 0x3fff, | ||
| 48 | .flags = IORESOURCE_MEM, | ||
| 49 | }, | ||
| 50 | [1] = { | ||
| 51 | .start = IRQ_S3CUART_RX1, | ||
| 52 | .end = IRQ_S3CUART_ERR1, | ||
| 53 | .flags = IORESOURCE_IRQ, | ||
| 54 | } | ||
| 55 | }; | ||
| 56 | |||
| 57 | static struct resource s3c2410_uart2_resource[] = { | ||
| 58 | [0] = { | ||
| 59 | .start = S3C2410_PA_UART2, | ||
| 60 | .end = S3C2410_PA_UART2 + 0x3fff, | ||
| 61 | .flags = IORESOURCE_MEM, | ||
| 62 | }, | ||
| 63 | [1] = { | ||
| 64 | .start = IRQ_S3CUART_RX2, | ||
| 65 | .end = IRQ_S3CUART_ERR2, | ||
| 66 | .flags = IORESOURCE_IRQ, | ||
| 67 | } | ||
| 68 | }; | ||
| 69 | |||
| 70 | static struct resource s3c2410_uart3_resource[] = { | ||
| 71 | [0] = { | ||
| 72 | .start = S3C2443_PA_UART3, | ||
| 73 | .end = S3C2443_PA_UART3 + 0x3fff, | ||
| 74 | .flags = IORESOURCE_MEM, | ||
| 75 | }, | ||
| 76 | [1] = { | ||
| 77 | .start = IRQ_S3CUART_RX3, | ||
| 78 | .end = IRQ_S3CUART_ERR3, | ||
| 79 | .flags = IORESOURCE_IRQ, | ||
| 80 | }, | ||
| 81 | }; | ||
| 82 | |||
| 83 | struct s3c24xx_uart_resources s3c2410_uart_resources[] __initdata = { | ||
| 84 | [0] = { | ||
| 85 | .resources = s3c2410_uart0_resource, | ||
| 86 | .nr_resources = ARRAY_SIZE(s3c2410_uart0_resource), | ||
| 87 | }, | ||
| 88 | [1] = { | ||
| 89 | .resources = s3c2410_uart1_resource, | ||
| 90 | .nr_resources = ARRAY_SIZE(s3c2410_uart1_resource), | ||
| 91 | }, | ||
| 92 | [2] = { | ||
| 93 | .resources = s3c2410_uart2_resource, | ||
| 94 | .nr_resources = ARRAY_SIZE(s3c2410_uart2_resource), | ||
| 95 | }, | ||
| 96 | [3] = { | ||
| 97 | .resources = s3c2410_uart3_resource, | ||
| 98 | .nr_resources = ARRAY_SIZE(s3c2410_uart3_resource), | ||
| 99 | }, | ||
| 100 | }; | ||
