Staging: hv: mousevsc: Cleanup alloc_input_device()
[zen-stable.git] / arch / arm / mach-s3c64xx / mach-smdk6410.c
blobecbea92bf83b60d76d313ed68bb49eca091e262e
1 /* linux/arch/arm/mach-s3c64xx/mach-smdk6410.c
3 * Copyright 2008 Openmoko, Inc.
4 * Copyright 2008 Simtec Electronics
5 * Ben Dooks <ben@simtec.co.uk>
6 * http://armlinux.simtec.co.uk/
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
14 #include <linux/kernel.h>
15 #include <linux/types.h>
16 #include <linux/interrupt.h>
17 #include <linux/list.h>
18 #include <linux/timer.h>
19 #include <linux/init.h>
20 #include <linux/input.h>
21 #include <linux/serial_core.h>
22 #include <linux/platform_device.h>
23 #include <linux/io.h>
24 #include <linux/i2c.h>
25 #include <linux/leds.h>
26 #include <linux/fb.h>
27 #include <linux/gpio.h>
28 #include <linux/delay.h>
29 #include <linux/smsc911x.h>
30 #include <linux/regulator/fixed.h>
31 #include <linux/regulator/machine.h>
32 #include <linux/pwm_backlight.h>
34 #ifdef CONFIG_SMDK6410_WM1190_EV1
35 #include <linux/mfd/wm8350/core.h>
36 #include <linux/mfd/wm8350/pmic.h>
37 #endif
39 #ifdef CONFIG_SMDK6410_WM1192_EV1
40 #include <linux/mfd/wm831x/core.h>
41 #include <linux/mfd/wm831x/pdata.h>
42 #endif
44 #include <video/platform_lcd.h>
46 #include <asm/mach/arch.h>
47 #include <asm/mach/map.h>
48 #include <asm/mach/irq.h>
50 #include <mach/hardware.h>
51 #include <mach/map.h>
53 #include <asm/irq.h>
54 #include <asm/mach-types.h>
56 #include <plat/regs-serial.h>
57 #include <mach/regs-modem.h>
58 #include <mach/regs-gpio.h>
59 #include <mach/regs-sys.h>
60 #include <mach/regs-srom.h>
61 #include <plat/ata.h>
62 #include <plat/iic.h>
63 #include <plat/fb.h>
64 #include <plat/gpio-cfg.h>
66 #include <mach/s3c6410.h>
67 #include <plat/clock.h>
68 #include <plat/devs.h>
69 #include <plat/cpu.h>
70 #include <plat/adc.h>
71 #include <plat/ts.h>
72 #include <plat/keypad.h>
73 #include <plat/backlight.h>
74 #include <plat/regs-fb-v4.h>
76 #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
77 #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
78 #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE
80 static struct s3c2410_uartcfg smdk6410_uartcfgs[] __initdata = {
81 [0] = {
82 .hwport = 0,
83 .flags = 0,
84 .ucon = UCON,
85 .ulcon = ULCON,
86 .ufcon = UFCON,
88 [1] = {
89 .hwport = 1,
90 .flags = 0,
91 .ucon = UCON,
92 .ulcon = ULCON,
93 .ufcon = UFCON,
95 [2] = {
96 .hwport = 2,
97 .flags = 0,
98 .ucon = UCON,
99 .ulcon = ULCON,
100 .ufcon = UFCON,
102 [3] = {
103 .hwport = 3,
104 .flags = 0,
105 .ucon = UCON,
106 .ulcon = ULCON,
107 .ufcon = UFCON,
111 /* framebuffer and LCD setup. */
113 /* GPF15 = LCD backlight control
114 * GPF13 => Panel power
115 * GPN5 = LCD nRESET signal
116 * PWM_TOUT1 => backlight brightness
119 static void smdk6410_lcd_power_set(struct plat_lcd_data *pd,
120 unsigned int power)
122 if (power) {
123 gpio_direction_output(S3C64XX_GPF(13), 1);
125 /* fire nRESET on power up */
126 gpio_direction_output(S3C64XX_GPN(5), 0);
127 msleep(10);
128 gpio_direction_output(S3C64XX_GPN(5), 1);
129 msleep(1);
130 } else {
131 gpio_direction_output(S3C64XX_GPF(13), 0);
135 static struct plat_lcd_data smdk6410_lcd_power_data = {
136 .set_power = smdk6410_lcd_power_set,
139 static struct platform_device smdk6410_lcd_powerdev = {
140 .name = "platform-lcd",
141 .dev.parent = &s3c_device_fb.dev,
142 .dev.platform_data = &smdk6410_lcd_power_data,
145 static struct s3c_fb_pd_win smdk6410_fb_win0 = {
146 /* this is to ensure we use win0 */
147 .win_mode = {
148 .left_margin = 8,
149 .right_margin = 13,
150 .upper_margin = 7,
151 .lower_margin = 5,
152 .hsync_len = 3,
153 .vsync_len = 1,
154 .xres = 800,
155 .yres = 480,
157 .max_bpp = 32,
158 .default_bpp = 16,
159 .virtual_y = 480 * 2,
160 .virtual_x = 800,
163 /* 405566 clocks per frame => 60Hz refresh requires 24333960Hz clock */
164 static struct s3c_fb_platdata smdk6410_lcd_pdata __initdata = {
165 .setup_gpio = s3c64xx_fb_gpio_setup_24bpp,
166 .win[0] = &smdk6410_fb_win0,
167 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
168 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
172 * Configuring Ethernet on SMDK6410
174 * Both CS8900A and LAN9115 chips share one chip select mediated by CFG6.
175 * The constant address below corresponds to nCS1
177 * 1) Set CFGB2 p3 ON others off, no other CFGB selects "ethernet"
178 * 2) CFG6 needs to be switched to "LAN9115" side
181 static struct resource smdk6410_smsc911x_resources[] = {
182 [0] = {
183 .start = S3C64XX_PA_XM0CSN1,
184 .end = S3C64XX_PA_XM0CSN1 + SZ_64K - 1,
185 .flags = IORESOURCE_MEM,
187 [1] = {
188 .start = S3C_EINT(10),
189 .end = S3C_EINT(10),
190 .flags = IORESOURCE_IRQ | IRQ_TYPE_LEVEL_LOW,
194 static struct smsc911x_platform_config smdk6410_smsc911x_pdata = {
195 .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
196 .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
197 .flags = SMSC911X_USE_32BIT | SMSC911X_FORCE_INTERNAL_PHY,
198 .phy_interface = PHY_INTERFACE_MODE_MII,
202 static struct platform_device smdk6410_smsc911x = {
203 .name = "smsc911x",
204 .id = -1,
205 .num_resources = ARRAY_SIZE(smdk6410_smsc911x_resources),
206 .resource = &smdk6410_smsc911x_resources[0],
207 .dev = {
208 .platform_data = &smdk6410_smsc911x_pdata,
212 #ifdef CONFIG_REGULATOR
213 static struct regulator_consumer_supply smdk6410_b_pwr_5v_consumers[] __initdata = {
214 REGULATOR_SUPPLY("PVDD", "0-001b"),
215 REGULATOR_SUPPLY("AVDD", "0-001b"),
218 static struct regulator_init_data smdk6410_b_pwr_5v_data = {
219 .constraints = {
220 .always_on = 1,
222 .num_consumer_supplies = ARRAY_SIZE(smdk6410_b_pwr_5v_consumers),
223 .consumer_supplies = smdk6410_b_pwr_5v_consumers,
226 static struct fixed_voltage_config smdk6410_b_pwr_5v_pdata = {
227 .supply_name = "B_PWR_5V",
228 .microvolts = 5000000,
229 .init_data = &smdk6410_b_pwr_5v_data,
230 .gpio = -EINVAL,
233 static struct platform_device smdk6410_b_pwr_5v = {
234 .name = "reg-fixed-voltage",
235 .id = -1,
236 .dev = {
237 .platform_data = &smdk6410_b_pwr_5v_pdata,
240 #endif
242 static struct s3c_ide_platdata smdk6410_ide_pdata __initdata = {
243 .setup_gpio = s3c64xx_ide_setup_gpio,
246 static uint32_t smdk6410_keymap[] __initdata = {
247 /* KEY(row, col, keycode) */
248 KEY(0, 3, KEY_1), KEY(0, 4, KEY_2), KEY(0, 5, KEY_3),
249 KEY(0, 6, KEY_4), KEY(0, 7, KEY_5),
250 KEY(1, 3, KEY_A), KEY(1, 4, KEY_B), KEY(1, 5, KEY_C),
251 KEY(1, 6, KEY_D), KEY(1, 7, KEY_E)
254 static struct matrix_keymap_data smdk6410_keymap_data __initdata = {
255 .keymap = smdk6410_keymap,
256 .keymap_size = ARRAY_SIZE(smdk6410_keymap),
259 static struct samsung_keypad_platdata smdk6410_keypad_data __initdata = {
260 .keymap_data = &smdk6410_keymap_data,
261 .rows = 2,
262 .cols = 8,
265 static int smdk6410_backlight_init(struct device *dev)
267 int ret;
269 ret = gpio_request(S3C64XX_GPF(15), "Backlight");
270 if (ret) {
271 printk(KERN_ERR "failed to request GPF for PWM-OUT1\n");
272 return ret;
275 /* Configure GPIO pin with S3C64XX_GPF15_PWM_TOUT1 */
276 s3c_gpio_cfgpin(S3C64XX_GPF(15), S3C_GPIO_SFN(2));
278 return 0;
281 static void smdk6410_backlight_exit(struct device *dev)
283 s3c_gpio_cfgpin(S3C64XX_GPF(15), S3C_GPIO_OUTPUT);
284 gpio_free(S3C64XX_GPF(15));
287 static struct platform_pwm_backlight_data smdk6410_backlight_data = {
288 .pwm_id = 1,
289 .max_brightness = 255,
290 .dft_brightness = 255,
291 .pwm_period_ns = 78770,
292 .init = smdk6410_backlight_init,
293 .exit = smdk6410_backlight_exit,
296 static struct platform_device smdk6410_backlight_device = {
297 .name = "pwm-backlight",
298 .dev = {
299 .parent = &s3c_device_timer[1].dev,
300 .platform_data = &smdk6410_backlight_data,
304 static struct map_desc smdk6410_iodesc[] = {};
306 static struct platform_device *smdk6410_devices[] __initdata = {
307 #ifdef CONFIG_SMDK6410_SD_CH0
308 &s3c_device_hsmmc0,
309 #endif
310 #ifdef CONFIG_SMDK6410_SD_CH1
311 &s3c_device_hsmmc1,
312 #endif
313 &s3c_device_i2c0,
314 &s3c_device_i2c1,
315 &s3c_device_fb,
316 &s3c_device_ohci,
317 &s3c_device_usb_hsotg,
318 &samsung_asoc_dma,
319 &s3c64xx_device_iisv4,
320 &samsung_device_keypad,
322 #ifdef CONFIG_REGULATOR
323 &smdk6410_b_pwr_5v,
324 #endif
325 &smdk6410_lcd_powerdev,
327 &smdk6410_smsc911x,
328 &s3c_device_adc,
329 &s3c_device_cfcon,
330 &s3c_device_rtc,
331 &s3c_device_ts,
332 &s3c_device_wdt,
335 #ifdef CONFIG_REGULATOR
336 /* ARM core */
337 static struct regulator_consumer_supply smdk6410_vddarm_consumers[] = {
338 REGULATOR_SUPPLY("vddarm", NULL),
341 /* VDDARM, BUCK1 on J5 */
342 static struct regulator_init_data smdk6410_vddarm = {
343 .constraints = {
344 .name = "PVDD_ARM",
345 .min_uV = 1000000,
346 .max_uV = 1300000,
347 .always_on = 1,
348 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
350 .num_consumer_supplies = ARRAY_SIZE(smdk6410_vddarm_consumers),
351 .consumer_supplies = smdk6410_vddarm_consumers,
354 /* VDD_INT, BUCK2 on J5 */
355 static struct regulator_init_data smdk6410_vddint = {
356 .constraints = {
357 .name = "PVDD_INT",
358 .min_uV = 1000000,
359 .max_uV = 1200000,
360 .always_on = 1,
361 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
365 /* VDD_HI, LDO3 on J5 */
366 static struct regulator_init_data smdk6410_vddhi = {
367 .constraints = {
368 .name = "PVDD_HI",
369 .always_on = 1,
373 /* VDD_PLL, LDO2 on J5 */
374 static struct regulator_init_data smdk6410_vddpll = {
375 .constraints = {
376 .name = "PVDD_PLL",
377 .always_on = 1,
381 /* VDD_UH_MMC, LDO5 on J5 */
382 static struct regulator_init_data smdk6410_vdduh_mmc = {
383 .constraints = {
384 .name = "PVDD_UH+PVDD_MMC",
385 .always_on = 1,
389 /* VCCM3BT, LDO8 on J5 */
390 static struct regulator_init_data smdk6410_vccmc3bt = {
391 .constraints = {
392 .name = "PVCCM3BT",
393 .always_on = 1,
397 /* VCCM2MTV, LDO11 on J5 */
398 static struct regulator_init_data smdk6410_vccm2mtv = {
399 .constraints = {
400 .name = "PVCCM2MTV",
401 .always_on = 1,
405 /* VDD_LCD, LDO12 on J5 */
406 static struct regulator_init_data smdk6410_vddlcd = {
407 .constraints = {
408 .name = "PVDD_LCD",
409 .always_on = 1,
413 /* VDD_OTGI, LDO9 on J5 */
414 static struct regulator_init_data smdk6410_vddotgi = {
415 .constraints = {
416 .name = "PVDD_OTGI",
417 .always_on = 1,
421 /* VDD_OTG, LDO14 on J5 */
422 static struct regulator_init_data smdk6410_vddotg = {
423 .constraints = {
424 .name = "PVDD_OTG",
425 .always_on = 1,
429 /* VDD_ALIVE, LDO15 on J5 */
430 static struct regulator_init_data smdk6410_vddalive = {
431 .constraints = {
432 .name = "PVDD_ALIVE",
433 .always_on = 1,
437 /* VDD_AUDIO, VLDO_AUDIO on J5 */
438 static struct regulator_init_data smdk6410_vddaudio = {
439 .constraints = {
440 .name = "PVDD_AUDIO",
441 .always_on = 1,
444 #endif
446 #ifdef CONFIG_SMDK6410_WM1190_EV1
447 /* S3C64xx internal logic & PLL */
448 static struct regulator_init_data wm8350_dcdc1_data = {
449 .constraints = {
450 .name = "PVDD_INT+PVDD_PLL",
451 .min_uV = 1200000,
452 .max_uV = 1200000,
453 .always_on = 1,
454 .apply_uV = 1,
458 /* Memory */
459 static struct regulator_init_data wm8350_dcdc3_data = {
460 .constraints = {
461 .name = "PVDD_MEM",
462 .min_uV = 1800000,
463 .max_uV = 1800000,
464 .always_on = 1,
465 .state_mem = {
466 .uV = 1800000,
467 .mode = REGULATOR_MODE_NORMAL,
468 .enabled = 1,
470 .initial_state = PM_SUSPEND_MEM,
474 /* USB, EXT, PCM, ADC/DAC, USB, MMC */
475 static struct regulator_consumer_supply wm8350_dcdc4_consumers[] = {
476 REGULATOR_SUPPLY("DVDD", "0-001b"),
479 static struct regulator_init_data wm8350_dcdc4_data = {
480 .constraints = {
481 .name = "PVDD_HI+PVDD_EXT+PVDD_SYS+PVCCM2MTV",
482 .min_uV = 3000000,
483 .max_uV = 3000000,
484 .always_on = 1,
486 .num_consumer_supplies = ARRAY_SIZE(wm8350_dcdc4_consumers),
487 .consumer_supplies = wm8350_dcdc4_consumers,
490 /* OTGi/1190-EV1 HPVDD & AVDD */
491 static struct regulator_init_data wm8350_ldo4_data = {
492 .constraints = {
493 .name = "PVDD_OTGI+HPVDD+AVDD",
494 .min_uV = 1200000,
495 .max_uV = 1200000,
496 .apply_uV = 1,
497 .always_on = 1,
501 static struct {
502 int regulator;
503 struct regulator_init_data *initdata;
504 } wm1190_regulators[] = {
505 { WM8350_DCDC_1, &wm8350_dcdc1_data },
506 { WM8350_DCDC_3, &wm8350_dcdc3_data },
507 { WM8350_DCDC_4, &wm8350_dcdc4_data },
508 { WM8350_DCDC_6, &smdk6410_vddarm },
509 { WM8350_LDO_1, &smdk6410_vddalive },
510 { WM8350_LDO_2, &smdk6410_vddotg },
511 { WM8350_LDO_3, &smdk6410_vddlcd },
512 { WM8350_LDO_4, &wm8350_ldo4_data },
515 static int __init smdk6410_wm8350_init(struct wm8350 *wm8350)
517 int i;
519 /* Configure the IRQ line */
520 s3c_gpio_setpull(S3C64XX_GPN(12), S3C_GPIO_PULL_UP);
522 /* Instantiate the regulators */
523 for (i = 0; i < ARRAY_SIZE(wm1190_regulators); i++)
524 wm8350_register_regulator(wm8350,
525 wm1190_regulators[i].regulator,
526 wm1190_regulators[i].initdata);
528 return 0;
531 static struct wm8350_platform_data __initdata smdk6410_wm8350_pdata = {
532 .init = smdk6410_wm8350_init,
533 .irq_high = 1,
534 .irq_base = IRQ_BOARD_START,
536 #endif
538 #ifdef CONFIG_SMDK6410_WM1192_EV1
539 static struct gpio_led wm1192_pmic_leds[] = {
541 .name = "PMIC:red:power",
542 .gpio = GPIO_BOARD_START + 3,
543 .default_state = LEDS_GPIO_DEFSTATE_ON,
547 static struct gpio_led_platform_data wm1192_pmic_led = {
548 .num_leds = ARRAY_SIZE(wm1192_pmic_leds),
549 .leds = wm1192_pmic_leds,
552 static struct platform_device wm1192_pmic_led_dev = {
553 .name = "leds-gpio",
554 .id = -1,
555 .dev = {
556 .platform_data = &wm1192_pmic_led,
560 static int wm1192_pre_init(struct wm831x *wm831x)
562 int ret;
564 /* Configure the IRQ line */
565 s3c_gpio_setpull(S3C64XX_GPN(12), S3C_GPIO_PULL_UP);
567 ret = platform_device_register(&wm1192_pmic_led_dev);
568 if (ret != 0)
569 dev_err(wm831x->dev, "Failed to add PMIC LED: %d\n", ret);
571 return 0;
574 static struct wm831x_backlight_pdata wm1192_backlight_pdata = {
575 .isink = 1,
576 .max_uA = 27554,
579 static struct regulator_init_data wm1192_dcdc3 = {
580 .constraints = {
581 .name = "PVDD_MEM+PVDD_GPS",
582 .always_on = 1,
586 static struct regulator_consumer_supply wm1192_ldo1_consumers[] = {
587 REGULATOR_SUPPLY("DVDD", "0-001b"), /* WM8580 */
590 static struct regulator_init_data wm1192_ldo1 = {
591 .constraints = {
592 .name = "PVDD_LCD+PVDD_EXT",
593 .always_on = 1,
595 .consumer_supplies = wm1192_ldo1_consumers,
596 .num_consumer_supplies = ARRAY_SIZE(wm1192_ldo1_consumers),
599 static struct wm831x_status_pdata wm1192_led7_pdata = {
600 .name = "LED7:green:",
603 static struct wm831x_status_pdata wm1192_led8_pdata = {
604 .name = "LED8:green:",
607 static struct wm831x_pdata smdk6410_wm1192_pdata = {
608 .pre_init = wm1192_pre_init,
609 .irq_base = IRQ_BOARD_START,
611 .backlight = &wm1192_backlight_pdata,
612 .dcdc = {
613 &smdk6410_vddarm, /* DCDC1 */
614 &smdk6410_vddint, /* DCDC2 */
615 &wm1192_dcdc3,
617 .gpio_base = GPIO_BOARD_START,
618 .ldo = {
619 &wm1192_ldo1, /* LDO1 */
620 &smdk6410_vdduh_mmc, /* LDO2 */
621 NULL, /* LDO3 NC */
622 &smdk6410_vddotgi, /* LDO4 */
623 &smdk6410_vddotg, /* LDO5 */
624 &smdk6410_vddhi, /* LDO6 */
625 &smdk6410_vddaudio, /* LDO7 */
626 &smdk6410_vccm2mtv, /* LDO8 */
627 &smdk6410_vddpll, /* LDO9 */
628 &smdk6410_vccmc3bt, /* LDO10 */
629 &smdk6410_vddalive, /* LDO11 */
631 .status = {
632 &wm1192_led7_pdata,
633 &wm1192_led8_pdata,
636 #endif
638 static struct i2c_board_info i2c_devs0[] __initdata = {
639 { I2C_BOARD_INFO("24c08", 0x50), },
640 { I2C_BOARD_INFO("wm8580", 0x1b), },
642 #ifdef CONFIG_SMDK6410_WM1192_EV1
643 { I2C_BOARD_INFO("wm8312", 0x34),
644 .platform_data = &smdk6410_wm1192_pdata,
645 .irq = S3C_EINT(12),
647 #endif
649 #ifdef CONFIG_SMDK6410_WM1190_EV1
650 { I2C_BOARD_INFO("wm8350", 0x1a),
651 .platform_data = &smdk6410_wm8350_pdata,
652 .irq = S3C_EINT(12),
654 #endif
657 static struct i2c_board_info i2c_devs1[] __initdata = {
658 { I2C_BOARD_INFO("24c128", 0x57), }, /* Samsung S524AD0XD1 */
661 static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
662 .delay = 10000,
663 .presc = 49,
664 .oversampling_shift = 2,
667 /* LCD Backlight data */
668 static struct samsung_bl_gpio_info smdk6410_bl_gpio_info = {
669 .no = S3C64XX_GPF(15),
670 .func = S3C_GPIO_SFN(2),
673 static struct platform_pwm_backlight_data smdk6410_bl_data = {
674 .pwm_id = 1,
677 static void __init smdk6410_map_io(void)
679 u32 tmp;
681 s3c64xx_init_io(smdk6410_iodesc, ARRAY_SIZE(smdk6410_iodesc));
682 s3c24xx_init_clocks(12000000);
683 s3c24xx_init_uarts(smdk6410_uartcfgs, ARRAY_SIZE(smdk6410_uartcfgs));
685 /* set the LCD type */
687 tmp = __raw_readl(S3C64XX_SPCON);
688 tmp &= ~S3C64XX_SPCON_LCD_SEL_MASK;
689 tmp |= S3C64XX_SPCON_LCD_SEL_RGB;
690 __raw_writel(tmp, S3C64XX_SPCON);
692 /* remove the lcd bypass */
693 tmp = __raw_readl(S3C64XX_MODEM_MIFPCON);
694 tmp &= ~MIFPCON_LCD_BYPASS;
695 __raw_writel(tmp, S3C64XX_MODEM_MIFPCON);
698 static void __init smdk6410_machine_init(void)
700 u32 cs1;
702 s3c_i2c0_set_platdata(NULL);
703 s3c_i2c1_set_platdata(NULL);
704 s3c_fb_set_platdata(&smdk6410_lcd_pdata);
706 samsung_keypad_set_platdata(&smdk6410_keypad_data);
708 s3c24xx_ts_set_platdata(&s3c_ts_platform);
710 /* configure nCS1 width to 16 bits */
712 cs1 = __raw_readl(S3C64XX_SROM_BW) &
713 ~(S3C64XX_SROM_BW__CS_MASK << S3C64XX_SROM_BW__NCS1__SHIFT);
714 cs1 |= ((1 << S3C64XX_SROM_BW__DATAWIDTH__SHIFT) |
715 (1 << S3C64XX_SROM_BW__WAITENABLE__SHIFT) |
716 (1 << S3C64XX_SROM_BW__BYTEENABLE__SHIFT)) <<
717 S3C64XX_SROM_BW__NCS1__SHIFT;
718 __raw_writel(cs1, S3C64XX_SROM_BW);
720 /* set timing for nCS1 suitable for ethernet chip */
722 __raw_writel((0 << S3C64XX_SROM_BCX__PMC__SHIFT) |
723 (6 << S3C64XX_SROM_BCX__TACP__SHIFT) |
724 (4 << S3C64XX_SROM_BCX__TCAH__SHIFT) |
725 (1 << S3C64XX_SROM_BCX__TCOH__SHIFT) |
726 (0xe << S3C64XX_SROM_BCX__TACC__SHIFT) |
727 (4 << S3C64XX_SROM_BCX__TCOS__SHIFT) |
728 (0 << S3C64XX_SROM_BCX__TACS__SHIFT), S3C64XX_SROM_BC1);
730 gpio_request(S3C64XX_GPN(5), "LCD power");
731 gpio_request(S3C64XX_GPF(13), "LCD power");
733 i2c_register_board_info(0, i2c_devs0, ARRAY_SIZE(i2c_devs0));
734 i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));
736 s3c_ide_set_platdata(&smdk6410_ide_pdata);
738 samsung_bl_set(&smdk6410_bl_gpio_info, &smdk6410_bl_data);
740 platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices));
743 MACHINE_START(SMDK6410, "SMDK6410")
744 /* Maintainer: Ben Dooks <ben-linux@fluff.org> */
745 .boot_params = S3C64XX_PA_SDRAM + 0x100,
747 .init_irq = s3c6410_init_irq,
748 .map_io = smdk6410_map_io,
749 .init_machine = smdk6410_machine_init,
750 .timer = &s3c24xx_timer,
751 MACHINE_END