23 Sep, 2016
1 commit
-
Commit d48f62b9a0a0 ("mtd: nand: move of_get_nand_xxx() helpers into
nand_base.c") removed the drivers/of/of_mtd.c file but did not remove
the associated OF_MTD Kconfig option.Signed-off-by: Boris Brezillon
28 Jun, 2016
1 commit
-
Calling the fixed-phy functions when CONFIG_FIXED_PHY=m as a previous
change tried cannot work if the caller is in built-in code:drivers/of/built-in.o: In function `of_phy_register_fixed_link':
of_reserved_mem.c:(.text+0x85e0): undefined reference to `fixed_phy_register'Making of_mdio depend on 'FIXED_PHY || !FIXED_PHY' would solve this
dependency by enforcing that OF_MDIO itself becomes a loadable module
when FIXED_PHY=y, but that creates a different dependency as it
breaks any built-in ethernet driver that uses of_mdio.Making FIXED_PHY a bool option also cannot work, since it depends on
PHYLIB, which again is tristate.This version now uses 'select FIXED_PHY' to ensure that the fixed-phy
portion of of_mdio is not optional. The main downside of this is
a small increase in code size for cases that do not need fixed phy
support, but it should avoid all of the link-time problems.Signed-off-by: Arnd Bergmann
Fixes: d1bd330a229f ("of_mdio: Enable fixed PHY support if driver is a module")
Acked-by: Randy Dunlap
Signed-off-by: David S. Miller
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
28 Oct, 2015
1 commit
-
Enable building all dtb files when CONFIG_OF_ALL_DTBS is enabled. The dtbs
are not really dependent on a platform being enabled or any other kernel
config, so for testing coverage it is convenient to build all of the dtbs.In order to only build dtbs, this option can be used by creating an
allno.config file containing:
CONFIG_COMPILE_TEST=y
CONFIG_OF=y
CONFIG_OF_ALL_DTBS=yAnd then running:
make KCONFIG_ALLCONFIG=1 allnoconfig
make dtbsWhile building the dtbs themselves don't need a cross compiler, the
scripts dependency does need one. This can be hacked around by
commenting out "subdir-y += mod" in scripts/Makefile.Signed-off-by: Rob Herring
Cc: Frank Rowand
Cc: Grant Likely
27 Jul, 2015
1 commit
-
On UML builds, of_address.c fails to compile:
../drivers/of/address.c:873:2: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration]
This is due to CONFIG_OF now being user selectable. Add a dependency on
HAS_IOMEM to OF_ADDRESS in order to fix this.Signed-off-by: Rob Herring
Cc: Grant Likely
05 Jun, 2015
2 commits
-
The DT unittest currently requires an arch (typically) to select
OF_EARLY_FLATTREE. Remove this dependency by selecting it directly so that
the unittest can be enabled easily on any architecture. With this and the
prior commit, we can easily enable and run unittests starting with x86
defconfig rather than hunting for the combination of config options to
enable OF on x86.Signed-off-by: Rob Herring
Cc: Geert Uytterhoeven
Cc: Pantelis Antoniou
Acked-by: Grant Likely -
With the addition of overlays, it is now plausible to use DT on any arch
and without an arch using it at boot time. It is also desirable to
expand the compile coverage of the DT code. Make CONFIG_OF user
selectable by converting the menu to menuconfig.Signed-off-by: Rob Herring
Acked-by: Geert Uytterhoeven
Acked-by: Pantelis Antoniou
Acked-by: Grant Likely
24 Apr, 2015
1 commit
-
Pull second batch of devicetree updates from Rob Herring:
"As Grant mentioned in the first devicetree pull request, here is the
2nd batch of DT changes for 4.1. The main remaining item here is the
endianness bindings and related 8250 driver support.- DT endianness specification bindings
- big-endian 8250 serial support
- DT overlay unittest updates
- various DT doc updates
- compile fixes for OF_IRQ=n"
* tag 'devicetree-for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
frv: add io{read,write}{16,32}be functions
mn10300: add io{read,write}{16,32}be functions
Documentation: DT bindings: add doc for Altera's SoCFPGA platform
of: base: improve of_get_next_child() kernel-doc
Doc: dt: arch_timer: discourage clock-frequency use
of: unittest: overlay: Keep track of created overlays
of/fdt: fix allocation size for device node path
serial: of_serial: Support big-endian register accesses
serial: 8250: Add support for big-endian MMIO accesses
of: Document {little,big,native}-endian bindings
of/fdt: Add endianness helper function for early init code
of: Add helper function to check MMIO register endianness
of/fdt: Remove "reg" data prints from early_init_dt_scan_memory
of: add vendor prefix for Artesyn
of: Add dummy of_irq_to_resource_table() for IRQ_OF=n
of: OF_IRQ should depend on IRQ_DOMAIN
15 Apr, 2015
1 commit
-
If CONFIG_IRQ_DOMAIN=n:
drivers/of/irq.c: In function ‘of_irq_get’:
drivers/of/irq.c:406: error: implicit declaration of function ‘irq_find_host’
drivers/of/irq.c:406: warning: assignment makes pointer from integer without a cast
make[2]: *** [drivers/of/irq.o] Error 1Signed-off-by: Geert Uytterhoeven
Signed-off-by: Rob Herring
28 Mar, 2015
1 commit
-
Currently OF_DYNAMIC and OF_OVERLAY are not visible to the user, and are
selected automatically only when needed.Allow them to be enabled manually to improve device tree unit test
coverage.Signed-off-by: Geert Uytterhoeven
Signed-off-by: Grant Likely
02 Mar, 2015
2 commits
-
The whole menu already depends on OF, so there is no need to additionaly specify it.
Suggested-by: Paul Bolle
Signed-off-by: Matwey V. Kornilov
Signed-off-by: Rob Herring -
Signed-off-by: Matwey V. Kornilov
Signed-off-by: Rob Herring
14 Jan, 2015
1 commit
-
This patch intends to remove the unittests dependency on
the functions defined in dynamic.c. So, rather than calling
of_attach_node defined in dynamic.c, minimal functionality
required to attach a new node is re-defined in unittest.c.
Also, now after executing the tests the test data is not
removed from the device tree so there is no need to call
of_detach_node.Tested with and without OF_DYNAMIC enabled on ppc, arm and
x86Signed-off-by: Gaurav Minocha
Signed-off-by: Rob Herring
26 Nov, 2014
1 commit
-
The OF_OVERLAY option selects OF_DEVICE, but OF_DEVICE was removed in
commit ba166e900b, "of: remove CONFIG_OF_DEVICE". Remove the unnecessary
select.Signed-off-by: Grant Likely
Reported-by: Paul Bolle
Cc: Pantelis Antoniou
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
19 Nov, 2014
1 commit
-
Create a new /sys entry '/sys/firmware/fdt' to export the FDT blob
that was passed to the kernel by the bootloader. This allows userland
applications such as kexec to access the raw binary.The fact that this node does not reside under /sys/firmware/device-tree
is deliberate: FDT is also used on arm64 UEFI/ACPI systems to
communicate just the UEFI and ACPI entry points, but the FDT is never
unflattened and used to configure the system.A CRC32 checksum is calculated over the entire FDT blob, and verified
at late_initcall time. The sysfs entry is instantiated only if the
checksum is valid, i.e., if the FDT blob has not been modified in the
mean time. Otherwise, a warning is printed.Signed-off-by: Ard Biesheuvel
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
2 commits
-
The selftest data ends up causing duplicate phandles in the live tree
for the time that the testcase data is inserted into the live tree. This
is obviously a bad situation because anything attempting to read the
tree while the selftests are running make resolve phandles to one of the
testcase data nodes. Fix the problem by using the of_resolve_phandles()
function to eliminate duplicates.Signed-off-by: Grant Likely
Cc: Pantelis Antoniou
Cc: Gaurav Minocha -
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
04 Aug, 2014
1 commit
-
This patch is to fix following error while compiling OF selftests.
"drivers/of/selftest.c:617:2: error: implicit declaration of function
'of_fdt_unflatten_tree'"Now, CONFIG_OF_SELFTEST depends on CONFIG_OF_EARLY_FLATTREE so that the
broken configuration cannot be selected. Ultimately it would be a good
idea to allow CONFIG_OF_SELFTEST to select CONFIG_OF_EARLY_FLATTREE, but
there is a dependency problem on i386 and x86_64 that causes dtc to not
get built and causes the build to fail. That problem needs to be fixed
first.Signed-off-by: Gaurav Minocha
Signed-off-by: Grant Likely
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
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
19 Mar, 2014
1 commit
12 Mar, 2014
2 commits
-
The same data is now available in sysfs, so we can remove the code
that exports it in /proc and replace it with a symlink to the sysfs
version.Tested on versatile qemu model and mpc5200 eval board. More testing
would be appreciated.v5: Fixed up conflicts with mainline changes
Signed-off-by: Grant Likely
Cc: Rob Herring
Cc: Benjamin Herrenschmidt
Cc: David S. Miller
Cc: Nathan Fontenot
Cc: Pantelis Antoniou -
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
20 Feb, 2014
1 commit
-
Translating an address from a PCI node of the device-tree into a CPU
physical address doesn't require the core PCI support. Those
translations are just related to the device tree itself.The use case to translate an address from a PCI node without actually
using the PCI core support is when one needs to access the PCI
controller without accessing any PCI devices.Marvell SoCs, such as Kirkwood, Dove or Armada XP for instance, come
with an IP of a PCI controller. In the registers of this controller
are stored the ID and the revision of a SoC. With this patch it will
be possible to read the SoC ID of a board without any PCI device and
then without the PCI core support.Signed-off-by: Gregory CLEMENT
Tested-by: Ezequiel Garcia
Reviewed-by: Ezequiel Garcia
Signed-off-by: Grant Likely
31 Dec, 2013
1 commit
-
Signed-off-by: Geert Uytterhoeven
Signed-off-by: Rob Herring
12 Nov, 2013
1 commit
-
Pull devicetree updates from Rob Herring:
"DeviceTree updates for 3.13. This is a bit larger pull request than
usual for this cycle with lots of clean-up.- Cross arch clean-up and consolidation of early DT scanning code.
- Clean-up and removal of arch prom.h headers. Makes arch specific
prom.h optional on all but Sparc.
- Addition of interrupts-extended property for devices connected to
multiple interrupt controllers.
- Refactoring of DT interrupt parsing code in preparation for
deferred probe of interrupts.
- ARM cpu and cpu topology bindings documentation.
- Various DT vendor binding documentation updates"* tag 'devicetree-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (82 commits)
powerpc: add missing explicit OF includes for ppc
dt/irq: add empty of_irq_count for !OF_IRQ
dt: disable self-tests for !OF_IRQ
of: irq: Fix interrupt-map entry matching
MIPS: Netlogic: replace early_init_devtree() call
of: Add Panasonic Corporation vendor prefix
of: Add Chunghwa Picture Tubes Ltd. vendor prefix
of: Add AU Optronics Corporation vendor prefix
of/irq: Fix potential buffer overflow
of/irq: Fix bug in interrupt parsing refactor.
of: set dma_mask to point to coherent_dma_mask
of: add vendor prefix for PHYTEC Messtechnik GmbH
DT: sort vendor-prefixes.txt
of: Add vendor prefix for Cadence
of: Add empty for_each_available_child_of_node() macro definition
arm/versatile: Fix versatile irq specifications.
of/irq: create interrupts-extended property
microblaze/pci: Drop PowerPC-ism from irq parsing
of/irq: Create of_irq_parse_and_map_pci() to consolidate arch code.
of/irq: Use irq_of_parse_and_map()
...
09 Nov, 2013
1 commit
-
Fix OF selftest compile on sparc which does not enable OF_IRQ.
drivers/of/selftest.c:177: undefined reference to `of_irq_parse_one'
drivers/of/selftest.c:197: undefined reference to `of_irq_parse_one'
drivers/of/selftest.c:248: undefined reference to `of_irq_parse_one'Signed-off-by: Rob Herring
Acked-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
08 Dec, 2012
1 commit
-
Signed-off-by: Andreas Larsson
Signed-off-by: David S. Miller
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
29 Mar, 2012
1 commit
-
Pull "ARM: More device tree support updates" from Olof Johansson:
"This branch contains a number of updates for device tree support on
several ARM platforms, in particular:* AT91 continues the device tree conversion adding support for a
number of on-chip drivers and other functionality
* ux500 adds probing of some of the core SoC blocks through device
tree
* Initial device tree support for ST SPEAr600 platforms
* kirkwood continues the conversion to device-tree probing"Manually merge arch/arm/mach-ux500/Kconfig due to MACH_U8500 rename, and
drivers/usb/gadget/at91_udc.c due to header file include cleanups.Also do an "evil merge" for the MACH_U8500 config option rename that the
affected RMI4 touchscreen driver in staging. It's called MACH_MOP500
now, and it was missed during previous merges.* tag 'dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (48 commits)
ARM: SPEAr600: Add device-tree support to SPEAr600 boards
ARM: ux500: Provide local timer support for Device Tree
ARM: ux500: Enable PL022 SSP Controller in Device Tree
ARM: ux500: Enable PL310 Level 2 Cache Controller in Device Tree
ARM: ux500: Enable PL011 AMBA UART Controller for Device Tree
ARM: ux500: Enable Cortex-A9 GIC (Generic Interrupt Controller) in Device Tree
ARM: ux500: db8500: list most devices in the snowball device tree
ARM: ux500: split dts file for snowball into generic part
ARM: ux500: combine the board init functions for DT boot
ARM: ux500: Initial Device Tree support for Snowball
ARM: ux500: CONFIG: Enable Device Tree support for future endeavours
ARM: kirkwood: use devicetree for rtc-mv
ARM: kirkwood: rtc-mv devicetree bindings
ARM: kirkwood: fdt: define uart[01] as disabled, enable uart0
ARM: kirkwood: fdt: facilitate new boards during fdt migration
ARM: kirkwood: fdt: absorb kirkwood_init()
ARM: kirkwood: fdt: use mrvl ticker symbol
ARM: orion: wdt: use resource vice direct access
ARM: Kirkwood: Remove tclk from kirkwood_asoc_platform_data.
ARM: orion: spi: remove enable_clock_fix which is not used
...
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