Commit 84985eb2 authored by Linus Torvalds's avatar Linus Torvalds

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

Pull devicetree fixes from Rob Herring:

 - Fix NIOS2 boot with external DTB

 - Add missing synchronization needed between fw_devlink and DT overlay
   removals

 - Fix some unit-address regex's to be hex only

 - Drop some 10+ year old "unstable binding" statements

 - Add new SoCs to QCom UFS binding

 - Add TPM bindings to TPM maintainers

* tag 'devicetree-fixes-for-6.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  nios2: Only use built-in devicetree blob if configured to do so
  dt-bindings: timer: narrow regex for unit address to hex numbers
  dt-bindings: soc: fsl: narrow regex for unit address to hex numbers
  dt-bindings: remoteproc: ti,davinci: remove unstable remark
  dt-bindings: clock: ti: remove unstable remark
  dt-bindings: clock: keystone: remove unstable remark
  of: module: prevent NULL pointer dereference in vsnprintf()
  dt-bindings: ufs: qcom: document SM6125 UFS
  dt-bindings: ufs: qcom: document SC7180 UFS
  dt-bindings: ufs: qcom: document SC8180X UFS
  of: dynamic: Synchronize of_changeset_destroy() with the devlink removals
  driver core: Introduce device_link_wait_removal()
  docs: dt-bindings: add missing address/size-cells to example
  MAINTAINERS: Add TPM DT bindings to TPM maintainers
