14 #include <linux/device.h>
15 #include <linux/export.h>
16 #include <linux/kernel.h>
28 #include <linux/i2c.h>
33 #include <asm/reboot.h>
41 #define FLASH_MAC 0x202f0000
42 #define CONFIG_MTD_PHYSMAP_LEN 0x300000
44 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
51 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
53 static const unsigned short bfin_mac_peripherals[] =
P_RMII0;
64 .phydev_data = bfin_phydev_data,
66 .mac_peripherals = bfin_mac_peripherals,
70 .
name =
"bfin_mii_bus",
72 .platform_data = &bfin_mii_bus_data,
79 .platform_data = &bfin_mii_bus,
84 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
87 .
name =
"bootloader(nor)",
91 .name =
"linux kernel and rootfs(nor)",
92 .size = 0x300000 - 0x30000 - 0x10000,
95 .name =
"MAC address(nor)",
104 .parts = asmb_flash_partitions,
105 .nr_parts =
ARRAY_SIZE(asmb_flash_partitions),
108 static struct resource asmb_flash_resource = {
118 .
name =
"physmap-flash",
121 .platform_data = &asmb_flash_data,
124 .resource = &asmb_flash_resource,
128 #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
130 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
138 #if defined(CONFIG_MTD_DATAFLASH) || defined(CONFIG_MTD_DATAFLASH_MODULE)
142 static struct mtd_partition bfin_spi_dataflash_partitions[] = {
144 .
name =
"JFFS2 dataflash(nor)",
145 #ifdef CONFIG_MTD_PAGESIZE_1024
156 .
name =
"mtd_dataflash",
157 .parts = bfin_spi_dataflash_partitions,
158 .nr_parts =
ARRAY_SIZE(bfin_spi_dataflash_partitions),
159 .type =
"mtd_dataflash",
169 #if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
171 .modalias =
"mmc_spi",
172 .max_speed_hz = 20000000,
175 .controller_data = &mmc_spi_chip_info,
181 #if defined(CONFIG_MTD_DATAFLASH) || defined(CONFIG_MTD_DATAFLASH_MODULE)
183 .modalias =
"mtd_dataflash",
184 .max_speed_hz = 16700000,
187 .platform_data = &bfin_spi_dataflash_data,
188 .controller_data = &spi_dataflash_chip_info,
196 static struct resource bfin_spi0_resource[] = {
223 .num_resources =
ARRAY_SIZE(bfin_spi0_resource),
224 .resource = bfin_spi0_resource,
226 .platform_data = &spi_bfin_master_info,
231 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
232 #ifdef CONFIG_SERIAL_BFIN_UART0
233 static struct resource bfin_uart0_resources[] = {
266 static unsigned short bfin_uart0_peripherals[] = {
273 .num_resources =
ARRAY_SIZE(bfin_uart0_resources),
274 .resource = bfin_uart0_resources,
276 .platform_data = &bfin_uart0_peripherals,
281 #ifdef CONFIG_SERIAL_BFIN_UART1
282 static struct resource bfin_uart1_resources[] = {
315 static unsigned short bfin_uart1_peripherals[] = {
322 .num_resources =
ARRAY_SIZE(bfin_uart1_resources),
323 .resource = bfin_uart1_resources,
325 .platform_data = &bfin_uart1_peripherals,
331 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
334 static struct resource bfin_twi0_resource[] = {
348 .
name =
"i2c-bfin-twi",
350 .num_resources =
ARRAY_SIZE(bfin_twi0_resource),
351 .resource = bfin_twi0_resource,
353 .platform_data = &bfin_twi0_pins,
360 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
361 #ifdef CONFIG_SERIAL_BFIN_UART0
364 #ifdef CONFIG_SERIAL_BFIN_UART1
369 #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
373 #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
378 #if defined(CONFIG_SPI_BFIN5XX) || defined(CONFIG_SPI_BFIN5XX_MODULE)
379 &spi_bfin_master_device,
382 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
383 &i2c_bfin_twi_device,
386 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
392 static int __init dnp5370_init(
void)