11 Oct, 2020
1 commit
-
Better place for of_mdio.c is drivers/net/mdio.
Move of_mdio.c from drivers/of to drivers/net/mdioSigned-off-by: Calvin Johnson
Acked-by: Rob Herring
Signed-off-by: Jakub Kicinski
18 Jan, 2018
1 commit
-
Following what has been done for other subsystems, move the remaining PCI
related code out of drivers/of/ and into drivers/pci/of.cWith this, we can kill a few kconfig symbols.
Signed-off-by: Rob Herring
[bhelgaas: minor whitespace, comment cleanups]
Signed-off-by: Bjorn Helgaas
Cc: Frank Rowand
15 Nov, 2017
1 commit
-
Pull DeviceTree updates from Rob Herring:
"A bigger diffstat than usual with the kbuild changes and a tree wide
fix in the binding documentation.Summary:
- kbuild cleanups and improvements for dtbs
- Code clean-up of overlay code and fixing for some long standing
memory leak and race condition in applying overlays- Improvements to DT memory usage making sysfs/kobjects optional and
skipping unflattening of disabled nodes. This is part of kernel
tinification efforts.- Final piece of removing storing the full path for every DT node.
The prerequisite conversion of printk's to use device_node format
specifier happened in 4.14.- Sync with current upstream dtc. This brings additional checks to
dtb compiling.- Binding doc tree wide removal of leading 0s from examples
- RTC binding documentation adding missing devices and some
consolidation of duplicated bindings- Vendor prefix documentation for nutsboard, Silicon Storage
Technology, shimafuji, Tecon Microprocessor Technologies, DH
electronics GmbH, Opal Kelly, and Next Thing"* tag 'devicetree-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (55 commits)
dt-bindings: usb: add #phy-cells to usb-nop-xceiv
dt-bindings: Remove leading zeros from bindings notation
kbuild: handle dtb-y and CONFIG_OF_ALL_DTBS natively in Makefile.lib
MIPS: dts: remove bogus bcm96358nb4ser.dtb from dtb-y entry
kbuild: clean up *.dtb and *.dtb.S patterns from top-level Makefile
.gitignore: move *.dtb and *.dtb.S patterns to the top-level .gitignore
.gitignore: sort normal pattern rules alphabetically
dt-bindings: add vendor prefix for Next Thing Co.
scripts/dtc: Update to upstream version v1.4.5-6-gc1e55a5513e9
of: dynamic: fix memory leak related to properties of __of_node_dup
of: overlay: make pr_err() string unique
of: overlay: pr_err from return NOTIFY_OK to overlay apply/remove
of: overlay: remove unneeded check for NULL kbasename()
of: overlay: remove a dependency on device node full_name
of: overlay: simplify applying symbols from an overlay
of: overlay: avoid race condition between applying multiple overlays
of: overlay: loosen overly strict phandle clash check
of: overlay: expand check of whether overlay changeset can be removed
of: overlay: detect cases where device tree may become corrupt
of: overlay: minor restructuring
...
02 Nov, 2017
1 commit
-
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.By default all files without license information are under the default
license of the kernel, which is GPL version 2.Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if
Reviewed-by: Philippe Ombredanne
Reviewed-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman
17 Oct, 2017
1 commit
-
Having device_nodes be kobjects is only needed if sysfs or OF_DYNAMIC is
enabled. Otherwise, having a kobject in struct device_node is
unnecessary bloat in minimal kernel configurations.Likewise, bin_attribute is only needed in struct property when sysfs is
enabled, so we can make it configurable too.Tested-by: Nicolas Pitre
Reviewed-by: Frank Rowand
Acked-by: Grant Likely
Signed-off-by: Rob Herring
01 Jun, 2017
1 commit
-
base.c contains both core OF functions and increasingly other
functionality such as accessing properties and graphs, including
convenience functions. In the near future this would also include OF
specific implementation of the fwnode property and graph APIs.Create driver/of/property.c to contain procedures for accessing and
interpreting device tree properties. The procedures are moved from
drivers/of/base.c, with no changes other than copying only the includes
required by the moved procedures.Signed-off-by: Sakari Ailus
Signed-off-by: Rob Herring
25 May, 2016
1 commit
-
Pull MTD updates from Brian Norris:
"First cycle with Boris as NAND maintainer! Many (most) bullets stolen
from him.Generic:
- Migrated NAND LED trigger to be a generic MTD triggerNAND:
- Introduction of the "ECC algorithm" concept, to avoid overloading
the ECC mode field too much more
- Replaced the nand_ecclayout infrastructure with something a little
more flexible (finally!) and future proof
- Rework of the OMAP GPMC and NAND drivers; the TI folks pulled some
of this into their own tree as well
- Prepare the sunxi NAND driver to receive DMA support
- Handle bitflips in erased pages on GPMI revisions that do not
support this in hardware.SPI NOR:
- Start using the spi_flash_read() API for SPI drivers that support
it (i.e., SPI drivers with special memory-mapped flash modes)And other small scattered improvments"
* tag 'for-linus-20160523' of git://git.infradead.org/linux-mtd: (155 commits)
mtd: spi-nor: support GigaDevice gd25lq64c
mtd: nand_bch: fix spelling of "probably"
mtd: brcmnand: respect ECC algorithm set by NAND subsystem
gpmi-nand: Handle ECC Errors in erased pages
Documentation: devicetree: deprecate "soft_bch" nand-ecc-mode value
mtd: nand: add support for "nand-ecc-algo" DT property
mtd: mtd: drop NAND_ECC_SOFT_BCH enum value
mtd: drop support for NAND_ECC_SOFT_BCH as "soft_bch" mapping
mtd: nand: read ECC algorithm from the new field
mtd: nand: fsmc: validate ECC setup by checking algorithm directly
mtd: nand: set ECC algorithm to Hamming on fallback
staging: mt29f_spinand: set ECC algorithm explicitly
CRIS v32: nand: set ECC algorithm explicitly
mtd: nand: atmel: set ECC algorithm explicitly
mtd: nand: davinci: set ECC algorithm explicitly
mtd: nand: bf5xx: set ECC algorithm explicitly
mtd: nand: omap2: Fix high memory dma prefetch transfer
mtd: nand: omap2: Start dma request before enabling prefetch
mtd: nandsim: add __init attribute
mtd: nand: move of_get_nand_xxx() helpers into nand_base.c
...
06 May, 2016
1 commit
-
Now that all drivers go through nand_set_flash_node() to parse the generic
NAND properties, we can move all of_get_nand_xxx() helpers in to
nand_base.c, make them static and remove of_mtd.c and of_mtd.h.Signed-off-by: Boris Brezillon
16 Apr, 2016
1 commit
-
Add device tree parsing for NUMA topology using device
"numa-node-id" property in distance-map and cpu nodes.This is a complete rewrite of a previous patch by:
Ganapatrao KulkarniSigned-off-by: David Daney
Acked-by: Rob Herring
Signed-off-by: Will Deacon
05 Jun, 2015
1 commit
-
With the libfdt include fixups to use "" instead of <> in the
latest dtc import in commit 4760597 (scripts/dtc: Update to upstream
version 9d3649bd3be245c9), it is no longer necessary to add explicit
include paths to use libfdt. Remove these across the kernel.Signed-off-by: Rob Herring
Acked-by: Ralf Baechle
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Acked-by: Michael Ellerman
Acked-by: Grant Likely
Cc: linux-mips@linux-mips.org
Cc: linuxppc-dev@lists.ozlabs.org
25 Mar, 2015
1 commit
-
If CONFIG_OF_UNITTEST=y then a kernel image make will always cause .version to
be incremented, even if there are not source changes. This is caused by
a lack of dependency tracking and checking for
drivers/of/unittest-data/testcases.dtb.o.Signed-off-by: Frank Rowand
Signed-off-by: Rob Herring
25 Nov, 2014
1 commit
-
Overlays are a method to dynamically modify part of the kernel's
device tree with dynamically loaded data. Add the core functionality to
parse, apply and remove an overlay changeset. The core functionality
takes care of managing the overlay data format and performing the add
and remove. Drivers are expected to use the overlay functionality to
support custom expansion busses commonly found on consumer development
boards like the BeagleBone or Raspberry Pi.The overlay code uses CONFIG_OF_DYNAMIC changesets to perform the low
level work of modifying the devicetree.Documentation about internal and APIs is provided in
Documentation/devicetree/overlay-notes.txtv2:
- Switch from __of_node_alloc() to __of_node_dup()
- Documentation fixups
- Remove 2-pass processing of properties
- Remove separate ov_lock; just use the DT mutex.
v1:
- Drop delete capability using '-' prefix. The '-' prefixed names
are valid properties and nodes and there is no need for it just yet.
- Do not update special properties - name & phandle ones.
- Change order of node attachment, so that the special property update
works.Signed-off-by: Pantelis Antoniou
Signed-off-by: Grant Likely
05 Nov, 2014
1 commit
-
This is unit testing code. It should use that name because it makes more
sense than 'selftest'. Rename the files to match and rename the config
variable.Signed-off-by: Grant Likely
05 Oct, 2014
1 commit
-
Introduce support for dynamic device tree resolution.
Using it, it is possible to prepare a device tree that's
been loaded on runtime to be modified and inserted at the kernel
live tree.Export of of_resolve and bug fix of double free by
Guenter RoeckSigned-off-by: Pantelis Antoniou
[grant.likely: Don't need to select CONFIG_OF_DYNAMIC and CONFIG_OF_DEVICE]
[grant.likely: Don't need to depend on OF or !SPARC]
[grant.likely: Factor out duplicate code blocks into single function]
Signed-off-by: Grant Likely
11 Aug, 2014
1 commit
-
Conflicts:
drivers/of/testcase-data/testcases.dts
25 Jul, 2014
1 commit
-
This patch attaches selftest's device tree data (required by /drivers/of/selftest.c)
dynamically into live device tree. First, it links selftest device tree data into the
kernel image and then iterates over all the nodes and attaches them into the live tree.
Once the testcases are complete, it removes the data attached.This patch will remove the manual process of addition and removal of selftest device
tree data into the machine's dts file.Tested successfully with current selftest's testcases.
Signed-off-by: Gaurav Minocha
[glikely: Removed ability to build as a module and fixed no-devicetree bug]
Signed-off-by: Grant Likely
07 Jul, 2014
1 commit
-
Split the dynamic device tree code into a separate file to make it
really clear what features CONFIF_OF_DYNAMIC add to the kernel. Without
CONFIG_OF_DYNAMIC only properties can be changed, and notifiers do not
get sent. Enabling it turns on reference counting, notifiers and the
ability to add and remove nodes.v2: Moved of_node_release() into dynamic.c
Signed-off-by: Grant Likely
Signed-off-by: Pantelis Antoniou
Cc: Rob Herring
21 May, 2014
1 commit
-
Copy u-boot's FDT address translation code from common/fdt_support. This
code was originally based on the kernel's unflattened DT address parsing
code.This commit can be reverted once relicensing of this code to GPLv2/BSD
is done and it is added to libfdt.Signed-off-by: Rob Herring
Acked-by: Grant Likely
30 Apr, 2014
1 commit
-
The kernel FDT functions predate libfdt and are much more limited in
functionality. Also, the kernel functions and libfdt functions are
not compatible with each other because they have different definitions
of node offsets. To avoid this incompatibility and in preparation to
add more FDT parsing functions which will need libfdt, let's first
convert the existing code to use libfdt.The FDT unflattening, top-level FDT scanning, and property retrieval
functions are converted to use libfdt. The scanning code should be
re-worked to be more efficient and understandable by using libfdt to
find nodes directly by path or compatible strings.Signed-off-by: Rob Herring
Tested-by: Michal Simek
Tested-by: Grant Likely
Tested-by: Stephen Chivers
12 Mar, 2014
1 commit
-
This patch adds support for dynamically allocated reserved memory regions
declared in device tree. Such regions are defined by 'size', 'alignment'
and 'alloc-ranges' properties.Based on previous code provided by Josh Cartwright
Signed-off-by: Marek Szyprowski
Signed-off-by: Grant Likely
15 Oct, 2013
1 commit
-
This reverts commit 9d8eab7af79cb4ce2de5de39f82c455b1f796963. There is
still no consensus on the bindings for the reserved memory and various
drawbacks of the proposed solution has been shown, so the best now is to
revert it completely and start again from scratch later.Signed-off-by: Marek Szyprowski
Signed-off-by: Grant Likely
10 Sep, 2013
1 commit
-
Pull DMA mapping update from Marek Szyprowski:
"This contains an addition of Device Tree support for reserved memory
regions (Contiguous Memory Allocator is one of the drivers for it) and
changes required by the KVM extensions for PowerPC architectue"* 'for-v3.12' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
ARM: init: add support for reserved memory defined by device tree
drivers: of: add initialization code for dma reserved memory
drivers: of: add function to scan fdt nodes given by path
drivers: dma-contiguous: clean source code and prepare for device tree
27 Aug, 2013
1 commit
-
This patch adds device tree support for contiguous and reserved memory
regions defined in device tree.Large memory blocks can be reliably reserved only during early boot.
This must happen before the whole memory management subsystem is
initialized, because we need to ensure that the given contiguous blocks
are not yet allocated by kernel. Also it must happen before kernel
mappings for the whole low memory are created, to ensure that there will
be no mappings (for reserved blocks) or mapping with special properties
can be created (for CMA blocks). This all happens before device tree
structures are unflattened, so we need to get reserved memory layout
directly from fdt.Later, those reserved memory regions are assigned to devices on each
device structure initialization.Signed-off-by: Marek Szyprowski
Acked-by: Kyungmin Park
Acked-by: Michal Nazarewicz
Acked-by: Tomasz Figa
Acked-by: Stephen Warren
Reviewed-by: Rob Herring
23 Aug, 2013
1 commit
-
I2C of helpers used to live in of_i2c.c but experience (from SPI) shows
that it is much cleaner to have this in the core. This also removes a
circular dependency between the helpers and the core, and so we can
finally register child nodes in the core instead of doing this manually
in each driver. So, fix the drivers and documentation, too.Signed-off-by: Wolfram Sang
12 Jun, 2013
1 commit
-
CONFIG_OF_DEVICE is always selected when CONFIG_OF is enabled, so remove
it and simplify of_platform.h and of_device.h headers. This also fixes
!OF compiles using of_platform_populate.Signed-off-by: Rob Herring
Acked-by: Arnd Bergmann
Tested-by: Benjamin Herrenschmidt
Signed-off-by: Grant Likely
25 May, 2012
1 commit
-
Pull GPIO driver changes from Grant Likely:
"Lots of gpio changes, both to core code and drivers.Changes do touch architecture code to remove the need for separate
arm/gpio.h includes in most architectures.Some new drivers are added, and a number of gpio drivers are converted
to use irq_domains for gpio inputs used as interrupts. Device tree
support has been amended to allow multiple gpio_chips to use the same
device tree node.Remaining changes are primarily bug fixes."
* tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux-2.6: (33 commits)
gpio/generic: initialize basic_mmio_gpio shadow variables properly
gpiolib: Remove 'const' from data argument of gpiochip_find()
gpio/rc5t583: add gpio driver for RICOH PMIC RC5T583
gpiolib: quiet gpiochip_add boot message noise
gpio: mpc8xxx: Prevent NULL pointer deref in demux handler
gpio/lpc32xx: Add device tree support
gpio: Adjust of_xlate API to support multiple GPIO chips
gpiolib: Implement devm_gpio_request_one()
gpio-mcp23s08: dbg_show: fix pullup configuration display
Add support for TCA6424A
gpio/omap: (re)fix wakeups on level-triggered GPIOs
gpio/omap: fix broken context restore for non-OFF mode transitions
gpio/omap: fix missing check in *_runtime_suspend()
gpio/omap: remove cpu_is_omapxxxx() checks from *_runtime_resume()
gpio/omap: remove suspend/resume callbacks
gpio/omap: remove retrigger variable in gpio_irq_handler
gpio/omap: remove saved_wakeup field from struct gpio_bank
gpio/omap: remove suspend_wakeup field from struct gpio_bank
gpio/omap: remove saved_fallingdetect, saved_risingdetect
gpio/omap: remove virtual_irq_start variable
...Conflicts:
drivers/gpio/gpio-samsung.c
14 Apr, 2012
1 commit
-
The SPI device tree support code isn't shared by any other subsystem. It can
be moved into the core drivers/spi directory and the exported symbol can be
removed.Signed-off-by: Grant Likely
Cc: Rob Herring
08 Apr, 2012
1 commit
-
The code in drivers/of/gpio.c isn't shared by any other subsystem since it
is all gpiolib specific. drivers/gpio is a better place to maintain these
functions.Signed-off-by: Grant Likely
Cc: Rob Herring
Cc: Linus Walleij
15 Mar, 2012
1 commit
-
- nand-ecc-mode : String, operation mode of the NAND ecc mode.
Supported values are: "none", "soft", "hw", "hw_syndrome", "hw_oob_first",
"soft_bch".
- nand-bus-width : 8 or 16 bus width if not present 8
- nand-on-flash-bbt: boolean to enable on flash bbt option if not present falseSigned-off-by: Jean-Christophe PLAGNIOL-VILLARD
Acked-by: Grant Likely
Acked-by: Stefan Roese
13 Dec, 2011
1 commit
-
Add some runtime test cases for the library of device tree parsing functions.
v2: - Add testcase for phandle with 0 args
- Don't run testcases if testcase data isn't present in device treeSigned-off-by: Grant Likely
08 Jun, 2011
1 commit
-
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: Benjamin Herrenschmidt
Acked-by: Michal Simek
Acked-by: Jesse Barnes
05 Feb, 2011
1 commit
-
There is a tiny difference between PPC32 and PPC64. Microblaze uses the
PPC32 variant.Signed-off-by: Sebastian Andrzej Siewior
[grant.likely@secretlab.ca: Added comment to #endif, moved documentation
block to function implementation, fixed for non ppc and microblaze
compiles]
Signed-off-by: Grant Likely
01 Nov, 2010
1 commit
-
There are two identical implementations of of_get_mac_address(), one
each in arch/powerpc/kernel/prom_parse.c and
arch/microblaze/kernel/prom_parse.c. Move this function to a new
common file of_net.{c,h} and adjust all the callers to include the new
header.Signed-off-by: David Daney
[grant.likely@secretlab.ca: protect header with #ifdef]
Signed-off-by: Grant Likely
11 Oct, 2010
1 commit
-
Clean up pdt.c:
- make build dependent upon config OF_PROMTREE
- #ifdef out the sparc-specific stuff
- create pdt-specific headerSigned-off-by: Andres Salomon
Acked-by: David S. Miller
Signed-off-by: Grant Likely
06 Jul, 2010
1 commit
-
Merge common code between Microblaze and PowerPC. This patch creates
new of_address.h and address.c files to containing address translation
and mapping routines. First routine to be moved it of_iomap()Signed-off-by: Grant Likely
Acked-by: Benjamin Herrenschmidt
CC: Michal Simek
CC: Stephen Rothwell
29 Jun, 2010
1 commit
-
Merge common code between PowerPC and Microblaze. SPARC implements
irq_of_parse_and_map(), but the implementation is different, so it
does not use this code.Signed-off-by: Grant Likely
Acked-by: Benjamin Herrenschmidt
Cc: Michal Simek
Cc: "David S. Miller"
Cc: Stephen Rothwell
Cc: Jeremy Kerr
24 Nov, 2009
1 commit
-
Merge common code between Microblaze and PowerPC.
Signed-off-by: Grant Likely
Reviewed-by: Wolfram Sang
Tested-by: Michal Simek
27 Apr, 2009
1 commit
-
Add support for parsing the device tree for PHY devices on an MDIO bus.
Currently many of the PowerPC ethernet drivers are open coding a solution
for reading data out of the device tree to find the correct PHY device.
This patch implements a set of common routines to:a) let MDIO bus drivers register phy_devices described in the tree, and
b) let MAC drivers find the correct phy_device via the tree.Signed-off-by: Grant Likely
Acked-by: Andy Fleming
Signed-off-by: David S. Miller
26 Jul, 2008
1 commit
-
This patch adds support for populating an SPI bus based on data in the
OF device tree. This is useful for powerpc platforms which use the
device tree instead of discrete code for describing platform layout.Signed-off-by: Grant Likely
20 Apr, 2008
1 commit
-
Fix build breakage introduced in commit "[POWERPC] i2c: OF helpers for
the i2c API". If i2c-core is compiled as a module, the helper needs
to be compiled as a module, as well. Rename i2c.c to of_i2c.c to
avoid name space conflict.[paulus@samba.org: Changed dependency from OF to PPC_OF to avoid
sparc{32,64} allmodconfig breakage.]Signed-off-by: Jochen Friedrich
Signed-off-by: Paul Mackerras