Krzysztof Kozlowski | 28a196f | 2017-12-25 20:54:33 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 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 |
Ben Dooks | 0241cbb | 2008-10-21 14:06:46 +0100 | [diff] [blame] | 9 | |
| 10 | #include <linux/kernel.h> |
| 11 | #include <linux/types.h> |
| 12 | #include <linux/interrupt.h> |
| 13 | #include <linux/list.h> |
| 14 | #include <linux/platform_device.h> |
| 15 | |
| 16 | #include <asm/mach/arch.h> |
| 17 | #include <asm/mach/irq.h> |
| 18 | #include <mach/hardware.h> |
| 19 | #include <mach/map.h> |
Arnd Bergmann | ba27904 | 2015-02-27 22:06:58 +0100 | [diff] [blame] | 20 | #include <mach/irqs.h> |
Ben Dooks | 0241cbb | 2008-10-21 14:06:46 +0100 | [diff] [blame] | 21 | |
| 22 | #include <plat/devs.h> |
| 23 | |
| 24 | /* Serial port registrations */ |
| 25 | |
| 26 | /* 64xx uarts are closer together */ |
| 27 | |
| 28 | static struct resource s3c64xx_uart0_resource[] = { |
Tushar Behera | 99c7165 | 2012-05-12 16:12:26 +0900 | [diff] [blame] | 29 | [0] = DEFINE_RES_MEM(S3C_PA_UART0, SZ_256), |
| 30 | [1] = DEFINE_RES_IRQ(IRQ_UART0), |
Ben Dooks | 0241cbb | 2008-10-21 14:06:46 +0100 | [diff] [blame] | 31 | }; |
| 32 | |
| 33 | static struct resource s3c64xx_uart1_resource[] = { |
Tushar Behera | 99c7165 | 2012-05-12 16:12:26 +0900 | [diff] [blame] | 34 | [0] = DEFINE_RES_MEM(S3C_PA_UART1, SZ_256), |
| 35 | [1] = DEFINE_RES_IRQ(IRQ_UART1), |
Ben Dooks | 0241cbb | 2008-10-21 14:06:46 +0100 | [diff] [blame] | 36 | }; |
| 37 | |
| 38 | static struct resource s3c6xx_uart2_resource[] = { |
Tushar Behera | 99c7165 | 2012-05-12 16:12:26 +0900 | [diff] [blame] | 39 | [0] = DEFINE_RES_MEM(S3C_PA_UART2, SZ_256), |
| 40 | [1] = DEFINE_RES_IRQ(IRQ_UART2), |
Ben Dooks | 0241cbb | 2008-10-21 14:06:46 +0100 | [diff] [blame] | 41 | }; |
| 42 | |
| 43 | static struct resource s3c64xx_uart3_resource[] = { |
Tushar Behera | 99c7165 | 2012-05-12 16:12:26 +0900 | [diff] [blame] | 44 | [0] = DEFINE_RES_MEM(S3C_PA_UART3, SZ_256), |
| 45 | [1] = DEFINE_RES_IRQ(IRQ_UART3), |
Ben Dooks | 0241cbb | 2008-10-21 14:06:46 +0100 | [diff] [blame] | 46 | }; |
| 47 | |
| 48 | |
| 49 | struct s3c24xx_uart_resources s3c64xx_uart_resources[] __initdata = { |
| 50 | [0] = { |
| 51 | .resources = s3c64xx_uart0_resource, |
| 52 | .nr_resources = ARRAY_SIZE(s3c64xx_uart0_resource), |
| 53 | }, |
| 54 | [1] = { |
| 55 | .resources = s3c64xx_uart1_resource, |
| 56 | .nr_resources = ARRAY_SIZE(s3c64xx_uart1_resource), |
| 57 | }, |
| 58 | [2] = { |
| 59 | .resources = s3c6xx_uart2_resource, |
| 60 | .nr_resources = ARRAY_SIZE(s3c6xx_uart2_resource), |
| 61 | }, |
| 62 | [3] = { |
| 63 | .resources = s3c64xx_uart3_resource, |
| 64 | .nr_resources = ARRAY_SIZE(s3c64xx_uart3_resource), |
| 65 | }, |
| 66 | }; |