]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
Merge branch 'tegra/soc' into next/multiplatform
authorArnd Bergmann <arnd@arndb.de>
Tue, 9 Apr 2013 14:54:27 +0000 (16:54 +0200)
committerArnd Bergmann <arnd@arndb.de>
Tue, 9 Apr 2013 14:54:27 +0000 (16:54 +0200)
This is a dependency for the tegra multiplatform series.

Conflicts:
drivers/clocksource/tegra20_timer.c

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1  2 
arch/arm/Kconfig
arch/arm/boot/dts/tegra20.dtsi
arch/arm/boot/dts/tegra30.dtsi
drivers/clk/tegra/clk-tegra20.c
drivers/clocksource/tegra20_timer.c

diff --combined arch/arm/Kconfig
index 65aa5ef17734991e36aa0b4d591c7bb1845b720d,59b7be794582badfbc11c4c27b5efc851e5156ee..6584941e0fab2fc3dad21f6d9e937031c80179f2
@@@ -49,6 -49,7 +49,6 @@@ config AR
        select HAVE_REGS_AND_STACK_ACCESS_API
        select HAVE_SYSCALL_TRACEPOINTS
        select HAVE_UID16
 -      select HAVE_VIRT_TO_BUS
        select KTIME_SCALAR
        select PERF_USE_VMALLOC
        select RTC_LIB
@@@ -361,6 -362,37 +361,6 @@@ config ARCH_AT9
          This enables support for systems based on Atmel
          AT91RM9200 and AT91SAM9* processors.
  
 -config ARCH_BCM2835
 -      bool "Broadcom BCM2835 family"
 -      select ARCH_REQUIRE_GPIOLIB
 -      select ARM_AMBA
 -      select ARM_ERRATA_411920
 -      select ARM_TIMER_SP804
 -      select CLKDEV_LOOKUP
 -      select CLKSRC_OF
 -      select COMMON_CLK
 -      select CPU_V6
 -      select GENERIC_CLOCKEVENTS
 -      select MULTI_IRQ_HANDLER
 -      select PINCTRL
 -      select PINCTRL_BCM2835
 -      select SPARSE_IRQ
 -      select USE_OF
 -      help
 -        This enables support for the Broadcom BCM2835 SoC. This SoC is
 -        use in the Raspberry Pi, and Roku 2 devices.
 -
 -config ARCH_CNS3XXX
 -      bool "Cavium Networks CNS3XXX family"
 -      select ARM_GIC
 -      select CPU_V6K
 -      select GENERIC_CLOCKEVENTS
 -      select MIGHT_HAVE_CACHE_L2X0
 -      select MIGHT_HAVE_PCI
 -      select PCI_DOMAINS if PCI
 -      help
 -        Support for Cavium Networks CNS3XXX platform.
 -
  config ARCH_CLPS711X
        bool "Cirrus Logic CLPS711x/EP721x/EP731x-based"
        select ARCH_REQUIRE_GPIOLIB
@@@ -383,6 -415,21 +383,6 @@@ config ARCH_GEMIN
        help
          Support for the Cortina Systems Gemini family SoCs
  
 -config ARCH_SIRF
 -      bool "CSR SiRF"
 -      select ARCH_REQUIRE_GPIOLIB
 -      select AUTO_ZRELADDR
 -      select COMMON_CLK
 -      select GENERIC_CLOCKEVENTS
 -      select GENERIC_IRQ_CHIP
 -      select MIGHT_HAVE_CACHE_L2X0
 -      select NO_IOPORT
 -      select PINCTRL
 -      select PINCTRL_SIRF
 -      select USE_OF
 -      help
 -        Support for CSR SiRFprimaII/Marco/Polo platforms
 -
  config ARCH_EBSA110
        bool "EBSA-110"
        select ARCH_USES_GETTIMEOFFSET
@@@ -422,6 -469,21 +422,6 @@@ config ARCH_FOOTBRIDG
          Support for systems based on the DC21285 companion chip
          ("FootBridge"), such as the Simtec CATS and the Rebel NetWinder.
  
 -config ARCH_MXS
 -      bool "Freescale MXS-based"
 -      select ARCH_REQUIRE_GPIOLIB
 -      select CLKDEV_LOOKUP
 -      select CLKSRC_MMIO
 -      select COMMON_CLK
 -      select GENERIC_CLOCKEVENTS
 -      select HAVE_CLK_PREPARE
 -      select MULTI_IRQ_HANDLER
 -      select PINCTRL
 -      select SPARSE_IRQ
 -      select USE_OF
 -      help
 -        Support for Freescale MXS-based family of processors
 -
  config ARCH_NETX
        bool "Hilscher NetX based"
        select ARM_VIC
