1/* linux/arch/arm/plat-s5p/dev-uart.c 2 * 3 * Copyright (c) 2009 Samsung Electronics Co., Ltd. 4 * http://www.samsung.com/ 5 * 6 * Base S5P UART resource and 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/platform_device.h> 18 19#include <asm/mach/arch.h> 20#include <asm/mach/irq.h> 21#include <mach/hardware.h> 22#include <mach/map.h> 23 24#include <plat/devs.h> 25 26 /* Serial port registrations */ 27 28static struct resource s5p_uart0_resource[] = { 29 [0] = { 30 .start = S5P_PA_UART0, 31 .end = S5P_PA_UART0 + S5P_SZ_UART - 1, 32 .flags = IORESOURCE_MEM, 33 }, 34 [1] = { 35 .start = IRQ_UART0, 36 .end = IRQ_UART0, 37 .flags = IORESOURCE_IRQ, 38 }, 39}; 40 41static struct resource s5p_uart1_resource[] = { 42 [0] = { 43 .start = S5P_PA_UART1, 44 .end = S5P_PA_UART1 + S5P_SZ_UART - 1, 45 .flags = IORESOURCE_MEM, 46 }, 47 [1] = { 48 .start = IRQ_UART1, 49 .end = IRQ_UART1, 50 .flags = IORESOURCE_IRQ, 51 }, 52}; 53 54static struct resource s5p_uart2_resource[] = { 55 [0] = { 56 .start = S5P_PA_UART2, 57 .end = S5P_PA_UART2 + S5P_SZ_UART - 1, 58 .flags = IORESOURCE_MEM, 59 }, 60 [1] = { 61 .start = IRQ_UART2, 62 .end = IRQ_UART2, 63 .flags = IORESOURCE_IRQ, 64 }, 65}; 66 67static struct resource s5p_uart3_resource[] = { 68#if CONFIG_SERIAL_SAMSUNG_UARTS > 3 69 [0] = { 70 .start = S5P_PA_UART3, 71 .end = S5P_PA_UART3 + S5P_SZ_UART - 1, 72 .flags = IORESOURCE_MEM, 73 }, 74 [1] = { 75 .start = IRQ_UART3, 76 .end = IRQ_UART3, 77 .flags = IORESOURCE_IRQ, 78 }, 79#endif 80}; 81 82static struct resource s5p_uart4_resource[] = { 83#if CONFIG_SERIAL_SAMSUNG_UARTS > 4 84 [0] = { 85 .start = S5P_PA_UART4, 86 .end = S5P_PA_UART4 + S5P_SZ_UART - 1, 87 .flags = IORESOURCE_MEM, 88 }, 89 [1] = { 90 .start = IRQ_UART4, 91 .end = IRQ_UART4, 92 .flags = IORESOURCE_IRQ, 93 }, 94#endif 95}; 96 97static struct resource s5p_uart5_resource[] = { 98#if CONFIG_SERIAL_SAMSUNG_UARTS > 5 99 [0] = { 100 .start = S5P_PA_UART5, 101 .end = S5P_PA_UART5 + S5P_SZ_UART - 1, 102 .flags = IORESOURCE_MEM, 103 }, 104 [1] = { 105 .start = IRQ_UART5, 106 .end = IRQ_UART5, 107 .flags = IORESOURCE_IRQ, 108 }, 109#endif 110}; 111 112struct s3c24xx_uart_resources s5p_uart_resources[] __initdata = { 113 [0] = { 114 .resources = s5p_uart0_resource, 115 .nr_resources = ARRAY_SIZE(s5p_uart0_resource), 116 }, 117 [1] = { 118 .resources = s5p_uart1_resource, 119 .nr_resources = ARRAY_SIZE(s5p_uart1_resource), 120 }, 121 [2] = { 122 .resources = s5p_uart2_resource, 123 .nr_resources = ARRAY_SIZE(s5p_uart2_resource), 124 }, 125 [3] = { 126 .resources = s5p_uart3_resource, 127 .nr_resources = ARRAY_SIZE(s5p_uart3_resource), 128 }, 129 [4] = { 130 .resources = s5p_uart4_resource, 131 .nr_resources = ARRAY_SIZE(s5p_uart4_resource), 132 }, 133 [5] = { 134 .resources = s5p_uart5_resource, 135 .nr_resources = ARRAY_SIZE(s5p_uart5_resource), 136 }, 137}; 138