- 16 6月, 2012 1 次提交
-
-
由 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>
-
- 02 5月, 2012 1 次提交
-
-
由 Dong Aisheng 提交于
Currently most code to get child count in kernel are almost same, add a helper to implement this function for dt to use. Cc: Grant Likely <grant.likely@secretlab.ca> Acked-by: NRob Herring <rob.herring@calxeda.com> Acked-by: NStephen Warren <swarren@wwwdotorg.org> Signed-off-by: NDong Aisheng <dong.aisheng@linaro.org> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
-
- 18 4月, 2012 1 次提交
-
-
由 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>
-
- 28 3月, 2012 1 次提交
-
-
由 Gavin Shan 提交于
Originally, the PCI sensitive OF node is tracing the eeh device through struct device_node->edev. However, it was regarded as bad idea. The patch removes struct device_node->edev and uses PCI_DN to trace the corresponding eeh device according to BenH's comments. Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com> Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 15 3月, 2012 1 次提交
-
-
of_property_read_bool Search for a property in a device node. Returns true if the property exist false otherwise. Signed-off-by: NJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: NRob Herring <rob.herring@calxeda.com> Acked-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 09 3月, 2012 1 次提交
-
-
由 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>
-
- 22 2月, 2012 1 次提交
-
-
由 Grant Likely 提交于
Only two architectures use the OF node reference counting and reclaim bits. There is no need to compile it for the rest of the PowerPC platforms or for any of the other architectures. This patch makes iseries and pseries select CONFIG_OF_DYNAMIC, and makes it default to off for everything else. It is still safe to turn on CONFIG_OF_DYNAMIC on all architectures, it just isn't necessary. v2: Also select OF_DYNAMIC for PPC_CHROMA and MPC885ADS as reported by Michael Meuling Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NDavid S. Miller <davem@davemloft.net> Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Jimi Xenidis <jimix@pobox.com> (for PPC_CHROMA bug fix) Cc: Rob Herring <rob.herring@calxeda.com>
-
- 16 2月, 2012 1 次提交
-
-
由 Shawn Guo 提交于
Add empty of_find_compatible_node function for !CONFIG_OF build. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 29 1月, 2012 1 次提交
-
-
由 Grant Likely 提交于
Add a helper function for finding the index of a string in a string list property. This helper is useful for bindings that use a separate *-name property for attaching names to tuples in another property such as 'reg' or 'gpios'. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 28 12月, 2011 2 次提交
-
-
由 Rob Herring 提交于
Add empty of_get_node/of_put_node functions for !CONFIG_OF builds. Signed-off-by: NRob Herring <rob.herring@calxeda.com> Acked-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Dong Aisheng 提交于
Make this macro easier to use(do not need to pass properties, a node is enough), also change to a more sensible name as for_each_child_of_node. Signed-off-by: NDong Aisheng <dong.aisheng@linaro.org> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: NRob Herring <rob.herring@calxeda.com>
-
- 13 12月, 2011 1 次提交
-
-
由 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>
-
- 04 11月, 2011 1 次提交
-
-
由 Stephen Warren 提交于
The patch adds an empty function for non-dt build, so that drivers migrating to dt can save some '#ifdef CONFIG_OF'. v3: New patch Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 01 11月, 2011 1 次提交
-
-
由 Paul Gortmaker 提交于
It shows up as a build failure on MIPS, as it is used in three of_property function stubs. include/linux/of.h:275: error: 'ENOSYS' undeclared (first use in this function) include/linux/of.h:282: error: 'ENOSYS' undeclared (first use in this function) include/linux/of.h:295: error: 'ENOSYS' undeclared (first use in this function) Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
-
- 29 10月, 2011 2 次提交
-
-
由 Nicolas Ferre 提交于
Add function of_alias_get_id() reporting -ENOSYS for non-dt builds, so that drivers migrating to dt can save some '#ifdef CONFIG_OF'. Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com> Acked-by: NRob Herring <rob.herring@calxeda.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 Kalle Valo 提交于
When compiling ath6kl for beagleboard (omap2plus_defconfig plus CONFIG_ATH6KL, CONFIG_OF disable) with current linux-next compilation fails: include/linux/of.h:269: error: 'ENOSYS' undeclared (first use in this function) include/linux/of.h:276: error: 'ENOSYS' undeclared (first use in this function) include/linux/of.h:289: error: 'ENOSYS' undeclared (first use in this function) Fix this by including errno.h from of.h. Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com> Acked-by: NGeert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 24 10月, 2011 1 次提交
-
-
由 Nicolas Ferre 提交于
Add an empty macro for of_match_node() that will save some '#ifdef CONFIG_OF' for non-dt builds. I have chosen to use a macro instead of a function to be able to avoid defining the first parameter. In fact, this "struct of_device_id *" first parameter is usualy not defined as well on non-dt builds. Signed-off-by: NNicolas Ferre <nicolas.ferre@atmel.com> Acked-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 14 10月, 2011 1 次提交
-
-
由 Rajendra Nayak 提交于
Add empty of_device_is_compatible() and of_parse_phandle() for non-dt builds to work. Signed-off-by: NRajendra Nayak <rnayak@ti.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 05 10月, 2011 2 次提交
-
-
由 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>
-
- 30 9月, 2011 1 次提交
-
-
由 Ben Dooks 提交于
Add a macro of_match_ptr() that allows the .of_match_table entry in the driver structures to be assigned without having an #ifdef xxx NULL for the case that OF is not enabled Signed-off-by: NBen Dooks <ben-linux@fluff.org> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 23 9月, 2011 2 次提交
-
-
由 Stephen Warren 提交于
The patch adds a couple empty functions for non-dt build, so that drivers migrating to dt can save some '#ifdef CONFIG_OF'. Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
由 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>
-
- 10 8月, 2011 1 次提交
-
-
由 Stephen Warren 提交于
The patch adds empty function of_get_property for non-dt build, so that drivers migrating to dt can save some '#ifdef CONFIG_OF'. This also fixes the current Tegra compile problem in linux-next. Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-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>
-
- 09 7月, 2011 1 次提交
-
-
由 Shawn Guo 提交于
The patch adds empty functions of_property_read_u32 and of_property_read_u32_array for non-dt build, so that drivers migrating to dt can save some '#ifdef CONFIG_OF'. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> [grant.likely: Moved things around so only one new static inline is needed] [grant.likely: Added _string variant] Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 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>
-
- 28 2月, 2011 1 次提交
-
-
由 Lennert Buytenhek 提交于
Signed-off-by: NLennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 24 2月, 2011 1 次提交
-
-
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>
-
- 22 1月, 2011 1 次提交
-
-
由 Grant Likely 提交于
Having conditional around the of_match_table and the of_node pointers turns out to make driver code use ugly #ifdef blocks. Drop the conditionals and remove the #ifdef blocks from the affected drivers. Also tidy up minor whitespace issues within the same hunks. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
- 30 7月, 2010 1 次提交
-
-
由 Grant Likely 提交于
of_node_to_nid() is only relevant in a few architectures. Don't force everyone to implement it anyway. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 15 7月, 2010 1 次提交
-
-
由 Andres Salomon 提交于
Rename is_root_node() to of_node_is_root() and make it available for all archs to use, as it's not PROM-specific. Signed-off-by: NAndres Salomon <dilinger@queued.net> Acked-by: NDavid S. Miller <davem@davemloft.net> Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
-
- 18 3月, 2010 1 次提交
-
-
由 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>
-
- 15 2月, 2010 1 次提交
-
-
由 Grant Likely 提交于
Both allnodes and devtree_lock are defined in common code. The extern declaration should be in the common header too so that the compiler can type check. allnodes is already in of.h, but devtree_lock should be declared there too. This patch removes the SPARC declarations and uses decls in of.h instead. Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: NMichal Simek <monstr@monstr.eu> Acked-by: NDavid S. Miller <davem@davemloft.net>
-
- 14 2月, 2010 2 次提交
-
-
由 Grant Likely 提交于
Rather than defining of_chosen in each arch, it can be defined for all in driver/of/base.c Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: NMichal Simek <monstr@monstr.eu>
-
由 Grant Likely 提交于
Most architectures don't need to change these. Put them into common code to eliminate some duplication Signed-off-by: NGrant Likely <grant.likely@secretlab.ca> Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: NMichal Simek <monstr@monstr.eu>
-