Commit 87c71dd6 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'soc-fixes-6.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull ARM SoC fixes from Arnd Bergmann:
 "There are only a handful of bugfixes this time, which feels almost too
  small, so I hope we are not missing something important.

   - One more mediatek dts warning fix after the previous larger set,
     this should finally result in a clean defconfig build.

   - TI OMAP dts fixes for a spurious hang on am335x and invalid data on
     DTA7

   - One DTS fix for ethernet on Oriange Pi Zero (Allwinner H616)

   - A regression fix for ti-sysc interconnect target module driver to
     not access registers after reset if srst_udelay quirk is needed

   - Reset controller driver fixes for a crash during error handling and
     a build warning"

* tag 'soc-fixes-6.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
  arm64: dts: mediatek: mt8395-genio-1200-evk: add interrupt-parent for mt6360
  ARM: dts: Fix occasional boot hang for am3 usb
  reset: Fix crash when freeing non-existent optional resets
  ARM: OMAP2+: Fix null pointer dereference and memory leak in omap_soc_device_init
  ARM: dts: dra7: Fix DRA7 L3 NoC node register size
  bus: ti-sysc: Flush posted write only after srst_udelay
  reset: hisilicon: hi6220: fix Wvoid-pointer-to-enum-cast warning
  arm64: dts: allwinner: h616: update emac for Orange Pi Zero 3
