1. 16 6月, 2012 1 次提交
    • G
      devicetree: add helper inline for retrieving a node's full name · efd68e72
      Grant Likely 提交于
      The pattern (np ? np->full_name : "<none>") is rather common in the
      kernel, but can also make for quite long lines.  This patch adds a new
      inline function, of_node_full_name() so that the test for a valid node
      pointer doesn't need to be open coded at all call sites.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      efd68e72
  2. 02 5月, 2012 1 次提交
  3. 18 4月, 2012 1 次提交
    • S
      dt: add property iteration helpers · c541adc6
      Stephen Warren 提交于
      This patch adds macros of_property_for_each_u32() and
      of_property_for_each_string(), which iterate over an array of values
      within a device-tree property. Usage is for example:
      
      struct property *prop;
      const __be32 *p;
      u32 u;
      of_property_for_each_u32(np, "propname", prop, p, u)
      	printk("U32 value: %x\n", u);
      
      struct property *prop;
      const char *s;
      of_property_for_each_string(np, "propname", prop, s)
      	printk("String value: %s\n", s);
      
      Based on work by Rob Herring <robherring2@gmail.com>
      
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Acked-by: NRob Herring <rob.herring@calxeda.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      c541adc6
  4. 28 3月, 2012 1 次提交
  5. 15 3月, 2012 1 次提交
  6. 09 3月, 2012 1 次提交
    • G
      powerpc/eeh: Introduce EEH device · eb740b5f
      Gavin Shan 提交于
      Original EEH implementation depends on struct pci_dn heavily. However,
      EEH shouldn't depend on that actually because EEH needn't share much
      information with other PCI components. That's to say, EEH should have
      worked independently.
      
      The patch introduces struct eeh_dev so that EEH core components needn't
      be working based on struct pci_dn in future. Also, struct pci_dn, struct
      eeh_dev instances are created in dynamic fasion and the binding with EEH
      device, OF node, PCI device is implemented as well.
      
      The EEH devices are created after PHBs are detected and initialized, but
      PCI emunation hasn't started yet. Apart from that, PHB might be created
      dynamically through DLPAR component and the EEH devices should be creatd
      as well. Another case might be OF node is created dynamically by DR
      (Dynamic Reconfiguration), which has been defined by PAPR. For those OF
      nodes created by DR, EEH devices should be also created accordingly. The
      binding between EEH device and OF node is done while the EEH device is
      initially created.
      
      The binding between EEH device and PCI device should be done after PCI
      emunation is done. Besides, PCI hotplug also needs the binding so that
      the EEH devices could be traced from the newly coming PCI buses or PCI
      devices.
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      eb740b5f
  7. 22 2月, 2012 1 次提交
  8. 16 2月, 2012 1 次提交
  9. 29 1月, 2012 1 次提交
  10. 28 12月, 2011 2 次提交
  11. 13 12月, 2011 1 次提交
    • G
      of: create of_phandle_args to simplify return of phandle parsing data · 15c9a0ac
      Grant Likely 提交于
      of_parse_phandle_with_args() needs to return quite a bit of data.  Rather
      than making each datum a separate **out_ argument, this patch creates
      struct of_phandle_args to contain all the returned data and reworks the
      user of the function.  This patch also enables of_parse_phandle_with_args()
      to return the device node pointer for the phandle node.
      
      This patch also ends up being fairly major surgery to
      of_parse_handle_with_args().  The existing structure didn't work well
      when extending to use of_phandle_args, and I discovered bugs during testing.
      I also took the opportunity to rename the function to be like the
      existing of_parse_phandle().
      
      v2: - moved declaration of of_phandle_args to fix compile on non-DT builds
          - fixed incorrect index in example usage
          - fixed incorrect return code handling for empty entries
      Reviewed-by: NShawn Guo <shawn.guo@freescale.com>
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      15c9a0ac
  12. 04 11月, 2011 1 次提交
  13. 01 11月, 2011 1 次提交
  14. 29 10月, 2011 2 次提交
  15. 24 10月, 2011 1 次提交
  16. 14 10月, 2011 1 次提交
  17. 05 10月, 2011 2 次提交
  18. 30 9月, 2011 1 次提交
  19. 23 9月, 2011 2 次提交
  20. 10 8月, 2011 1 次提交
  21. 04 8月, 2011 1 次提交
  22. 03 8月, 2011 1 次提交
  23. 02 8月, 2011 1 次提交
  24. 09 7月, 2011 1 次提交
  25. 07 7月, 2011 1 次提交
  26. 04 7月, 2011 1 次提交
  27. 01 7月, 2011 1 次提交
  28. 28 2月, 2011 1 次提交
  29. 24 2月, 2011 1 次提交
    • S
      rtc: cmos: Add OF bindings · 3bcbaf6e
      Sebastian Andrzej Siewior 提交于
      This allows to load the OF driver based informations from the device
      tree. Systems without BIOS may need to perform some initialization.
      PowerPC creates a PNP device from the OF information and performs this
      kind of initialization in their private PCI quirk. This looks more
      generic.
      
      This patch also avoids registering the platform RTC driver on X86 if
      we have a device tree blob. Otherwise we would setup the device based
      on the hardcoded information in arch/x86 rather than the device tree
      based one.
      
      [ tglx: Changed "int of_have_populated_dt()" to bool as recommended by
              Grant ]
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NDirk Brandewie <dirk.brandewie@gmail.com>
      Acked-by: NGrant Likely <grant.likely@secretlab.ca>
      Cc: sodaville@linutronix.de
      Cc: devicetree-discuss@lists.ozlabs.org
      Cc: rtc-linux@googlegroups.com
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      LKML-Reference: <1298405266-1624-12-git-send-email-bigeasy@linutronix.de>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      3bcbaf6e
  30. 22 1月, 2011 1 次提交
  31. 30 7月, 2010 1 次提交
  32. 15 7月, 2010 1 次提交
  33. 18 3月, 2010 1 次提交
    • G
      of: Fix comparison of "compatible" properties · 1976152f
      Grant Likely 提交于
      Commit 7c7b60cb
      "of: put default string compare and #a/s-cell values into common header"
      
      Breaks various things on powerpc due to using strncasecmp instead of
      strcasecmp for comparing against "compatible" strings.
      
      This causes things like the 4xx PCI code to fail miserably due to the
      partial matches in code like this:
      
             for_each_compatible_node(np, NULL, "ibm,plb-pcix")
                     ppc4xx_probe_pcix_bridge(np);
             for_each_compatible_node(np, NULL, "ibm,plb-pci")
                     ppc4xx_probe_pci_bridge(np);
      
      It's not quite right to do partial name match. Entries in a compatible
      list are meant to be matched whole. If a device is compatible with both
      "foo" and "foo1", then the device should have both strings in its
      "compatible" property.
      
      This patch reverts powerpc and microblaze us to use strcasecmp.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
            (for patch description)
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Acked-by: NMichal Simek <michal.simek@petalogix.com>
      1976152f
  34. 15 2月, 2010 1 次提交
  35. 14 2月, 2010 2 次提交