Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux...
authorRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 28 Oct 2010 11:27:34 +0000 (12:27 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 28 Oct 2010 11:27:34 +0000 (12:27 +0100)
Conflicts:
arch/arm/mach-s3c64xx/dev-audio.c

1  2 
arch/arm/Kconfig
arch/arm/mach-s3c64xx/dev-audio.c
arch/arm/mach-s3c64xx/mach-real6410.c
arch/arm/mach-s5pc100/mach-smdkc100.c
arch/arm/mach-s5pv210/mach-aquila.c
arch/arm/mach-s5pv210/mach-goni.c
arch/arm/mach-s5pv210/mach-smdkc110.c
arch/arm/mach-s5pv210/mach-smdkv210.c
arch/arm/mach-s5pv310/mach-smdkv310.c
arch/arm/mach-s5pv310/mach-universal_c210.c
arch/arm/plat-samsung/include/plat/devs.h

diff --combined arch/arm/Kconfig
@@@ -19,17 -19,13 +19,17 @@@ config AR
        select HAVE_KPROBES if (!XIP_KERNEL)
        select HAVE_KRETPROBES if (HAVE_KPROBES)
        select HAVE_FUNCTION_TRACER if (!XIP_KERNEL)
 +      select HAVE_FTRACE_MCOUNT_RECORD if (!XIP_KERNEL)
 +      select HAVE_DYNAMIC_FTRACE if (!XIP_KERNEL)
        select HAVE_GENERIC_DMA_COHERENT
        select HAVE_KERNEL_GZIP
        select HAVE_KERNEL_LZO
        select HAVE_KERNEL_LZMA
 +      select HAVE_IRQ_WORK
        select HAVE_PERF_EVENTS
        select PERF_USE_VMALLOC
        select HAVE_REGS_AND_STACK_ACCESS_API
 +      select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V7))
        help
          The ARM series is a line of low-power-consumption RISC chip designs
          licensed by ARM Ltd and targeted at embedded applications and
@@@ -149,9 -145,6 +149,9 @@@ config ARCH_HAS_CPUFRE
          and that the relevant menu configurations are displayed for
          it.
  
 +config ARCH_HAS_CPU_IDLE_WAIT
 +       def_bool y
 +
  config GENERIC_HWEIGHT
        bool
        default y
@@@ -517,7 -510,6 +517,7 @@@ config ARCH_MM
        select GENERIC_CLOCKEVENTS
        select TICK_ONESHOT
        select PLAT_PXA
 +      select SPARSE_IRQ
        help
          Support for Marvell's PXA168/PXA910(MMP) and MMP2 processor line.
  
@@@ -573,7 -565,6 +573,7 @@@ config ARCH_TEGR
        select HAVE_CLK
        select COMMON_CLKDEV
        select ARCH_HAS_BARRIERS if CACHE_L2X0
 +      select ARCH_HAS_CPUFREQ
        help
          This enables support for NVIDIA Tegra based systems (Tegra APX,
          Tegra 6xx and Tegra 2 series).
@@@ -596,7 -587,6 +596,7 @@@ config ARCH_PX
        select GENERIC_CLOCKEVENTS
        select TICK_ONESHOT
        select PLAT_PXA
 +      select SPARSE_IRQ
        help
          Support for Intel/Marvell's PXA2xx/PXA3xx processor line.
  
@@@ -727,9 -717,11 +727,11 @@@ config ARCH_S5PC10
  config ARCH_S5PV210
        bool "Samsung S5PV210/S5PC110"
        select CPU_V7
+       select ARCH_SPARSEMEM_ENABLE
        select GENERIC_GPIO
        select HAVE_CLK
        select ARM_L1_CACHE_SHIFT_6
+       select ARCH_HAS_CPUFREQ
        select ARCH_USES_GETTIMEOFFSET
        select HAVE_S3C2410_I2C
        select HAVE_S3C_RTC
  config ARCH_S5PV310
        bool "Samsung S5PV310/S5PC210"
        select CPU_V7
+       select ARCH_SPARSEMEM_ENABLE
        select GENERIC_GPIO
        select HAVE_CLK
        select GENERIC_CLOCKEVENTS
+       select HAVE_S3C_RTC
+       select HAVE_S3C2410_I2C
+       select HAVE_S3C2410_WATCHDOG
        help
          Samsung S5PV310 series based systems
  
@@@ -758,15 -754,6 +764,15 @@@ config ARCH_SHAR
          Support for the StrongARM based Digital DNARD machine, also known
          as "Shark" (<http://www.shark-linux.de/shark.html>).
  
 +config ARCH_TCC_926
 +      bool "Telechips TCC ARM926-based systems"
 +      select CPU_ARM926T
 +      select HAVE_CLK
 +      select COMMON_CLKDEV
 +      select GENERIC_CLOCKEVENTS
 +      help
 +        Support for Telechips TCC ARM926-based systems.
 +
  config ARCH_LH7A40X
        bool "Sharp LH7A40X"
        select CPU_ARM922T
@@@ -832,7 -819,7 +838,7 @@@ config ARCH_OMA
        select GENERIC_CLOCKEVENTS
        select ARCH_HAS_HOLES_MEMORYMODEL
        help
 -        Support for TI's OMAP platform (OMAP1 and OMAP2).
 +        Support for TI's OMAP platform (OMAP1/2/3/4).
  
  config PLAT_SPEAR
        bool "ST SPEAr"
@@@ -935,8 -922,6 +941,8 @@@ source "arch/arm/plat-s5p/Kconfig
  
  source "arch/arm/plat-spear/Kconfig"
  
 +source "arch/arm/plat-tcc/Kconfig"
 +
  if ARCH_S3C2410
  source "arch/arm/mach-s3c2400/Kconfig"
  source "arch/arm/mach-s3c2410/Kconfig"
@@@ -1024,7 -1009,7 +1030,7 @@@ endi
  
  config ARM_ERRATA_411920
        bool "ARM errata: Invalidation of the Instruction Cache operation can fail"
 -      depends on CPU_V6 && !SMP
 +      depends on CPU_V6
        help
          Invalidation of the Instruction Cache operation can
          fail. This erratum is present in 1136 (before r1p4), 1156 and 1176.
@@@ -1203,13 -1188,13 +1209,13 @@@ source "kernel/time/Kconfig
  
  config SMP
        bool "Symmetric Multi-Processing (EXPERIMENTAL)"
 -      depends on EXPERIMENTAL && (REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP ||\
 -               MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 ||\
 -               ARCH_S5PV310 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4)
 +      depends on EXPERIMENTAL
        depends on GENERIC_CLOCKEVENTS
 +      depends on REALVIEW_EB_ARM11MP || REALVIEW_EB_A9MP || \
 +               MACH_REALVIEW_PB11MP || MACH_REALVIEW_PBX || ARCH_OMAP4 ||\
 +               ARCH_S5PV310 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4
        select USE_GENERIC_SMP_HELPERS
 -      select HAVE_ARM_SCU if ARCH_REALVIEW || ARCH_OMAP4 || ARCH_S5PV310 ||\
 -               ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4
 +      select HAVE_ARM_SCU
        help
          This enables support for systems with more than one CPU. If you have
          a system with only one CPU, like most personal computers, say N. If
  
          See also <file:Documentation/i386/IO-APIC.txt>,
          <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
 -        <http://www.linuxdoc.org/docs.html#howto>.
 +        <http://tldp.org/HOWTO/SMP-HOWTO.html>.
  
          If you don't know what to do here, say N.
  
 +config SMP_ON_UP
 +      bool "Allow booting SMP kernel on uniprocessor systems (EXPERIMENTAL)"
 +      depends on EXPERIMENTAL
 +      depends on SMP && !XIP && !THUMB2_KERNEL
 +      default y
 +      help
 +        SMP kernels contain instructions which fail on non-SMP processors.
 +        Enabling this option allows the kernel to modify itself to make
 +        these instructions safe.  Disabling it allows about 1K of space
 +        savings.
 +
 +        If you don't know what to do here, say Y.
 +
  config HAVE_ARM_SCU
        bool
        depends on SMP
@@@ -1290,9 -1262,12 +1296,9 @@@ config HOTPLUG_CP
  
  config LOCAL_TIMERS
        bool "Use local timer interrupts"
 -      depends on SMP && (REALVIEW_EB_ARM11MP || MACH_REALVIEW_PB11MP || \
 -              REALVIEW_EB_A9MP || MACH_REALVIEW_PBX || ARCH_OMAP4 || \
 -              ARCH_S5PV310 || ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS_CA9X4)
 +      depends on SMP
        default y
 -      select HAVE_ARM_TWD if ARCH_REALVIEW || ARCH_OMAP4 || ARCH_S5PV310 || \
 -              ARCH_TEGRA || ARCH_U8500 || ARCH_VEXPRESS
 +      select HAVE_ARM_TWD
        help
          Enable support for local timers on SMP platforms, rather then the
          legacy IPI broadcast method.  Local timers allows the system
@@@ -1509,20 -1484,6 +1515,20 @@@ config UACCESS_WITH_MEMCP
          However, if the CPU data cache is using a write-allocate mode,
          this option is unlikely to provide any performance gain.
  
 +config SECCOMP
 +      bool
 +      prompt "Enable seccomp to safely compute untrusted bytecode"
 +      ---help---
 +        This kernel feature is useful for number crunching applications
 +        that may need to compute untrusted bytecode during their
 +        execution. By using pipes or other transports made available to
 +        the process as file descriptors supporting the read/write
 +        syscalls, it's possible to isolate those applications in
 +        their own address space using seccomp. Once seccomp is
 +        enabled via prctl(PR_SET_SECCOMP), it cannot be disabled
 +        and the task is only allowed to execute a few safe syscalls
 +        defined by each seccomp mode.
 +
  config CC_STACKPROTECTOR
        bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)"
        help
