android_kernel_xiaomi_sm7250/arch/ppc/platforms/4xx/virtex.c
Grant C. Likely 1a42e53d17 [PATCH] powerpc: 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.

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>
2006-02-07 22:35:58 +11:00

57 lines
1.5 KiB
C

/*
* Virtex-II Pro & Virtex-4 FX common infrastructure
*
* Maintainer: Grant Likely <grant.likely@secretlab.ca>
*
* 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/init.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, \
}
struct plat_serial8250_port serial_platform_data[] = {
#ifdef XPAR_UARTNS550_0_BASEADDR
XPAR_UART(0),
#endif
#ifdef XPAR_UARTNS550_1_BASEADDR
XPAR_UART(1),
#endif
#ifdef XPAR_UARTNS550_2_BASEADDR
XPAR_UART(2),
#endif
#ifdef XPAR_UARTNS550_3_BASEADDR
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,
},
};