static void __init smdk2413_machine_init(void) { s3c2410_gpio_setpin(S3C2410_GPF(2), 0); s3c2410_gpio_cfgpin(S3C2410_GPF(2), S3C2410_GPIO_OUTPUT); s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST | S3C2410_MISCCR_USBSUSPND0 | S3C2410_MISCCR_USBSUSPND1, 0x0); s3c24xx_udc_set_platdata(&smdk2413_udc_cfg); s3c_i2c0_set_platdata(NULL); platform_add_devices(smdk2413_devices, ARRAY_SIZE(smdk2413_devices)); smdk_machine_init(); }
static void __init falinuxs3c2440_machine_init(void) { s3c_device_sdi.dev.platform_data = &falinuxs3c2440_mmc_cfg; s3c24xx_fb_set_platdata(&falinuxs3c2440_lcd_cfg); s3c24xx_udc_set_platdata(&falinuxs3c2440_udc_cfg); // MISCELLANEOUS CONTROL REGISTER (MISCCR) USB Host, USB Device // USB Host/Device 겸용 사용 Port ì„¤ì • falinuxs24xx_machine_init(); // arch/arm/plat-s3c24xx/common-falinux.c set_usb_2ndport_device(); // setup irq ------------------------------- // IRQT_RISING, IRQT_FALLING, IRQT_HIGH, IRQT_LOW set_irq_type( IRQ_EINT16, IRQT_LOW); // AX88796B - EtherNet Interrupt Init }
static int rx3000_udc_probe(struct platform_device *pdev) { /* configure vbus pin */ s3c2410_gpio_cfgpin(S3C2410_GPG5, S3C2410_GPG5_EINT13); s3c24xx_udc_set_platdata(&rx3000_udc_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); platform_device_register(&s3c_device_usbgadget); return 0; }
static void __init smdk2413_machine_init(void) { /* Turn off suspend on both USB ports, and switch the * selectable USB port to USB device mode. */ s3c2410_gpio_setpin(S3C2410_GPF(2), 0); s3c2410_gpio_cfgpin(S3C2410_GPF(2), S3C2410_GPIO_OUTPUT); s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST | S3C2410_MISCCR_USBSUSPND0 | S3C2410_MISCCR_USBSUSPND1, 0x0); s3c24xx_udc_set_platdata(&smdk2413_udc_cfg); s3c_i2c0_set_platdata(NULL); platform_add_devices(smdk2413_devices, ARRAY_SIZE(smdk2413_devices)); smdk_machine_init(); }
static void __init smdk2413_machine_init(void) { /* Turn off suspend on both USB ports, and switch the * selectable USB port to USB device mode. */ WARN_ON(gpio_request(S3C2410_GPF(2), "udc pull")); gpio_direction_output(S3C2410_GPF(2), 0); s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST | S3C2410_MISCCR_USBSUSPND0 | S3C2410_MISCCR_USBSUSPND1, 0x0); s3c24xx_udc_set_platdata(&smdk2413_udc_cfg); s3c_i2c0_set_platdata(NULL); platform_add_devices(smdk2413_devices, ARRAY_SIZE(smdk2413_devices)); smdk_machine_init(); }
static void __init n30_init(void) { WARN_ON(gpio_request(S3C2410_GPG(4), "mmc power")); s3c24xx_fb_set_platdata(&n30_fb_info); s3c24xx_udc_set_platdata(&n30_udc_cfg); s3c24xx_mci_set_platdata(&n30_mci_cfg); s3c_i2c0_set_platdata(&n30_i2ccfg); /* 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); if (machine_is_n30()) { /* 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); platform_add_devices(n30_devices, ARRAY_SIZE(n30_devices)); } if (machine_is_n35()) { /* Turn off suspend and switch the selectable USB port * to USB device mode. Turn on suspend for the host * port since it is not connected on the N35. * * Actually, the host port is available at some pads * on the back of the device, so it would actually be * possible to add a USB device inside the N35 if you * are willing to do some hardware modifications. */ s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST | S3C2410_MISCCR_USBSUSPND0 | S3C2410_MISCCR_USBSUSPND1, S3C2410_MISCCR_USBSUSPND0); platform_add_devices(n35_devices, ARRAY_SIZE(n35_devices)); } }
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(>a02_charger_work, gta02_charger_worker); #endif s3c24xx_udc_set_platdata(>a02_udc_cfg); s3c_ohci_set_platdata(>a02_usb_info); s3c_nand_set_platdata(>a02_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; }
static void __init h1940_init(void) { u32 tmp; s3c24xx_fb_set_platdata(&h1940_fb_info); s3c24xx_udc_set_platdata(&h1940_udc_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); platform_add_devices(h1940_devices, ARRAY_SIZE(h1940_devices)); }
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 jive_machine_init(void) { /* register system core operations for managing low level suspend */ register_syscore_ops(&jive_pm_syscore_ops); /* write our sleep configurations for the IO. Pull down all unused * IO, ensure that we have turned off all peripherals we do not * need, and configure the ones we do need. */ /* Port B sleep */ __raw_writel(S3C2412_SLPCON_IN(0) | S3C2412_SLPCON_PULL(1) | S3C2412_SLPCON_HIGH(2) | S3C2412_SLPCON_PULL(3) | S3C2412_SLPCON_PULL(4) | S3C2412_SLPCON_PULL(5) | S3C2412_SLPCON_PULL(6) | S3C2412_SLPCON_HIGH(7) | S3C2412_SLPCON_PULL(8) | S3C2412_SLPCON_PULL(9) | S3C2412_SLPCON_PULL(10), S3C2412_GPBSLPCON); /* Port C sleep */ __raw_writel(S3C2412_SLPCON_PULL(0) | S3C2412_SLPCON_PULL(1) | S3C2412_SLPCON_PULL(2) | S3C2412_SLPCON_PULL(3) | S3C2412_SLPCON_PULL(4) | S3C2412_SLPCON_PULL(5) | S3C2412_SLPCON_LOW(6) | S3C2412_SLPCON_PULL(6) | S3C2412_SLPCON_PULL(7) | S3C2412_SLPCON_PULL(8) | S3C2412_SLPCON_PULL(9) | S3C2412_SLPCON_PULL(10) | S3C2412_SLPCON_PULL(11) | S3C2412_SLPCON_PULL(12) | S3C2412_SLPCON_PULL(13) | S3C2412_SLPCON_PULL(14) | S3C2412_SLPCON_PULL(15), S3C2412_GPCSLPCON); /* Port D sleep */ __raw_writel(S3C2412_SLPCON_ALL_PULL, S3C2412_GPDSLPCON); /* Port F sleep */ __raw_writel(S3C2412_SLPCON_LOW(0) | S3C2412_SLPCON_LOW(1) | S3C2412_SLPCON_LOW(2) | S3C2412_SLPCON_EINT(3) | S3C2412_SLPCON_EINT(4) | S3C2412_SLPCON_EINT(5) | S3C2412_SLPCON_EINT(6) | S3C2412_SLPCON_EINT(7), S3C2412_GPFSLPCON); /* Port G sleep */ __raw_writel(S3C2412_SLPCON_IN(0) | S3C2412_SLPCON_IN(1) | S3C2412_SLPCON_IN(2) | S3C2412_SLPCON_IN(3) | S3C2412_SLPCON_IN(4) | S3C2412_SLPCON_IN(5) | S3C2412_SLPCON_IN(6) | S3C2412_SLPCON_IN(7) | S3C2412_SLPCON_PULL(8) | S3C2412_SLPCON_PULL(9) | S3C2412_SLPCON_IN(10) | S3C2412_SLPCON_PULL(11) | S3C2412_SLPCON_PULL(12) | S3C2412_SLPCON_PULL(13) | S3C2412_SLPCON_IN(14) | S3C2412_SLPCON_PULL(15), S3C2412_GPGSLPCON); /* Port H sleep */ __raw_writel(S3C2412_SLPCON_PULL(0) | S3C2412_SLPCON_PULL(1) | S3C2412_SLPCON_PULL(2) | S3C2412_SLPCON_PULL(3) | S3C2412_SLPCON_PULL(4) | S3C2412_SLPCON_PULL(5) | S3C2412_SLPCON_PULL(6) | S3C2412_SLPCON_IN(7) | S3C2412_SLPCON_IN(8) | S3C2412_SLPCON_PULL(9) | S3C2412_SLPCON_IN(10), S3C2412_GPHSLPCON); /* initialise the power management now we've setup everything. */ s3c_pm_init(); /** TODO - check that this is after the cmdline option! */ s3c_nand_set_platdata(&jive_nand_info); /* initialise the spi */ gpio_request(S3C2410_GPG(13), "lcm reset"); gpio_direction_output(S3C2410_GPG(13), 0); gpio_request(S3C2410_GPB(7), "jive spi"); gpio_direction_output(S3C2410_GPB(7), 1); gpio_request_one(S3C2410_GPB(6), GPIOF_OUT_INIT_LOW, NULL); gpio_free(S3C2410_GPB(6)); gpio_request_one(S3C2410_GPG(8), GPIOF_OUT_INIT_HIGH, NULL); gpio_free(S3C2410_GPG(8)); /* initialise the WM8750 spi */ gpio_request(S3C2410_GPH(10), "jive wm8750 spi"); gpio_direction_output(S3C2410_GPH(10), 1); /* 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); s3c24xx_udc_set_platdata(&jive_udc_cfg); s3c24xx_fb_set_platdata(&jive_lcd_config); spi_register_board_info(jive_spi_devs, ARRAY_SIZE(jive_spi_devs)); s3c_i2c0_set_platdata(&jive_i2c_cfg); i2c_register_board_info(0, jive_i2c_devs, ARRAY_SIZE(jive_i2c_devs)); pm_power_off = jive_power_off; platform_add_devices(jive_devices, ARRAY_SIZE(jive_devices)); }
static void __init gta02_machine_init(void) { int rc; /* set the panic callback to make AUX blink fast */ panic_blink = gta02_panic_blink; switch (S3C_SYSTEM_REV_ATAG) { case GTA02v6_SYSTEM_REV: /* we need push-pull interrupt from motion sensors */ lis302_pdata_top.open_drain = 0; lis302_pdata_bottom.open_drain = 0; break; default: break; } spin_lock_init(&motion_irq_lock); #ifdef CONFIG_CHARGER_PCF50633 INIT_DELAYED_WORK(>a02_charger_work, gta02_charger_worker); #endif /* Glamo chip select optimization */ /* *((u32 *)(S3C2410_MEMREG(((1 + 1) << 2)))) = 0x1280; */ /* do not force soft ecc if we are asked to use hardware_ecc */ if (hardware_ecc_str[0] == '1') gta02_nand_info.software_ecc = 0; s3c_device_usb.dev.platform_data = >a02_usb_info; s3c_device_nand.dev.platform_data = >a02_nand_info; s3c_device_sdi.dev.platform_data = >a02_s3c_mmc_cfg; /* acc sensor chip selects */ s3c2410_gpio_setpin(S3C2410_GPD12, 1); s3c2410_gpio_cfgpin(S3C2410_GPD12, S3C2410_GPIO_OUTPUT); s3c2410_gpio_setpin(S3C2410_GPD13, 1); s3c2410_gpio_cfgpin(S3C2410_GPD13, S3C2410_GPIO_OUTPUT); s3c24xx_udc_set_platdata(>a02_udc_cfg); s3c_i2c0_set_platdata(NULL); set_s3c2410ts_info(>a02_ts_cfg); mangle_glamo_res_by_system_rev(); i2c_register_board_info(0, gta02_i2c_devs, ARRAY_SIZE(gta02_i2c_devs)); spi_register_board_info(gta02_spi_board_info, ARRAY_SIZE(gta02_spi_board_info)); #ifdef CONFIG_CHARGER_PCF50633 mangle_pmu_pdata_by_system_rev(); #endif platform_add_devices(gta02_devices, ARRAY_SIZE(gta02_devices)); s3c_pm_init(); /* Make sure the modem can wake us up */ set_irq_type(GTA02_IRQ_MODEM, IRQ_TYPE_EDGE_RISING); rc = request_irq(GTA02_IRQ_MODEM, gta02_modem_irq, IRQF_DISABLED, "modem", NULL); if (rc < 0) printk(KERN_ERR "GTA02: can't request GSM modem wakeup IRQ\n"); enable_irq_wake(GTA02_IRQ_MODEM); /* Make sure the wifi module can wake us up*/ set_irq_type(GTA02_IRQ_WLAN_GPIO1, IRQ_TYPE_EDGE_RISING); rc = request_irq(GTA02_IRQ_WLAN_GPIO1, ar6000_wow_irq, IRQF_DISABLED, "ar6000", NULL); if (rc < 0) printk(KERN_ERR "GTA02: can't request ar6k wakeup IRQ\n"); enable_irq_wake(GTA02_IRQ_WLAN_GPIO1); pm_power_off = gta02_poweroff; /* Register the HDQ and vibrator as children of pwm device */ #ifdef CONFIG_HDQ_GPIO_BITBANG gta02_hdq_device.dev.parent = &s3c24xx_pwm_device.dev; platform_device_register(>a02_hdq_device); #endif #ifdef CONFIG_LEDS_GTA02_VIBRATOR gta02_vibrator_dev.dev.parent = &s3c24xx_pwm_device.dev; platform_device_register(>a02_vibrator_dev); #endif }
static void __init jive_machine_init(void) { /* register system devices for managing low level suspend */ sysdev_class_register(&jive_pm_sysclass); sysdev_register(&jive_pm_sysdev); /* write our sleep configurations for the IO. Pull down all unused * IO, ensure that we have turned off all peripherals we do not * need, and configure the ones we do need. */ /* Port B sleep */ __raw_writel(S3C2412_SLPCON_IN(0) | S3C2412_SLPCON_PULL(1) | S3C2412_SLPCON_HIGH(2) | S3C2412_SLPCON_PULL(3) | S3C2412_SLPCON_PULL(4) | S3C2412_SLPCON_PULL(5) | S3C2412_SLPCON_PULL(6) | S3C2412_SLPCON_HIGH(7) | S3C2412_SLPCON_PULL(8) | S3C2412_SLPCON_PULL(9) | S3C2412_SLPCON_PULL(10), S3C2412_GPBSLPCON); /* Port C sleep */ __raw_writel(S3C2412_SLPCON_PULL(0) | S3C2412_SLPCON_PULL(1) | S3C2412_SLPCON_PULL(2) | S3C2412_SLPCON_PULL(3) | S3C2412_SLPCON_PULL(4) | S3C2412_SLPCON_PULL(5) | S3C2412_SLPCON_LOW(6) | S3C2412_SLPCON_PULL(6) | S3C2412_SLPCON_PULL(7) | S3C2412_SLPCON_PULL(8) | S3C2412_SLPCON_PULL(9) | S3C2412_SLPCON_PULL(10) | S3C2412_SLPCON_PULL(11) | S3C2412_SLPCON_PULL(12) | S3C2412_SLPCON_PULL(13) | S3C2412_SLPCON_PULL(14) | S3C2412_SLPCON_PULL(15), S3C2412_GPCSLPCON); /* Port D sleep */ __raw_writel(S3C2412_SLPCON_ALL_PULL, S3C2412_GPDSLPCON); /* Port F sleep */ __raw_writel(S3C2412_SLPCON_LOW(0) | S3C2412_SLPCON_LOW(1) | S3C2412_SLPCON_LOW(2) | S3C2412_SLPCON_EINT(3) | S3C2412_SLPCON_EINT(4) | S3C2412_SLPCON_EINT(5) | S3C2412_SLPCON_EINT(6) | S3C2412_SLPCON_EINT(7), S3C2412_GPFSLPCON); /* Port G sleep */ __raw_writel(S3C2412_SLPCON_IN(0) | S3C2412_SLPCON_IN(1) | S3C2412_SLPCON_IN(2) | S3C2412_SLPCON_IN(3) | S3C2412_SLPCON_IN(4) | S3C2412_SLPCON_IN(5) | S3C2412_SLPCON_IN(6) | S3C2412_SLPCON_IN(7) | S3C2412_SLPCON_PULL(8) | S3C2412_SLPCON_PULL(9) | S3C2412_SLPCON_IN(10) | S3C2412_SLPCON_PULL(11) | S3C2412_SLPCON_PULL(12) | S3C2412_SLPCON_PULL(13) | S3C2412_SLPCON_IN(14) | S3C2412_SLPCON_PULL(15), S3C2412_GPGSLPCON); /* Port H sleep */ __raw_writel(S3C2412_SLPCON_PULL(0) | S3C2412_SLPCON_PULL(1) | S3C2412_SLPCON_PULL(2) | S3C2412_SLPCON_PULL(3) | S3C2412_SLPCON_PULL(4) | S3C2412_SLPCON_PULL(5) | S3C2412_SLPCON_PULL(6) | S3C2412_SLPCON_IN(7) | S3C2412_SLPCON_IN(8) | S3C2412_SLPCON_PULL(9) | S3C2412_SLPCON_IN(10), S3C2412_GPHSLPCON); /* initialise the power management now we've setup everything. */ s3c_pm_init(); s3c_device_nand.dev.platform_data = &jive_nand_info; /* initialise the spi */ s3c2410_gpio_setpin(S3C2410_GPG13, 0); s3c2410_gpio_cfgpin(S3C2410_GPG13, S3C2410_GPIO_OUTPUT); s3c2410_gpio_setpin(S3C2410_GPB7, 1); s3c2410_gpio_cfgpin(S3C2410_GPB7, S3C2410_GPIO_OUTPUT); s3c2410_gpio_setpin(S3C2410_GPB6, 0); s3c2410_gpio_cfgpin(S3C2410_GPB6, S3C2410_GPIO_OUTPUT); s3c2410_gpio_setpin(S3C2410_GPG8, 1); s3c2410_gpio_cfgpin(S3C2410_GPG8, S3C2410_GPIO_OUTPUT); /* initialise the WM8750 spi */ s3c2410_gpio_setpin(S3C2410_GPH10, 1); s3c2410_gpio_cfgpin(S3C2410_GPH10, S3C2410_GPIO_OUTPUT); /* 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); s3c24xx_udc_set_platdata(&jive_udc_cfg); s3c24xx_fb_set_platdata(&jive_lcd_config); spi_register_board_info(jive_spi_devs, ARRAY_SIZE(jive_spi_devs)); s3c_i2c0_set_platdata(&jive_i2c_cfg); i2c_register_board_info(0, jive_i2c_devs, ARRAY_SIZE(jive_i2c_devs)); pm_power_off = jive_power_off; platform_add_devices(jive_devices, ARRAY_SIZE(jive_devices)); }