Commit 18f38fed authored by Linus Torvalds's avatar Linus Torvalds

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

Pull devicetree updates from Rob Herring:
 "Bindings:

   - Add some missing type definitions to properties

   - Drop unneeded quotes and use absolute paths in bindings

   - Remove redundant "binding" or "schema" in binding titles

   - Add bindings for Ralink SoCs interrupt controller, QCA2066
     Bluetooth, infineon,irps5401, new NXP i.MX GPT variants, shineworld
     lh133k MIPI SPI panel, Socionext Synquacer platforms, RK3588 PCIe,
     ST M95640 EEPROM, and FSL DCP crypto variants, and Arm Cortex-R52

  DT core:

   - Improve the reserved-memory range allocation to maximize contiguous
     space

   - Use device_set_node() helper in place of open coding"

* tag 'devicetree-for-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (40 commits)
  dt-bindings: interrupt-controller: add Ralink SoCs interrupt controller
  dt-bindings: PCI: dwc: rockchip: Update for RK3588
  dt-bindings: auxdisplay: holtek: Add missing type for "linux,no-autorepeat"
  dt-bindings: input: mediatek,pmic-keys: Fix typo in "linux,keycodes" property name
  dt-bindings: pwm: drop unneeded quotes
  dt-bindings: crypto: drop unneeded quotes
  dt-bindings: arm: socionext: add Synquacer platforms
  dt-bindings: connector: usb: allow a single HS port
  dt-bindings: bus: ti-sysc: fix typo
  of: reserved_mem: Use stable allocation order
  of: reserved_mem: Try to keep range allocations contiguous
  dt-bindings: arm: drop unneeded quotes and use absolute /schemas path
  dt-bindings: firmware: arm,scmi: drop unneeded quotes and use absolute /schemas path
  dt-bindings: dvfs: drop unneeded quotes
  dt-bindings: gpu: drop unneeded quotes
  dt-bindings: i3c: silvaco,i3c-master: drop unneeded quotes
  dt-bindings: rockchip: grf: drop unneeded quotes
  dt-bindings: spmi: mtk,spmi-mtk-pmif: drop unneeded quotes
  dt-bindings: Remove last usage of "binding" or "schema" in titles
  dt-bindings: display: panel: mipi-dbi-spi: add spi-3wire property
  ...
