4 years agoMerged TI feature ti_linux_base_rt into ti-rt-linux-4.19.y-next ti-rt-linux-4.19.y-next-20190902
Merged TI feature ti_linux_base_rt into ti-rt-linux-4.19.y-next
TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel-next.git
TI-Branch: ti-linux-4.19.y-next
* 'ti-linux-4.19.y-next' of git.ti.com:ti-linux-kernel/ti-linux-kernel-next:
soc: ti: pruss: update pruss_get() to retrieve a PRUSS id
soc: ti: pruss: store the pruss instance id
remoteproc: Add a sysfs interface for name
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel-next.git
TI-Branch: ti-linux-4.19.y-next
* 'ti-linux-4.19.y-next' of git.ti.com:ti-linux-kernel/ti-linux-kernel-next:
soc: ti: pruss: update pruss_get() to retrieve a PRUSS id
soc: ti: pruss: store the pruss instance id
remoteproc: Add a sysfs interface for name
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
Merged TI feature rpmsg_next into ti-linux-4.19.y-next
TI-Feature: rpmsg_next
TI-Tree: git://git.ti.com/rpmsg/rpmsg.git
TI-Branch: rpmsg-ti-linux-4.19.y-next
* 'rpmsg-ti-linux-4.19.y-next' of git://git.ti.com/rpmsg/rpmsg:
soc: ti: pruss: update pruss_get() to retrieve a PRUSS id
soc: ti: pruss: store the pruss instance id
remoteproc: Add a sysfs interface for name
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
TI-Feature: rpmsg_next
TI-Tree: git://git.ti.com/rpmsg/rpmsg.git
TI-Branch: rpmsg-ti-linux-4.19.y-next
* 'rpmsg-ti-linux-4.19.y-next' of git://git.ti.com/rpmsg/rpmsg:
soc: ti: pruss: update pruss_get() to retrieve a PRUSS id
soc: ti: pruss: store the pruss instance id
remoteproc: Add a sysfs interface for name
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
Merged TI feature ti_linux_base_rt into ti-rt-linux-4.19.y
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
Revert "arm64: dts: k3-j721e-main: Add Support for UHS modes"
net: ti: icssg_prueth: Reduce verbosity of some debug messages
net: ti: icssg_classifier: Keep FT1 disabled for default and disabled
net: ti: icssg_prueth: Fix bug at ifdown under high ingress traffic
net: ti: prueth: Hook up net device's ioctl to phy_mii_ioctl()
net: ti: icssg_prueth: Hook up net device's ioctl to phy_mii_ioctl()
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
Revert "arm64: dts: k3-j721e-main: Add Support for UHS modes"
net: ti: icssg_prueth: Reduce verbosity of some debug messages
net: ti: icssg_classifier: Keep FT1 disabled for default and disabled
net: ti: icssg_prueth: Fix bug at ifdown under high ingress traffic
net: ti: prueth: Hook up net device's ioctl to phy_mii_ioctl()
net: ti: icssg_prueth: Hook up net device's ioctl to phy_mii_ioctl()
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
Merged TI feature connectivity into ti-linux-4.19.y
* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
Revert "arm64: dts: k3-j721e-main: Add Support for UHS modes"
net: ti: icssg_prueth: Reduce verbosity of some debug messages
net: ti: icssg_classifier: Keep FT1 disabled for default and disabled
net: ti: icssg_prueth: Fix bug at ifdown under high ingress traffic
net: ti: prueth: Hook up net device's ioctl to phy_mii_ioctl()
net: ti: icssg_prueth: Hook up net device's ioctl to phy_mii_ioctl()
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
Revert "arm64: dts: k3-j721e-main: Add Support for UHS modes"
net: ti: icssg_prueth: Reduce verbosity of some debug messages
net: ti: icssg_classifier: Keep FT1 disabled for default and disabled
net: ti: icssg_prueth: Fix bug at ifdown under high ingress traffic
net: ti: prueth: Hook up net device's ioctl to phy_mii_ioctl()
net: ti: icssg_prueth: Hook up net device's ioctl to phy_mii_ioctl()
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
Revert "arm64: dts: k3-j721e-main: Add Support for UHS modes"
This reverts commit 9d3fa7a802e14b79d42bf1ae4acded9b1b176b0b.
Failures after voltage switching have been observed with some Sandisk
SD cards with the latest recommended PHY values. Disable UHS modes until
this has been debugged.
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
This reverts commit 9d3fa7a802e14b79d42bf1ae4acded9b1b176b0b.
Failures after voltage switching have been observed with some Sandisk
SD cards with the latest recommended PHY values. Disable UHS modes until
this has been debugged.
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
net: ti: icssg_prueth: Reduce verbosity of some debug messages
Users don't really need to know the flow id base of the
RX channels. Use netdev_dbg() for those messages.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Users don't really need to know the flow id base of the
RX channels. Use netdev_dbg() for those messages.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
net: ti: icssg_classifier: Keep FT1 disabled for default and disabled
We don't need FT1 for default and disabled cases so keep
it disabled.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
We don't need FT1 for default and disabled cases so keep
it disabled.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
net: ti: icssg_prueth: Fix bug at ifdown under high ingress traffic
NOTE: I can still reproduce the bug. but more harder to reproduce
than before.
Now that PHY state machine is fixed at phy_stop
we can rely on that to stop traffic on wire.
The other option was to implement the shutdown command so
firmware stops processing packets but that is still TBD.
Fixes the following bug.
On EVM:
- iperf3 -s -D
On PC:
- iperf3 -c <evm ip> -u -b0 -i1 -t300
On EVM:
-[1] ifdown eth5
- ifup eth5
- sleep 5 (wait till link up)
- goto [1]
[ 50.534182] ------------[ cut here ]------------
[ 50.538828] k3_knav_desc_pool size 65536 != avail 65280
[ 50.538890] WARNING: CPU: 2 PID: 1082 at drivers/soc/ti/k3-navss-desc-pool.c:33 k3_knav_pool_destroy+0x11c/0x130
[ 50.554252] Modules linked in: rpmsg_proto ti_am335x_adc kfifo_buf icssg_prueth dwc3 omap_rng rng_core udc_core pru_rproc crc32_ce crct10dif_ce pruss irq_pruss_intc ti_k3_r5_remoteproc virtio_rpmsg_bus remot6
[ 50.592783] CPU: 2 PID: 1082 Comm: ifconfig Not tainted 4.19.59-00001-ge47dda560c33 #167
[ 50.600856] Hardware name: Texas Instruments AM654 Base Board (DT)
[ 50.607025] pstate: 40000005 (nZcv daif -PAN -UAO)
[ 50.611809] pc : k3_knav_pool_destroy+0x11c/0x130
[ 50.616503] lr : k3_knav_pool_destroy+0x11c/0x130
[ 50.621194] sp : ffff000012baf9f0
[ 50.624499] x29: ffff000012baf9f0 x28: ffff800845610000
[ 50.629803] x27: ffff800846b85e00 x26: ffff800841198000
[ 50.635107] x25: 0000000000001042 x24: 0000000000000000
[ 50.640411] x23: ffff800841198cf0 x22: ffff000002210058
[ 50.645715] x21: ffff800841198000 x20: 0000000000010000
[ 50.651018] x19: ffff800842609780 x18: 0000000000000000
[ 50.656322] x17: 0000000000000001 x16: 0000000000000007
[ 50.661625] x15: ffffffffffffffff x14: ffff000008c93648
[ 50.666929] x13: ffff000008d570d0 x12: ffff000008d56d16
[ 50.672232] x11: ffff000008ca9000 x10: ffff000012baf670
[ 50.677535] x9 : ffff000012baf9f0 x8 : 203d212036333535
[ 50.682839] x7 : ffff000008d56000 x6 : 00000000000001b7
[ 50.688142] x5 : 0000000000000000 x4 : ffff80087fad17e0
[ 50.693446] x3 : ffff80087fad17e0 x2 : 0000000000000007
[ 50.698749] x1 : b4f05b6436ac2100 x0 : 0000000000000000
[ 50.704053] Call trace:
[ 50.706494] k3_knav_pool_destroy+0x11c/0x130
[ 50.710853] prueth_cleanup_tx_chns+0x30/0x48 [icssg_prueth]
[ 50.716506] emac_ndo_stop+0x190/0x1f0 [icssg_prueth]
[ 50.721552] __dev_close_many+0x9c/0x118
[ 50.725469] __dev_change_flags+0xa8/0x1b8
[ 50.729556] dev_change_flags+0x20/0x60
[ 50.733386] devinet_ioctl+0x3f4/0x730
[ 50.737127] inet_ioctl+0xf8/0x268
[ 50.740526] sock_do_ioctl+0x48/0x1f8
[ 50.744181] sock_ioctl+0x1c0/0x3b8
[ 50.747666] do_vfs_ioctl+0xb8/0x890
[ 50.751233] ksys_ioctl+0x78/0xa8
[ 50.754541] __arm64_sys_ioctl+0x1c/0x28
[ 50.758457] el0_svc_common+0x90/0x158
[ 50.762198] el0_svc_handler+0x2c/0x80
[ 50.765939] el0_svc+0x8/0xc
[ 50.768811] ---[ end trace 3ff26d234f6778ad ]---
[ 50.773518] ------------[ cut here ]------------
[ 50.778130] kernel BUG at lib/genalloc.c:252!
Suggested-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
NOTE: I can still reproduce the bug. but more harder to reproduce
than before.
Now that PHY state machine is fixed at phy_stop
we can rely on that to stop traffic on wire.
The other option was to implement the shutdown command so
firmware stops processing packets but that is still TBD.
Fixes the following bug.
On EVM:
- iperf3 -s -D
On PC:
- iperf3 -c <evm ip> -u -b0 -i1 -t300
On EVM:
-[1] ifdown eth5
- ifup eth5
- sleep 5 (wait till link up)
- goto [1]
[ 50.534182] ------------[ cut here ]------------
[ 50.538828] k3_knav_desc_pool size 65536 != avail 65280
[ 50.538890] WARNING: CPU: 2 PID: 1082 at drivers/soc/ti/k3-navss-desc-pool.c:33 k3_knav_pool_destroy+0x11c/0x130
[ 50.554252] Modules linked in: rpmsg_proto ti_am335x_adc kfifo_buf icssg_prueth dwc3 omap_rng rng_core udc_core pru_rproc crc32_ce crct10dif_ce pruss irq_pruss_intc ti_k3_r5_remoteproc virtio_rpmsg_bus remot6
[ 50.592783] CPU: 2 PID: 1082 Comm: ifconfig Not tainted 4.19.59-00001-ge47dda560c33 #167
[ 50.600856] Hardware name: Texas Instruments AM654 Base Board (DT)
[ 50.607025] pstate: 40000005 (nZcv daif -PAN -UAO)
[ 50.611809] pc : k3_knav_pool_destroy+0x11c/0x130
[ 50.616503] lr : k3_knav_pool_destroy+0x11c/0x130
[ 50.621194] sp : ffff000012baf9f0
[ 50.624499] x29: ffff000012baf9f0 x28: ffff800845610000
[ 50.629803] x27: ffff800846b85e00 x26: ffff800841198000
[ 50.635107] x25: 0000000000001042 x24: 0000000000000000
[ 50.640411] x23: ffff800841198cf0 x22: ffff000002210058
[ 50.645715] x21: ffff800841198000 x20: 0000000000010000
[ 50.651018] x19: ffff800842609780 x18: 0000000000000000
[ 50.656322] x17: 0000000000000001 x16: 0000000000000007
[ 50.661625] x15: ffffffffffffffff x14: ffff000008c93648
[ 50.666929] x13: ffff000008d570d0 x12: ffff000008d56d16
[ 50.672232] x11: ffff000008ca9000 x10: ffff000012baf670
[ 50.677535] x9 : ffff000012baf9f0 x8 : 203d212036333535
[ 50.682839] x7 : ffff000008d56000 x6 : 00000000000001b7
[ 50.688142] x5 : 0000000000000000 x4 : ffff80087fad17e0
[ 50.693446] x3 : ffff80087fad17e0 x2 : 0000000000000007
[ 50.698749] x1 : b4f05b6436ac2100 x0 : 0000000000000000
[ 50.704053] Call trace:
[ 50.706494] k3_knav_pool_destroy+0x11c/0x130
[ 50.710853] prueth_cleanup_tx_chns+0x30/0x48 [icssg_prueth]
[ 50.716506] emac_ndo_stop+0x190/0x1f0 [icssg_prueth]
[ 50.721552] __dev_close_many+0x9c/0x118
[ 50.725469] __dev_change_flags+0xa8/0x1b8
[ 50.729556] dev_change_flags+0x20/0x60
[ 50.733386] devinet_ioctl+0x3f4/0x730
[ 50.737127] inet_ioctl+0xf8/0x268
[ 50.740526] sock_do_ioctl+0x48/0x1f8
[ 50.744181] sock_ioctl+0x1c0/0x3b8
[ 50.747666] do_vfs_ioctl+0xb8/0x890
[ 50.751233] ksys_ioctl+0x78/0xa8
[ 50.754541] __arm64_sys_ioctl+0x1c/0x28
[ 50.758457] el0_svc_common+0x90/0x158
[ 50.762198] el0_svc_handler+0x2c/0x80
[ 50.765939] el0_svc+0x8/0xc
[ 50.768811] ---[ end trace 3ff26d234f6778ad ]---
[ 50.773518] ------------[ cut here ]------------
[ 50.778130] kernel BUG at lib/genalloc.c:252!
Suggested-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
net: ti: prueth: Hook up net device's ioctl to phy_mii_ioctl()
If user space wants to read/write to PHY it should be possible
from now.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
If user space wants to read/write to PHY it should be possible
from now.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
net: ti: icssg_prueth: Hook up net device's ioctl to phy_mii_ioctl()
If user space wants to read/write to PHY it should be possible
from now.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
If user space wants to read/write to PHY it should be possible
from now.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
soc: ti: pruss: update pruss_get() to retrieve a PRUSS id
Update the pruss_get() function to take in an additional integer
pointer argument in which the PRUSS instance id is filled in and
provided back to the callers. This allows the drivers to add some
instance-specific logic/customization in their code, as the PRUSS
handle is not useful to build this logic.
The already existing usage within both the regular PRU Ethernet
and the ICSSG PRU Ethernet drivers have also been updated accordingly,
and this will cater to its need for supporting switching between
different Ethernet protocols dynamically per instance. The invocation
within the PRU Soft UART driver has also been updated, with this
driver not needing the PRUSS instance id at present.
Signed-off-by: Suman Anna <s-anna@ti.com>
Update the pruss_get() function to take in an additional integer
pointer argument in which the PRUSS instance id is filled in and
provided back to the callers. This allows the drivers to add some
instance-specific logic/customization in their code, as the PRUSS
handle is not useful to build this logic.
The already existing usage within both the regular PRU Ethernet
and the ICSSG PRU Ethernet drivers have also been updated accordingly,
and this will cater to its need for supporting switching between
different Ethernet protocols dynamically per instance. The invocation
within the PRU Soft UART driver has also been updated, with this
driver not needing the PRUSS instance id at present.
Signed-off-by: Suman Anna <s-anna@ti.com>
soc: ti: pruss: store the pruss instance id
Add logic to the PRUSS platform driver to store the instance id
of a PRUSS instance. This is being added to enable support for
the PRU Ethernet driver to be able to switch between different
Ethernet protocols dynamically per instance.
The values for instance ids are not always zero-indexed on all
SoCs, they were chosen to match the numbering used in the TRMs.
The instance ids are computed assigned using the PRUSS memory
region base address lookup table. The base address matching
logic is not robust for long-term for newer SoCs, but is okay
for currently supported SoCs as all the addresses are unique.
This is done this way to retain the current usage of minimal
static data and to avoid having to introduce the instance
specific static data just for the instance id data.
Signed-off-by: Suman Anna <s-anna@ti.com>
Add logic to the PRUSS platform driver to store the instance id
of a PRUSS instance. This is being added to enable support for
the PRU Ethernet driver to be able to switch between different
Ethernet protocols dynamically per instance.
The values for instance ids are not always zero-indexed on all
SoCs, they were chosen to match the numbering used in the TRMs.
The instance ids are computed assigned using the PRUSS memory
region base address lookup table. The base address matching
logic is not robust for long-term for newer SoCs, but is okay
for currently supported SoCs as all the addresses are unique.
This is done this way to retain the current usage of minimal
static data and to avoid having to introduce the instance
specific static data just for the instance id data.
Signed-off-by: Suman Anna <s-anna@ti.com>
remoteproc: Add a sysfs interface for name
This patch adds a sysfs interface that provides the name of the
remote processor to userspace. This allows the userspace to identify
a remote processor as the remoteproc devices themselves are created
based on probe order and can change from one boot to another or
at runtime.
The name is made available in debugfs originally, and is being
retained for now. This can be cleaned up after couple of releases
once users get familiar with the new interface.
Signed-off-by: Suman Anna <s-anna@ti.com>
This patch adds a sysfs interface that provides the name of the
remote processor to userspace. This allows the userspace to identify
a remote processor as the remoteproc devices themselves are created
based on probe order and can change from one boot to another or
at runtime.
The name is made available in debugfs originally, and is being
retained for now. This can be cleaned up after couple of releases
once users get familiar with the new interface.
Signed-off-by: Suman Anna <s-anna@ti.com>
Merged TI feature ti_linux_base_rt into ti-rt-linux-4.19.y
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
usb: dwc3: don't set gadget->is_otg flag
ARM: dts: dra74x: Fix iodelay configuration for mmc3
usb: dwc3: gadget: remove DWC3_EP_END_TRANSFER_PENDING
usb: dwc3: gadget: early giveback if End Transfer already completed
usb: dwc3: gadget: don't use resource_index as a flag
usb: dwc3: gadget: clear DWC3_EP_TRANSFER_STARTED on cmd complete
misc: pci_endpoint_test: Use full pci-endpoint-test name in request irq
misc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices
tools: PCI: Add 'e' to clear IRQ
misc: pci_endpoint_test: Add ioctl to clear IRQ
misc: pci_endpoint_test: Do not request or allocate IRQs in probe
usb: gadget: udc: core: Fix segfault if udc_bind_to_driver() for pending driver fails
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
usb: dwc3: don't set gadget->is_otg flag
ARM: dts: dra74x: Fix iodelay configuration for mmc3
usb: dwc3: gadget: remove DWC3_EP_END_TRANSFER_PENDING
usb: dwc3: gadget: early giveback if End Transfer already completed
usb: dwc3: gadget: don't use resource_index as a flag
usb: dwc3: gadget: clear DWC3_EP_TRANSFER_STARTED on cmd complete
misc: pci_endpoint_test: Use full pci-endpoint-test name in request irq
misc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices
tools: PCI: Add 'e' to clear IRQ
misc: pci_endpoint_test: Add ioctl to clear IRQ
misc: pci_endpoint_test: Do not request or allocate IRQs in probe
usb: gadget: udc: core: Fix segfault if udc_bind_to_driver() for pending driver fails
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
Merged TI feature connectivity into ti-linux-4.19.y
* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
usb: dwc3: don't set gadget->is_otg flag
ARM: dts: dra74x: Fix iodelay configuration for mmc3
usb: dwc3: gadget: remove DWC3_EP_END_TRANSFER_PENDING
usb: dwc3: gadget: early giveback if End Transfer already completed
usb: dwc3: gadget: don't use resource_index as a flag
usb: dwc3: gadget: clear DWC3_EP_TRANSFER_STARTED on cmd complete
misc: pci_endpoint_test: Use full pci-endpoint-test name in request irq
misc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices
tools: PCI: Add 'e' to clear IRQ
misc: pci_endpoint_test: Add ioctl to clear IRQ
misc: pci_endpoint_test: Do not request or allocate IRQs in probe
usb: gadget: udc: core: Fix segfault if udc_bind_to_driver() for pending driver fails
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
usb: dwc3: don't set gadget->is_otg flag
ARM: dts: dra74x: Fix iodelay configuration for mmc3
usb: dwc3: gadget: remove DWC3_EP_END_TRANSFER_PENDING
usb: dwc3: gadget: early giveback if End Transfer already completed
usb: dwc3: gadget: don't use resource_index as a flag
usb: dwc3: gadget: clear DWC3_EP_TRANSFER_STARTED on cmd complete
misc: pci_endpoint_test: Use full pci-endpoint-test name in request irq
misc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices
tools: PCI: Add 'e' to clear IRQ
misc: pci_endpoint_test: Add ioctl to clear IRQ
misc: pci_endpoint_test: Do not request or allocate IRQs in probe
usb: gadget: udc: core: Fix segfault if udc_bind_to_driver() for pending driver fails
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
usb: dwc3: don't set gadget->is_otg flag
This reverts commit
6a4290cc28be1 ("usb: dwc3: gadget: set the OTG flag in dwc3 gadget driver.")
We don't yet support any of the OTG mechanisms (HNP/SRP/ADP)
and are not setting gadget->otg_caps, so don't set gadget->is_otg
flag.
If we do then we end up publishing a OTG1.0 descriptor in
the gadget descriptor which causes device enumeration to fail
if we are connected to a host with CONFIG_USB_OTG enabled.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
This reverts commit
6a4290cc28be1 ("usb: dwc3: gadget: set the OTG flag in dwc3 gadget driver.")
We don't yet support any of the OTG mechanisms (HNP/SRP/ADP)
and are not setting gadget->otg_caps, so don't set gadget->is_otg
flag.
If we do then we end up publishing a OTG1.0 descriptor in
the gadget descriptor which causes device enumeration to fail
if we are connected to a host with CONFIG_USB_OTG enabled.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
ARM: dts: dra74x: Fix iodelay configuration for mmc3
commit 07f9a8be66a9bd86f9eaedf8f8aeb416195adab8 upstream.
According to the latest am572x[1] and dra74x[2] data manuals, mmc3
default, hs, sdr12 and sdr25 modes use iodelay values given in
MMC3_MANUAL1. Set the MODE_SELECT bit for these so that manual mode is
selected and correct iodelay values are configured.
[1] http://www.ti.com/lit/ds/symlink/am5728.pdf
[2] http://www.ti.com/lit/ds/symlink/dra746.pdf
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
commit 07f9a8be66a9bd86f9eaedf8f8aeb416195adab8 upstream.
According to the latest am572x[1] and dra74x[2] data manuals, mmc3
default, hs, sdr12 and sdr25 modes use iodelay values given in
MMC3_MANUAL1. Set the MODE_SELECT bit for these so that manual mode is
selected and correct iodelay values are configured.
[1] http://www.ti.com/lit/ds/symlink/am5728.pdf
[2] http://www.ti.com/lit/ds/symlink/dra746.pdf
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
usb: dwc3: gadget: remove DWC3_EP_END_TRANSFER_PENDING
commit 3aec99154db3a95572bb92aa470589585e37df06 upstream.
Now that we modified the code to fix a race condition, it's clear that
DWC3_EP_END_TRANSFER_PENDING is unnecessary, considering that
DWC3_EP_TRANSFER_STARTED will remain set until End Transfer completes.
Tested-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
commit 3aec99154db3a95572bb92aa470589585e37df06 upstream.
Now that we modified the code to fix a race condition, it's clear that
DWC3_EP_END_TRANSFER_PENDING is unnecessary, considering that
DWC3_EP_TRANSFER_STARTED will remain set until End Transfer completes.
Tested-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
usb: dwc3: gadget: early giveback if End Transfer already completed
commit 9f45581f5eec6786c6eded2b3c85345d82a910c9 upstream.
There is a rare race condition that may happen during a Disconnect
Interrupt if we have a started request that happens to be
dequeued *after* completion of End Transfer command. If that happens,
that request will be left waiting for completion of an End Transfer
command that will never happen.
If End Transfer command has already completed before, we are safe to
giveback the request straight away.
Tested-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
commit 9f45581f5eec6786c6eded2b3c85345d82a910c9 upstream.
There is a rare race condition that may happen during a Disconnect
Interrupt if we have a started request that happens to be
dequeued *after* completion of End Transfer command. If that happens,
that request will be left waiting for completion of an End Transfer
command that will never happen.
If End Transfer command has already completed before, we are safe to
giveback the request straight away.
Tested-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
usb: dwc3: gadget: don't use resource_index as a flag
commit 974a1368c33ebb09c94c9ec1b523908cc7ca068f upstream.
We have a proper flag for testing that we have a valid transfer in
flight, let's use that instead.
This patch is in preparation to fix a rare race condition that happens
upon Disconnect Interrupt.
Tested-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
commit 974a1368c33ebb09c94c9ec1b523908cc7ca068f upstream.
We have a proper flag for testing that we have a valid transfer in
flight, let's use that instead.
This patch is in preparation to fix a rare race condition that happens
upon Disconnect Interrupt.
Tested-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
usb: dwc3: gadget: clear DWC3_EP_TRANSFER_STARTED on cmd complete
commit acbfa6c26f21a18830ee064b588c92334305b6af upstream.
We must wait until End Transfer completes in order to clear
DWC3_EP_TRANSFER_STARTED, otherwise we may confuse the driver.
This patch is in preparation to fix a rare race condition that happens
upon Disconnect Interrupt.
Tested-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
commit acbfa6c26f21a18830ee064b588c92334305b6af upstream.
We must wait until End Transfer completes in order to clear
DWC3_EP_TRANSFER_STARTED, otherwise we may confuse the driver.
This patch is in preparation to fix a rare race condition that happens
upon Disconnect Interrupt.
Tested-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
misc: pci_endpoint_test: Use full pci-endpoint-test name in request irq
Use full pci-endpoint-test name in request irq, so that it's easy to
profile the device that actually raised the interrupt.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Use full pci-endpoint-test name in request irq, so that it's easy to
profile the device that actually raised the interrupt.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
misc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices
Adding more than 10 pci-endpoint-test devices results in
"kobject_add_internal failed for pci-endpoint-test.1 with -EEXIST, don't
try to register things with the same name in the same directory". This
is because the length of the "name" is limited to 20 characters. Change
the length of the name to 24 in order to support upto 10000
pci-endpoint-test devices.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Adding more than 10 pci-endpoint-test devices results in
"kobject_add_internal failed for pci-endpoint-test.1 with -EEXIST, don't
try to register things with the same name in the same directory". This
is because the length of the "name" is limited to 20 characters. Change
the length of the name to 24 in order to support upto 10000
pci-endpoint-test devices.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
tools: PCI: Add 'e' to clear IRQ
Add a new command line option 'e' to invoke "PCITEST_CLEAR_IRQ"
ioctl. This can be used to clear the irqs set using the 'i' option.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Add a new command line option 'e' to invoke "PCITEST_CLEAR_IRQ"
ioctl. This can be used to clear the irqs set using the 'i' option.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
misc: pci_endpoint_test: Add ioctl to clear IRQ
Add ioctl to clear IRQ which can be used to free the allocated
IRQ vectors and free the requested IRQ.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Add ioctl to clear IRQ which can be used to free the allocated
IRQ vectors and free the requested IRQ.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
misc: pci_endpoint_test: Do not request or allocate IRQs in probe
Allocation of IRQ vectors and requesting IRQ is done as part of
PCITEST_SET_IRQTYPE. Hence do not request or allocate IRQs in probe.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Allocation of IRQ vectors and requesting IRQ is done as part of
PCITEST_SET_IRQTYPE. Hence do not request or allocate IRQs in probe.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
usb: gadget: udc: core: Fix segfault if udc_bind_to_driver() for pending driver fails
If a gadget driver is in the pending drivers list, a UDC
becomes available and udc_bind_to_driver() fails, then it
gets deleted from the pending list.
i.e. list_del(&driver->pending) in check_pending_gadget_drivers().
Then if that gadget driver is unregistered,
usb_gadget_unregister_driver() does a list_del(&driver->pending)
again thus causing a page fault as that list entry has been poisoned
by the previous list_del().
Fix this by using list_del_init() instead of list_del() in
check_pending_gadget_drivers().
Test case:
- Make sure no UDC is available
- modprobe g_mass_storage file=wrongfile
- Load UDC driver so it becomes available
lun0: unable to open backing file: wrongfile
- modprobe -r g_mass_storage
[ 60.900431] Unable to handle kernel paging request at virtual address dead000000000108
[ 60.908346] Mem abort info:
[ 60.911145] ESR = 0x96000044
[ 60.914227] Exception class = DABT (current EL), IL = 32 bits
[ 60.920162] SET = 0, FnV = 0
[ 60.923217] EA = 0, S1PTW = 0
[ 60.926354] Data abort info:
[ 60.929228] ISV = 0, ISS = 0x00000044
[ 60.933058] CM = 0, WnR = 1
[ 60.936011] [dead000000000108] address between user and kernel address ranges
[ 60.943136] Internal error: Oops: 96000044 [#1] PREEMPT SMP
[ 60.948691] Modules linked in: g_mass_storage(-) usb_f_mass_storage libcomposite xhci_plat_hcd xhci_hcd usbcore ti_am335x_adc kfifo_buf omap_rng cdns3 rng_core udc_core crc32_ce xfrm_user crct10dif_ce snd_so6
[ 60.993995] Process modprobe (pid: 834, stack limit = 0x00000000c2aebc69)
[ 61.000765] CPU: 0 PID: 834 Comm: modprobe Not tainted 4.19.59-01963-g065f42a60499 #92
[ 61.008658] Hardware name: Texas Instruments SoC (DT)
[ 61.014472] pstate: 60000005 (nZCv daif -PAN -UAO)
[ 61.019253] pc : usb_gadget_unregister_driver+0x7c/0x108 [udc_core]
[ 61.025503] lr : usb_gadget_unregister_driver+0x30/0x108 [udc_core]
[ 61.031750] sp : ffff00001338fda0
[ 61.035049] x29: ffff00001338fda0 x28: ffff800846d40000
[ 61.040346] x27: 0000000000000000 x26: 0000000000000000
[ 61.045642] x25: 0000000056000000 x24: 0000000000000800
[ 61.050938] x23: ffff000008d7b0d0 x22: ffff0000088b07c8
[ 61.056234] x21: ffff000001100000 x20: ffff000002020260
[ 61.061530] x19: ffff0000010ffd28 x18: 0000000000000000
[ 61.066825] x17: 0000000000000000 x16: 0000000000000000
[ 61.072121] x15: 0000000000000000 x14: 0000000000000000
[ 61.077417] x13: ffff000000000000 x12: ffffffffffffffff
[ 61.082712] x11: 0000000000000030 x10: 7f7f7f7f7f7f7f7f
[ 61.088008] x9 : fefefefefefefeff x8 : 0000000000000000
[ 61.093304] x7 : ffffffffffffffff x6 : 000000000000ffff
[ 61.098599] x5 : 8080000000000000 x4 : 0000000000000000
[ 61.103895] x3 : ffff000001100020 x2 : ffff800846d40000
[ 61.109190] x1 : dead000000000100 x0 : dead000000000200
[ 61.114486] Call trace:
[ 61.116922] usb_gadget_unregister_driver+0x7c/0x108 [udc_core]
[ 61.122828] usb_composite_unregister+0x10/0x18 [libcomposite]
[ 61.128643] msg_cleanup+0x18/0xfce0 [g_mass_storage]
[ 61.133682] __arm64_sys_delete_module+0x17c/0x1f0
[ 61.138458] el0_svc_common+0x90/0x158
[ 61.142192] el0_svc_handler+0x2c/0x80
[ 61.145926] el0_svc+0x8/0xc
[ 61.148794] Code: eb03003f d10be033 54ffff21 a94d0281 (f9000420)
[ 61.154869] ---[ end trace afb22e9b637bd9a7 ]---
Segmentation fault
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
If a gadget driver is in the pending drivers list, a UDC
becomes available and udc_bind_to_driver() fails, then it
gets deleted from the pending list.
i.e. list_del(&driver->pending) in check_pending_gadget_drivers().
Then if that gadget driver is unregistered,
usb_gadget_unregister_driver() does a list_del(&driver->pending)
again thus causing a page fault as that list entry has been poisoned
by the previous list_del().
Fix this by using list_del_init() instead of list_del() in
check_pending_gadget_drivers().
Test case:
- Make sure no UDC is available
- modprobe g_mass_storage file=wrongfile
- Load UDC driver so it becomes available
lun0: unable to open backing file: wrongfile
- modprobe -r g_mass_storage
[ 60.900431] Unable to handle kernel paging request at virtual address dead000000000108
[ 60.908346] Mem abort info:
[ 60.911145] ESR = 0x96000044
[ 60.914227] Exception class = DABT (current EL), IL = 32 bits
[ 60.920162] SET = 0, FnV = 0
[ 60.923217] EA = 0, S1PTW = 0
[ 60.926354] Data abort info:
[ 60.929228] ISV = 0, ISS = 0x00000044
[ 60.933058] CM = 0, WnR = 1
[ 60.936011] [dead000000000108] address between user and kernel address ranges
[ 60.943136] Internal error: Oops: 96000044 [#1] PREEMPT SMP
[ 60.948691] Modules linked in: g_mass_storage(-) usb_f_mass_storage libcomposite xhci_plat_hcd xhci_hcd usbcore ti_am335x_adc kfifo_buf omap_rng cdns3 rng_core udc_core crc32_ce xfrm_user crct10dif_ce snd_so6
[ 60.993995] Process modprobe (pid: 834, stack limit = 0x00000000c2aebc69)
[ 61.000765] CPU: 0 PID: 834 Comm: modprobe Not tainted 4.19.59-01963-g065f42a60499 #92
[ 61.008658] Hardware name: Texas Instruments SoC (DT)
[ 61.014472] pstate: 60000005 (nZCv daif -PAN -UAO)
[ 61.019253] pc : usb_gadget_unregister_driver+0x7c/0x108 [udc_core]
[ 61.025503] lr : usb_gadget_unregister_driver+0x30/0x108 [udc_core]
[ 61.031750] sp : ffff00001338fda0
[ 61.035049] x29: ffff00001338fda0 x28: ffff800846d40000
[ 61.040346] x27: 0000000000000000 x26: 0000000000000000
[ 61.045642] x25: 0000000056000000 x24: 0000000000000800
[ 61.050938] x23: ffff000008d7b0d0 x22: ffff0000088b07c8
[ 61.056234] x21: ffff000001100000 x20: ffff000002020260
[ 61.061530] x19: ffff0000010ffd28 x18: 0000000000000000
[ 61.066825] x17: 0000000000000000 x16: 0000000000000000
[ 61.072121] x15: 0000000000000000 x14: 0000000000000000
[ 61.077417] x13: ffff000000000000 x12: ffffffffffffffff
[ 61.082712] x11: 0000000000000030 x10: 7f7f7f7f7f7f7f7f
[ 61.088008] x9 : fefefefefefefeff x8 : 0000000000000000
[ 61.093304] x7 : ffffffffffffffff x6 : 000000000000ffff
[ 61.098599] x5 : 8080000000000000 x4 : 0000000000000000
[ 61.103895] x3 : ffff000001100020 x2 : ffff800846d40000
[ 61.109190] x1 : dead000000000100 x0 : dead000000000200
[ 61.114486] Call trace:
[ 61.116922] usb_gadget_unregister_driver+0x7c/0x108 [udc_core]
[ 61.122828] usb_composite_unregister+0x10/0x18 [libcomposite]
[ 61.128643] msg_cleanup+0x18/0xfce0 [g_mass_storage]
[ 61.133682] __arm64_sys_delete_module+0x17c/0x1f0
[ 61.138458] el0_svc_common+0x90/0x158
[ 61.142192] el0_svc_handler+0x2c/0x80
[ 61.145926] el0_svc+0x8/0xc
[ 61.148794] Code: eb03003f d10be033 54ffff21 a94d0281 (f9000420)
[ 61.154869] ---[ end trace afb22e9b637bd9a7 ]---
Segmentation fault
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Merged TI feature ti_linux_base_rt into ti-rt-linux-4.19.y
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
net: ethernet: ti: am65-cpsw-nuss: clean up am65_cpsw_nuss_ndo_slave_stop()
net: ethernet: ti: am65-cpsw-nuss: fix cpsw2g hw stuck on netif down
net: ethernet: ti: cpsw_sl: fix cpsw_sl_wait_for_idle
net: phy: ensure phylib state machine is stopped after calling phy_stop
net: phy: call state machine synchronously in phy_stop
net: ethernet: ti: am65-cpsw-nuss: fix ale port state on netif open
net: ethernet: ti: am65-cpsw-nuss: optimize napi rx during netif down
net: ethernet: ti: am65-cpsw-nuss: fix race between netif down and rx napi
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
net: ethernet: ti: am65-cpsw-nuss: clean up am65_cpsw_nuss_ndo_slave_stop()
net: ethernet: ti: am65-cpsw-nuss: fix cpsw2g hw stuck on netif down
net: ethernet: ti: cpsw_sl: fix cpsw_sl_wait_for_idle
net: phy: ensure phylib state machine is stopped after calling phy_stop
net: phy: call state machine synchronously in phy_stop
net: ethernet: ti: am65-cpsw-nuss: fix ale port state on netif open
net: ethernet: ti: am65-cpsw-nuss: optimize napi rx during netif down
net: ethernet: ti: am65-cpsw-nuss: fix race between netif down and rx napi
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
Merged TI feature connectivity into ti-linux-4.19.y
* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
net: ethernet: ti: am65-cpsw-nuss: clean up am65_cpsw_nuss_ndo_slave_stop()
net: ethernet: ti: am65-cpsw-nuss: fix cpsw2g hw stuck on netif down
net: ethernet: ti: cpsw_sl: fix cpsw_sl_wait_for_idle
net: phy: ensure phylib state machine is stopped after calling phy_stop
net: phy: call state machine synchronously in phy_stop
net: ethernet: ti: am65-cpsw-nuss: fix ale port state on netif open
net: ethernet: ti: am65-cpsw-nuss: optimize napi rx during netif down
net: ethernet: ti: am65-cpsw-nuss: fix race between netif down and rx napi
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
net: ethernet: ti: am65-cpsw-nuss: clean up am65_cpsw_nuss_ndo_slave_stop()
net: ethernet: ti: am65-cpsw-nuss: fix cpsw2g hw stuck on netif down
net: ethernet: ti: cpsw_sl: fix cpsw_sl_wait_for_idle
net: phy: ensure phylib state machine is stopped after calling phy_stop
net: phy: call state machine synchronously in phy_stop
net: ethernet: ti: am65-cpsw-nuss: fix ale port state on netif open
net: ethernet: ti: am65-cpsw-nuss: optimize napi rx during netif down
net: ethernet: ti: am65-cpsw-nuss: fix race between netif down and rx napi
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
net: ethernet: ti: am65-cpsw-nuss: clean up am65_cpsw_nuss_ndo_slave_stop()
The PHY .adjust_link() callback will be called as part phy_stop() thanks to
previously back-ported upstream commit e8cfd9d6c772 ("net: phy: call state
machine synchronously in phy_stop") and commit cbfd12b3e8c3 ("net: phy:
ensure phylib state machine is stopped after calling phy_stop") . As result
MAC SL and ALE port state will be configured correctly after call to
phy_stop().
In addition, network PHY core takes care of netif_carrier_x() state.
Hence, drop unnecessary code from am65_cpsw_nuss_ndo_slave_stop() and
am65_cpsw_nuss_adjust_link().
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
The PHY .adjust_link() callback will be called as part phy_stop() thanks to
previously back-ported upstream commit e8cfd9d6c772 ("net: phy: call state
machine synchronously in phy_stop") and commit cbfd12b3e8c3 ("net: phy:
ensure phylib state machine is stopped after calling phy_stop") . As result
MAC SL and ALE port state will be configured correctly after call to
phy_stop().
In addition, network PHY core takes care of netif_carrier_x() state.
Hence, drop unnecessary code from am65_cpsw_nuss_ndo_slave_stop() and
am65_cpsw_nuss_adjust_link().
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
net: ethernet: ti: am65-cpsw-nuss: fix cpsw2g hw stuck on netif down
Now the netif down under high ingress traffic pressure could cause AM654x
CPSW2G NUSS stuck in unrecoverable state when TX is working after netif up,
but RX is never working again. The MAC SL status register shows that any
ingress packet kicks MAC SL out of idle, but packet not redirected to CPU
P0 and MAC SL never returns to IDLE.
Steps to reproduce:
- connect am654-evm to Host
- set IP address
- ensure ping is working
- on Host run: iperf -c <IP> -u -b1200M -i5 -t60
- on am654-evm run: ifconfig eth0 down up
when iperf on Host shows first statistic message
- on am654-evm run: ping <host ip>
repeat last 2 steps few times if required
Most probably, the stuck is happens when MAC SL is disabled in the middle
of packet reception.
The AM654x TRM defines the correct MAC SL reset/configuration sequence
which is implemented by this patch in am65_cpsw_nuss_adjust_link() on link
down event:
- set CPSW Port state to ALE_PORT_STATE_DISABLE
- force MAC SL to IDLE state (it should finish current and stop processing
further packets)
- wait for MAC SL IDLE
- disable MAC SL
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Now the netif down under high ingress traffic pressure could cause AM654x
CPSW2G NUSS stuck in unrecoverable state when TX is working after netif up,
but RX is never working again. The MAC SL status register shows that any
ingress packet kicks MAC SL out of idle, but packet not redirected to CPU
P0 and MAC SL never returns to IDLE.
Steps to reproduce:
- connect am654-evm to Host
- set IP address
- ensure ping is working
- on Host run: iperf -c <IP> -u -b1200M -i5 -t60
- on am654-evm run: ifconfig eth0 down up
when iperf on Host shows first statistic message
- on am654-evm run: ping <host ip>
repeat last 2 steps few times if required
Most probably, the stuck is happens when MAC SL is disabled in the middle
of packet reception.
The AM654x TRM defines the correct MAC SL reset/configuration sequence
which is implemented by this patch in am65_cpsw_nuss_adjust_link() on link
down event:
- set CPSW Port state to ALE_PORT_STATE_DISABLE
- force MAC SL to IDLE state (it should finish current and stop processing
further packets)
- wait for MAC SL IDLE
- disable MAC SL
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
net: ethernet: ti: cpsw_sl: fix cpsw_sl_wait_for_idle
There is incorrect condition check for to MAC SL IDLE state used in
cpsw_sl_wait_for_idle() - it checks for 0 instead of 1 for idle status bit
values.
Hence, fix it to check for all MAC SL IDLE status bits to be set.
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
There is incorrect condition check for to MAC SL IDLE state used in
cpsw_sl_wait_for_idle() - it checks for 0 instead of 1 for idle status bit
values.
Hence, fix it to check for all MAC SL IDLE status bits to be set.
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
net: phy: ensure phylib state machine is stopped after calling phy_stop
commit cbfd12b3e8c3542e8142aa041714ed614d3f67b0 upstream.
The call to the phylib state machine in phy_stop() just ensures that
the state machine isn't re-triggered, but a state machine call may
be scheduled already. So lets's call phy_stop_machine().
This also allows to get rid of the call to phy_stop_machine() in
phy_disconnect().
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
commit cbfd12b3e8c3542e8142aa041714ed614d3f67b0 upstream.
The call to the phylib state machine in phy_stop() just ensures that
the state machine isn't re-triggered, but a state machine call may
be scheduled already. So lets's call phy_stop_machine().
This also allows to get rid of the call to phy_stop_machine() in
phy_disconnect().
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
net: phy: call state machine synchronously in phy_stop
commit e8cfd9d6c7727a067b38dbe7655ca02377fdb301 upstream.
phy_stop() may be called e.g. when suspending, therefore all needed
actions should be performed synchronously. Therefore add a synchronous
call to the state machine.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
commit e8cfd9d6c7727a067b38dbe7655ca02377fdb301 upstream.
phy_stop() may be called e.g. when suspending, therefore all needed
actions should be performed synchronously. Therefore add a synchronous
call to the state machine.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
net: ethernet: ti: am65-cpsw-nuss: fix ale port state on netif open
The CPSW port state has not to be set to ALE_PORT_STATE_FORWARD in
.ndo_open() and it has to be properly configured in PHY .adjust_link()
callback only, when link is ready.
Hence, drop setting CPSW port state to ALE_PORT_STATE_FORWARD from
am65_cpsw_nuss_ndo_slave_open().
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
The CPSW port state has not to be set to ALE_PORT_STATE_FORWARD in
.ndo_open() and it has to be properly configured in PHY .adjust_link()
callback only, when link is ready.
Hence, drop setting CPSW port state to ALE_PORT_STATE_FORWARD from
am65_cpsw_nuss_ndo_slave_open().
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
net: ethernet: ti: am65-cpsw-nuss: optimize napi rx during netif down
The RX NAPI handler am65_cpsw_nuss_rx_packets() will return errors now in
case there are still packets to process while interface is going down or
not ready which will cause break of the RX NAPI polling function and NAPI
resceduling. In other words, leftover packets will be processed one by one.
In such cases (interface is going down or not ready) it's valid to still
have unprocessed packets in RX queues and such packets expected just to be
dropped by RX NAPI handler am65_cpsw_nuss_rx_packets().
Hence, update am65_cpsw_nuss_rx_packets() to not return errors for packets
received while interface is going down or not ready, so they will be
processed in batch by NAPI polling function.
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
The RX NAPI handler am65_cpsw_nuss_rx_packets() will return errors now in
case there are still packets to process while interface is going down or
not ready which will cause break of the RX NAPI polling function and NAPI
resceduling. In other words, leftover packets will be processed one by one.
In such cases (interface is going down or not ready) it's valid to still
have unprocessed packets in RX queues and such packets expected just to be
dropped by RX NAPI handler am65_cpsw_nuss_rx_packets().
Hence, update am65_cpsw_nuss_rx_packets() to not return errors for packets
received while interface is going down or not ready, so they will be
processed in batch by NAPI polling function.
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
net: ethernet: ti: am65-cpsw-nuss: fix race between netif down and rx napi
The kernel crashes when AM654x CPSW NUSS network interface is going down
under high pressure of ingress traffic due to the race between
am65_cpsw_nuss_common_stop() and NAPI RX handler - they both trying to free
the same UDMA descriptor.
kernel BUG at lib/genalloc.c:391!
Internal error: Oops - BUG: 0 [ #1] PREEMPT SMP
...
Call trace:
gen_pool_free+0xc8/0xd8
k3_knav_pool_free+0x14/0x20
am65_cpsw_nuss_rx_poll+0x224/0x420
net_rx_action+0x10c/0x2d0
__do_softirq+0x114/0x210
run_ksoftirqd+0x30/0x40
smpboot_thread_fn+0x168/0x268
kthread+0x128/0x130
ret_from_fork+0x10/0x18
Fix it by ensuring that NAPI is stopped at am65_cpsw_nuss_common_stop()
before cleaning up RX UDMA channels/rings.
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
The kernel crashes when AM654x CPSW NUSS network interface is going down
under high pressure of ingress traffic due to the race between
am65_cpsw_nuss_common_stop() and NAPI RX handler - they both trying to free
the same UDMA descriptor.
kernel BUG at lib/genalloc.c:391!
Internal error: Oops - BUG: 0 [ #1] PREEMPT SMP
...
Call trace:
gen_pool_free+0xc8/0xd8
k3_knav_pool_free+0x14/0x20
am65_cpsw_nuss_rx_poll+0x224/0x420
net_rx_action+0x10c/0x2d0
__do_softirq+0x114/0x210
run_ksoftirqd+0x30/0x40
smpboot_thread_fn+0x168/0x268
kthread+0x128/0x130
ret_from_fork+0x10/0x18
Fix it by ensuring that NAPI is stopped at am65_cpsw_nuss_common_stop()
before cleaning up RX UDMA channels/rings.
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Merged TI feature ti_linux_base_rt into ti-rt-linux-4.19.y
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
usb: cdns3: run role switch state machine at probe
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
usb: cdns3: run role switch state machine at probe
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
Merged TI feature connectivity into ti-linux-4.19.y
* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
usb: cdns3: run role switch state machine at probe
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
usb: cdns3: run role switch state machine at probe
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
usb: cdns3: run role switch state machine at probe
Without this port doesn't transition to right role
if the USB device was plugged before the controller driver loads.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Without this port doesn't transition to right role
if the USB device was plugged before the controller driver loads.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Merged TI feature ti_linux_base_rt into ti-rt-linux-4.19.y
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
drm/bridge: cdns-mhdp: Use threaded IRQ instead of delayed_work
drm/bridge: cdns-mhdp: Call only drm_kms_helper_hotplug_event in irq handler
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
drm/bridge: cdns-mhdp: Use threaded IRQ instead of delayed_work
drm/bridge: cdns-mhdp: Call only drm_kms_helper_hotplug_event in irq handler
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
Merged TI feature audio-display into ti-linux-4.19.y
* 'audio_display-ti-linux-4.19.y' of git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree:
drm/bridge: cdns-mhdp: Use threaded IRQ instead of delayed_work
drm/bridge: cdns-mhdp: Call only drm_kms_helper_hotplug_event in irq handler
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
* 'audio_display-ti-linux-4.19.y' of git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree:
drm/bridge: cdns-mhdp: Use threaded IRQ instead of delayed_work
drm/bridge: cdns-mhdp: Call only drm_kms_helper_hotplug_event in irq handler
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
drm/bridge: cdns-mhdp: Use threaded IRQ instead of delayed_work
Drop delayed work used for HPD IRQ handling and use threaded IRQ instead.
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Drop delayed work used for HPD IRQ handling and use threaded IRQ instead.
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drm/bridge: cdns-mhdp: Call only drm_kms_helper_hotplug_event in irq handler
We should not call connector detect explicitly when handling HPD
IRQ. Calling only drm_kms_helper_hotplug_event() is enough. The helper
should take care of the rest.
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
We should not call connector detect explicitly when handling HPD
IRQ. Calling only drm_kms_helper_hotplug_event() is enough. The helper
should take care of the rest.
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Merged TI feature ti_linux_base_rt into ti-rt-linux-4.19.y
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
arm64: dts: ti: k3-am654-base/idk: Don't use PHY TX delay for ICSSG ports
net: ethernet: ti: icssg_prueth: always enable MAC TX delay
dt-bindings: net: ti, icssg-prueth: drop enable-rgmii-delay
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
arm64: dts: ti: k3-am654-base/idk: Don't use PHY TX delay for ICSSG ports
net: ethernet: ti: icssg_prueth: always enable MAC TX delay
dt-bindings: net: ti, icssg-prueth: drop enable-rgmii-delay
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
Merged TI feature connectivity into ti-linux-4.19.y
* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
arm64: dts: ti: k3-am654-base/idk: Don't use PHY TX delay for ICSSG ports
net: ethernet: ti: icssg_prueth: always enable MAC TX delay
dt-bindings: net: ti, icssg-prueth: drop enable-rgmii-delay
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
arm64: dts: ti: k3-am654-base/idk: Don't use PHY TX delay for ICSSG ports
net: ethernet: ti: icssg_prueth: always enable MAC TX delay
dt-bindings: net: ti, icssg-prueth: drop enable-rgmii-delay
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
arm64: dts: ti: k3-am654-base/idk: Don't use PHY TX delay for ICSSG ports
We cannot disable MAC TX delay for ICSSG ports so
don't use PHY TX delay.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
We cannot disable MAC TX delay for ICSSG ports so
don't use PHY TX delay.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
net: ethernet: ti: icssg_prueth: always enable MAC TX delay
As per TRM, we cannot set RGMII0_ID_MODE (BIT 24) to 1.
This means MAC TX delay has to be always enabled.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
As per TRM, we cannot set RGMII0_ID_MODE (BIT 24) to 1.
This means MAC TX delay has to be always enabled.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
dt-bindings: net: ti, icssg-prueth: drop enable-rgmii-delay
As per TRM we need to have rgmii TX delay always enabled in the
ICSSG mac. Drop this property.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
As per TRM we need to have rgmii TX delay always enabled in the
ICSSG mac. Drop this property.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Merged TI feature ti_linux_base_rt into ti-rt-linux-4.19.y
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
arm64: dts: ti: k3-j721e-main: Fix gic-its node unit-address
arm64: dts: ti: k3-am65-main: Fix gic-its node unit-address
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
arm64: dts: ti: k3-j721e-main: Fix gic-its node unit-address
arm64: dts: ti: k3-am65-main: Fix gic-its node unit-address
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
Merged TI feature platform_base into ti-linux-4.19.y
* 'platform-ti-linux-4.19.y' of git://git.ti.com/~rrnayak/ti-linux-kernel/platform-linux-feature-tree:
arm64: dts: ti: k3-j721e-main: Fix gic-its node unit-address
arm64: dts: ti: k3-am65-main: Fix gic-its node unit-address
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
* 'platform-ti-linux-4.19.y' of git://git.ti.com/~rrnayak/ti-linux-kernel/platform-linux-feature-tree:
arm64: dts: ti: k3-j721e-main: Fix gic-its node unit-address
arm64: dts: ti: k3-am65-main: Fix gic-its node unit-address
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
arm64: dts: ti: k3-j721e-main: Fix gic-its node unit-address
The gic-its node unit-address has an additional zero compared
to the actual reg value. Fix it.
Fixes: c9e0da481037 ("arm64: dts: ti: Add Support for J721E SoC")
Reported-by: Robert Tivy <rtivy@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
The gic-its node unit-address has an additional zero compared
to the actual reg value. Fix it.
Fixes: c9e0da481037 ("arm64: dts: ti: Add Support for J721E SoC")
Reported-by: Robert Tivy <rtivy@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
arm64: dts: ti: k3-am65-main: Fix gic-its node unit-address
The gic-its node unit-address has an additional zero compared
to the actual reg value. Fix it.
Fixes: ea47eed33a3f ("arm64: dts: ti: Add Support for AM654 SoC")
Reported-by: Robert Tivy <rtivy@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
The gic-its node unit-address has an additional zero compared
to the actual reg value. Fix it.
Fixes: ea47eed33a3f ("arm64: dts: ti: Add Support for AM654 SoC")
Reported-by: Robert Tivy <rtivy@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Merge branch 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into ti-rt-linux-4.19.y
TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.19.y
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
drm/omap: fix crash if state->fb is NULL
ARM: dts: k3-j721e-common-proc-board: enable DP0 power
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.19.y
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
drm/omap: fix crash if state->fb is NULL
ARM: dts: k3-j721e-common-proc-board: enable DP0 power
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
Merge branch 'audio_display-ti-linux-4.19.y' of git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree into ti-linux-4.19.y
TI-Feature: audio-display
TI-Tree: git@git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree.git
TI-Branch: audio_display-ti-linux-4.19.y
* 'audio_display-ti-linux-4.19.y' of git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree:
drm/omap: fix crash if state->fb is NULL
ARM: dts: k3-j721e-common-proc-board: enable DP0 power
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
TI-Feature: audio-display
TI-Tree: git@git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree.git
TI-Branch: audio_display-ti-linux-4.19.y
* 'audio_display-ti-linux-4.19.y' of git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree:
drm/omap: fix crash if state->fb is NULL
ARM: dts: k3-j721e-common-proc-board: enable DP0 power
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
Merge branch 'ti/4.19-pull' of https://bitbucket.itg.ti.com/scm/~a0400822/linux into audio_display-ti-linux-4.19.y
2019.03 display fixes
* 'ti/4.19-pull' of https://bitbucket.itg.ti.com/scm/~a0400822/linux:
drm/omap: fix crash if state->fb is NULL
ARM: dts: k3-j721e-common-proc-board: enable DP0 power
2019.03 display fixes
* 'ti/4.19-pull' of https://bitbucket.itg.ti.com/scm/~a0400822/linux:
drm/omap: fix crash if state->fb is NULL
ARM: dts: k3-j721e-common-proc-board: enable DP0 power
drm/omap: fix crash if state->fb is NULL
Commit 5dd9a556bd46e0074132a49b3e5758c908fb1556 ("drm/omap: dynamically
assign hw overlays to planes") changed omap_plane_atomic_check() so that
the function no longer returns 0 at the very beginning if state->fb ==
NULL. This causes a crash when rotation is used and we call
omap_framebuffer_supports_rotation(state->fb).
Fix this by moving the rotation check inside if (state->visible) block.
Reported-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Commit 5dd9a556bd46e0074132a49b3e5758c908fb1556 ("drm/omap: dynamically
assign hw overlays to planes") changed omap_plane_atomic_check() so that
the function no longer returns 0 at the very beginning if state->fb ==
NULL. This causes a crash when rotation is used and we call
omap_framebuffer_supports_rotation(state->fb).
Fix this by moving the rotation check inside if (state->visible) block.
Reported-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
ARM: dts: k3-j721e-common-proc-board: enable DP0 power
DP connector needs to provide 3.3V on the connector's power pin. Devices
like active adapters need the power to function.
This patch enables the power with a GPIO hog, so it's always enabled as
the power needs to be enabled for us to even detect that an active
adapter is connected.
Probably the power should be enabled only if the DP driver is loaded,
and disabled on remove or suspend, but as it's not clear where the power
should be handled (it's not really part of the DP IP in any way), we use
GPIO hog for now.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Andrew F. Davis <afd@ti.com>
DP connector needs to provide 3.3V on the connector's power pin. Devices
like active adapters need the power to function.
This patch enables the power with a GPIO hog, so it's always enabled as
the power needs to be enabled for us to even detect that an active
adapter is connected.
Probably the power should be enabled only if the DP driver is loaded,
and disabled on remove or suspend, but as it's not clear where the power
should be handled (it's not really part of the DP IP in any way), we use
GPIO hog for now.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Andrew F. Davis <afd@ti.com>
Merge branch 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into ti-rt-linux-4.19.y
TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.19.y
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
mmc: Select MMC_CQHCI for SDHCI_AM654
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.19.y
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
mmc: Select MMC_CQHCI for SDHCI_AM654
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
Merge branch 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel into ti-linux-4.19.y
TI-Feature: connectivity
TI-Tree: git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel.git
TI-Branch: connectivity-ti-linux-4.19.y
* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
mmc: Select MMC_CQHCI for SDHCI_AM654
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
TI-Feature: connectivity
TI-Tree: git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel.git
TI-Branch: connectivity-ti-linux-4.19.y
* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
mmc: Select MMC_CQHCI for SDHCI_AM654
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
Merge branch 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into ti-rt-linux-4.19.y
TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.19.y
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
drm/bridge: cdns-mhdp: Fix max swing and pre-emphasis reached conditions
drm/bridge: cdns-mhdp: Get rid of redundant enum pixel_format
drm/bridge: cdns-mhdp: Simplify DP output color format hacks
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.19.y
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
drm/bridge: cdns-mhdp: Fix max swing and pre-emphasis reached conditions
drm/bridge: cdns-mhdp: Get rid of redundant enum pixel_format
drm/bridge: cdns-mhdp: Simplify DP output color format hacks
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
Merge branch 'audio_display-ti-linux-4.19.y' of git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree into ti-linux-4.19.y
TI-Feature: audio-display
TI-Tree: git@git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree.git
TI-Branch: audio_display-ti-linux-4.19.y
* 'audio_display-ti-linux-4.19.y' of git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree:
drm/bridge: cdns-mhdp: Fix max swing and pre-emphasis reached conditions
drm/bridge: cdns-mhdp: Get rid of redundant enum pixel_format
drm/bridge: cdns-mhdp: Simplify DP output color format hacks
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
TI-Feature: audio-display
TI-Tree: git@git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree.git
TI-Branch: audio_display-ti-linux-4.19.y
* 'audio_display-ti-linux-4.19.y' of git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree:
drm/bridge: cdns-mhdp: Fix max swing and pre-emphasis reached conditions
drm/bridge: cdns-mhdp: Get rid of redundant enum pixel_format
drm/bridge: cdns-mhdp: Simplify DP output color format hacks
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
mmc: Select MMC_CQHCI for SDHCI_AM654
Select CONFIG_MMC_CQHCI for CONFIG_MMC_SDHCI_AM654 to enable Command
Queuing Support for J721e platforms.
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Select CONFIG_MMC_CQHCI for CONFIG_MMC_SDHCI_AM654 to enable Command
Queuing Support for J721e platforms.
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Merge branch 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into ti-rt-linux-4.19.y
TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.19.y
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
mmc: sdhci_am654: Add Support for Command Queuing Engine to J721E
PCI: endpoint: functions/pci-epf-test: Print throughput information
ti_config_fragments/connectivity.cfg: Enable NVME configs
ARM: dts: k3-j721e: Fix MMC0 speed modes
arm64: dts: k3-j721e-main: Add Support for UHS modes
arm64: dts: k3-j721e-main: Update OTAPDLY values for MMC
arm64: dts: k3-am65-main: Update OTAPDLY values for MMC
mmc: sdhci_am654: Enable DLL only for some speed modes
mmc: sdhci_am654: Update OTAPDLY writes
dt-bindings: mmc: sdhci-am654: Update Output tap delay binding
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.19.y
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
mmc: sdhci_am654: Add Support for Command Queuing Engine to J721E
PCI: endpoint: functions/pci-epf-test: Print throughput information
ti_config_fragments/connectivity.cfg: Enable NVME configs
ARM: dts: k3-j721e: Fix MMC0 speed modes
arm64: dts: k3-j721e-main: Add Support for UHS modes
arm64: dts: k3-j721e-main: Update OTAPDLY values for MMC
arm64: dts: k3-am65-main: Update OTAPDLY values for MMC
mmc: sdhci_am654: Enable DLL only for some speed modes
mmc: sdhci_am654: Update OTAPDLY writes
dt-bindings: mmc: sdhci-am654: Update Output tap delay binding
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
Merge branch 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel into ti-linux-4.19.y
TI-Feature: connectivity
TI-Tree: git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel.git
TI-Branch: connectivity-ti-linux-4.19.y
* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
mmc: sdhci_am654: Add Support for Command Queuing Engine to J721E
PCI: endpoint: functions/pci-epf-test: Print throughput information
ti_config_fragments/connectivity.cfg: Enable NVME configs
ARM: dts: k3-j721e: Fix MMC0 speed modes
arm64: dts: k3-j721e-main: Add Support for UHS modes
arm64: dts: k3-j721e-main: Update OTAPDLY values for MMC
arm64: dts: k3-am65-main: Update OTAPDLY values for MMC
mmc: sdhci_am654: Enable DLL only for some speed modes
mmc: sdhci_am654: Update OTAPDLY writes
dt-bindings: mmc: sdhci-am654: Update Output tap delay binding
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
TI-Feature: connectivity
TI-Tree: git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel.git
TI-Branch: connectivity-ti-linux-4.19.y
* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
mmc: sdhci_am654: Add Support for Command Queuing Engine to J721E
PCI: endpoint: functions/pci-epf-test: Print throughput information
ti_config_fragments/connectivity.cfg: Enable NVME configs
ARM: dts: k3-j721e: Fix MMC0 speed modes
arm64: dts: k3-j721e-main: Add Support for UHS modes
arm64: dts: k3-j721e-main: Update OTAPDLY values for MMC
arm64: dts: k3-am65-main: Update OTAPDLY values for MMC
mmc: sdhci_am654: Enable DLL only for some speed modes
mmc: sdhci_am654: Update OTAPDLY writes
dt-bindings: mmc: sdhci-am654: Update Output tap delay binding
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
drm/bridge: cdns-mhdp: Fix max swing and pre-emphasis reached conditions
Correcting max swing and max pre-emphasis reached conditions. Also
changed implementation when voltage swing and pre-emphasis combination
is not allowed, as per DP spec.
Signed-off-by: Swapnil Jakhade <sjakhade@cadence.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Correcting max swing and max pre-emphasis reached conditions. Also
changed implementation when voltage swing and pre-emphasis combination
is not allowed, as per DP spec.
Signed-off-by: Swapnil Jakhade <sjakhade@cadence.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drm/bridge: cdns-mhdp: Get rid of redundant enum pixel_format
The enum pixel_format is quite redundant as its literal values are not
used as such anywhere. We can just as well use DRM_COLOR_FORMAT_*
definitions. However, the currently unsupported monochrome (Y_ONLY)
format needs to be handled separately.
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
The enum pixel_format is quite redundant as its literal values are not
used as such anywhere. We can just as well use DRM_COLOR_FORMAT_*
definitions. However, the currently unsupported monochrome (Y_ONLY)
format needs to be handled separately.
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drm/bridge: cdns-mhdp: Simplify DP output color format hacks
There is no use to look what is in connector's display_info, since the
driver currently only supports DRM_COLOR_FORMAT_RGB444 and 8 bit per
color. The patch adds a warning print if this selected format is not
supported by the connected display.
Cdns-mhdp can not do color format conversions. So the proper
implementation for choosing the video sink color format should be made
in the DRM display driver and be communicated down to the cdns-mhdp
bridge.
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
There is no use to look what is in connector's display_info, since the
driver currently only supports DRM_COLOR_FORMAT_RGB444 and 8 bit per
color. The patch adds a warning print if this selected format is not
supported by the connected display.
Cdns-mhdp can not do color format conversions. So the proper
implementation for choosing the video sink color format should be made
in the DRM display driver and be communicated down to the cdns-mhdp
bridge.
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Merge branch 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into ti-rt-linux-4.19.y
TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.19.y
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
Input: edt-ft5x06: disable irq handling during suspend
ARM: dts: am57xx-idk-osd-lcd-common: make edt-ft5x06 a wakeup source
ARM: dts: dra7x-evm-osd-lcd-common: make edt-ft5x06 a wakeup source
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.19.y
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
Input: edt-ft5x06: disable irq handling during suspend
ARM: dts: am57xx-idk-osd-lcd-common: make edt-ft5x06 a wakeup source
ARM: dts: dra7x-evm-osd-lcd-common: make edt-ft5x06 a wakeup source
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
Merge branch 'audio_display-ti-linux-4.19.y' of git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree into ti-linux-4.19.y
TI-Feature: audio-display
TI-Tree: git@git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree.git
TI-Branch: audio_display-ti-linux-4.19.y
* 'audio_display-ti-linux-4.19.y' of git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree:
Input: edt-ft5x06: disable irq handling during suspend
ARM: dts: am57xx-idk-osd-lcd-common: make edt-ft5x06 a wakeup source
ARM: dts: dra7x-evm-osd-lcd-common: make edt-ft5x06 a wakeup source
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
TI-Feature: audio-display
TI-Tree: git@git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree.git
TI-Branch: audio_display-ti-linux-4.19.y
* 'audio_display-ti-linux-4.19.y' of git.ti.com:~jyrisarha/ti-linux-kernel/jyrisarhas-audio-video-linux-feature-tree:
Input: edt-ft5x06: disable irq handling during suspend
ARM: dts: am57xx-idk-osd-lcd-common: make edt-ft5x06 a wakeup source
ARM: dts: dra7x-evm-osd-lcd-common: make edt-ft5x06 a wakeup source
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
mmc: sdhci_am654: Add Support for Command Queuing Engine to J721E
Add Support for CQHCI (Command Queuing Host Controller Interface)
for each of the host controllers present in TI's J721E devices.
Add cqhci_ops and a .irq() callback to handle cqhci specific interrupts.
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Add Support for CQHCI (Command Queuing Host Controller Interface)
for each of the host controllers present in TI's J721E devices.
Add cqhci_ops and a .irq() callback to handle cqhci specific interrupts.
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Merge branch 'for19.03.00' of git.ti.com:~bparrot/ti-linux-kernel/bp-ti-linux into audio_display-ti-linux-4.19.y
2019.03 edt-ft touchscreen fixes
* 'for19.03.00' of git.ti.com:~bparrot/ti-linux-kernel/bp-ti-linux:
Input: edt-ft5x06: disable irq handling during suspend
ARM: dts: am57xx-idk-osd-lcd-common: make edt-ft5x06 a wakeup source
ARM: dts: dra7x-evm-osd-lcd-common: make edt-ft5x06 a wakeup source
2019.03 edt-ft touchscreen fixes
* 'for19.03.00' of git.ti.com:~bparrot/ti-linux-kernel/bp-ti-linux:
Input: edt-ft5x06: disable irq handling during suspend
ARM: dts: am57xx-idk-osd-lcd-common: make edt-ft5x06 a wakeup source
ARM: dts: dra7x-evm-osd-lcd-common: make edt-ft5x06 a wakeup source
Input: edt-ft5x06: disable irq handling during suspend
As a wakeup source when the system is in suspend there is little point
trying to access a register across the i2c bus as it is still inactive.
We need to prevent the irq handler from being called during suspend.
Without this modification upon wakeup you would see the following kernel
error:
[ 118.733717] PM: Wakeup source GPIO0
[ 118.751933] edt_ft5x06 1-0038: Unable to fetch data, error: -13
Few more explanation why this issue happens, just for info:
- suspend:
- dev suspend stage:
- edt_ft5x06_ts_suspend()
- omap i2c: nop
- late stage:
- omap i2c: pm_runtime is disabled for device
- irqs disabled and masked (if not wakeup source)
- noirq stage:
- omap i2c: forced off [A]
....
wake up
...
- noirq resume:
- omap i2c: forced on only if it was ON at point [A]
- irqs enabled - at this moment TS IRQ triggered [B] and trying
to enable omap i2c but PM runtime still disabled for it, so
-EACCES (-13)
- early resume:
- omap i2c: pm_runtime is enabled for device
- dev resume stage:
- omap i2c: nop
- edt_ft5x06_ts_resume()
by disabling and then enabling TS IRQ here -> it will be kept
disabled (but not masked) and marked as pending instead of
triggering at point [B]. and, finally, re-triggered here as
part of irq_enable() when everything is ready to handle it.
Signed-off-by: Benoit Parrot <bparrot@ti.com>
As a wakeup source when the system is in suspend there is little point
trying to access a register across the i2c bus as it is still inactive.
We need to prevent the irq handler from being called during suspend.
Without this modification upon wakeup you would see the following kernel
error:
[ 118.733717] PM: Wakeup source GPIO0
[ 118.751933] edt_ft5x06 1-0038: Unable to fetch data, error: -13
Few more explanation why this issue happens, just for info:
- suspend:
- dev suspend stage:
- edt_ft5x06_ts_suspend()
- omap i2c: nop
- late stage:
- omap i2c: pm_runtime is disabled for device
- irqs disabled and masked (if not wakeup source)
- noirq stage:
- omap i2c: forced off [A]
....
wake up
...
- noirq resume:
- omap i2c: forced on only if it was ON at point [A]
- irqs enabled - at this moment TS IRQ triggered [B] and trying
to enable omap i2c but PM runtime still disabled for it, so
-EACCES (-13)
- early resume:
- omap i2c: pm_runtime is enabled for device
- dev resume stage:
- omap i2c: nop
- edt_ft5x06_ts_resume()
by disabling and then enabling TS IRQ here -> it will be kept
disabled (but not masked) and marked as pending instead of
triggering at point [B]. and, finally, re-triggered here as
part of irq_enable() when everything is ready to handle it.
Signed-off-by: Benoit Parrot <bparrot@ti.com>
ARM: dts: am57xx-idk-osd-lcd-common: make edt-ft5x06 a wakeup source
The touchscreen driver no longer configures the device as wakeup source
by default. A "wakeup-source" property is needed.
Signed-off-by: Benoit Parrot <bparrot@ti.com>
The touchscreen driver no longer configures the device as wakeup source
by default. A "wakeup-source" property is needed.
Signed-off-by: Benoit Parrot <bparrot@ti.com>
ARM: dts: dra7x-evm-osd-lcd-common: make edt-ft5x06 a wakeup source
The touchscreen driver no longer configures the device as wakeup source by
default. A "wakeup-source" property is needed.
Signed-off-by: Benoit Parrot <bparrot@ti.com>
The touchscreen driver no longer configures the device as wakeup source by
default. A "wakeup-source" property is needed.
Signed-off-by: Benoit Parrot <bparrot@ti.com>
PCI: endpoint: functions/pci-epf-test: Print throughput information
Print throughput information in KB/s after every completed transfer,
including information on whether DMA is used or not.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Print throughput information in KB/s after every completed transfer,
including information on whether DMA is used or not.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
ti_config_fragments/connectivity.cfg: Enable NVME configs
Enable NVME configs.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Enable NVME configs.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
ARM: dts: k3-j721e: Fix MMC0 speed modes
Move mmc-hs400-1_8v capability from the board file to the
k3-j721e-main.dtsi as it is a SoC level property. Also add a property to
advertise ddr52 speed mode.
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Move mmc-hs400-1_8v capability from the board file to the
k3-j721e-main.dtsi as it is a SoC level property. Also add a property to
advertise ddr52 speed mode.
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arm64: dts: k3-j721e-main: Add Support for UHS modes
Enable Support for SD UHS modes other than SDR104 mode.
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Enable Support for SD UHS modes other than SDR104 mode.
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arm64: dts: k3-j721e-main: Update OTAPDLY values for MMC
Update OTAPDLY values to recommended values.
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Update OTAPDLY values to recommended values.
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arm64: dts: k3-am65-main: Update OTAPDLY values for MMC
According to the latest AM65x Data Manual[1], a different OTAPDLY value
is optimum for each speed mode. Replace ti-otap-del-sel with a different
ti,otap-del-sel- value for each MMC/SD speed mode.
[1] http://www.ti.com/lit/ds/symlink/am6526.pdf
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
According to the latest AM65x Data Manual[1], a different OTAPDLY value
is optimum for each speed mode. Replace ti-otap-del-sel with a different
ti,otap-del-sel- value for each MMC/SD speed mode.
[1] http://www.ti.com/lit/ds/symlink/am6526.pdf
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
mmc: sdhci_am654: Enable DLL only for some speed modes
Its recommended that DLL must only be enabled for SDR50, DDR50, DDR52,
SDR104, HS200 and HS400 speed modes. Move DLL configuration to its own
function and call it only in the above speed modes.
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Its recommended that DLL must only be enabled for SDR50, DDR50, DDR52,
SDR104, HS200 and HS400 speed modes. Move DLL configuration to its own
function and call it only in the above speed modes.
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
mmc: sdhci_am654: Update OTAPDLY writes
According to the latest AM65x Data Manual[1], a different output tap
delay value is optimum for a given speed mode. Therefore, deprecate the
ti,otap-del-sel binding and introduce a new binding for each of the
possible MMC/SD speed modes. If the legacy mode is not found, fall back
to old binding to maintain dts compatibility.
[1] http://www.ti.com/lit/ds/symlink/am6526.pdf
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
According to the latest AM65x Data Manual[1], a different output tap
delay value is optimum for a given speed mode. Therefore, deprecate the
ti,otap-del-sel binding and introduce a new binding for each of the
possible MMC/SD speed modes. If the legacy mode is not found, fall back
to old binding to maintain dts compatibility.
[1] http://www.ti.com/lit/ds/symlink/am6526.pdf
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
dt-bindings: mmc: sdhci-am654: Update Output tap delay binding
According to latest AM65x Data Manual[1], a different output tap delay
value is recommended for all speed modes. Therefore, replace the
ti,otap-del-sel binding with one ti,otap-del-sel- for each MMC/SD speed
mode.
[1] http://www.ti.com/lit/ds/symlink/am6526.pdf
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
According to latest AM65x Data Manual[1], a different output tap delay
value is recommended for all speed modes. Therefore, replace the
ti,otap-del-sel binding with one ti,otap-del-sel- for each MMC/SD speed
mode.
[1] http://www.ti.com/lit/ds/symlink/am6526.pdf
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Merge branch 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into ti-rt-linux-4.19.y
TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.19.y
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
remoteproc/k3-dsp: Fix successive boots of C66x DSPs in remoteproc mode
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.19.y
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
remoteproc/k3-dsp: Fix successive boots of C66x DSPs in remoteproc mode
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
Merge branch 'rpmsg-ti-linux-4.19.y-intg' of git://git.ti.com/rpmsg/rpmsg into ti-linux-4.19.y
TI-Feature: rpmsg
TI-Tree: git://git.ti.com/rpmsg/rpmsg.git
TI-Branch: rpmsg-ti-linux-4.19.y-intg
* 'rpmsg-ti-linux-4.19.y-intg' of git://git.ti.com/rpmsg/rpmsg:
remoteproc/k3-dsp: Fix successive boots of C66x DSPs in remoteproc mode
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
TI-Feature: rpmsg
TI-Tree: git://git.ti.com/rpmsg/rpmsg.git
TI-Branch: rpmsg-ti-linux-4.19.y-intg
* 'rpmsg-ti-linux-4.19.y-intg' of git://git.ti.com/rpmsg/rpmsg:
remoteproc/k3-dsp: Fix successive boots of C66x DSPs in remoteproc mode
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
remoteproc/k3-dsp: Fix successive boots of C66x DSPs in remoteproc mode
The C66x DSP remote processors on J721E SoCs have both a local reset
and a global module reset. The local reset is deasserted on SoC power
on reset, and so did not require any additional logic to achieve the
first remoteproc-mode boot. The local reset does control the CPU reset,
and so the local reset needs to be asserted and deasserted for properly
shutting down and re-booting the C66x DSP in remoteproc mode using either
the same firmware or a different firmware.
The core logic for this is already in place but disabled under a
pre-processor macro. Clean up the macro and fix the C66x successive
boot.
NOTE:
- The C71x DSP is not affected by this change.
- The current code still does not support loading into DSP internal
L1 or L2 RAMs, this logic will require further refactoring of code.
Signed-off-by: Suman Anna <s-anna@ti.com>
The C66x DSP remote processors on J721E SoCs have both a local reset
and a global module reset. The local reset is deasserted on SoC power
on reset, and so did not require any additional logic to achieve the
first remoteproc-mode boot. The local reset does control the CPU reset,
and so the local reset needs to be asserted and deasserted for properly
shutting down and re-booting the C66x DSP in remoteproc mode using either
the same firmware or a different firmware.
The core logic for this is already in place but disabled under a
pre-processor macro. Clean up the macro and fix the C66x successive
boot.
NOTE:
- The C71x DSP is not affected by this change.
- The current code still does not support loading into DSP internal
L1 or L2 RAMs, this logic will require further refactoring of code.
Signed-off-by: Suman Anna <s-anna@ti.com>
Merge branch 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel into ti-rt-linux-4.19.y
TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.19.y
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
arm64: dts: ti: k3-j721e-mcu Declare 8 bit TX capability for OSPI
arm64: dts: ti: k3-am65-mcu Declare 8 bit TX capability for OSPI
mtd: spi-nor: cadence-quadspi: Declare Octal mode capability
mtd: spi-nor: cadence-quadspi: Drop delayelem_ps parsing
mtd: spi-nor: cadence-quadspi: Take care of alignment restrictions for DDR mode
mtd: spi-nor: cadence-quadspi: Enter/exit DDR mode as required
mtd: spi-nor: cadence-quadspi: Update PHY calibration sequence for DDR mode
mtd: spi-nor: Introduce support for calibrating controller
mtd: spi-nor: Add Octal DDR mode support for Micron mt35x flash
mtd: spi-nor: Add support for Octal DDR mode
mtd: spi-nor: Add support for statefull Octal IO mode
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
TI-Feature: ti_linux_base_rt
TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git
TI-Branch: ti-linux-4.19.y
* 'ti-linux-4.19.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel:
arm64: dts: ti: k3-j721e-mcu Declare 8 bit TX capability for OSPI
arm64: dts: ti: k3-am65-mcu Declare 8 bit TX capability for OSPI
mtd: spi-nor: cadence-quadspi: Declare Octal mode capability
mtd: spi-nor: cadence-quadspi: Drop delayelem_ps parsing
mtd: spi-nor: cadence-quadspi: Take care of alignment restrictions for DDR mode
mtd: spi-nor: cadence-quadspi: Enter/exit DDR mode as required
mtd: spi-nor: cadence-quadspi: Update PHY calibration sequence for DDR mode
mtd: spi-nor: Introduce support for calibrating controller
mtd: spi-nor: Add Octal DDR mode support for Micron mt35x flash
mtd: spi-nor: Add support for Octal DDR mode
mtd: spi-nor: Add support for statefull Octal IO mode
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
Merge branch 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel into ti-linux-4.19.y
TI-Feature: connectivity
TI-Tree: git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel.git
TI-Branch: connectivity-ti-linux-4.19.y
* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
arm64: dts: ti: k3-j721e-mcu Declare 8 bit TX capability for OSPI
arm64: dts: ti: k3-am65-mcu Declare 8 bit TX capability for OSPI
mtd: spi-nor: cadence-quadspi: Declare Octal mode capability
mtd: spi-nor: cadence-quadspi: Drop delayelem_ps parsing
mtd: spi-nor: cadence-quadspi: Take care of alignment restrictions for DDR mode
mtd: spi-nor: cadence-quadspi: Enter/exit DDR mode as required
mtd: spi-nor: cadence-quadspi: Update PHY calibration sequence for DDR mode
mtd: spi-nor: Introduce support for calibrating controller
mtd: spi-nor: Add Octal DDR mode support for Micron mt35x flash
mtd: spi-nor: Add support for Octal DDR mode
mtd: spi-nor: Add support for statefull Octal IO mode
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
TI-Feature: connectivity
TI-Tree: git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel.git
TI-Branch: connectivity-ti-linux-4.19.y
* 'connectivity-ti-linux-4.19.y' of git://git.ti.com/connectivity-integration-tree/connectivity-ti-linux-kernel:
arm64: dts: ti: k3-j721e-mcu Declare 8 bit TX capability for OSPI
arm64: dts: ti: k3-am65-mcu Declare 8 bit TX capability for OSPI
mtd: spi-nor: cadence-quadspi: Declare Octal mode capability
mtd: spi-nor: cadence-quadspi: Drop delayelem_ps parsing
mtd: spi-nor: cadence-quadspi: Take care of alignment restrictions for DDR mode
mtd: spi-nor: cadence-quadspi: Enter/exit DDR mode as required
mtd: spi-nor: cadence-quadspi: Update PHY calibration sequence for DDR mode
mtd: spi-nor: Introduce support for calibrating controller
mtd: spi-nor: Add Octal DDR mode support for Micron mt35x flash
mtd: spi-nor: Add support for Octal DDR mode
mtd: spi-nor: Add support for statefull Octal IO mode
Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
arm64: dts: ti: k3-j721e-mcu Declare 8 bit TX capability for OSPI
Now that OSPI support 8D-8D-8D (8 bit DDR cmd-addr-data), declare 8 bit
TX capability in DT. While at that drop unused properties.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Now that OSPI support 8D-8D-8D (8 bit DDR cmd-addr-data), declare 8 bit
TX capability in DT. While at that drop unused properties.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
arm64: dts: ti: k3-am65-mcu Declare 8 bit TX capability for OSPI
Now that OSPI support 8D-8D-8D (8 bit DDR cmd-addr-data), declare 8 bit
TX capability in DT. While at that drop unused properties.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Now that OSPI support 8D-8D-8D (8 bit DDR cmd-addr-data), declare 8 bit
TX capability in DT. While at that drop unused properties.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
mtd: spi-nor: cadence-quadspi: Declare Octal mode capability
Now that driver support Octal DDR mode, declare stateful Octal mode
capability
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Now that driver support Octal DDR mode, declare stateful Octal mode
capability
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
mtd: spi-nor: cadence-quadspi: Drop delayelem_ps parsing
New PHY calibration sequence no longer requires this property.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
New PHY calibration sequence no longer requires this property.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
mtd: spi-nor: cadence-quadspi: Take care of alignment restrictions for DDR mode
As per TRM, when operating in Octal DDR PHY pipeline mode, reads should
be 16 byte aligned. Use bounce buffer for unaligned reads. Previously
driver enforced 8 byte alignment as required by SDR mode.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
As per TRM, when operating in Octal DDR PHY pipeline mode, reads should
be 16 byte aligned. Use bounce buffer for unaligned reads. Previously
driver enforced 8 byte alignment as required by SDR mode.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
mtd: spi-nor: cadence-quadspi: Enter/exit DDR mode as required
Configure controller to use DDR mode as and when required. This is
dictated by the protocol mode set by spi-nor framework.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Configure controller to use DDR mode as and when required. This is
dictated by the protocol mode set by spi-nor framework.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
mtd: spi-nor: cadence-quadspi: Update PHY calibration sequence for DDR mode
Update calibration sequence for Octal DDR mode. Sequence involves 2D
search to find range of TX DLL delay values and RX DLL delay values for
which controller is able to read data consistently from flash. Use
standard SFDP table as reference data to verify that reads are
consistent during 2D search.
Once ranges are obtained, choose the middle of TX and RX DLL delay
ranges as the working configuration.
Use PHY and DDR mode only for reading data from OSPI as advantage of
DDR mode for write is limited.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Update calibration sequence for Octal DDR mode. Sequence involves 2D
search to find range of TX DLL delay values and RX DLL delay values for
which controller is able to read data consistently from flash. Use
standard SFDP table as reference data to verify that reads are
consistent during 2D search.
Once ranges are obtained, choose the middle of TX and RX DLL delay
ranges as the working configuration.
Use PHY and DDR mode only for reading data from OSPI as advantage of
DDR mode for write is limited.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
mtd: spi-nor: Introduce support for calibrating controller
Certain SPI controllers have PHY which needs to be calibrated to work in
high frequency Octal DDR mode. Calibration generally involves tuning PHY
parameters until controller is able to read correct data from flash.
This would require to read pre defined data so as to compare during
calibration sequence. SFDP tables provide such predefined data.
Read SFDP at lower speed and in 1 bit mode and then pass this data to
driver to use during calibration sequence. Also, switch highest possible
8 bit DDR mode and tweak opcodes before calling calibration callback.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Certain SPI controllers have PHY which needs to be calibrated to work in
high frequency Octal DDR mode. Calibration generally involves tuning PHY
parameters until controller is able to read correct data from flash.
This would require to read pre defined data so as to compare during
calibration sequence. SFDP tables provide such predefined data.
Read SFDP at lower speed and in 1 bit mode and then pass this data to
driver to use during calibration sequence. Also, switch highest possible
8 bit DDR mode and tweak opcodes before calling calibration callback.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
mtd: spi-nor: Add Octal DDR mode support for Micron mt35x flash
Add support for Octal DDR mode to read data from Micron mt35x flash. For
now enter stateful Octal DDR mode just before reading data from flash
and exits the mode after reading. Benefit of using DDR mode for write is
limited as most time is actually spent in waiting for write to complete
than actual write itself.
This also allows us to be compatible with ROM code which expects flash
to in normal mode (and not Octal DDR mode)
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Add support for Octal DDR mode to read data from Micron mt35x flash. For
now enter stateful Octal DDR mode just before reading data from flash
and exits the mode after reading. Benefit of using DDR mode for write is
limited as most time is actually spent in waiting for write to complete
than actual write itself.
This also allows us to be compatible with ROM code which expects flash
to in normal mode (and not Octal DDR mode)
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
mtd: spi-nor: Add support for Octal DDR mode
Add framework level support required 8 bit DDR mode. Drop 8 bit SDR mode
as its only supported by Micron and is not required to be supported as per
xSPI specification.
Note that that opcodes are Micron specific and does not cover all flash
vendors
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Add framework level support required 8 bit DDR mode. Drop 8 bit SDR mode
as its only supported by Micron and is not required to be supported as per
xSPI specification.
Note that that opcodes are Micron specific and does not cover all flash
vendors
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
mtd: spi-nor: Add support for statefull Octal IO mode
xSPI compliant flashes support only 1 bit mode or 8 bit DDR mode.
Entering 8 bit DDR mode would require configuring certain registers in
flash in 1 bit mode. This procedure varies across flash vendor. Also,
different vendors require different number of wait cycles (dummy bytes)
in Octal DDR mode. Therefore provide two callbacks for flashes: change_op()
and adjust_op(). change_op() can be used for switching to Octal mode and
adjust_op() to adjust protocol specific settings for OSPI.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
xSPI compliant flashes support only 1 bit mode or 8 bit DDR mode.
Entering 8 bit DDR mode would require configuring certain registers in
flash in 1 bit mode. This procedure varies across flash vendor. Also,
different vendors require different number of wait cycles (dummy bytes)
in Octal DDR mode. Therefore provide two callbacks for flashes: change_op()
and adjust_op(). change_op() can be used for switching to Octal mode and
adjust_op() to adjust protocol specific settings for OSPI.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>