Ben Dooks | 0241cbb | 2008-10-21 14:06:46 +0100 | [diff] [blame] | 1 | /* linux/arch/arm/plat-s3c64xx/dev-uart.c |
| 2 | * |
| 3 | * Copyright 2008 Openmoko, Inc. |
| 4 | * Copyright 2008 Simtec Electronics |
| 5 | * Ben Dooks <ben@simtec.co.uk> |
| 6 | * http://armlinux.simtec.co.uk/ |
| 7 | * |
| 8 | * Base S3C64XX UART resource and device definitions |
| 9 | * |
| 10 | * This program is free software; you can redistribute it and/or modify |
| 11 | * it under the terms of the GNU General Public License version 2 as |
| 12 | * published by the Free Software Foundation. |
| 13 | * |
| 14 | */ |
| 15 | |
| 16 | #include <linux/kernel.h> |
| 17 | #include <linux/types.h> |
| 18 | #include <linux/interrupt.h> |
| 19 | #include <linux/list.h> |
| 20 | #include <linux/platform_device.h> |
| 21 | |
| 22 | #include <asm/mach/arch.h> |
| 23 | #include <asm/mach/irq.h> |
| 24 | #include <mach/hardware.h> |
| 25 | #include <mach/map.h> |
Arnd Bergmann | ba27904 | 2015-02-27 22:06:58 +0100 | [diff] [blame] | 26 | #include <mach/irqs.h> |
Ben Dooks | 0241cbb | 2008-10-21 14:06:46 +0100 | [diff] [blame] | 27 | |
| 28 | #include <plat/devs.h> |
| 29 | |
| 30 | /* Serial port registrations */ |
| 31 | |
| 32 | /* 64xx uarts are closer together */ |
| 33 | |
| 34 | static struct resource s3c64xx_uart0_resource[] = { |
Tushar Behera | 99c7165 | 2012-05-12 16:12:26 +0900 | [diff] [blame] | 35 | [0] = DEFINE_RES_MEM(S3C_PA_UART0, SZ_256), |
| 36 | [1] = DEFINE_RES_IRQ(IRQ_UART0), |
Ben Dooks | 0241cbb | 2008-10-21 14:06:46 +0100 | [diff] [blame] | 37 | }; |
| 38 | |
| 39 | static struct resource s3c64xx_uart1_resource[] = { |
Tushar Behera | 99c7165 | 2012-05-12 16:12:26 +0900 | [diff] [blame] | 40 | [0] = DEFINE_RES_MEM(S3C_PA_UART1, SZ_256), |
| 41 | [1] = DEFINE_RES_IRQ(IRQ_UART1), |
Ben Dooks | 0241cbb | 2008-10-21 14:06:46 +0100 | [diff] [blame] | 42 | }; |
| 43 | |
| 44 | static struct resource s3c6xx_uart2_resource[] = { |
Tushar Behera | 99c7165 | 2012-05-12 16:12:26 +0900 | [diff] [blame] | 45 | [0] = DEFINE_RES_MEM(S3C_PA_UART2, SZ_256), |
| 46 | [1] = DEFINE_RES_IRQ(IRQ_UART2), |
Ben Dooks | 0241cbb | 2008-10-21 14:06:46 +0100 | [diff] [blame] | 47 | }; |
| 48 | |
| 49 | static struct resource s3c64xx_uart3_resource[] = { |
Tushar Behera | 99c7165 | 2012-05-12 16:12:26 +0900 | [diff] [blame] | 50 | [0] = DEFINE_RES_MEM(S3C_PA_UART3, SZ_256), |
| 51 | [1] = DEFINE_RES_IRQ(IRQ_UART3), |
Ben Dooks | 0241cbb | 2008-10-21 14:06:46 +0100 | [diff] [blame] | 52 | }; |
| 53 | |
| 54 | |
| 55 | struct s3c24xx_uart_resources s3c64xx_uart_resources[] __initdata = { |
| 56 | [0] = { |
| 57 | .resources = s3c64xx_uart0_resource, |
| 58 | .nr_resources = ARRAY_SIZE(s3c64xx_uart0_resource), |
| 59 | }, |
| 60 | [1] = { |
| 61 | .resources = s3c64xx_uart1_resource, |
| 62 | .nr_resources = ARRAY_SIZE(s3c64xx_uart1_resource), |
| 63 | }, |
| 64 | [2] = { |
| 65 | .resources = s3c6xx_uart2_resource, |
| 66 | .nr_resources = ARRAY_SIZE(s3c6xx_uart2_resource), |
| 67 | }, |
| 68 | [3] = { |
| 69 | .resources = s3c64xx_uart3_resource, |
| 70 | .nr_resources = ARRAY_SIZE(s3c64xx_uart3_resource), |
| 71 | }, |
| 72 | }; |