static void __init qt2410_machine_init(void) { s3c_nand_set_platdata(&qt2410_nand_info); switch (tft_type) { case 'p': /* production */ qt2410_fb_info.default_display = 1; break; case 'b': /* big */ qt2410_fb_info.default_display = 0; break; case 's': /* small */ default: qt2410_fb_info.default_display = 2; break; } s3c24xx_fb_set_platdata(&qt2410_fb_info); s3c_gpio_cfgpin(S3C2410_GPB(0), S3C2410_GPIO_OUTPUT); s3c2410_gpio_setpin(S3C2410_GPB(0), 1); s3c24xx_udc_set_platdata(&qt2410_udc_cfg); s3c_i2c0_set_platdata(NULL); WARN_ON(gpio_request(S3C2410_GPB(5), "spi cs")); gpio_direction_output(S3C2410_GPB(5), 1); platform_add_devices(qt2410_devices, ARRAY_SIZE(qt2410_devices)); s3c_pm_init(); }
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)); }
static void __init rx3715_init_machine(void) { memcpy(phys_to_virt(H1940_SUSPEND_RESUMEAT), h1940_pm_return, 1024); s3c2410_pm_init(); s3c24xx_fb_set_platdata(&rx3715_lcdcfg); }
static void __init smdk2440_machine_init(void) { s3c24xx_fb_set_platdata(&smdk2440_lcd_cfg); platform_add_devices(smdk2440_devices, ARRAY_SIZE(smdk2440_devices)); smdk_machine_init(); }
static void __init qt2410_machine_init(void) { s3c_device_nand.dev.platform_data = &qt2410_nand_info; switch (tft_type) { case 'p': qt2410_fb_info.default_display = 1; break; case 'b': qt2410_fb_info.default_display = 0; break; case 's': default: qt2410_fb_info.default_display = 2; break; } s3c24xx_fb_set_platdata(&qt2410_fb_info); s3c2410_gpio_cfgpin(S3C2410_GPB(0), S3C2410_GPIO_OUTPUT); s3c2410_gpio_setpin(S3C2410_GPB(0), 1); s3c24xx_udc_set_platdata(&qt2410_udc_cfg); s3c_i2c0_set_platdata(NULL); s3c2410_gpio_cfgpin(S3C2410_GPB(5), S3C2410_GPIO_OUTPUT); platform_add_devices(qt2410_devices, ARRAY_SIZE(qt2410_devices)); s3c_pm_init(); }
static void __init smdk2440_machine_init(void) { s3c24xx_fb_set_platdata(&smdk2440_fb_info); s3c_i2c0_set_platdata(NULL); platform_add_devices(smdk2440_devices, ARRAY_SIZE(smdk2440_devices)); smdk_machine_init(); }
static void __init amlm5900_init(void) { amlm5900_init_pm(); #ifdef CONFIG_FB_S3C2410 s3c24xx_fb_set_platdata(&amlm5900_fb_info); #endif platform_add_devices(amlm5900_devices, ARRAY_SIZE(amlm5900_devices)); }
static void __init bast_init(void) { sysdev_class_register(&bast_pm_sysclass); sysdev_register(&bast_pm_sysdev); s3c24xx_fb_set_platdata(&bast_fb_info); platform_add_devices(bast_devices, ARRAY_SIZE(bast_devices)); }
static void __init at2440evb_init(void) { s3c24xx_fb_set_platdata(&at2440evb_fb_info); s3c24xx_mci_set_platdata(&at2440evb_mci_pdata); s3c_nand_set_platdata(&at2440evb_nand_info); s3c_i2c0_set_platdata(NULL); platform_add_devices(at2440evb_devices, ARRAY_SIZE(at2440evb_devices)); }
static void __init smdk2440_machine_init(void) { s3c24xx_fb_set_platdata(&smdk2440_fb_info); s3c_i2c0_set_platdata(NULL); // s3c_device_sdi.dev.platform_data = &gec2440_mmc_cfg; // sd platform_add_devices(smdk2440_devices, ARRAY_SIZE(smdk2440_devices)); smdk_machine_init(); }
static void __init rx3715_init_machine(void) { #ifdef CONFIG_PM_H1940 memcpy(phys_to_virt(H1940_SUSPEND_RESUMEAT), h1940_pm_return, 1024); #endif s3c2410_pm_init(); s3c24xx_fb_set_platdata(&rx3715_fb_info); platform_add_devices(rx3715_devices, ARRAY_SIZE(rx3715_devices)); }
static void __init tq2440_machine_init(void) { s3c24xx_fb_set_platdata(&tq2440_fb_info); s3c_i2c0_set_platdata(NULL); platform_add_devices(tq2440_devices, ARRAY_SIZE(tq2440_devices)); EmbedSky_machine_init(); s3c2410_gpio_setpin(S3C2410_GPG12, 0); s3c2410_gpio_cfgpin(S3C2410_GPG12, S3C2410_GPIO_OUTPUT); s3c24xx_udc_set_platdata(&EmbedSky_udc_cfg); }
static void __init smdk2440_machine_init(void) { //s3c24xx_fb_set_platdata(&smdk2440_fb_info); #if defined (LCD_WIDTH) s3c24xx_fb_set_platdata(&mini2440_fb_info); #endif platform_add_devices(smdk2440_devices, ARRAY_SIZE(smdk2440_devices)); smdk_machine_init(); }
static void __init bast_init(void) { sysdev_class_register(&bast_pm_sysclass); sysdev_register(&bast_pm_sysdev); s3c24xx_fb_set_platdata(&bast_fb_info); platform_add_devices(bast_devices, ARRAY_SIZE(bast_devices)); i2c_register_board_info(0, bast_i2c_devs, ARRAY_SIZE(bast_i2c_devs)); nor_simtec_init(); }
static void __init mini2440_machine_init(void) { #if defined (LCD_WIDTH) s3c24xx_fb_set_platdata(&mini2440_fb_info); #endif s3c_i2c0_set_platdata(NULL); s3c2410_gpio_cfgpin(S3C2410_GPC(0), S3C2410_GPC0_LEND); s3c_device_nand.dev.platform_data = &friendly_arm_nand_info; s3c_device_sdi.dev.platform_data = &mini2440_mmc_cfg; platform_add_devices(mini2440_devices, ARRAY_SIZE(mini2440_devices)); s3c_pm_init(); }
static void __init gec2440_machine_init(void) { s3c24xx_fb_set_platdata(&s3c24xx_fb_info); s3c_i2c0_set_platdata(NULL); s3c2410_gpio_cfgpin(S3C2410_GPC(0), S3C2410_GPC0_LEND); s3c_device_usb.dev.platform_data = &usb_gec2440_info; s3c_device_nand.dev.platform_data = &gec2440_nand_info; s3c_device_sdi.dev.platform_data = &gec2440_mmc_cfg; platform_add_devices(gec2440_devices, ARRAY_SIZE(gec2440_devices)); platform_device_register_simple("GPIODEV", 0, &gpiodev_resource, 1); //GPIO resource MAP s3c_pm_init(); }
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)); }
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)); } WARN_ON(gpio_request(S3C2410_GPB(3), "udc pup")); gpio_direction_output(S3C2410_GPB(3), 0); }
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 void __init bast_init(void) { sysdev_class_register(&bast_pm_sysclass); sysdev_register(&bast_pm_sysdev); s3c_i2c0_set_platdata(&bast_i2c_info); s3c_nand_set_platdata(&bast_nand_info); s3c24xx_fb_set_platdata(&bast_fb_info); platform_add_devices(bast_devices, ARRAY_SIZE(bast_devices)); i2c_register_board_info(0, bast_i2c_devs, ARRAY_SIZE(bast_i2c_devs)); usb_simtec_init(); nor_simtec_init(); simtec_audio_add(NULL, true, &bast_audio); s3c_cpufreq_setboard(&bast_cpufreq); }
static void __init rx3715_init_machine(void) { #ifdef CONFIG_PM_H1940 memcpy(phys_to_virt(H1940_SUSPEND_RESUMEAT), h1940_pm_return, 1024); #endif s3c2410_pm_init(); s3c24xx_fb_set_platdata(&rx3715_lcdcfg); /* turn on nand write protect */ s3c2410_gpio_setpin(S3C2410_GPA6, 0); /* configure wakeup source */ s3c2410_gpio_cfgpin(S3C2410_GPF0, S3C2410_GPF0_EINT0); enable_irq_wake(IRQ_EINT0); enable_irq_wake(IRQ_EINT2); enable_irq_wake(IRQ_EINT13); led_trigger_register_shared("rx3000-radio", &rx3000_radio_trig); }
static void __init bast_init(void) { register_syscore_ops(&bast_pm_syscore_ops); s3c_i2c0_set_platdata(&bast_i2c_info); s3c_nand_set_platdata(&bast_nand_info); s3c24xx_fb_set_platdata(&bast_fb_info); platform_add_devices(bast_devices, ARRAY_SIZE(bast_devices)); i2c_register_board_info(0, bast_i2c_devs, ARRAY_SIZE(bast_i2c_devs)); usb_simtec_init(); nor_simtec_init(); simtec_audio_add(NULL, true, &bast_audio); WARN_ON(gpio_request(S3C2410_GPA(21), "bast nreset")); s3c_cpufreq_setboard(&bast_cpufreq); }
static void __init mini2440_machine_init(void) { s3c24xx_fb_set_platdata(&s3c24xx_fb_info); s3c_i2c0_set_platdata(NULL); s3c2410_gpio_cfgpin(S3C2410_GPC(0), S3C2410_GPC0_LEND); printk("S3C2410_GPA=%d\n",S3C2410_GPA(0)); printk("S3C2410_GPB=%d\n",S3C2410_GPB(0)); printk("S3C2410_GPC=%d\n",S3C2410_GPC(0)); printk("S3C2410_GPD=%d\n",S3C2410_GPD(0)); printk("S3C2410_GPE=%d\n",S3C2410_GPE(0)); printk("S3C2410_GPF=%d\n",S3C2410_GPF(0)); printk("S3C2410_GPG=%d\n",S3C2410_GPG(0)); printk("S3C2410_GPH=%d\n",S3C2410_GPH(0)); s3c_device_nand.dev.platform_data = &friendly_arm_nand_info; s3c_device_sdi.dev.platform_data = &mini2440_mmc_cfg; platform_add_devices(mini2440_devices, ARRAY_SIZE(mini2440_devices)); platform_device_register_simple("GPIODEV", 0, &gpiodev_resource, 1); //GPIO resource MAP s3c_pm_init(); }
static void __init h1940_init(void) { u32 tmp; s3c24xx_fb_set_platdata(&h1940_fb_info); s3c24xx_udc_set_platdata(&h1940_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); tmp = ( 0x78 << S3C2410_PLLCON_MDIVSHIFT) | (0x02 << S3C2410_PLLCON_PDIVSHIFT) | (0x03 << S3C2410_PLLCON_SDIVSHIFT); writel(tmp, S3C2410_UPLLCON); platform_add_devices(h1940_devices, ARRAY_SIZE(h1940_devices)); }
static void __init smdk2410_init(void) { s3c24xx_fb_set_platdata(&smdk2410_lcd_cfg); // add by www.100ask.net platform_add_devices(smdk2410_devices, ARRAY_SIZE(smdk2410_devices)); smdk_machine_init(); }
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 rx3715_init_machine(void) { s3c2410_pm_init(); s3c24xx_fb_set_platdata(&rx3715_lcdcfg); }
static void __init h1940_init(void) { s3c24xx_fb_set_platdata(&h1940_lcdcfg); }
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)); }
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)); }