Merge tag 'devicetree-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/robh...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 14 Jan 2016 19:13:28 +0000 (11:13 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 14 Jan 2016 19:13:28 +0000 (11:13 -0800)
Pull DeviceTree updates from Rob Herring:

 - Rework and export the changeset API to make it available to users
   other than DT overlays

 - ARM secure devices binding

 - OCTEON USB binding

 - Clean-up of various SRAM binding docs

 - Various other binding doc updates

* tag 'devicetree-for-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (21 commits)
  drivers/of: Export OF changeset functions
  Fix documentation for adp1653 DT
  ARM: psci: Fix indentation in DT bindings
  of/platform: export of_default_bus_match_table
  of/unittest: Show broken behaviour in the platform bus
  of: fix declaration of of_io_request_and_map
  of/address: replace printk(KERN_ERR ...) with pr_err(...)
  of/irq: optimize device node matching loop in of_irq_init()
  dt-bindings: tda998x: Document the required 'port' node.
  net/macb: bindings doc: Merge cdns-emac to macb
  dt-bindings: Misc fix for the ATH79 DDR controllers
  dt-bindings: Misc fix for the ATH79 MISC interrupt controllers
  Documentation: dt: Add bindings for Secure-only devices
  dt-bindings: ARM: add arm,cortex-a72 compatible string
  ASoC: Atmel: ClassD: add GCK's parent clock in DT binding
  DT: add Olimex to vendor prefixes
  Documentation: fsl-quadspi: Add fsl,ls1021-qspi compatible string
  Documentation/devicetree: document OCTEON USB bindings
  usb: misc: usb3503: Describe better how to bind clock to the hub
  dt-bindings: Consolidate SRAM bindings from all vendors
  ...

1  2 
Documentation/devicetree/bindings/arm/cpus.txt
Documentation/devicetree/bindings/net/macb.txt
drivers/of/address.c
drivers/of/irq.c

@@@ -157,6 -157,7 +157,7 @@@ nodes to be present and contain the pro
                            "arm,cortex-a17"
                            "arm,cortex-a53"
                            "arm,cortex-a57"
