- 13 12月, 2011 2 次提交
-
-
由 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>
-
由 Grant Likely 提交于
This patch adds a kernel message, containing GPIO range and device name on successful device registration, and removes duplicate messages from the following drivers: * gpio-adp5588 * gpio-bt8xx * gpio-cs5535 * gpio-janz-ttl * gpio-nomadik * gpio-pcf857x * gpio-xilinx * drivers/of/gpio.c Signed-off-by: NHartmut Knaack <knaack.h@gmx.de> [grant.likely@secretlab.ca: squashed 2 patches together] Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 08 12月, 2011 1 次提交
-
-
由 Anton Vorontsov 提交于
PPC32/64 defines NO_IRQ to zero, so no problems expected. ARM defines NO_IRQ to -1, but OF code relies on IRQ domains support, which returns correct ('0') value in 'no irq' case. So everything should be fine. Other arches might break if some of their OF drivers rely on NO_IRQ being not 0. If so, the drivers must be fixed, finally. [ Rob Herring points out that microblaze should be fixed, and has posted a patch for testing for that. - Linus ] Signed-off-by: NAnton Vorontsov <anton.vorontsov@linaro.org> Acked-by: NWolfram Sang <w.sang@pengutronix.de> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 29 11月, 2011 1 次提交
-
-
由 Rob Herring 提交于
With the revert of "of/irq: of_irq_find_parent: check for parent equal to child" (dc937280), we need another way to handle parent node equal to the child node. This can simply be handled in of_irq_init by checking for this condition. Signed-off-by: NRob Herring <rob.herring@calxeda.com> Tested-by: NPawel Moll <pawel.moll@arm.com> Tested-by: NStephen Warren <swarren@nvidia.com>
-
- 23 11月, 2011 1 次提交
-
-
由 Linus Torvalds 提交于
This reverts commit dc937280. As requested by Ben Herrenschmidt: "This breaks some powerpc platforms at least. The practice of having a node provide an explicit "interrupt-parent" property pointing to itself is an old trick that we've used in the past to allow a device-node to have interrupts routed to different controllers. In that case, the node also contains an interrupt-map, so the node is its own parent, the interrupt resolution hits the map, which then can route each individual interrupt to a different parent." Grant says: "Ah, nuts, yes that is broken then. Yes, please revert the commit and Rob & I will come up with a better solution. Rob, I think it can be done by explicitly checking for np == desc->interrupt_parent in of_irq_init() instead of relying on of_irq_find_parent() returning NULL." Requested-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: NGrant Likely <grant.likely@secretlab.ca> Cc: Rob Herring <rob.herring@calxeda.com> Cc: devicetree-discuss@lists.ozlabs.org Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org> Cc: Tanmay Inamdar <tinamdar@apm.com> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
- 04 11月, 2011 1 次提交
-
-
由 Olof Johansson 提交于
* Correct description of of_platform_bus_create to match implementation * Remove a level of indentation in of_dev_lookup Signed-off-by: NOlof Johansson <olof@lixom.net> Acked-by: NGrant Likely <grant.likely@secretlab.ca> Signed-off-by: NRob Herring <rob.herring@calxeda.com>
-
- 01 11月, 2011 3 次提交
-
-
由 Paul Gortmaker 提交于
For files that were getting these macros via the implicit presence of module.h being everywhere. With contributions from Stephen Rothwell <sfr@canb.auug.org.au>. Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
-
由 Paul Gortmaker 提交于
This file really needs the full module.h header file present, but was just getting it implicitly before. Fix it up in advance so we avoid build failures once the cleanup commit is present. Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
-
由 Paul Gortmaker 提交于
It was getting it implicitly before, since module.h was pulled in via device.h -- but that is something we are going to make go away soon. Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
-
- 31 10月, 2011 1 次提交
-
-
由 Rob Herring 提交于
of_irq_init will scan the devicetree for matching interrupt controller nodes. Then it calls an initialization function for each found controller in the proper order with parent nodes initialized before child nodes. Based on initial pseudo code from Grant Likely. Changes in v4: - Drop unnecessary empty list check - Be more verbose on errors - Simplify "if (!desc) WARN_ON(1)" to "if (WARN_ON(!desc))" Changes in v3: - add missing kfree's found by Jamie - Implement Grant's comments to simplify the init loop - fix function comments Changes in v2: - Complete re-write of list searching code from Grant Likely Signed-off-by: NRob Herring <rob.herring@calxeda.com> Reviewed-by: NJamie Iles <jamie@jamieiles.com> Tested-by: NThomas Abraham <thomas.abraham@linaro.org> Acked-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 25 10月, 2011 1 次提交
-
-
由 Kyle Moffett 提交于
The "phy_device_register()" call 5 lines down already calls phy_scan_fixups(), there's no need to do it a second time. Signed-off-by: NKyle Moffett <Kyle.D.Moffett@boeing.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 05 10月, 2011 3 次提交
-
-
由 Rob Herring 提交于
An interrupt controller may often implicitly inherit itself from a parent node when in fact the controller is the interrupt root controller. Guard against the case of child == parent and return NULL in this case. This can also be fixed by adding an explicit "interrupt-parent;" to a root interrupt controller node. Based on code from Grant Likely. Signed-off-by: NRob Herring <rob.herring@calxeda.com> Cc: Grant Likely <grant.likely@secretlab.ca>
-
由 Jamie Iles 提交于
Add a helper similar to of_property_read_u32() that handles 64-bit integers. v2/v3: constify device node and property name parameters. Cc: Grant Likely <grant.likely@secretlab.ca> Reviewed-by: NRob Herring <rob.herring@calxeda.com> Signed-off-by: NJamie Iles <jamie@jamieiles.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Benoit Cousson 提交于
Add of_property_read_string_index and of_property_count_strings to retrieve one string inside a property that will contains severals strings. Signed-off-by: NBenoit Cousson <b-cousson@ti.com> Acked-by: NGrant Likely <grant.likely@secretlab.ca> Signed-off-by: NKevin Hilman <khilman@ti.com>
-
- 23 9月, 2011 1 次提交
-
-
由 Shawn Guo 提交于
The patch adds function of_alias_scan to populate a global lookup table with the properties of 'aliases' node and function of_alias_get_id for drivers to find alias id from the lookup table. v3: Split out automatic addition of aliases on id lookup so that it can be debated separately from the core functionality. v2: - Add of_chosen/of_aliases populating and of_alias_scan() invocation for OF_PROMTREE. - Add locking - rework parse loop Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Acked-by: NDavid S. Miller <davem@davemloft.net> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 20 9月, 2011 1 次提交
-
-
由 Benjamin Herrenschmidt 提交于
We used to overwrite with CONFIG_CMDLINE if we found a chosen node but failed to get bootargs out of it or they were empty, unless CONFIG_CMDLINE_FORCE is set. Instead change that to overwrite if "data" is non empty after the bootargs check. It allows arch code to have other mechanisms to retrieve the command line prior to parsing the device-tree. Note: CONFIG_CMDLINE_FORCE case should ideally be handled elsewhere as it won't work as it-is if the device-tree has no /chosen node Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> CC: devicetree-discuss@lists-ozlabs.org CC: Grant Likely <grant.likely@secretlab.ca> Acked-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 04 8月, 2011 1 次提交
-
-
由 Grant Likely 提交于
This reverts commit 750f463a. of_alias_* still needs work to be generalized for 'promtree' dt platforms, and to no implicitly create entries for available ids. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 03 8月, 2011 1 次提交
-
-
由 Shawn Guo 提交于
The patch adds function of_alias_scan to populate a global lookup table with the properties of 'aliases' node and function of_alias_get_id for drivers to find alias id from the lookup table. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> [grant.likely: add locking and rework parse loop] Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 02 8月, 2011 1 次提交
-
-
由 Jamie Iles 提交于
The helper functions for reading u32 integers, u32 arrays and strings should have the property name as a const pointer. Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: NJamie Iles <jamie@jamieiles.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 01 8月, 2011 1 次提交
-
-
由 Felipe Balbi 提交于
that should be the approved way of calculating the size of resources. No functional changes. Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: NFelipe Balbi <balbi@ti.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 29 7月, 2011 1 次提交
-
-
由 Jamie Iles 提交于
Allow GPIO drivers to use of_gpio_simple_xlate. This is useful for the generic GPIO driver for example where gpio_chip is embedded in bgpio_chip and doesn't need of_mm_gpio_chip but has a simple 1:1 GPIO mapping. Cc: Anton Vorontsov <avorontsov@ru.mvista.com> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: NJamie Iles <jamie@jamieiles.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 27 7月, 2011 2 次提交
-
-
由 Shawn Guo 提交于
The patch extends 'enum phy_interface_t' and of_get_phy_mode a little bit with PHY_INTERFACE_MODE_NA and PHY_INTERFACE_MODE_SMII added, and then converts ibm_newemac net driver to use of_get_phy_mode getting phy mode from device tree. It also resolves the namespace conflict on phy_read/write between common mdiobus interface and ibm_newemac private one. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Cc: David S. Miller <davem@davemloft.net> Cc: Grant Likely <grant.likely@secretlab.ca> Acked-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NDavid Miller <davem@davemloft.net>
-
由 Shawn Guo 提交于
It adds the helper function of_get_phy_mode getting phy interface from device tree. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Cc: Grant Likely <grant.likely@secretlab.ca> Acked-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NDavid Miller <davem@davemloft.net>
-
- 24 7月, 2011 1 次提交
-
-
由 Grant Likely 提交于
of_pci.c references symbols from linux/of.h. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 19 7月, 2011 1 次提交
-
-
由 Grant Likely 提交于
of_find_matching_node_by_address() can be used to find a device tree node for a device at a specific address. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 08 7月, 2011 1 次提交
-
-
由 Kumar Gala 提交于
We have a long standing issues with platform devices not have a valid dma_mask pointer. This hasn't been an issue to date as no platform device has tried to set its dma_mask value to a non-default value. Acked-by: NGreg Kroah-Hartman <gregkh@suse.de> Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
-
- 07 7月, 2011 1 次提交
-
-
由 Rob Herring 提交于
Rework of_property_read_u32 to read an array of values. Then of_property_read_u32 becomes an inline with array size of 1. Also make struct device_node ptr const. Signed-off-by: NRob Herring <rob.herring@calxeda.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 04 7月, 2011 1 次提交
-
-
由 Shawn Guo 提交于
The existing dt codes usually call of_get_property to get a string property and save it as a 'const char *'. The patch adds'const' for of_property_read_string parameter **out_string to make the converting of existing code a little easier. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 01 7月, 2011 1 次提交
-
-
由 Thomas Abraham 提交于
Add helper functions to retrieve unsigned integer and string property values from properties of a device node. These helper functions can be used to lookup a property in a device node, perform error checking and read the property value. [grant.likely@secretlab.ca: Proposal and initial implementation] Signed-off-by: NThomas Abraham <thomas.abraham@linaro.org> [grant.likely: some word smithing and be more defensive validating the string] Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 29 6月, 2011 1 次提交
-
-
由 John Bonesio 提交于
This patch adds a new routine, of_get_named_gpio_flags(), which takes the property name as a parameter rather than assuming "gpios". of_get_gpio_flags() is modified to call of_get_named_gpio_flags() with "gpios" as the property parameter. Signed-off-by: NJohn Bonesio <bones@secretlab.ca> [grant.likely: Tidied up whitespace and tweaked kerneldoc comments.] Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 22 6月, 2011 4 次提交
-
-
由 Grant Likely 提交于
Some platform code has specific requirements on the naming of devices. This patch allows callers of of_platform_populate() to provide a device name lookup table. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Grant Likely 提交于
Add a function to create amba_devices (i.e. primecell peripherals) from device tree nodes. The device tree scanning is done by the of_platform_populate() function which can call of_amba_device_create based on a match table entry. Nodes with a "arm,primecell-periphid" property can override the h/w peripheral id value. Based on the original work by Jeremy Kerr. Signed-off-by: NJeremy Kerr <jeremy.kerr@canonical.com> Acked-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NRob Herring <rob.herring@calxeda.com> Reviewed-by: NArnd Bergmann <arnd@arndb.de> [grant.likely: add Jeremy's original s-o-b line, changes from review comments, and moved all code to drivers/of/platform.c] Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Grant Likely 提交于
of_platform_populate() is similar to of_platform_bus_probe() except that it strictly enforces that all device nodes must have a compatible property, and it can be used to register devices (not buses) which are children of the root node. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Grant Likely 提交于
No need for most platforms to define their own bus table when calling of_platform_populate(). Supply a stock one. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 08 6月, 2011 1 次提交
-
-
由 Benjamin Herrenschmidt 提交于
powerpc has two different ways of matching PCI devices to their corresponding OF node (if any) for historical reasons. The ppc64 one does a scan looking for matching bus/dev/fn, while the ppc32 one does a scan looking only for matching dev/fn on each level in order to be agnostic to busses being renumbered (which Linux does on some platforms). This removes both and instead moves the matching code to the PCI core itself. It's the most logical place to do it: when a pci_dev is created, we know the parent and thus can do a single level scan for the matching device_node (if any). The benefit is that all archs now get the matching for free. There's one hook the arch might want to provide to match a PHB bus to its device node. A default weak implementation is provided that looks for the parent device device node, but it's not entirely reliable on powerpc for various reasons so powerpc provides its own. Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: NMichal Simek <monstr@monstr.eu> Acked-by: NJesse Barnes <jbarnes@virtuousgeek.org>
-
- 11 5月, 2011 1 次提交
-
-
由 Grant Likely 提交于
This patch drops the reference to a global 'cmd_line' variable from early_init_dt_scan_chosen, and instead passes the pointer to the command line string via the *data argument. Each architecture does something slightly different with the initial command line, so it makes sense for the architecture to be able to specify the variable name. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 20 4月, 2011 1 次提交
-
-
由 Michael Ellerman 提交于
We have platform code that needs to find a node's interrupt parent, so export of_irq_find_parent() so we can use it. Signed-off-by: NMichael Ellerman <michael@ellerman.id.au> Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 31 3月, 2011 1 次提交
-
-
由 Lucas De Marchi 提交于
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: NLucas De Marchi <lucas.demarchi@profusion.mobi>
-
- 24 3月, 2011 2 次提交
-
-
由 Andres Salomon 提交于
- static-ize some functions - add some additional comments Signed-off-by: NAndres Salomon <dilinger@queued.net> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Grant Likely 提交于
There are no users of OF_NO_DEEP_PROBE, and of_match_node() now gracefully handles being passed a NULL pointer, so the checks at the top of of_platform_bus_probe can be dropped. While at it, consolidate the root node pointer check to be easier to read and tidy up related comments. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-