Migrate Xilinx Vertex support from the OCP bus to the platfom bus.
PATCH 3/10 Migrate Xilinx Vertex support from the OCP bus to the 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.
Board specific XPAR values now get bound to common defines with a 'VIRTEX_' prefix. That way, xparameters_*.h files may be vastly different, but they can be wired up to use the same infrastructure.
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.
---
arch/ppc/boot/common/ns16550.c | 3 + arch/ppc/boot/simple/embed_config.c | 3 + arch/ppc/platforms/4xx/Kconfig | 5 - arch/ppc/platforms/4xx/virtex.c | 96 +++++++++++----------- arch/ppc/platforms/4xx/virtex.h | 88 +++----------------- arch/ppc/platforms/4xx/xparameters/xparameters.h | 37 ++++++++ include/asm-ppc/ppc_sys.h | 2 7 files changed, 102 insertions(+), 132 deletions(-)
12b633efc6a622e20a58d224aaa2089591469e27
arch/ppc/boot/common/ns16550.c +3 -0
@@ -8,6 +8,9 @@#include <linux/serial_reg.h> #include <asm/serial.h> +#if defined(CONFIG_XILINX_VIRTEX ) +#include <platforms/4xx/xparameters/xparameters.h> +#endif #include "nonstdio.h" #include "serial.h"
arch/ppc/boot/simple/embed_config.c +3 -0
@@ -21,6 +21,9 @@#ifdef CONFIG_40x#include <asm/io.h> #endif +#ifdef CONFIG_XILINX_VIRTEX +#include <platforms/4xx/xparameters/xparameters.h> +#endif extern unsigned long timebase_period_ns;/* For those boards that don't provide one.
arch/ppc/platforms/4xx/Kconfig +0 -5
@@ -172,11 +172,6 @@ config IBM_OCP depends on ASH || BAMBOO || BUBINGA || CPCI405 || EBONY || EP405 || LUAN || YUCCA || OCOTEA || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT default y -config XILINX_OCP - bool - depends on XILINX_ML300 - default y - config IBM_EMAC4 bool depends on 440GX || 440SP || 440SPE
arch/ppc/platforms/4xx/virtex.c +47 -49
107 lines not on this page · raw message
arch/ppc/platforms/4xx/virtex.h +12 -76
97 lines not on this page · raw message
arch/ppc/platforms/4xx/xparameters/xparameters.h +35 -2
@@ -1,7 +1,8 @@/* * include/asm-ppc/xparameters.h * -* This file includes the correct xparameters.h for the CONFIG'ed board +* This file includes the correct xparameters.h for the CONFIG'ed board plus +* fixups to translate board specific XPAR values to a common set of names * * Author: MontaVista Software, Inc. * [email protected]
@@ -14,5 +15,37 @@#include <linux/config.h> #if defined(CONFIG_XILINX_ML300 ) -#include <platforms/4xx/xparameters/xparameters_ml300.h> +#include "xparameters_ml300.h" + +/* Serial ports; 0x1000 is added to base addr because 16550 IP core has +* an offset between base address and the standard registers. */ +#define VIRTEX_UART_0_BASEADDR (XPAR_OPB_UART16550_0_BASEADDR + 0x1000) +#define VIRTEX_UART_0_IRQ XPAR_DCR_INTC_0_OPB_UART16550_0_IP2INTC_IRPT_INTR +#define VIRTEX_UART_0_CLK XPAR_XUARTNS550_CLOCK_HZ + +#define VIRTEX_UART_1_BASEADDR (XPAR_OPB_UART16550_1_BASEADDR + 0x1000) +#define VIRTEX_UART_1_IRQ XPAR_DCR_INTC_0_OPB_UART16550_1_IP2INTC_IRPT_INTR +#define VIRTEX_UART_1_CLK XPAR_XUARTNS550_CLOCK_HZ + +/* Values for setting up interrupt controller */ +#define VIRTEX_XINTC_USE_DCR XPAR_XINTC_USE_DCR +#define VIRTEX_INTC_BASEADDR XPAR_DCR_INTC_0_BASEADDR +#define VIRTEX_INTC_KIND_OF_INTR XPAR_DCR_INTC_0_KIND_OF_INTR + +#else +/* Add other board xparameter includes here before the #else */ +#error No *_xparameters.h file included +#endif + +#ifndef SERIAL_PORT_DFNS +/* zImage serial port definitions */ +#define RS_TABLE_SIZE 1 +#define SERIAL_PORT_DFNS { \ + .baud_base = VIRTEX_UART_0_CLK/16, \ + .irq = VIRTEX_UART_0_IRQ, \ + .flags = ASYNC_BOOT_AUTOCONF, \ + .iomem_base = (u8 *)VIRTEX_UART_0_BASEADDR + 3, \ + .iomem_reg_shift = 2, \ + .io_type = SERIAL_IO_MEM, \ + },#endif
include/asm-ppc/ppc_sys.h +2 -0
@@ -33,6 +33,8 @@#include <asm/mpc52xx.h> #elif defined(CONFIG_MPC10X_BRIDGE )#include <asm/mpc10x.h> +#elif defined(CONFIG_XILINX_VIRTEX ) +#include <platforms/4xx/virtex.h> #else #error "need definition of ppc_sys_devices"#endif
Signature · 1 line
1.1.2-g9e9b-dirty