+                           "arm,cortex-a72"
                            "arm,cortex-m0"
                            "arm,cortex-m0+"
                            "arm,cortex-m1"
                Definition: Specifies the syscon node controlling the cpu core
                            power domains.
  
 +      - dynamic-power-coefficient
 +              Usage: optional
 +              Value type: <prop-encoded-array>
 +              Definition: A u32 value that represents the running time dynamic
 +                          power coefficient in units of mW/MHz/uVolt^2. The
 +                          coefficient can either be calculated from power
 +                          measurements or derived by analysis.
 +
 +                          The dynamic power consumption of the CPU  is
 +                          proportional to the square of the Voltage (V) and
 +                          the clock frequency (f). The coefficient is used to
 +                          calculate the dynamic power as below -
 +
 +                          Pdyn = dynamic-power-coefficient * V^2 * f
 +
 +                          where voltage is in uV, frequency is in MHz.
 +
  Example 1 (dual-cluster big.LITTLE system 32-bit):
  
        cpus {
@@@ -2,16 -2,18 +2,19 @@@
  
  Required properties:
  - compatible: Should be "cdns,[<chip>-]{macb|gem}"
+   Use "cdns,at91rm9200-emac" Atmel at91rm9200 SoC.
    Use "cdns,at91sam9260-macb" for Atmel at91sam9 SoCs or the 10/100Mbit IP
    available on sama5d3 SoCs.
 +  Use "cdns,np4-macb" for NP4 SoC devices.
    Use "cdns,at32ap7000-macb" for other 10/100 usage or use the generic form: "cdns,macb".
    Use "cdns,pc302-gem" for Picochip picoXcell pc302 and later devices based on
    the Cadence GEM, or the generic form: "cdns,gem".
    Use "atmel,sama5d2-gem" for the GEM IP (10/100) available on Atmel sama5d2 SoCs.
    Use "atmel,sama5d3-gem" for the Gigabit IP available on Atmel sama5d3 SoCs.
    Use "atmel,sama5d4-gem" for the GEM IP (10/100) available on Atmel sama5d4 SoCs.
+   Use "cdns,zynq-gem" Xilinx Zynq-7xxx SoC.
    Use "cdns,zynqmp-gem" for Zynq Ultrascale+ MPSoC.
+   Or the generic form: "cdns,emac".
  - reg: Address and length of the register set for the device
  - interrupts: Should contain macb interrupt
  - phy-mode: See ethernet.txt file in the same directory.
@@@ -20,9 -22,6 +23,9 @@@
        Optional elements: 'tx_clk'
  - clocks: Phandles to input clocks.
  
 +Optional properties for PHY child node:
 +- reset-gpios : Should specify the gpio for phy reset
 +
  Examples:
  
        macb0: ethernet@fffc4000 {
@@@ -33,8 -32,4 +36,8 @@@
                local-mac-address = [3a 0e 03 04 05 06];
                clock-names = "pclk", "hclk", "tx_clk";
                clocks = <&clkc 30>, <&clkc 30>, <&clkc 13>;
 +              ethernet-phy@1 {
 +                      reg = <0x1>;
 +                      reset-gpios = <&pioE 6 1>;
 +              };
        };
diff --combined drivers/of/address.c
@@@ -485,10 -485,9 +485,10 @@@ static int of_translate_one(struct devi
        int rone;
        u64 offset = OF_BAD_ADDR;
  
 -      /* Normally, an absence of a "ranges" property means we are
 +      /*
 +       * Normally, an absence of a "ranges" property means we are
         * crossing a non-translatable boundary, and thus the addresses
 -       * below the current not cannot be converted to CPU physical ones.
 +       * below the current cannot be converted to CPU physical ones.
         * Unfortunately, while this is very clear in the spec, it's not
         * what Apple understood, and they do have things like /uni-n or
         * /ht nodes with no "ranges" property and a lot of perfectly
@@@ -597,7 -596,7 +597,7 @@@ static u64 __of_translate_address(struc
                pbus = of_match_bus(parent);
                pbus->count_cells(dev, &pna, &pns);
                if (!OF_CHECK_COUNTS(pna, pns)) {
-                       printk(KERN_ERR "prom_parse: Bad cell count for %s\n",
+                       pr_err("prom_parse: Bad cell count for %s\n",
                               of_node_full_name(dev));
                        break;
                }
diff --combined drivers/of/irq.c
@@@ -53,7 -53,7 +53,7 @@@ EXPORT_SYMBOL_GPL(irq_of_parse_and_map)
   * Returns a pointer to the interrupt parent node, or NULL if the interrupt
   * parent could not be determined.
   */
 -static struct device_node *of_irq_find_parent(struct device_node *child)
 +struct device_node *of_irq_find_parent(struct device_node *child)
  {
        struct device_node *p;
        const __be32 *parp;
@@@ -77,7 -77,6 +77,7 @@@
  
        return p;
  }
 +EXPORT_SYMBOL_GPL(of_irq_find_parent);
  
  /**
   * of_irq_parse_raw - Low level interrupt tree parsing
@@@ -473,6 -472,7 +473,7 @@@ EXPORT_SYMBOL_GPL(of_irq_to_resource_ta
  
  struct of_intc_desc {
        struct list_head        list;
+       of_irq_init_cb_t        irq_init_cb;
        struct device_node      *dev;
        struct device_node      *interrupt_parent;
  };
   */
  void __init of_irq_init(const struct of_device_id *matches)
  {
+       const struct of_device_id *match;
        struct device_node *np, *parent = NULL;
        struct of_intc_desc *desc, *temp_desc;
        struct list_head intc_desc_list, intc_parent_list;
        INIT_LIST_HEAD(&intc_desc_list);
        INIT_LIST_HEAD(&intc_parent_list);
  
-       for_each_matching_node(np, matches) {
+       for_each_matching_node_and_match(np, matches, &match) {
                if (!of_find_property(np, "interrupt-controller", NULL) ||
                                !of_device_is_available(np))
                        continue;
+               if (WARN(!match->data, "of_irq_init: no init function for %s\n",
+                        match->compatible))
+                       continue;
                /*
                 * Here, we allocate and populate an of_intc_desc with the node
                 * pointer, interrupt-parent device_node etc.
                        goto err;
                }
  
+               desc->irq_init_cb = match->data;
                desc->dev = of_node_get(np);
                desc->interrupt_parent = of_irq_find_parent(np);
                if (desc->interrupt_parent == np)
                 * The assumption is that NULL parent means a root controller.
                 */
                list_for_each_entry_safe(desc, temp_desc, &intc_desc_list, list) {
-                       const struct of_device_id *match;
                        int ret;
-                       of_irq_init_cb_t irq_init_cb;
  
                        if (desc->interrupt_parent != parent)
                                continue;
  
                        list_del(&desc->list);
-                       match = of_match_node(matches, desc->dev);
-                       if (WARN(!match->data,
-                           "of_irq_init: no init function for %s\n",
-                           match->compatible)) {
-                               kfree(desc);
-                               continue;
-                       }
  
-                       pr_debug("of_irq_init: init %s @ %p, parent %p\n",
-                                match->compatible,
+                       pr_debug("of_irq_init: init %s (%p), parent %p\n",
+                                desc->dev->full_name,
                                 desc->dev, desc->interrupt_parent);
-                       irq_init_cb = (of_irq_init_cb_t)match->data;
-                       ret = irq_init_cb(desc->dev, desc->interrupt_parent);
+                       ret = desc->irq_init_cb(desc->dev,
+                                               desc->interrupt_parent);
                        if (ret) {
                                kfree(desc);
                                continue;