Пример #1
0
static void __init smdkv210_machine_init(void)
{
	s3c_pm_init();

	smdkv210_dm9000_init();

	samsung_keypad_set_platdata(&smdkv210_keypad_data);
	s3c24xx_ts_set_platdata(&s3c_ts_platform);

	s3c_i2c0_set_platdata(NULL);
	s3c_i2c1_set_platdata(NULL);
	s3c_i2c2_set_platdata(NULL);
	i2c_register_board_info(0, smdkv210_i2c_devs0,
			ARRAY_SIZE(smdkv210_i2c_devs0));
	i2c_register_board_info(1, smdkv210_i2c_devs1,
			ARRAY_SIZE(smdkv210_i2c_devs1));
	i2c_register_board_info(2, smdkv210_i2c_devs2,
			ARRAY_SIZE(smdkv210_i2c_devs2));

	s3c_ide_set_platdata(&smdkv210_ide_pdata);

	s3c_fb_set_platdata(&smdkv210_lcd0_pdata);

	samsung_bl_set(&smdkv210_bl_gpio_info, &smdkv210_bl_data);

	platform_add_devices(smdkv210_devices, ARRAY_SIZE(smdkv210_devices));
}
Пример #2
0
static void __init h1940_init(void)
{
	u32 tmp;

	s3c24xx_fb_set_platdata(&h1940_fb_info);
 	s3c24xx_udc_set_platdata(&h1940_udc_cfg);
	s3c24xx_ts_set_platdata(&h1940_ts_cfg);
	s3c_i2c0_set_platdata(NULL);

	s3c_device_sdi.dev.platform_data = &h1940_mmc_cfg;

	/* Turn off suspend on both USB ports, and switch the
	 * selectable USB port to USB device mode. */

	s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST |
			      S3C2410_MISCCR_USBSUSPND0 |
			      S3C2410_MISCCR_USBSUSPND1, 0x0);

	tmp =   (0x78 << S3C24XX_PLLCON_MDIVSHIFT)
	      | (0x02 << S3C24XX_PLLCON_PDIVSHIFT)
	      | (0x03 << S3C24XX_PLLCON_SDIVSHIFT);
	writel(tmp, S3C2410_UPLLCON);

	gpio_request(S3C2410_GPC(0), "LCD power");
	gpio_request(S3C2410_GPC(5), "LCD power");
	gpio_request(S3C2410_GPC(6), "LCD power");


	platform_add_devices(h1940_devices, ARRAY_SIZE(h1940_devices));
}
Пример #3
0
static void __init smdkc100_machine_init(void)
{
	s3c24xx_ts_set_platdata(&s3c_ts_platform);

	/* I2C */
	s3c_i2c0_set_platdata(NULL);
	s3c_i2c1_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));

	s3c_fb_set_platdata(&smdkc100_lcd_pdata);
	s3c_ide_set_platdata(&smdkc100_ide_pdata);

	samsung_keypad_set_platdata(&smdkc100_keypad_data);

	s5pc100_spdif_setup_gpio(S5PC100_SPDIF_GPD);

	/* LCD init */
	gpio_request(S5PC100_GPH0(6), "GPH0");
	smdkc100_lcd_power_set(&smdkc100_lcd_power_data, 0);

	samsung_bl_set(&smdkc100_bl_gpio_info, &smdkc100_bl_data);

	platform_add_devices(smdkc100_devices, ARRAY_SIZE(smdkc100_devices));
}
Пример #4
0
static void __init smdk6450_machine_init(void)
{
	s3c24xx_ts_set_platdata(&s3c_ts_platform);

	s3c_i2c0_set_platdata(&s5p6450_i2c0_data);
	s3c_i2c1_set_platdata(&s5p6450_i2c1_data);
	i2c_register_board_info(0, smdk6450_i2c_devs0,
			ARRAY_SIZE(smdk6450_i2c_devs0));
	i2c_register_board_info(1, smdk6450_i2c_devs1,
			ARRAY_SIZE(smdk6450_i2c_devs1));

	platform_add_devices(smdk6450_devices, ARRAY_SIZE(smdk6450_devices));
}
Пример #5
0
static void __init ok6410_machine_init(void)
{
	u32 cs1;

	s3c_i2c0_set_platdata(NULL);
	s3c_i2c1_set_platdata(NULL);
	s3c_fb_set_platdata(&ok6410_lcd_pdata);
	s3c_hsotg_set_platdata(&ok6410_hsotg_pdata);

	samsung_keypad_set_platdata(&ok6410_keypad_data);

	s3c_nand_set_platdata(&ok6410_nand_info);
	s3c24xx_ts_set_platdata(NULL);

	/* configure nCS1 width to 16 bits */

	cs1 = __raw_readl(S3C64XX_SROM_BW) &
		    ~(S3C64XX_SROM_BW__CS_MASK << S3C64XX_SROM_BW__NCS1__SHIFT);
	cs1 |= ((1 << S3C64XX_SROM_BW__DATAWIDTH__SHIFT) |
		(1 << S3C64XX_SROM_BW__WAITENABLE__SHIFT) |
		(1 << S3C64XX_SROM_BW__BYTEENABLE__SHIFT)) <<
						   S3C64XX_SROM_BW__NCS1__SHIFT;
	__raw_writel(cs1, S3C64XX_SROM_BW);

	/* set timing for nCS1 suitable for ethernet chip */

	__raw_writel((0 << S3C64XX_SROM_BCX__PMC__SHIFT) |
		     (6 << S3C64XX_SROM_BCX__TACP__SHIFT) |
		     (4 << S3C64XX_SROM_BCX__TCAH__SHIFT) |
		     (1 << S3C64XX_SROM_BCX__TCOH__SHIFT) |
		     (0xe << S3C64XX_SROM_BCX__TACC__SHIFT) |
		     (4 << S3C64XX_SROM_BCX__TCOS__SHIFT) |
		     (0 << S3C64XX_SROM_BCX__TACS__SHIFT), S3C64XX_SROM_BC1);

	gpio_request(S3C64XX_GPN(5), "LCD power");
	gpio_request(S3C64XX_GPF(13), "LCD power");

	i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0));
	i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));

	s3c_ide_set_platdata(&ok6410_ide_pdata);

	samsung_bl_set(&ok6410_bl_gpio_info, &ok6410_bl_data);

	platform_add_devices(ok6410_devices, ARRAY_SIZE(ok6410_devices));

	/* enable USB phy clock */
	s5p_usb_phy_init(&s3c_device_usb_hsotg, USB_PHY_TYPE_DEVICE);
}
Пример #6
0
static void __init rx1950_init_machine(void)
{
	int i;

	s3c24xx_fb_set_platdata(&rx1950_lcd_cfg);
	s3c24xx_udc_set_platdata(&rx1950_udc_cfg);
	s3c24xx_ts_set_platdata(&rx1950_ts_cfg);
	s3c24xx_mci_set_platdata(&rx1950_mmc_cfg);
	s3c_i2c0_set_platdata(NULL);
	s3c_nand_set_platdata(&rx1950_nand_info);

	/* Turn off suspend on both USB ports, and switch the
	 * selectable USB port to USB device mode. */
	s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST |
						S3C2410_MISCCR_USBSUSPND0 |
						S3C2410_MISCCR_USBSUSPND1, 0x0);

	/* mmc power is disabled by default */
	WARN_ON(gpio_request(S3C2410_GPJ(1), "MMC power"));
	gpio_direction_output(S3C2410_GPJ(1), 0);

	for (i = 0; i < 8; i++)
		WARN_ON(gpio_request(S3C2410_GPC(i), "LCD power"));

	for (i = 10; i < 16; i++)
		WARN_ON(gpio_request(S3C2410_GPC(i), "LCD power"));

	for (i = 2; i < 8; i++)
		WARN_ON(gpio_request(S3C2410_GPD(i), "LCD power"));

	for (i = 11; i < 16; i++)
		WARN_ON(gpio_request(S3C2410_GPD(i), "LCD power"));

	WARN_ON(gpio_request(S3C2410_GPB(1), "LCD power"));

	WARN_ON(gpio_request(S3C2410_GPA(3), "Red blink"));
	WARN_ON(gpio_request(S3C2410_GPA(4), "Green blink"));
	WARN_ON(gpio_request(S3C2410_GPJ(6), "LED blink"));
	gpio_direction_output(S3C2410_GPA(3), 0);
	gpio_direction_output(S3C2410_GPA(4), 0);
	gpio_direction_output(S3C2410_GPJ(6), 0);

	platform_add_devices(rx1950_devices, ARRAY_SIZE(rx1950_devices));

	i2c_register_board_info(0, rx1950_i2c_devices,
		ARRAY_SIZE(rx1950_i2c_devices));
}
Пример #7
0
static void __init smdk6410_machine_init(void)
{
	u32 cs1;

	s3c_i2c0_set_platdata(NULL);
	s3c_i2c1_set_platdata(NULL);
	s3c_fb_set_platdata(&smdk6410_lcd_pdata);
	s3c_hsotg_set_platdata(&smdk6410_hsotg_pdata);

	samsung_keypad_set_platdata(&smdk6410_keypad_data);

	s3c24xx_ts_set_platdata(NULL);

	

	cs1 = __raw_readl(S3C64XX_SROM_BW) &
		    ~(S3C64XX_SROM_BW__CS_MASK << S3C64XX_SROM_BW__NCS1__SHIFT);
	cs1 |= ((1 << S3C64XX_SROM_BW__DATAWIDTH__SHIFT) |
		(1 << S3C64XX_SROM_BW__WAITENABLE__SHIFT) |
		(1 << S3C64XX_SROM_BW__BYTEENABLE__SHIFT)) <<
						   S3C64XX_SROM_BW__NCS1__SHIFT;
	__raw_writel(cs1, S3C64XX_SROM_BW);

	

	__raw_writel((0 << S3C64XX_SROM_BCX__PMC__SHIFT) |
		     (6 << S3C64XX_SROM_BCX__TACP__SHIFT) |
		     (4 << S3C64XX_SROM_BCX__TCAH__SHIFT) |
		     (1 << S3C64XX_SROM_BCX__TCOH__SHIFT) |
		     (0xe << S3C64XX_SROM_BCX__TACC__SHIFT) |
		     (4 << S3C64XX_SROM_BCX__TCOS__SHIFT) |
		     (0 << S3C64XX_SROM_BCX__TACS__SHIFT), S3C64XX_SROM_BC1);

	gpio_request(S3C64XX_GPN(5), "LCD power");
	gpio_request(S3C64XX_GPF(13), "LCD power");

	i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0));
	i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));

	s3c_ide_set_platdata(&smdk6410_ide_pdata);

	samsung_bl_set(&smdk6410_bl_gpio_info, &smdk6410_bl_data);

	platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices));
}
Пример #8
0
static void __init smdk6440_machine_init(void)
{
	s3c24xx_ts_set_platdata(NULL);

	s3c_i2c0_set_platdata(&s5p6440_i2c0_data);
	s3c_i2c1_set_platdata(&s5p6440_i2c1_data);
	i2c_register_board_info(0, smdk6440_i2c_devs0,
			ARRAY_SIZE(smdk6440_i2c_devs0));
	i2c_register_board_info(1, smdk6440_i2c_devs1,
			ARRAY_SIZE(smdk6440_i2c_devs1));

	samsung_bl_set(&smdk6440_bl_gpio_info, &smdk6440_bl_data);

	s5p6440_set_lcd_interface();
	s3c_fb_set_platdata(&smdk6440_lcd_pdata);

	platform_add_devices(smdk6440_devices, ARRAY_SIZE(smdk6440_devices));
}
Пример #9
0
void __init smartq_machine_init(void)
{
	s3c_i2c0_set_platdata(NULL);
	s3c_hsotg_set_platdata(&smartq_hsotg_pdata);
	s3c_hwmon_set_platdata(&smartq_hwmon_pdata);
	s3c_sdhci1_set_platdata(&smartq_internal_hsmmc_pdata);
	s3c_sdhci2_set_platdata(&smartq_internal_hsmmc_pdata);
	s3c24xx_ts_set_platdata(&smartq_touchscreen_pdata);

	i2c_register_board_info(0, smartq_i2c_devs,
				ARRAY_SIZE(smartq_i2c_devs));

	WARN_ON(smartq_lcd_setup_gpio());
	WARN_ON(smartq_power_off_init());
	WARN_ON(smartq_usb_host_init());
	WARN_ON(smartq_wifi_init());

	platform_add_devices(smartq_devices, ARRAY_SIZE(smartq_devices));
}
static void __init smdk6410_machine_init(void)
{
	u32 cs1;

	s3c_i2c0_set_platdata(NULL);
	s3c_i2c1_set_platdata(NULL);
	s3c_fb_set_platdata(&smdk6410_lcd_pdata);

	s3c24xx_ts_set_platdata(&s3c_ts_platform);

	/* configure nCS1 width to 16 bits */

	cs1 = __raw_readl(S3C64XX_SROM_BW) &
		    ~(S3C64XX_SROM_BW__CS_MASK << S3C64XX_SROM_BW__NCS1__SHIFT);
	cs1 |= ((1 << S3C64XX_SROM_BW__DATAWIDTH__SHIFT) |
		(1 << S3C64XX_SROM_BW__WAITENABLE__SHIFT) |
		(1 << S3C64XX_SROM_BW__BYTEENABLE__SHIFT)) <<
						   S3C64XX_SROM_BW__NCS1__SHIFT;
	__raw_writel(cs1, S3C64XX_SROM_BW);

	/* set timing for nCS1 suitable for ethernet chip */

	__raw_writel((0 << S3C64XX_SROM_BCX__PMC__SHIFT) |
		     (6 << S3C64XX_SROM_BCX__TACP__SHIFT) |
		     (4 << S3C64XX_SROM_BCX__TCAH__SHIFT) |
		     (1 << S3C64XX_SROM_BCX__TCOH__SHIFT) |
		     (0xe << S3C64XX_SROM_BCX__TACC__SHIFT) |
		     (4 << S3C64XX_SROM_BCX__TCOS__SHIFT) |
		     (0 << S3C64XX_SROM_BCX__TACS__SHIFT), S3C64XX_SROM_BC1);

	gpio_request(S3C64XX_GPN(5), "LCD power");
	gpio_request(S3C64XX_GPF(13), "LCD power");
	gpio_request(S3C64XX_GPF(15), "LCD power");

	i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0));
	i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));

	platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices));
}
Пример #11
0
static void __init smdkv210_machine_init(void)
{
	s3c_pm_init();

	/* masked by zjh */
	//smdkv210_dm9000_init();
	
	/* add by zjh */
	s3c_nand_setname("s5pv210-nand");
	s3c_nand_set_platdata(&smdk_nand_info);
	s5pv210_nand_gpio_cfg();
	
	gpio_request(S5PV210_GPD0(1),"beeper");
    s3c_gpio_cfgpin(S5PV210_GPD0(1), S3C_GPIO_SFN(2));
	gpio_free(S5PV210_GPD0(1));

	samsung_keypad_set_platdata(&smdkv210_keypad_data);
	s3c24xx_ts_set_platdata(NULL);

	s3c_i2c0_set_platdata(NULL);
	s3c_i2c1_set_platdata(NULL);
	s3c_i2c2_set_platdata(NULL);
	i2c_register_board_info(0, smdkv210_i2c_devs0,
			ARRAY_SIZE(smdkv210_i2c_devs0));
	i2c_register_board_info(1, smdkv210_i2c_devs1,
			ARRAY_SIZE(smdkv210_i2c_devs1));
	i2c_register_board_info(2, smdkv210_i2c_devs2,
			ARRAY_SIZE(smdkv210_i2c_devs2));

	s3c_ide_set_platdata(&smdkv210_ide_pdata);

	s3c_fb_set_platdata(&smdkv210_lcd0_pdata);

	samsung_bl_set(&smdkv210_bl_gpio_info, &smdkv210_bl_data);

	s3c_hsotg_set_platdata(&smdkv210_hsotg_pdata);

	platform_add_devices(smdkv210_devices, ARRAY_SIZE(smdkv210_devices));
}
Пример #12
0
static void __init tiny210_machine_init(void)
{
	s3c_pm_init();

	tiny210_dm9000_init();

	s3c24xx_ts_set_platdata(NULL);

	s3c_i2c0_set_platdata(NULL);
	s3c_i2c1_set_platdata(NULL);
	s3c_i2c2_set_platdata(NULL);
	i2c_register_board_info(0, tiny210_i2c_devs0,
			ARRAY_SIZE(tiny210_i2c_devs0));
	i2c_register_board_info(1, tiny210_i2c_devs1,
			ARRAY_SIZE(tiny210_i2c_devs1));
	i2c_register_board_info(2, tiny210_i2c_devs2,
			ARRAY_SIZE(tiny210_i2c_devs2));

	samsung_bl_set(&tiny210_bl_gpio_info, &tiny210_bl_data);

	platform_add_devices(tiny210_devices, ARRAY_SIZE(tiny210_devices));
}
static void __init smdkv210_machine_init(void)
{
	s3c_pm_init();

/**************Add by Webee*******************/	
#ifdef CONFIG_S5P_DEV_USB_EHCI
    s5p_ehci_set_platdata(&s5p_ehci_platdata);
#endif
#ifdef CONFIG_S5P_DEV_USB_OHCI
    s5p_ohci_set_platdata(&s5p_ohci_platdata);
#endif
/**************Add by Webee*******************/

	//smdkv210_dm9000_init();

	samsung_keypad_set_platdata(&smdkv210_keypad_data);
	s3c24xx_ts_set_platdata(NULL);

	s3c_i2c0_set_platdata(NULL);
	s3c_i2c1_set_platdata(NULL);
	s3c_i2c2_set_platdata(NULL);
	i2c_register_board_info(0, smdkv210_i2c_devs0,
			ARRAY_SIZE(smdkv210_i2c_devs0));
	i2c_register_board_info(1, smdkv210_i2c_devs1,
			ARRAY_SIZE(smdkv210_i2c_devs1));
	i2c_register_board_info(2, smdkv210_i2c_devs2,
			ARRAY_SIZE(smdkv210_i2c_devs2));

	s3c_ide_set_platdata(&smdkv210_ide_pdata);

	s3c_fb_set_platdata(&smdkv210_lcd0_pdata);

	samsung_bl_set(&smdkv210_bl_gpio_info, &smdkv210_bl_data);

	s3c_hsotg_set_platdata(&smdkv210_hsotg_pdata);

	platform_add_devices(smdkv210_devices, ARRAY_SIZE(smdkv210_devices));
}
Пример #14
0
static void __init gta02_machine_init(void)
{
	/* Set the panic callback to turn AUX LED on or off. */
	panic_blink = gta02_panic_blink;

	s3c_pm_init();

#ifdef CONFIG_CHARGER_PCF50633
	INIT_DELAYED_WORK(&gta02_charger_work, gta02_charger_worker);
#endif

	s3c24xx_udc_set_platdata(&gta02_udc_cfg);
	s3c24xx_ts_set_platdata(&gta02_ts_info);
	s3c_ohci_set_platdata(&gta02_usb_info);
	s3c_nand_set_platdata(&gta02_nand_info);
	s3c_i2c0_set_platdata(NULL);

	i2c_register_board_info(0, gta02_i2c_devs, ARRAY_SIZE(gta02_i2c_devs));

	platform_add_devices(gta02_devices, ARRAY_SIZE(gta02_devices));
	pm_power_off = gta02_poweroff;

	regulator_has_full_constraints();
}
Пример #15
0
static void __init mini6410_machine_init(void)
{
	u32 cs1;

	s3c_i2c0_set_platdata(NULL);
#ifdef CONFIG_S3C_DEV_I2C1
	s3c_i2c1_set_platdata(NULL);
#endif

	s3c_fb_set_platdata(&mini6410_lcd_pdata);

#ifdef CONFIG_SAMSUNG_DEV_TS
	s3c24xx_ts_set_platdata(&s3c_ts_platform);
#endif
#ifdef CONFIG_TOUCHSCREEN_MINI6410
	s3c_ts_set_platdata(&s3c_ts_platform);
#endif

	s3c_sdhci0_set_platdata(&mini6410_hsmmc0_pdata);
	s3c_sdhci1_set_platdata(&mini6410_hsmmc1_pdata);

#ifdef CONFIG_MTD_NAND_S3C
	s3c_device_nand.name = "s3c6410-nand";
#endif
	s3c_nand_set_platdata(&mini6410_nand_info);

	s3c64xx_ac97_setup_gpio(0);

	/* configure nCS1 width to 16 bits */

	cs1 = __raw_readl(S3C64XX_SROM_BW) &
		    ~(S3C64XX_SROM_BW__CS_MASK << S3C64XX_SROM_BW__NCS1__SHIFT);
	cs1 |= ((1 << S3C64XX_SROM_BW__DATAWIDTH__SHIFT) |
		(1 << S3C64XX_SROM_BW__WAITENABLE__SHIFT) |
		(1 << S3C64XX_SROM_BW__BYTEENABLE__SHIFT)) <<
						   S3C64XX_SROM_BW__NCS1__SHIFT;
	__raw_writel(cs1, S3C64XX_SROM_BW);

	/* set timing for nCS1 suitable for ethernet chip */

	__raw_writel((0 << S3C64XX_SROM_BCX__PMC__SHIFT) |
		     (6 << S3C64XX_SROM_BCX__TACP__SHIFT) |
		     (4 << S3C64XX_SROM_BCX__TCAH__SHIFT) |
		     (1 << S3C64XX_SROM_BCX__TCOH__SHIFT) |
		     (0xe << S3C64XX_SROM_BCX__TACC__SHIFT) |
		     (4 << S3C64XX_SROM_BCX__TCOS__SHIFT) |
		     (0 << S3C64XX_SROM_BCX__TACS__SHIFT), S3C64XX_SROM_BC1);

	gpio_request(S3C64XX_GPN(5), "LCD power");
	gpio_request(S3C64XX_GPF(13), "LCD power");
	gpio_request(S3C64XX_GPF(15), "LCD power");

	if (ARRAY_SIZE(i2c_devs0)) {
		i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0));
	}
	if (ARRAY_SIZE(i2c_devs1)) {
		i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));
	}

