|  | @@ -298,3 +298,166 @@ static struct omap_usb_config innovator1510_usb_config __initdata = {
 | 
	
		
			
				|  |  |  	.pins[1]	= 6,
 | 
	
		
			
				|  |  |  	.pins[2]	= 6,		/* Conflicts with UART2 */
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +	.register_dev	= 1,
 | 
	
		
			
				|  |  | +	.pins[0]	= 2,
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static struct omap_lcd_config innovator1510_lcd_config __initdata = {
 | 
	
		
			
				|  |  | +	.ctrl_name	= "internal",
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#ifdef CONFIG_ARCH_OMAP16XX
 | 
	
		
			
				|  |  | +static struct omap_usb_config h2_usb_config __initdata = {
 | 
	
		
			
				|  |  | +	/* usb1 has a Mini-AB port and external isp1301 transceiver */
 | 
	
		
			
				|  |  | +	.otg		= 2,
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#ifdef	CONFIG_USB_GADGET_OMAP
 | 
	
		
			
				|  |  | +	.hmc_mode	= 19,	/* 0:host(off) 1:dev|otg 2:disabled */
 | 
	
		
			
				|  |  | +	/* .hmc_mode	= 21,*/	/* 0:host(off) 1:dev(loopback) 2:host(loopback) */
 | 
	
		
			
				|  |  | +#elif	defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
 | 
	
		
			
				|  |  | +	/* NONSTANDARD CABLE NEEDED (B-to-Mini-B) */
 | 
	
		
			
				|  |  | +	.hmc_mode	= 20,	/* 1:dev|otg(off) 1:host 2:disabled */
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	.pins[1]	= 3,
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static struct omap_lcd_config innovator1610_lcd_config __initdata = {
 | 
	
		
			
				|  |  | +	.ctrl_name	= "internal",
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static int mmc_set_power(struct device *dev, int slot, int power_on,
 | 
	
		
			
				|  |  | +				int vdd)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +	if (power_on)
 | 
	
		
			
				|  |  | +		__raw_writeb(__raw_readb(OMAP1510_FPGA_POWER) | (1 << 3),
 | 
	
		
			
				|  |  | +				OMAP1510_FPGA_POWER);
 | 
	
		
			
				|  |  | +	else
 | 
	
		
			
				|  |  | +		__raw_writeb(__raw_readb(OMAP1510_FPGA_POWER) & ~(1 << 3),
 | 
	
		
			
				|  |  | +				OMAP1510_FPGA_POWER);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	return 0;
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/*
 | 
	
		
			
				|  |  | + * Innovator could use the following functions tested:
 | 
	
		
			
				|  |  | + * - mmc_get_wp that uses OMAP_MPUIO(3)
 | 
	
		
			
				|  |  | + * - mmc_get_cover_state that uses FPGA F4 UIO43
 | 
	
		
			
				|  |  | + */
 | 
	
		
			
				|  |  | +static struct omap_mmc_platform_data mmc1_data = {
 | 
	
		
			
				|  |  | +	.nr_slots                       = 1,
 | 
	
		
			
				|  |  | +	.slots[0]       = {
 | 
	
		
			
				|  |  | +		.set_power		= mmc_set_power,
 | 
	
		
			
				|  |  | +		.wires			= 4,
 | 
	
		
			
				|  |  | +		.name                   = "mmcblk",
 | 
	
		
			
				|  |  | +	},
 | 
	
		
			
				|  |  | +};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static struct omap_mmc_platform_data *mmc_data[OMAP16XX_NR_MMC];
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static void __init innovator_mmc_init(void)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +	mmc_data[0] = &mmc1_data;
 | 
	
		
			
				|  |  | +	omap1_init_mmc(mmc_data, OMAP15XX_NR_MMC);
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#else
 | 
	
		
			
				|  |  | +static inline void innovator_mmc_init(void)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +static void __init innovator_init(void)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +	if (cpu_is_omap1510())
 | 
	
		
			
				|  |  | +		omap1510_fpga_init_irq();
 | 
	
		
			
				|  |  | +	innovator_init_smc91x();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#ifdef CONFIG_ARCH_OMAP15XX
 | 
	
		
			
				|  |  | +	if (cpu_is_omap1510()) {
 | 
	
		
			
				|  |  | +		unsigned char reg;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		/* mux pins for uarts */
 | 
	
		
			
				|  |  | +		omap_cfg_reg(UART1_TX);
 | 
	
		
			
				|  |  | +		omap_cfg_reg(UART1_RTS);
 | 
	
		
			
				|  |  | +		omap_cfg_reg(UART2_TX);
 | 
	
		
			
				|  |  | +		omap_cfg_reg(UART2_RTS);
 | 
	
		
			
				|  |  | +		omap_cfg_reg(UART3_TX);
 | 
	
		
			
				|  |  | +		omap_cfg_reg(UART3_RX);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		reg = __raw_readb(OMAP1510_FPGA_POWER);
 | 
	
		
			
				|  |  | +		reg |= OMAP1510_FPGA_PCR_COM1_EN;
 | 
	
		
			
				|  |  | +		__raw_writeb(reg, OMAP1510_FPGA_POWER);
 | 
	
		
			
				|  |  | +		udelay(10);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		reg = __raw_readb(OMAP1510_FPGA_POWER);
 | 
	
		
			
				|  |  | +		reg |= OMAP1510_FPGA_PCR_COM2_EN;
 | 
	
		
			
				|  |  | +		__raw_writeb(reg, OMAP1510_FPGA_POWER);
 | 
	
		
			
				|  |  | +		udelay(10);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		platform_add_devices(innovator1510_devices, ARRAY_SIZE(innovator1510_devices));
 | 
	
		
			
				|  |  | +		spi_register_board_info(innovator1510_boardinfo,
 | 
	
		
			
				|  |  | +				ARRAY_SIZE(innovator1510_boardinfo));
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +#ifdef CONFIG_ARCH_OMAP16XX
 | 
	
		
			
				|  |  | +	if (!cpu_is_omap1510()) {
 | 
	
		
			
				|  |  | +		innovator1610_smc91x_resources[1].start = gpio_to_irq(0);
 | 
	
		
			
				|  |  | +		innovator1610_smc91x_resources[1].end = gpio_to_irq(0);
 | 
	
		
			
				|  |  | +		platform_add_devices(innovator1610_devices, ARRAY_SIZE(innovator1610_devices));
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +#ifdef CONFIG_ARCH_OMAP15XX
 | 
	
		
			
				|  |  | +	if (cpu_is_omap1510()) {
 | 
	
		
			
				|  |  | +		omap1_usb_init(&innovator1510_usb_config);
 | 
	
		
			
				|  |  | +		omapfb_set_lcd_config(&innovator1510_lcd_config);
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +#ifdef CONFIG_ARCH_OMAP16XX
 | 
	
		
			
				|  |  | +	if (cpu_is_omap1610()) {
 | 
	
		
			
				|  |  | +		omap1_usb_init(&h2_usb_config);
 | 
	
		
			
				|  |  | +		omapfb_set_lcd_config(&innovator1610_lcd_config);
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +	omap_serial_init();
 | 
	
		
			
				|  |  | +	omap_register_i2c_bus(1, 100, NULL, 0);
 | 
	
		
			
				|  |  | +	innovator_mmc_init();
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/*
 | 
	
		
			
				|  |  | + * REVISIT: Assume 15xx for now, we don't want to do revision check
 | 
	
		
			
				|  |  | + * until later on. The right way to fix this is to set up a different
 | 
	
		
			
				|  |  | + * machine_id for 16xx Innovator, or use device tree.
 | 
	
		
			
				|  |  | + */
 | 
	
		
			
				|  |  | +static void __init innovator_map_io(void)
 | 
	
		
			
				|  |  | +{
 | 
	
		
			
				|  |  | +#ifdef CONFIG_ARCH_OMAP15XX
 | 
	
		
			
				|  |  | +	omap15xx_map_io();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	iotable_init(innovator1510_io_desc, ARRAY_SIZE(innovator1510_io_desc));
 | 
	
		
			
				|  |  | +	udelay(10);	/* Delay needed for FPGA */
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +	/* Dump the Innovator FPGA rev early - useful info for support. */
 | 
	
		
			
				|  |  | +	pr_debug("Innovator FPGA Rev %d.%d Board Rev %d\n",
 | 
	
		
			
				|  |  | +			__raw_readb(OMAP1510_FPGA_REV_HIGH),
 | 
	
		
			
				|  |  | +			__raw_readb(OMAP1510_FPGA_REV_LOW),
 | 
	
		
			
				|  |  | +			__raw_readb(OMAP1510_FPGA_BOARD_REV));
 | 
	
		
			
				|  |  | +#endif
 | 
	
		
			
				|  |  | +}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +MACHINE_START(OMAP_INNOVATOR, "TI-Innovator")
 | 
	
		
			
				|  |  | +	/* Maintainer: MontaVista Software, Inc. */
 | 
	
		
			
				|  |  | +	.atag_offset	= 0x100,
 | 
	
		
			
				|  |  | +	.map_io		= innovator_map_io,
 | 
	
		
			
				|  |  | +	.init_early     = omap1_init_early,
 | 
	
		
			
				|  |  | +	.init_irq	= omap1_init_irq,
 | 
	
		
			
				|  |  | +	.init_machine	= innovator_init,
 | 
	
		
			
				|  |  | +	.init_late	= omap1_init_late,
 | 
	
		
			
				|  |  | +	.timer		= &omap1_timer,
 | 
	
		
			
				|  |  | +	.restart	= omap1_restart,
 | 
	
		
			
				|  |  | +MACHINE_END
 |