diff options
author | LCPD Auto Merger | 2020-12-15 13:49:35 -0600 |
---|---|---|
committer | LCPD Auto Merger | 2020-12-15 13:49:35 -0600 |
commit | 308ea579aed3cef3629be124c9cdea5b4c36eac0 (patch) | |
tree | f42a0283cb51113fd102bbd0c0fc9261d24a1e8f | |
parent | a859b16c71c3fc11b43ac895c7ec830f9d9f932a (diff) | |
parent | 6f666d2f8bfd54e845ed665031e00a48c35e69eb (diff) | |
download | kernel-308ea579aed3cef3629be124c9cdea5b4c36eac0.tar.gz kernel-308ea579aed3cef3629be124c9cdea5b4c36eac0.tar.xz kernel-308ea579aed3cef3629be124c9cdea5b4c36eac0.zip |
Merged TI feature connectivity into ti-linux-5.4.y
TI-Feature: connectivity
TI-Branch: connectivity-ti-linux-5.4.y
* 'connectivity-ti-linux-5.4.y' of ssh://bitbucket.itg.ti.com/lcpdpublicdom/connectivity:
arm64: dst: ti: k3-am64-base-board: add cpsw3g cpts pps support
arm64: dts: ti: k3-am64-main: add timesync router node
dt-bindings: usb: Fix USB dt-bindings for AM64 SoC
net: ethernet: ti: icss_iep: Fix reading of capture registers
net: ethernet: ti: icss_iep: Register ptp_clock in iep_init
net: ethernet: ti: prueth: Allow for requesting ts capabilities before interface is up
net: ethernet: ti: icss_iep: Add checks for NULL pointer
arm64: dts: ti: k3-am642-evm: Add gpio-line-names property for GPIO expander
arm64: dts: ti: k3-am642-evm: Add OSPI flash node
arm64: dts: ti: k3-am64-main: Add FSS and OSPI DT nodes
mtd: spi-nor: Fix SMPT parsing when 4BAIT table is before SMPT
spi: cadence-quadspi: Check if the pattern is present before tuning PHY
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
-rw-r--r-- | Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml | 11 | ||||
-rw-r--r-- | arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 33 | ||||
-rw-r--r-- | arch/arm64/boot/dts/ti/k3-am642-evm.dts | 73 | ||||
-rw-r--r-- | drivers/mtd/spi-nor/spi-nor.c | 15 | ||||
-rw-r--r-- | drivers/net/ethernet/ti/icss_iep.c | 46 | ||||
-rw-r--r-- | drivers/net/ethernet/ti/prueth_core.c | 7 | ||||
-rw-r--r-- | drivers/spi/spi-cadence-quadspi.c | 13 |
7 files changed, 167 insertions, 31 deletions
diff --git a/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml b/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml index ee300a9478a0..3b58a6cc13df 100644 --- a/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml +++ b/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml | |||
@@ -11,11 +11,12 @@ maintainers: | |||
11 | 11 | ||
12 | properties: | 12 | properties: |
13 | compatible: | 13 | compatible: |
14 | anyOf: | 14 | oneOf: |
15 | - const: ti,j721e-usb | ||
16 | - const: ti,am64-usb | ||
15 | - items: | 17 | - items: |
16 | - const: ti,j721e-usb | 18 | - const: ti,am64-usb |
17 | - items: | 19 | - const: ti,j721e-usb |
18 | - const: ti,am64-usb | ||
19 | 20 | ||
20 | reg: | 21 | reg: |
21 | description: module registers | 22 | description: module registers |
@@ -56,6 +57,8 @@ required: | |||
56 | - clocks | 57 | - clocks |
57 | - clock-names | 58 | - clock-names |
58 | 59 | ||
60 | additionalProperties: true | ||
61 | |||
59 | examples: | 62 | examples: |
60 | - | | 63 | - | |
61 | #include <dt-bindings/soc/ti,sci_pm_domain.h> | 64 | #include <dt-bindings/soc/ti,sci_pm_domain.h> |
diff --git a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi index d63a32e0356d..1519b58b908b 100644 --- a/arch/arm64/boot/dts/ti/k3-am64-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am64-main.dtsi | |||
@@ -668,4 +668,37 @@ | |||
668 | ti,otap-del-sel-ddr50 = <0x9>; | 668 | ti,otap-del-sel-ddr50 = <0x9>; |
669 | ti,clkbuf-sel = <0x7>; | 669 | ti,clkbuf-sel = <0x7>; |
670 | }; | 670 | }; |
671 | |||
672 | fss: bus@fc00000 { | ||
673 | compatible = "simple-bus"; | ||
674 | reg = <0x00 0x0fc00000 0x00 0x70000>; | ||
675 | #address-cells = <2>; | ||
676 | #size-cells = <2>; | ||
677 | ranges; | ||
678 | |||
679 | ospi0: spi@fc40000 { | ||
680 | compatible = "ti,am654-ospi", "cdns,qspi-nor"; | ||
681 | reg = <0x00 0x0fc40000 0x00 0x100>, | ||
682 | <0x05 0x00000000 0x01 0x00000000>; | ||
683 | interrupts = <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>; | ||
684 | cdns,fifo-depth = <256>; | ||
685 | cdns,fifo-width = <4>; | ||
686 | cdns,trigger-address = <0x0>; | ||
687 | #address-cells = <0x1>; | ||
688 | #size-cells = <0x0>; | ||
689 | clocks = <&k3_clks 75 6>; | ||
690 | assigned-clocks = <&k3_clks 75 6>; | ||
691 | assigned-clock-parents = <&k3_clks 75 7>; | ||
692 | assigned-clock-rates = <166666666>; | ||
693 | power-domains = <&k3_pds 75 TI_SCI_PD_EXCLUSIVE>; | ||
694 | }; | ||
695 | }; | ||
696 | |||
697 | timesync_router: timesync-router@a40000 { | ||
698 | compatible = "pinctrl-single"; | ||
699 | reg = <0x0 0xa40000 0x0 0x800>; | ||
700 | #pinctrl-cells = <1>; | ||
701 | pinctrl-single,register-width = <32>; | ||
702 | pinctrl-single,function-mask = <0x000107ff>; | ||
703 | }; | ||
671 | }; | 704 | }; |
diff --git a/arch/arm64/boot/dts/ti/k3-am642-evm.dts b/arch/arm64/boot/dts/ti/k3-am642-evm.dts index 26aee1d42c8b..47d0d26b3c8b 100644 --- a/arch/arm64/boot/dts/ti/k3-am642-evm.dts +++ b/arch/arm64/boot/dts/ti/k3-am642-evm.dts | |||
@@ -341,6 +341,22 @@ | |||
341 | AM64X_IOPAD(0x0144, PIN_OUTPUT, 4) /* (Y11) PRG1_PRU1_GPO15.RGMII2_TX_CTL */ | 341 | AM64X_IOPAD(0x0144, PIN_OUTPUT, 4) /* (Y11) PRG1_PRU1_GPO15.RGMII2_TX_CTL */ |
342 | >; | 342 | >; |
343 | }; | 343 | }; |
344 | |||
345 | ospi0_pins_default: ospi0-pins-default { | ||
346 | pinctrl-single,pins = < | ||
347 | AM64X_IOPAD(0x0000, PIN_OUTPUT, 0) /* (N20) OSPI0_CLK */ | ||
348 | AM64X_IOPAD(0x002c, PIN_OUTPUT, 0) /* (L19) OSPI0_CSn0 */ | ||
349 | AM64X_IOPAD(0x000c, PIN_INPUT, 0) /* (M19) OSPI0_D0 */ | ||
350 | AM64X_IOPAD(0x0010, PIN_INPUT, 0) /* (M18) OSPI0_D1 */ | ||
351 | AM64X_IOPAD(0x0014, PIN_INPUT, 0) /* (M20) OSPI0_D2 */ | ||
352 | AM64X_IOPAD(0x0018, PIN_INPUT, 0) /* (M21) OSPI0_D3 */ | ||
353 | AM64X_IOPAD(0x001c, PIN_INPUT, 0) /* (P21) OSPI0_D4 */ | ||
354 | AM64X_IOPAD(0x0020, PIN_INPUT, 0) /* (P20) OSPI0_D5 */ | ||
355 | AM64X_IOPAD(0x0024, PIN_INPUT, 0) /* (N18) OSPI0_D6 */ | ||
356 | AM64X_IOPAD(0x0028, PIN_INPUT, 0) /* (M17) OSPI0_D7 */ | ||
357 | AM64X_IOPAD(0x0008, PIN_INPUT, 0) /* (N19) OSPI0_DQS */ | ||
358 | >; | ||
359 | }; | ||
344 | }; | 360 | }; |
345 | 361 | ||
346 | &cpsw3g { | 362 | &cpsw3g { |
@@ -348,6 +364,10 @@ | |||
348 | pinctrl-0 = <&mdio1_pins_default | 364 | pinctrl-0 = <&mdio1_pins_default |
349 | &rgmii1_pins_default | 365 | &rgmii1_pins_default |
350 | &rgmii2_pins_default>; | 366 | &rgmii2_pins_default>; |
367 | |||
368 | cpts@3d000 { | ||
369 | ti,pps = <7 1>; | ||
370 | }; | ||
351 | }; | 371 | }; |
352 | 372 | ||
353 | &cpsw_port1 { | 373 | &cpsw_port1 { |
@@ -368,6 +388,23 @@ | |||
368 | }; | 388 | }; |
369 | }; | 389 | }; |
370 | 390 | ||
391 | #define TS_OFFSET(pa, val) (0x4+(pa)*4) (0x10000 | val) | ||
392 | |||
393 | ×ync_router { | ||
394 | pinctrl-names = "default"; | ||
395 | pinctrl-0 = <&mcu_cpts_pps>; | ||
396 | |||
397 | /* Example of the timesync routing */ | ||
398 | mcu_cpts_pps: mcu-cpts-pps { | ||
399 | pinctrl-single,pins = < | ||
400 | /* pps [cpts genf1] in22 -> out37 [cpts hw8_push] */ | ||
401 | TS_OFFSET(37, 22) | ||
402 | /* pps [cpts genf1] in22 -> out25 [SYNC1_OUT pin] */ | ||
403 | TS_OFFSET(25, 22) | ||
404 | >; | ||
405 | }; | ||
406 | }; | ||
407 | |||
371 | &usbss0 { | 408 | &usbss0 { |
372 | ti,vbus-divider; | 409 | ti,vbus-divider; |
373 | ti,usb2-only; | 410 | ti,usb2-only; |
@@ -390,6 +427,16 @@ | |||
390 | reg = <0x22>; | 427 | reg = <0x22>; |
391 | gpio-controller; | 428 | gpio-controller; |
392 | #gpio-cells = <2>; | 429 | #gpio-cells = <2>; |
430 | gpio-line-names = "GPIO_eMMC_RSTn", "CAN_MUX_SEL", | ||
431 | "GPIO_CPSW1_RST", "GPIO_RGMII1_RST", | ||
432 | "GPIO_RGMII2_RST", "GPIO_PCIe_RST_OUT", | ||
433 | "MMC1_SD_EN", "FSI_FET_SEL", | ||
434 | "MCAN0_STB_3V3", "MCAN1_STB_3V3", | ||
435 | "CPSW_FET_SEL", "CPSW_FET2_SEL", | ||
436 | "PRG1_RGMII2_FET_SEL", "TEST_GPIO2", | ||
437 | "GPIO_OLED_RESETn", "VPP_LDO_EN", | ||
438 | "TEST_LED1", "TP92", "TP90", "TP88", | ||
439 | "TP87", "TP86", "TP89", "TP91"; | ||
393 | }; | 440 | }; |
394 | 441 | ||
395 | }; | 442 | }; |
@@ -411,3 +458,29 @@ | |||
411 | ti,driver-strength-ohm = <50>; | 458 | ti,driver-strength-ohm = <50>; |
412 | disable-wp; | 459 | disable-wp; |
413 | }; | 460 | }; |
461 | |||
462 | &ospi0 { | ||
463 | pinctrl-names = "default"; | ||
464 | pinctrl-0 = <&ospi0_pins_default>; | ||
465 | |||
466 | flash@0{ | ||
467 | compatible = "jedec,spi-nor"; | ||
468 | reg = <0x0>; | ||
469 | spi-tx-bus-width = <8>; | ||
470 | spi-rx-bus-width = <8>; | ||
471 | spi-max-frequency = <25000000>; | ||
472 | cdns,tshsl-ns = <60>; | ||
473 | cdns,tsd2d-ns = <60>; | ||
474 | cdns,tchsh-ns = <60>; | ||
475 | cdns,tslch-ns = <60>; | ||
476 | cdns,read-delay = <4>; | ||
477 | cdns,phy-mode; | ||
478 | #address-cells = <1>; | ||
479 | #size-cells = <1>; | ||
480 | |||
481 | partition@3fc0000 { | ||
482 | label = "ospi.phypattern"; | ||
483 | reg = <0x3fc0000 0x40000>; | ||
484 | }; | ||
485 | }; | ||
486 | }; | ||
diff --git a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c index 29b97130bdb4..4d7d3e02b533 100644 --- a/drivers/mtd/spi-nor/spi-nor.c +++ b/drivers/mtd/spi-nor/spi-nor.c | |||
@@ -4671,6 +4671,7 @@ out: | |||
4671 | static int spi_nor_parse_sfdp(struct spi_nor *nor, | 4671 | static int spi_nor_parse_sfdp(struct spi_nor *nor, |
4672 | struct spi_nor_flash_parameter *params) | 4672 | struct spi_nor_flash_parameter *params) |
4673 | { | 4673 | { |
4674 | const struct sfdp_parameter_header *sfdp_4bait_param_header = NULL; | ||
4674 | const struct sfdp_parameter_header *param_header, *bfpt_header; | 4675 | const struct sfdp_parameter_header *param_header, *bfpt_header; |
4675 | struct sfdp_parameter_header *param_headers = NULL; | 4676 | struct sfdp_parameter_header *param_headers = NULL; |
4676 | struct sfdp_header header; | 4677 | struct sfdp_header header; |
@@ -4752,7 +4753,13 @@ static int spi_nor_parse_sfdp(struct spi_nor *nor, | |||
4752 | break; | 4753 | break; |
4753 | 4754 | ||
4754 | case SFDP_4BAIT_ID: | 4755 | case SFDP_4BAIT_ID: |
4755 | err = spi_nor_parse_4bait(nor, param_header, params); | 4756 | /* |
4757 | * Parse 4BAIT table at the end as this will end up | ||
4758 | * changing nor->addr_width obtained from BFPT. | ||
4759 | * But other parsers, such as SMPT parser, need to | ||
4760 | * know default/current addr_width of the flash. | ||
4761 | */ | ||
4762 | sfdp_4bait_param_header = param_header; | ||
4756 | break; | 4763 | break; |
4757 | 4764 | ||
4758 | case SFDP_PROFILE1_ID: | 4765 | case SFDP_PROFILE1_ID: |
@@ -4776,6 +4783,12 @@ static int spi_nor_parse_sfdp(struct spi_nor *nor, | |||
4776 | } | 4783 | } |
4777 | } | 4784 | } |
4778 | 4785 | ||
4786 | if (sfdp_4bait_param_header && | ||
4787 | spi_nor_parse_4bait(nor, sfdp_4bait_param_header, params)) { | ||
4788 | dev_warn(dev, "Failed to parse optional parameter table: %04x\n", | ||
4789 | SFDP_PARAM_HEADER_ID(param_header)); | ||
4790 | } | ||
4791 | |||
4779 | exit: | 4792 | exit: |
4780 | kfree(param_headers); | 4793 | kfree(param_headers); |
4781 | return err; | 4794 | return err; |
diff --git a/drivers/net/ethernet/ti/icss_iep.c b/drivers/net/ethernet/ti/icss_iep.c index d37b62160032..bb6c8f331d04 100644 --- a/drivers/net/ethernet/ti/icss_iep.c +++ b/drivers/net/ethernet/ti/icss_iep.c | |||
@@ -139,7 +139,7 @@ int icss_iep_get_count_hi(struct icss_iep *iep) | |||
139 | { | 139 | { |
140 | u32 val = 0; | 140 | u32 val = 0; |
141 | 141 | ||
142 | if (iep->plat_data->flags & ICSS_IEP_64BIT_COUNTER_SUPPORT) | 142 | if (iep && (iep->plat_data->flags & ICSS_IEP_64BIT_COUNTER_SUPPORT)) |
143 | regmap_read(iep->map, ICSS_IEP_COUNT_REG1, &val); | 143 | regmap_read(iep->map, ICSS_IEP_COUNT_REG1, &val); |
144 | 144 | ||
145 | return val; | 145 | return val; |
@@ -154,9 +154,10 @@ EXPORT_SYMBOL_GPL(icss_iep_get_count_hi); | |||
154 | */ | 154 | */ |
155 | int icss_iep_get_count_low(struct icss_iep *iep) | 155 | int icss_iep_get_count_low(struct icss_iep *iep) |
156 | { | 156 | { |
157 | u32 val; | 157 | u32 val = 0; |
158 | 158 | ||
159 | regmap_read(iep->map, ICSS_IEP_COUNT_REG0, &val); | 159 | if (iep) |
160 | regmap_read(iep->map, ICSS_IEP_COUNT_REG0, &val); | ||
160 | 161 | ||
161 | return val; | 162 | return val; |
162 | } | 163 | } |
@@ -170,7 +171,10 @@ EXPORT_SYMBOL_GPL(icss_iep_get_count_low); | |||
170 | */ | 171 | */ |
171 | struct ptp_clock *icss_iep_get_ptp_clock(struct icss_iep *iep) | 172 | struct ptp_clock *icss_iep_get_ptp_clock(struct icss_iep *iep) |
172 | { | 173 | { |
173 | return iep->ptp_clock; | 174 | if (iep) |
175 | return iep->ptp_clock; | ||
176 | else | ||
177 | return NULL; | ||
174 | } | 178 | } |
175 | EXPORT_SYMBOL_GPL(icss_iep_get_ptp_clock); | 179 | EXPORT_SYMBOL_GPL(icss_iep_get_ptp_clock); |
176 | 180 | ||
@@ -518,8 +522,8 @@ exit: | |||
518 | static irqreturn_t icss_iep_cap_cmp_handler(int irq, void *dev_id) | 522 | static irqreturn_t icss_iep_cap_cmp_handler(int irq, void *dev_id) |
519 | { | 523 | { |
520 | struct icss_iep *iep = (struct icss_iep *)dev_id; | 524 | struct icss_iep *iep = (struct icss_iep *)dev_id; |
525 | unsigned int val, index = 0, i, sts; | ||
521 | struct ptp_clock_event pevent; | 526 | struct ptp_clock_event pevent; |
522 | unsigned int val, index = 0, i; | ||
523 | irqreturn_t ret = IRQ_NONE; | 527 | irqreturn_t ret = IRQ_NONE; |
524 | u64 ns; | 528 | u64 ns; |
525 | 529 | ||
@@ -544,12 +548,12 @@ static irqreturn_t icss_iep_cap_cmp_handler(int irq, void *dev_id) | |||
544 | ret = IRQ_HANDLED; | 548 | ret = IRQ_HANDLED; |
545 | } | 549 | } |
546 | 550 | ||
547 | regmap_read(iep->map, ICSS_IEP_CAPTURE_STAT_REG, &val); | 551 | regmap_read(iep->map, ICSS_IEP_CAPTURE_STAT_REG, &sts); |
548 | if (!val) | 552 | if (!sts) |
549 | return ret; | 553 | return ret; |
550 | 554 | ||
551 | for (i = 0; i < iep->ptp_info.n_ext_ts; i++) { | 555 | for (i = 0; i < iep->ptp_info.n_ext_ts; i++) { |
552 | if (val & IEP_CAP_CFG_CAPNR_1ST_EVENT_EN(i)) { | 556 | if (sts & IEP_CAP_CFG_CAPNR_1ST_EVENT_EN(i * 2)) { |
553 | regmap_read(iep->map, ICSS_IEP_CAP6_RISE_REG0 + (i * 2), &val); | 557 | regmap_read(iep->map, ICSS_IEP_CAP6_RISE_REG0 + (i * 2), &val); |
554 | ns = val; | 558 | ns = val; |
555 | regmap_read(iep->map, ICSS_IEP_CAP6_RISE_REG0 + (i * 2) + 1, &val); | 559 | regmap_read(iep->map, ICSS_IEP_CAP6_RISE_REG0 + (i * 2) + 1, &val); |
@@ -734,19 +738,8 @@ struct icss_iep *icss_iep_get(struct device_node *np) | |||
734 | if (iep->cap_cmp_irq || (iep->ops && iep->ops->extts_enable)) | 738 | if (iep->cap_cmp_irq || (iep->ops && iep->ops->extts_enable)) |
735 | iep->ptp_info.n_ext_ts = 2; | 739 | iep->ptp_info.n_ext_ts = 2; |
736 | 740 | ||
737 | iep->ptp_clock = ptp_clock_register(&iep->ptp_info, iep->dev); | ||
738 | if (IS_ERR(iep->ptp_clock)) { | ||
739 | ret = PTR_ERR(iep->ptp_clock); | ||
740 | iep->ptp_clock = NULL; | ||
741 | dev_err(iep->dev, "Failed to register ptp clk %d\n", ret); | ||
742 | goto err_ptp_irq; | ||
743 | } | ||
744 | |||
745 | return iep; | 741 | return iep; |
746 | 742 | ||
747 | err_ptp_irq: | ||
748 | if (iep->cap_cmp_irq) | ||
749 | free_irq(iep->cap_cmp_irq, iep); | ||
750 | put_iep_device: | 743 | put_iep_device: |
751 | put_device(iep->dev); | 744 | put_device(iep->dev); |
752 | 745 | ||
@@ -761,8 +754,6 @@ void icss_iep_put(struct icss_iep *iep) | |||
761 | device_unlock(iep->dev); | 754 | device_unlock(iep->dev); |
762 | put_device(iep->dev); | 755 | put_device(iep->dev); |
763 | iep->cap_cmp_irq = 0; | 756 | iep->cap_cmp_irq = 0; |
764 | if (iep->ptp_clock) | ||
765 | ptp_clock_unregister(iep->ptp_clock); | ||
766 | if (iep->cap_cmp_irq) { | 757 | if (iep->cap_cmp_irq) { |
767 | free_irq(iep->cap_cmp_irq, iep); | 758 | free_irq(iep->cap_cmp_irq, iep); |
768 | hrtimer_cancel(&iep->sync_timer); | 759 | hrtimer_cancel(&iep->sync_timer); |
@@ -774,6 +765,7 @@ int icss_iep_init(struct icss_iep *iep, const struct icss_iep_clockops *clkops, | |||
774 | void *clockops_data, u32 cycle_time_ns) | 765 | void *clockops_data, u32 cycle_time_ns) |
775 | { | 766 | { |
776 | u32 def_inc; | 767 | u32 def_inc; |
768 | int ret = 0; | ||
777 | 769 | ||
778 | def_inc = NSEC_PER_SEC / iep->refclk_freq; /* ns per clock tick */ | 770 | def_inc = NSEC_PER_SEC / iep->refclk_freq; /* ns per clock tick */ |
779 | if (def_inc > IEP_MAX_DEF_INC) | 771 | if (def_inc > IEP_MAX_DEF_INC) |
@@ -799,12 +791,22 @@ int icss_iep_init(struct icss_iep *iep, const struct icss_iep_clockops *clkops, | |||
799 | icss_iep_set_counter(iep, 0); | 791 | icss_iep_set_counter(iep, 0); |
800 | 792 | ||
801 | iep->clk_tick_time = def_inc; | 793 | iep->clk_tick_time = def_inc; |
802 | return 0; | 794 | |
795 | iep->ptp_clock = ptp_clock_register(&iep->ptp_info, iep->dev); | ||
796 | if (IS_ERR(iep->ptp_clock)) { | ||
797 | ret = PTR_ERR(iep->ptp_clock); | ||
798 | iep->ptp_clock = NULL; | ||
799 | dev_err(iep->dev, "Failed to register ptp clk %d\n", ret); | ||
800 | } | ||
801 | |||
802 | return ret; | ||
803 | } | 803 | } |
804 | EXPORT_SYMBOL_GPL(icss_iep_init); | 804 | EXPORT_SYMBOL_GPL(icss_iep_init); |
805 | 805 | ||
806 | int icss_iep_exit(struct icss_iep *iep) | 806 | int icss_iep_exit(struct icss_iep *iep) |
807 | { | 807 | { |
808 | if (iep->ptp_clock) | ||
809 | ptp_clock_unregister(iep->ptp_clock); | ||
808 | icss_iep_disable(iep); | 810 | icss_iep_disable(iep); |
809 | 811 | ||
810 | return 0; | 812 | return 0; |
diff --git a/drivers/net/ethernet/ti/prueth_core.c b/drivers/net/ethernet/ti/prueth_core.c index b77330822cd4..b3a296516feb 100644 --- a/drivers/net/ethernet/ti/prueth_core.c +++ b/drivers/net/ethernet/ti/prueth_core.c | |||
@@ -2766,6 +2766,7 @@ static int emac_get_ts_info(struct net_device *ndev, | |||
2766 | struct ethtool_ts_info *info) | 2766 | struct ethtool_ts_info *info) |
2767 | { | 2767 | { |
2768 | struct prueth_emac *emac = netdev_priv(ndev); | 2768 | struct prueth_emac *emac = netdev_priv(ndev); |
2769 | struct ptp_clock *ptp; | ||
2769 | 2770 | ||
2770 | if ((PRUETH_IS_EMAC(emac->prueth) && !emac->emac_ptp_tx_irq) || | 2771 | if ((PRUETH_IS_EMAC(emac->prueth) && !emac->emac_ptp_tx_irq) || |
2771 | (PRUETH_IS_LRE(emac->prueth) && !emac->hsr_ptp_tx_irq)) | 2772 | (PRUETH_IS_LRE(emac->prueth) && !emac->hsr_ptp_tx_irq)) |
@@ -2779,7 +2780,11 @@ static int emac_get_ts_info(struct net_device *ndev, | |||
2779 | SOF_TIMESTAMPING_SOFTWARE | | 2780 | SOF_TIMESTAMPING_SOFTWARE | |
2780 | SOF_TIMESTAMPING_RAW_HARDWARE; | 2781 | SOF_TIMESTAMPING_RAW_HARDWARE; |
2781 | 2782 | ||
2782 | info->phc_index = ptp_clock_index(icss_iep_get_ptp_clock(emac->prueth->iep)); | 2783 | ptp = icss_iep_get_ptp_clock(emac->prueth->iep); |
2784 | if (ptp) | ||
2785 | info->phc_index = ptp_clock_index(ptp); | ||
2786 | else | ||
2787 | info->phc_index = -1; | ||
2783 | info->tx_types = BIT(HWTSTAMP_TX_OFF) | BIT(HWTSTAMP_TX_ON); | 2788 | info->tx_types = BIT(HWTSTAMP_TX_OFF) | BIT(HWTSTAMP_TX_ON); |
2784 | info->rx_filters = BIT(HWTSTAMP_FILTER_NONE) | BIT(HWTSTAMP_FILTER_PTP_V2_EVENT); | 2789 | info->rx_filters = BIT(HWTSTAMP_FILTER_NONE) | BIT(HWTSTAMP_FILTER_PTP_V2_EVENT); |
2785 | 2790 | ||
diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c index d7ad8b198a11..648c280a19ac 100644 --- a/drivers/spi/spi-cadence-quadspi.c +++ b/drivers/spi/spi-cadence-quadspi.c | |||
@@ -2054,9 +2054,16 @@ static void cqspi_mem_phy_op(struct spi_mem *mem, | |||
2054 | 2054 | ||
2055 | f_pdata->phy_read_op = *op; | 2055 | f_pdata->phy_read_op = *op; |
2056 | 2056 | ||
2057 | ret = cqspi_phy_calibrate(f_pdata, mem); | 2057 | if (cqspi_phy_check_pattern(f_pdata, mem)) { |
2058 | if (ret) | 2058 | dev_dbg(&cqspi->pdev->dev, |
2059 | dev_info(&cqspi->pdev->dev, "PHY calibration failed: %d\n", ret); | 2059 | "PHY calibration pattern not found. Falling back to slow read speeds.\n"); |
2060 | } else { | ||
2061 | ret = cqspi_phy_calibrate(f_pdata, mem); | ||
2062 | if (ret) | ||
2063 | dev_warn(&cqspi->pdev->dev, | ||
2064 | "PHY calibration failed: %d. Falling back to slow read speeds.\n", | ||
2065 | ret); | ||
2066 | } | ||
2060 | } | 2067 | } |
2061 | 2068 | ||
2062 | static int cqspi_of_get_flash_pdata(struct platform_device *pdev, | 2069 | static int cqspi_of_get_flash_pdata(struct platform_device *pdev, |