parents 1bddd45b fa3d6c71
...@@ -359,6 +359,7 @@ usb: target-module@47400000 { ...@@ -359,6 +359,7 @@ usb: target-module@47400000 {
<SYSC_IDLE_NO>, <SYSC_IDLE_NO>,
<SYSC_IDLE_SMART>, <SYSC_IDLE_SMART>,
<SYSC_IDLE_SMART_WKUP>; <SYSC_IDLE_SMART_WKUP>;
ti,sysc-delay-us = <2>;
clocks = <&l3s_clkctrl AM3_L3S_USB_OTG_HS_CLKCTRL 0>; clocks = <&l3s_clkctrl AM3_L3S_USB_OTG_HS_CLKCTRL 0>;
clock-names = "fck"; clock-names = "fck";
#address-cells = <1>; #address-cells = <1>;
......
...@@ -147,7 +147,7 @@ ocp: ocp { ...@@ -147,7 +147,7 @@ ocp: ocp {
l3-noc@44000000 { l3-noc@44000000 {
compatible = "ti,dra7-l3-noc"; compatible = "ti,dra7-l3-noc";
reg = <0x44000000 0x1000>, reg = <0x44000000 0x1000000>,
<0x45000000 0x1000>; <0x45000000 0x1000>;
interrupts-extended = <&crossbar_mpu GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>, interrupts-extended = <&crossbar_mpu GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>,
<&wakeupgen GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; <&wakeupgen GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
......
...@@ -793,11 +793,16 @@ void __init omap_soc_device_init(void) ...@@ -793,11 +793,16 @@ void __init omap_soc_device_init(void)
soc_dev_attr->machine = soc_name; soc_dev_attr->machine = soc_name;
soc_dev_attr->family = omap_get_family(); soc_dev_attr->family = omap_get_family();
if (!soc_dev_attr->family) {
kfree(soc_dev_attr);
return;
}
soc_dev_attr->revision = soc_rev; soc_dev_attr->revision = soc_rev;
soc_dev_attr->custom_attr_group = omap_soc_groups[0]; soc_dev_attr->custom_attr_group = omap_soc_groups[0];
soc_dev = soc_device_register(soc_dev_attr); soc_dev = soc_device_register(soc_dev_attr);
if (IS_ERR(soc_dev)) { if (IS_ERR(soc_dev)) {
kfree(soc_dev_attr->family);
kfree(soc_dev_attr); kfree(soc_dev_attr);
return; return;
} }
......
...@@ -68,10 +68,7 @@ &ehci1 { ...@@ -68,10 +68,7 @@ &ehci1 {
&emac0 { &emac0 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&ext_rgmii_pins>; pinctrl-0 = <&ext_rgmii_pins>;
phy-mode = "rgmii";
phy-handle = <&ext_rgmii_phy>; phy-handle = <&ext_rgmii_phy>;
allwinner,rx-delay-ps = <3100>;
allwinner,tx-delay-ps = <700>;
status = "okay"; status = "okay";
}; };
......
...@@ -13,6 +13,9 @@ / { ...@@ -13,6 +13,9 @@ / {
}; };
&emac0 { &emac0 {
allwinner,rx-delay-ps = <3100>;
allwinner,tx-delay-ps = <700>;
phy-mode = "rgmii";
phy-supply = <&reg_dcdce>; phy-supply = <&reg_dcdce>;
}; };
......
...@@ -13,6 +13,8 @@ / { ...@@ -13,6 +13,8 @@ / {
}; };
&emac0 { &emac0 {
allwinner,tx-delay-ps = <700>;
phy-mode = "rgmii-rxid";
phy-supply = <&reg_dldo1>; phy-supply = <&reg_dldo1>;
}; };
......
...@@ -238,6 +238,7 @@ &i2c6 { ...@@ -238,6 +238,7 @@ &i2c6 {
mt6360: pmic@34 { mt6360: pmic@34 {
compatible = "mediatek,mt6360"; compatible = "mediatek,mt6360";
reg = <0x34>; reg = <0x34>;
interrupt-parent = <&pio>;
interrupts = <128 IRQ_TYPE_EDGE_FALLING>; interrupts = <128 IRQ_TYPE_EDGE_FALLING>;
interrupt-names = "IRQB"; interrupt-names = "IRQB";
interrupt-controller; interrupt-controller;
......
...@@ -2158,13 +2158,23 @@ static int sysc_reset(struct sysc *ddata) ...@@ -2158,13 +2158,23 @@ static int sysc_reset(struct sysc *ddata)
sysc_val = sysc_read_sysconfig(ddata); sysc_val = sysc_read_sysconfig(ddata);
sysc_val |= sysc_mask; sysc_val |= sysc_mask;
sysc_write(ddata, sysc_offset, sysc_val); sysc_write(ddata, sysc_offset, sysc_val);
/* Flush posted write */
/*
* Some devices need a delay before reading registers
* after reset. Presumably a srst_udelay is not needed
* for devices that use a rstctrl register reset.
*/
if (ddata->cfg.srst_udelay)
fsleep(ddata->cfg.srst_udelay);
/*
* Flush posted write. For devices needing srst_udelay
* this should trigger an interconnect error if the
* srst_udelay value is needed but not configured.
*/
sysc_val = sysc_read_sysconfig(ddata); sysc_val = sysc_read_sysconfig(ddata);
} }
if (ddata->cfg.srst_udelay)
fsleep(ddata->cfg.srst_udelay);
if (ddata->post_reset_quirk) if (ddata->post_reset_quirk)
ddata->post_reset_quirk(ddata); ddata->post_reset_quirk(ddata);
......
...@@ -807,6 +807,9 @@ static void __reset_control_put_internal(struct reset_control *rstc) ...@@ -807,6 +807,9 @@ static void __reset_control_put_internal(struct reset_control *rstc)
{ {
lockdep_assert_held(&reset_list_mutex); lockdep_assert_held(&reset_list_mutex);
if (IS_ERR_OR_NULL(rstc))
return;
kref_put(&rstc->refcnt, __reset_control_release); kref_put(&rstc->refcnt, __reset_control_release);
} }
...@@ -1017,11 +1020,8 @@ EXPORT_SYMBOL_GPL(reset_control_put); ...@@ -1017,11 +1020,8 @@ EXPORT_SYMBOL_GPL(reset_control_put);
void reset_control_bulk_put(int num_rstcs, struct reset_control_bulk_data *rstcs) void reset_control_bulk_put(int num_rstcs, struct reset_control_bulk_data *rstcs)
{ {
mutex_lock(&reset_list_mutex); mutex_lock(&reset_list_mutex);
while (num_rstcs--) { while (num_rstcs--)
if (IS_ERR_OR_NULL(rstcs[num_rstcs].rstc))
continue;
__reset_control_put_internal(rstcs[num_rstcs].rstc); __reset_control_put_internal(rstcs[num_rstcs].rstc);
}
mutex_unlock(&reset_list_mutex); mutex_unlock(&reset_list_mutex);
} }
EXPORT_SYMBOL_GPL(reset_control_bulk_put); EXPORT_SYMBOL_GPL(reset_control_bulk_put);
......
...@@ -163,7 +163,7 @@ static int hi6220_reset_probe(struct platform_device *pdev) ...@@ -163,7 +163,7 @@ static int hi6220_reset_probe(struct platform_device *pdev)
if (!data) if (!data)
return -ENOMEM; return -ENOMEM;
type = (enum hi6220_reset_ctrl_type)of_device_get_match_data(dev); type = (uintptr_t)of_device_get_match_data(dev);
regmap = syscon_node_to_regmap(np); regmap = syscon_node_to_regmap(np);
if (IS_ERR(regmap)) { if (IS_ERR(regmap)) {
......
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