]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branch 'next/soc' into for-next
authorKevin Hilman <khilman@linaro.org>
Thu, 17 Oct 2013 22:15:43 +0000 (15:15 -0700)
committerKevin Hilman <khilman@linaro.org>
Thu, 17 Oct 2013 22:16:31 +0000 (15:16 -0700)
* next/soc:
  Documentation: arm/Marvell: clarify Armada SoCs that match 78xx0 pattern
  ARM: kirkwood: retain MAC address for DT ethernet
  ARM: kirkwood: Remove unneeded PCIe clock adding
  ARM: kirkwood: Remove unneeded MBus initialization
  ARM: kirkwood: Add standby support

Signed-off-by: Kevin Hilman <khilman@linaro.org>
Conflicts:
arch/arm/mach-kirkwood/board-dt.c

1  2 
arch/arm/arm-soc-for-next-contents.txt
arch/arm/mach-kirkwood/board-dt.c

index 42f21256e0e12ca117ad10eef35a07a48c2662ea,0000000000000000000000000000000000000000..7490c9d7ec861ff820c0bae9e5d9561da2b50e36
mode 100644,000000..100644
--- /dev/null
@@@ -1,89 -1,0 +1,91 @@@
 +
 +
 +next/cleanup
 +      shark/removal
 +                git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git tags/del-shark-for-v3.13
 +      cleanup/dt-clock
 +              https://github.com/shesselba/linux-dove.git clk-of-init-v2_for-3.13
 +      patch
 +              ARM: drop explicit selection of HAVE_CLK and CLKDEV_LOOKUP
 +      reneasas/initdata-cleanup
 +              git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-fixes5-for-v3.12
 +      renesas/cleanup
 +              git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-cleanup-for-v3.13
 +      patch
 +              clk: nomadik: fix missing __init on nomadik_src_init
 +      renesas/cleanup2
 +              git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-cleanup2-for-v3.13
 +      patch
 +              ARM: clps711x: Use linux/sched_clock.h
 +              ARM: Remove temporary sched_clock.h header
 +      qcom/cleanup
 +              git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm.git tags/msm-cleanup-for-3.13
 +
 +next/soc
 +      samsung/s3c64xx-clk
 +              http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git tags/samsung-clk-s3c64xx
 +      patch
 +              ARM: davinci: remove deprecated IRQF_DISABLED
 +      renesas/soc
 +              git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-soc-for-v3.13
 +      renesas/smp
 +              git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-smp-for-v3.13
 +      renesas/soc2
 +              git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-soc2-for-v3.13
 +      keystone/soc
 +              git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone.git tags/keystone-soc-for-arm-soc
 +      patch
 +              ARM: keystone: fix PM domain initcall to be keystone only
 +      omap/hwmod
 +              git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap tags/omap-for-v3.13/hwmod-signed
 +      omap/soc
 +              git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap tags/omap-for-v3.13/soc-take2
 +      davinci/soc
 +              git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci.git tags/davinci-for-v3.13/soc-2 # rebased from -v3.12-rc5 to -rc3
 +      integrator/soc
 +              git fetch git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git tags/integrator-for-v3.13-2
++      mvebu/soc
++              git fetch git://git.infradead.org/linux-mvebu.git tags/soc-3.13-2
 +
 +next/drivers
 +      davinci/gpio
 +              git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci.git tags/davinci-for-v3.13/gpio
 +      mvebu/drivers
 +              git://git.infradead.org/linux-mvebu.git tags/drivers-3.13
 +      arm/drivers
 +              git://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git tags/arm-perf-3.13
 +      mvebu/drivers2
 +              git://git.infradead.org/linux-mvebu.git tags/drivers-3.13-2
 +
 +next/boards
 +      renesas/boards
 +              git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git renesas-boards-for-v3.13
 +      renesas/defconfig
 +              git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-defconfig-for-v3.13
 +      renesas/boards2
 +              git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-boards2-for-v3.13
 +      omap/boards
 +              git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap tags/omap-for-v3.13/board-signed
 +
 +next/dt
 +      samsung/s3c64xx-dt
 +                http://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git tags/samsung-dt-s3c64xx
 +      ux500/dt
 +              git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git tags/ux500-dt-for-v3.13-2
 +              patch "ARM: ux500: enable appended dtb in u8500_defconfig"
 +      ux500/dt2
 +              git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git tags/ux500-devicetree-2
 +      renesas/dt
 +              git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-dt-for-v3.13
 +      mvebu/dt
 +              git://git.infradead.org/linux-mvebu.git tags/dt-3.13
 +      mvebu/dt2
 +              git://git.infradead.org/linux-mvebu.git tags/dt-3.13-2
 +      renesas/dt2
 +              git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-dt2-for-v3.13
 +      socfpga/dt
 +              git://git.rocketboards.org/linux-socfpga-next.git tags/socfpga-dts-updates-for-v3.13
 +      omap/pdata-quirks               
 +              git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap tags/omap-for-v3.13/quirk-signed
 +      omap/dt
 +              git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap tags/omap-for-v3.13/dt-signed
