| 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> | 
 | 26 |  | 
 | 27 | #include <plat/devs.h> | 
 | 28 |  | 
 | 29 | /* Serial port registrations */ | 
 | 30 |  | 
 | 31 | /* 64xx uarts are closer together */ | 
 | 32 |  | 
 | 33 | static struct resource s3c64xx_uart0_resource[] = { | 
 | 34 | 	[0] = { | 
 | 35 | 		.start	= S3C_PA_UART0, | 
 | 36 | 		.end	= S3C_PA_UART0 + 0x100, | 
 | 37 | 		.flags	= IORESOURCE_MEM, | 
 | 38 | 	}, | 
 | 39 | 	[1] = { | 
| Thomas Abraham | 2a8d7bd | 2011-08-10 15:51:20 +0530 | [diff] [blame] | 40 | 		.start	= IRQ_UART0, | 
 | 41 | 		.end	= IRQ_UART0, | 
| Ben Dooks | 0241cbb | 2008-10-21 14:06:46 +0100 | [diff] [blame] | 42 | 		.flags	= IORESOURCE_IRQ, | 
 | 43 | 	}, | 
| Ben Dooks | 0241cbb | 2008-10-21 14:06:46 +0100 | [diff] [blame] | 44 | }; | 
 | 45 |  | 
 | 46 | static struct resource s3c64xx_uart1_resource[] = { | 
 | 47 | 	[0] = { | 
 | 48 | 		.start = S3C_PA_UART1, | 
 | 49 | 		.end   = S3C_PA_UART1 + 0x100, | 
 | 50 | 		.flags = IORESOURCE_MEM, | 
 | 51 | 	}, | 
 | 52 | 	[1] = { | 
| Thomas Abraham | 2a8d7bd | 2011-08-10 15:51:20 +0530 | [diff] [blame] | 53 | 		.start	= IRQ_UART1, | 
 | 54 | 		.end	= IRQ_UART1, | 
| Ben Dooks | 0241cbb | 2008-10-21 14:06:46 +0100 | [diff] [blame] | 55 | 		.flags	= IORESOURCE_IRQ, | 
 | 56 | 	}, | 
 | 57 | }; | 
 | 58 |  | 
 | 59 | static struct resource s3c6xx_uart2_resource[] = { | 
 | 60 | 	[0] = { | 
 | 61 | 		.start = S3C_PA_UART2, | 
 | 62 | 		.end   = S3C_PA_UART2 + 0x100, | 
 | 63 | 		.flags = IORESOURCE_MEM, | 
 | 64 | 	}, | 
 | 65 | 	[1] = { | 
| Thomas Abraham | 2a8d7bd | 2011-08-10 15:51:20 +0530 | [diff] [blame] | 66 | 		.start	= IRQ_UART2, | 
 | 67 | 		.end	= IRQ_UART2, | 
| Ben Dooks | 0241cbb | 2008-10-21 14:06:46 +0100 | [diff] [blame] | 68 | 		.flags	= IORESOURCE_IRQ, | 
 | 69 | 	}, | 
 | 70 | }; | 
 | 71 |  | 
 | 72 | static struct resource s3c64xx_uart3_resource[] = { | 
 | 73 | 	[0] = { | 
 | 74 | 		.start = S3C_PA_UART3, | 
 | 75 | 		.end   = S3C_PA_UART3 + 0x100, | 
 | 76 | 		.flags = IORESOURCE_MEM, | 
 | 77 | 	}, | 
 | 78 | 	[1] = { | 
| Thomas Abraham | 2a8d7bd | 2011-08-10 15:51:20 +0530 | [diff] [blame] | 79 | 		.start	= IRQ_UART3, | 
 | 80 | 		.end	= IRQ_UART3, | 
| Ben Dooks | 0241cbb | 2008-10-21 14:06:46 +0100 | [diff] [blame] | 81 | 		.flags	= IORESOURCE_IRQ, | 
 | 82 | 	}, | 
 | 83 | }; | 
 | 84 |  | 
 | 85 |  | 
 | 86 | struct s3c24xx_uart_resources s3c64xx_uart_resources[] __initdata = { | 
 | 87 | 	[0] = { | 
 | 88 | 		.resources	= s3c64xx_uart0_resource, | 
 | 89 | 		.nr_resources	= ARRAY_SIZE(s3c64xx_uart0_resource), | 
 | 90 | 	}, | 
 | 91 | 	[1] = { | 
 | 92 | 		.resources	= s3c64xx_uart1_resource, | 
 | 93 | 		.nr_resources	= ARRAY_SIZE(s3c64xx_uart1_resource), | 
 | 94 | 	}, | 
 | 95 | 	[2] = { | 
 | 96 | 		.resources	= s3c6xx_uart2_resource, | 
 | 97 | 		.nr_resources	= ARRAY_SIZE(s3c6xx_uart2_resource), | 
 | 98 | 	}, | 
 | 99 | 	[3] = { | 
 | 100 | 		.resources	= s3c64xx_uart3_resource, | 
 | 101 | 		.nr_resources	= ARRAY_SIZE(s3c64xx_uart3_resource), | 
 | 102 | 	}, | 
 | 103 | }; |