diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-27 02:35:41 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-27 02:35:41 -0400 |
| commit | 5fffb9513cb7fdd39e03c4cab1cda9c2f2694576 (patch) | |
| tree | f28f1c232dd5774c9157ba257df37e66d4097870 | |
| parent | b96d71571f7745216ef63f13770b5a10b94ddd34 (diff) | |
| parent | ae97159aed6eff68f4ac86472b018985f071fed5 (diff) | |
Merge branch 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6
* 'devicetree/next' of git://git.secretlab.ca/git/linux-2.6:
of_mdio: Don't phy_scan_fixups() twice
Devicetree: Expand on ARM Primecell binding documentation
dt: Add empty of_match_node() macro
dt: add empty dt helpers for non-dt build
devicetree: fix build error on drivers/tty/serial/altera_jtaguart.c
devicetree: Add ARM pl022 spi controller binding doc
devicetree: Add ARM pl061 gpio controller binding doc
of/irq: of_irq_find_parent: check for parent equal to child
MAINTAINERS: update devicetree maintainers
dt: add helper to read 64-bit integers
tty: use of_match_ptr() for of_match_table entry
OF: Add of_match_ptr() macro
dt: add empty for_each_child_of_node, of_find_property
devicetree: Document Qualcomm and Atmel prefixes
serial/imx: add of_alias_get_id() reference back
dt: add of_alias_scan and of_alias_get_id
devicetree: Add a registry of vendor prefixes
| -rw-r--r-- | Documentation/devicetree/bindings/arm/primecell.txt | 4 | ||||
| -rw-r--r-- | Documentation/devicetree/bindings/gpio/pl061-gpio.txt | 10 | ||||
| -rw-r--r-- | Documentation/devicetree/bindings/spi/spi_pl022.txt | 12 | ||||
| -rw-r--r-- | Documentation/devicetree/bindings/vendor-prefixes.txt | 40 | ||||
| -rw-r--r-- | MAINTAINERS | 2 | ||||
| -rw-r--r-- | drivers/of/base.c | 150 | ||||
| -rw-r--r-- | drivers/of/fdt.c | 6 | ||||
| -rw-r--r-- | drivers/of/irq.c | 14 | ||||
| -rw-r--r-- | drivers/of/of_mdio.c | 1 | ||||
| -rw-r--r-- | drivers/of/pdt.c | 8 | ||||
| -rw-r--r-- | drivers/tty/serial/altera_jtaguart.c | 5 | ||||
| -rw-r--r-- | drivers/tty/serial/altera_uart.c | 4 | ||||
| -rw-r--r-- | drivers/tty/serial/imx.c | 11 | ||||
| -rw-r--r-- | drivers/tty/serial/uartlite.c | 4 | ||||
| -rw-r--r-- | include/linux/of.h | 41 |
15 files changed, 286 insertions, 26 deletions
diff --git a/Documentation/devicetree/bindings/arm/primecell.txt b/Documentation/devicetree/bindings/arm/primecell.txt index 1d5d7a870ec7..951ca46789d4 100644 --- a/Documentation/devicetree/bindings/arm/primecell.txt +++ b/Documentation/devicetree/bindings/arm/primecell.txt | |||
| @@ -6,7 +6,9 @@ driver matching. | |||
| 6 | 6 | ||
| 7 | Required properties: | 7 | Required properties: |
| 8 | 8 | ||
| 9 | - compatible : should be a specific value for peripheral and "arm,primecell" | 9 | - compatible : should be a specific name for the peripheral and |
| 10 | "arm,primecell". The specific name will match the ARM | ||
| 11 | engineering name for the logic block in the form: "arm,pl???" | ||
| 10 | 12 | ||
| 11 | Optional properties: | 13 | Optional properties: |
| 12 | 14 | ||
diff --git a/Documentation/devicetree/bindings/gpio/pl061-gpio.txt b/Documentation/devicetree/bindings/gpio/pl061-gpio.txt new file mode 100644 index 000000000000..a2c416bcbccc --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/pl061-gpio.txt | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | ARM PL061 GPIO controller | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible : "arm,pl061", "arm,primecell" | ||
| 5 | - #gpio-cells : Should be two. The first cell is the pin number and the | ||
| 6 | second cell is used to specify optional parameters: | ||
| 7 | - bit 0 specifies polarity (0 for normal, 1 for inverted) | ||
| 8 | - gpio-controller : Marks the device node as a GPIO controller. | ||
| 9 | - interrupts : Interrupt mapping for GPIO IRQ. | ||
| 10 | |||
diff --git a/Documentation/devicetree/bindings/spi/spi_pl022.txt b/Documentation/devicetree/bindings/spi/spi_pl022.txt new file mode 100644 index 000000000000..306ec3ff3c0e --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spi_pl022.txt | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | ARM PL022 SPI controller | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible : "arm,pl022", "arm,primecell" | ||
| 5 | - reg : Offset and length of the register set for the device | ||
| 6 | - interrupts : Should contain SPI controller interrupt | ||
| 7 | |||
| 8 | Optional properties: | ||
| 9 | - cs-gpios : should specify GPIOs used for chipselects. | ||
| 10 | The gpios will be referred to as reg = <index> in the SPI child nodes. | ||
| 11 | If unspecified, a single SPI device without a chip select can be used. | ||
| 12 | |||
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt new file mode 100644 index 000000000000..e8552782b440 --- /dev/null +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | Device tree binding vendor prefix registry. Keep list in alphabetical order. | ||
| 2 | |||
| 3 | This isn't an exhaustive list, but you should add new prefixes to it before | ||
| 4 | using them to avoid name-space collisions. | ||
| 5 | |||
| 6 | adi Analog Devices, Inc. | ||
| 7 | amcc Applied Micro Circuits Corporation (APM, formally AMCC) | ||
| 8 | apm Applied Micro Circuits Corporation (APM) | ||
| 9 | arm ARM Ltd. | ||
| 10 | atmel Atmel Corporation | ||
| 11 | chrp Common Hardware Reference Platform | ||
| 12 | dallas Maxim Integrated Products (formerly Dallas Semiconductor) | ||
| 13 | denx Denx Software Engineering | ||
| 14 | epson Seiko Epson Corp. | ||
| 15 | est ESTeem Wireless Modems | ||
| 16 | fsl Freescale Semiconductor | ||
| 17 | GEFanuc GE Fanuc Intelligent Platforms Embedded Systems, Inc. | ||
| 18 | gef GE Fanuc Intelligent Platforms Embedded Systems, Inc. | ||
| 19 | hp Hewlett Packard | ||
| 20 | ibm International Business Machines (IBM) | ||
| 21 | idt Integrated Device Technologies, Inc. | ||
| 22 | intercontrol Inter Control Group | ||
| 23 | linux Linux-specific binding | ||
| 24 | marvell Marvell Technology Group Ltd. | ||
| 25 | maxim Maxim Integrated Products | ||
| 26 | mosaixtech Mosaix Technologies, Inc. | ||
| 27 | national National Semiconductor | ||
| 28 | nintendo Nintendo | ||
| 29 | nvidia NVIDIA | ||
| 30 | nxp NXP Semiconductors | ||
| 31 | powervr Imagination Technologies | ||
| 32 | qcom Qualcomm, Inc. | ||
| 33 | ramtron Ramtron International | ||
| 34 | samsung Samsung Semiconductor | ||
| 35 | schindler Schindler | ||
| 36 | simtek | ||
| 37 | sirf SiRF Technology, Inc. | ||
| 38 | stericsson ST-Ericsson | ||
| 39 | ti Texas Instruments | ||
| 40 | xlnx Xilinx | ||
diff --git a/MAINTAINERS b/MAINTAINERS index 27af9c95ef41..506fe49a4c78 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -4760,10 +4760,12 @@ F: drivers/i2c/busses/i2c-ocores.c | |||
| 4760 | 4760 | ||
| 4761 | OPEN FIRMWARE AND FLATTENED DEVICE TREE | 4761 | OPEN FIRMWARE AND FLATTENED DEVICE TREE |
| 4762 | M: Grant Likely <grant.likely@secretlab.ca> | 4762 | M: Grant Likely <grant.likely@secretlab.ca> |
| 4763 | M: Rob Herring <rob.herring@calxeda.com> | ||
| 4763 | L: devicetree-discuss@lists.ozlabs.org (moderated for non-subscribers) | 4764 | L: devicetree-discuss@lists.ozlabs.org (moderated for non-subscribers) |
| 4764 | W: http://fdt.secretlab.ca | 4765 | W: http://fdt.secretlab.ca |
| 4765 | T: git git://git.secretlab.ca/git/linux-2.6.git | 4766 | T: git git://git.secretlab.ca/git/linux-2.6.git |
| 4766 | S: Maintained | 4767 | S: Maintained |
| 4768 | F: Documentation/devicetree | ||
| 4767 | F: drivers/of | 4769 | F: drivers/of |
| 4768 | F: include/linux/of*.h | 4770 | F: include/linux/of*.h |
| 4769 | K: of_get_property | 4771 | K: of_get_property |
diff --git a/drivers/of/base.c b/drivers/of/base.c index 3ff22e32b602..b970562e0111 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c | |||
| @@ -17,14 +17,39 @@ | |||
| 17 | * as published by the Free Software Foundation; either version | 17 | * as published by the Free Software Foundation; either version |
| 18 | * 2 of the License, or (at your option) any later version. | 18 | * 2 of the License, or (at your option) any later version. |
| 19 | */ | 19 | */ |
| 20 | #include <linux/ctype.h> | ||
| 20 | #include <linux/module.h> | 21 | #include <linux/module.h> |
| 21 | #include <linux/of.h> | 22 | #include <linux/of.h> |
| 22 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
| 23 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
| 24 | #include <linux/proc_fs.h> | 25 | #include <linux/proc_fs.h> |
| 25 | 26 | ||
| 27 | /** | ||
| 28 | * struct alias_prop - Alias property in 'aliases' node | ||
| 29 | * @link: List node to link the structure in aliases_lookup list | ||
| 30 | * @alias: Alias property name | ||
| 31 | * @np: Pointer to device_node that the alias stands for | ||
| 32 | * @id: Index value from end of alias name | ||
| 33 | * @stem: Alias string without the index | ||
| 34 | * | ||
| 35 | * The structure represents one alias property of 'aliases' node as | ||
| 36 | * an entry in aliases_lookup list. | ||
| 37 | */ | ||
| 38 | struct alias_prop { | ||
| 39 | struct list_head link; | ||
| 40 | const char *alias; | ||
| 41 | struct device_node *np; | ||
| 42 | int id; | ||
| 43 | char stem[0]; | ||
| 44 | }; | ||
| 45 | |||
| 46 | static LIST_HEAD(aliases_lookup); | ||
| 47 | |||
| 26 | struct device_node *allnodes; | 48 | struct device_node *allnodes; |
| 27 | struct device_node *of_chosen; | 49 | struct device_node *of_chosen; |
| 50 | struct device_node *of_aliases; | ||
| 51 | |||
| 52 | static DEFINE_MUTEX(of_aliases_mutex); | ||
| 28 | 53 | ||
| 29 | /* use when traversing tree through the allnext, child, sibling, | 54 | /* use when traversing tree through the allnext, child, sibling, |
| 30 | * or parent members of struct device_node. | 55 | * or parent members of struct device_node. |
| @@ -632,6 +657,35 @@ int of_property_read_u32_array(const struct device_node *np, | |||
| 632 | EXPORT_SYMBOL_GPL(of_property_read_u32_array); | 657 | EXPORT_SYMBOL_GPL(of_property_read_u32_array); |
| 633 | 658 | ||
| 634 | /** | 659 | /** |
| 660 | * of_property_read_u64 - Find and read a 64 bit integer from a property | ||
| 661 | * @np: device node from which the property value is to be read. | ||
| 662 | * @propname: name of the property to be searched. | ||
| 663 | * @out_value: pointer to return value, modified only if return value is 0. | ||
| 664 | * | ||
| 665 | * Search for a property in a device node and read a 64-bit value from | ||
| 666 | * it. Returns 0 on success, -EINVAL if the property does not exist, | ||
| 667 | * -ENODATA if property does not have a value, and -EOVERFLOW if the | ||
| 668 | * property data isn't large enough. | ||
| 669 | |||
