2 * File: arch/blackfin/mach-bf561/generic_board.c
3 * Based on: arch/blackfin/mach-bf533/ezkit.c
4 * Author: Aidan Williams <aidan@nicta.com.au>
10 * Copyright 2005 National ICT Australia (NICTA)
11 * Copyright 2004-2006 Analog Devices Inc.
13 * Bugs: Enter bugs at http://blackfin.uclinux.org/
15 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, see the file COPYING, or write
27 * to the Free Software Foundation, Inc.,
28 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31 #include <linux/device.h>
32 #include <linux/platform_device.h>
33 #include <linux/irq.h>
35 const char bfin_board_name[] = "UNKNOWN BOARD";
38 * Driver needs to know address, irq and flag pin.
40 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
41 static struct resource smc91x_resources[] = {
44 .end = 0x2C010300 + 16,
45 .flags = IORESOURCE_MEM,
47 .start = IRQ_PROG_INTB,
49 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
53 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
57 static struct platform_device smc91x_device = {
60 .num_resources = ARRAY_SIZE(smc91x_resources),
61 .resource = smc91x_resources,
65 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
66 #ifdef CONFIG_BFIN_SIR0
67 static struct resource bfin_sir0_resources[] = {
71 .flags = IORESOURCE_MEM,
74 .start = IRQ_UART0_RX,
75 .end = IRQ_UART0_RX+1,
76 .flags = IORESOURCE_IRQ,
81 .flags = IORESOURCE_DMA,
85 static struct platform_device bfin_sir0_device = {
88 .num_resources = ARRAY_SIZE(bfin_sir0_resources),
89 .resource = bfin_sir0_resources,
94 static struct platform_device *generic_board_devices[] __initdata = {
95 #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
99 #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
100 #ifdef CONFIG_BFIN_SIR0
106 static int __init generic_board_init(void)
108 printk(KERN_INFO "%s(): registering device resources\n", __func__);
109 return platform_add_devices(generic_board_devices,
110 ARRAY_SIZE(generic_board_devices));
113 arch_initcall(generic_board_init);