@@@ -494,6 -556,7 +494,6 @@@ config ARCH_IXP4X
  config ARCH_DOVE
        bool "Marvell Dove"
        select ARCH_REQUIRE_GPIOLIB
 -      select COMMON_CLK_DOVE
        select CPU_V7
        select GENERIC_CLOCKEVENTS
        select MIGHT_HAVE_PCI
@@@ -612,6 -675,7 +612,7 @@@ config ARCH_TEGR
        select HAVE_CLK
        select HAVE_SMP
        select MIGHT_HAVE_CACHE_L2X0
+       select SOC_BUS
        select SPARSE_IRQ
        select USE_OF
        help
@@@ -681,7 -745,6 +682,7 @@@ config ARCH_RP
        select NEED_MACH_IO_H
        select NEED_MACH_MEMORY_H
        select NO_IOPORT
 +      select VIRT_TO_BUS
        help
          On the Acorn Risc-PC, Linux can support the internal IDE disk and
          CD-ROM interface, serial and parallel port, and the floppy drive.
@@@ -817,7 -880,6 +818,7 @@@ config ARCH_SHAR
        select ISA_DMA
        select NEED_MACH_MEMORY_H
        select PCI
 +      select VIRT_TO_BUS
        select ZONE_DMA
        help
          Support for the StrongARM based Digital DNARD machine, also known
@@@ -840,6 -902,51 +841,6 @@@ config ARCH_U30
        help
          Support for ST-Ericsson U300 series mobile platforms.
  
 -config ARCH_U8500
 -      bool "ST-Ericsson U8500 Series"
 -      depends on MMU
 -      select ARCH_HAS_CPUFREQ
 -      select ARCH_REQUIRE_GPIOLIB
 -      select ARM_AMBA
 -      select CLKDEV_LOOKUP
 -      select CPU_V7
 -      select GENERIC_CLOCKEVENTS
 -      select HAVE_SMP
 -      select MIGHT_HAVE_CACHE_L2X0
 -      select SPARSE_IRQ
 -      help
 -        Support for ST-Ericsson's Ux500 architecture
 -
 -config ARCH_NOMADIK
 -      bool "STMicroelectronics Nomadik"
 -      select ARCH_REQUIRE_GPIOLIB
 -      select ARM_AMBA
 -      select ARM_VIC
 -      select CLKSRC_NOMADIK_MTU
 -      select COMMON_CLK
 -      select CPU_ARM926T
 -      select GENERIC_CLOCKEVENTS
 -      select MIGHT_HAVE_CACHE_L2X0
 -      select USE_OF
 -      select PINCTRL
 -      select PINCTRL_STN8815
 -      select SPARSE_IRQ
 -      help
 -        Support for the Nomadik platform by ST-Ericsson
 -
 -config PLAT_SPEAR
 -      bool "ST SPEAr"
 -      select ARCH_HAS_CPUFREQ
 -      select ARCH_REQUIRE_GPIOLIB
 -      select ARM_AMBA
 -      select CLKDEV_LOOKUP
 -      select CLKSRC_MMIO
 -      select COMMON_CLK
 -      select GENERIC_CLOCKEVENTS
 -      select HAVE_CLK
 -      help
 -        Support for ST's SPEAr platform (SPEAr3xx, SPEAr6xx and SPEAr13xx).
 -
  config ARCH_DAVINCI
        bool "TI DaVinci"
        select ARCH_HAS_HOLES_MEMORYMODEL
@@@ -900,12 -1007,12 +901,12 @@@ config ARCH_MULTI_V4_V
        bool
  
  config ARCH_MULTI_V6
 -      bool "ARMv6 based platforms (ARM11, Scorpion, ...)"
 +      bool "ARMv6 based platforms (ARM11)"
        select ARCH_MULTI_V6_V7
        select CPU_V6
  
  config ARCH_MULTI_V7
 -      bool "ARMv7 based platforms (Cortex-A, PJ4, Krait)"
 +      bool "ARMv7 based platforms (Cortex-A, PJ4, Scorpion, Krait)"
        default y
        select ARCH_MULTI_V6_V7
        select ARCH_VEXPRESS
