Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'devicetree-fixes-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux

Pull DeviceTree fixes from Rob Herring:

- fix unflatten_dt_nodes when dad parameter is set.

- add vendor prefixes for TechNexion and UniWest

- documentation fix for Marvell BT

- OF IRQ kerneldoc fixes

- restrict CMA alignment adjustments to non dma-coherent

- a couple of warning fixes in reserved-memory code

- DT maintainers updates

* tag 'devicetree-fixes-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
drivers: of: add definition of early_init_dt_alloc_reserved_memory_arch
drivers/of: Fix depth for sub-tree blob in unflatten_dt_nodes()
drivers: of: Fix of_pci.h header guard
dt-bindings: Add vendor prefix for TechNexion
of: add vendor prefix for UniWest
dt: bindings: fix documentation for MARVELL's bt-sd8xxx wireless device
of: add missing const for of_parse_phandle_with_args() in !CONFIG_OF
of: silence warnings due to max() usage
drivers: of: of_reserved_mem: fixup the CMA alignment not to affect dma-coherent
of: irq: fix of_irq_get[_byname]() kernel-doc
MAINTAINERS: DeviceTree maintainer updates

+49 -24
+4 -4
Documentation/devicetree/bindings/net/marvell-bt-sd8xxx.txt
··· 13 13 initialization. This is an array of 28 values(u8). 14 14 15 15 - marvell,wakeup-pin: It represents wakeup pin number of the bluetooth chip. 16 - firmware will use the pin to wakeup host system. 16 + firmware will use the pin to wakeup host system (u16). 17 17 - marvell,wakeup-gap-ms: wakeup gap represents wakeup latency of the host 18 18 platform. The value will be configured to firmware. This 19 - is needed to work chip's sleep feature as expected. 19 + is needed to work chip's sleep feature as expected (u16). 20 20 - interrupt-parent: phandle of the parent interrupt controller 21 21 - interrupts : interrupt pin number to the cpu. Driver will request an irq based 22 22 on this interrupt number. During system suspend, the irq will be ··· 50 50 0x37 0x01 0x1c 0x00 0xff 0xff 0xff 0xff 0x01 0x7f 0x04 0x02 51 51 0x00 0x00 0xba 0xce 0xc0 0xc6 0x2d 0x00 0x00 0x00 0x00 0x00 52 52 0x00 0x00 0xf0 0x00>; 53 - marvell,wakeup-pin = <0x0d>; 54 - marvell,wakeup-gap-ms = <0x64>; 53 + marvell,wakeup-pin = /bits/ 16 <0x0d>; 54 + marvell,wakeup-gap-ms = /bits/ 16 <0x64>; 55 55 }; 56 56 };
+2
Documentation/devicetree/bindings/vendor-prefixes.txt
··· 255 255 SUNW Sun Microsystems, Inc 256 256 tbs TBS Technologies 257 257 tcl Toby Churchill Ltd. 258 + technexion TechNexion 258 259 technologic Technologic Systems 259 260 thine THine Electronics, Inc. 260 261 ti Texas Instruments ··· 270 269 truly Truly Semiconductors Limited 271 270 tyan Tyan Computer Corporation 272 271 upisemi uPI Semiconductor Corp. 272 + uniwest United Western Technologies Corp (UniWest) 273 273 urt United Radiant Technology Corporation 274 274 usi Universal Scientific Industrial Co., Ltd. 275 275 v3 V3 Semiconductor
+2 -5
MAINTAINERS
··· 8407 8407 OPEN FIRMWARE AND FLATTENED DEVICE TREE 8408 8408 M: Rob Herring <robh+dt@kernel.org> 8409 8409 M: Frank Rowand <frowand.list@gmail.com> 8410 - M: Grant Likely <grant.likely@linaro.org> 8411 8410 L: devicetree@vger.kernel.org 8412 8411 W: http://www.devicetree.org/ 8413 - T: git git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux.git 8412 + T: git git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git 8414 8413 S: Maintained 8415 8414 F: drivers/of/ 8416 8415 F: include/linux/of*.h ··· 8417 8418 8418 8419 OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS 8419 8420 M: Rob Herring <robh+dt@kernel.org> 8420 - M: Pawel Moll <pawel.moll@arm.com> 8421 8421 M: Mark Rutland <mark.rutland@arm.com> 8422 - M: Ian Campbell <ijc+devicetree@hellion.org.uk> 8423 - M: Kumar Gala <galak@codeaurora.org> 8424 8422 L: devicetree@vger.kernel.org 8425 8423 T: git git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git 8424 + Q: http://patchwork.ozlabs.org/project/devicetree-bindings/list/ 8426 8425 S: Maintained 8427 8426 F: Documentation/devicetree/ 8428 8427 F: arch/*/boot/dts/
+13 -2
drivers/of/fdt.c
··· 395 395 struct device_node **nodepp) 396 396 { 397 397 struct device_node *root; 398 - int offset = 0, depth = 0; 398 + int offset = 0, depth = 0, initial_depth = 0; 399 399 #define FDT_MAX_DEPTH 64 400 400 unsigned int fpsizes[FDT_MAX_DEPTH]; 401 401 struct device_node *nps[FDT_MAX_DEPTH]; ··· 405 405 if (nodepp) 406 406 *nodepp = NULL; 407 407 408 + /* 409 + * We're unflattening device sub-tree if @dad is valid. There are 410 + * possibly multiple nodes in the first level of depth. We need 411 + * set @depth to 1 to make fdt_next_node() happy as it bails 412 + * immediately when negative @depth is found. Otherwise, the device 413 + * nodes except the first one won't be unflattened successfully. 414 + */ 415 + if (dad) 416 + depth = initial_depth = 1; 417 + 408 418 root = dad; 409 419 fpsizes[depth] = dad ? strlen(of_node_full_name(dad)) : 0; 410 420 nps[depth] = dad; 421 + 411 422 for (offset = 0; 412 - offset >= 0 && depth >= 0; 423 + offset >= 0 && depth >= initial_depth; 413 424 offset = fdt_next_node(blob, offset, &depth)) { 414 425 if (WARN_ON_ONCE(depth >= FDT_MAX_DEPTH)) 415 426 continue;
+10 -9
drivers/of/irq.c
··· 386 386 EXPORT_SYMBOL_GPL(of_irq_to_resource); 387 387 388 388 /** 389 - * of_irq_get - Decode a node's IRQ and return it as a Linux irq number 389 + * of_irq_get - Decode a node's IRQ and return it as a Linux IRQ number 390 390 * @dev: pointer to device tree node 391 - * @index: zero-based index of the irq 391 + * @index: zero-based index of the IRQ 392 392 * 393 - * Returns Linux irq number on success, or -EPROBE_DEFER if the irq domain 394 - * is not yet created. 395 - * 393 + * Returns Linux IRQ number on success, or 0 on the IRQ mapping failure, or 394 + * -EPROBE_DEFER if the IRQ domain is not yet created, or error code in case 395 + * of any other failure. 396 396 */ 397 397 int of_irq_get(struct device_node *dev, int index) 398 398 { ··· 413 413 EXPORT_SYMBOL_GPL(of_irq_get); 414 414 415 415 /** 416 - * of_irq_get_byname - Decode a node's IRQ and return it as a Linux irq number 416 + * of_irq_get_byname - Decode a node's IRQ and return it as a Linux IRQ number 417 417 * @dev: pointer to device tree node 418 - * @name: irq name 418 + * @name: IRQ name 419 419 * 420 - * Returns Linux irq number on success, or -EPROBE_DEFER if the irq domain 421 - * is not yet created, or error code in case of any other failure. 420 + * Returns Linux IRQ number on success, or 0 on the IRQ mapping failure, or 421 + * -EPROBE_DEFER if the IRQ domain is not yet created, or error code in case 422 + * of any other failure. 422 423 */ 423 424 int of_irq_get_byname(struct device_node *dev, const char *name) 424 425 {
+9 -2
drivers/of/of_reserved_mem.c
··· 127 127 } 128 128 129 129 /* Need adjust the alignment to satisfy the CMA requirement */ 130 - if (IS_ENABLED(CONFIG_CMA) && of_flat_dt_is_compatible(node, "shared-dma-pool")) 131 - align = max(align, (phys_addr_t)PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order)); 130 + if (IS_ENABLED(CONFIG_CMA) 131 + && of_flat_dt_is_compatible(node, "shared-dma-pool") 132 + && of_get_flat_dt_prop(node, "reusable", NULL) 133 + && !of_get_flat_dt_prop(node, "no-map", NULL)) { 134 + unsigned long order = 135 + max_t(unsigned long, MAX_ORDER - 1, pageblock_order); 136 + 137 + align = max(align, (phys_addr_t)PAGE_SIZE << order); 138 + } 132 139 133 140 prop = of_get_flat_dt_prop(node, "alloc-ranges", &len); 134 141 if (prop) {
+1 -1
include/linux/of.h
··· 614 614 return NULL; 615 615 } 616 616 617 - static inline int of_parse_phandle_with_args(struct device_node *np, 617 + static inline int of_parse_phandle_with_args(const struct device_node *np, 618 618 const char *list_name, 619 619 const char *cells_name, 620 620 int index,
+1 -1
include/linux/of_pci.h
··· 8 8 struct of_phandle_args; 9 9 struct device_node; 10 10 11 - #ifdef CONFIG_OF 11 + #ifdef CONFIG_OF_PCI 12 12 int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq); 13 13 struct device_node *of_pci_find_child_device(struct device_node *parent, 14 14 unsigned int devfn);
+7
include/linux/of_reserved_mem.h
··· 31 31 int of_reserved_mem_device_init(struct device *dev); 32 32 void of_reserved_mem_device_release(struct device *dev); 33 33 34 + int early_init_dt_alloc_reserved_memory_arch(phys_addr_t size, 35 + phys_addr_t align, 36 + phys_addr_t start, 37 + phys_addr_t end, 38 + bool nomap, 39 + phys_addr_t *res_base); 40 + 34 41 void fdt_init_reserved_mem(void); 35 42 void fdt_reserved_mem_save_node(unsigned long node, const char *uname, 36 43 phys_addr_t base, phys_addr_t size);