diff options
Diffstat (limited to 'arch/ppc/platforms/4xx/virtex.c')
-rw-r--r-- | arch/ppc/platforms/4xx/virtex.c | 88 |
1 files changed, 42 insertions, 46 deletions
diff --git a/arch/ppc/platforms/4xx/virtex.c b/arch/ppc/platforms/4xx/virtex.c index bbb12c0c0b2c..133a83147199 100644 --- a/arch/ppc/platforms/4xx/virtex.c +++ b/arch/ppc/platforms/4xx/virtex.c | |||
@@ -1,60 +1,56 @@ | |||
1 | /* | 1 | /* |
2 | * arch/ppc/platforms/4xx/virtex.c | 2 | * Virtex-II Pro & Virtex-4 FX common infrastructure |
3 | * | 3 | * |
4 | * Author: MontaVista Software, Inc. | 4 | * Maintainer: Grant Likely <grant.likely@secretlab.ca> |
5 | * source@mvista.com | ||
6 | * | 5 | * |
7 | * 2002-2004 (c) MontaVista Software, Inc. This file is licensed under the | 6 | * Copyright 2005 Secret Lab Technologies Ltd. |
8 | * terms of the GNU General Public License version 2. This program is licensed | 7 | * Copyright 2005 General Dynamics Canada Ltd. |
9 | * "as is" without any warranty of any kind, whether express or implied. | 8 | * Copyright 2005 Freescale Semiconductor Inc. |
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License as published by the | ||
12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
13 | * option) any later version. | ||
10 | */ | 14 | */ |
11 | 15 | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/init.h> | 16 | #include <linux/init.h> |
14 | #include <asm/ocp.h> | 17 | #include <linux/module.h> |
18 | #include <linux/device.h> | ||
19 | #include <linux/serial_8250.h> | ||
20 | #include <asm/ppc_sys.h> | ||
15 | #include <platforms/4xx/virtex.h> | 21 | #include <platforms/4xx/virtex.h> |
22 | #include <platforms/4xx/xparameters/xparameters.h> | ||
23 | |||
24 | #define XPAR_UART(num) { \ | ||
25 | .mapbase = XPAR_UARTNS550_##num##_BASEADDR + 3, \ | ||
26 | .irq = XPAR_INTC_0_UARTNS550_##num##_VEC_ID, \ | ||
27 | .iotype = UPIO_MEM, \ | ||
28 | .uartclk = XPAR_UARTNS550_##num##_CLOCK_FREQ_HZ, \ | ||
29 | .flags = UPF_BOOT_AUTOCONF, \ | ||
30 | .regshift = 2, \ | ||
31 | } | ||
16 | 32 | ||
17 | /* Have OCP take care of the serial ports. */ | 33 | struct plat_serial8250_port serial_platform_data[] = { |
18 | struct ocp_def core_ocp[] = { | ||
19 | #ifdef XPAR_UARTNS550_0_BASEADDR | 34 | #ifdef XPAR_UARTNS550_0_BASEADDR |
20 | { .vendor = OCP_VENDOR_XILINX, | 35 | XPAR_UART(0), |
21 | .function = OCP_FUNC_16550, | 36 | #endif |
22 | .index = 0, | ||
23 | .paddr = XPAR_UARTNS550_0_BASEADDR, | ||
24 | .irq = XPAR_INTC_0_UARTNS550_0_VEC_ID, | ||
25 | .pm = OCP_CPM_NA | ||
26 | }, | ||
27 | #ifdef XPAR_UARTNS550_1_BASEADDR | 37 | #ifdef XPAR_UARTNS550_1_BASEADDR |
28 | { .vendor = OCP_VENDOR_XILINX, | 38 | XPAR_UART(1), |
29 | .function = OCP_FUNC_16550, | 39 | #endif |
30 | .index = 1, | ||
31 | .paddr = XPAR_UARTNS550_1_BASEADDR, | ||
32 | .irq = XPAR_INTC_0_UARTNS550_1_VEC_ID, | ||
33 | .pm = OCP_CPM_NA | ||
34 | }, | ||
35 | #ifdef XPAR_UARTNS550_2_BASEADDR | 40 | #ifdef XPAR_UARTNS550_2_BASEADDR |
36 | { .vendor = OCP_VENDOR_XILINX, | 41 | XPAR_UART(2), |
37 | .function = OCP_FUNC_16550, | 42 | #endif |
38 | .index = 2, | ||
39 | .paddr = XPAR_UARTNS550_2_BASEADDR, | ||
40 | .irq = XPAR_INTC_0_UARTNS550_2_VEC_ID, | ||
41 | .pm = OCP_CPM_NA | ||
42 | }, | ||
43 | #ifdef XPAR_UARTNS550_3_BASEADDR | 43 | #ifdef XPAR_UARTNS550_3_BASEADDR |
44 | { .vendor = OCP_VENDOR_XILINX, | 44 | XPAR_UART(3), |
45 | .function = OCP_FUNC_16550, | 45 | #endif |
46 | .index = 3, | 46 | { }, /* terminated by empty record */ |
47 | .paddr = XPAR_UARTNS550_3_BASEADDR, | 47 | }; |
48 | .irq = XPAR_INTC_0_UARTNS550_3_VEC_ID, | 48 | |
49 | .pm = OCP_CPM_NA | 49 | struct platform_device ppc_sys_platform_devices[] = { |
50 | [VIRTEX_UART] = { | ||
51 | .name = "serial8250", | ||
52 | .id = 0, | ||
53 | .dev.platform_data = serial_platform_data, | ||
50 | }, | 54 | }, |
51 | #ifdef XPAR_UARTNS550_4_BASEADDR | ||
52 | #error Edit this file to add more devices. | ||
53 | #endif /* 4 */ | ||
54 | #endif /* 3 */ | ||
55 | #endif /* 2 */ | ||
56 | #endif /* 1 */ | ||
57 | #endif /* 0 */ | ||
58 | { .vendor = OCP_VENDOR_INVALID | ||
59 | } | ||
60 | }; | 55 | }; |
56 | |||