@@@ -931,8 -1038,6 +932,8 @@@ source "arch/arm/mach-at91/Kconfig
  
  source "arch/arm/mach-bcm/Kconfig"
  
 +source "arch/arm/mach-bcm2835/Kconfig"
 +
  source "arch/arm/mach-clps711x/Kconfig"
  
  source "arch/arm/mach-cns3xxx/Kconfig"
@@@ -1000,7 -1105,7 +1001,7 @@@ source "arch/arm/plat-samsung/Kconfig
  
  source "arch/arm/mach-socfpga/Kconfig"
  
 -source "arch/arm/plat-spear/Kconfig"
 +source "arch/arm/mach-spear/Kconfig"
  
  source "arch/arm/mach-s3c24xx/Kconfig"
  
@@@ -1358,6 -1463,10 +1359,6 @@@ config ISA_DM
        bool
        select ISA_DMA_API
  
 -config ARCH_NO_VIRT_TO_BUS
 -      def_bool y
 -      depends on !ARCH_RPC && !ARCH_NETWINDER && !ARCH_SHARK
 -
  # Select ISA DMA interface
  config ISA_DMA_API
        bool
@@@ -1489,7 -1598,6 +1490,7 @@@ config HAVE_ARM_ARCH_TIME
  config HAVE_ARM_TWD
        bool
        depends on SMP
 +      select CLKSRC_OF if OF
        help
          This options enables support for the ARM timer and watchdog unit
  
@@@ -1550,16 -1658,13 +1551,16 @@@ config LOCAL_TIMER
          accounting to be spread across the timer interval, preventing a
          "thundering herd" at every timer tick.
  
 +# The GPIO number here must be sorted by descending number. In case of
 +# a multiplatform kernel, we just want the highest value required by the
 +# selected platforms.
  config ARCH_NR_GPIO
        int
        default 1024 if ARCH_SHMOBILE || ARCH_TEGRA
 -      default 355 if ARCH_U8500
 -      default 264 if MACH_H4700
        default 512 if SOC_OMAP5
 +      default 355 if ARCH_U8500
        default 288 if ARCH_VT8500 || ARCH_SUNXI
 +      default 264 if MACH_H4700
        default 0
        help
          Maximum number of GPIOs in the system.
@@@ -1783,9 -1888,8 +1784,9 @@@ config XEN_DOM
  
  config XEN
        bool "Xen guest support on ARM (EXPERIMENTAL)"
 -      depends on ARM && OF
 +      depends on ARM && AEABI && OF
        depends on CPU_V7 && !CPU_V6
 +      depends on !GENERIC_ATOMIC64
        help
          Say Y if you want to run Linux in a Virtual Machine on Xen on ARM.
  
