示例#1
0
static void __init smdkv210_machine_init(void)
{
	/* Find out S5PC110 chip version */
	_hw_version_check();

#ifdef CONFIG_ANDROID_PMEM
	android_pmem_set_platdata();
#endif
	/* i2c */
	s3c_i2c0_set_platdata(NULL);
	s3c_i2c1_set_platdata(NULL);
	s3c_i2c2_set_platdata(NULL);
	i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));
	i2c_register_board_info(2, i2c_devs2, ARRAY_SIZE(i2c_devs2));

#if defined(CONFIG_HKDKC110_BOARD) && defined(CONFIG_INPUT_YAMAHA_SENSORS) && !defined(CONFIG_INPUT_BMA150_SENSOR)
	// i2c-gpio sda/scl set pull-up yas529,bma150,ish1000
	gpio_request(GPIO_SENSORS_SDA, "GPB2");
	s3c_gpio_setpull(GPIO_SENSORS_SDA, S3C_GPIO_PULL_UP);
	gpio_direction_input(GPIO_SENSORS_SDA);
	gpio_free(GPIO_SENSORS_SDA);

	gpio_request(GPIO_SENSORS_SCL, "GPB2");
	s3c_gpio_setpull(GPIO_SENSORS_SCL, S3C_GPIO_PULL_UP);
	gpio_direction_input(GPIO_SENSORS_SCL);
	gpio_free(GPIO_SENSORS_SCL);

	// BMA150 CS PIN --> HIGH
	gpio_request(S5PV210_GPB(1), "GPB2");
	s3c_gpio_setpull(S5PV210_GPB(1), S3C_GPIO_PULL_NONE);
	gpio_direction_output(S5PV210_GPB(1), 1);
	gpio_free(S5PV210_GPB(1));

	i2c_register_board_info(4, i2c_devs4, ARRAY_SIZE(i2c_devs4));
#endif

	/* to support system shut down */
	pm_power_off = smdkv210_power_off;

#ifdef CONFIG_FB_S3C_LP101WH1
	s3cfb_set_platdata(&lp101wh1_data);
#endif

#ifdef CONFIG_FB_S3C_LMS350DF
	s3cfb_set_platdata(&lms350df_data);
#endif

#if defined(CONFIG_PM)
	s3c_pm_init();
#endif
#ifdef CONFIG_VIDEO_FIMC
	/* fimc */
	s3c_fimc0_set_platdata(&fimc_plat);
	s3c_fimc1_set_platdata(&fimc_plat);
	s3c_fimc2_set_platdata(&fimc_plat);
#endif
	/* 5V */
	hkdkc110_5V_power(1);

#ifdef CONFIG_VIDEO_MFC50
	/* mfc */
	s3c_mfc_set_platdata(NULL);
#endif

#ifdef CONFIG_VIDEO_TV20
	s3c_set_qos();
#endif

#ifdef CONFIG_S3C_DEV_HSMMC
	s5pv210_default_sdhci0();
#endif
#ifdef CONFIG_S3C_DEV_HSMMC1
	s5pv210_default_sdhci1();
#endif
#ifdef CONFIG_S3C_DEV_HSMMC2
	s5pv210_default_sdhci2();
#endif
#ifdef CONFIG_S5PV210_SETUP_SDHCI
	s3c_sdhci_set_platdata();
#endif
	platform_add_devices(smdkv210_devices, ARRAY_SIZE(smdkv210_devices));
#if defined(CONFIG_HAVE_PWM)
	smdk_backlight_register();
#endif
}
示例#2
0
static void __init smdkv210_machine_init(void)
{
	/* Find out S5PC110 chip version */
	_hw_version_check();

	/* OneNAND */
#ifdef CONFIG_MTD_ONENAND
	//s3c_device_onenand.dev.platform_data = &s5p_onenand_data;
#endif
#ifdef CONFIG_MTD_NAND
	//s3c_device_nand.dev.platform_data = &s5p_nand_data;
#endif

#ifdef CONFIG_DM9000
	smdkv210_dm9000_set();
#endif

#ifdef CONFIG_ANDROID_PMEM
	android_pmem_set_platdata();
#endif
	/* i2c */
	s3c_i2c0_set_platdata(NULL);
	s3c_i2c1_set_platdata(NULL);
	s3c_i2c2_set_platdata(NULL);
	i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0));
	i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));
	i2c_register_board_info(2, i2c_devs2, ARRAY_SIZE(i2c_devs2));

	/* to support system shut down */
	pm_power_off = smdkv210_power_off;
#if defined(CONFIG_SPI_CNTRLR_0)
        s3cspi_set_slaves(BUSNUM(0), ARRAY_SIZE(s3c_slv_pdata_0), s3c_slv_pdata_0);
