static void __init tosa_init(void) { int dummy; pxa2xx_mfp_config(ARRAY_AND_SIZE(tosa_pin_config)); gpio_set_wake(MFP_PIN_GPIO1, 1); /* We can't pass to gpio-keys since it will drop the Reset altfunc */ init_gpio_reset(TOSA_GPIO_ON_RESET, 0); pm_power_off = tosa_poweroff; arm_pm_restart = tosa_restart; PCFR |= PCFR_OPDE; /* enable batt_fault */ PMCR = 0x01; dummy = gpiochip_reserve(TOSA_SCOOP_GPIO_BASE, 12); dummy = gpiochip_reserve(TOSA_SCOOP_JC_GPIO_BASE, 12); dummy = gpiochip_reserve(TOSA_TC6393XB_GPIO_BASE, 16); pxa_set_mci_info(&tosa_mci_platform_data); pxa_set_udc_info(&udc_info); pxa_set_ficp_info(&tosa_ficp_platform_data); pxa_set_i2c_info(NULL); platform_scoop_config = &tosa_pcmcia_config; clk_add_alias("CLK_CK3P6MI", &tc6393xb_device.dev, "GPIO11_CLK", NULL); platform_add_devices(devices, ARRAY_SIZE(devices)); }
static void __init hx4700_init(void) { int ret; PCFR = PCFR_GPR_EN | PCFR_OPDE; pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config)); gpio_set_wake(GPIO12_HX4700_ASIC3_IRQ, 1); ret = gpio_request_array(ARRAY_AND_SIZE(global_gpios)); if (ret) pr_err ("hx4700: Failed to request GPIOs.\n"); pxa_set_ffuart_info(NULL); pxa_set_btuart_info(NULL); pxa_set_stuart_info(NULL); platform_add_devices(devices, ARRAY_SIZE(devices)); pwm_add_table(hx4700_pwm_lookup, ARRAY_SIZE(hx4700_pwm_lookup)); pxa_set_ficp_info(&ficp_info); pxa27x_set_i2c_power_info(NULL); pxa_set_i2c_info(NULL); i2c_register_board_info(0, ARRAY_AND_SIZE(i2c_board_info)); i2c_register_board_info(1, ARRAY_AND_SIZE(pi2c_board_info)); pxa2xx_set_spi_info(2, &pxa_ssp2_master_info); spi_register_board_info(ARRAY_AND_SIZE(tsc2046_board_info)); gpio_set_value(GPIO71_HX4700_ASIC3_nRESET, 0); mdelay(10); gpio_set_value(GPIO71_HX4700_ASIC3_nRESET, 1); mdelay(10); }
static void __init corgi_init(void) { pm_power_off = corgi_poweroff; /* Stop 3.6MHz and drive HIGH to PCMCIA and CS */ PCFR |= PCFR_OPDE; pxa2xx_mfp_config(ARRAY_AND_SIZE(corgi_pin_config)); /* allow wakeup from various GPIOs */ gpio_set_wake(CORGI_GPIO_KEY_INT, 1); gpio_set_wake(CORGI_GPIO_WAKEUP, 1); gpio_set_wake(CORGI_GPIO_AC_IN, 1); gpio_set_wake(CORGI_GPIO_CHRG_FULL, 1); if (!machine_is_corgi()) gpio_set_wake(CORGI_GPIO_MAIN_BAT_LOW, 1); pxa_set_ffuart_info(NULL); pxa_set_btuart_info(NULL); pxa_set_stuart_info(NULL); corgi_init_spi(); pxa_set_udc_info(&udc_info); pxa_set_mci_info(&corgi_mci_platform_data); pxa_set_ficp_info(&corgi_ficp_platform_data); pxa_set_i2c_info(NULL); i2c_register_board_info(0, ARRAY_AND_SIZE(corgi_i2c_devices)); platform_scoop_config = &corgi_pcmcia_config; if (machine_is_husky()) sharpsl_nand_partitions[1].size = 53 * 1024 * 1024; platform_add_devices(devices, ARRAY_SIZE(devices)); regulator_has_full_constraints(); }
static void __init tosa_init(void) { int dummy; pxa2xx_mfp_config(ARRAY_AND_SIZE(tosa_pin_config)); pxa_set_ffuart_info(NULL); pxa_set_btuart_info(NULL); pxa_set_stuart_info(NULL); gpio_set_wake(MFP_PIN_GPIO1, 1); init_gpio_reset(TOSA_GPIO_ON_RESET, 0, 0); pm_power_off = tosa_poweroff; PCFR |= PCFR_OPDE; PMCR = 0x01; dummy = gpiochip_reserve(TOSA_SCOOP_GPIO_BASE, 12); dummy = gpiochip_reserve(TOSA_SCOOP_JC_GPIO_BASE, 12); dummy = gpiochip_reserve(TOSA_TC6393XB_GPIO_BASE, 16); pxa_set_mci_info(&tosa_mci_platform_data); pxa_set_ficp_info(&tosa_ficp_platform_data); pxa_set_i2c_info(NULL); pxa_set_ac97_info(NULL); platform_scoop_config = &tosa_pcmcia_config; pxa2xx_set_spi_info(2, &pxa_ssp_master_info); spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); clk_add_alias("CLK_CK3P6MI", tc6393xb_device.name, "GPIO11_CLK", NULL); platform_add_devices(devices, ARRAY_SIZE(devices)); }
static int __init gsm_init(void) { int rc; rc = mio_gpio_request(ARRAY_AND_SIZE(gsm_gpios)); if (rc) goto err_gpio; rc = request_irq(gpio_to_irq(GPIO25_GSM_MOD_ON_STATE), gsm_on_irq, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, "GSM XS200 Power Irq", NULL); if (rc) goto err_irq; gpio_set_wake(GPIO113_GSM_EVENT, 1); return 0; err_irq: printk(KERN_ERR "Mioa701: Can't request GSM_ON irq\n"); mio_gpio_free(ARRAY_AND_SIZE(gsm_gpios)); err_gpio: printk(KERN_ERR "Mioa701: gsm not available\n"); return rc; }
static int pxa25x_set_wake(struct irq_data *d, unsigned int on) { int gpio = pxa_irq_to_gpio(d->irq); uint32_t mask = 0; if (gpio >= 0 && gpio < 85) return gpio_set_wake(gpio, on); if (d->irq == IRQ_RTCAlrm) { mask = PWER_RTC; goto set_pwer; } return -EINVAL; set_pwer: if (on) PWER |= mask; else PWER &=~mask; return 0; }