9 years agoMerge branch 'master/rebuild/22-drivers-hwqueue' into master/master-rt K2_RT_LINUX_03.10.10_14.09
Merge branch 'master/rebuild/22-drivers-hwqueue' into master/master-rt
hwqueue: keystone: Fix WARN assertion when CONFIG_DEBUG_MUTEXES enabled
During QoS initialization, the pdsp clock rate is needed to configure
the timer rate. This is done by calling clk_get_rate() which attempts to
acquire a mutex, but a spinlock is already held. This lock sequence
violation results in the WARN assertion. This patch determines the PDSP
clock rate before the spinlock is acquired.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
During QoS initialization, the pdsp clock rate is needed to configure
the timer rate. This is done by calling clk_get_rate() which attempts to
acquire a mutex, but a spinlock is already held. This lock sequence
violation results in the WARN assertion. This patch determines the PDSP
clock rate before the spinlock is acquired.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
Merge branch 'v3.10/rebuild/15-keystone-devicetree' into v3.10/master-rt
Merge branch 'v3.10/rebuild/02-no-upstream' into v3.10/master-rt
keystone: dts: enable mdio support on K2E and K2L by default
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
net: phy: marvell: provide genphy suspend/resume
Marvell PHYs support generic PHY suspend/resume, so provide those
callbacks to all marvell specific drivers.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Marvell PHYs support generic PHY suspend/resume, so provide those
callbacks to all marvell specific drivers.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers: net: phy: marvell.c: removed checkpatch.pl warnings
removes following warnings-
drivers/net/phy/marvell.c:37: WARNING: Use #include <linux/io.h> instead of <asm/io.h>
drivers/net/phy/marvell.c:39: WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
Signed-off-by: Avinash Kumar <avi.kp.137@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
removes following warnings-
drivers/net/phy/marvell.c:37: WARNING: Use #include <linux/io.h> instead of <asm/io.h>
drivers/net/phy/marvell.c:39: WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
Signed-off-by: Avinash Kumar <avi.kp.137@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
phy: Add Marvell 88E1510 phy ID
Add support for this new phy ID.
Signed-off-by: Rick Hoover <RHoover@digilentinc.com>
Signed-off-by: Steven Wang <steven.wang@digilentinc.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Add support for this new phy ID.
Signed-off-by: Rick Hoover <RHoover@digilentinc.com>
Signed-off-by: Steven Wang <steven.wang@digilentinc.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
phy: Add Marvell 88E1116R phy ID
This phy is on Xilinx ZC702 zynq development board.
Signed-off-by: Anirudha Sarangi <anirudh@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This phy is on Xilinx ZC702 zynq development board.
Signed-off-by: Anirudha Sarangi <anirudh@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
phy: Use macros instead of hardcoded values in marvell phy driver
Use macros from linux/marvell_phy.h instead of duplicate
magic phy ID in the driver.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Use macros from linux/marvell_phy.h instead of duplicate
magic phy ID in the driver.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Merge branch 'master/rebuild/20-firmware' into master/master-rt
firmware: keystone: Fix a bug in NetCP PA PDSP egress firmware
If the destination of flow cache L2 encapsulation (paEfRecLevel4_t)
set to EMAC Port, the packet will be routed to queue 0. This patch
updates the output thread ID to THREADID_ETHERNET1.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
If the destination of flow cache L2 encapsulation (paEfRecLevel4_t)
set to EMAC Port, the packet will be routed to queue 0. This patch
updates the output thread ID to THREADID_ETHERNET1.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
Merge branch 'master/rebuild/22-drivers-hwqueue' into master/master-rt
Merge branch 'master/rebuild/20-firmware' into master/master-rt
Merge branch 'master/rebuild/15-keystone-devicetree' into master/master-rt
firmware: keystone: Update QMSS QoS PDSP firmware to 2.0.1.8
This patch updates the QMSS QoS PDSP firmware to 2.0.1.8. This
changes the WRR shifts for packet and byte accounting from
20 and 11 to 17 and 8, respectively.
This patch must be applied along with the corresponding patches
to the HW Queue QoS support module and the DTS.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
This patch updates the QMSS QoS PDSP firmware to 2.0.1.8. This
changes the WRR shifts for packet and byte accounting from
20 and 11 to 17 and 8, respectively.
This patch must be applied along with the corresponding patches
to the HW Queue QoS support module and the DTS.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
hwqueue: keystone: Change QoS WRR to allow 1:10000 ratio
This patch changes the algorithm used to convert WRR ratios
to PDSP credits to allow for wide (1:10000) ratios.
The previous algorithm attempted to keep the mean of the
WRR credits to be 3000. This works with narrow ratios, but
with wide ratios the lower-weight queues received very small
credit values causing excessive overhead and a significant
degradation in throughput.
The new algorithm attempts to assign a credit of 1500 bytes
to the lowest-weight queue, and calculates higher-weight
queue credits accordingly. However, if this would result in
an overflow, the lowest-weight queue credit is divided by
two iteratively until the highest-weight queue credit fits.
A warning is generated if this results in an excessively
small credit value.
This patch also makes use of the updated WRR shifts to
allow a wider range of credit values, and thus must be
used with firmware 2.0.1.8.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
This patch changes the algorithm used to convert WRR ratios
to PDSP credits to allow for wide (1:10000) ratios.
The previous algorithm attempted to keep the mean of the
WRR credits to be 3000. This works with narrow ratios, but
with wide ratios the lower-weight queues received very small
credit values causing excessive overhead and a significant
degradation in throughput.
The new algorithm attempts to assign a credit of 1500 bytes
to the lowest-weight queue, and calculates higher-weight
queue credits accordingly. However, if this would result in
an overflow, the lowest-weight queue credit is divided by
two iteratively until the highest-weight queue credit fits.
A warning is generated if this results in an excessively
small credit value.
This patch also makes use of the updated WRR shifts to
allow a wider range of credit values, and thus must be
used with firmware 2.0.1.8.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
dts: keystone: Update QMSS QoS PDSP firmware to 2.0.1.8
This patch updates the QMSS QoS PDSP firmware name to 2.0.1.8.
This patch must be applied along with the corresponding patches
to the HW Queue QoS support module and firmware.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
This patch updates the QMSS QoS PDSP firmware name to 2.0.1.8.
This patch must be applied along with the corresponding patches
to the HW Queue QoS support module and firmware.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
Merge branch 'master/rebuild/20-firmware' into master/master-rt
firmware: keystone: Update K2E/K2L PA PDSP firmware to 3.0.1.0
Update the NetCP PA PDSP firmware for the K2E/K2L (new NetCP)
to rev 3.0.1.0.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
Update the NetCP PA PDSP firmware for the K2E/K2L (new NetCP)
to rev 3.0.1.0.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
Merge branch 'master/rebuild/24-drivers-net' into master/master-rt
Revert "net: keystone: Fix system hang with PA firmware 3.0.1.0"
The cause of the mysterious hang has been traced to a missing
constant table update, which is corrected in another commit.
This reverts commit d8bcf9fbfb2bc79c441a62fc30af019a9e1e68dd.
However, this patch retains the addition of the memory barriers,
which are necessary to ensure proper order of operations.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
The cause of the mysterious hang has been traced to a missing
constant table update, which is corrected in another commit.
This reverts commit d8bcf9fbfb2bc79c441a62fc30af019a9e1e68dd.
However, this patch retains the addition of the memory barriers,
which are necessary to ensure proper order of operations.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
net: keystone: Update PA PDSP constant tables for fw 3.0.1.0
This patch updates the PA PDSP constant tables as required by
firmware rev 3.0.1.0.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
This patch updates the PA PDSP constant tables as required by
firmware rev 3.0.1.0.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
Merge branch 'rebuild/01-upstream' into v3.10/master-rt
spi: davinci: fix spidev ioctl failure
user space application uses spidev device (/dev/spidev.xxx) to
communicate with slave devices, for example FPGA and every time it
calls setup() API, gpio_request() call is made to setup GPIO CS if in
use. This fails for the second time and subsequent calls if GPIO is
not freed. Add a gpio_free() call to free the GPIO if already in use
to fix this. Also add a check for return value gpio_direction_output()
call and take action. In addition, call gpio_free() in
davinci_spi_cleanup() to free up the GPIO pin in use.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
user space application uses spidev device (/dev/spidev.xxx) to
communicate with slave devices, for example FPGA and every time it
calls setup() API, gpio_request() call is made to setup GPIO CS if in
use. This fails for the second time and subsequent calls if GPIO is
not freed. Add a gpio_free() call to free the GPIO if already in use
to fix this. Also add a check for return value gpio_direction_output()
call and take action. In addition, call gpio_free() in
davinci_spi_cleanup() to free up the GPIO pin in use.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Merge branch 'master/rebuild/24-drivers-net' into master/master-rt
Merge branch 'master/rebuild/20-firmware' into master/master-rt
Merge branch 'master/rebuild/15-keystone-devicetree' into master/master-rt
net: keystone: Fix system hang with PA firmware 3.0.1.0
For no reason we can determine, attempting to reset the PA Packet
ID hardware after loading PA firmware 3.0.1.0 results in a lockup.
Fortunately the firmware no longer uses the Packet ID hardware,
so this reset is unnecessary. This patch removes this reset.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
For no reason we can determine, attempting to reset the PA Packet
ID hardware after loading PA firmware 3.0.1.0 results in a lockup.
Fortunately the firmware no longer uses the Packet ID hardware,
so this reset is unnecessary. This patch removes this reset.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
firmware: keystone: pa: Update PA firmware to version 03.00.01.00
Update PA firmware to revision 3.0.1.0. This update applies to
Keystone II K2K & K2H SoCs only.
As part of this update, PDSPs 0, 1, and 2 each receive unique
firmware rather than sharing the same firmware.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
Update PA firmware to revision 3.0.1.0. This update applies to
Keystone II K2K & K2H SoCs only.
As part of this update, PDSPs 0, 1, and 2 each receive unique
firmware rather than sharing the same firmware.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
dts: keystone: Update for NetCP PA 3.0.1.0 firmware
In prior revs of the NetCP PA firmware, PDSPs 0, 1, and 2 used
the same code. As of 3.0.1.0, each of these PDSPs have unique
firmware. This patch changes the firmware module names to
reflect this.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
In prior revs of the NetCP PA firmware, PDSPs 0, 1, and 2 used
the same code. As of 3.0.1.0, each of these PDSPs have unique
firmware. This patch changes the firmware module names to
reflect this.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
Merge branch 'master/rebuild/22-drivers-hwqueue' into master/master-rt
hwqueue: keystone: Allow multiple QoS trees per QMSS PDSP
This patch permits multiple QoS trees to co-exist within a single
QMSS PDSP. The only user-visible change is that the qos-tree property
of the qos-inputs section may now reference multiple QoS trees.
This patch does NOT extend the number of QoS ports supported per
PDSP (currently 20), and all trees are allocated from the same
range of queues (qos-inputs "values" parameter).
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
This patch permits multiple QoS trees to co-exist within a single
QMSS PDSP. The only user-visible change is that the qos-tree property
of the qos-inputs section may now reference multiple QoS trees.
This patch does NOT extend the number of QoS ports supported per
PDSP (currently 20), and all trees are allocated from the same
range of queues (qos-inputs "values" parameter).
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
Merge branch 'master/rebuild/24-drivers-net' into master/master-rt
net: keystone: Fixes to CPSW statistics collection
In certain applications it's beneficial to allow the CPSW h/w
stats counters to continue to increment even while the kernel
polls them. This patch implements this behavior for both the
ethss and ethss2 modules.
Along the way, some bugs were discovered and fixed:
In both modules, the timer routine synchronized against the ethtool-
triggered updates with spin_lock_bh(). A timer function is itself a
bottom-half, so this should be spin_lock().
Both modules accessed device statistics registers by dereferencing a
pointer rather than using the more appropriate macro readl_relaxed().
In ethss2, the hw_stats array was undersized: 72 vs 378. This caused
data following the hw_stats array to be overwritten. Also, the macro
ETHTOOL_STATS_NUM calculated (42 * 8 + 1) rather than (42 * (8 + 1))
due to missing parens.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
In certain applications it's beneficial to allow the CPSW h/w
stats counters to continue to increment even while the kernel
polls them. This patch implements this behavior for both the
ethss and ethss2 modules.
Along the way, some bugs were discovered and fixed:
In both modules, the timer routine synchronized against the ethtool-
triggered updates with spin_lock_bh(). A timer function is itself a
bottom-half, so this should be spin_lock().
Both modules accessed device statistics registers by dereferencing a
pointer rather than using the more appropriate macro readl_relaxed().
In ethss2, the hw_stats array was undersized: 72 vs 378. This caused
data following the hw_stats array to be overwritten. Also, the macro
ETHTOOL_STATS_NUM calculated (42 * 8 + 1) rather than (42 * (8 + 1))
due to missing parens.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
Merge branch 'rebuild/13-keystone-defconfig' into v3.10/master-rt
ARM: keystone2: defconfig: enable SATA over PCI
To allow SATA work on K2E EVM, enable it in the build by
default.
Murali
To allow SATA work on K2E EVM, enable it in the build by
default.
Murali
Merge branch 'rebuild/33-drivers-pcie' into v3.10/master-rt
Merge branch 'rebuild/15-keystone-devicetree' into v3.10/master-rt
Merge branch 'rebuild/12-keystone-machine' into v3.10/master-rt
keystone: dts: fix the IO CPU address to a common reserve address
Move this IO CPU address range to unused address across all K2 SoCs.
This is not really used as Keystone PCI doesn't support IO port access,
but is required to satisfy PCI core.
Also change the start address of second pci port IO region to begin
after the end address of port 0 and add a port number attribute for
second port to enable selection of port specific SerDes lanes.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Move this IO CPU address range to unused address across all K2 SoCs.
This is not really used as Keystone PCI doesn't support IO port access,
but is required to satisfy PCI core.
Also change the start address of second pci port IO region to begin
after the end address of port 0 and add a port number attribute for
second port to enable selection of port specific SerDes lanes.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
keystone: dts: add second pci controller for K2E
This adds bindings for K2E SoC for second PCIe controller port
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
This adds bindings for K2E SoC for second PCIe controller port
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
ARM: keystone: enable PCI_DOMAIN to support multiple PCI controllers
select CONFIG_PM_DOMAIN by default for keystone to support multiple
PCI controllers
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
select CONFIG_PM_DOMAIN by default for keystone to support multiple
PCI controllers
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
ahci: add pcid for Marvel 0x9182 controller
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
pci: keystone: update for two instances of PCI controller
Enhance the driver to support two instances of the PCI controller.
The SerDes setup code uses domain number to identify the instance and
initialize the corresponding SerDes lanes.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Enhance the driver to support two instances of the PCI controller.
The SerDes setup code uses domain number to identify the instance and
initialize the corresponding SerDes lanes.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Merge branch 'master/rebuild/24-drivers-net' into master/master-rt
Merge branch 'master/rebuild/15-keystone-devicetree' into master/master-rt
net: keystone: Get NetCP PA PDSP firmware file names from DTS
Prior to this patch, the firmware names used to load the NetCP PA
PDSPs was hard-coded. This is especially problematic for the older
PA, where one firmware image was loaded into multiple PDSPs. Changing
this should not require kernel source code modifications.
This patch change the NetCP PA drivers to get the PDSP firmware
file names from the DTS.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
Prior to this patch, the firmware names used to load the NetCP PA
PDSPs was hard-coded. This is especially problematic for the older
PA, where one firmware image was loaded into multiple PDSPs. Changing
this should not require kernel source code modifications.
This patch change the NetCP PA drivers to get the PDSP firmware
file names from the DTS.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
dts: keystone: Add NetCP PA PDSP firmware file name definitions
Prior to this patch, the firmware names used to load the NetCP PA
PDSPs was hard-coded. This is especially problematic for the older
PA, where one firmware image was loaded into multiple PDSPs. Changing
this should not require kernel source code.
This patch adds PA PDSP firmware names to the DTS in preparation
for a corresponding change to the NetCP PA driver.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
Prior to this patch, the firmware names used to load the NetCP PA
PDSPs was hard-coded. This is especially problematic for the older
PA, where one firmware image was loaded into multiple PDSPs. Changing
this should not require kernel source code.
This patch adds PA PDSP firmware names to the DTS in preparation
for a corresponding change to the NetCP PA driver.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
Merge branch 'master/rebuild/24-drivers-net' into master/master-rt
net: keystone: Export CPSW port number as interface "dev_id"
This patch exports the CPSW port number as the interface "dev_id".
This field previously was always zero. If the NetCP instance is
configured in single-interface mode, it will remain zero. In
multi-interface mode, the number is the CPSW port number in the
range 1 to n, where "n" is the number of external ports (4 for
the k2hk, 8 for the k2e, etc).
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
This patch exports the CPSW port number as the interface "dev_id".
This field previously was always zero. If the NetCP instance is
configured in single-interface mode, it will remain zero. In
multi-interface mode, the number is the CPSW port number in the
range 1 to n, where "n" is the number of external ports (4 for
the k2hk, 8 for the k2e, etc).
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
Merge branch 'rebuild/02-no-upstream' into v3.10/master-rt
ARM: 8036/1: Enable IRQs before attempting to read user space in __und_usr
The Undef abort handler in the kernel reads the undefined instruction
from user space. If the page table was modified from another CPU, the
user access could fail and do_page_fault() will be executed with
interrupts disabled. This can potentially deadlock on ARM11MPCore or on
Cortex-A15 with erratum 798181 workaround enabled (both implying IPI for
TLB maintenance with page table lock held).
This patch enables the IRQs in __und_usr before attempting to read the
instruction from user space.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Arun KS <getarunks@gmail.com>
Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
The Undef abort handler in the kernel reads the undefined instruction
from user space. If the page table was modified from another CPU, the
user access could fail and do_page_fault() will be executed with
interrupts disabled. This can potentially deadlock on ARM11MPCore or on
Cortex-A15 with erratum 798181 workaround enabled (both implying IPI for
TLB maintenance with page table lock held).
This patch enables the IRQs in __und_usr before attempting to read the
instruction from user space.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Arun KS <getarunks@gmail.com>
Cc: Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Merge branch 'master/rebuild/22-drivers-hwqueue' into master/master-rt
hwqueue: keystone: Minimize QoS output rate round-off errors
When calculating the QoS output rate, the desired rate was divided
by the number of PDSP timer ticks per second before being multiplied
(shifted) to calculate the number of credits. This truncates small
output rates. For example, requesting 125000 bytes/sec (1 Mbps)
gives an actual output rate of 120000 bytes/sec (960 Kbps).
This patch uses 64-bit integer math to allow the multiplication to
be done before the divide, minimizing the round-off errors.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
When calculating the QoS output rate, the desired rate was divided
by the number of PDSP timer ticks per second before being multiplied
(shifted) to calculate the number of credits. This truncates small
output rates. For example, requesting 125000 bytes/sec (1 Mbps)
gives an actual output rate of 120000 bytes/sec (960 Kbps).
This patch uses 64-bit integer math to allow the multiplication to
be done before the divide, minimizing the round-off errors.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
Merge branch 'rebuild/33-drivers-pcie' into v3.10/master-rt
Merge branch 'rebuild/24-drivers-net' into v3.10/master-rt
pci: keystone: fix msi irq teardown issue
Currently arch_teardown_msi_irq() casues a kernel crash due to invalid
info structure. This seems to be not right way to retrieve the info.
retrieve the info data from msi descriptor instead.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Currently arch_teardown_msi_irq() casues a kernel crash due to invalid
info structure. This seems to be not right way to retrieve the info.
retrieve the info data from msi descriptor instead.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
keystone: net: use h/w capability to remove FCS from rx packet
CPSW_NU has a bit in control register to remove FCS from packet send on
Port 0 tx. Use this to strip FCS instead of software doing it.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
CPSW_NU has a bit in control register to remove FCS from packet send on
Port 0 tx. Use this to strip FCS instead of software doing it.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Merge branch 'v3.10/15-keystone-devicetree' into v3.10/master-rt
Merge branch 'v3.10/24-drivers-net' into v3.10/master-rt
keystone: dts: update XGE pktdma queue manager configuration
On Edison, the 10ge cdma_txq_qmgr is tied to 0x2. But there
is only 1 physical QM. As such the 10ge pktdma QM2 base address
register need to be configured to point to the only physical
QM.
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
On Edison, the 10ge cdma_txq_qmgr is tied to 0x2. But there
is only 1 physical QM. As such the 10ge pktdma QM2 base address
register need to be configured to point to the only physical
QM.
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
keystone: dts: add support of 10ge serdes configurations
To be in sync with changes made to K2HK platform.
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
To be in sync with changes made to K2HK platform.
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
net: keystone: xge: get phy-handle only if link interface is MAC-to-PHY
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Merge branch 'rebuild/32-drivers-rpmsg' into v3.10/master-rt
Merge branch 'rebuild/15-keystone-devicetree' into v3.10/master-rt
Merge branch 'rebuild/02-no-upstream' into v3.10/master-rt
rpmsg: refine fix for invalidating RPMSG buffers
- The code was deciding on the size of buffer to invalidate
based on size read from the Buffer
( fixed by invalidating the complete buffer)
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
- The code was deciding on the size of buffer to invalidate
based on size read from the Buffer
( fixed by invalidating the complete buffer)
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
keystone: dts: Move hyperlink to k2e-evm, Update serdes config parameters
- Moved hyperlink from device specifc file to platform specific file for k2e-evm
- Added parameters tunable for each platform
ti,serdes_refclk_khz, ti,serdes_maxserrate_khz, ti,serdes_lanerate
ti,serdes_c1, ti,serdes_c2, ti,serdes_cm
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
- Moved hyperlink from device specifc file to platform specific file for k2e-evm
- Added parameters tunable for each platform
ti,serdes_refclk_khz, ti,serdes_maxserrate_khz, ti,serdes_lanerate
ti,serdes_c1, ti,serdes_c2, ti,serdes_cm
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
mtd: mtd_oobtest: generate consistent data for verification
mtd_oobtest writes OOB, read it back and verify. The verification is
not correctly done if oobsize is not multiple of 4. Although the data
to be written and the data to be compared are generated by several
prandom_byte_state() calls starting with the same seed, these two are
generated with the different size and different number of calls.
Due to the implementation of prandom_byte_state() if the size on each
call is not multiple of 4, the resulting data is not always same.
This fixes it by just calling prandom_byte_state() once and using
correct range instead of calling it multiple times for each.
Reported-by: George Cherian <george.cherian@ti.com>
Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
Cc: George Cherian <george.cherian@ti.com>
Cc: Lothar Waßmann <LW@KARO-electronics.de>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Hao Zhang <hzhang@ti.com>
mtd_oobtest writes OOB, read it back and verify. The verification is
not correctly done if oobsize is not multiple of 4. Although the data
to be written and the data to be compared are generated by several
prandom_byte_state() calls starting with the same seed, these two are
generated with the different size and different number of calls.
Due to the implementation of prandom_byte_state() if the size on each
call is not multiple of 4, the resulting data is not always same.
This fixes it by just calling prandom_byte_state() once and using
correct range instead of calling it multiple times for each.
Reported-by: George Cherian <george.cherian@ti.com>
Reported-by: Lothar Waßmann <LW@KARO-electronics.de>
Tested-by: Lothar Waßmann <LW@KARO-electronics.de>
Cc: George Cherian <george.cherian@ti.com>
Cc: Lothar Waßmann <LW@KARO-electronics.de>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Hao Zhang <hzhang@ti.com>
Merge branch 'master/rebuild/24-drivers-net' into master/master-rt
Merge branch 'master/rebuild/23-drivers-dmaengine' into master/master-rt
net: keystone: Clean up network interface shutdown
This patch cleans up netcp_ndo_stop() to better handle interface
shutdown while there is network traffic flowing. It reorders the
shutdown sequence to flush the RX Free pools before closing the
DMA RX channel to stop the flow of incoming packets.
This patch also asserts SGMII RTRESET during shutdown to avoid
having the hardware wedge when shutting down with high incoming
traffic rates. This is cleared when the interface is brought
back up.
An implementation flaw in the management of PA v1 PDSP1 LUT1 table
entries caused crashes with repeated bouncing of interfaces. This
patch corrects that as well.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
This patch cleans up netcp_ndo_stop() to better handle interface
shutdown while there is network traffic flowing. It reorders the
shutdown sequence to flush the RX Free pools before closing the
DMA RX channel to stop the flow of incoming packets.
This patch also asserts SGMII RTRESET during shutdown to avoid
having the hardware wedge when shutting down with high incoming
traffic rates. This is cleared when the interface is brought
back up.
An implementation flaw in the management of PA v1 PDSP1 LUT1 table
entries caused crashes with repeated bouncing of interfaces. This
patch corrects that as well.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
dma: keystone: Clean up close handling, add dma_rxfree_flush()
This patch cleans up the handling of channel close when packets
may be still in-flight. It also resolves a possible deadlock
if chan_destroy() is called while the channel is in OPENING
state.
It also adds a new control function, dma_rxfree_flush(), to allow
higher level drivers to request the flushing of the RX Free pool
on a channel. While this is still done automatically during channel
close, there are occasions when it's desirable to do this BEFORE
closing the channel.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
This patch cleans up the handling of channel close when packets
may be still in-flight. It also resolves a possible deadlock
if chan_destroy() is called while the channel is in OPENING
state.
It also adds a new control function, dma_rxfree_flush(), to allow
higher level drivers to request the flushing of the RX Free pool
on a channel. While this is still done automatically during channel
close, there are occasions when it's desirable to do this BEFORE
closing the channel.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
Merge branch 'v3.10/24-drivers-net' into v3.10/master-rt
net: keystone: cpts: add ts_comp polarity config from dts for k2e/l
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Merge branch 'rebuild/02-no-upstream' into v3.10/master-rt
arm: arch_timer: increase arch_timer precision.
On systems with high arch_timer_rate, which is close to the NSEC_PER_SEC
value, the sched_clock_mult rounded to integer may have huge inaccuracy
and timer may fire significantly earlier than it should.
As far as the arch timer has only 56 bit, we may use additional 8 bits
as a fractional part for the arch_timer_rate. Actually in this patch we
use only 7 bits. Evan that increased accuracy in 128 times.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
On systems with high arch_timer_rate, which is close to the NSEC_PER_SEC
value, the sched_clock_mult rounded to integer may have huge inaccuracy
and timer may fire significantly earlier than it should.
As far as the arch timer has only 56 bit, we may use additional 8 bits
as a fractional part for the arch_timer_rate. Actually in this patch we
use only 7 bits. Evan that increased accuracy in 128 times.
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Merge branch 'rebuild/34-drivers-crypto' into v3.10/master-rt
crypto: keystone: Fix Command label buffer overflow
The maximum size of PSDATA allowed in a 128byte pktdma descriptor
is 64 bytes. Keystone crypto driver sends command-label & the
crypto request context identifier in PSDATA. The driver needs
to ensure that the total size of these don't exceed the size of
PSDATA. Also there was a bug in the driver code that the buffer
size for holding this data was not sufficient.
Signed-off-by: Sandeep Nair <sandeep_n@ti.com>
The maximum size of PSDATA allowed in a 128byte pktdma descriptor
is 64 bytes. Keystone crypto driver sends command-label & the
crypto request context identifier in PSDATA. The driver needs
to ensure that the total size of these don't exceed the size of
PSDATA. Also there was a bug in the driver code that the buffer
size for holding this data was not sufficient.
Signed-off-by: Sandeep Nair <sandeep_n@ti.com>
Merge branch 'rebuild/15-keystone-devicetree' into v3.10/master-rt
Merge branch 'rebuild/24-drivers-net' into v3.10/master-rt
keystone: dts: disable 10G bindings by default
The EVM requires additional add on cards to support 10G. As the hardware
is not present in the EVM, by default it throws some error to the console
and is undesirable. Right thing to do is to keep the binding for 10G
disabled and enable it when the board has the required hardware to
support 10G Ethernet. This patch keeps it disabled by default. Some
suggested options to use for testing are
- enable the bindings through u-boot boot command by adding following
to the bootcmd.
fdt addr ${addr_fdt};
fdt set /soc/i2c2/pca@20 status "ok";
fdt set /soc/netcp@2f00000 status "ok";
fdt set /soc/mdiox/ status "ok";
Or
update the status to "ok" in DTS for the above nodes and rebuild
DTB and use. User may extract the existing DTS file
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
The EVM requires additional add on cards to support 10G. As the hardware
is not present in the EVM, by default it throws some error to the console
and is undesirable. Right thing to do is to keep the binding for 10G
disabled and enable it when the board has the required hardware to
support 10G Ethernet. This patch keeps it disabled by default. Some
suggested options to use for testing are
- enable the bindings through u-boot boot command by adding following
to the bootcmd.
fdt addr ${addr_fdt};
fdt set /soc/i2c2/pca@20 status "ok";
fdt set /soc/netcp@2f00000 status "ok";
fdt set /soc/mdiox/ status "ok";
Or
update the status to "ok" in DTS for the above nodes and rebuild
DTB and use. User may extract the existing DTS file
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
net: keystone: silence the warning of netcp_ver dt parameter not present
This patch silence the following warning message.
[ 2199.909222] keystone-netcp 2090000.netcp: missing netcp_ver parameter, err -22
[ 2199.916475] keystone-netcp 2090000.netcp: missing netcp_ver parameter, err -22
As per the code, and comment for netcp_ver, this DT property is required
to identify NetCP 1.0 from NSS 1.0. So no need for the warning message at
the console and just default to NetCP 1.0 when the attribute is not
present.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
This patch silence the following warning message.
[ 2199.909222] keystone-netcp 2090000.netcp: missing netcp_ver parameter, err -22
[ 2199.916475] keystone-netcp 2090000.netcp: missing netcp_ver parameter, err -22
As per the code, and comment for netcp_ver, this DT property is required
to identify NetCP 1.0 from NSS 1.0. So no need for the warning message at
the console and just default to NetCP 1.0 when the attribute is not
present.
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
9 years agoMerge remote-tracking branch 'origin/master/rebuild/24-drivers-net' into master/master-rt
Merge remote-tracking branch 'origin/master/rebuild/24-drivers-net' into master/master-rt
net: keystone: Allocate RX packet buffers using __GFP_DMA
The Keystone II DMA hardware can only access addresses in the
lower 2 GiB of SDRAM. This patch makes sure the RX buffers are
allocated using the __GFP_DMA flag so they meet this requirement.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
The Keystone II DMA hardware can only access addresses in the
lower 2 GiB of SDRAM. This patch makes sure the RX buffers are
allocated using the __GFP_DMA flag so they meet this requirement.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
net: Export __netdev_alloc_frag() to allow gfp_mask flags
This patch makes the function __netdev_alloc_frag() non-static and
exports it so that drivers that need to specify additional flags,
such as __GFP_DMA, can use it. The currently exported function,
netdev_alloc_frag() doesn't allow passing in gfp_mask flags.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
This patch makes the function __netdev_alloc_frag() non-static and
exports it so that drivers that need to specify additional flags,
such as __GFP_DMA, can use it. The currently exported function,
netdev_alloc_frag() doesn't allow passing in gfp_mask flags.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
net: keystone: Fix DMA unmap buffer sizes
This patch fixes the buffer sizes passed to dma_unmap_single() to
be the size previously mapped, rather than the size of the entire
allocation. This avoids unmapping areas that were not previously
mapped.
Also extended the #ifdef DEBUG around the packet dump functions,
since this only necessary when debugging.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
This patch fixes the buffer sizes passed to dma_unmap_single() to
be the size previously mapped, rather than the size of the entire
allocation. This avoids unmapping areas that were not previously
mapped.
Also extended the #ifdef DEBUG around the packet dump functions,
since this only necessary when debugging.
Signed-off-by: Reece R. Pollack <x0183204@ti.com>
Merge branch 'v3.10/15-keystone-devicetree' into v3.10/master-rt
Merge branch 'v3.10/24-drivers-net' into v3.10/master-rt
keystone: dts: cpts: enable k2e cpts
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
net: keystone: cpts: replace delayed work by timer callback
Observed issue of delayed work on k2e platform. Use timer
callback as a work around.
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Observed issue of delayed work on k2e platform. Use timer
callback as a work around.
Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
Merge remote-tracking branch 'gtgit/master/rebuild/20-firmware' into v3.10/master-rt
Merge branch 'rebuild/32-drivers-rpmsg' into v3.10/master-rt
Merge branch 'rebuild/15-keystone-devicetree' into v3.10/master-rt
keystone: dts: k2hk: Update serdes config parameters
- Removed earlier c1, c2, cm parameters and modified format
- Added parameters tunable for each platform
ti,serdes_refclk_khz, ti,serdes_maxserrate_khz, ti,serdes_lanerate
ti,serdes_c1, ti,serdes_c2, ti,serdes_cm
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
- Removed earlier c1, c2, cm parameters and modified format
- Added parameters tunable for each platform
ti,serdes_refclk_khz, ti,serdes_maxserrate_khz, ti,serdes_lanerate
ti,serdes_c1, ti,serdes_c2, ti,serdes_cm
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
Documentation: dts: ti,uio-module-drv: Update configuration parameters
- Instead of generic parameters specific paramters for ti,serdes are added
- These parameters are needed to be tuned per platform
ti,serdes_refclk_khz, ti,serdes_maxserrate_khz, ti,serdes_lanerate
serdes equilization tap parameters: ti,serdes_c1, ti,serdes_c2, ti_serdes_cm
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
- Instead of generic parameters specific paramters for ti,serdes are added
- These parameters are needed to be tuned per platform
ti,serdes_refclk_khz, ti,serdes_maxserrate_khz, ti,serdes_lanerate
serdes equilization tap parameters: ti,serdes_c1, ti,serdes_c2, ti_serdes_cm
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
rpmsg: Fix issues related to invalidating rpmsg buffers
- the code to invalidate and writeback the RPMSG buffers
was done incorrectly.
- Added code to sync the buffers before adding to virtqueue
and before use by cpu
- Note this code is only for keystone2
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
- the code to invalidate and writeback the RPMSG buffers
was done incorrectly.
- Added code to sync the buffers before adding to virtqueue
and before use by cpu
- Note this code is only for keystone2
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
firmware: keystone: pa: Update PA firmware to version 03.00.00.10
Update PA firmware to revision 3.0.0.10. This update applies to
Keystone II K2E and K2L SoCs.
Signed-off-by: Hao Zhang <hzhang@ti.com>
Update PA firmware to revision 3.0.0.10. This update applies to
Keystone II K2E and K2L SoCs.
Signed-off-by: Hao Zhang <hzhang@ti.com>
Merge branch 'rebuild/02-no-upstream' into v3.10/master-rt