#endif
#if defined(CONFIG_SPI_CNTRLR_1)
        s3cspi_set_slaves(BUSNUM(1), ARRAY_SIZE(s3c_slv_pdata_1), s3c_slv_pdata_1);
#endif
#if defined(CONFIG_SPI_CNTRLR_2)
        s3cspi_set_slaves(BUSNUM(2), ARRAY_SIZE(s3c_slv_pdata_2), s3c_slv_pdata_2);
#endif
        spi_register_board_info(s3c_spi_devs, ARRAY_SIZE(s3c_spi_devs));

#ifdef CONFIG_FB_S3C_LTE480WV
	s3cfb_set_platdata(&lte480wv_fb_data);
#endif

#if defined(CONFIG_BLK_DEV_IDE_S3C)
	s3c_ide_set_platdata(&smdkv210_ide_pdata);
#endif

#if defined(CONFIG_TOUCHSCREEN_S3C)
	s3c_ts_set_platdata(&s3c_ts_platform);
#endif

#if defined(CONFIG_S5PV210_ADC)
	s3c_adc_set_platdata(&s3c_adc_platform);
#endif

#if defined(CONFIG_PM)
	s3c_pm_init();
#endif
#ifdef CONFIG_VIDEO_FIMC
	/* fimc */
	s3c_fimc0_set_platdata(&fimc_plat);
	s3c_fimc1_set_platdata(&fimc_plat);
	s3c_fimc2_set_platdata(&fimc_plat);
	s3c_csis_set_platdata(NULL);
	smdkv210_cam0_power(1);
	smdkv210_cam1_power(1);
	smdkv210_mipi_cam_reset();
#endif

#ifdef CONFIG_VIDEO_MFC50
	/* mfc */
	s3c_mfc_set_platdata(NULL);
#endif

#ifdef CONFIG_VIDEO_TV20
	s3c_set_qos();
#endif

#ifdef CONFIG_S3C_DEV_HSMMC
	s5pv210_default_sdhci0();
#endif
#ifdef CONFIG_S3C_DEV_HSMMC1
	s5pv210_default_sdhci1();
#endif
#ifdef CONFIG_S3C_DEV_HSMMC2
	s5pv210_default_sdhci2();
#endif
#ifdef CONFIG_S3C_DEV_HSMMC3
	s5pv210_default_sdhci3();
#endif
#ifdef CONFIG_S5PV210_SETUP_SDHCI
	s3c_sdhci_set_platdata();
#endif
	platform_add_devices(smdkv210_devices, ARRAY_SIZE(smdkv210_devices));
#if defined(CONFIG_HAVE_PWM)
	smdk_backlight_register();
#endif
}
static void __init smdkv210_machine_init(void)
{
	/* Find out S5PC110 chip version */
	_hw_version_check();

	/* OneNAND */
#ifdef CONFIG_MTD_ONENAND
	//s3c_device_onenand.dev.platform_data = &s5p_onenand_data;
#endif

#ifdef CONFIG_DM9000
	smdkv210_dm9000_set();
#endif

#ifdef CONFIG_ANDROID_PMEM
	android_pmem_set_platdata();
#endif
	/* i2c */
	s3c_i2c0_set_platdata(NULL);
	s3c_i2c1_set_platdata(NULL);
	s3c_i2c2_set_platdata(NULL);
	i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0));
	i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));
	i2c_register_board_info(2, i2c_devs2, ARRAY_SIZE(i2c_devs2));

#ifdef CONFIG_FB_S3C
	s3cfb_set_platdata(NULL);
#endif

#if defined(CONFIG_BLK_DEV_IDE_S3C)
	s3c_ide_set_platdata(&smdkv210_ide_pdata);
#endif

#if defined(CONFIG_TOUCHSCREEN_S3C)
	s3c_ts_set_platdata(&s3c_ts_platform);
#endif

#if defined(CONFIG_S5PV210_ADCTS)
	s3c_adcts_set_platdata(&s3c_adcts_cfgs);
#endif

#if defined(CONFIG_PM)
	s3c_pm_init();
#endif
#ifdef CONFIG_VIDEO_FIMC
	/* fimc */
	s3c_fimc0_set_platdata(&fimc_plat);
	s3c_fimc1_set_platdata(&fimc_plat);
	s3c_fimc2_set_platdata(&fimc_plat);
	s3c_csis_set_platdata(NULL);
	smdkv210_cam0_power(1);
	smdkv210_cam1_power(1);
	smdkv210_mipi_cam_reset();
#endif

#ifdef CONFIG_VIDEO_MFC50
	/* mfc */
	s3c_mfc_set_platdata(NULL);
#endif

#ifdef CONFIG_S3C_DEV_HSMMC
	s5pv210_default_sdhci0();
#endif
#ifdef CONFIG_S3C_DEV_HSMMC1
	s5pv210_default_sdhci1();
