Esempio n. 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");
}
Esempio n. 2
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");
	}

}
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);
}
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);
}