[6.18] Rebase ARM commits from 4.14 kernel - #286
Conversation
In preparation for upgrading to gcc 4.7 we need a copy of the pre-generated header arm-nilrt-linux-gnueabi-elfconfig.h that matches the toolchain prefix. This file is identical to: arm-none-linux-gnueabi-elfconfig.h Signed-off-by: Gratian Crisan <gratian.crisan@ni.com> Acked-by: Brad Mouring <brad.mouring@ni.com>
In order to support building the tools needed for on-target versioning for x86_64 targets (since HOSTCC continues to be x86), adding a pregenerated header for that toolchain. Signed-off-by: Brad Mouring <brad.mouring@ni.com> Acked-by: Gratian Crisan <gratian.crisan@ni.com>
62bc419 to
b9f19b1
Compare
|
v2: Add |
b9f19b1 to
cc2b6fc
Compare
|
v3: Updated some commit messages. |
cc2b6fc to
1b1b4f3
Compare
|
v4: savedefconfig (which I forgot to do previously). Enabled other configs required for CONFIG_RCU_NOCB_CPU_DEFAULT_ALL in nati_slsc_defconfig, nati_bluefin_defconfig. Note: It's not yet clear if CONFIG_RCU_NOCB_CPU_DEFAULT_ALL is required in nati_slsc_defconfig, nati_bluefin_defconfig; will remove the changes later if not required. |
|
v5: Cherry-pick few more commits that were left out as part of original rebase due to rebase/build failures. Expanded github-actions to add ARM checks. |
|
Note: |
|
v6: Disable CONFIG_LOCALVERSION_AUTO so some drivers can compile. |
|
@chaitu236 I am about half way through the list of commits. Here is what I've found so far:
|
Signed-off-by: Ben Shelton <ben.shelton@ni.com> Acked-by: Scot Salmon <scot.salmon@ni.com> Acked-by: Terry Wilcox <terry.wilcox@ni.com> Natinst-ReviewBoard-ID: 69848 [gratian: convert to new syscall table format for arm] Signed-off-by: Gratian Crisan <gratian.crisan@ni.com> [cvadrevu: Updated to just add missing Zynq code] Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
Add the leds-ni793x driver which controls the RT User 1 LED on the NI-793xR devices. The RT User 1 LED control is exposed through the Zynq FPGA logic. Signed-off-by: Francesca Ramadori <francesca.ramadori@ni.com> Signed-off-by: Brad Mouring <brad.mouring@ni.com> Acked-by: Josh Cartwright <joshc@ni.com> Acked-by: Ben Shelton <ben.shelton@ni.com> [cvadrevu: Fixed trivial conflicts due to newer modules] [cvadrevu: Updated ni793x_leds_remove signature for newer kernel] [cvadrevu: Replaced ni793x_leds_ids with ni793x_led_ids] Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
Add documentation for leds-ni793x devicetree bindings. This driver controls the RT User1 LED on the FlexRIO NI-793xR devices. Signed-off-by: Francesca Ramadori <francesca.ramadori@ni.com> Signed-off-by: Brad Mouring <brad.mouring@ni.com> Acked-by: Josh Cartwright <joshc@ni.com> Acked-by: Ben Shelton <ben.shelton@ni.com>
Clients are drivers for peripherals with physical lines routed through the FPGA. Ethernet and serial will want to receive notifications so they can avoid accessing hardware while the FPGA is unprogrammed. Signed-off-by: Kyle Teske <kyle.teske@ni.com> Natinst-ReviewBoard-ID: 26536 [cvadrevu: Fixed trivial conflicts due to newer modules] Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
We add a separate notification which will get called when FPGA programming fails. This is to enable client drivers to know when to stop waiting for FPGA to come up, if the re-programming fails. Signed-off-by: Karthik Manamcheri <karthik.manamcheri@ni.com>
If fpgaperipheral_probe succeeds, it generates no debug output, even at the highest loglevel. Add a success message to make device tree debugging easier. Signed-off-by: Ben Shelton <ben.shelton@ni.com>
The NI Zynq prototype board has a CPLD that provides various board-management capabilities. Signed-off-by: Josh Cartwright <josh.cartwright@ni.com> Signed-off-by: Jaeden Amero <jaeden.amero@ni.com> Acked-by: Jeff Westfahl <jeff.westfahl@ni.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> [cvadrevu: Fixed trivial conflicts due to newer module] Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
This provides a general purpose, raw interface to the CPLD's scratchpad. The scratchpad can be used to communicate between soft reboots of the target. Signed-off-by: Josh Cartwright <josh.cartwright@ni.com>
This is a read/write attribute that will set the necessary bits in the scratch registers used to determine which mode the board boots into. Currently, valid modes are 'runtime', 'safemode', and 'recovery'. Signed-off-by: Josh Cartwright <josh.cartwright@ni.com>
Signed-off-by: Josh Cartwright <josh.cartwright@ni.com> Signed-off-by: Scot Salmon <scot.salmon@ni.com> Acked-by: Brad Mouring <brad.mouring@ni.com> Acked-by: Josh Cartwright <josh.cartwright@ni.com> Natinst-ReviewBoard-ID: 36482
Use the SLCR to reboot the zynq if a reset function is not provided. Signed-off-by: Josh Cartwright <josh.cartwright@ni.com> Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com> Acked-by: Jeff Westfahl <jeff.westfahl@ni.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Natinst-ReviewBoard-ID: 90458
This will expose the switches as sysfs attributes for consumption by the RT utilities VIs. Signed-off-by: Josh Cartwright <josh.cartwright@ni.com>
Add support for the Dos Equis CPLD watchdog, implementing the NI Watchdog ioctl interface with a misc device. Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com> Signed-off-by: Scot Salmon <scot.salmon@ni.com> Acked-by: Brad Mouring <brad.mouring@ni.com> Acked-by: Josh Cartwright <josh.cartwright@ni.com> Natinst-ReviewBoard-ID: 36482
Signed-off-by: Ioan Cornea <ioan.cornea@ni.com>
cRIO-906[6,7] (Sol) CPLD requires new driver support since it has a new version number. Also, the red and yellow LEDs and wifi LEDs are not supported. Signed-off-by: Keng Soon Cheah <keng.soon.cheah@ni.com>
Add support for Tecate sbRIO to the CPLD by adding it to the list of CPLDs. It uses Sol-style LEDs. Signed-off-by: Jaeden Amero <jaeden.amero@ni.com>
In order to prevent us from sending out anything on channels that are illegal in some countries, we wait until we see beacons from the AP before trying to connect on those channels. This change is to retain parity with NI's shipped 3.2 kernel for purposes of compliance, so it should not be upstreamed. Signed-off-by: Tim Ousley <tim.ousley@ni.com> [reworked for 3.14 branch and for coding style ] Signed-off-by: James Minor <james.minor@ni.com>
Commit 57fbcce ("cfg80211: remove enum ieee80211_band") upstream removed the ieee80211_band enum in favour of using the nl80211_band enum directly. Convert the TI wl12xx driver's use of ieee80211_band to nl80211_band enum. Fixes: ce3a405b2e61 ("wl12xx: Disallow channels above 11 until beacons are seen") Signed-off-by: Gratian Crisan <gratian.crisan@ni.com>
68ddbbb to
d2be60b
Compare
|
v7: Resolved review feedback
Dropped. Added them to AB#3990492 for further evaluation.
Done
Dropped. Added to AB#3990488.
It appears that we didn't have it's config enabled in 6.18 and things still seem to work anyway. Dropped all these commits.
Fixed
Dropped both
Fixed |
By default, the interrupt output of the Marvell 88E1512 PHY is configured as an LED output, and is driven low. If we have a case where eth1 is brought up before eth0, this causes an interrupt storm, and Linux eventually gives up and disables the PHY interrupt line. Adding a probe function to the Marvell 88E1512 PHY driver and moving the interrupt output configuration there resolves this problem. [bm: Adjust for d2fa47d 'phy: marvell: Add ethtool statistics counters'] Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com> Signed-off-by: Mihaly Varga <mihaly.varga@ni.com> Acked-by: Brad Mouring <brad.mouring@ni.com> Acked-by: Ben Shelton <ben.shelton@ni.com> Acked-by: Jaeden Amero <jaeden.amero@ni.com> Natinst-ReviewBoard-ID: 81627 [bm: Restore correct page on LED/irq config] Signed-off-by: Brad Mouring <brad.mouring@ni.com> Acked-by: Jeff Westfahl <jeff.westfahl@ni.com> Natinst-ReviewBoard-ID: 148255 [gratian: split LED pin setup from m88e151x_probe; fixes conflict with 0b04680 ("phy: marvell: Add support for temperature sensor")] Signed-off-by: Gratian Crisan <gratian.crisan@ni.com> [cvadrevu: Fixed trivial conflict with b697d9d ("net: phy: marvell: add SFP support for 88E1510")] [cvadrevu: Updated marvell_get_page to marvell_read_page due to 424ca4c ("net: phy: marvell: fix paged access races")] Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
NI roboRIO 2.0 has relocated the clock pin from 1.8V bank to 3.3V bank. Hence, it required to update both product and supported version to indicate the changes in HW. Signed-off-by: Kim Khiam Lim <kim.khiam.lim@ni.com>
Import the NI Zynq board device trees from the 4.14 kernel and add them to the Xilinx DTB build list. Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
These have been superceded by ni-<devicecode>.dts. Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
The NI device trees were copied from the 4.14 kernel and still reopen SoC nodes using their old names and hierarchy. The current Zynq device tree defines these nodes with labels and uses gpio0 for the GPIO controller. Convert the NI board files to extend the existing amba, I2C, SPI, and ADC nodes through label references. Update GPIO references from gpio to gpio0 and move the myRIO I2C and SPI configuration to the corresponding labeled nodes. This allows the NI Zynq device trees to compile against the current zynq-7000.dtsi. Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
Set the address and size cells on the NAND controller so the nand@0 reg property is parsed correctly. Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
The CoreSight blocks are not accessible on NI Zynq targets. Reading their AMBA identification registers hangs the SoC before any driver binds. Disable the nodes to allow the system to boot. Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
phy_start_interrupts, phy_stop_interrupts have been removed in newer kernel. Replace them with phy_request_interrupt, phy_free_interrupt. Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
Drop the unused device ID argument from probe and change remove to return void, matching the current I2C driver callback signatures. Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
UPF_IOREMAP defers mapping the register resource until the serial port is started. The NI 16550 driver accesses registers during probe to determine FIFO sizes and configure the PMR, before the port has been started. Map the MMIO resource with devm_ioremap() during probe and assign the result to port->membase so these early register accesses use a valid mapping. Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
Port remaining defconfig changes from 4.14 kernel. Refresh it against Linux 6.18 while retaining the features required by NI Zynq targets. Enable PREEMPT_RT, RCU callback offloading, NI platform drivers, and the networking, USB, storage, filesystem options, etc. Regenerate the defconfig to account for current symbols and dependencies. Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
Port this change from commit [1] for nati_x86_64_defconfig. NILRT is currently booted with `rcu_nocbs=all` kernel parameter set. Enable CONFIG_RCU_NOCB_CPU_DEFAULT_ALL which will allow us to remove the boot option in the future. Note that it is still possible to override this option using rcu_nocbs or nohz_full boot parameters. [1]: 4d93b1f ("nati_x86_64_defconfig: enable CONFIG_RCU_NOCB_CPU_DEFAULT_ALL") Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
Ported from 4.14 and updated to work on 6.18 kernel. Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
In addition to the issue in 'net/phy: micrel: Add workaround for bad autoneg', sometimes the micrel KSZ9031 can fail to negotiate at all. When this happens, the phy will show link partner advertisements but will not show the link coming up. To fix this, reset the PHY if it has been down with link partner advertisements for more than 20 seconds. Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com> Signed-off-by: Brad Mouring <brad.mouring@ni.com> Acked-by: Josh Cartwright <josh.cartwright@ni.com> Acked-by: Tony Liechty <tony.liechty@ni.com> Natinst-ReviewBoard-ID: 118397 net/phy: micrel: Fix workaround for autoneg failure The KSZ9031 phy can fail silently during auto-negotiation. The existing workaround relied on the read_status function being called periodically, which only happened when the phy state machine polled. Now that the phy state machine relies only on interrupts the workaround is broken. Turning on KSZPHY_INTCS_LINK_PARTNER_ACK will cause read_status to be called during auto-negotiation. When read_status detects that auto-negotiation is on going a work queue is started to poll read_status until the link comes up or the timeout lapses. If the timeout lapses the phy is reset by calling init_hw and then config_intr. Fixes: 223f452 ("net/phy: micrel: Add workaround for autoneg failure") Signed-off-by: Zach Brown <zach.brown@ni.com> Signed-off-by: Brad Mouring <brad.mouring@ni.com> Acked-by: Kyle Roeschley <kyle.roeschley@ni.com> Acked-by: Nathan Sullivan <nathan.sullivan@ni.com> Natinst-ReviewBoard-ID: 197765 Natinst-CAR-ID: 632383 (bmouring: fix small conflict) [gratian: re-work for e6a423a ("net: phy: micrel: add device-type abstraction") to use the new common 'struct kszphy_priv'] Signed-off-by: Gratian Crisan <gratian.crisan@ni.com> [cvadrevu: Fixed trivial conflicts due to ece1950 ("net: phy: micrel: 1588 support for LAN8814 phy"), 58389c0 ("net: phy: micrel: ksz9031/ksz9131: add cabletest support")] [cvadrevu: Adapt to current phylib by using linkmode_empty() for lp_advertising and replacing the removed PHY_STATE_TIME with an explicit one-second polling interval.] Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
Do not re-initialize maybe active work in the function the work handler will call. fixes: 8f9d74e ("net/phy: micrel: Fix workaround for autoneg failure") Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com>
Added support for an EMIO GPIO for telling the GMII-RGMII conversion
logic in the PL what the link speed is. This is necessary for 1Gb
Ethernet to work on many NI targets.
These changes also magically fix the secondary Ethernet speed LED.
Signed-off-by: Jeff Westfahl <jeff.westfahl@ni.com>
Signed-off-by: Jaeden Amero <jaeden.amero@ni.com>
Acked-by: Ben Shelton <ben.shelton@ni.com>
Acked-by: Gratian Crisan <gratian.crisan@ni.com>
Natinst-ReviewBoard-ID: 84563
(joshc: updated to use gpiod_* APIs)
(bm: update to gpiod_* APIs)
Signed-off-by: Josh Cartwright <joshc@ni.com>
[cvadrevu: Port link-speed GPIO handling to phylink callbacks, add the
GPIO consumer include, and fix probe error-path cleanup]
Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
Install the ARM cross-compiler and U-Boot tools, build and validate Zynq, Bluefin, and SLSC defconfigs. Use separate output directories for all platform builds to avoid artifact conflicts. Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
Prevent git commit IDs from being appended to kernel release string. This is needed for some NI drivers to build. Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
d2be60b to
aa40568
Compare
|
v8: Dropped mmc patches. i.e., following Build, installed BSI on NI-7935R and verified sdcard still works. |
Rebase ARM commits from 4.14 kernel.
Majority of commits had merge conflicts or needed updates to be able to build on 6.18 kernel. I've recorded details in commit messages itself.
There are some commits I haven't cherry-picked either due to merge conflicts that required more detailed analysis or due to them failing build.
WI: AB#3966407, AB#3990497, AB#3990492, AB#4000899, AB#4000886
Testing
ni-pkgtargetIssues