| 
					
				 | 
			
			
				@@ -159,3 +159,198 @@ static struct mtd_partition partition_info[] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		.name = "linux kernel(nand)", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		.offset = 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.size = 4 * 1024 * 1024, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.name = "file system(nand)", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.offset = MTDPART_OFS_APPEND, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.size = MTDPART_SIZ_FULL, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct bf5xx_nand_platform bf5xx_nand_platform = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.data_width = NFC_NWIDTH_8, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.partitions = partition_info, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.nr_partitions = ARRAY_SIZE(partition_info), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.rd_dly = 3, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.wr_dly = 3, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct resource bf5xx_nand_resources[] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.start = NFC_CTL, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.end = NFC_DATA_RD + 2, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.flags = IORESOURCE_MEM, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.start = CH_NFC, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.end = CH_NFC, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.flags = IORESOURCE_IRQ, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct platform_device bf5xx_nand_device = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name = "bf5xx-nand", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.id = 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.num_resources = ARRAY_SIZE(bf5xx_nand_resources), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.resource = bf5xx_nand_resources, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.dev = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.platform_data = &bf5xx_nand_platform, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct platform_device rtc_device = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name = "rtc-bfin", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.id   = -1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#include <linux/bfin_mac.h> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static const unsigned short bfin_mac_peripherals[] = P_RMII0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct bfin_phydev_platform_data bfin_phydev_data[] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.addr = 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.irq = IRQ_MAC_PHYINT, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct bfin_mii_bus_platform_data bfin_mii_bus_data = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.phydev_number = 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.phydev_data = bfin_phydev_data, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.phy_mode = PHY_INTERFACE_MODE_RMII, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.mac_peripherals = bfin_mac_peripherals, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct platform_device bfin_mii_bus = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name = "bfin_mii_bus", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.dev = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.platform_data = &bfin_mii_bus_data, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct platform_device bfin_mac_device = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name = "bfin_mac", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.dev = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.platform_data = &bfin_mii_bus, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_MTD_M25P80) \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	|| defined(CONFIG_MTD_M25P80_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct mtd_partition bfin_spi_flash_partitions[] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.name = "bootloader(spi)", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.size = 0x00040000, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.offset = 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.mask_flags = MTD_CAP_ROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.name = "linux kernel(spi)", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.size = MTDPART_SIZ_FULL, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.offset = MTDPART_OFS_APPEND, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct flash_platform_data bfin_spi_flash_data = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name = "m25p80", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.parts = bfin_spi_flash_partitions, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.type = "m25p16", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/* SPI flash chip (m25p64) */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct bfin5xx_spi_chip spi_flash_chip_info = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.enable_dma = 0,         /* use dma transfer with this chip*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct bfin5xx_spi_chip  mmc_spi_chip_info = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.enable_dma = 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct platform_device bfin_i2s = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name = "bfin-i2s", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.id = CONFIG_SND_BF5XX_SPORT_NUM, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	/* TODO: add platform data here */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_SND_BF5XX_TDM) || defined(CONFIG_SND_BF5XX_TDM_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct platform_device bfin_tdm = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.name = "bfin-tdm", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.id = CONFIG_SND_BF5XX_SPORT_NUM, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	/* TODO: add platform data here */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct spi_board_info bfin_spi_board_info[] __initdata = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_MTD_M25P80) \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	|| defined(CONFIG_MTD_M25P80_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		/* the modalias must be the same as spi device driver name */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.modalias = "m25p80", /* Name of spi_driver for this device */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.bus_num = 0, /* Framework bus number */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.platform_data = &bfin_spi_flash_data, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.controller_data = &spi_flash_chip_info, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.mode = SPI_MODE_3, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	|| defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.modalias = "ad183x", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.max_speed_hz = 3125000,     /* max spi clock (SCK) speed in HZ */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.bus_num = 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.chip_select = 4, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.modalias = "mmc_spi", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.max_speed_hz = 30000000,     /* max spi clock (SCK) speed in HZ */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.bus_num = 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.chip_select = GPIO_PH3 + MAX_CTRL_CS, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.controller_data = &mmc_spi_chip_info, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.mode = SPI_MODE_3, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.modalias = "spidev", 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.max_speed_hz = 3125000,     /* max spi clock (SCK) speed in HZ */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.bus_num = 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.chip_select = 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#endif 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+#if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/* SPI controller data */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct bfin5xx_spi_master bfin_spi0_info = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.enable_dma = 1,  /* master has the ability to do dma transfer */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	.pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+}; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+/* SPI (0) */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+static struct resource bfin_spi0_resource[] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	[0] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.start = SPI0_REGBASE, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.end   = SPI0_REGBASE + 0xFF, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.flags = IORESOURCE_MEM, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	[1] = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.start = CH_SPI, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.end   = CH_SPI, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		.flags = IORESOURCE_DMA, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	}, 
			 |