#endif
#ifdef CONFIG_S3C_DEV_HSMMC2
	s5pv210_default_sdhci2();
#endif
#ifdef CONFIG_S3C_DEV_HSMMC3
	s5pv210_default_sdhci3();
#endif
#ifdef CONFIG_S5PV210_SETUP_SDHCI
	s3c_sdhci_set_platdata();
#endif
	platform_add_devices(smdkv210_devices, ARRAY_SIZE(smdkv210_devices));
}
static void __init mango210_machine_init(void)
{
	/* Find out S5PC110 chip version */
	_hw_version_check();

#ifdef CONFIG_MTD_NAND
//	s3c_device_nand.dev.platform_data = &s5p_nand_data;
#endif

#ifdef CONFIG_SMSC911X
	mango210_smsc911x_set();
#endif

#ifdef CONFIG_ANDROID_PMEM
	android_pmem_set_platdata();
#endif
	/* i2c */
	s3c_i2c0_set_platdata(NULL);
	s3c_i2c1_set_platdata(NULL);
	s3c_i2c2_set_platdata(NULL);
	i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0));
	i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));
	i2c_register_board_info(2, i2c_devs2, ARRAY_SIZE(i2c_devs2));

	/* to support system shut down */
	pm_power_off = mango210_power_off;

#if defined(CONFIG_SPI_CNTRLR_0)
        s3cspi_set_slaves(BUSNUM(0), ARRAY_SIZE(s3c_slv_pdata_0), s3c_slv_pdata_0);
#endif
#if defined(CONFIG_SPI_CNTRLR_1)
        s3cspi_set_slaves(BUSNUM(1), ARRAY_SIZE(s3c_slv_pdata_1), s3c_slv_pdata_1);
#endif
#if defined(CONFIG_SPI_CNTRLR_2)
        s3cspi_set_slaves(BUSNUM(2), ARRAY_SIZE(s3c_slv_pdata_2), s3c_slv_pdata_2);
#endif
        spi_register_board_info(s3c_spi_devs, ARRAY_SIZE(s3c_spi_devs));

#if defined(CONFIG_FB_S3C_LB070WV6) || defined(CONFIG_FB_S3C_LTN101NT05)
	s3cfb_set_platdata(&mango_fb_data);
#endif

#if defined(CONFIG_TOUCHSCREEN_S3C)
	s3c_ts_set_platdata(&s3c_ts_platform);
#endif

#if defined(CONFIG_S5PV210_ADC)
	s3c_adc_set_platdata(&s3c_adc_platform);
#endif

#if defined(CONFIG_PM)
	s3c_pm_init();
#endif

#ifdef CONFIG_VIDEO_FIMC
#ifdef CONFIG_S5PV210_SETUP_FIMC0
	s3c_fimc0_set_platdata(&fimc_plat);
#endif
#ifdef CONFIG_S5PV210_SETUP_FIMC1
	s3c_fimc1_set_platdata(&fimc_plat);
#endif
#ifdef CONFIG_S5PV210_SETUP_FIMC2
	s3c_fimc2_set_platdata(&fimc_plat);
#endif

	mango210_camera_set();
	mango210_cam0_power(1);
#else
#ifdef CONFIG_S5PV210_SETUP_FIMC0
	s3c_fimc0_set_platdata(NULL);
#endif
#ifdef CONFIG_S5PV210_SETUP_FIMC1
	s3c_fimc1_set_platdata(NULL);
#endif
#ifdef CONFIG_S5PV210_SETUP_FIMC2
	s3c_fimc2_set_platdata(NULL);
#endif
#endif

#ifdef CONFIG_SMSC911X
	mango210_smsc911x_set();
#endif

#ifdef CONFIG_VIDEO_MFC50
	/* mfc */
	s3c_mfc_set_platdata(NULL);
#endif

#ifdef CONFIG_VIDEO_TV20
	s3c_set_qos();
#endif

#ifdef CONFIG_S3C_DEV_HSMMC
	s5pv210_default_sdhci0();
#endif
#ifdef CONFIG_S3C_DEV_HSMMC1
	s5pv210_default_sdhci1();
#endif
#ifdef CONFIG_S3C_DEV_HSMMC2
	s5pv210_default_sdhci2();
#endif
#ifdef CONFIG_S3C_DEV_HSMMC3
	s5pv210_default_sdhci3();
#endif
#ifdef CONFIG_S5PV210_SETUP_SDHCI
	s3c_sdhci_set_platdata();
#endif
	platform_add_devices(mango210_devices, ARRAY_SIZE(mango210_devices));
	
#if defined(CONFIG_HAVE_PWM)
	mango_backlight_register();
#endif

#ifdef CONFIG_USB_SUPPORT
	mango210_usb_host_set();
#endif
}