aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2019-05-20 11:33:03 -0400
committerTony Lindgren <tony@atomide.com>2019-05-20 11:33:03 -0400
commit4ee23cd76c0ce8622976b3da0e2bc89e6d94f6d4 (patch)
treee5b450b8531cc34d4eb5a4e50c9dee064c840ef7
parentf29f24b5568fd6169e0363c78f1a80db38d0e7e9 (diff)
parente4f50c8d1047e2c3b6fcf9edc22a26469f72eeb7 (diff)
Merge branch 'omap-for-v5.2/ti-sysc' into fixes
-rw-r--r--arch/arm/boot/dts/am33xx-l4.dtsi14
-rw-r--r--arch/arm/boot/dts/am437x-l4.dtsi4
-rw-r--r--drivers/bus/ti-sysc.c23
3 files changed, 17 insertions, 24 deletions
diff --git a/arch/arm/boot/dts/am33xx-l4.dtsi b/arch/arm/boot/dts/am33xx-l4.dtsi
index ca6d9f02a800..ced1a19d5f89 100644
--- a/arch/arm/boot/dts/am33xx-l4.dtsi
+++ b/arch/arm/boot/dts/am33xx-l4.dtsi
@@ -1759,11 +1759,10 @@
1759 target-module@cc000 { /* 0x481cc000, ap 60 46.0 */ 1759 target-module@cc000 { /* 0x481cc000, ap 60 46.0 */
1760 compatible = "ti,sysc-omap4", "ti,sysc"; 1760 compatible = "ti,sysc-omap4", "ti,sysc";
1761 ti,hwmods = "d_can0"; 1761 ti,hwmods = "d_can0";
1762 reg = <0xcc000 0x4>;
1763 reg-names = "rev";
1764 /* Domains (P, C): per_pwrdm, l4ls_clkdm */ 1762 /* Domains (P, C): per_pwrdm, l4ls_clkdm */
1765 clocks = <&l4ls_clkctrl AM3_L4LS_D_CAN0_CLKCTRL 0>; 1763 clocks = <&l4ls_clkctrl AM3_L4LS_D_CAN0_CLKCTRL 0>,
1766 clock-names = "fck"; 1764 <&dcan0_fck>;
1765 clock-names = "fck", "osc";
1767 #address-cells = <1>; 1766 #address-cells = <1>;
1768 #size-cells = <1>; 1767 #size-cells = <1>;
1769 ranges = <0x0 0xcc000 0x2000>; 1768 ranges = <0x0 0xcc000 0x2000>;
@@ -1782,11 +1781,10 @@
1782 target-module@d0000 { /* 0x481d0000, ap 62 42.0 */ 1781 target-module@d0000 { /* 0x481d0000, ap 62 42.0 */
1783 compatible = "ti,sysc-omap4", "ti,sysc"; 1782 compatible = "ti,sysc-omap4", "ti,sysc";
1784 ti,hwmods = "d_can1"; 1783 ti,hwmods = "d_can1";
1785 reg = <0xd0000 0x4>;
1786 reg-names = "rev";
1787 /* Domains (P, C): per_pwrdm, l4ls_clkdm */ 1784 /* Domains (P, C): per_pwrdm, l4ls_clkdm */
1788 clocks = <&l4ls_clkctrl AM3_L4LS_D_CAN1_CLKCTRL 0>; 1785 clocks = <&l4ls_clkctrl AM3_L4LS_D_CAN1_CLKCTRL 0>,
1789 clock-names = "fck"; 1786 <&dcan1_fck>;
1787 clock-names = "fck", "osc";
1790 #address-cells = <1>; 1788 #address-cells = <1>;
1791 #size-cells = <1>; 1789 #size-cells = <1>;
1792 ranges = <0x0 0xd0000 0x2000>; 1790 ranges = <0x0 0xd0000 0x2000>;
diff --git a/arch/arm/boot/dts/am437x-l4.dtsi b/arch/arm/boot/dts/am437x-l4.dtsi
index 85c6f4ff1824..989cb60b9029 100644
--- a/arch/arm/boot/dts/am437x-l4.dtsi
+++ b/arch/arm/boot/dts/am437x-l4.dtsi
@@ -1575,8 +1575,6 @@
1575 target-module@cc000 { /* 0x481cc000, ap 50 46.0 */ 1575 target-module@cc000 { /* 0x481cc000, ap 50 46.0 */
1576 compatible = "ti,sysc-omap4", "ti,sysc"; 1576 compatible = "ti,sysc-omap4", "ti,sysc";
1577 ti,hwmods = "d_can0"; 1577 ti,hwmods = "d_can0";
1578 reg = <0xcc000 0x4>;
1579 reg-names = "rev";
1580 /* Domains (P, C): per_pwrdm, l4ls_clkdm */ 1578 /* Domains (P, C): per_pwrdm, l4ls_clkdm */
1581 clocks = <&l4ls_clkctrl AM4_L4LS_D_CAN0_CLKCTRL 0>; 1579 clocks = <&l4ls_clkctrl AM4_L4LS_D_CAN0_CLKCTRL 0>;
1582 clock-names = "fck"; 1580 clock-names = "fck";
@@ -1596,8 +1594,6 @@
1596 target-module@d0000 { /* 0x481d0000, ap 52 3a.0 */ 1594 target-module@d0000 { /* 0x481d0000, ap 52 3a.0 */
1597 compatible = "ti,sysc-omap4", "ti,sysc"; 1595 compatible = "ti,sysc-omap4", "ti,sysc";
1598 ti,hwmods = "d_can1"; 1596 ti,hwmods = "d_can1";
1599 reg = <0xd0000 0x4>;
1600 reg-names = "rev";
1601 /* Domains (P, C): per_pwrdm, l4ls_clkdm */ 1597 /* Domains (P, C): per_pwrdm, l4ls_clkdm */
1602 clocks = <&l4ls_clkctrl AM4_L4LS_D_CAN1_CLKCTRL 0>; 1598 clocks = <&l4ls_clkctrl AM4_L4LS_D_CAN1_CLKCTRL 0>;
1603 clock-names = "fck"; 1599 clock-names = "fck";
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index 308475ed4b32..b72741668c92 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -660,12 +660,6 @@ static int sysc_check_registers(struct sysc *ddata)
660 nr_regs++; 660 nr_regs++;
661 } 661 }
662 662
663 if (nr_regs < 1) {
664 dev_err(ddata->dev, "missing registers\n");
665
666 return -EINVAL;
667 }
668
669 if (nr_matches > nr_regs) { 663 if (nr_matches > nr_regs) {
670 dev_err(ddata->dev, "overlapping registers: (%i/%i)", 664 dev_err(ddata->dev, "overlapping registers: (%i/%i)",
671 nr_regs, nr_matches); 665 nr_regs, nr_matches);
@@ -691,12 +685,18 @@ static int sysc_ioremap(struct sysc *ddata)
691{ 685{
692 int size; 686 int size;
693 687
694 size = max3(ddata->offsets[SYSC_REVISION], 688 if (ddata->offsets[SYSC_REVISION] < 0 &&
695 ddata->offsets[SYSC_SYSCONFIG], 689 ddata->offsets[SYSC_SYSCONFIG] < 0 &&
696 ddata->offsets[SYSC_SYSSTATUS]); 690 ddata->offsets[SYSC_SYSSTATUS] < 0) {
691 size = ddata->module_size;
692 } else {
693 size = max3(ddata->offsets[SYSC_REVISION],
694 ddata->offsets[SYSC_SYSCONFIG],
695 ddata->offsets[SYSC_SYSSTATUS]);
697 696
698 if (size < 0 || (size + sizeof(u32)) > ddata->module_size) 697 if ((size + sizeof(u32)) > ddata->module_size)
699 return -EINVAL; 698 return -EINVAL;
699 }
700 700
701 ddata->module_va = devm_ioremap(ddata->dev, 701 ddata->module_va = devm_ioremap(ddata->dev,
702 ddata->module_pa, 702 ddata->module_pa,
@@ -1128,7 +1128,6 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
1128 SYSC_QUIRK("cpgmac", 0, 0x1200, 0x1208, 0x1204, 0x4edb1902, 1128 SYSC_QUIRK("cpgmac", 0, 0x1200, 0x1208, 0x1204, 0x4edb1902,
1129 0xffff00f0, 0), 1129 0xffff00f0, 0),
1130 SYSC_QUIRK("dcan", 0, 0, -1, -1, 0xffffffff, 0xffffffff, 0), 1130 SYSC_QUIRK("dcan", 0, 0, -1, -1, 0xffffffff, 0xffffffff, 0),
1131 SYSC_QUIRK("dcan", 0, 0, -1, -1, 0x00001401, 0xffffffff, 0),
1132 SYSC_QUIRK("dmic", 0, 0, 0x10, -1, 0x50010000, 0xffffffff, 0), 1131 SYSC_QUIRK("dmic", 0, 0, 0x10, -1, 0x50010000, 0xffffffff, 0),
1133 SYSC_QUIRK("dwc3", 0, 0, 0x10, -1, 0x500a0200, 0xffffffff, 0), 1132 SYSC_QUIRK("dwc3", 0, 0, 0x10, -1, 0x500a0200, 0xffffffff, 0),
1134 SYSC_QUIRK("epwmss", 0, 0, 0x4, -1, 0x47400001, 0xffffffff, 0), 1133 SYSC_QUIRK("epwmss", 0, 0, 0x4, -1, 0x47400001, 0xffffffff, 0),