|  | @@ -322,3 +322,100 @@ static struct platform_device bfin_can_device = {
 | 
	
		
			
				|  |  |  	.name = "bfin_can",
 | 
	
		
			
				|  |  |  	.num_resources = ARRAY_SIZE(bfin_can_resources),
 | 
	
		
			
				|  |  |  	.resource = bfin_can_resources,
 | 
	
		
			
				|  |  | +	.dev = {
 | 
	
		
			
				|  |  | +		.platform_data = &bfin_can_peripherals, /* Passed to driver */
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
 | 
	
		
			
				|  |  | +#include <linux/bfin_mac.h>
 | 
	
		
			
				|  |  | +static const unsigned short bfin_mac_peripherals[] = P_MII0;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static struct bfin_phydev_platform_data bfin_phydev_data[] = {
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		.addr = 1,
 | 
	
		
			
				|  |  | +		.irq = PHY_POLL, /* 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_MII,
 | 
	
		
			
				|  |  | +	.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_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
 | 
	
		
			
				|  |  | +static struct resource net2272_bfin_resources[] = {
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		.start = 0x20300000,
 | 
	
		
			
				|  |  | +		.end = 0x20300000 + 0x100,
 | 
	
		
			
				|  |  | +		.flags = IORESOURCE_MEM,
 | 
	
		
			
				|  |  | +	}, {
 | 
	
		
			
				|  |  | +		.start = 1,
 | 
	
		
			
				|  |  | +		.flags = IORESOURCE_BUS,
 | 
	
		
			
				|  |  | +	}, {
 | 
	
		
			
				|  |  | +		.start = IRQ_PF7,
 | 
	
		
			
				|  |  | +		.end = IRQ_PF7,
 | 
	
		
			
				|  |  | +		.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static struct platform_device net2272_bfin_device = {
 | 
	
		
			
				|  |  | +	.name = "net2272",
 | 
	
		
			
				|  |  | +	.id = -1,
 | 
	
		
			
				|  |  | +	.num_resources = ARRAY_SIZE(net2272_bfin_resources),
 | 
	
		
			
				|  |  | +	.resource = net2272_bfin_resources,
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE)
 | 
	
		
			
				|  |  | +const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL };
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static struct mtd_partition bfin_plat_nand_partitions[] = {
 | 
	
		
			
				|  |  | +	{
 | 
	
		
			
				|  |  | +		.name   = "linux kernel(nand)",
 | 
	
		
			
				|  |  | +		.size   = 0x400000,
 | 
	
		
			
				|  |  | +		.offset = 0,
 | 
	
		
			
				|  |  | +	}, {
 | 
	
		
			
				|  |  | +		.name   = "file system(nand)",
 | 
	
		
			
				|  |  | +		.size   = MTDPART_SIZ_FULL,
 | 
	
		
			
				|  |  | +		.offset = MTDPART_OFS_APPEND,
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#define BFIN_NAND_PLAT_CLE 2
 | 
	
		
			
				|  |  | +#define BFIN_NAND_PLAT_ALE 1
 | 
	
		
			
				|  |  | +static void bfin_plat_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +	struct nand_chip *this = mtd->priv;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	if (cmd == NAND_CMD_NONE)
 | 
	
		
			
				|  |  | +		return;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	if (ctrl & NAND_CLE)
 | 
	
		
			
				|  |  | +		writeb(cmd, this->IO_ADDR_W + (1 << BFIN_NAND_PLAT_CLE));
 | 
	
		
			
				|  |  | +	else
 | 
	
		
			
				|  |  | +		writeb(cmd, this->IO_ADDR_W + (1 << BFIN_NAND_PLAT_ALE));
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#define BFIN_NAND_PLAT_READY GPIO_PF3
 | 
	
		
			
				|  |  | +static int bfin_plat_nand_dev_ready(struct mtd_info *mtd)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +	return gpio_get_value(BFIN_NAND_PLAT_READY);
 |