From 140a9aec22f454120d1953f24cd2b5338b6141e2 Mon Sep 17 00:00:00 2001 From: Michael Hennerich Date: Mon, 21 May 2007 18:09:13 +0800 Subject: Blackfin arch: Add configuration data for ISP176x on BF561 Signed-off-by: Michael Hennerich Signed-off-by: Bryan Wu Signed-off-by: Linus Torvalds --- arch/blackfin/mach-bf561/boards/ezkit.c | 49 +++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'arch/blackfin/mach-bf561') diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c index 14eb4f9a68ea..e8d4058dd7db 100644 --- a/arch/blackfin/mach-bf561/boards/ezkit.c +++ b/arch/blackfin/mach-bf561/boards/ezkit.c @@ -32,12 +32,61 @@ #include #include #include +#include +#include /* * Name the Board for the /proc/cpuinfo */ char *bfin_board_name = "ADDS-BF561-EZKIT"; +#define ISP1761_BASE 0x2C0F0000 +#define ISP1761_IRQ IRQ_PF10 + +#if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE) +static struct resource bfin_isp1761_resources[] = { + [0] = { + .name = "isp1761-regs", + .start = ISP1761_BASE + 0x00000000, + .end = ISP1761_BASE + 0x000fffff, + .flags = IORESOURCE_MEM, + }, + [1] = { + .start = ISP1761_IRQ, + .end = ISP1761_IRQ, + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device bfin_isp1761_device = { + .name = "isp1761", + .id = 0, + .num_resources = ARRAY_SIZE(bfin_isp1761_resources), + .resource = bfin_isp1761_resources, +}; + +static struct platform_device *bfin_isp1761_devices[] = { + &bfin_isp1761_device, +}; + +int __init bfin_isp1761_init(void) +{ + unsigned int num_devices=ARRAY_SIZE(bfin_isp1761_devices); + + printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__); + set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING); + + return platform_add_devices(bfin_isp1761_devices, num_devices); +} + +void __exit bfin_isp1761_exit(void) +{ + platform_device_unregister(&bfin_isp1761_device); +} + +arch_initcall(bfin_isp1761_init); +#endif + /* * USB-LAN EzExtender board * Driver needs to know address, irq and flag pin. -- cgit v1.2.3-59-g8ed1b