2019-05-30 06:57:47 +07:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
2006-06-19 21:29:43 +07:00
|
|
|
/*
|
|
|
|
* arch/arm/mach-netx/nxdkn.c
|
|
|
|
*
|
|
|
|
* Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/dma-mapping.h>
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/interrupt.h>
|
|
|
|
#include <linux/mtd/plat-ram.h>
|
|
|
|
#include <linux/platform_device.h>
|
|
|
|
#include <linux/amba/bus.h>
|
|
|
|
#include <linux/amba/clcd.h>
|
|
|
|
|
2008-08-05 22:14:15 +07:00
|
|
|
#include <mach/hardware.h>
|
2006-06-19 21:29:43 +07:00
|
|
|
#include <asm/mach-types.h>
|
|
|
|
#include <asm/mach/arch.h>
|
2008-08-05 22:14:15 +07:00
|
|
|
#include <mach/netx-regs.h>
|
2012-08-24 20:15:15 +07:00
|
|
|
#include <linux/platform_data/eth-netx.h>
|
2006-06-19 21:29:43 +07:00
|
|
|
|
|
|
|
#include "generic.h"
|
|
|
|
|
|
|
|
static struct netxeth_platform_data eth0_platform_data = {
|
|
|
|
.xcno = 0,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device nxdkn_eth0_device = {
|
|
|
|
.name = "netx-eth",
|
|
|
|
.id = 0,
|
|
|
|
.num_resources = 0,
|
|
|
|
.resource = NULL,
|
|
|
|
.dev = {
|
|
|
|
.platform_data = ð0_platform_data,
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct netxeth_platform_data eth1_platform_data = {
|
|
|
|
.xcno = 1,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device nxdkn_eth1_device = {
|
|
|
|
.name = "netx-eth",
|
|
|
|
.id = 1,
|
|
|
|
.num_resources = 0,
|
|
|
|
.resource = NULL,
|
|
|
|
.dev = {
|
|
|
|
.platform_data = ð1_platform_data,
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct resource netx_uart0_resources[] = {
|
|
|
|
[0] = {
|
|
|
|
.start = 0x00100A00,
|
|
|
|
.end = 0x00100A3F,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
[1] = {
|
|
|
|
.start = (NETX_IRQ_UART0),
|
|
|
|
.end = (NETX_IRQ_UART0),
|
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device netx_uart0_device = {
|
|
|
|
.name = "netx-uart",
|
|
|
|
.id = 0,
|
|
|
|
.num_resources = ARRAY_SIZE(netx_uart0_resources),
|
|
|
|
.resource = netx_uart0_resources,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device *devices[] __initdata = {
|
|
|
|
&nxdkn_eth0_device,
|
|
|
|
&nxdkn_eth1_device,
|
|
|
|
&netx_uart0_device,
|
|
|
|
};
|
|
|
|
|
|
|
|
static void __init nxdkn_init(void)
|
|
|
|
{
|
|
|
|
platform_add_devices(devices, ARRAY_SIZE(devices));
|
|
|
|
}
|
|
|
|
|
|
|
|
MACHINE_START(NXDKN, "Hilscher nxdkn")
|
2011-07-06 09:38:14 +07:00
|
|
|
.atag_offset = 0x100,
|
2006-06-19 21:29:43 +07:00
|
|
|
.map_io = netx_map_io,
|
|
|
|
.init_irq = netx_init_irq,
|
2012-11-09 02:40:59 +07:00
|
|
|
.init_time = netx_timer_init,
|
2006-06-19 21:29:43 +07:00
|
|
|
.init_machine = nxdkn_init,
|
2011-11-11 22:12:17 +07:00
|
|
|
.restart = netx_restart,
|
2006-06-19 21:29:43 +07:00
|
|
|
MACHINE_END
|