static void __init stargate2_init(void) { /* This is probably a board specific hack as this must be set prior to connecting the MFP stuff up. */ MECR &= ~MECR_NOS; pxa2xx_mfp_config(ARRAY_AND_SIZE(stargate2_pin_config)); pxa_set_ffuart_info(NULL); pxa_set_btuart_info(NULL); pxa_set_stuart_info(NULL); platform_add_devices(ARRAY_AND_SIZE(stargate2_devices)); pxa2xx_set_spi_info(1, &pxa_ssp_master_0_info); pxa2xx_set_spi_info(2, &pxa_ssp_master_1_info); pxa2xx_set_spi_info(3, &pxa_ssp_master_2_info); spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); i2c_register_board_info(0, ARRAY_AND_SIZE(stargate2_i2c_board_info)); i2c_register_board_info(1, ARRAY_AND_SIZE(stargate2_pwr_i2c_board_info)); pxa27x_set_i2c_power_info(&i2c_pwr_pdata); pxa_set_i2c_info(&i2c_pdata); pxa_set_mci_info(&stargate2_mci_platform_data); pxa_set_udc_info(&stargate2_udc_info); stargate2_reset_bluetooth(); }
static void __init imote2_init(void) { pxa2xx_mfp_config(ARRAY_AND_SIZE(imote2_pin_config)); /* SPI chip select directions - all other directions should * be handled by drivers.*/ gpio_direction_output(37, 0); gpio_direction_output(24, 0); gpio_direction_output(39, 0); platform_add_devices(imote2_devices, ARRAY_SIZE(imote2_devices)); pxa2xx_set_spi_info(1, &pxa_ssp_master_0_info); pxa2xx_set_spi_info(2, &pxa_ssp_master_1_info); pxa2xx_set_spi_info(3, &pxa_ssp_master_2_info); spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); i2c_register_board_info(0, imote2_i2c_board_info, ARRAY_SIZE(imote2_i2c_board_info)); i2c_register_board_info(1, imote2_pwr_i2c_board_info, ARRAY_SIZE(imote2_pwr_i2c_board_info)); pxa27x_set_i2c_power_info(&i2c_pwr_pdata); pxa_set_i2c_info(&i2c_pdata); pxa_set_mci_info(&imote2_mci_platform_data); pxa_set_udc_info(&imote2_udc_info); }
static void __init imote2_init(void) { pxa2xx_mfp_config(ARRAY_AND_SIZE(imote2_pin_config)); pxa_set_ffuart_info(NULL); pxa_set_btuart_info(NULL); pxa_set_stuart_info(NULL); platform_add_devices(imote2_devices, ARRAY_SIZE(imote2_devices)); pxa2xx_set_spi_info(1, &pxa_ssp_master_0_info); pxa2xx_set_spi_info(2, &pxa_ssp_master_1_info); pxa2xx_set_spi_info(3, &pxa_ssp_master_2_info); spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); i2c_register_board_info(0, imote2_i2c_board_info, ARRAY_SIZE(imote2_i2c_board_info)); i2c_register_board_info(1, imote2_pwr_i2c_board_info, ARRAY_SIZE(imote2_pwr_i2c_board_info)); pxa27x_set_i2c_power_info(&i2c_pwr_pdata); pxa_set_i2c_info(&i2c_pdata); pxa_set_mci_info(&imote2_mci_platform_data); pxa_set_udc_info(&imote2_udc_info); }
static void __init hx4700_init(void) { int ret; pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config)); 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)); pxa_set_ficp_info(&ficp_info); pxa27x_set_i2c_power_info(NULL); pxa_set_i2c_info(NULL); 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 lubbock_init(void) { int flashboot = (LUB_CONF_SWITCHES & 1); pxa2xx_mfp_config(ARRAY_AND_SIZE(lubbock_pin_config)); pxa_set_ffuart_info(NULL); pxa_set_btuart_info(NULL); pxa_set_stuart_info(NULL); clk_add_alias("SA1111_CLK", NULL, "GPIO11_CLK", NULL); pxa_set_udc_info(&udc_info); pxa_set_fb_info(NULL, &sharp_lm8v31); pxa_set_mci_info(&lubbock_mci_platform_data); pxa_set_ficp_info(&lubbock_ficp_platform_data); pxa_set_ac97_info(NULL); lubbock_flash_data[0].width = lubbock_flash_data[1].width = (__raw_readl(BOOT_DEF) & 1) ? 2 : 4; /* Compensate for the nROMBT switch which swaps the flash banks */ printk(KERN_NOTICE "Lubbock configured to boot from %s (bank %d)\n", flashboot?"Flash":"ROM", flashboot); lubbock_flash_data[flashboot^1].name = "application-flash"; lubbock_flash_data[flashboot].name = "boot-rom"; (void) platform_add_devices(devices, ARRAY_SIZE(devices)); pxa2xx_set_spi_info(1, &pxa_ssp_master_info); spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); }
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); regulator_has_full_constraints(); }
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; 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.dev, "GPIO11_CLK", NULL); platform_add_devices(devices, ARRAY_SIZE(devices)); }
static void __init imote2_stargate2_init(void) { pxa2xx_mfp_config(ARRAY_AND_SIZE(sg2_im2_unified_pin_config)); pxa_set_ffuart_info(NULL); pxa_set_btuart_info(NULL); pxa_set_stuart_info(NULL); pxa2xx_set_spi_info(1, &pxa_ssp_master_0_info); pxa2xx_set_spi_info(2, &pxa_ssp_master_1_info); pxa2xx_set_spi_info(3, &pxa_ssp_master_2_info); spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); pxa27x_set_i2c_power_info(&i2c_pwr_pdata); pxa_set_i2c_info(&i2c_pdata); }
static void __init spitz_init_spi(void) { if (machine_is_akita()) { spitz_lcdcon_info.gpio_backlight_cont = AKITA_GPIO_BACKLIGHT_CONT; spitz_lcdcon_info.gpio_backlight_on = AKITA_GPIO_BACKLIGHT_ON; } pxa2xx_set_spi_info(2, &spitz_spi_info); spi_register_board_info(ARRAY_AND_SIZE(spitz_spi_devices)); }
static void __init simcom_init(void) { /* Initialize NAND */ platform_device_register(&simcom_nand_device); /* Initialize keypad interface */ pxa_set_keypad_info(&keybox5_keypad_platform_data); /* Initialize DM9000 */ platform_device_register(&simcom_dm9000_device); /* Initialize USB */ pxa_set_ohci_info(&simcom_ohci_platform_data); /* Initialize SPI interfaces */ pxa2xx_set_spi_info(1, &simcom_spi_port1_info); pxa2xx_set_spi_info(2, &simcom_spi_port2_info); spi_register_board_info(ARRAY_AND_SIZE(simcom_spi_devices)); pxa_set_i2c_info(NULL); i2c_register_board_info(0, ARRAY_AND_SIZE(simcom_keybox5_i2c_info)); pxa2xx_mfp_config(ARRAY_AND_SIZE(simcom_pin_config)); }
static void __init spitz_spi_init(void) { struct corgi_lcd_platform_data *lcd_data = &spitz_lcdcon_info; if (machine_is_akita()) { lcd_data->gpio_backlight_cont = AKITA_GPIO_BACKLIGHT_CONT; lcd_data->gpio_backlight_on = AKITA_GPIO_BACKLIGHT_ON; } pxa2xx_set_spi_info(2, &spitz_spi_info); spi_register_board_info(ARRAY_AND_SIZE(spitz_spi_devices)); }
static void __init littleton_init_spi(void) { int err; err = gpio_request(LITTLETON_GPIO_LCD_CS, "LCD_CS"); if (err) { pr_warning("failed to request GPIO for LCS CS\n"); return; } gpio_direction_output(LITTLETON_GPIO_LCD_CS, 1); pxa2xx_set_spi_info(2, &littleton_spi_info); spi_register_board_info(ARRAY_AND_SIZE(littleton_spi_devices)); }
static void __init simcom_init(void) { simcom_init_nand(); simcom_init_dm9000(); /* Initialize Display */ //platform_device_register(&simcom_backlight_device); set_pxa_fb_info(simcom_display); /* Initialize card interface */ pxa_set_mci_info(&simcom_mci_platform_data); /* Initialize SPI interfaces */ pxa2xx_set_spi_info(1, &simcom_spi_port1_info); spi_register_board_info(ARRAY_AND_SIZE(simcom_spi_devices)); pxa2xx_mfp_config(ARRAY_AND_SIZE(simcom_pin_config)); }
static void __init hx4700_init(void) { pxa2xx_mfp_config(ARRAY_AND_SIZE(hx4700_pin_config)); hx4700_gpio_request(ARRAY_AND_SIZE(global_gpios)); platform_add_devices(devices, ARRAY_SIZE(devices)); pxa_set_ficp_info(&ficp_info); pxa27x_set_i2c_power_info(NULL); pxa_set_i2c_info(NULL); 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 spitz_init_spi(void) { int err; err = gpio_request(SPITZ_GPIO_ADS7846_CS, "ADS7846_CS"); if (err) return; err = gpio_request(SPITZ_GPIO_LCDCON_CS, "LCDCON_CS"); if (err) goto err_free_1; err = gpio_request(SPITZ_GPIO_MAX1111_CS, "MAX1111_CS"); if (err) goto err_free_2; err = gpio_direction_output(SPITZ_GPIO_ADS7846_CS, 1); if (err) goto err_free_3; err = gpio_direction_output(SPITZ_GPIO_LCDCON_CS, 1); if (err) goto err_free_3; err = gpio_direction_output(SPITZ_GPIO_MAX1111_CS, 1); if (err) goto err_free_3; if (machine_is_akita()) { spitz_lcdcon_info.gpio_backlight_cont = AKITA_GPIO_BACKLIGHT_CONT; spitz_lcdcon_info.gpio_backlight_on = AKITA_GPIO_BACKLIGHT_ON; } pxa2xx_set_spi_info(2, &spitz_spi_info); spi_register_board_info(ARRAY_AND_SIZE(spitz_spi_devices)); return; err_free_3: gpio_free(SPITZ_GPIO_MAX1111_CS); err_free_2: gpio_free(SPITZ_GPIO_LCDCON_CS); err_free_1: gpio_free(SPITZ_GPIO_ADS7846_CS); }
/* * pcm027_init - breath some life into the board */ static void __init pcm027_init(void) { /* system bus arbiter setting * - Core_Park * - LCD_wt:DMA_wt:CORE_Wt = 2:3:4 */ ARB_CNTRL = ARB_CORE_PARK | 0x234; pxa2xx_mfp_config(pcm027_pin_config, ARRAY_SIZE(pcm027_pin_config)); platform_add_devices(devices, ARRAY_SIZE(devices)); /* at last call the baseboard to initialize itself */ #ifdef CONFIG_MACH_PCM990_BASEBOARD pcm990_baseboard_init(); #endif pxa2xx_set_spi_info(1, &pxa_ssp_master_info); spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); }
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 void __init zeus_init(void) { u16 dm9000_msc = DM9K_MSC_VALUE; u32 msc0, msc1; system_rev = __raw_readw(ZEUS_CPLD_VERSION); pr_info("Zeus CPLD V%dI%d\n", (system_rev & 0xf0) >> 4, (system_rev & 0x0f)); /* Fix timings for dm9000s (CS1/CS2)*/ msc0 = (__raw_readl(MSC0) & 0x0000ffff) | (dm9000_msc << 16); msc1 = (__raw_readl(MSC1) & 0xffff0000) | dm9000_msc; __raw_writel(msc0, MSC0); __raw_writel(msc1, MSC1); pm_power_off = zeus_power_off; zeus_setup_apm(); pxa2xx_mfp_config(ARRAY_AND_SIZE(zeus_pin_config)); platform_add_devices(zeus_devices, ARRAY_SIZE(zeus_devices)); zeus_register_ohci(); if (zeus_setup_fb_gpios()) pr_err("Failed to setup fb gpios\n"); else pxa_set_fb_info(NULL, &zeus_fb_info); pxa_set_mci_info(&zeus_mci_platform_data); pxa_set_udc_info(&zeus_udc_info); pxa_set_ac97_info(&zeus_ac97_info); pxa_set_i2c_info(NULL); i2c_register_board_info(0, ARRAY_AND_SIZE(zeus_i2c_devices)); pxa2xx_set_spi_info(3, &pxa2xx_spi_ssp3_master_info); spi_register_board_info(zeus_spi_board_info, ARRAY_SIZE(zeus_spi_board_info)); regulator_has_full_constraints(); }
static void __init poodle_init_spi(void) { pxa2xx_set_spi_info(1, &poodle_spi_info); spi_register_board_info(ARRAY_AND_SIZE(poodle_spi_devices)); }
static void __init cmx255_init_rtc(void) { pxa2xx_set_spi_info(1, &pxa_ssp_master_info); spi_register_board_info(ARRAY_AND_SIZE(spi_board_info)); }
static void __init cmx270_init_spi(void) { pxa2xx_set_spi_info(2, &cm_x270_spi_info); spi_register_board_info(ARRAY_AND_SIZE(cm_x270_spi_devices)); }
static void __init z2_spi_init(void) { pxa2xx_set_spi_info(1, &pxa_ssp1_master_info); pxa2xx_set_spi_info(2, &pxa_ssp2_master_info); spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); }
static void __init em_x270_init_spi(void) { pxa2xx_set_spi_info(1, &em_x270_spi_info); pxa2xx_set_spi_info(2, &em_x270_spi_2_info); spi_register_board_info(ARRAY_AND_SIZE(em_x270_spi_devices)); }
static void __init corgi_init_spi(void) { pxa2xx_set_spi_info(1, &corgi_spi_info); spi_register_board_info(ARRAY_AND_SIZE(corgi_spi_devices)); }
static void __init littleton_init_spi(void) { pxa2xx_set_spi_info(2, &littleton_spi_info); spi_register_board_info(ARRAY_AND_SIZE(littleton_spi_devices)); }