| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 | /* * Copyright 2004-20010 Analog Devices Inc. *                2005 National ICT Australia (NICTA) *                      Aidan Williams <aidan@nicta.com.au> * * Licensed under the GPL-2 or later. */#include <linux/device.h>#include <linux/export.h>#include <linux/platform_device.h>#include <linux/mtd/mtd.h>#include <linux/mtd/partitions.h>#include <linux/mtd/physmap.h>#include <linux/spi/spi.h>#include <linux/spi/flash.h>#include <linux/i2c.h>#include <linux/irq.h>#include <linux/interrupt.h>#include <linux/usb/musb.h>#include <linux/leds.h>#include <linux/input.h>#include <asm/dma.h>#include <asm/bfin5xx_spi.h>#include <asm/reboot.h>#include <asm/nand.h>#include <asm/portmux.h>#include <asm/dpmc.h>/* * Name the Board for the /proc/cpuinfo */const char bfin_board_name[] = "ADI BF527-AD7160EVAL";/* *  Driver needs to know address, irq and flag pin. */#if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)static struct resource musb_resources[] = {	[0] = {		.start	= 0xffc03800,		.end	= 0xffc03cff,		.flags	= IORESOURCE_MEM,	},	[1] = {	/* general IRQ */		.start	= IRQ_USB_INT0,		.end	= IRQ_USB_INT0,		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,	},	[2] = {	/* DMA IRQ */		.start	= IRQ_USB_DMA,		.end	= IRQ_USB_DMA,		.flags	= IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,	},};static struct musb_hdrc_config musb_config = {	.multipoint	= 0,	.dyn_fifo	= 0,	.soft_con	= 1,	.dma		= 1,	.num_eps	= 8,	.dma_channels	= 8,	.gpio_vrsel	= GPIO_PG13,	/* Some custom boards need to be active low, just set it to "0"	 * if it is the case.	 */	.gpio_vrsel_active	= 1,	.clkin          = 24,           /* musb CLKIN in MHZ */};static struct musb_hdrc_platform_data musb_plat = {#if defined(CONFIG_USB_MUSB_OTG)	.mode		= MUSB_OTG,#elif defined(CONFIG_USB_MUSB_HDRC_HCD)	.mode		= MUSB_HOST,#elif defined(CONFIG_USB_GADGET_MUSB_HDRC)	.mode		= MUSB_PERIPHERAL,#endif	.config		= &musb_config,};static u64 musb_dmamask = ~(u32)0;static struct platform_device musb_device = {	.name		= "musb-blackfin",	.id		= 0,	.dev = {		.dma_mask		= &musb_dmamask,		.coherent_dma_mask	= 0xffffffff,		.platform_data		= &musb_plat,	},	.num_resources	= ARRAY_SIZE(musb_resources),	.resource	= musb_resources,};#endif#if defined(CONFIG_FB_BFIN_RA158Z) || defined(CONFIG_FB_BFIN_RA158Z_MODULE)static struct resource bf52x_ra158z_resources[] = {	{		.start = IRQ_PPI_ERROR,		.end = IRQ_PPI_ERROR,		.flags = IORESOURCE_IRQ,	},};static struct platform_device bf52x_ra158z_device = {
 |