Esempio n. 1
0
static void __init acclaim_wifi_init(void)
{
	struct device *dev;
	struct omap_mmc_platform_data *pdata;
	int ret;
	printk(KERN_WARNING"%s: start\n", __func__);
	
	ret = gpio_request(GPIO_WIFI_PMENA, "wifi_pmena");
	if (ret < 0) {
		pr_err("%s: can't reserve GPIO: %d\n", __func__,
		       GPIO_WIFI_PMENA);
		goto out;
	}
	gpio_direction_output(GPIO_WIFI_PMENA, 0);
	gpio_export(GPIO_WIFI_PMENA, true);
      
	ret = gpio_request(GPIO_WIFI_PWEN, "wifi_pwen");
	if (ret < 0) {
		pr_err("%s: can't reserve GPIO: %d\n", __func__,
		       GPIO_WIFI_PWEN);
		goto out;
	}
	gpio_direction_output(GPIO_WIFI_PWEN, 0);
	gpio_export(GPIO_WIFI_PWEN, true);

	ret = gpio_request(GPIO_WIFI_IRQ, "wifi_irq");
	if (ret < 0) {
		printk(KERN_ERR "%s: can't reserve GPIO: %d\n", __func__,
		       GPIO_WIFI_IRQ);
		goto out;
	}
	gpio_direction_input(GPIO_WIFI_IRQ);

	dev = mmc[2].dev;
	if (!dev) {
	      
		pr_err("wl12xx mmc device initialization failed\n");
		goto out;
	}
 
	pdata = dev->platform_data;
	if (!pdata) {
		pr_err("Platfrom data of wl12xx device not set\n");
		goto out;
	}
   
	pdata->slots[0].set_power = wl12xx_set_power;
	config_wlan_mux ();

	if (wl12xx_set_platform_data(&omap4_acclaim_wlan_data))
		pr_err("Error setting wl12xx data\n"); 
 out:
	return;
}
Esempio n. 2
0
static void __init omap_sdp_init(void)
{
	omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
	//omap_board_config = sdp_config;
	//omap_board_config_size = ARRAY_SIZE(sdp_config);
	evt_peripherals_init();
      evt_lcd_panel_init();
	config_wlan_mux();

	conn_add_plat_device();

	//zoom_peripherals_init();
	//zoom_display_init();
	//board_smc91x_init();
	//board_flash_init(sdp_flash_partitions, chip_sel_sdp, NAND_BUSWIDTH_16);
	enable_board_wakeup_source();
	//usbhs_init(&usbhs_bdata);
#if CONFIG_ION_OMAP			//Henry Li
	omap_register_ion();	
#endif
}
Esempio n. 3
0
static void zoom3_wifi_init(void)
{
	config_wlan_mux();
	if (wl12xx_set_platform_data(&zoom3_wlan_data))
		pr_err("Error setting wl12xx data\n");
}
void __init acclaim_peripherals_init(void)
{
	int status;
	int package = OMAP_PACKAGE_CBS;
	ulong sdram_size = get_sdram_size();

	ramconsole_init();

	if (omap_rev() == OMAP4430_REV_ES1_0)
		package = OMAP_PACKAGE_CBL;
	omap4_mux_init(board_mux, package);
	acclaim_board_init();

	if (sdram_vendor() == SAMSUNG_SDRAM) {
		if (sdram_size == SZ_512M) {
			omap_emif_setup_device_details(&emif_devices_512_samsung, &emif_devices_512_samsung);
		} else if (sdram_size == SZ_1G) {
			omap_emif_setup_device_details(&emif_devices_samsung, &emif_devices_samsung);
		} else {
			pr_err("sdram memory size does not exist, default to using 1024MB \n");
			omap_emif_setup_device_details(&emif_devices_samsung, &emif_devices_samsung);
		}
		printk(KERN_INFO"Samsung DDR Memory \n");
	} else if (sdram_vendor() == ELPIDA_SDRAM) {
		if (sdram_size == SZ_512M) {
			omap_emif_setup_device_details(&emif_devices_512_elpida, &emif_devices_512_elpida);
		} else if (sdram_size == SZ_1G) {
			omap_emif_setup_device_details(&emif_devices_elpida, &emif_devices_elpida);
		} else {
			pr_err("sdram memory size does not exist, default to using 1024MB \n");
			omap_emif_setup_device_details(&emif_devices_elpida, &emif_devices_elpida);
		}
		printk(KERN_INFO"Elpida DDR Memory \n");
	} else if (sdram_vendor() == HYNIX_SDRAM) {
		/* Re-use ELPIDA timings as they are absolutely the same */
		if (sdram_size == SZ_512M) {
			omap_emif_setup_device_details(&emif_devices_512_elpida, &emif_devices_512_elpida);
		} else if (sdram_size == SZ_1G) {
			omap_emif_setup_device_details(&emif_devices_elpida, &emif_devices_elpida);
		} else {
			pr_err("sdram memory size does not exist, default to using 1024MB \n");
			omap_emif_setup_device_details(&emif_devices_elpida, &emif_devices_elpida);
		}
		printk(KERN_INFO"Hynix DDR Memory \n");
	} else
		pr_err("Memory type does not exist\n");

	omap_init_emif_timings();

	enable_rtc_gpio();
	omap4_i2c_init();
	platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
	acclaim_init_charger();

	wake_lock_init(&uart_lock, WAKE_LOCK_SUSPEND, "uart_wake_lock");
	omap_serial_init(omap_serial_platform_data);
	omap4_twl6030_hsmmc_init(mmc);

#ifdef CONFIG_TIWLAN_SDIO
	config_wlan_mux();
#else
	//omap4_4430sdp_wifi_init();
#endif

	kxtf9_dev_init();
#ifdef CONFIG_BATTERY_MAX17042
	max17042_dev_init();
#endif

	usb_uhhtll_init(&usbhs_pdata);
	usb_musb_init(&musb_board_data);

	status = omap4_keypad_initialization(&sdp4430_keypad_data);
	if (status)
		pr_err("Keypad initialization failed: %d\n", status);

	spi_register_board_info(sdp4430_spi_board_info,
			ARRAY_SIZE(sdp4430_spi_board_info));

	acclaim_panel_init();
	enable_board_wakeup_source();
	omap_voltage_register_pmic(&omap_pmic_core, "core");
	omap_voltage_register_pmic(&omap_pmic_mpu, "mpu");
	omap_voltage_register_pmic(&omap_pmic_iva, "iva");
	omap_voltage_init_vc(&vc_config);
}