parents c6b02710 ecdb0048
......@@ -122,14 +122,14 @@ properties:
arm,vexpress,position:
description: When daughterboards are stacked on one site, their position
in the stack be be described this attribute.
$ref: '/schemas/types.yaml#/definitions/uint32'
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 3
arm,vexpress,dcc:
description: When describing tiles consisting of more than one DCC, its
number can be specified with this attribute.
$ref: '/schemas/types.yaml#/definitions/uint32'
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 3
......@@ -180,13 +180,13 @@ patternProperties:
- const: simple-bus
arm,v2m-memory-map:
description: This describes the memory map type.
$ref: '/schemas/types.yaml#/definitions/string'
$ref: /schemas/types.yaml#/definitions/string
enum:
- rs1
- rs2
arm,hbi:
$ref: '/schemas/types.yaml#/definitions/uint32'
$ref: /schemas/types.yaml#/definitions/uint32
description: This indicates the ARM HBI (Hardware Board ID), this is
ARM's unique board model ID, visible on the PCB's silkscreen.
......@@ -197,7 +197,7 @@ patternProperties:
property, describing the physical location of the children nodes.
0 means motherboard site, while 1 and 2 are daughterboard sites, and
0xf means "sisterboard" which is the site containing the main CPU tile.
$ref: '/schemas/types.yaml#/definitions/uint32'
$ref: /schemas/types.yaml#/definitions/uint32
minimum: 0
maximum: 15
......
......@@ -153,6 +153,7 @@ properties:
- arm,cortex-r4
- arm,cortex-r5
- arm,cortex-r7
- arm,cortex-r52
- arm,cortex-x1
- arm,cortex-x1c
- arm,cortex-x2
......@@ -196,7 +197,7 @@ properties:
- qcom,scorpion
enable-method:
$ref: '/schemas/types.yaml#/definitions/string'
$ref: /schemas/types.yaml#/definitions/string
oneOf:
# On ARM v8 64-bit this property is required
- enum:
......@@ -245,8 +246,8 @@ properties:
cpu-release-addr:
oneOf:
- $ref: '/schemas/types.yaml#/definitions/uint32'
- $ref: '/schemas/types.yaml#/definitions/uint64'
- $ref: /schemas/types.yaml#/definitions/uint32
- $ref: /schemas/types.yaml#/definitions/uint64
description:
The DT specification defines this as 64-bit always, but some 32-bit Arm
systems have used a 32-bit value which must be supported.
......@@ -254,7 +255,7 @@ properties:
property value of "spin-table".
cpu-idle-states:
$ref: '/schemas/types.yaml#/definitions/phandle-array'
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
maxItems: 1
description: |
......@@ -270,7 +271,7 @@ properties:
cci-control-port: true
dynamic-power-coefficient:
$ref: '/schemas/types.yaml#/definitions/uint32'
$ref: /schemas/types.yaml#/definitions/uint32
description:
A u32 value that represents the running time dynamic
power coefficient in units of uW/MHz/V^2. The
......@@ -307,7 +308,7 @@ properties:
PM domain provider, must be "psci".
qcom,saw:
$ref: '/schemas/types.yaml#/definitions/phandle'
$ref: /schemas/types.yaml#/definitions/phandle
description: |
Specifies the SAW* node associated with this CPU.
......@@ -317,7 +318,7 @@ properties:
* arm/msm/qcom,saw2.txt
qcom,acc:
$ref: '/schemas/types.yaml#/definitions/phandle'
$ref: /schemas/types.yaml#/definitions/phandle
description: |
Specifies the ACC* node associated with this CPU.
......@@ -328,7 +329,7 @@ properties:
* arm/msm/qcom,kpss-acc.txt
rockchip,pmu:
$ref: '/schemas/types.yaml#/definitions/phandle'
$ref: /schemas/types.yaml#/definitions/phandle
description: |
Specifies the syscon node controlling the cpu core power domains.
......@@ -338,7 +339,7 @@ properties:
the cpu-core power-domains.
secondary-boot-reg:
$ref: '/schemas/types.yaml#/definitions/uint32'
$ref: /schemas/types.yaml#/definitions/uint32
description: |
Required for systems that have an "enable-method" property value of
"brcm,bcm11351-cpu-method", "brcm,bcm23550" or "brcm,bcm-nsp-smp".
......
......@@ -100,7 +100,7 @@ properties:
patternProperties:
"^power-domain-":
$ref: "../power/power-domain.yaml#"
$ref: /schemas/power/power-domain.yaml#
type: object
description: |
......
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/arm/socionext/synquacer.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Socionext Synquacer platform
maintainers:
- Masahisa Kojima <masahisa.kojima@linaro.org>
- Jassi Brar <jaswinder.singh@linaro.org>
description:
Socionext SC2A11B (Synquacer) SoC based boards
properties:
$nodename:
const: '/'
compatible:
oneOf:
- items:
- enum:
- socionext,developer-box
- const: socionext,synquacer
additionalProperties: true
...
......@@ -40,6 +40,7 @@ properties:
linux,keymap: true
linux,no-autorepeat:
type: boolean
description: Disable keyrepeat
default-brightness-level:
......
......@@ -97,7 +97,7 @@ properties:
- enum: [ ick, fck, sys_clk ]
- items:
- const: fck
- enum: [ ick. dbclk, osc, sys_clk, dss_clk, ahclkx ]
- enum: [ ick, dbclk, osc, sys_clk, dss_clk, ahclkx ]
- items:
- const: fck
- const: phy-clk
......
......@@ -4,7 +4,7 @@
$id: http://devicetree.org/schemas/clock/brcm,bcm63268-timer-clocks.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Broadcom BCM63268 Timer Clock and Reset Device Tree Bindings
title: Broadcom BCM63268 Timer Clock and Reset
maintainers:
- Álvaro Fernández Rojas <noltari@gmail.com>
......
......@@ -4,7 +4,7 @@
$id: http://devicetree.org/schemas/clock/imx8mp-audiomix.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: NXP i.MX8MP AudioMIX Block Control Binding
title: NXP i.MX8MP AudioMIX Block Control
maintainers:
- Marek Vasut <marex@denx.de>
......
......@@ -168,6 +168,13 @@ properties:
offer the power, Capability Mismatch is set. Required for power sink and
power dual role.
port:
$ref: /schemas/graph.yaml#/properties/port
description: OF graph bindings modeling a data bus to the connector, e.g.
there is a single High Speed (HS) port present in this connector. If there
is more than one bus (several port, with 'reg' property), they can be grouped
under 'ports'.
ports:
$ref: /schemas/graph.yaml#/properties/ports
description: OF graph bindings modeling any data bus to the connector
......@@ -322,6 +329,19 @@ examples:
};
};
# USB-C connector attached to SoC with a single High-Speed controller
- |
connector {
compatible = "usb-c-connector";
label = "USB-C";
port {
high_speed_ep: endpoint {
remote-endpoint = <&usb_hs_ep>;
};
};
};
# USB-C connector attached to SoC and USB3 typec port controller(hd3ss3220)
# with SS 2:1 MUX. HS lines routed to SoC, SS lines routed to the MUX and
# the output of MUX is connected to the SoC.
......
......@@ -19,8 +19,8 @@ properties:
interrupts:
items:
- description: "Interrupt for flow 0"
- description: "Interrupt for flow 1"
- description: Interrupt for flow 0
- description: Interrupt for flow 1
clocks:
maxItems: 1
......
......@@ -103,6 +103,12 @@ properties:
wakeup-source: true
linux,keycode:
$ref: /schemas/types.yaml#/definitions/uint32
default: 116
deprecated: true
linux,keycodes:
maxItems: 1
default: 116
required:
......
......@@ -11,9 +11,15 @@ maintainers:
properties:
compatible:
enum:
oneOf:
- enum:
- fsl,imx23-dcp
- fsl,imx28-dcp
- items:
- enum:
- fsl,imx6sl-dcp
- fsl,imx6ull-dcp
- const: fsl,imx28-dcp
reg:
maxItems: 1
......
......@@ -2,8 +2,8 @@
# Copyright 2018 Linaro Ltd.
%YAML 1.2
---
$id: "http://devicetree.org/schemas/crypto/intel,ixp4xx-crypto.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
$id: http://devicetree.org/schemas/crypto/intel,ixp4xx-crypto.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Intel IXP4xx cryptographic engine
......@@ -21,7 +21,7 @@ properties:
const: intel,ixp4xx-crypto
intel,npe-handle:
$ref: '/schemas/types.yaml#/definitions/phandle-array'
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
- items:
- description: phandle to the NPE this crypto engine
......
......@@ -26,6 +26,7 @@ properties:
const: dp
force-hpd:
type: boolean
description:
Indicate driver need force hpd when hpd detect failed, this
is used for some eDP screen which don not have a hpd signal.
......
......@@ -20,6 +20,7 @@ properties:
maxItems: 1
video-ports:
$ref: /schemas/types.yaml#/definitions/uint32
default: 0x230145
maximum: 0xffffff
description:
......
......@@ -67,6 +67,7 @@ properties:
items:
- enum:
- sainsmart18
- shineworld,lh133k
- const: panel-mipi-dbi-spi
write-only:
......@@ -86,6 +87,8 @@ properties:
Logic level supply for interface signals (Vddi).
No need to set if this is the same as power-supply.
spi-3wire: true
required:
- compatible
- reg
......
......@@ -42,7 +42,7 @@ properties:
enum: [ 0, 1 ]
performance-domains:
$ref: '/schemas/types.yaml#/definitions/phandle-array'
$ref: /schemas/types.yaml#/definitions/phandle-array
description:
A phandle and performance domain specifier as defined by bindings of the
performance controller/provider specified by phandle.
......
......@@ -33,6 +33,7 @@ properties:
- microchip,25lc040
- st,m95m02
- st,m95256
- st,m95640
- cypress,fm25
- const: atmel,at25
......
......@@ -52,8 +52,7 @@ properties:
- vendor,soc4-ip
- vendor,soc3-ip
- vendor,soc2-ip
- enum:
- vendor,soc1-ip
- const: vendor,soc1-ip
# additionalItems being false is implied
# minItems/maxItems equal to 2 is implied
- items:
......@@ -85,6 +84,9 @@ properties:
discouraged.
clock-names:
# For single-entry lists in clocks, resets etc., the xxx-names often do not
# bring any value, especially if they copy the IP block name. In such case
# just skip the xxx-names.
items:
- const: bus
......
......@@ -214,7 +214,7 @@ properties:
patternProperties:
'^regulator@[0-9a-f]+$':
type: object
$ref: "../regulator/regulator.yaml#"
$ref: /schemas/regulator/regulator.yaml#
unevaluatedProperties: false
properties:
......
......@@ -86,7 +86,7 @@ properties:
const: 2
dynamic-power-coefficient:
$ref: '/schemas/types.yaml#/definitions/uint32'
$ref: /schemas/types.yaml#/definitions/uint32
description:
A u32 value that represents the running time dynamic
power coefficient in units of uW/MHz/V^2. The
......
......@@ -92,7 +92,7 @@ properties:
dma-coherent: true
dynamic-power-coefficient:
$ref: '/schemas/types.yaml#/definitions/uint32'
$ref: /schemas/types.yaml#/definitions/uint32
description:
A u32 value that represents the running time dynamic
power coefficient in units of uW/MHz/V^2. The
......
......@@ -10,7 +10,7 @@ maintainers:
- Conor Culhane <conor.culhane@silvaco.com>
allOf:
- $ref: "i3c.yaml#"
- $ref: i3c.yaml#
properties:
compatible:
......
......@@ -55,7 +55,7 @@ patternProperties:
interrupt-names: true
linux-keycodes:
linux,keycodes:
maxItems: 1
wakeup-source: true
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/interrupt-controller/microchip,eic.yaml#
$id: http://devicetree.org/schemas/interrupt-controller/microchip,sama7g5-eic.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Microchip External Interrupt Controller
......
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/interrupt-controller/ralink,rt2880-intc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Ralink SoCs Interrupt Controller
maintainers:
- Sergio Paracuellos <sergio.paracuellos@gmail.com>
allOf:
- $ref: /schemas/interrupt-controller.yaml#
description:
This interrupt controller support a central point for interrupt aggregation
for platform related blocks.
properties:
compatible:
const: ralink,rt2880-intc
reg:
maxItems: 1
interrupts:
maxItems: 1
interrupt-controller: true
'#interrupt-cells':
const: 1
required:
- compatible
- reg
- interrupts
- interrupt-controller
- '#interrupt-cells'
additionalProperties: false
examples:
- |
interrupt-controller@200 {
compatible = "ralink,rt2880-intc";
reg = <0x200 0x100>;
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&cpuintc>;
interrupts = <2>;
};
...
......@@ -36,7 +36,7 @@ properties:
description:
A list of channels tied to this function, used for matching
the function to a set of virtual channels.
$ref: "/schemas/types.yaml#/definitions/string-array"
$ref: /schemas/types.yaml#/definitions/string-array
items:
- const: fastrpcglink-apps-dsp
......@@ -48,14 +48,14 @@ properties:
qcom,smd-channels:
description:
Channel name used for the RPM communication
$ref: "/schemas/types.yaml#/definitions/string-array"
$ref: /schemas/types.yaml#/definitions/string-array
items:
- const: fastrpcsmd-apps-dsp
qcom,vmids:
description:
Virtual machine IDs for remote processor.
$ref: "/schemas/types.yaml#/definitions/uint32-array"
$ref: /schemas/types.yaml#/definitions/uint32-array
"#address-cells":
const: 1
......
......@@ -24,11 +24,12 @@ properties:
- nxp,88w8997-bt
fw-init-baudrate:
$ref: /schemas/types.yaml#/definitions/uint32
default: 115200
description:
Chip baudrate after FW is downloaded and initialized.
This property depends on the module vendor's
configuration. If this property is not specified,
115200 is set as default.
configuration.
required:
- compatible
......
......@@ -16,6 +16,7 @@ description:
properties:
compatible:
enum:
- qcom,qca2066-bt
- qcom,qca6174-bt
- qcom,qca9377-bt
- qcom,wcn3990-bt
......@@ -98,6 +99,7 @@ allOf:
compatible:
contains:
enum:
- qcom,qca2066-bt
- qcom,qca6174-bt
then:
required:
......
......@@ -41,20 +41,24 @@ properties:
- const: config
clocks:
minItems: 5
items:
- description: AHB clock for PCIe master
- description: AHB clock for PCIe slave
- description: AHB clock for PCIe dbi
- description: APB clock for PCIe
- description: Auxiliary clock for PCIe
- description: PIPE clock
clock-names:
minItems: 5
items:
- const: aclk_mst
- const: aclk_slv
- const: aclk_dbi
- const: pclk
- const: aux
- const: pipe
msi-map: true
......@@ -70,13 +74,19 @@ properties:
maxItems: 1
ranges:
maxItems: 2
minItems: 2
maxItems: 3
resets:
maxItems: 1
minItems: 1
maxItems: 2
reset-names:
const: pipe
oneOf:
- const: pipe
- items:
- const: pwr
- const: pipe
vpcie3v3-supply: true
......
......@@ -4,7 +4,7 @@
$id: http://devicetree.org/schemas/power/reset/restart-handler.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Restart and shutdown handler generic binding
title: Restart and shutdown handler Common Properties
maintainers:
- Sebastian Reichel <sre@kernel.org>
......
......@@ -11,7 +11,7 @@ maintainers:
- Claudiu Beznea <claudiu.beznea@microchip.com>
allOf:
- $ref: "pwm.yaml#"
- $ref: pwm.yaml#
properties:
compatible:
......
......@@ -25,7 +25,7 @@ properties:
const: 3
fsl,pwm-number:
$ref: '/schemas/types.yaml#/definitions/uint32'
$ref: /schemas/types.yaml#/definitions/uint32
description: u32 value representing the number of PWM devices
required:
......
......@@ -4,7 +4,7 @@
$id: http://devicetree.org/schemas/remoteproc/ti,pru-consumer.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Common TI PRU Consumer Binding
title: TI PRU Consumer Common Properties
maintainers:
- Suman Anna <s-anna@ti.com>
......
......@@ -4,7 +4,7 @@
$id: http://devicetree.org/schemas/reserved-memory/framebuffer.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: /reserved-memory framebuffer node bindings
title: /reserved-memory framebuffer node
maintainers:
- devicetree-spec@vger.kernel.org
......
......@@ -119,7 +119,7 @@ allOf:
usbphy:
type: object
$ref: "/schemas/phy/rockchip-usb-phy.yaml#"
$ref: /schemas/phy/rockchip-usb-phy.yaml#
unevaluatedProperties: false
......@@ -134,14 +134,14 @@ allOf:
gpio:
type: object
$ref: "/schemas/gpio/rockchip,rk3328-grf-gpio.yaml#"
$ref: /schemas/gpio/rockchip,rk3328-grf-gpio.yaml#
unevaluatedProperties: false
power-controller:
type: object
$ref: "/schemas/power/rockchip,power-controller.yaml#"
$ref: /schemas/power/rockchip,power-controller.yaml#
unevaluatedProperties: false
......@@ -156,7 +156,7 @@ allOf:
mipi-dphy-rx0:
type: object
$ref: "/schemas/phy/rockchip-mipi-dphy-rx0.yaml#"
$ref: /schemas/phy/rockchip-mipi-dphy-rx0.yaml#
unevaluatedProperties: false
......@@ -184,7 +184,7 @@ allOf:
reboot-mode:
type: object
$ref: "/schemas/power/reset/syscon-reboot-mode.yaml#"
$ref: /schemas/power/reset/syscon-reboot-mode.yaml#
unevaluatedProperties: false
......@@ -238,7 +238,7 @@ allOf:
io-domains:
type: object
$ref: "/schemas/power/rockchip-io-domain.yaml#"
$ref: /schemas/power/rockchip-io-domain.yaml#
unevaluatedProperties: false
......
......@@ -14,7 +14,7 @@ description: |+
for multiple SoCs to control a single SPMI master.
allOf:
- $ref: "spmi.yaml"
- $ref: spmi.yaml
properties:
compatible:
......
......@@ -31,9 +31,13 @@ properties:
- enum:
- fsl,imx6sl-gpt
- fsl,imx6sx-gpt
- fsl,imx8mp-gpt
- fsl,imxrt1050-gpt
- fsl,imxrt1170-gpt
- const: fsl,imx6dl-gpt
- items:
- const: fsl,imx6ul-gpt
- const: fsl,imx6sx-gpt
reg:
maxItems: 1
......
......@@ -139,6 +139,8 @@ properties:
- infineon,ir38164
# Infineon IR38263 Voltage Regulator
- infineon,ir38263
# Infineon IRPS5401 Voltage Regulator (PMIC)
- infineon,irps5401
# Infineon SLB9635 (Soft-) I2C TPM (old protocol, max 100khz)
- infineon,slb9635tt
# Infineon SLB9645 I2C TPM (new protocol, max 400khz)
......
......@@ -1189,6 +1189,8 @@ patternProperties:
description: SHIFT GmbH
"^shimafuji,.*":
description: Shimafuji Electric, Inc.
"^shineworld,.*":
description: ShineWorld Innovations
"^shiratech,.*":
description: Shiratech Solutions
"^si-en,.*":
......@@ -1339,6 +1341,8 @@ patternProperties:
description: Technologic Systems
"^techstar,.*":
description: Shenzhen Techstar Electronics Co., Ltd.
"^teejet,.*":
description: TeeJet
"^teltonika,.*":
description: Teltonika Networks
"^tempo,.*":
......
......@@ -13808,6 +13808,7 @@ MICROCHIP EIC DRIVER
M: Claudiu Beznea <claudiu.beznea@microchip.com>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Supported
F: Documentation/devicetree/bindings/interrupt-controller/microchip,sama7g5-eic.yaml
F: drivers/irqchip/irq-mchp-eic.c
MICROCHIP I2C DRIVER
......
......@@ -77,6 +77,57 @@ void __init fdt_reserved_mem_save_node(unsigned long node, const char *uname,
return;
}
/*
* __reserved_mem_alloc_in_range() - allocate reserved memory described with
* 'alloc-ranges'. Choose bottom-up/top-down depending on nearby existing
* reserved regions to keep the reserved memory contiguous if possible.
*/
static int __init __reserved_mem_alloc_in_range(phys_addr_t size,
phys_addr_t align, phys_addr_t start, phys_addr_t end, bool nomap,
phys_addr_t *res_base)
{
bool prev_bottom_up = memblock_bottom_up();
bool bottom_up = false, top_down = false;
int ret, i;
for (i = 0; i < reserved_mem_count; i++) {
struct reserved_mem *rmem = &reserved_mem[i];
/* Skip regions that were not reserved yet */
if (rmem->size == 0)
continue;
/*
* If range starts next to an existing reservation, use bottom-up:
* |....RRRR................RRRRRRRR..............|
* --RRRR------
*/
if (start >= rmem->base && start <= (rmem->base + rmem->size))
bottom_up = true;
/*
* If range ends next to an existing reservation, use top-down:
* |....RRRR................RRRRRRRR..............|
* -------RRRR-----
*/
if (end >= rmem->base && end <= (rmem->base + rmem->size))
top_down = true;
}
/* Change setting only if either bottom-up or top-down was selected */
if (bottom_up != top_down)
memblock_set_bottom_up(bottom_up);
ret = early_init_dt_alloc_reserved_memory_arch(size, align,
start, end, nomap, res_base);
/* Restore old setting if needed */
if (bottom_up != top_down)
memblock_set_bottom_up(prev_bottom_up);
return ret;
}
/*
* __reserved_mem_alloc_size() - allocate reserved memory described by
* 'size', 'alignment' and 'alloc-ranges' properties.
......@@ -137,8 +188,8 @@ static int __init __reserved_mem_alloc_size(unsigned long node,
end = start + dt_mem_next_cell(dt_root_size_cells,
&prop);
ret = early_init_dt_alloc_reserved_memory_arch(size,
align, start, end, nomap, &base);
ret = __reserved_mem_alloc_in_range(size, align,
start, end, nomap, &base);
if (ret == 0) {
pr_debug("allocated memory for '%s' node: base %pa, size %lu MiB\n",
uname, &base,
......@@ -217,6 +268,11 @@ static int __init __rmem_cmp(const void *a, const void *b)
if (ra->size > rb->size)
return 1;
if (ra->fdt_node < rb->fdt_node)
return -1;
if (ra->fdt_node > rb->fdt_node)
return 1;
return 0;
}
......
......@@ -140,8 +140,8 @@ struct platform_device *of_device_alloc(struct device_node *np,
}
}
dev->dev.of_node = of_node_get(np);
dev->dev.fwnode = &np->fwnode;
/* setup generic device info */
device_set_node(&dev->dev, of_fwnode_handle(np));
dev->dev.parent = parent ? : &platform_bus;
if (bus_id)
......@@ -239,8 +239,7 @@ static struct amba_device *of_amba_device_create(struct device_node *node,
dev->dev.dma_mask = &dev->dev.coherent_dma_mask;
/* setup generic device info */
dev->dev.of_node = of_node_get(node);
dev->dev.fwnode = &node->fwnode;
device_set_node(&dev->dev, of_fwnode_handle(node));
dev->dev.parent = parent ? : &platform_bus;
dev->dev.platform_data = platform_data;
if (bus_id)
......
......@@ -2658,7 +2658,7 @@ static struct i2c_driver unittest_i2c_dev_driver = {
.driver = {
.name = "unittest-i2c-dev",
},
.probe_new = unittest_i2c_dev_probe,
.probe = unittest_i2c_dev_probe,
.remove = unittest_i2c_dev_remove,
.id_table = unittest_i2c_dev_id,
};
......@@ -2735,7 +2735,7 @@ static struct i2c_driver unittest_i2c_mux_driver = {
.driver = {
.name = "unittest-i2c-mux",
},
.probe_new = unittest_i2c_mux_probe,
.probe = unittest_i2c_mux_probe,
.remove = unittest_i2c_mux_remove,
.id_table = unittest_i2c_mux_id,
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment