static void __init n8x0_usb_init(void) { int ret = 0; static char announce[] __initdata = KERN_INFO "TUSB 6010\n"; /* PM companion chip power control pin */ ret = gpio_request_one(TUSB6010_GPIO_ENABLE, GPIOF_OUT_INIT_LOW, "TUSB6010 enable"); if (ret != 0) { printk(KERN_ERR "Could not get TUSB power GPIO%i\n", TUSB6010_GPIO_ENABLE); return; } tusb_set_power(0); ret = tusb6010_setup_interface(&tusb_data, TUSB6010_REFCLK_19, 2, TUSB6010_ASYNC_CS, TUSB6010_SYNC_CS, TUSB6010_GPIO_INT, TUSB6010_DMACHAN); if (ret != 0) goto err; printk(announce); return; err: gpio_free(TUSB6010_GPIO_ENABLE); }
void __init n800_usb_init(void) { int ret = 0; static char announce[] __initdata = KERN_INFO "TUSB 6010\n"; /* PM companion chip power control pin */ ret = omap_request_gpio(GPIO_TUSB_ENABLE); if (ret != 0) { printk(KERN_ERR "Could not get TUSB power GPIO%i\n", GPIO_TUSB_ENABLE); return; } omap_set_gpio_direction(GPIO_TUSB_ENABLE, 0); tusb_set_power(0); ret = tusb6010_setup_interface(&tusb_data, TUSB6010_REFCLK_19, 2, TUSB_ASYNC_CS, TUSB_SYNC_CS, GPIO_TUSB_INT, 0x3f); if (ret != 0) goto err; printk(announce); return; err: omap_free_gpio(GPIO_TUSB_ENABLE); }
static void __init tusb_evm_setup(void) { static char announce[] __initdata = KERN_INFO "TUSB 6010 EVM\n"; int irq; unsigned dmachan = 0; /* There are at least 32 different combinations of boards that * are loosely called "H4", with a 2420 ... different OMAP chip * revisions (with pin mux changes for DMAREQ, GPMC errata, etc), * modifications of the CPU board, mainboard, EVM, TUSB etc. * Plus omap2422, omap2423, etc. * * So you might need to tweak this setup to make the TUSB EVM * behave on your particular setup ... */ /* Already set up: GPMC AD[0..15], CLK, nOE, nWE, nADV_ALE */ omap_cfg_reg(E2_GPMC_NCS2); omap_cfg_reg(L2_GPMC_NCS7); omap_cfg_reg(M1_GPMC_WAIT2); switch ((system_rev >> 8) & 0x0f) { case 0: /* ES 1.0 */ case 1: /* ES 2.0 */ /* Assume early board revision without optional ES2.0 * rework to swap J15 & AA10 so DMAREQ0 works */ omap_cfg_reg(AA10_242X_GPIO13); irq = 13; /* omap_cfg_reg(J15_24XX_DMAREQ0); */ break; default: /* Later Menelaus boards can support all 6 DMA request * lines, at the price of boot flash A23-A26. */ omap_cfg_reg(J15_24XX_GPIO99); irq = 99; dmachan = (1 << 1) | (1 << 0); #if !(defined(CONFIG_MTD_OMAP_NOR) || defined(CONFIG_MTD_OMAP_NOR_MODULE)) dmachan |= (1 << 5) | (1 << 4) (1 << 3) | (1 << 2); #endif break; } if (tusb6010_setup_interface(&tusb_data, TUSB6010_REFCLK_24, /* waitpin */ 2, /* async cs */ 2, /* sync cs */ 7, irq, dmachan) == 0) printk(announce); }