index 3d3f64d2111a33fb415979c2a1b911c2f7b37a66,8adaa3576c355163852460d9be0d0f0064aed6bc..fc7febc2b386ade8311ff18b11a6e938ebacd885
                compatible = "arm,cortex-a9-twd-timer";
                reg = <0x50040600 0x20>;
                interrupts = <1 13 0x304>;
 +              clocks = <&tegra_car 132>;
        };
  
        intc: interrupt-controller {
                              0 1 0x04
                              0 41 0x04
                              0 42 0x04>;
+               clocks = <&tegra_car 5>;
        };
  
        tegra_car: clock {
                compatible = "nvidia,tegra20-rtc";
                reg = <0x7000e000 0x100>;
                interrupts = <0 2 0x04>;
+               clocks = <&tegra_car 4>;
        };
  
        i2c@7000c000 {
  
        spi@7000d800 {
                compatible = "nvidia,tegra20-slink";
 -              reg = <0x7000d480 0x200>;
 +              reg = <0x7000d800 0x200>;
                interrupts = <0 83 0x04>;
                nvidia,dma-request-selector = <&apbdma 17>;
                #address-cells = <1>;
        pmc {
                compatible = "nvidia,tegra20-pmc";
                reg = <0x7000e400 0x400>;
+               clocks = <&tegra_car 110>, <&clk32k_in>;
+               clock-names = "pclk", "clk32k_in";
        };
  
        memory-controller@7000f000 {
index dbf46c27256255fd35ffaf6501a314f50668af3c,94013404808a4304de7daa345315dfe9da4b9387..9fe7a92b4c8508e4925abf76205b08202d02e07f
                compatible = "arm,cortex-a9-twd-timer";
                reg = <0x50040600 0x20>;
                interrupts = <1 13 0xf04>;
 +              clocks = <&tegra_car 214>;
        };
  
        intc: interrupt-controller {
                              0 42 0x04
                              0 121 0x04
                              0 122 0x04>;
+               clocks = <&tegra_car 5>;
        };
  
        tegra_car: clock {
                compatible = "nvidia,tegra30-rtc", "nvidia,tegra20-rtc";
                reg = <0x7000e000 0x100>;
                interrupts = <0 2 0x04>;
+               clocks = <&tegra_car 4>;
        };
  
        i2c@7000c000 {
  
        spi@7000d800 {
                compatible = "nvidia,tegra30-slink", "nvidia,tegra20-slink";
 -              reg = <0x7000d480 0x200>;
 +              reg = <0x7000d800 0x200>;
                interrupts = <0 83 0x04>;
                nvidia,dma-request-selector = <&apbdma 17>;
                #address-cells = <1>;
        };
  
        pmc {
-               compatible = "nvidia,tegra20-pmc", "nvidia,tegra30-pmc";
+               compatible = "nvidia,tegra30-pmc";
                reg = <0x7000e400 0x400>;
+               clocks = <&tegra_car 218>, <&clk32k_in>;
+               clock-names = "pclk", "clk32k_in";
        };
  
        memory-controller {
index 1e2de730536282da499d60a57397f56b7d871c5e,fa3173e3b331cc79794edc324622da51e3de233a..b92d48be4cc93dab2deb7ad561912f112fecd860
@@@ -711,8 -711,8 +711,8 @@@ static void tegra20_pll_init(void
  }
  
  static const char *cclk_parents[] = { "clk_m", "pll_c", "clk_32k", "pll_m",
-                                     "pll_p_cclk", "pll_p_out4_cclk",
-                                     "pll_p_out3_cclk", "clk_d", "pll_x" };
+                                     "pll_p", "pll_p_out4",
+                                     "pll_p_out3", "clk_d", "pll_x" };
  static const char *sclk_parents[] = { "clk_m", "pll_c_out1", "pll_p_out4",
                                      "pll_p_out3", "pll_p_out2", "clk_d",
                                      "clk_32k", "pll_m_out1" };
@@@ -721,38 -721,6 +721,6 @@@ static void tegra20_super_clk_init(void
  {
        struct clk *clk;
  
-       /*
-        * DIV_U71 dividers for CCLK, these dividers are used only
-        * if parent clock is fixed rate.
-        */
-       /*
-        * Clock input to cclk divided from pll_p using
-        * U71 divider of cclk.
-        */
-       clk = tegra_clk_register_divider("pll_p_cclk", "pll_p",
-                               clk_base + SUPER_CCLK_DIVIDER, 0,
-                               TEGRA_DIVIDER_INT, 16, 8, 1, NULL);
-       clk_register_clkdev(clk, "pll_p_cclk", NULL);
-       /*
-        * Clock input to cclk divided from pll_p_out3 using
-        * U71 divider of cclk.
-        */
-       clk = tegra_clk_register_divider("pll_p_out3_cclk", "pll_p_out3",
-                               clk_base + SUPER_CCLK_DIVIDER, 0,
-                               TEGRA_DIVIDER_INT, 16, 8, 1, NULL);
-       clk_register_clkdev(clk, "pll_p_out3_cclk", NULL);
-       /*
-        * Clock input to cclk divided from pll_p_out4 using
-        * U71 divider of cclk.
-        */
-       clk = tegra_clk_register_divider("pll_p_out4_cclk", "pll_p_out4",
-                               clk_base + SUPER_CCLK_DIVIDER, 0,
-                               TEGRA_DIVIDER_INT, 16, 8, 1, NULL);
-       clk_register_clkdev(clk, "pll_p_out4_cclk", NULL);
        /* CCLK */
        clk = tegra_clk_register_super_mux("cclk", cclk_parents,
                              ARRAY_SIZE(cclk_parents), CLK_SET_RATE_PARENT,
@@@ -1292,6 -1260,7 +1260,6 @@@ static struct tegra_clk_duplicate tegra
        TEGRA_CLK_DUPLICATE(usbd,   "tegra-ehci.0", NULL),
        TEGRA_CLK_DUPLICATE(usbd,   "tegra-otg",    NULL),
        TEGRA_CLK_DUPLICATE(cclk,   NULL,           "cpu"),
 -      TEGRA_CLK_DUPLICATE(twd,    "smp_twd",      NULL),
        TEGRA_CLK_DUPLICATE(clk_max, NULL, NULL), /* Must be the last entry */
  };
  
index 2e4d8a666c36d6ee40db523408f34a8b5927bebf,bc4b8ad78aea3273c3d5805da722c02a51221da8..ae877b021b54449219cef0d1f3e43fe442c54bca
@@@ -154,12 -154,29 +154,12 @@@ static struct irqaction tegra_timer_ir
        .dev_id         = &tegra_clockevent,
  };
  
 -static const struct of_device_id timer_match[] __initconst = {
 -      { .compatible = "nvidia,tegra20-timer" },
 -      {}
 -};
 -
 -static const struct of_device_id rtc_match[] __initconst = {
 -      { .compatible = "nvidia,tegra20-rtc" },
 -      {}
 -};
 -
 -static void __init tegra20_init_timer(void)
 +static void __init tegra20_init_timer(struct device_node *np)
  {
 -      struct device_node *np;
        struct clk *clk;
        unsigned long rate;
        int ret;
  
 -      np = of_find_matching_node(NULL, timer_match);
 -      if (!np) {
 -              pr_err("Failed to find timer DT node\n");
 -              BUG();
 -      }
 -
        timer_reg_base = of_iomap(np, 0);
        if (!timer_reg_base) {
                pr_err("Can't map timer registers\n");
                BUG();
        }
  
-       clk = clk_get_sys("timer", NULL);
+       clk = of_clk_get(np, 0);
        if (IS_ERR(clk)) {
                pr_warn("Unable to get timer clock. Assuming 12Mhz input clock.\n");
                rate = 12000000;
  
        of_node_put(np);
  
 -      np = of_find_matching_node(NULL, rtc_match);
 -      if (!np) {
 -              pr_err("Failed to find RTC DT node\n");
 -              BUG();
 -      }
 -
 -      rtc_base = of_iomap(np, 0);
 -      if (!rtc_base) {
 -              pr_err("Can't map RTC registers");
 -              BUG();
 -      }
 -
 -      /*
 -       * rtc registers are used by read_persistent_clock, keep the rtc clock
 -       * enabled
 -       */
 -      clk = of_clk_get(np, 0);
 -      if (IS_ERR(clk))
 -              pr_warn("Unable to get rtc-tegra clock\n");
 -      else
 -              clk_prepare_enable(clk);
 -
 -      of_node_put(np);
 -
        switch (rate) {
        case 12000000:
                timer_writel(0x000b, TIMERUS_USEC_CFG);
        tegra_clockevent.irq = tegra_timer_irq.irq;
        clockevents_config_and_register(&tegra_clockevent, 1000000,
                                        0x1, 0x1fffffff);
 -#ifdef CONFIG_HAVE_ARM_TWD
 -      twd_local_timer_of_register();
 -#endif
 +}
 +CLOCKSOURCE_OF_DECLARE(tegra20_timer, "nvidia,tegra20-timer", tegra20_init_timer);
 +
 +static void __init tegra20_init_rtc(struct device_node *np)
 +{
 +      struct clk *clk;
 +
 +      rtc_base = of_iomap(np, 0);
 +      if (!rtc_base) {
 +              pr_err("Can't map RTC registers");
 +              BUG();
 +      }
 +
 +      /*
 +       * rtc registers are used by read_persistent_clock, keep the rtc clock
 +       * enabled
 +       */
-       clk = clk_get_sys("rtc-tegra", NULL);
++      clk = of_clk_get(np, 0);
 +      if (IS_ERR(clk))
 +              pr_warn("Unable to get rtc-tegra clock\n");
 +      else
 +              clk_prepare_enable(clk);
 +
 +      of_node_put(np);
 +
        register_persistent_clock(NULL, tegra_read_persistent_clock);
  }
 -CLOCKSOURCE_OF_DECLARE(tegra20, "nvidia,tegra20-timer", tegra20_init_timer);
 +CLOCKSOURCE_OF_DECLARE(tegra20_rtc, "nvidia,tegra20-rtc", tegra20_init_rtc);
  
  #ifdef CONFIG_PM
  static u32 usec_config;