-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PATCH] powerpc: Migrate Xilinx Vertex support from the OCP bus to th…
…e platfom bus. This patch only deals with the serial port definitions as there is no support for any other xilinx IP cores in the kernel tree at the moment. Board specific configuration moved out of virtex.[ch] and into the xparameters.h wrapper. This also prepares for the transition to the flattened device tree model. When the bootloader provides a device tree generated from an xparameters.h files, the kernel will no longer need xparameters/*. The platform bus will get populated with data from the device tree, and the device drivers will be automatically connected to the devices. Only the bootloader (or ppcboot) will need xparameters directly. Signed-off-by: Grant C. Likely <grant.likely@secretlab.ca> Signed-off-by: Paul Mackerras <paulus@samba.org>
- Loading branch information
Grant C. Likely
authored and
Paul Mackerras
committed
Feb 7, 2006
1 parent
562e737
commit 1a42e53
Showing
7 changed files
with
80 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,56 @@ | ||
/* | ||
* arch/ppc/platforms/4xx/virtex.c | ||
* Virtex-II Pro & Virtex-4 FX common infrastructure | ||
* | ||
* Author: MontaVista Software, Inc. | ||
* source@mvista.com | ||
* Maintainer: Grant Likely <grant.likely@secretlab.ca> | ||
* | ||
* 2002-2004 (c) MontaVista Software, Inc. This file is licensed under the | ||
* terms of the GNU General Public License version 2. This program is licensed | ||
* "as is" without any warranty of any kind, whether express or implied. | ||
* Copyright 2005 Secret Lab Technologies Ltd. | ||
* Copyright 2005 General Dynamics Canada Ltd. | ||
* Copyright 2005 Freescale Semiconductor Inc. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the | ||
* Free Software Foundation; either version 2 of the License, or (at your | ||
* option) any later version. | ||
*/ | ||
|
||
#include <linux/config.h> | ||
#include <linux/init.h> | ||
#include <asm/ocp.h> | ||
#include <linux/module.h> | ||
#include <linux/device.h> | ||
#include <linux/serial_8250.h> | ||
#include <asm/ppc_sys.h> | ||
#include <platforms/4xx/virtex.h> | ||
#include <platforms/4xx/xparameters/xparameters.h> | ||
|
||
#define XPAR_UART(num) { \ | ||
.mapbase = XPAR_UARTNS550_##num##_BASEADDR + 3, \ | ||
.irq = XPAR_INTC_0_UARTNS550_##num##_VEC_ID, \ | ||
.iotype = UPIO_MEM, \ | ||
.uartclk = XPAR_UARTNS550_##num##_CLOCK_FREQ_HZ, \ | ||
.flags = UPF_BOOT_AUTOCONF, \ | ||
.regshift = 2, \ | ||
} | ||
|
||
/* Have OCP take care of the serial ports. */ | ||
struct ocp_def core_ocp[] = { | ||
struct plat_serial8250_port serial_platform_data[] = { | ||
#ifdef XPAR_UARTNS550_0_BASEADDR | ||
{ .vendor = OCP_VENDOR_XILINX, | ||
.function = OCP_FUNC_16550, | ||
.index = 0, | ||
.paddr = XPAR_UARTNS550_0_BASEADDR, | ||
.irq = XPAR_INTC_0_UARTNS550_0_VEC_ID, | ||
.pm = OCP_CPM_NA | ||
}, | ||
XPAR_UART(0), | ||
#endif | ||
#ifdef XPAR_UARTNS550_1_BASEADDR | ||
{ .vendor = OCP_VENDOR_XILINX, | ||
.function = OCP_FUNC_16550, | ||
.index = 1, | ||
.paddr = XPAR_UARTNS550_1_BASEADDR, | ||
.irq = XPAR_INTC_0_UARTNS550_1_VEC_ID, | ||
.pm = OCP_CPM_NA | ||
}, | ||
XPAR_UART(1), | ||
#endif | ||
#ifdef XPAR_UARTNS550_2_BASEADDR | ||
{ .vendor = OCP_VENDOR_XILINX, | ||
.function = OCP_FUNC_16550, | ||
.index = 2, | ||
.paddr = XPAR_UARTNS550_2_BASEADDR, | ||
.irq = XPAR_INTC_0_UARTNS550_2_VEC_ID, | ||
.pm = OCP_CPM_NA | ||
}, | ||
XPAR_UART(2), | ||
#endif | ||
#ifdef XPAR_UARTNS550_3_BASEADDR | ||
{ .vendor = OCP_VENDOR_XILINX, | ||
.function = OCP_FUNC_16550, | ||
.index = 3, | ||
.paddr = XPAR_UARTNS550_3_BASEADDR, | ||
.irq = XPAR_INTC_0_UARTNS550_3_VEC_ID, | ||
.pm = OCP_CPM_NA | ||
XPAR_UART(3), | ||
#endif | ||
{ }, /* terminated by empty record */ | ||
}; | ||
|
||
struct platform_device ppc_sys_platform_devices[] = { | ||
[VIRTEX_UART] = { | ||
.name = "serial8250", | ||
.id = 0, | ||
.dev.platform_data = serial_platform_data, | ||
}, | ||
#ifdef XPAR_UARTNS550_4_BASEADDR | ||
#error Edit this file to add more devices. | ||
#endif /* 4 */ | ||
#endif /* 3 */ | ||
#endif /* 2 */ | ||
#endif /* 1 */ | ||
#endif /* 0 */ | ||
{ .vendor = OCP_VENDOR_INVALID | ||
} | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters