]> Pileus Git - ~andy/linux/commitdiff
Merge tag 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 9 Jan 2012 22:28:38 +0000 (14:28 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 9 Jan 2012 22:28:38 +0000 (14:28 -0800)
Device tree conversions for samsung and tegra

Both platforms had some initial device tree support, but this adds
much more to actually make it usable.

* tag 'dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (45 commits)
  ARM: dts: Add intial dts file for EXYNOS4210 SoC, SMDKV310 and ORIGEN
  ARM: EXYNOS: Add Exynos4 device tree enabled board file
  rtc: rtc-s3c: Add device tree support
  input: samsung-keypad: Add device tree support
  ARM: S5PV210: Modify platform data for pl330 driver
  ARM: S5PC100: Modify platform data for pl330 driver
  ARM: S5P64x0: Modify platform data for pl330 driver
  ARM: EXYNOS: Add a alias for pdma clocks
  ARM: EXYNOS: Limit usage of pl330 device instance to non-dt build
  ARM: SAMSUNG: Add device tree support for pl330 dma engine wrappers
  DMA: PL330: Add device tree support
  ARM: EXYNOS: Modify platform data for pl330 driver
  DMA: PL330: Infer transfer direction from transfer request instead of platform data
  DMA: PL330: move filter function into driver
  serial: samsung: Fix build for non-Exynos4210 devices
  serial: samsung: add device tree support
  serial: samsung: merge probe() function from all SoC specific extensions
  serial: samsung: merge all SoC specific port reset functions
  ARM: SAMSUNG: register uart clocks to clock lookup list
  serial: samsung: remove all uses of get_clksrc and set_clksrc
  ...

Fix up fairly trivial conflicts in arch/arm/mach-s3c2440/clock.c and
drivers/tty/serial/Kconfig both due to just adding code close to
changes.

15 files changed:
1  2 
arch/arm/mach-exynos/common.c
arch/arm/mach-s3c2410/s3c2410.c
arch/arm/mach-s3c2412/clock.c
arch/arm/mach-s3c2440/clock.c
arch/arm/mach-s3c2440/mach-rx1950.c
arch/arm/mach-s3c2440/mach-rx3715.c
arch/arm/mach-s5p64x0/clock-s5p6440.c
arch/arm/mach-s5p64x0/clock-s5p6450.c
arch/arm/mach-s5p64x0/common.c
arch/arm/mach-s5pv210/clock.c
arch/arm/mach-s5pv210/common.c
drivers/dma/pl330.c
drivers/gpio/gpio-samsung.c
drivers/tty/serial/Kconfig
drivers/tty/serial/Makefile

index 647c8434610c724820f86b387d4b5afe8753d293,b4beb7e2b5b8bc6c76c59f36e00f397c7153838d..c59e18871006a601af8d061b58d3f205cb7d5d28
@@@ -457,18 -470,9 +471,9 @@@ int __init exynos_init(void
        /* set idle function */
        pm_idle = exynos_idle;
  
 -      return sysdev_register(&exynos4_sysdev);
 +      return device_register(&exynos4_dev);
  }
  
- static struct s3c24xx_uart_clksrc exynos4_serial_clocks[] = {
-       [0] = {
-               .name           = "uclk1",
-               .divisor        = 1,
-               .min_baud       = 0,
-               .max_baud       = 0,
-       },
- };
  /* uart registration process */
  
  void __init exynos4_init_uarts(struct s3c2410_uartcfg *cfg, int no)
index eea559ec7a58c01045f7b7a6f7ed0d8b568b74b5,dad596332c5e9aea0b9d070e02d42121901be0cd..061b6bb1a557015d051b65388951da535f900665
@@@ -130,11 -135,11 +135,12 @@@ void __init s3c2410_init_clocks(int xta
        s3c2410_setup_clocks();
        s3c2410_baseclk_add();
        s3c24xx_register_clock(&s3c2410_armclk);
+       clkdev_add_table(s3c2410_clk_lookup, ARRAY_SIZE(s3c2410_clk_lookup));
  }
  
 -struct sysdev_class s3c2410_sysclass = {
 +struct bus_type s3c2410_subsys = {
        .name = "s3c2410-core",
 +      .dev_name = "s3c2410-core",
  };
  
  /* Note, we would have liked to name this s3c2410-core, but we cannot
Simple merge
index d8957592fdc4d5eaf1f96b72d0c0a9ce70efc971,c9879af42b0844648138b77f02dd1603d6d68406..bedbc87a3426fb2b9f6c1c83126bf1b021ce4289
@@@ -107,7 -110,47 +109,47 @@@ static struct clk s3c2440_clk_ac97 = 
        .ctrlbit        = S3C2440_CLKCON_CAMERA,
  };
  
 -static int s3c2440_clk_add(struct sys_device *sysdev)
+ static unsigned long  s3c2440_fclk_n_getrate(struct clk *clk)
+ {
+       unsigned long ucon0, ucon1, ucon2, divisor;
+       /* the fun of calculating the uart divisors on the s3c2440 */
+       ucon0 = __raw_readl(S3C24XX_VA_UART0 + S3C2410_UCON);
+       ucon1 = __raw_readl(S3C24XX_VA_UART1 + S3C2410_UCON);
+       ucon2 = __raw_readl(S3C24XX_VA_UART2 + S3C2410_UCON);
+       ucon0 &= S3C2440_UCON0_DIVMASK;
+       ucon1 &= S3C2440_UCON1_DIVMASK;
+       ucon2 &= S3C2440_UCON2_DIVMASK;
+       if (ucon0 != 0)
+               divisor = (ucon0 >> S3C2440_UCON_DIVSHIFT) + 6;
+       else if (ucon1 != 0)
+               divisor = (ucon1 >> S3C2440_UCON_DIVSHIFT) + 21;
+       else if (ucon2 != 0)
+               divisor = (ucon2 >> S3C2440_UCON_DIVSHIFT) + 36;
+       else
+               /* manual calims 44, seems to be 9 */
+               divisor = 9;
+       return clk_get_rate(clk->parent) / divisor;
+ }
+ static struct clk s3c2440_clk_fclk_n = {
+       .name           = "fclk_n",
+       .parent         = &clk_f,
+       .ops            = &(struct clk_ops) {
+               .get_rate       = s3c2440_fclk_n_getrate,
+       },
+ };
+ static struct clk_lookup s3c2440_clk_lookup[] = {
+       CLKDEV_INIT(NULL, "clk_uart_baud1", &s3c24xx_uclk),
+       CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p),
+       CLKDEV_INIT(NULL, "clk_uart_baud3", &s3c2440_clk_fclk_n),
+ };
 +static int s3c2440_clk_add(struct device *dev)
  {
        struct clk *clock_upll;
        struct clk *clock_h;
Simple merge
Simple merge
Simple merge
Simple merge
index 28d0b918cd4b6cf911afac7bb836e9c8260658df,fcf0778ae5c46c4d413ccc44a63867e8f10fb4ab..0d50e79fb9fc56bc0e592c775f004ed1fd11f0a7
@@@ -279,39 -278,10 +279,10 @@@ int __init s5p64x0_init(void
        /* set idle function */
        pm_idle = s5p64x0_idle;
  
 -      return sysdev_register(&s5p64x0_sysdev);
 +      return device_register(&s5p64x0_dev);
  }
  
- static struct s3c24xx_uart_clksrc s5p64x0_serial_clocks[] = {
-       [0] = {
-               .name           = "pclk_low",
-               .divisor        = 1,
-               .min_baud       = 0,
-               .max_baud       = 0,
-       },
-       [1] = {
-               .name           = "uclk1",
-               .divisor        = 1,
-               .min_baud       = 0,
-               .max_baud       = 0,
-       },
- };
  /* uart registration process */
- void __init s5p64x0_common_init_uarts(struct s3c2410_uartcfg *cfg, int no)
- {
-       struct s3c2410_uartcfg *tcfg = cfg;
-       u32 ucnt;
-       for (ucnt = 0; ucnt < no; ucnt++, tcfg++) {
-               if (!tcfg->clocks) {
-                       tcfg->clocks = s5p64x0_serial_clocks;
-                       tcfg->clocks_size = ARRAY_SIZE(s5p64x0_serial_clocks);
-               }
-       }
- }
  void __init s5p6440_init_uarts(struct s3c2410_uartcfg *cfg, int no)
  {
        int uart;
Simple merge
index 0ec393305d7cff71da295b23f666519e39b2da1b,b9adefd9838ef39ab2c4ec6cc9dd042274bee5da..9c1bcdcc12c3bfd8e479f21fe66b2d393be49616
@@@ -251,18 -250,9 +251,9 @@@ int __init s5pv210_init(void
        /* set idle function */
        pm_idle = s5pv210_idle;
  
 -      return sysdev_register(&s5pv210_sysdev);
 +      return device_register(&s5pv210_dev);
  }
  
- static struct s3c24xx_uart_clksrc s5pv210_serial_clocks[] = {
-       [0] = {
-               .name           = "pclk",
-               .divisor        = 1,
-               .min_baud       = 0,
-               .max_baud       = 0,
-       },
- };
  /* uart registration process */
  
  void __init s5pv210_init_uarts(struct s3c2410_uartcfg *cfg, int no)
Simple merge
index ab098ba9f1ddada0eb9cffc85758095beb4bf72f,6b4d23fd158eb599a9167ae30a441fb63796d72c..a7661773c0525a43367de809c851053c78e6a186
  #include <linux/spinlock.h>
  #include <linux/module.h>
  #include <linux/interrupt.h>
 -#include <linux/sysdev.h>
 +#include <linux/device.h>
  #include <linux/ioport.h>
+ #include <linux/of.h>
+ #include <linux/slab.h>
+ #include <linux/of_address.h>
  
  #include <asm/irq.h>
  
index 113fccf825170a6321b8b9ceb0ceb223063f7d01,fb89b85d0d81a47cd46a3d30f6a3064b41a7f0a2..f32a2ea701007f7b4aa4234bcbd9dd68d7b79d4b
@@@ -500,68 -495,6 +500,28 @@@ config SERIAL_SAMSUNG_CONSOL
          your boot loader about how to pass options to the kernel at
          boot time.)
  
- config SERIAL_S3C2410
-       tristate "Samsung S3C2410 Serial port support"
-       depends on SERIAL_SAMSUNG && CPU_S3C2410
-       default y if CPU_S3C2410
-       help
-         Serial port support for the Samsung S3C2410 SoC
- config SERIAL_S3C2412
-       tristate "Samsung S3C2412/S3C2413 Serial port support"
-       depends on SERIAL_SAMSUNG && CPU_S3C2412
-       default y if CPU_S3C2412
-       help
-         Serial port support for the Samsung S3C2412 and S3C2413 SoC
- config SERIAL_S3C2440
-       tristate "Samsung S3C2440/S3C2442/S3C2416 Serial port support"
-       depends on SERIAL_SAMSUNG && (CPU_S3C2440 || CPU_S3C2442 || CPU_S3C2416)
-       default y if CPU_S3C2440
-       default y if CPU_S3C2442
-       select SERIAL_SAMSUNG_UARTS_4 if CPU_S3C2416
-       help
-         Serial port support for the Samsung S3C2440, S3C2416 and S3C2442 SoC
- config SERIAL_S3C6400
-       tristate "Samsung S3C6400/S3C6410/S5P6440/S5P6450/S5PC100 Serial port support"
-       depends on SERIAL_SAMSUNG && (CPU_S3C6400 || CPU_S3C6410 || CPU_S5P6440 || CPU_S5P6450 || CPU_S5PC100)
-       select SERIAL_SAMSUNG_UARTS_4
-       default y
-       help
-         Serial port support for the Samsung S3C6400, S3C6410, S5P6440, S5P6450
-         and S5PC100 SoCs
- config SERIAL_S5PV210
-       tristate "Samsung S5PV210 Serial port support"
-       depends on SERIAL_SAMSUNG && (CPU_S5PV210 || CPU_EXYNOS4210 || SOC_EXYNOS4212)
-       select SERIAL_SAMSUNG_UARTS_4 if (CPU_S5PV210 || CPU_EXYNOS4210 || SOC_EXYNOS4212)
-       default y
-       help
-         Serial port support for Samsung's S5P Family of SoC's
 +config SERIAL_SIRFSOC
 +        tristate "SiRF SoC Platform Serial port support"
 +        depends on ARM && ARCH_PRIMA2
 +        select SERIAL_CORE
 +        help
 +          Support for the on-chip UART on the CSR SiRFprimaII series,
 +          providing /dev/ttySiRF0, 1 and 2 (note, some machines may not
 +          provide all of these ports, depending on how the serial port
 +          pins are configured).
 +
 +config SERIAL_SIRFSOC_CONSOLE
 +        bool "Support for console on SiRF SoC serial port"
 +        depends on SERIAL_SIRFSOC=y
 +        select SERIAL_CORE_CONSOLE
 +        help
 +          Even if you say Y here, the currently visible virtual console
 +          (/dev/tty0) will still be used as the system console by default, but
 +          you can alter that using a kernel command line option such as
 +          "console=ttySiRFx". (Try "man bootparam" or see the documentation of
 +          your boot loader about how to pass options to the kernel at
 +          boot time.)
 +
  config SERIAL_MAX3100
        tristate "MAX3100 support"
        depends on SPI
Simple merge