Beispiel #1
0
static void __init acclaim_ram_init(void)
{
	ulong sdram_size = get_sdram_size();

	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");
}
Beispiel #2
0
static void __init omap4_panda_init(void)
{
	int package = OMAP_PACKAGE_CBS;

	omap_emif_setup_device_details(&emif_devices, &emif_devices);

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

	if (wl12xx_set_platform_data(&omap_panda_wlan_data))
		pr_err("error setting wl12xx data\n");

	omap4_panda_i2c_init();
	omap4_audio_conf();
	platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
/*
 * 	This is temporaray. With WLAN regsitering, we see that UART2 is not
 * 	idling on panda and CORE RET is not happening. So removing this FTM.
 * 	Later will be enabled.
 *
 *	platform_device_register(&omap_vwlan_device);
 */
	board_serial_init();
	omap4_twl6030_hsmmc_init(mmc);
	omap4_ehci_init();
	usb_musb_init(&musb_board_data);

	omap_dmm_init();
	omap4_panda_display_init();
}
Beispiel #3
0
static void lpddr_init()
{
	int sd_vendor = omap_sdram_vendor();

	if ((sd_vendor == SAMSUNG_SDRAM) || (sd_vendor == ELPIDA_SDRAM) ||
		(sd_vendor == HYNIX_SDRAM)) {
		if ((omap_sdram_density() & SDRAM_DENSITY_MASK) == SDRAM_DENSITY_2CS) {
			omap_emif_setup_device_details(&emif_devices_2cs, &emif_devices_2cs);
			printk(KERN_INFO "** 2cs ddr detected\n");
			return;
		}
		omap_emif_setup_device_details(&emif_devices_1cs, &emif_devices_1cs);
		printk(KERN_INFO "** 1cs ddr detected **\n");
	}
	else
		printk(KERN_INFO "** DDR vendor_id: %d doesn't supported**\n", sd_vendor);
}
static void __init omap_tablet_init(void)
{
	int status;
	int package = OMAP_PACKAGE_CBS;
	int tablet_rev = 0;

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

	omap_emif_setup_device_details(&emif_devices, &emif_devices);

	omap_board_config = tablet_config;
	omap_board_config_size = ARRAY_SIZE(tablet_config);
	tablet_rev = omap_init_board_version(0);
	omap4_create_board_props();
	omap4_audio_conf();
	omap4_i2c_init();
	tablet_touch_init();
	tablet_camera_mux_init();
	omap_dmm_init();
	tablet_panel_init();
	tablet_pmic_mux_init();
	tablet_set_osc_timings();
	tablet_button_init();
	omap4_register_ion();
	board_serial_init();
	omap4_tablet_wifi_init();
	omap4_twl6030_hsmmc_init(mmc);
	tablet_sensor_init();
	platform_add_devices(tablet4430_devices,
			ARRAY_SIZE(tablet4430_devices));
	wake_lock_init(&st_wk_lock, WAKE_LOCK_SUSPEND, "st_wake_lock");
	omap4_ehci_ohci_init();
	usb_musb_init(&musb_board_data);

	status = omap_ethernet_init();
	if (status) {
		pr_err("Ethernet initialization failed: %d\n", status);
	} else {
		tablet_spi_board_info[0].irq = gpio_to_irq(ETH_KS8851_IRQ);
		spi_register_board_info(tablet_spi_board_info,
				ARRAY_SIZE(tablet_spi_board_info));
	}

	if (cpu_is_omap446x()) {
		/* Vsel0 = gpio, vsel1 = gnd */
		status = omap_tps6236x_board_setup(true, TPS62361_GPIO, -1,
					OMAP_PIN_OFF_OUTPUT_HIGH, -1);
		if (status)
			pr_err("TPS62361 initialization failed: %d\n", status);
	}

	omap_enable_smartreflex_on_init();
        if (enable_suspend_off)
                omap_pm_enable_off_mode();

}
Beispiel #5
0
static void acclaim_mem_init(void)
{
	switch(sdram_vendor()) {
		case SAMSUNG_SDRAM:
			printk(KERN_INFO "Samsung DDR Memory\n");
			omap_emif_setup_device_details(&emif_devices_samsung, &emif_devices_samsung);
		break;
		case ELPIDA_SDRAM:
		/* Re-use ELPIDA timings as they are absolutely the same */
		case HYNIX_SDRAM:
			printk(KERN_INFO "Elpida/Hynix DDR Memory\n");
			omap_emif_setup_device_details(&emif_devices_elpida, &emif_devices_elpida);
		break;
		default:
			pr_err("Memory type does not exist\n");
	}

}
int __init archos_memory_init(void)
{
	if (emif_config == NULL) {
		printk(KERN_ERR "archos_memory_init Failed : No valid emif_config!\n");
		return -EINVAL;
	}
	omap_emif_setup_device_details(emif_config, emif_config);

	omap4_register_ion();
	return 0;
}
static void __init omap_4430sdp_init(void)
{
	int status;
	int package = OMAP_PACKAGE_CBS;

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

	omap_emif_setup_device_details(&emif_devices, &emif_devices);

	omap_board_config = sdp4430_config;
	omap_board_config_size = ARRAY_SIZE(sdp4430_config);

	omap4_i2c_init();
	omap_sfh7741prox_init();
	platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
	board_serial_init();
	omap4_twl6030_hsmmc_init(mmc);

	usb_musb_init(&musb_board_data);

	status = omap_ethernet_init();
	if (status) {
		pr_err("Ethernet initialization failed: %d\n", status);
	} else {
		sdp4430_spi_board_info[0].irq = gpio_to_irq(ETH_KS8851_IRQ);
		spi_register_board_info(sdp4430_spi_board_info,
				ARRAY_SIZE(sdp4430_spi_board_info));
	}

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

	omap_dmm_init();
	omap_4430sdp_display_init();

	if (cpu_is_omap446x()) {
		/* Vsel0 = gpio, vsel1 = gnd */
		status = omap_tps6236x_board_setup(true, TPS62361_GPIO, -1,
					OMAP_PIN_OFF_OUTPUT_HIGH, -1);
		if (status)
			pr_err("TPS62361 initialization failed: %d\n", status);
	}
}
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);
}
void __init omap4_tuna_emif_init(void)
{
	omap_emif_setup_device_details(&emif_devices, &emif_devices);
}
static void __init omap_4430sdp_init(void)
{
	int status;
	int package = OMAP_PACKAGE_CBS;

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

	if (cpu_is_omap447x())
		omap_emif_setup_device_details(&emif_devices_4470,
					       &emif_devices_4470);
	else
		omap_emif_setup_device_details(&emif_devices, &emif_devices);

	omap_board_config = sdp4430_config;
	omap_board_config_size = ARRAY_SIZE(sdp4430_config);

	omap_init_board_version(0);

	omap4_audio_conf();
	omap4_create_board_props();
	blaze_pmic_mux_init();
	blaze_set_osc_timings();
	omap4_i2c_init();
	blaze_sensor_init();
	blaze_touch_init();
	omap4_register_ion();
	platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
	wake_lock_init(&st_wk_lock, WAKE_LOCK_SUSPEND, "st_wake_lock");
	board_serial_init();
	omap4_sdp4430_wifi_init();
	omap4_twl6030_hsmmc_init(mmc);

	/* blaze_modem_init shall be called before omap4_ehci_ohci_init */
	if (!strcmp(modem_ipc, "hsi"))
		blaze_modem_init(true);
	else
		blaze_modem_init(false);

	omap4_ehci_ohci_init();

	usb_musb_init(&musb_board_data);

	status = omap_ethernet_init();
	if (status) {
		pr_err("Ethernet initialization failed: %d\n", status);
	} else {
		sdp4430_spi_board_info[0].irq = gpio_to_irq(ETH_KS8851_IRQ);
		spi_register_board_info(sdp4430_spi_board_info,
				ARRAY_SIZE(sdp4430_spi_board_info));
	}

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

	omap_dmm_init();
	omap_4430sdp_display_init();
	blaze_panel_init();
	blaze_keypad_init();
	init_duty_governor();
	if (cpu_is_omap446x()) {
		/* Vsel0 = gpio, vsel1 = gnd */
		status = omap_tps6236x_board_setup(true, TPS62361_GPIO, -1,
					OMAP_PIN_OFF_OUTPUT_HIGH, -1);
		if (status)
			pr_err("TPS62361 initialization failed: %d\n", status);
	}

	omap_enable_smartreflex_on_init();
	if (enable_suspend_off)
		omap_pm_enable_off_mode();

}
void __init omap4_espresso_emif_init(void)
{
	omap_emif_setup_device_details(&emif_devices, &emif_devices);
}
static void ovation_mem_init(void)
{
	struct emif_device_details *emif_dev = NULL;

	switch(sdram_vendor()) {
		case SAMSUNG_SDRAM:
			printk(KERN_INFO "Samsung DDR Memory\n");
			switch(system_rev) {
				case OVATION_EVT1A:
					emif_dev = &emif_devices_samsung_4G_S4;
				break;
				case OVATION_EVT1B:
				case OVATION_EVT2:
					switch (get_installed_mem_size()) {
						case SZ_1G:
							pr_info("\twith size: 1GB\n");
							emif_dev = &emif_devices_samsung_4G_S4;
							break;
						case SZ_2G - SZ_4K:
						case SZ_2G:
							pr_info("\twith size: 2GB\n");
						default:
							emif_dev = &emif_devices_samsung_2x4G_S4;

					}
				break;
				default:
					emif_dev = &emif_devices_samsung_4G_S4;
			}
		break;
		case ELPIDA_SDRAM:
			printk(KERN_INFO "Elpida DDR Memory\n");
			switch(system_rev) {
				case OVATION_EVT0:
				case OVATION_EVT0B:
					emif_dev = &emif_devices_elpida_2x2G_S4;
				break;
				case OVATION_EVT0C:
				case OVATION_EVT1A:
					emif_dev = &emif_devices_elpida_4G_S4;
				break;
				case OVATION_EVT1B:
				case OVATION_EVT2:
                                       switch (get_installed_mem_size()) {
                                               case SZ_1G:
							pr_info("\twith size 1G\n");
							emif_dev = &emif_devices_elpida_4G_S4;
                                               break;
					       case SZ_2G - SZ_4K:
                                               case SZ_2G:
							pr_info("\twith size 2G\n");
                                               default:
							emif_dev = &emif_devices_elpida_2x4G_S4;
                                       }
				break;
				default:
					emif_dev = &emif_devices_elpida_4G_S4;
			}
		break;
		case HYNIX_SDRAM:
			printk(KERN_INFO "Hynix DDR Memory\n");
			if (system_rev >= OVATION_EVT1A)
				emif_dev = &emif_devices_hynix_4G_S4;
		break;
		default:
			 pr_err("Memory type does not exist\n");
	}

	if (emif_dev)
		omap_emif_setup_device_details(emif_dev, emif_dev);
	else
		pr_err("Memory type not supported [VID: 0x%X, SYSTEM_REV: 0x%X]\n", sdram_vendor(), system_rev);
}