#ifdef CONFIG_S3C64XX_DEV_FIMC0
	s3c_fimc0_set_platdata(NULL);
#endif
#ifdef CONFIG_S3C64XX_DEV_FIMC1
	s3c_fimc1_set_platdata(NULL);
#endif

	platform_add_devices(mini6410_devices, ARRAY_SIZE(mini6410_devices));
	platform_device_register_simple("GPIODEV", 0, &gpiodev_resource, 1); //GPIO resource MAP
	if ((platform_device_register(&mini6410_leds))!=0)
		printk( "Failed to register  LEDs.\n");
	else
		printk( "LEDs initialized.\n");

#ifdef CONFIG_VIDEO_SAMSUNG
	create_proc_read_entry("videomem", 0, NULL, s3c_media_read_proc, NULL);
#endif
}
Пример #16
0
static void __init smdkc110_machine_init(void)
{
	struct clk *arm_clk;

	arm_clk = clk_get(NULL, "fclk");

	if (arm_clk == NULL) {
		memcpy(&max8698_platform_default_data, &max8698_platform_data_1,
				sizeof(struct max8698_platform_data));
		printk(KERN_ERR "get fclk clock failed\n");
	} else {
		printk(KERN_INFO "arm_clk = %lu\n", arm_clk->rate);
		switch (arm_clk->rate) {
		case 800*1000*1000:
			memcpy(&max8698_platform_default_data,
				&max8698_platform_data_0,
				sizeof(struct max8698_platform_data));
			break;
		case 1000*1000*1000:
			memcpy(&max8698_platform_default_data,
				&max8698_platform_data_1,
				sizeof(struct max8698_platform_data));
			break;
		default:
			printk(KERN_ERR "Set to default voltage value\n");
			memcpy(&max8698_platform_default_data,
				&max8698_platform_data_1,
				sizeof(struct max8698_platform_data));
			break;
		}

		clk_put(arm_clk);

	}
#ifdef CONFIG_DM9000
	smdkv210_dm9000_set();
#endif
	s3c_pm_init();

	s3c_i2c0_set_platdata(NULL);
	s3c_i2c1_set_platdata(NULL);
	s3c_i2c2_set_platdata(NULL);
	i2c_register_board_info(0, smdkc110_i2c_devs0,
			ARRAY_SIZE(smdkc110_i2c_devs0));
	i2c_register_board_info(1, smdkc110_i2c_devs1,
			ARRAY_SIZE(smdkc110_i2c_devs1));
	i2c_register_board_info(2, smdkc110_i2c_devs2,
			ARRAY_SIZE(smdkc110_i2c_devs2));

	s3c_ide_set_platdata(&smdkc110_ide_pdata);

#ifdef CONFIG_S3C64XX_DEV_SPI
	if (!gpio_request(S5PV210_GPB(1), "SPI_CS0")) {
		gpio_direction_output(S5PV210_GPB(1), 1);
		s3c_gpio_cfgpin(S5PV210_GPB(1), S3C_GPIO_SFN(1));
		s3c_gpio_setpull(S5PV210_GPB(1), S3C_GPIO_PULL_UP);
		s5pv210_spi_set_info(0, S5PV210_SPI_SRCCLK_PCLK,
			ARRAY_SIZE(smdk_spi0_csi));
	}
	if (!gpio_request(S5PV210_GPB(5), "SPI_CS1")) {
		gpio_direction_output(S5PV210_GPB(5), 1);
		s3c_gpio_cfgpin(S5PV210_GPB(5), S3C_GPIO_SFN(1));
		s3c_gpio_setpull(S5PV210_GPB(5), S3C_GPIO_PULL_UP);
		s5pv210_spi_set_info(1, S5PV210_SPI_SRCCLK_PCLK,
			ARRAY_SIZE(smdk_spi1_csi));
	}
	spi_register_board_info(s3c_spi_devs, ARRAY_SIZE(s3c_spi_devs));
#endif

#ifdef CONFIG_S3C_DEV_HSMMC
	s3c_sdhci0_set_platdata(&smdkc110_hsmmc0_pdata);
#endif
#ifdef CONFIG_S3C_DEV_HSMMC1
	s3c_sdhci1_set_platdata(&smdkc110_hsmmc1_pdata);
#endif
#ifdef CONFIG_S3C_DEV_HSMMC2
	s3c_sdhci2_set_platdata(&smdkc110_hsmmc2_pdata);
#endif
#ifdef CONFIG_S3C_DEV_HSMMC3
	s3c_sdhci3_set_platdata(&smdkc110_hsmmc3_pdata);
#endif
#ifdef CONFIG_S3C_DEV_HWMON
	s3c_hwmon_set_platdata(&smdkc110_hwmon_pdata);
#endif
#ifdef CONFIG_TOUCHSCREEN_S3C2410
#ifdef CONFIG_S3C_DEV_ADC
        s3c24xx_ts_set_platdata(&s3c_ts_platform);
#endif
#ifdef CONFIG_S3C_DEV_ADC1
        s3c24xx_ts1_set_platdata(&s3c_ts_platform);
#endif
#endif
#if defined(CONFIG_VIDEO_TV20) || defined(CONFIG_VIDEO_TVOUT)
	s5p_hdmi_hpd_set_platdata(&hdmi_hpd_data);
	s5p_hdmi_cec_set_platdata(&hdmi_cec_data);
#endif

	platform_add_devices(smdkc110_devices, ARRAY_SIZE(smdkc110_devices));
}
Пример #17
0
static void __init mini210_machine_init(void)
{
	arm_pm_restart = smdkc110_pm_restart;

	s3c_pm_init();

	mini210_wifi_init();
#ifdef CONFIG_DM9000
	mini210_dm9000_init();
#endif

	platform_add_devices(mini210_devices, ARRAY_SIZE(mini210_devices));

#ifdef CONFIG_ANDROID_PMEM
	android_pmem_set_platdata();
#endif

#ifdef CONFIG_KEYBOARD_SAMSUNG
	samsung_keypad_set_platdata(&mini210_keypad_data);
#endif
#ifdef CONFIG_TOUCHSCREEN_S3C2410
	s3c24xx_ts_set_platdata(&s3c_ts_platform);
#endif

	s3c_i2c0_set_platdata(NULL);
	s3c_i2c1_set_platdata(NULL);
#ifdef CONFIG_TOUCHSCREEN_GOODIX
	if (mini210_get_ctp() == CTP_GT80X) {
		i2c2_data.frequency = 260*1000;
	}
#endif
	s3c_i2c2_set_platdata(&i2c2_data);
	i2c_register_board_info(0, mini210_i2c_devs0,
			ARRAY_SIZE(mini210_i2c_devs0));
	i2c_register_board_info(1, mini210_i2c_devs1,
			ARRAY_SIZE(mini210_i2c_devs1));
	i2c_register_board_info(2, mini210_i2c_devs2,
			ARRAY_SIZE(mini210_i2c_devs2));
#ifdef CONFIG_TOUCHSCREEN_EGALAX
	i2c_register_board_info(5, i2c_devs5, ARRAY_SIZE(i2c_devs5));
#endif

#ifdef CONFIG_S5PV210_SETUP_IDE
	s3c_ide_set_platdata(&mini210_ide_pdata);
#endif

#ifdef CONFIG_FB_S3C_MINI210
	{
		struct s3cfb_lcd *mlcd = mini210_get_lcd();
		if (!(mlcd->args & 0x0f)) {
			if (readl(S5PV210_GPF0_BASE + 0x184) & 0x10)
				mlcd->args |= (1 << 7);
		}
		mini210_fb_data.lcd = mlcd;
		s3c_fb_set_platdata(&mini210_fb_data);
	}
#endif

#ifdef CONFIG_S3C_DEV_HSMMC
	s3c_sdhci0_set_platdata(&mini210_hsmmc0_pdata);
#endif
#ifdef CONFIG_S3C_DEV_HSMMC1
	s3c_sdhci1_set_platdata(&mini210_hsmmc1_pdata);
#endif
#ifdef CONFIG_S3C_DEV_HSMMC2
	s3c_sdhci2_set_platdata(&mini210_hsmmc2_pdata);
#endif
#ifdef CONFIG_S3C_DEV_HSMMC3
	s3c_sdhci3_set_platdata(&mini210_hsmmc3_pdata);
#endif

#ifdef CONFIG_VIDEO_FIMC
	/* fimc */
	s3c_fimc0_set_platdata(&fimc_plat_lsi);
	s3c_fimc1_set_platdata(&fimc_plat_lsi);
	s3c_fimc2_set_platdata(&fimc_plat_lsi);
#ifdef CONFIG_VIDEO_S5K4BA
#ifdef CAM_ITU_CH_A
	smdkv210_cam0_power(1);
#else
	smdkv210_cam1_power(1);
#endif
#endif
#endif

#ifdef CONFIG_VIDEO_FIMC_MIPI
	s3c_csis_set_platdata(NULL);
#endif

#ifdef CONFIG_VIDEO_JPEG_V2
	s3c_jpeg_set_platdata(&jpeg_plat);
#endif
#ifdef CONFIG_VIDEO_MFC50
	/* mfc */
	s3c_mfc_set_platdata(NULL);
#endif

	/* spi */
#ifdef CONFIG_SPI_S3C64XX
	if (!gpio_request(S5PV210_GPB(1), "SPI_CS0")) {
		gpio_direction_output(S5PV210_GPB(1), 1);
		s3c_gpio_cfgpin(S5PV210_GPB(1), S3C_GPIO_SFN(1));
		s3c_gpio_setpull(S5PV210_GPB(1), S3C_GPIO_PULL_UP);
		s5pv210_spi_set_info(0, S5PV210_SPI_SRCCLK_PCLK,
				ARRAY_SIZE(smdk_spi0_csi));
	}
	if (!gpio_request(S5PV210_GPB(5), "SPI_CS1")) {
		gpio_direction_output(S5PV210_GPB(5), 1);
		s3c_gpio_cfgpin(S5PV210_GPB(5), S3C_GPIO_SFN(1));
		s3c_gpio_setpull(S5PV210_GPB(5), S3C_GPIO_PULL_UP);
		s5pv210_spi_set_info(1, S5PV210_SPI_SRCCLK_PCLK,
				ARRAY_SIZE(smdk_spi1_csi));
	}
	spi_register_board_info(s3c_spi_devs, ARRAY_SIZE(s3c_spi_devs));
#endif

	mini210_otg_init();
	mini210_ehci_init();
	mini210_ohci_init();
	clk_xusbxti.rate = 24000000;

	regulator_has_full_constraints();

	mini210_setup_clocks();

	/* write something into the INFORM6 register that we can use to
	 * differentiate an unclear reboot from a clean reboot (which
	 * writes a small integer code to INFORM6).
	 */
	__raw_writel(0xee, S5P_INFORM6);
}
Пример #18
0
static void __init h1940_init(void)
{
	u32 tmp;

	s3c24xx_fb_set_platdata(&h1940_fb_info);
	s3c24xx_mci_set_platdata(&h1940_mmc_cfg);
 	s3c24xx_udc_set_platdata(&h1940_udc_cfg);
	s3c24xx_ts_set_platdata(&h1940_ts_cfg);
	s3c_i2c0_set_platdata(NULL);

	/* Turn off suspend on both USB ports, and switch the
	 * selectable USB port to USB device mode. */

	s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST |
			      S3C2410_MISCCR_USBSUSPND0 |
			      S3C2410_MISCCR_USBSUSPND1, 0x0);

	tmp =   (0x78 << S3C24XX_PLLCON_MDIVSHIFT)
	      | (0x02 << S3C24XX_PLLCON_PDIVSHIFT)
	      | (0x03 << S3C24XX_PLLCON_SDIVSHIFT);
	writel(tmp, S3C2410_UPLLCON);

	gpio_request(S3C2410_GPC(0), "LCD power");
	gpio_request(S3C2410_GPC(1), "LCD power");
	gpio_request(S3C2410_GPC(4), "LCD power");
	gpio_request(S3C2410_GPC(5), "LCD power");
	gpio_request(S3C2410_GPC(6), "LCD power");
	gpio_request(H1940_LATCH_LCD_P0, "LCD power");
	gpio_request(H1940_LATCH_LCD_P1, "LCD power");
	gpio_request(H1940_LATCH_LCD_P2, "LCD power");
	gpio_request(H1940_LATCH_LCD_P3, "LCD power");
	gpio_request(H1940_LATCH_LCD_P4, "LCD power");
	gpio_request(H1940_LATCH_MAX1698_nSHUTDOWN, "LCD power");
	gpio_direction_output(S3C2410_GPC(0), 0);
	gpio_direction_output(S3C2410_GPC(1), 0);
	gpio_direction_output(S3C2410_GPC(4), 0);
	gpio_direction_output(S3C2410_GPC(5), 0);
	gpio_direction_input(S3C2410_GPC(6));
	gpio_direction_output(H1940_LATCH_LCD_P0, 0);
	gpio_direction_output(H1940_LATCH_LCD_P1, 0);
	gpio_direction_output(H1940_LATCH_LCD_P2, 0);
	gpio_direction_output(H1940_LATCH_LCD_P3, 0);
	gpio_direction_output(H1940_LATCH_LCD_P4, 0);
	gpio_direction_output(H1940_LATCH_MAX1698_nSHUTDOWN, 0);

	gpio_request(H1940_LATCH_SD_POWER, "SD power");
	gpio_direction_output(H1940_LATCH_SD_POWER, 0);

	platform_add_devices(h1940_devices, ARRAY_SIZE(h1940_devices));

	gpio_request(S3C2410_GPA(1), "Red LED blink");
	gpio_request(S3C2410_GPA(3), "Blue LED blink");
	gpio_request(S3C2410_GPA(7), "Green LED blink");
	gpio_request(H1940_LATCH_LED_FLASH, "LED blink");
	gpio_direction_output(S3C2410_GPA(1), 0);
	gpio_direction_output(S3C2410_GPA(3), 0);
	gpio_direction_output(S3C2410_GPA(7), 0);
	gpio_direction_output(H1940_LATCH_LED_FLASH, 0);

	i2c_register_board_info(0, h1940_i2c_devices,
		ARRAY_SIZE(h1940_i2c_devices));
}
static void __init smdk6440_machine_init(void)
{
	s3c24xx_ts_set_platdata(&s3c_ts_platform);

	platform_add_devices(smdk6440_devices, ARRAY_SIZE(smdk6440_devices));
}