2007-05-21 03:09:21 -07:00
|
|
|
/*
|
|
|
|
* File: arch/blackfin/mach-bf561/tepla.c
|
|
|
|
*
|
|
|
|
* Copyright 2004-2007 Analog Devices Inc.
|
|
|
|
* Only SMSC91C1111 was registered, may do more later.
|
|
|
|
*
|
|
|
|
* Copyright 2005 National ICT Australia (NICTA), Aidan Williams <aidan@nicta.com.au>
|
|
|
|
* Thanks to Jamey Hicks.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/device.h>
|
|
|
|
#include <linux/platform_device.h>
|
2007-07-12 07:58:21 -07:00
|
|
|
#include <linux/irq.h>
|
2007-05-21 03:09:21 -07:00
|
|
|
|
2007-10-21 07:36:06 -07:00
|
|
|
const char bfin_board_name[] = "Tepla-BF561";
|
2007-05-21 03:09:21 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Driver needs to know address, irq and flag pin.
|
|
|
|
*/
|
|
|
|
static struct resource smc91x_resources[] = {
|
|
|
|
{
|
|
|
|
.start = 0x2C000300,
|
|
|
|
.end = 0x2C000320,
|
|
|
|
.flags = IORESOURCE_MEM,
|
2007-07-12 07:58:21 -07:00
|
|
|
}, {
|
2007-05-21 03:09:21 -07:00
|
|
|
.start = IRQ_PROG_INTB,
|
|
|
|
.end = IRQ_PROG_INTB,
|
|
|
|
.flags = IORESOURCE_IRQ|IORESOURCE_IRQ_HIGHLEVEL,
|
2007-07-12 07:58:21 -07:00
|
|
|
}, {
|
2007-05-21 03:09:21 -07:00
|
|
|
.start = IRQ_PF7,
|
|
|
|
.end = IRQ_PF7,
|
|
|
|
.flags = IORESOURCE_IRQ|IORESOURCE_IRQ_HIGHLEVEL,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device smc91x_device = {
|
|
|
|
.name = "smc91x",
|
|
|
|
.id = 0,
|
|
|
|
.num_resources = ARRAY_SIZE(smc91x_resources),
|
|
|
|
.resource = smc91x_resources,
|
|
|
|
};
|
|
|
|
|
2009-01-07 08:14:39 -07:00
|
|
|
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
|
|
|
#ifdef CONFIG_BFIN_SIR0
|
|
|
|
static struct resource bfin_sir0_resources[] = {
|
|
|
|
{
|
|
|
|
.start = 0xFFC00400,
|
|
|
|
.end = 0xFFC004FF,
|
|
|
|
.flags = IORESOURCE_MEM,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.start = IRQ_UART0_RX,
|
|
|
|
.end = IRQ_UART0_RX+1,
|
|
|
|
.flags = IORESOURCE_IRQ,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
.start = CH_UART0_RX,
|
|
|
|
.end = CH_UART0_RX+1,
|
|
|
|
.flags = IORESOURCE_DMA,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct platform_device bfin_sir0_device = {
|
|
|
|
.name = "bfin_sir",
|
|
|
|
.id = 0,
|
|
|
|
.num_resources = ARRAY_SIZE(bfin_sir0_resources),
|
|
|
|
.resource = bfin_sir0_resources,
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2007-05-21 03:09:21 -07:00
|
|
|
static struct platform_device *tepla_devices[] __initdata = {
|
|
|
|
&smc91x_device,
|
2009-01-07 08:14:39 -07:00
|
|
|
#if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
|
|
|
|
#ifdef CONFIG_BFIN_SIR0
|
|
|
|
&bfin_sir0_device,
|
|
|
|
#endif
|
|
|
|
#endif
|
2007-05-21 03:09:21 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
static int __init tepla_init(void)
|
|
|
|
{
|
2008-04-22 18:39:01 -07:00
|
|
|
printk(KERN_INFO "%s(): registering device resources\n", __func__);
|
2007-05-21 03:09:21 -07:00
|
|
|
return platform_add_devices(tepla_devices, ARRAY_SIZE(tepla_devices));
|
|
|
|
}
|
|
|
|
|
|
|
|
arch_initcall(tepla_init);
|