parents af709adf de164a7f
Status: Unstable - ABI compatibility may be broken in the future
Binding for Keystone gate control driver which uses PSC controller IP. Binding for Keystone gate control driver which uses PSC controller IP.
This binding uses the common clock binding[1]. This binding uses the common clock binding[1].
......
Status: Unstable - ABI compatibility may be broken in the future
Binding for keystone PLLs. The main PLL IP typically has a multiplier, Binding for keystone PLLs. The main PLL IP typically has a multiplier,
a divider and a post divider. The additional PLL IPs like ARMPLL, DDRPLL a divider and a post divider. The additional PLL IPs like ARMPLL, DDRPLL
and PAPLL are controlled by the memory mapped register where as the Main and PAPLL are controlled by the memory mapped register where as the Main
......
Binding for Texas Instruments ADPLL clock. Binding for Texas Instruments ADPLL clock.
Binding status: Unstable - ABI compatibility may be broken in the future
This binding uses the common clock binding[1]. It assumes a This binding uses the common clock binding[1]. It assumes a
register-mapped ADPLL with two to three selectable input clocks register-mapped ADPLL with two to three selectable input clocks
and three to four children. and three to four children.
......
Binding for Texas Instruments APLL clock. Binding for Texas Instruments APLL clock.
Binding status: Unstable - ABI compatibility may be broken in the future
This binding uses the common clock binding[1]. It assumes a This binding uses the common clock binding[1]. It assumes a
register-mapped APLL with usually two selectable input clocks register-mapped APLL with usually two selectable input clocks
(reference clock and bypass clock), with analog phase locked (reference clock and bypass clock), with analog phase locked
......
Binding for Texas Instruments autoidle clock. Binding for Texas Instruments autoidle clock.
Binding status: Unstable - ABI compatibility may be broken in the future
This binding uses the common clock binding[1]. It assumes a register mapped This binding uses the common clock binding[1]. It assumes a register mapped
clock which can be put to idle automatically by hardware based on the usage clock which can be put to idle automatically by hardware based on the usage
and a configuration bit setting. Autoidle clock is never an individual and a configuration bit setting. Autoidle clock is never an individual
......
Binding for Texas Instruments clockdomain. Binding for Texas Instruments clockdomain.
Binding status: Unstable - ABI compatibility may be broken in the future
This binding uses the common clock binding[1] in consumer role. This binding uses the common clock binding[1] in consumer role.
Every clock on TI SoC belongs to one clockdomain, but software Every clock on TI SoC belongs to one clockdomain, but software
only needs this information for specific clocks which require only needs this information for specific clocks which require
......
Binding for TI composite clock. Binding for TI composite clock.
Binding status: Unstable - ABI compatibility may be broken in the future
This binding uses the common clock binding[1]. It assumes a This binding uses the common clock binding[1]. It assumes a
register-mapped composite clock with multiple different sub-types; register-mapped composite clock with multiple different sub-types;
......
Binding for TI divider clock Binding for TI divider clock
Binding status: Unstable - ABI compatibility may be broken in the future
This binding uses the common clock binding[1]. It assumes a This binding uses the common clock binding[1]. It assumes a
register-mapped adjustable clock rate divider that does not gate and has register-mapped adjustable clock rate divider that does not gate and has
only one input clock or parent. By default the value programmed into only one input clock or parent. By default the value programmed into
......
Binding for Texas Instruments DPLL clock. Binding for Texas Instruments DPLL clock.
Binding status: Unstable - ABI compatibility may be broken in the future
This binding uses the common clock binding[1]. It assumes a This binding uses the common clock binding[1]. It assumes a
register-mapped DPLL with usually two selectable input clocks register-mapped DPLL with usually two selectable input clocks
(reference clock and bypass clock), with digital phase locked (reference clock and bypass clock), with digital phase locked
......
Binding for Texas Instruments FAPLL clock. Binding for Texas Instruments FAPLL clock.
Binding status: Unstable - ABI compatibility may be broken in the future
This binding uses the common clock binding[1]. It assumes a This binding uses the common clock binding[1]. It assumes a
register-mapped FAPLL with usually two selectable input clocks register-mapped FAPLL with usually two selectable input clocks
(reference clock and bypass clock), and one or more child (reference clock and bypass clock), and one or more child
......
Binding for TI fixed factor rate clock sources. Binding for TI fixed factor rate clock sources.
Binding status: Unstable - ABI compatibility may be broken in the future
This binding uses the common clock binding[1], and also uses the autoidle This binding uses the common clock binding[1], and also uses the autoidle
support from TI autoidle clock [2]. support from TI autoidle clock [2].
......
Binding for Texas Instruments gate clock. Binding for Texas Instruments gate clock.
Binding status: Unstable - ABI compatibility may be broken in the future
This binding uses the common clock binding[1]. This clock is This binding uses the common clock binding[1]. This clock is
quite much similar to the basic gate-clock [2], however, quite much similar to the basic gate-clock [2], however,
it supports a number of additional features. If no register it supports a number of additional features. If no register
......
Binding for Texas Instruments interface clock. Binding for Texas Instruments interface clock.
Binding status: Unstable - ABI compatibility may be broken in the future
This binding uses the common clock binding[1]. This clock is This binding uses the common clock binding[1]. This clock is
quite much similar to the basic gate-clock [2], however, quite much similar to the basic gate-clock [2], however,
it supports a number of additional features, including it supports a number of additional features, including
......
Binding for TI mux clock. Binding for TI mux clock.
Binding status: Unstable - ABI compatibility may be broken in the future
This binding uses the common clock binding[1]. It assumes a This binding uses the common clock binding[1]. It assumes a
register-mapped multiplexer with multiple input clock signals or register-mapped multiplexer with multiple input clock signals or
parents, one of which can be selected as output. This clock does not parents, one of which can be selected as output. This clock does not
......
...@@ -144,6 +144,8 @@ Example:: ...@@ -144,6 +144,8 @@ Example::
#dma-cells = <1>; #dma-cells = <1>;
clocks = <&clock_controller 0>, <&clock_controller 1>; clocks = <&clock_controller 0>, <&clock_controller 1>;
clock-names = "bus", "host"; clock-names = "bus", "host";
#address-cells = <1>;
#size-cells = <1>;
vendor,custom-property = <2>; vendor,custom-property = <2>;
status = "disabled"; status = "disabled";
......
TI Davinci DSP devices TI Davinci DSP devices
======================= =======================
Binding status: Unstable - Subject to changes for DT representation of clocks
and resets
The TI Davinci family of SoCs usually contains a TI DSP Core sub-system that The TI Davinci family of SoCs usually contains a TI DSP Core sub-system that
is used to offload some of the processor-intensive tasks or algorithms, for is used to offload some of the processor-intensive tasks or algorithms, for
achieving various system level goals. achieving various system level goals.
......
...@@ -51,7 +51,7 @@ properties: ...@@ -51,7 +51,7 @@ properties:
ranges: true ranges: true
patternProperties: patternProperties:
"^clock-controller@[0-9a-z]+$": "^clock-controller@[0-9a-f]+$":
$ref: /schemas/clock/fsl,flexspi-clock.yaml# $ref: /schemas/clock/fsl,flexspi-clock.yaml#
required: required:
......
...@@ -41,7 +41,7 @@ properties: ...@@ -41,7 +41,7 @@ properties:
ranges: true ranges: true
patternProperties: patternProperties:
"^interrupt-controller@[a-z0-9]+$": "^interrupt-controller@[a-f0-9]+$":
$ref: /schemas/interrupt-controller/fsl,ls-extirq.yaml# $ref: /schemas/interrupt-controller/fsl,ls-extirq.yaml#
required: required:
......
...@@ -60,7 +60,7 @@ properties: ...@@ -60,7 +60,7 @@ properties:
be implemented in an always-on power domain." be implemented in an always-on power domain."
patternProperties: patternProperties:
'^frame@[0-9a-z]*$': '^frame@[0-9a-f]+$':
type: object type: object
additionalProperties: false additionalProperties: false
description: A timer node has up to 8 frame sub-nodes, each with the following properties. description: A timer node has up to 8 frame sub-nodes, each with the following properties.
......
...@@ -27,10 +27,13 @@ properties: ...@@ -27,10 +27,13 @@ properties:
- qcom,msm8996-ufshc - qcom,msm8996-ufshc
- qcom,msm8998-ufshc - qcom,msm8998-ufshc
- qcom,sa8775p-ufshc - qcom,sa8775p-ufshc
- qcom,sc7180-ufshc
- qcom,sc7280-ufshc - qcom,sc7280-ufshc
- qcom,sc8180x-ufshc
- qcom,sc8280xp-ufshc - qcom,sc8280xp-ufshc
- qcom,sdm845-ufshc - qcom,sdm845-ufshc
- qcom,sm6115-ufshc - qcom,sm6115-ufshc
- qcom,sm6125-ufshc
- qcom,sm6350-ufshc - qcom,sm6350-ufshc
- qcom,sm8150-ufshc - qcom,sm8150-ufshc
- qcom,sm8250-ufshc - qcom,sm8250-ufshc
...@@ -42,11 +45,11 @@ properties: ...@@ -42,11 +45,11 @@ properties:
- const: jedec,ufs-2.0 - const: jedec,ufs-2.0
clocks: clocks:
minItems: 8 minItems: 7
maxItems: 11 maxItems: 11
clock-names: clock-names:
minItems: 8 minItems: 7
maxItems: 11 maxItems: 11
dma-coherent: true dma-coherent: true
...@@ -112,6 +115,31 @@ required: ...@@ -112,6 +115,31 @@ required:
allOf: allOf:
- $ref: ufs-common.yaml - $ref: ufs-common.yaml
- if:
properties:
compatible:
contains:
enum:
- qcom,sc7180-ufshc
then:
properties:
clocks:
minItems: 7
maxItems: 7
clock-names:
items:
- const: core_clk
- const: bus_aggr_clk
- const: iface_clk
- const: core_clk_unipro
- const: ref_clk
- const: tx_lane0_sync_clk
- const: rx_lane0_sync_clk
reg:
maxItems: 1
reg-names:
maxItems: 1
- if: - if:
properties: properties:
compatible: compatible:
...@@ -120,6 +148,7 @@ allOf: ...@@ -120,6 +148,7 @@ allOf:
- qcom,msm8998-ufshc - qcom,msm8998-ufshc
- qcom,sa8775p-ufshc - qcom,sa8775p-ufshc
- qcom,sc7280-ufshc - qcom,sc7280-ufshc
- qcom,sc8180x-ufshc
- qcom,sc8280xp-ufshc - qcom,sc8280xp-ufshc
- qcom,sm8250-ufshc - qcom,sm8250-ufshc
- qcom,sm8350-ufshc - qcom,sm8350-ufshc
...@@ -215,6 +244,7 @@ allOf: ...@@ -215,6 +244,7 @@ allOf:
contains: contains:
enum: enum:
- qcom,sm6115-ufshc - qcom,sm6115-ufshc
- qcom,sm6125-ufshc
then: then:
properties: properties:
clocks: clocks:
...@@ -248,7 +278,7 @@ allOf: ...@@ -248,7 +278,7 @@ allOf:
reg: reg:
maxItems: 1 maxItems: 1
clocks: clocks:
minItems: 8 minItems: 7
maxItems: 8 maxItems: 8
else: else:
properties: properties:
...@@ -256,7 +286,7 @@ allOf: ...@@ -256,7 +286,7 @@ allOf:
minItems: 1 minItems: 1
maxItems: 2 maxItems: 2
clocks: clocks:
minItems: 8 minItems: 7
maxItems: 11 maxItems: 11
unevaluatedProperties: false unevaluatedProperties: false
......
...@@ -22430,6 +22430,7 @@ S: Maintained ...@@ -22430,6 +22430,7 @@ S: Maintained
W: https://kernsec.org/wiki/index.php/Linux_Kernel_Integrity W: https://kernsec.org/wiki/index.php/Linux_Kernel_Integrity
Q: https://patchwork.kernel.org/project/linux-integrity/list/ Q: https://patchwork.kernel.org/project/linux-integrity/list/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd.git
F: Documentation/devicetree/bindings/tpm/
F: drivers/char/tpm/ F: drivers/char/tpm/
TPS546D24 DRIVER TPS546D24 DRIVER
......
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
void __init early_init_devtree(void *params) void __init early_init_devtree(void *params)
{ {
__be32 *dtb = (u32 *)__dtb_start; __be32 __maybe_unused *dtb = (u32 *)__dtb_start;
#if defined(CONFIG_NIOS2_DTB_AT_PHYS_ADDR) #if defined(CONFIG_NIOS2_DTB_AT_PHYS_ADDR)
if (be32_to_cpup((__be32 *)CONFIG_NIOS2_DTB_PHYS_ADDR) == if (be32_to_cpup((__be32 *)CONFIG_NIOS2_DTB_PHYS_ADDR) ==
OF_DT_HEADER) { OF_DT_HEADER) {
...@@ -30,8 +31,11 @@ void __init early_init_devtree(void *params) ...@@ -30,8 +31,11 @@ void __init early_init_devtree(void *params)
return; return;
} }
#endif #endif
#ifdef CONFIG_NIOS2_DTB_SOURCE_BOOL
if (be32_to_cpu((__be32) *dtb) == OF_DT_HEADER) if (be32_to_cpu((__be32) *dtb) == OF_DT_HEADER)
params = (void *)__dtb_start; params = (void *)__dtb_start;
#endif
early_init_dt_scan(params); early_init_dt_scan(params);
} }
...@@ -44,6 +44,7 @@ static bool fw_devlink_is_permissive(void); ...@@ -44,6 +44,7 @@ static bool fw_devlink_is_permissive(void);
static void __fw_devlink_link_to_consumers(struct device *dev); static void __fw_devlink_link_to_consumers(struct device *dev);
static bool fw_devlink_drv_reg_done; static bool fw_devlink_drv_reg_done;
static bool fw_devlink_best_effort; static bool fw_devlink_best_effort;
static struct workqueue_struct *device_link_wq;
/** /**
* __fwnode_link_add - Create a link between two fwnode_handles. * __fwnode_link_add - Create a link between two fwnode_handles.
...@@ -533,12 +534,26 @@ static void devlink_dev_release(struct device *dev) ...@@ -533,12 +534,26 @@ static void devlink_dev_release(struct device *dev)
/* /*
* It may take a while to complete this work because of the SRCU * It may take a while to complete this work because of the SRCU
* synchronization in device_link_release_fn() and if the consumer or * synchronization in device_link_release_fn() and if the consumer or
* supplier devices get deleted when it runs, so put it into the "long" * supplier devices get deleted when it runs, so put it into the
* workqueue. * dedicated workqueue.
*/ */
queue_work(system_long_wq, &link->rm_work); queue_work(device_link_wq, &link->rm_work);
} }
/**
* device_link_wait_removal - Wait for ongoing devlink removal jobs to terminate
*/
void device_link_wait_removal(void)
{
/*
* devlink removal jobs are queued in the dedicated work queue.
* To be sure that all removal jobs are terminated, ensure that any
* scheduled work has run to completion.
*/
flush_workqueue(device_link_wq);
}
EXPORT_SYMBOL_GPL(device_link_wait_removal);
static struct class devlink_class = { static struct class devlink_class = {
.name = "devlink", .name = "devlink",
.dev_groups = devlink_groups, .dev_groups = devlink_groups,
...@@ -4164,9 +4179,14 @@ int __init devices_init(void) ...@@ -4164,9 +4179,14 @@ int __init devices_init(void)
sysfs_dev_char_kobj = kobject_create_and_add("char", dev_kobj); sysfs_dev_char_kobj = kobject_create_and_add("char", dev_kobj);
if (!sysfs_dev_char_kobj) if (!sysfs_dev_char_kobj)
goto char_kobj_err; goto char_kobj_err;
device_link_wq = alloc_workqueue("device_link_wq", 0, 0);
if (!device_link_wq)
goto wq_err;
return 0; return 0;
wq_err:
kobject_put(sysfs_dev_char_kobj);
char_kobj_err: char_kobj_err:
kobject_put(sysfs_dev_block_kobj); kobject_put(sysfs_dev_block_kobj);
block_kobj_err: block_kobj_err:
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#define pr_fmt(fmt) "OF: " fmt #define pr_fmt(fmt) "OF: " fmt
#include <linux/device.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/slab.h> #include <linux/slab.h>
...@@ -667,6 +668,17 @@ void of_changeset_destroy(struct of_changeset *ocs) ...@@ -667,6 +668,17 @@ void of_changeset_destroy(struct of_changeset *ocs)
{ {
struct of_changeset_entry *ce, *cen; struct of_changeset_entry *ce, *cen;
/*
* When a device is deleted, the device links to/from it are also queued
* for deletion. Until these device links are freed, the devices
* themselves aren't freed. If the device being deleted is due to an
* overlay change, this device might be holding a reference to a device
* node that will be freed. So, wait until all already pending device
* links are deleted before freeing a device node. This ensures we don't
* free any device node that has a non-zero reference count.
*/
device_link_wait_removal();
list_for_each_entry_safe_reverse(ce, cen, &ocs->entries, node) list_for_each_entry_safe_reverse(ce, cen, &ocs->entries, node)
__of_changeset_entry_destroy(ce); __of_changeset_entry_destroy(ce);
} }
......
...@@ -16,6 +16,14 @@ ssize_t of_modalias(const struct device_node *np, char *str, ssize_t len) ...@@ -16,6 +16,14 @@ ssize_t of_modalias(const struct device_node *np, char *str, ssize_t len)
ssize_t csize; ssize_t csize;
ssize_t tsize; ssize_t tsize;
/*
* Prevent a kernel oops in vsnprintf() -- it only allows passing a
* NULL ptr when the length is also 0. Also filter out the negative
* lengths...
*/
if ((len > 0 && !str) || len < 0)
return -EINVAL;
/* Name & Type */ /* Name & Type */
/* %p eats all alphanum characters, so %c must be used here */ /* %p eats all alphanum characters, so %c must be used here */
csize = snprintf(str, len, "of:N%pOFn%c%s", np, 'T', csize = snprintf(str, len, "of:N%pOFn%c%s", np, 'T',
......
...@@ -1247,6 +1247,7 @@ void device_link_del(struct device_link *link); ...@@ -1247,6 +1247,7 @@ void device_link_del(struct device_link *link);
void device_link_remove(void *consumer, struct device *supplier); void device_link_remove(void *consumer, struct device *supplier);
void device_links_supplier_sync_state_pause(void); void device_links_supplier_sync_state_pause(void);
void device_links_supplier_sync_state_resume(void); void device_links_supplier_sync_state_resume(void);
void device_link_wait_removal(void);
/* Create alias, so I can be autoloaded. */ /* Create alias, so I can be autoloaded. */
#define MODULE_ALIAS_CHARDEV(major,minor) \ #define MODULE_ALIAS_CHARDEV(major,minor) \
......
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