@@@ -1669,12 -1630,6 +1675,12 @@@ if ARCH_HAS_CPUFRE
  
  source "drivers/cpufreq/Kconfig"
  
 +config CPU_FREQ_IMX
 +      tristate "CPUfreq driver for i.MX CPUs"
 +      depends on ARCH_MXC && CPU_FREQ
 +      help
 +        This enables the CPUfreq driver for i.MX CPUs.
 +
  config CPU_FREQ_SA1100
        bool
  
  #include <plat/audio.h>
  #include <plat/gpio-cfg.h>
  
- #include <mach/gpio-bank-c.h>
- #include <mach/gpio-bank-d.h>
- #include <mach/gpio-bank-e.h>
- #include <mach/gpio-bank-h.h>
  static int s3c64xx_i2sv3_cfg_gpio(struct platform_device *pdev)
  {
+       unsigned int base;
        switch (pdev->id) {
        case 0:
-               s3c_gpio_cfgpin(S3C64XX_GPD(0), S3C64XX_GPD0_I2S0_CLK);
-               s3c_gpio_cfgpin(S3C64XX_GPD(1), S3C64XX_GPD1_I2S0_CDCLK);
-               s3c_gpio_cfgpin(S3C64XX_GPD(2), S3C64XX_GPD2_I2S0_LRCLK);
-               s3c_gpio_cfgpin(S3C64XX_GPD(3), S3C64XX_GPD3_I2S0_DI);
-               s3c_gpio_cfgpin(S3C64XX_GPD(4), S3C64XX_GPD4_I2S0_D0);
+               base = S3C64XX_GPD(0);
                break;
        case 1:
-               s3c_gpio_cfgpin(S3C64XX_GPE(0), S3C64XX_GPE0_I2S1_CLK);
-               s3c_gpio_cfgpin(S3C64XX_GPE(1), S3C64XX_GPE1_I2S1_CDCLK);
-               s3c_gpio_cfgpin(S3C64XX_GPE(2), S3C64XX_GPE2_I2S1_LRCLK);
-               s3c_gpio_cfgpin(S3C64XX_GPE(3), S3C64XX_GPE3_I2S1_DI);
-               s3c_gpio_cfgpin(S3C64XX_GPE(4), S3C64XX_GPE4_I2S1_D0);
+               base = S3C64XX_GPE(0);
                break;
        default:
 -              printk(KERN_DEBUG "Invalid I2S Controller number!");
 +              printk(KERN_DEBUG "Invalid I2S Controller number: %d\n",
 +                      pdev->id);
                return -EINVAL;
        }
  
+       s3c_gpio_cfgpin_range(base, 5, S3C_GPIO_SFN(3));
        return 0;
  }
  
  static int s3c64xx_i2sv4_cfg_gpio(struct platform_device *pdev)
  {
-       s3c_gpio_cfgpin(S3C64XX_GPC(4), S3C64XX_GPC4_I2S_V40_DO0);
-       s3c_gpio_cfgpin(S3C64XX_GPC(5), S3C64XX_GPC5_I2S_V40_DO1);
-       s3c_gpio_cfgpin(S3C64XX_GPC(7), S3C64XX_GPC7_I2S_V40_DO2);
-       s3c_gpio_cfgpin(S3C64XX_GPH(6), S3C64XX_GPH6_I2S_V40_BCLK);
-       s3c_gpio_cfgpin(S3C64XX_GPH(7), S3C64XX_GPH7_I2S_V40_CDCLK);
-       s3c_gpio_cfgpin(S3C64XX_GPH(8), S3C64XX_GPH8_I2S_V40_LRCLK);
-       s3c_gpio_cfgpin(S3C64XX_GPH(9), S3C64XX_GPH9_I2S_V40_DI);
+       s3c_gpio_cfgpin(S3C64XX_GPC(4), S3C_GPIO_SFN(5));
+       s3c_gpio_cfgpin(S3C64XX_GPC(5), S3C_GPIO_SFN(5));
+       s3c_gpio_cfgpin(S3C64XX_GPC(7), S3C_GPIO_SFN(5));
+       s3c_gpio_cfgpin_range(S3C64XX_GPH(6), 4, S3C_GPIO_SFN(5));
  
        return 0;
  }
@@@ -170,27 -157,21 +158,22 @@@ EXPORT_SYMBOL(s3c64xx_device_iisv4)
  
  static int s3c64xx_pcm_cfg_gpio(struct platform_device *pdev)
  {
+       unsigned int base;
        switch (pdev->id) {
        case 0:
-               s3c_gpio_cfgpin(S3C64XX_GPD(0), S3C64XX_GPD0_PCM0_SCLK);
-               s3c_gpio_cfgpin(S3C64XX_GPD(1), S3C64XX_GPD1_PCM0_EXTCLK);
-               s3c_gpio_cfgpin(S3C64XX_GPD(2), S3C64XX_GPD2_PCM0_FSYNC);
-               s3c_gpio_cfgpin(S3C64XX_GPD(3), S3C64XX_GPD3_PCM0_SIN);
-               s3c_gpio_cfgpin(S3C64XX_GPD(4), S3C64XX_GPD4_PCM0_SOUT);
+               base = S3C64XX_GPD(0);
                break;
        case 1:
-               s3c_gpio_cfgpin(S3C64XX_GPE(0), S3C64XX_GPE0_PCM1_SCLK);
-               s3c_gpio_cfgpin(S3C64XX_GPE(1), S3C64XX_GPE1_PCM1_EXTCLK);
-               s3c_gpio_cfgpin(S3C64XX_GPE(2), S3C64XX_GPE2_PCM1_FSYNC);
-               s3c_gpio_cfgpin(S3C64XX_GPE(3), S3C64XX_GPE3_PCM1_SIN);
-               s3c_gpio_cfgpin(S3C64XX_GPE(4), S3C64XX_GPE4_PCM1_SOUT);
+               base = S3C64XX_GPE(0);
                break;
        default:
 -              printk(KERN_DEBUG "Invalid PCM Controller number!");
 +              printk(KERN_DEBUG "Invalid PCM Controller number: %d\n",
 +                      pdev->id);
                return -EINVAL;
        }
  
+       s3c_gpio_cfgpin_range(base, 5, S3C_GPIO_SFN(2));
        return 0;
  }
  
@@@ -264,24 -245,12 +247,12 @@@ EXPORT_SYMBOL(s3c64xx_device_pcm1)
  
  static int s3c64xx_ac97_cfg_gpd(struct platform_device *pdev)
  {
-       s3c_gpio_cfgpin(S3C64XX_GPD(0), S3C64XX_GPD0_AC97_BITCLK);
-       s3c_gpio_cfgpin(S3C64XX_GPD(1), S3C64XX_GPD1_AC97_nRESET);
-       s3c_gpio_cfgpin(S3C64XX_GPD(2), S3C64XX_GPD2_AC97_SYNC);
-       s3c_gpio_cfgpin(S3C64XX_GPD(3), S3C64XX_GPD3_AC97_SDI);
-       s3c_gpio_cfgpin(S3C64XX_GPD(4), S3C64XX_GPD4_AC97_SDO);
-       return 0;
+       return s3c_gpio_cfgpin_range(S3C64XX_GPD(0), 5, S3C_GPIO_SFN(4));
  }
  
  static int s3c64xx_ac97_cfg_gpe(struct platform_device *pdev)
  {
-       s3c_gpio_cfgpin(S3C64XX_GPE(0), S3C64XX_GPE0_AC97_BITCLK);
-       s3c_gpio_cfgpin(S3C64XX_GPE(1), S3C64XX_GPE1_AC97_nRESET);
-       s3c_gpio_cfgpin(S3C64XX_GPE(2), S3C64XX_GPE2_AC97_SYNC);
-       s3c_gpio_cfgpin(S3C64XX_GPE(3), S3C64XX_GPE3_AC97_SDI);
-       s3c_gpio_cfgpin(S3C64XX_GPE(4), S3C64XX_GPE4_AC97_SDO);
-       return 0;
+       return s3c_gpio_cfgpin_range(S3C64XX_GPE(0), 5, S3C_GPIO_SFN(4));
  }
  
  static struct resource s3c64xx_ac97_resource[] = {
@@@ -336,16 -305,3 +307,16 @@@ void __init s3c64xx_ac97_setup_gpio(in
        else
                s3c_ac97_pdata.cfg_gpio = s3c64xx_ac97_cfg_gpe;
  }
 +
 +static u64 s3c_device_audio_dmamask = 0xffffffffUL;
 +
 +struct platform_device s3c_device_pcm = {
 +      .name             = "s3c24xx-pcm-audio",
 +      .id               = -1,
 +      .dev              = {
 +              .dma_mask = &s3c_device_audio_dmamask,
 +              .coherent_dma_mask = 0xffffffffUL
 +      }
 +};
 +EXPORT_SYMBOL(s3c_device_pcm);
 +
   *
  */
  
- #include <linux/kernel.h>
- #include <linux/types.h>
+ #include <linux/init.h>
  #include <linux/interrupt.h>
+ #include <linux/fb.h>
+ #include <linux/gpio.h>
+ #include <linux/kernel.h>
  #include <linux/list.h>
- #include <linux/init.h>
  #include <linux/dm9000.h>
- #include <linux/serial_core.h>
+ #include <linux/mtd/mtd.h>
+ #include <linux/mtd/partitions.h>
  #include <linux/platform_device.h>
+ #include <linux/serial_core.h>
+ #include <linux/types.h>
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
  #include <asm/mach/map.h>
  #include <mach/map.h>
- #include <mach/s3c6410.h>
+ #include <mach/regs-fb.h>
+ #include <mach/regs-gpio.h>
+ #include <mach/regs-modem.h>
  #include <mach/regs-srom.h>
+ #include <mach/s3c6410.h>
+ #include <plat/adc.h>
  #include <plat/cpu.h>
  #include <plat/devs.h>
+ #include <plat/fb.h>
+ #include <plat/nand.h>
  #include <plat/regs-serial.h>
+ #include <plat/ts.h>
+ #include <video/platform_lcd.h>
  
  #define UCON (S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK)
  #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB)
@@@ -99,22 -115,192 +115,192 @@@ static struct platform_device real6410_
        },
  };
  
+ static struct s3c_fb_pd_win real6410_fb_win[] = {
+       {
+               .win_mode       = {     /* 4.3" 480x272 */
+                       .left_margin    = 3,
+                       .right_margin   = 2,
+                       .upper_margin   = 1,
+                       .lower_margin   = 1,
+                       .hsync_len      = 40,
+                       .vsync_len      = 1,
+                       .xres           = 480,
+                       .yres           = 272,
+               },
+               .max_bpp        = 32,
+               .default_bpp    = 16,
+       }, {
+               .win_mode       = {     /* 7.0" 800x480 */
+                       .left_margin    = 8,
+                       .right_margin   = 13,
+                       .upper_margin   = 7,
+                       .lower_margin   = 5,
+                       .hsync_len      = 3,
+                       .vsync_len      = 1,
+                       .xres           = 800,
+                       .yres           = 480,
+               },
+               .max_bpp        = 32,
+               .default_bpp    = 16,
+       },
+ };
+ static struct s3c_fb_platdata real6410_lcd_pdata __initdata = {
+       .setup_gpio     = s3c64xx_fb_gpio_setup_24bpp,
+       .win[0]         = &real6410_fb_win[0],
+       .vidcon0        = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
+       .vidcon1        = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
+ };
+ static struct mtd_partition real6410_nand_part[] = {
+       [0] = {
+               .name   = "uboot",
+               .size   = SZ_1M,
+               .offset = 0,
+       },
+       [1] = {
+               .name   = "kernel",
+               .size   = SZ_2M,
+               .offset = SZ_1M,
+       },
+       [2] = {
+               .name   = "rootfs",
+               .size   = MTDPART_SIZ_FULL,
+               .offset = SZ_1M + SZ_2M,
+       },
+ };
+ static struct s3c2410_nand_set real6410_nand_sets[] = {
+       [0] = {
+               .name           = "nand",
+               .nr_chips       = 1,
+               .nr_partitions  = ARRAY_SIZE(real6410_nand_part),
+               .partitions     = real6410_nand_part,
+       },
+ };
+ static struct s3c2410_platform_nand real6410_nand_info = {
+       .tacls          = 25,
+       .twrph0         = 55,
+       .twrph1         = 40,
+       .nr_sets        = ARRAY_SIZE(real6410_nand_sets),
+       .sets           = real6410_nand_sets,
+ };
  static struct platform_device *real6410_devices[] __initdata = {
        &real6410_device_eth,
        &s3c_device_hsmmc0,
        &s3c_device_hsmmc1,
+       &s3c_device_fb,
+       &s3c_device_nand,
+       &s3c_device_adc,
+       &s3c_device_ts,
+       &s3c_device_ohci,
+ };
+ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
+       .delay                  = 10000,
+       .presc                  = 49,
+       .oversampling_shift     = 2,
  };
  
  static void __init real6410_map_io(void)
  {
+       u32 tmp;
        s3c64xx_init_io(NULL, 0);
        s3c24xx_init_clocks(12000000);
        s3c24xx_init_uarts(real6410_uartcfgs, ARRAY_SIZE(real6410_uartcfgs));
+       /* set the LCD type */
+       tmp = __raw_readl(S3C64XX_SPCON);
+       tmp &= ~S3C64XX_SPCON_LCD_SEL_MASK;
+       tmp |= S3C64XX_SPCON_LCD_SEL_RGB;
+       __raw_writel(tmp, S3C64XX_SPCON);
+       /* remove the LCD bypass */
+       tmp = __raw_readl(S3C64XX_MODEM_MIFPCON);
+       tmp &= ~MIFPCON_LCD_BYPASS;
+       __raw_writel(tmp, S3C64XX_MODEM_MIFPCON);
+ }
+ /*
+  * real6410_features string
+  *
+  * 0-9 LCD configuration
+  *
+  */
+ static char real6410_features_str[12] __initdata = "0";
+ static int __init real6410_features_setup(char *str)
+ {
+       if (str)
+               strlcpy(real6410_features_str, str,
+                       sizeof(real6410_features_str));
+       return 1;
+ }
+ __setup("real6410=", real6410_features_setup);
+ #define FEATURE_SCREEN (1 << 0)
+ struct real6410_features_t {
+       int done;
+       int lcd_index;
+ };
+ static void real6410_parse_features(
+               struct real6410_features_t *features,
+               const char *features_str)
+ {
+       const char *fp = features_str;
+       features->done = 0;
+       features->lcd_index = 0;
+       while (*fp) {
+               char f = *fp++;
+               switch (f) {
+               case '0'...'9': /* tft screen */
+                       if (features->done & FEATURE_SCREEN) {
+                               printk(KERN_INFO "REAL6410: '%c' ignored, "
+                                       "screen type already set\n", f);
+                       } else {
+                               int li = f - '0';
+                               if (li >= ARRAY_SIZE(real6410_fb_win))
+                                       printk(KERN_INFO "REAL6410: '%c' out "
+                                               "of range LCD mode\n", f);
+                               else {
+                                       features->lcd_index = li;
+                               }
+                       }
+                       features->done |= FEATURE_SCREEN;
+                       break;
+               }
+       }
  }
  
  static void __init real6410_machine_init(void)
  {
        u32 cs1;
+       struct real6410_features_t features = { 0 };
+       printk(KERN_INFO "REAL6410: Option string real6410=%s\n",
+                       real6410_features_str);
+       /* Parse the feature string */
+       real6410_parse_features(&features, real6410_features_str);
+       real6410_lcd_pdata.win[0] = &real6410_fb_win[features.lcd_index];
+       printk(KERN_INFO "REAL6410: selected LCD display is %dx%d\n",
+               real6410_lcd_pdata.win[0]->win_mode.xres,
+               real6410_lcd_pdata.win[0]->win_mode.yres);
+       s3c_fb_set_platdata(&real6410_lcd_pdata);
+       s3c_nand_set_platdata(&real6410_nand_info);
+       s3c24xx_ts_set_platdata(&s3c_ts_platform);
  
        /* configure nCS1 width to 16 bits */
  
                (4 << S3C64XX_SROM_BCX__TCOS__SHIFT) |
                (0 << S3C64XX_SROM_BCX__TACS__SHIFT), S3C64XX_SROM_BC1);
  
+       gpio_request(S3C64XX_GPF(15), "LCD power");
        platform_add_devices(real6410_devices, ARRAY_SIZE(real6410_devices));
  }
  
  MACHINE_START(REAL6410, "REAL6410")
        /* Maintainer: Darius Augulis <augulis.darius@gmail.com> */
 -      .phys_io        = S3C_PA_UART & 0xfff00000,
 -      .io_pg_offst    = (((u32)S3C_VA_UART) >> 18) & 0xfffc,
        .boot_params    = S3C64XX_PA_SDRAM + 0x100,
  
        .init_irq       = s3c6410_init_irq,
@@@ -47,6 -47,7 +47,7 @@@
  #include <plat/adc.h>
  #include <plat/keypad.h>
  #include <plat/ts.h>
+ #include <plat/audio.h>
  
  /* Following are default values for UCON, ULCON and UFCON UART registers */
  #define SMDKC100_UCON_DEFAULT (S3C2410_UCON_TXILEVEL |        \
@@@ -196,6 -197,7 +197,7 @@@ static struct platform_device *smdkc100
        &s5p_device_fimc0,
        &s5p_device_fimc1,
        &s5p_device_fimc2,
+       &s5pc100_device_spdif,
  };
  
  static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
@@@ -226,6 -228,8 +228,8 @@@ static void __init smdkc100_machine_ini
  
        samsung_keypad_set_platdata(&smdkc100_keypad_data);
  
+       s5pc100_spdif_setup_gpio(S5PC100_SPDIF_GPD);
        /* LCD init */
        gpio_request(S5PC100_GPD(0), "GPD");
        gpio_request(S5PC100_GPH0(6), "GPH0");
  
  MACHINE_START(SMDKC100, "SMDKC100")
        /* Maintainer: Byungho Min <bhmin@samsung.com> */
 -      .phys_io        = S3C_PA_UART & 0xfff00000,
 -      .io_pg_offst    = (((u32)S3C_VA_UART) >> 18) & 0xfffc,
        .boot_params    = S5P_PA_SDRAM + 0x100,
        .init_irq       = s5pc100_init_irq,
        .map_io         = smdkc100_map_io,
@@@ -16,6 -16,8 +16,8 @@@
  #include <linux/i2c.h>
  #include <linux/i2c-gpio.h>
  #include <linux/mfd/max8998.h>
+ #include <linux/mfd/wm8994/pdata.h>
+ #include <linux/regulator/fixed.h>
  #include <linux/gpio_keys.h>
  #include <linux/input.h>
  #include <linux/gpio.h>
@@@ -379,6 -381,119 +381,119 @@@ static struct max8998_platform_data aqu
  };
  #endif
  