index ce723100ac35bca7569e10b64c950e6dd623ae00,27c1877e6ddababc2826abc1840363fa78ec39e9..9caa4fe95913c672a6b874c5b8b8d573294ae857
  #include <linux/kernel.h>
  #include <linux/init.h>
  #include <linux/of.h>
+ #include <linux/of_address.h>
+ #include <linux/of_net.h>
  #include <linux/of_platform.h>
  #include <linux/clk-provider.h>
 -#include <linux/clocksource.h>
  #include <linux/dma-mapping.h>
  #include <linux/irqchip.h>
  #include <linux/kexec.h>
@@@ -65,13 -60,91 +59,85 @@@ static void __init kirkwood_legacy_clk_
        clk_prepare_enable(clk);
  }
  
- static void __init kirkwood_dt_init_early(void)
+ #define MV643XX_ETH_MAC_ADDR_LOW      0x0414
+ #define MV643XX_ETH_MAC_ADDR_HIGH     0x0418
+ static void __init kirkwood_dt_eth_fixup(void)
  {
-       mvebu_mbus_init("marvell,kirkwood-mbus",
-                       BRIDGE_WINS_BASE, BRIDGE_WINS_SZ,
-                       DDR_WINDOW_CPU_BASE, DDR_WINDOW_CPU_SZ);
+       struct device_node *np;
+       /*
+        * The ethernet interfaces forget the MAC address assigned by u-boot
+        * if the clocks are turned off. Usually, u-boot on kirkwood boards
+        * has no DT support to properly set local-mac-address property.
+        * As a workaround, we get the MAC address from mv643xx_eth registers
+        * and update the port device node if no valid MAC address is set.
+        */
+       for_each_compatible_node(np, NULL, "marvell,kirkwood-eth-port") {
+               struct device_node *pnp = of_get_parent(np);
+               struct clk *clk;
+               struct property *pmac;
+               void __iomem *io;
+               u8 *macaddr;
+               u32 reg;
+               if (!pnp)
+                       continue;
+               /* skip disabled nodes or nodes with valid MAC address*/
+               if (!of_device_is_available(pnp) || of_get_mac_address(np))
+                       goto eth_fixup_skip;
+               clk = of_clk_get(pnp, 0);
+               if (IS_ERR(clk))
+                       goto eth_fixup_skip;
+               io = of_iomap(pnp, 0);
+               if (!io)
+                       goto eth_fixup_no_map;
+               /* ensure port clock is not gated to not hang CPU */
+               clk_prepare_enable(clk);
+               /* store MAC address register contents in local-mac-address */
+               pr_err(FW_INFO "%s: local-mac-address is not set\n",
+                      np->full_name);
+               pmac = kzalloc(sizeof(*pmac) + 6, GFP_KERNEL);
+               if (!pmac)
+                       goto eth_fixup_no_mem;
+               pmac->value = pmac + 1;
+               pmac->length = 6;
+               pmac->name = kstrdup("local-mac-address", GFP_KERNEL);
+               if (!pmac->name) {
+                       kfree(pmac);
+                       goto eth_fixup_no_mem;
+               }
+               macaddr = pmac->value;
+               reg = readl(io + MV643XX_ETH_MAC_ADDR_HIGH);
+               macaddr[0] = (reg >> 24) & 0xff;
+               macaddr[1] = (reg >> 16) & 0xff;
+               macaddr[2] = (reg >> 8) & 0xff;
+               macaddr[3] = reg & 0xff;
+               reg = readl(io + MV643XX_ETH_MAC_ADDR_LOW);
+               macaddr[4] = (reg >> 8) & 0xff;
+               macaddr[5] = reg & 0xff;
+               of_update_property(np, pmac);
+ eth_fixup_no_mem:
+               iounmap(io);
+               clk_disable_unprepare(clk);
+ eth_fixup_no_map:
+               clk_put(clk);
+ eth_fixup_skip:
+               of_node_put(pnp);
+       }
  }
  
 -static void __init kirkwood_dt_time_init(void)
 -{
 -      of_clk_init(NULL);
 -      clocksource_of_init();
 -}
 -
  static void __init kirkwood_dt_init(void)
  {
        pr_info("Kirkwood: %s, TCLK=%d.\n", kirkwood_id(), kirkwood_tclk);
@@@ -113,7 -188,7 +180,6 @@@ static const char * const kirkwood_dt_b
  DT_MACHINE_START(KIRKWOOD_DT, "Marvell Kirkwood (Flattened Device Tree)")
        /* Maintainer: Jason Cooper <jason@lakedaemon.net> */
        .map_io         = kirkwood_map_io,
-       .init_early     = kirkwood_dt_init_early,
 -      .init_time      = kirkwood_dt_time_init,
        .init_machine   = kirkwood_dt_init,
        .restart        = kirkwood_restart,
        .dt_compat      = kirkwood_dt_board_compat,