Kukjin Kim | cfe370f | 2012-04-17 20:05:19 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2009,2012 Samsung Electronics Co., Ltd. |
| 3 | * http://www.samsung.com/ |
| 4 | * |
| 5 | * Base S5P UART resource and device definitions |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License version 2 as |
| 9 | * published by the Free Software Foundation. |
| 10 | */ |
| 11 | |
| 12 | #include <linux/kernel.h> |
| 13 | #include <linux/types.h> |
| 14 | #include <linux/interrupt.h> |
| 15 | #include <linux/list.h> |
| 16 | #include <linux/ioport.h> |
| 17 | #include <linux/platform_device.h> |
| 18 | |
| 19 | #include <asm/mach/arch.h> |
| 20 | #include <asm/mach/irq.h> |
Kukjin Kim | cfe370f | 2012-04-17 20:05:19 -0700 | [diff] [blame] | 21 | #include <mach/map.h> |
| 22 | |
| 23 | #include <plat/devs.h> |
| 24 | |
| 25 | /* Serial port registrations */ |
| 26 | |
| 27 | static struct resource s5p_uart0_resource[] = { |
| 28 | [0] = DEFINE_RES_MEM(S5P_PA_UART0, S5P_SZ_UART), |
| 29 | [1] = DEFINE_RES_IRQ(IRQ_UART0), |
| 30 | }; |
| 31 | |
| 32 | static struct resource s5p_uart1_resource[] = { |
| 33 | [0] = DEFINE_RES_MEM(S5P_PA_UART1, S5P_SZ_UART), |
| 34 | [1] = DEFINE_RES_IRQ(IRQ_UART1), |
| 35 | }; |
| 36 | |
| 37 | static struct resource s5p_uart2_resource[] = { |
| 38 | [0] = DEFINE_RES_MEM(S5P_PA_UART2, S5P_SZ_UART), |
| 39 | [1] = DEFINE_RES_IRQ(IRQ_UART2), |
| 40 | }; |
| 41 | |
| 42 | static struct resource s5p_uart3_resource[] = { |
| 43 | #if CONFIG_SERIAL_SAMSUNG_UARTS > 3 |
| 44 | [0] = DEFINE_RES_MEM(S5P_PA_UART3, S5P_SZ_UART), |
| 45 | [1] = DEFINE_RES_IRQ(IRQ_UART3), |
| 46 | #endif |
| 47 | }; |
| 48 | |
| 49 | static struct resource s5p_uart4_resource[] = { |
| 50 | #if CONFIG_SERIAL_SAMSUNG_UARTS > 4 |
| 51 | [0] = DEFINE_RES_MEM(S5P_PA_UART4, S5P_SZ_UART), |
| 52 | [1] = DEFINE_RES_IRQ(IRQ_UART4), |
| 53 | #endif |
| 54 | }; |
| 55 | |
| 56 | static struct resource s5p_uart5_resource[] = { |
| 57 | #if CONFIG_SERIAL_SAMSUNG_UARTS > 5 |
| 58 | [0] = DEFINE_RES_MEM(S5P_PA_UART5, S5P_SZ_UART), |
| 59 | [1] = DEFINE_RES_IRQ(IRQ_UART5), |
| 60 | #endif |
| 61 | }; |
| 62 | |
| 63 | struct s3c24xx_uart_resources s5p_uart_resources[] __initdata = { |
| 64 | [0] = { |
| 65 | .resources = s5p_uart0_resource, |
| 66 | .nr_resources = ARRAY_SIZE(s5p_uart0_resource), |
| 67 | }, |
| 68 | [1] = { |
| 69 | .resources = s5p_uart1_resource, |
| 70 | .nr_resources = ARRAY_SIZE(s5p_uart1_resource), |
| 71 | }, |
| 72 | [2] = { |
| 73 | .resources = s5p_uart2_resource, |
| 74 | .nr_resources = ARRAY_SIZE(s5p_uart2_resource), |
| 75 | }, |
| 76 | [3] = { |
| 77 | .resources = s5p_uart3_resource, |
| 78 | .nr_resources = ARRAY_SIZE(s5p_uart3_resource), |
| 79 | }, |
| 80 | [4] = { |
| 81 | .resources = s5p_uart4_resource, |
| 82 | .nr_resources = ARRAY_SIZE(s5p_uart4_resource), |
| 83 | }, |
| 84 | [5] = { |
| 85 | .resources = s5p_uart5_resource, |
| 86 | .nr_resources = ARRAY_SIZE(s5p_uart5_resource), |
| 87 | }, |
| 88 | }; |