+ static struct regulator_consumer_supply wm8994_fixed_voltage0_supplies[] = {
+       {
+               .dev_name       = "5-001a",
+               .supply         = "DBVDD",
+       }, {
+               .dev_name       = "5-001a",
+               .supply         = "AVDD2",
+       }, {
+               .dev_name       = "5-001a",
+               .supply         = "CPVDD",
+       },
+ };
+ static struct regulator_consumer_supply wm8994_fixed_voltage1_supplies[] = {
+       {
+               .dev_name       = "5-001a",
+               .supply         = "SPKVDD1",
+       }, {
+               .dev_name       = "5-001a",
+               .supply         = "SPKVDD2",
+       },
+ };
+ static struct regulator_init_data wm8994_fixed_voltage0_init_data = {
+       .constraints = {
+               .always_on = 1,
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(wm8994_fixed_voltage0_supplies),
+       .consumer_supplies      = wm8994_fixed_voltage0_supplies,
+ };
+ static struct regulator_init_data wm8994_fixed_voltage1_init_data = {
+       .constraints = {
+               .always_on = 1,
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(wm8994_fixed_voltage1_supplies),
+       .consumer_supplies      = wm8994_fixed_voltage1_supplies,
+ };
+ static struct fixed_voltage_config wm8994_fixed_voltage0_config = {
+       .supply_name    = "VCC_1.8V_PDA",
+       .microvolts     = 1800000,
+       .gpio           = -EINVAL,
+       .init_data      = &wm8994_fixed_voltage0_init_data,
+ };
+ static struct fixed_voltage_config wm8994_fixed_voltage1_config = {
+       .supply_name    = "V_BAT",
+       .microvolts     = 3700000,
+       .gpio           = -EINVAL,
+       .init_data      = &wm8994_fixed_voltage1_init_data,
+ };
+ static struct platform_device wm8994_fixed_voltage0 = {
+       .name           = "reg-fixed-voltage",
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &wm8994_fixed_voltage0_config,
+       },
+ };
+ static struct platform_device wm8994_fixed_voltage1 = {
+       .name           = "reg-fixed-voltage",
+       .id             = 1,
+       .dev            = {
+               .platform_data  = &wm8994_fixed_voltage1_config,
+       },
+ };
+ static struct regulator_consumer_supply wm8994_avdd1_supply = {
+       .dev_name       = "5-001a",
+       .supply         = "AVDD1",
+ };
+ static struct regulator_consumer_supply wm8994_dcvdd_supply = {
+       .dev_name       = "5-001a",
+       .supply         = "DCVDD",
+ };
+ static struct regulator_init_data wm8994_ldo1_data = {
+       .constraints    = {
+               .name           = "AVDD1_3.0V",
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+       },
+       .num_consumer_supplies  = 1,
+       .consumer_supplies      = &wm8994_avdd1_supply,
+ };
+ static struct regulator_init_data wm8994_ldo2_data = {
+       .constraints    = {
+               .name           = "DCVDD_1.0V",
+       },
+       .num_consumer_supplies  = 1,
+       .consumer_supplies      = &wm8994_dcvdd_supply,
+ };
+ static struct wm8994_pdata wm8994_platform_data = {
+       /* configure gpio1 function: 0x0001(Logic level input/output) */
+       .gpio_defaults[0] = 0x0001,
+       /* configure gpio3/4/5/7 function for AIF2 voice */
+       .gpio_defaults[2] = 0x8100,
+       .gpio_defaults[3] = 0x8100,
+       .gpio_defaults[4] = 0x8100,
+       .gpio_defaults[6] = 0x0100,
+       /* configure gpio8/9/10/11 function for AIF3 BT */
+       .gpio_defaults[7] = 0x8100,
+       .gpio_defaults[8] = 0x0100,
+       .gpio_defaults[9] = 0x0100,
+       .gpio_defaults[10] = 0x0100,
+       .ldo[0] = { S5PV210_MP03(6), NULL, &wm8994_ldo1_data }, /* XM0FRNB_2 */
+       .ldo[1] = { 0, NULL, &wm8994_ldo2_data },
+ };
  /* GPIO I2C PMIC */
  #define AP_I2C_GPIO_PMIC_BUS_4        4
  static struct i2c_gpio_platform_data aquila_i2c_gpio_pmic_data = {
@@@ -404,6 -519,29 +519,29 @@@ static struct i2c_board_info i2c_gpio_p
  #endif
  };
  
+ /* GPIO I2C AP 1.8V */
+ #define AP_I2C_GPIO_BUS_5     5
+ static struct i2c_gpio_platform_data aquila_i2c_gpio5_data = {
+       .sda_pin        = S5PV210_MP05(3),      /* XM0ADDR_11 */
+       .scl_pin        = S5PV210_MP05(2),      /* XM0ADDR_10 */
+ };
+ static struct platform_device aquila_i2c_gpio5 = {
+       .name           = "i2c-gpio",
+       .id             = AP_I2C_GPIO_BUS_5,
+       .dev            = {
+               .platform_data  = &aquila_i2c_gpio5_data,
+       },
+ };
+ static struct i2c_board_info i2c_gpio5_devs[] __initdata = {
+       {
+               /* CS/ADDR = low 0x34 (FYI: high = 0x36) */
+               I2C_BOARD_INFO("wm8994", 0x1a),
+               .platform_data  = &wm8994_platform_data,
+       },
+ };
  /* PMIC Power button */
  static struct gpio_keys_button aquila_gpio_keys_table[] = {
        {
@@@ -475,6 -613,7 +613,7 @@@ static void aquila_setup_sdhci(void
  
  static struct platform_device *aquila_devices[] __initdata = {
        &aquila_i2c_gpio_pmic,
+       &aquila_i2c_gpio5,
        &aquila_device_gpiokeys,
        &s3c_device_fb,
        &s5p_device_onenand,
        &s5p_device_fimc0,
        &s5p_device_fimc1,
        &s5p_device_fimc2,
+       &s5pv210_device_iis0,
+       &wm8994_fixed_voltage0,
+       &wm8994_fixed_voltage1,
  };
  
+ static void __init aquila_sound_init(void)
+ {
+       unsigned int gpio;
+       /* CODEC_XTAL_EN
+        *
+        * The Aquila board have a oscillator which provide main clock
+        * to WM8994 codec. The oscillator provide 24MHz clock to WM8994
+        * clock. Set gpio setting of "CODEC_XTAL_EN" to enable a oscillator.
+        * */
+       gpio = S5PV210_GPH3(2);         /* XEINT_26 */
+       gpio_request(gpio, "CODEC_XTAL_EN");
+       s3c_gpio_cfgpin(gpio, S3C_GPIO_OUTPUT);
+       s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
+       /* Ths main clock of WM8994 codec uses the output of CLKOUT pin.
+        * The CLKOUT[9:8] set to 0x3(XUSBXTI) of 0xE010E000(OTHERS)
+        * because it needs 24MHz clock to operate WM8994 codec.
+        */
+       __raw_writel(__raw_readl(S5P_OTHERS) | (0x3 << 8), S5P_OTHERS);
+ }
  static void __init aquila_map_io(void)
  {
        s5p_init_io(NULL, 0, S5P_VA_CHIPID);
@@@ -506,6 -670,11 +670,11 @@@ static void __init aquila_machine_init(
        s3c_fimc_setname(1, "s5p-fimc");
        s3c_fimc_setname(2, "s5p-fimc");
  
+       /* SOUND */
+       aquila_sound_init();
+       i2c_register_board_info(AP_I2C_GPIO_BUS_5, i2c_gpio5_devs,
+                       ARRAY_SIZE(i2c_gpio5_devs));
        /* FB */
        s3c_fb_set_platdata(&aquila_lcd_pdata);
  
@@@ -516,6 -685,8 +685,6 @@@ MACHINE_START(AQUILA, "Aquila"
        /* Maintainers:
           Marek Szyprowski <m.szyprowski@samsung.com>
           Kyungmin Park <kyungmin.park@samsung.com> */
 -      .phys_io        = S3C_PA_UART & 0xfff00000,
 -      .io_pg_offst    = (((u32)S3C_VA_UART) >> 18) & 0xfffc,
        .boot_params    = S5P_PA_SDRAM + 0x100,
        .init_irq       = s5pv210_init_irq,
        .map_io         = aquila_map_io,
  #include <linux/fb.h>
  #include <linux/i2c.h>
  #include <linux/i2c-gpio.h>
+ #include <linux/i2c/qt602240_ts.h>
  #include <linux/mfd/max8998.h>
+ #include <linux/mfd/wm8994/pdata.h>
+ #include <linux/regulator/fixed.h>
+ #include <linux/spi/spi.h>
+ #include <linux/spi/spi_gpio.h>
+ #include <linux/lcd.h>
  #include <linux/gpio_keys.h>
  #include <linux/input.h>
  #include <linux/gpio.h>
  #include <plat/devs.h>
  #include <plat/cpu.h>
  #include <plat/fb.h>
+ #include <plat/iic.h>
+ #include <plat/keypad.h>
  #include <plat/sdhci.h>
+ #include <plat/clock.h>
  
  /* Following are default values for UCON, ULCON and UFCON UART registers */
  #define GONI_UCON_DEFAULT     (S3C2410_UCON_TXILEVEL |        \
@@@ -87,13 -96,12 +96,12 @@@ static struct s3c2410_uartcfg goni_uart
  /* Frame Buffer */
  static struct s3c_fb_pd_win goni_fb_win0 = {
        .win_mode = {
-               .pixclock = 1000000000000ULL / ((16+16+2+480)*(28+3+2+800)*55),
                .left_margin    = 16,
                .right_margin   = 16,
-               .upper_margin   = 3,
+               .upper_margin   = 2,
                .lower_margin   = 28,
                .hsync_len      = 2,
-               .vsync_len      = 2,
+               .vsync_len      = 1,
                .xres           = 480,
                .yres           = 800,
                .refresh        = 55,
@@@ -111,9 -119,160 +119,160 @@@ static struct s3c_fb_platdata goni_lcd_
        .setup_gpio     = s5pv210_fb_gpio_setup_24bpp,
  };
  
+ static int lcd_power_on(struct lcd_device *ld, int enable)
+ {
+       return 1;
+ }
+ static int reset_lcd(struct lcd_device *ld)
+ {
+       static unsigned int first = 1;
+       int reset_gpio = -1;
+       reset_gpio = S5PV210_MP05(5);
+       if (first) {
+               gpio_request(reset_gpio, "MLCD_RST");
+               first = 0;
+       }
+       gpio_direction_output(reset_gpio, 1);
+       return 1;
+ }
+ static struct lcd_platform_data goni_lcd_platform_data = {
+       .reset                  = reset_lcd,
+       .power_on               = lcd_power_on,
+       .lcd_enabled            = 0,
+       .reset_delay            = 120,  /* 120ms */
+       .power_on_delay         = 25,   /* 25ms */
+       .power_off_delay        = 200,  /* 200ms */
+ };
+ #define LCD_BUS_NUM   3
+ static struct spi_board_info spi_board_info[] __initdata = {
+       {
+               .modalias       = "s6e63m0",
+               .platform_data  = &goni_lcd_platform_data,
+               .max_speed_hz   = 1200000,
+               .bus_num        = LCD_BUS_NUM,
+               .chip_select    = 0,
+               .mode           = SPI_MODE_3,
+               .controller_data = (void *)S5PV210_MP01(1), /* DISPLAY_CS */
+       },
+ };
+ static struct spi_gpio_platform_data lcd_spi_gpio_data = {
+       .sck    = S5PV210_MP04(1), /* DISPLAY_CLK */
+       .mosi   = S5PV210_MP04(3), /* DISPLAY_SI */
+       .miso   = SPI_GPIO_NO_MISO,
+       .num_chipselect = 1,
+ };
+ static struct platform_device goni_spi_gpio = {
+       .name   = "spi_gpio",
+       .id     = LCD_BUS_NUM,
+       .dev    = {
+               .parent         = &s3c_device_fb.dev,
+               .platform_data  = &lcd_spi_gpio_data,
+       },
+ };
+ /* KEYPAD */
+ static uint32_t keymap[] __initdata = {
+       /* KEY(row, col, keycode) */
+       KEY(0, 1, KEY_MENU),            /* Send */
+       KEY(0, 2, KEY_BACK),            /* End */
+       KEY(1, 1, KEY_CONFIG),          /* Half shot */
+       KEY(1, 2, KEY_VOLUMEUP),
+       KEY(2, 1, KEY_CAMERA),          /* Full shot */
+       KEY(2, 2, KEY_VOLUMEDOWN),
+ };
+ static struct matrix_keymap_data keymap_data __initdata = {
+       .keymap         = keymap,
+       .keymap_size    = ARRAY_SIZE(keymap),
+ };
+ static struct samsung_keypad_platdata keypad_data __initdata = {
+       .keymap_data    = &keymap_data,
+       .rows           = 3,
+       .cols           = 3,
+ };
+ /* Radio */
+ static struct i2c_board_info i2c1_devs[] __initdata = {
+       {
+               I2C_BOARD_INFO("si470x", 0x10),
+       },
+ };
+ static void __init goni_radio_init(void)
+ {
+       int gpio;
+       gpio = S5PV210_GPJ2(4);                 /* XMSMDATA_4 */
+       gpio_request(gpio, "FM_INT");
+       s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
+       i2c1_devs[0].irq = gpio_to_irq(gpio);
+       gpio = S5PV210_GPJ2(5);                 /* XMSMDATA_5 */
+       gpio_request(gpio, "FM_RST");
+       gpio_direction_output(gpio, 1);
+ }
+ /* TSP */
+ static struct qt602240_platform_data qt602240_platform_data = {
+       .x_line         = 17,
+       .y_line         = 11,
+       .x_size         = 800,
+       .y_size         = 480,
+       .blen           = 0x21,
+       .threshold      = 0x28,
+       .voltage        = 2800000,              /* 2.8V */
+       .orient         = QT602240_DIAGONAL,
+ };
+ static struct s3c2410_platform_i2c i2c2_data __initdata = {
+       .flags          = 0,
+       .bus_num        = 2,
+       .slave_addr     = 0x10,
+       .frequency      = 400 * 1000,
+       .sda_delay      = 100,
+ };
+ static struct i2c_board_info i2c2_devs[] __initdata = {
+       {
+               I2C_BOARD_INFO("qt602240_ts", 0x4a),
+               .platform_data = &qt602240_platform_data,
+       },
+ };
+ static void __init goni_tsp_init(void)
+ {
+       int gpio;
+       gpio = S5PV210_GPJ1(3);         /* XMSMADDR_11 */
+       gpio_request(gpio, "TSP_LDO_ON");
+       gpio_direction_output(gpio, 1);
+       gpio_export(gpio, 0);
+       gpio = S5PV210_GPJ0(5);         /* XMSMADDR_5 */
+       gpio_request(gpio, "TSP_INT");
+       s5p_register_gpio_interrupt(gpio);
+       s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
+       s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
+       i2c2_devs[0].irq = gpio_to_irq(gpio);
+ }
  /* MAX8998 regulators */
  #if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE)
  
+ static struct regulator_consumer_supply goni_ldo5_consumers[] = {
+       REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"),
+ };
  static struct regulator_init_data goni_ldo2_data = {
        .constraints    = {
                .name           = "VALIVE_1.1V",
@@@ -153,6 -312,8 +312,8 @@@ static struct regulator_init_data goni_
                .max_uV         = 2800000,
                .apply_uV       = 1,
        },
+       .num_consumer_supplies = ARRAY_SIZE(goni_ldo5_consumers),
+       .consumer_supplies = goni_ldo5_consumers,
  };
  
  static struct regulator_init_data goni_ldo6_data = {
@@@ -360,6 -521,119 +521,119 @@@ static struct max8998_platform_data gon
  };
  #endif
  
+ static struct regulator_consumer_supply wm8994_fixed_voltage0_supplies[] = {
+       {
+               .dev_name       = "5-001a",
+               .supply         = "DBVDD",
+       }, {
+               .dev_name       = "5-001a",
+               .supply         = "AVDD2",
+       }, {
+               .dev_name       = "5-001a",
+               .supply         = "CPVDD",
+       },
+ };
+ static struct regulator_consumer_supply wm8994_fixed_voltage1_supplies[] = {
+       {
+               .dev_name       = "5-001a",
+               .supply         = "SPKVDD1",
+       }, {
+               .dev_name       = "5-001a",
+               .supply         = "SPKVDD2",
+       },
+ };
+ static struct regulator_init_data wm8994_fixed_voltage0_init_data = {
+       .constraints = {
+               .always_on = 1,
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(wm8994_fixed_voltage0_supplies),
+       .consumer_supplies      = wm8994_fixed_voltage0_supplies,
+ };
+ static struct regulator_init_data wm8994_fixed_voltage1_init_data = {
+       .constraints = {
+               .always_on = 1,
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(wm8994_fixed_voltage1_supplies),
+       .consumer_supplies      = wm8994_fixed_voltage1_supplies,
+ };
+ static struct fixed_voltage_config wm8994_fixed_voltage0_config = {
+       .supply_name    = "VCC_1.8V_PDA",
+       .microvolts     = 1800000,
+       .gpio           = -EINVAL,
+       .init_data      = &wm8994_fixed_voltage0_init_data,
+ };
+ static struct fixed_voltage_config wm8994_fixed_voltage1_config = {
+       .supply_name    = "V_BAT",
+       .microvolts     = 3700000,
+       .gpio           = -EINVAL,
+       .init_data      = &wm8994_fixed_voltage1_init_data,
+ };
+ static struct platform_device wm8994_fixed_voltage0 = {
+       .name           = "reg-fixed-voltage",
+       .id             = 0,
+       .dev            = {
+               .platform_data  = &wm8994_fixed_voltage0_config,
+       },
+ };
+ static struct platform_device wm8994_fixed_voltage1 = {
+       .name           = "reg-fixed-voltage",
+       .id             = 1,
+       .dev            = {
+               .platform_data  = &wm8994_fixed_voltage1_config,
+       },
+ };
+ static struct regulator_consumer_supply wm8994_avdd1_supply = {
+       .dev_name       = "5-001a",
+       .supply         = "AVDD1",
+ };
+ static struct regulator_consumer_supply wm8994_dcvdd_supply = {
+       .dev_name       = "5-001a",
+       .supply         = "DCVDD",
+ };
+ static struct regulator_init_data wm8994_ldo1_data = {
+       .constraints    = {
+               .name           = "AVDD1_3.0V",
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+       },
+       .num_consumer_supplies  = 1,
+       .consumer_supplies      = &wm8994_avdd1_supply,
+ };
+ static struct regulator_init_data wm8994_ldo2_data = {
+       .constraints    = {
+               .name           = "DCVDD_1.0V",
+       },
+       .num_consumer_supplies  = 1,
+       .consumer_supplies      = &wm8994_dcvdd_supply,
+ };
+ static struct wm8994_pdata wm8994_platform_data = {
+       /* configure gpio1 function: 0x0001(Logic level input/output) */
+       .gpio_defaults[0] = 0x0001,
+       /* configure gpio3/4/5/7 function for AIF2 voice */
+       .gpio_defaults[2] = 0x8100,
+       .gpio_defaults[3] = 0x8100,
+       .gpio_defaults[4] = 0x8100,
+       .gpio_defaults[6] = 0x0100,
+       /* configure gpio8/9/10/11 function for AIF3 BT */
+       .gpio_defaults[7] = 0x8100,
+       .gpio_defaults[8] = 0x0100,
+       .gpio_defaults[9] = 0x0100,
+       .gpio_defaults[10] = 0x0100,
+       .ldo[0] = { S5PV210_MP03(6), NULL, &wm8994_ldo1_data }, /* XM0FRNB_2 */
+       .ldo[1] = { 0, NULL, &wm8994_ldo2_data },
+ };
  /* GPIO I2C PMIC */
  #define AP_I2C_GPIO_PMIC_BUS_4        4
  static struct i2c_gpio_platform_data goni_i2c_gpio_pmic_data = {
@@@ -385,6 -659,29 +659,29 @@@ static struct i2c_board_info i2c_gpio_p
  #endif
  };
  
+ /* GPIO I2C AP 1.8V */
+ #define AP_I2C_GPIO_BUS_5     5
+ static struct i2c_gpio_platform_data goni_i2c_gpio5_data = {
+       .sda_pin        = S5PV210_MP05(3),      /* XM0ADDR_11 */
+       .scl_pin        = S5PV210_MP05(2),      /* XM0ADDR_10 */
+ };
+ static struct platform_device goni_i2c_gpio5 = {
+       .name           = "i2c-gpio",
+       .id             = AP_I2C_GPIO_BUS_5,
+       .dev            = {
+               .platform_data  = &goni_i2c_gpio5_data,
+       },
+ };
+ static struct i2c_board_info i2c_gpio5_devs[] __initdata = {
+       {
+               /* CS/ADDR = low 0x34 (FYI: high = 0x36) */
+               I2C_BOARD_INFO("wm8994", 0x1a),
+               .platform_data  = &wm8994_platform_data,
+       },
+ };
  /* PMIC Power button */
  static struct gpio_keys_button goni_gpio_keys_table[] = {
        {
@@@ -444,11 -741,37 +741,37 @@@ static struct s3c_sdhci_platdata goni_h
        .ext_cd_gpio_invert     = 1,
  };
  
+ static struct regulator_consumer_supply mmc2_supplies[] = {
+       REGULATOR_SUPPLY("vmmc", "s3c-sdhci.2"),
+ };
+ static struct regulator_init_data mmc2_fixed_voltage_init_data = {
+       .constraints            = {
+               .name           = "V_TF_2.8V",
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(mmc2_supplies),
+       .consumer_supplies      = mmc2_supplies,
+ };
+ static struct fixed_voltage_config mmc2_fixed_voltage_config = {
+       .supply_name            = "EXT_FLASH_EN",
+       .microvolts             = 2800000,
+       .gpio                   = GONI_EXT_FLASH_EN,
+       .enable_high            = true,
+       .init_data              = &mmc2_fixed_voltage_init_data,
+ };
+ static struct platform_device mmc2_fixed_voltage = {
+       .name           = "reg-fixed-voltage",
+       .id             = 2,
+       .dev            = {
+               .platform_data  = &mmc2_fixed_voltage_config,
+       },
+ };
  static void goni_setup_sdhci(void)
  {
-       gpio_request(GONI_EXT_FLASH_EN, "FLASH_EN");
-       gpio_direction_output(GONI_EXT_FLASH_EN, 1);
        s3c_sdhci0_set_platdata(&goni_hsmmc0_data);
        s3c_sdhci1_set_platdata(&goni_hsmmc1_data);
        s3c_sdhci2_set_platdata(&goni_hsmmc2_data);
  static struct platform_device *goni_devices[] __initdata = {
        &s3c_device_fb,
        &s5p_device_onenand,
+       &goni_spi_gpio,
        &goni_i2c_gpio_pmic,
+       &goni_i2c_gpio5,
+       &mmc2_fixed_voltage,
        &goni_device_gpiokeys,
        &s5p_device_fimc0,
        &s5p_device_fimc1,
        &s3c_device_hsmmc0,
        &s3c_device_hsmmc1,
        &s3c_device_hsmmc2,
+       &s5pv210_device_iis0,
+       &s3c_device_usb_hsotg,
+       &samsung_device_keypad,
+       &s3c_device_i2c1,
+       &s3c_device_i2c2,
+       &wm8994_fixed_voltage0,
+       &wm8994_fixed_voltage1,
  };
  
+ static void __init goni_sound_init(void)
+ {
+       /* Ths main clock of WM8994 codec uses the output of CLKOUT pin.
+        * The CLKOUT[9:8] set to 0x3(XUSBXTI) of 0xE010E000(OTHERS)
+        * because it needs 24MHz clock to operate WM8994 codec.
+        */
+       __raw_writel(__raw_readl(S5P_OTHERS) | (0x3 << 8), S5P_OTHERS);
+ }
  static void __init goni_map_io(void)
  {
        s5p_init_io(NULL, 0, S5P_VA_CHIPID);
  
  static void __init goni_machine_init(void)
  {
+       /* Radio: call before I2C 1 registeration */
+       goni_radio_init();
+       /* I2C1 */
+       s3c_i2c1_set_platdata(NULL);
+       i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
+       /* TSP: call before I2C 2 registeration */
+       goni_tsp_init();
+       /* I2C2 */
+       s3c_i2c2_set_platdata(&i2c2_data);
+       i2c_register_board_info(2, i2c2_devs, ARRAY_SIZE(i2c2_devs));
        /* PMIC */
        goni_pmic_init();
        i2c_register_board_info(AP_I2C_GPIO_PMIC_BUS_4, i2c_gpio_pmic_devs,
        /* SDHCI */
        goni_setup_sdhci();
  
+       /* SOUND */
+       goni_sound_init();
+       i2c_register_board_info(AP_I2C_GPIO_BUS_5, i2c_gpio5_devs,
+                       ARRAY_SIZE(i2c_gpio5_devs));
        /* FB */
        s3c_fb_set_platdata(&goni_lcd_pdata);
  
+       /* SPI */
+       spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
+       /* KEYPAD */
+       samsung_keypad_set_platdata(&keypad_data);
+       clk_xusbxti.rate = 24000000;
        platform_add_devices(goni_devices, ARRAY_SIZE(goni_devices));
  }
  
  MACHINE_START(GONI, "GONI")
        /* Maintainers: Kyungmin Park <kyungmin.park@samsung.com> */
 -      .phys_io        = S3C_PA_UART & 0xfff00000,
 -      .io_pg_offst    = (((u32)S3C_VA_UART) >> 18) & 0xfffc,
        .boot_params    = S5P_PA_SDRAM + 0x100,
        .init_irq       = s5pv210_init_irq,
        .map_io         = goni_map_io,
@@@ -28,6 -28,7 +28,7 @@@
  #include <plat/cpu.h>
  #include <plat/ata.h>
  #include <plat/iic.h>
+ #include <plat/pm.h>
  
  /* Following are default values for UCON, ULCON and UFCON UART registers */
  #define SMDKC110_UCON_DEFAULT (S3C2410_UCON_TXILEVEL |        \
@@@ -81,6 -82,7 +82,7 @@@ static struct s3c_ide_platdata smdkc110
  static struct platform_device *smdkc110_devices[] __initdata = {
        &s5pv210_device_iis0,
        &s5pv210_device_ac97,
+       &s5pv210_device_spdif,
        &s3c_device_cfcon,
        &s3c_device_i2c0,
        &s3c_device_i2c1,
@@@ -110,6 -112,8 +112,8 @@@ static void __init smdkc110_map_io(void
  
  static void __init smdkc110_machine_init(void)
  {
+       s3c_pm_init();
        s3c_i2c0_set_platdata(NULL);
        s3c_i2c1_set_platdata(NULL);
        s3c_i2c2_set_platdata(NULL);
  
  MACHINE_START(SMDKC110, "SMDKC110")
        /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
 -      .phys_io        = S3C_PA_UART & 0xfff00000,
 -      .io_pg_offst    = (((u32)S3C_VA_UART) >> 18) & 0xfffc,
        .boot_params    = S5P_PA_SDRAM + 0x100,
        .init_irq       = s5pv210_init_irq,
        .map_io         = smdkc110_map_io,
@@@ -31,6 -31,7 +31,7 @@@
  #include <plat/ata.h>
  #include <plat/iic.h>
  #include <plat/keypad.h>
+ #include <plat/pm.h>
  
  /* Following are default values for UCON, ULCON and UFCON UART registers */
  #define SMDKV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL |        \
@@@ -103,6 -104,7 +104,7 @@@ static struct samsung_keypad_platdata s
  static struct platform_device *smdkv210_devices[] __initdata = {
        &s5pv210_device_iis0,
        &s5pv210_device_ac97,
+       &s5pv210_device_spdif,
        &s3c_device_adc,
        &s3c_device_cfcon,
        &s3c_device_hsmmc0,
@@@ -145,6 -147,8 +147,8 @@@ static void __init smdkv210_map_io(void
  
  static void __init smdkv210_machine_init(void)
  {
+       s3c_pm_init();
        samsung_keypad_set_platdata(&smdkv210_keypad_data);
        s3c24xx_ts_set_platdata(&s3c_ts_platform);
  
  
  MACHINE_START(SMDKV210, "SMDKV210")
        /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
 -      .phys_io        = S3C_PA_UART & 0xfff00000,
 -      .io_pg_offst    = (((u32)S3C_VA_UART) >> 18) & 0xfffc,
        .boot_params    = S5P_PA_SDRAM + 0x100,
        .init_irq       = s5pv210_init_irq,
        .map_io         = smdkv210_map_io,
@@@ -9,16 -9,23 +9,23 @@@
  */
  
  #include <linux/serial_core.h>
+ #include <linux/gpio.h>
+ #include <linux/mmc/host.h>
+ #include <linux/platform_device.h>
+ #include <linux/smsc911x.h>
+ #include <linux/io.h>
  
  #include <asm/mach/arch.h>
  #include <asm/mach-types.h>
- #include <asm/hardware/cache-l2x0.h>
  
  #include <plat/regs-serial.h>
  #include <plat/s5pv310.h>
  #include <plat/cpu.h>
+ #include <plat/devs.h>
+ #include <plat/sdhci.h>
  
  #include <mach/map.h>
+ #include <mach/regs-srom.h>
  
  /* Following are default values for UCON, ULCON and UFCON UART registers */
  #define SMDKV310_UCON_DEFAULT (S3C2410_UCON_TXILEVEL |        \
@@@ -65,6 -72,107 +72,107 @@@ static struct s3c2410_uartcfg smdkv310_
        },
  };
  
+ static struct s3c_sdhci_platdata smdkv310_hsmmc0_pdata __initdata = {
+       .cd_type                = S3C_SDHCI_CD_GPIO,
+       .ext_cd_gpio            = S5PV310_GPK0(2),
+       .ext_cd_gpio_invert     = 1,
+       .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
+ #ifdef CONFIG_S5PV310_SDHCI_CH0_8BIT
+       .max_width              = 8,
+       .host_caps              = MMC_CAP_8_BIT_DATA,
+ #endif
+ };
+ static struct s3c_sdhci_platdata smdkv310_hsmmc1_pdata __initdata = {
+       .cd_type                = S3C_SDHCI_CD_GPIO,
+       .ext_cd_gpio            = S5PV310_GPK0(2),
+       .ext_cd_gpio_invert     = 1,
+       .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
+ };
+ static struct s3c_sdhci_platdata smdkv310_hsmmc2_pdata __initdata = {
+       .cd_type                = S3C_SDHCI_CD_GPIO,
+       .ext_cd_gpio            = S5PV310_GPK2(2),
+       .ext_cd_gpio_invert     = 1,
+       .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
+ #ifdef CONFIG_S5PV310_SDHCI_CH2_8BIT
+       .max_width              = 8,
+       .host_caps              = MMC_CAP_8_BIT_DATA,
+ #endif
+ };
+ static struct s3c_sdhci_platdata smdkv310_hsmmc3_pdata __initdata = {
+       .cd_type                = S3C_SDHCI_CD_GPIO,
+       .ext_cd_gpio            = S5PV310_GPK2(2),
+       .ext_cd_gpio_invert     = 1,
+       .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
+ };
+ static struct resource smdkv310_smsc911x_resources[] = {
+       [0] = {
+               .start  = S5PV310_PA_SROM_BANK(1),
+               .end    = S5PV310_PA_SROM_BANK(1) + SZ_64K - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = IRQ_EINT(5),
+               .end    = IRQ_EINT(5),
+               .flags  = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
+       },
+ };
+ static struct smsc911x_platform_config smsc9215_config = {
+       .irq_polarity   = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH,
+       .irq_type       = SMSC911X_IRQ_TYPE_PUSH_PULL,
+       .flags          = SMSC911X_USE_16BIT | SMSC911X_FORCE_INTERNAL_PHY,
+       .phy_interface  = PHY_INTERFACE_MODE_MII,
+       .mac            = {0x00, 0x80, 0x00, 0x23, 0x45, 0x67},
+ };
+ static struct platform_device smdkv310_smsc911x = {
+       .name           = "smsc911x",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(smdkv310_smsc911x_resources),
+       .resource       = smdkv310_smsc911x_resources,
+       .dev            = {
+               .platform_data  = &smsc9215_config,
+       },
+ };
+ static struct platform_device *smdkv310_devices[] __initdata = {
+       &s3c_device_hsmmc0,
+       &s3c_device_hsmmc1,
+       &s3c_device_hsmmc2,
+       &s3c_device_hsmmc3,
+       &s3c_device_rtc,
+       &s3c_device_wdt,
+       &smdkv310_smsc911x,
+ };
+ static void __init smdkv310_smsc911x_init(void)
+ {
+       u32 cs1;
+       /* configure nCS1 width to 16 bits */
+       cs1 = __raw_readl(S5PV310_SROM_BW) &
+                   ~(S5PV310_SROM_BW__CS_MASK <<
+                                   S5PV310_SROM_BW__NCS1__SHIFT);
+       cs1 |= ((1 << S5PV310_SROM_BW__DATAWIDTH__SHIFT) |
+               (1 << S5PV310_SROM_BW__WAITENABLE__SHIFT) |
+               (1 << S5PV310_SROM_BW__BYTEENABLE__SHIFT)) <<
+               S5PV310_SROM_BW__NCS1__SHIFT;
+       __raw_writel(cs1, S5PV310_SROM_BW);
+       /* set timing for nCS1 suitable for ethernet chip */
+       __raw_writel((0x1 << S5PV310_SROM_BCX__PMC__SHIFT) |
+                    (0x9 << S5PV310_SROM_BCX__TACP__SHIFT) |
+                    (0xc << S5PV310_SROM_BCX__TCAH__SHIFT) |
+                    (0x1 << S5PV310_SROM_BCX__TCOH__SHIFT) |
+                    (0x6 << S5PV310_SROM_BCX__TACC__SHIFT) |
+                    (0x1 << S5PV310_SROM_BCX__TCOS__SHIFT) |
+                    (0x1 << S5PV310_SROM_BCX__TACS__SHIFT), S5PV310_SROM_BC1);
+ }
  static void __init smdkv310_map_io(void)
  {
        s5p_init_io(NULL, 0, S5P_VA_CHIPID);
  
  static void __init smdkv310_machine_init(void)
  {
- #ifdef CONFIG_CACHE_L2X0
-       l2x0_init(S5P_VA_L2CC, 1 << 28, 0xffffffff);
- #endif
+       smdkv310_smsc911x_init();
+       s3c_sdhci0_set_platdata(&smdkv310_hsmmc0_pdata);
+       s3c_sdhci1_set_platdata(&smdkv310_hsmmc1_pdata);
+       s3c_sdhci2_set_platdata(&smdkv310_hsmmc2_pdata);
+       s3c_sdhci3_set_platdata(&smdkv310_hsmmc3_pdata);
+       platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices));
  }
  
  MACHINE_START(SMDKV310, "SMDKV310")
        /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
        /* Maintainer: Changhwan Youn <chaos.youn@samsung.com> */
 -      .phys_io        = S3C_PA_UART & 0xfff00000,
 -      .io_pg_offst    = (((u32)S3C_VA_UART) >> 18) & 0xfffc,
        .boot_params    = S5P_PA_SDRAM + 0x100,
        .init_irq       = s5pv310_init_irq,
        .map_io         = smdkv310_map_io,
@@@ -7,15 -7,20 +7,20 @@@
   * published by the Free Software Foundation.
  */
  
+ #include <linux/platform_device.h>
  #include <linux/serial_core.h>
+ #include <linux/input.h>
+ #include <linux/i2c.h>
+ #include <linux/gpio_keys.h>
+ #include <linux/gpio.h>
  
  #include <asm/mach/arch.h>
  #include <asm/mach-types.h>
- #include <asm/hardware/cache-l2x0.h>
  
  #include <plat/regs-serial.h>
  #include <plat/s5pv310.h>
  #include <plat/cpu.h>
+ #include <plat/devs.h>
  
  #include <mach/map.h>
  
@@@ -60,6 -65,72 +65,72 @@@ static struct s3c2410_uartcfg universal
        },
  };
  
+ static struct gpio_keys_button universal_gpio_keys_tables[] = {
+       {
+               .code                   = KEY_VOLUMEUP,
+               .gpio                   = S5PV310_GPX2(0),      /* XEINT16 */
+               .desc                   = "gpio-keys: KEY_VOLUMEUP",
+               .type                   = EV_KEY,
+               .active_low             = 1,
+               .debounce_interval      = 1,
+       }, {
+               .code                   = KEY_VOLUMEDOWN,
+               .gpio                   = S5PV310_GPX2(1),      /* XEINT17 */
+               .desc                   = "gpio-keys: KEY_VOLUMEDOWN",
+               .type                   = EV_KEY,
+               .active_low             = 1,
+               .debounce_interval      = 1,
+       }, {
+               .code                   = KEY_CONFIG,
+               .gpio                   = S5PV310_GPX2(2),      /* XEINT18 */
+               .desc                   = "gpio-keys: KEY_CONFIG",
+               .type                   = EV_KEY,
+               .active_low             = 1,
+               .debounce_interval      = 1,
+       }, {
+               .code                   = KEY_CAMERA,
+               .gpio                   = S5PV310_GPX2(3),      /* XEINT19 */
+               .desc                   = "gpio-keys: KEY_CAMERA",
+               .type                   = EV_KEY,
+               .active_low             = 1,
+               .debounce_interval      = 1,
+       }, {
+               .code                   = KEY_OK,
+               .gpio                   = S5PV310_GPX3(5),      /* XEINT29 */
+               .desc                   = "gpio-keys: KEY_OK",
+               .type                   = EV_KEY,
+               .active_low             = 1,
+               .debounce_interval      = 1,
+       },
+ };
+ static struct gpio_keys_platform_data universal_gpio_keys_data = {
+       .buttons        = universal_gpio_keys_tables,
+       .nbuttons       = ARRAY_SIZE(universal_gpio_keys_tables),
+ };
+ static struct platform_device universal_gpio_keys = {
+       .name                   = "gpio-keys",
+       .dev                    = {
+               .platform_data  = &universal_gpio_keys_data,
+       },
+ };
+ /* I2C0 */
+ static struct i2c_board_info i2c0_devs[] __initdata = {
+       /* Camera, To be updated */
+ };
+ /* I2C1 */
+ static struct i2c_board_info i2c1_devs[] __initdata = {
+       /* Gyro, To be updated */
+ };
+ static struct platform_device *universal_devices[] __initdata = {
+       &universal_gpio_keys,
+       &s5p_device_onenand,
+ };
  static void __init universal_map_io(void)
  {
        s5p_init_io(NULL, 0, S5P_VA_CHIPID);
  
  static void __init universal_machine_init(void)
  {
- #ifdef CONFIG_CACHE_L2X0
-       l2x0_init(S5P_VA_L2CC, 1 << 28, 0xffffffff);
- #endif
+       i2c_register_board_info(0, i2c0_devs, ARRAY_SIZE(i2c0_devs));
+       i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
+       /* Last */
+       platform_add_devices(universal_devices, ARRAY_SIZE(universal_devices));
  }
  
  MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210")
        /* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */
 -      .phys_io        = S3C_PA_UART & 0xfff00000,
 -      .io_pg_offst    = (((u32)S3C_VA_UART) >> 18) & 0xfffc,
        .boot_params    = S5P_PA_SDRAM + 0x100,
        .init_irq       = s5pv310_init_irq,
        .map_io         = universal_map_io,
@@@ -32,8 -32,6 +32,8 @@@ extern struct platform_device s3c64xx_d
  extern struct platform_device s3c64xx_device_spi0;
  extern struct platform_device s3c64xx_device_spi1;
  
 +extern struct platform_device s3c_device_pcm;
 +
  extern struct platform_device s3c64xx_device_pcm0;
  extern struct platform_device s3c64xx_device_pcm1;
  
@@@ -48,6 -46,11 +48,11 @@@ extern struct platform_device s3c_devic
  extern struct platform_device s3c_device_i2c0;
  extern struct platform_device s3c_device_i2c1;
  extern struct platform_device s3c_device_i2c2;
+ extern struct platform_device s3c_device_i2c3;
+ extern struct platform_device s3c_device_i2c4;
+ extern struct platform_device s3c_device_i2c5;
+ extern struct platform_device s3c_device_i2c6;
+ extern struct platform_device s3c_device_i2c7;
  extern struct platform_device s3c_device_rtc;
  extern struct platform_device s3c_device_adc;
  extern struct platform_device s3c_device_sdi;
@@@ -89,6 -92,7 +94,7 @@@ extern struct platform_device s5pv210_d
  extern struct platform_device s5pv210_device_iis0;
  extern struct platform_device s5pv210_device_iis1;
  extern struct platform_device s5pv210_device_iis2;
+ extern struct platform_device s5pv210_device_spdif;
  
  extern struct platform_device s5p6442_device_pcm0;
  extern struct platform_device s5p6442_device_pcm1;
@@@ -108,6 -112,7 +114,7 @@@ extern struct platform_device s5pc100_d
  extern struct platform_device s5pc100_device_iis0;
  extern struct platform_device s5pc100_device_iis1;
  extern struct platform_device s5pc100_device_iis2;
+ extern struct platform_device s5pc100_device_spdif;
  
  extern struct platform_device samsung_device_keypad;