Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase NI commits to nilrt/master/6.12 #211

Merged
merged 83 commits into from
Mar 13, 2025

Conversation

chaitu236
Copy link
Contributor

@chaitu236 chaitu236 commented Mar 10, 2025

nirlt/master/6.12 is created from rt/linux-rt-devel branch linux-6.12.y-rt, tag v6.12.16-rt9.

This PR applies NI specific commits that were floated to the top of nilrt/master/6.6 to the nilt/master/6.12 branch.

WI: AB#2951013

Squashed defconfig changes and regenerated

nati_x86_64_defconfig - dca8306
nati_zynq_defconfig - 7c914ae
nati_bluefin_defconfig - 160f55c

Note: bluefin team had cherry-picked 295c911 in 6.6 to include CONFIG_NET_DSA_MV88E6XXX_ONLY_8021AS in nati_bluefin_defconfig but did not cherry-pick the commit(s) adding it to Kconfig. So regenerating nati_bluefin_defconfig drops CONFIG_NET_DSA_MV88E6XXX_ONLY_8021AS . I added it back so as to not confuse bluefin team in case they were tracking which commits they had already cherry-picked and which they intend to cherry-pick at a later point.

Following commits were dropped either due to reverts or due to them being obsolete

c31dc41 - Revert "serial: 8250: add driver for NI UARTs"
40ee402 - serial: 8250: add driver for NI UARTs

58853df - Revert "serial: 8250: properly set mctrl for prescaler"
84fa133 - serial: 8250: properly set mctrl for prescaler

7ef9fcb - Revert "HACK sd: Prevent SD from doing high-speed timing"
97ebd2d - HACK sd: Prevent SD from doing high-speed timing

b43a0a5 - Revert "usb: dwc3: gadget: Add 1ms delay after end transfer command without IOC" (Auto dropped by git)
c7304f9 - Revert "usb: dwc3: gadget: Add 1ms delay after end transfer command without IOC" (Need to check if c3d3501 needs fixup. Will create WI for this)

fdb498c - usb: dwc3: pci: skip BYT GPIO lookup table for hardwired phy (upstream determined this isn't required)

ffc2839 - nirtfeatures: BIOS writes HARD_BOOT_N, so driver doesn't need to (this is a revert of 9cbd2f2 below)
9cbd2f2 - nirtfeatures: set HARD_BOOT_N if necessary when the driver loads

Following commits had conflicts (either during 6.6 rebase or when cherry-picking to 6.12) that had to be manually resolved

21786f2 - usb: dwc3: call _DSM for core soft reset. Check new commit 426f4a9 for details
e66a08c - 8250: Do not create ttyS* nodes for nonexistant devices. Check new commit 05521a6 for details
2c7cba1 - mmc: sdhci: Handle tuning error interrupts. Check new commit 4380847 for details.
497d23a - nirtfeatures: restructure init function to close holes. Check new commit b7e170f for details.
63a6857 - nirtfeatures: Added NI RT features driver. Check new commit acc8c99 for details.
b245165 - i2c-i801.c: Skip SPD initialization on cRIO-903x. Check new commit 1998d96 for details.
085389c - time: Make the clocksource watchdog user configurable. Check new commit 483b642 for details.
9c5b358 - shared: Adding mcopy syscall for x64. Check new commit cd82ceb for details.

Following commit had special treatment

b83fe9c - serial: 8250: add driver for NI UARTs. This commit is not a direct cherry-pick of 76c9aec from 6.6 (that results in conflicts) but a squashed cherry-pick of 13dec72 (that we intend to submit to tty/tty-next and 907bf3a. This is because 76c9aec itself was a cherry-pick from 13dec72 and doing it this way results in no merge conflicts. This wasn't noted in commit description.

Testing

  • Boot tested on cRIO-9033
  • Re-versioned NI drivers on cRIO-9033. Successfully reversioned nikal nibds nipalk atomicchinchk bb_libk decom nicanopencRio nidnetcRio niserial987xDriver nixntcRio. Failed to reversion niecati210k niecati225k ni-u3v due to these drivers using obsolete/changed APIs. Will create WIs to the driver teams.
  • MAX works
  • LabVIEW works
  • Boot tested cRIO-904x
  • Boot tested PXIe-xxxx
  • Check dmesg diffs. No concerning diffs compared to 6.6 without NI drivers. With NI drivers installed, seeing a driver related warning. Will file issue to driver team.

Note

Some testing still remaining. Will update the list when done - All done

Ben Shelton and others added 30 commits March 6, 2025 18:31
Signed-off-by: Ben Shelton <[email protected]>
Acked-by: Scot Salmon <[email protected]>
Acked-by: Terry Wilcox <[email protected]>
Natinst-ReviewBoard-ID: 69848
[gratian: convert to new syscall table format for arm]
Signed-off-by: Gratian Crisan <[email protected]>
[bstreiff: update the number for this painful out-of-tree syscall]
Signed-off-by: Brandon Streiff <[email protected]>
[gratian: update due to new syscall introduced by ecb8ac8
 ("mm/madvise: introduce process_madvise() syscall: an external memory hinting AP")]
Signed-off-by: Gratian Crisan <[email protected]>
[gratian: update syscall numbers to account for upstream additions; dropped arm bits]
Signed-off-by: Gratian Crisan <[email protected]>
[gratian: bump syscall number to account for upstream process_mrelease addition]
Signed-off-by: Gratian Crisan <[email protected]>
[gratian: bump syscall number to account for upstream 'futex_waitv' and 'set_mempolicy_home_node' additions]
Signed-off-by: Gratian Crisan <[email protected]>
[mpeterse: bump syscall number to account for upstream 'cachestat', 'fchmodat2', and 'map_shadow_stack' additions]
[mpeterse: remove comments in syscalls.h referring to the function's source file]
Signed-off-by: Mike Petersen <[email protected]>
[cvadrevu: bump syscall number to account for upstream additions]
Signed-off-by: Chaitanya Vadrevu <[email protected]>
… warm reboot

Another group is requesting that we provide an API to allow them to signal that the
next reboot should be "cold". They need this to guarantee that the FPGA will not be
running and cause the system to reboot at a bad time. This change creates a RW file at
/sys/kernel/ni_requested_reboot_type. The default value is 0.

- If when we reboot the value is 0 then we do the normal reset behavior.
- If the value is 1 we attempt to do a PCI reboot (using the CF9 register) and fall
back to the normal reboot method if that fails.
- If the value is 2 we attempt to do an ACPI reboot and fall back to the normal reboot
method if that fails.

We selected a reboot using the CF9 register over attempting to do an EFI reboot because
we don't have much time to test this feature and we've found EFI features to be fairly
buggy. For next release the plan is to do an EFI cold reboot, but put it in early enough
to properly test it.

Rebooting using the CF9 register should work on all x64 hardware that we will support for
2014 (smasher and hammerhead).

Signed-off-by: Terry Wilcox <[email protected]>
Acked-by: Brad Mouring <[email protected]>
Natinst-ReviewBoard-ID: 68018
Currently, we provide NI cold boot support on x64 targets.  However, at
some future point, we may wish to provide this support on other targets
as well.  Adding a config option to specify that a target supports NI
cold boot functionality; this fixes the build for Zynq targets and
doesn't paint us into a corner later.

Signed-off-by: Ben Shelton <[email protected]>
[gratian: fix trivial conflict with ceea991 ("bpf: Move bpf_dispatcher function out of ftrace locations")]
Signed-off-by: Gratian Crisan <[email protected]>
Implement polling on procfs' "interrupts" file which observes changes
to IRQ action handlers. The poll fires each time an action handler is
registered or unregistered.

This change enables daemons to watch for changes and apply certain
system policies relating to IRQ processing. For example, modify
execution priority of dedicated IRQ tasks after they're created.

include/linux/interrupt.h
kernel/irq/manage.c
 Add change counter for handler registrations and a wait queue to notify
 tasks on updates.

fs/proc/interrupts.c
 Add polling callback on aforementioned counter and wait queue.

Signed-off-by: Haris Okanovic <[email protected]>
Signed-off-by: Ovidiu-Adrian Vancea <[email protected]>
Signed-off-by: Brad Mouring <[email protected]>
Natinst-ReviewBoard-ID: 111860, 163902
[gratian: fixed small rebase conflict]
Signed-off-by: Gratian Crisan <[email protected]>
[bstreiff: un-trivialize from changes in fddda2b ("proc: introduce
 proc_create_seq{,_data}") and convert file_operations to proc_ops]
Signed-off-by: Brandon Streiff <[email protected]>
Signed-off-by: Richard Tollerton <[email protected]>
[gratian: fix conflict with fa32e85 ("tracing: Add new trace_marker_raw"); rename NI specific implementation until we can replace it]
Signed-off-by: Gratian Crisan <[email protected]>
[bstreiff: fixups due to struct member renames in 1329249 ("tracing: Make struct ring_buffer less ambiguous")]
Signed-off-by: Brandon Streiff <[email protected]>
[gratian: update for 22c36b1 ("tracing: make tracing_init_dentry() returns an integer instead of a d_entry pointer")]
Signed-off-by: Gratian Crisan <[email protected]>
[gratian: fixups due to tracing contex introduction in edbaaa1 ("tracing: Merge irqflags + preemt counter, add RT bits")]
Signed-off-by: Gratian Crisan <[email protected]>
[gratian: fixups due to tracing_gen_ctx_flags() API change in 8cac5db ("tracing: Merge irqflags + preemt counter, add RT bits")]
Signed-off-by: Gratian Crisan <[email protected]>
[gratian: use always_inlined __trace_buffer_lock_reserve() introduced by 3e9a8aa ("tracing: Create a always_inlined __trace_buffer_lock_reserve()")]
Signed-off-by: Gratian Crisan <[email protected]>
The clocksource watchdog is used to detect instabilities in the current
clocksource. This is a beneficial feature on new/unknown hardware however it
can create problems by falsely triggering when the watchdog wraps. The
reason is that an interrupt storm and/or high priority (FIFO/RR) tasks can
preempt the timer softirq long enough for the watchdog to wrap if it has a
limited number of bits available by comparison with the main clocksource.

One observed example is on a Intel Baytrail platform where TSC is the main
clocksource, HPET is disabled due to a hardware bug and acpi_pm gets
selected as the watchdog clocksource.

Provide the option to disable the clocksource watchdog for hardware where
the clocksource stability has been validated.

Signed-off-by: Gratian Crisan <[email protected]>
[gratian: fix trivial conflict with fc153c1 ("clocksource: Add a Kconfig option for WATCHDOG_MAX_SKEW")]
Signed-off-by: Gratian Crisan <[email protected]>
[gratian: fix trivial conflict with 7cf8f44 ("x86: fs: kmsan: disable CONFIG_DCACHE_WORD_ACCESS")]
Signed-off-by: Gratian Crisan <[email protected]>
[cvadrevu: fix trivial conflict with e26cbab ("timekeeping: Always check for negative motion")]
Signed-off-by: Chaitanya Vadrevu <[email protected]>
This reverts commit e1d7ba8.

NI has a use case that involves distributed networked Linux devices
that need to share the same concept of time using a mechanism like
IEEE-1588 or 802.1AS.  The “master” device (ie. the device with the
time all other devices will be synchronized to) is often a device
that boots up set to the Posix Epoch, mainly because it lacks a
battery-backed RTC. (note: the existence of an RTC does not prevent
a device from booting up at or very near the Posix Epoch, it just
greatly reduces the likelihood).

If a slave device attempted to synchronize its CLOCK_REALTIME to
that of the master – and the master’s time was < Epoch+slave uptime,
that slave would not be able to synchronize.

This use case is believed to be very common among embedded devices,
especially those without RTCs.

Long term:
We (NI Timing & Sync) are planning on engaging with the upstream
community to educate them on our use case and hopefully put a
different solution in place which solves the original problem
(preventing a negative boot time representation) while also allowing
our use case to continue working as it did prior to the change we’re
reverting. Once that happens, we can drop this revert.

Signed-off-by: Brad Mouring <[email protected]>
Reported-by: Vineeth Acharya <[email protected]>
Tested-by: Rick Ratzel <[email protected]>
Natinst-CAR-ID: 629499
[bstreiff: reduced control flow in do_settimeofday64 due to unassigned 'ret']
Signed-off-by: Brandon Streiff <[email protected]>
[gratian: fix conflict with b8ac29b ("timekeeping: contribute wall clock to rng on time change")]
Signed-off-by: Gratian Crisan <[email protected]>
The cRIO-903x architecture is sort of special, we do not connect
a dimm to the SPD because we use flash instead, but the SPD is still
present because the processor expects it.  However, enumerating and
registering the SPD i2c bus is causing interrupt storms, so for now
we skip the registration on all 903x devices.

Fixes: 01590f3 ("i2c: i801: Instantiate SPD EEPROMs automatically")
Signed-off-by: Bill Pittman <[email protected]>
Natinst-AZDO-ID: 1573148
(cherry picked from commit 4de019e)
[cvadrevu: fix trivial conflict with d08cac0 ("i2c: i801: reword according to newest specification")]
[cvadrevu: fix minor conflict with 80e56b8 ("i2c: i801: Simplify class-based client device instantiation")]
Signed-off-by: Chaitanya Vadrevu <[email protected]>
Added an NI RT features driver. This is an ACPI device that exposes LEDs,
switches, and other hardware features of the Smasher controllers.

Not all of the proposed features of the device work as expected, and some
features may be removed in the future. Development work on this device by
the hardware team is currently not a high priority. These issues will be
addressed once the hardware team gets back to this device.

Signed-off-by: Jeff Westfahl <[email protected]>
[gratian: fix conflict with 7a6ff4c ("misc: hisi_hikey_usb: Driver to support onboard USB gpio hub on Hikey960")]
Signed-off-by: Gratian Crisan <[email protected]>
[gratian: fix conflict with bb3b655 ("staging: hikey9xx: split hi6421v600 irq into a separate driver")]
Signed-off-by: Gratian Crisan <[email protected]>
[gratian: fix conflict with f396ede ("misc: open-dice: Add driver to expose DICE data to userspace")]
Signed-off-by: Gratian Crisan <[email protected]>
[gratian: fix trivial conflict with 6c93c6f ("misc: Add a mechanism to detect stalls on guest vCPUs")]
Signed-off-by: Gratian Crisan <[email protected]>
[gratian: fix trivial conflict with 393fc2f ("misc: microchip: pci1xxxx: load auxiliary bus driver for the PIO function in the multi-function endpoint of pci1xxxx device.")]
Signed-off-by: Gratian Crisan <[email protected]>
[mpeterse: fix trivial conflicts with new config flags]
[mpeterse: change return type of nirtfeatures_acpi_remove due to 6c0eb5b]
Signed-off-by: Mike Petersen <[email protected]>
[cvadrevu: fix trivial conflict with b987375 ("misc: Add Nitro Secure Module driver")]
[cvadrevu: fix trivial conflict with 5f67eef ("misc: mrvl-cn10k-dpi: add Octeon CN10K DPI administrative driver")]
Signed-off-by: Chaitanya Vadrevu <[email protected]>
On our Zynq targets, we expose the power-on reset status of the controller
via a soft_reset sysfs file. The same underlying bit in the CPLD is exposed
as hard_boot on our Smasher targets. In this commit we change the Smasher
implementation to match Zynq.

Signed-off-by: Jeff Westfahl <[email protected]>
Changed the strings returned by the reset_source sysfs file to match those
returned on Zynq. Changed the algorithm used to determine the reset source
to match Zynq.

Signed-off-by: Jeff Westfahl <[email protected]>
(Note that the Smasher CPLD currently returns incorrect values for the
reset source in some cases. See CARs 458093 and 458094.)
In nirtfeatures_acpi_add, we create several sysfs files. As currently
implemented, there is a window where access to a sysfs file may cause
our spinlock to be used before it's been initialized, or may cause us
to write an incorrect value to an I/O port. We can close this window
by moving the creation of the sysfs files closer to the end of the
function.

Signed-off-by: Jeff Westfahl <[email protected]>
[cvadrevu: fixed trivial conflict due to dropping 9cbd2f2
("nirtfeatures: set HARD_BOOT_N if necessary when the driver loads")]
Signed-off-by: Chaitanya Vadrevu <[email protected]>
The Smasher CPLD has recently exposed some new registers. In this commit
we display the values of these registers in the output of the register_dump
sysfs file.

Signed-off-by: Jeff Westfahl <[email protected]>
When we built Hammerhead, we used ID 4 instead of 1. We don't want
to rework all of the boards to match the documentation, so we're just
changing the documentation and driver to match what we built.

Signed-off-by: Jeff Westfahl <[email protected]>
The existing recovery_mode and no_fpga bits are now read only. A new bit,
no_fpga_sw, exists for software to tell the CPLD to assert NO_FPGA at the
next reset.

Signed-off-by: Jeff Westfahl <[email protected]>
The driver currently returns an error from init if it doesn't recognize
the backplane ID. This causes the kernel to hang on boot. Although this
is probably a bug somewhere else in the kernel, there's no real benefit
to returning an error in this case. It's sufficient to print an error
message to the console and return "Unknown" as the backplane ID.

Signed-off-by: Jeff Westfahl <[email protected]>
Remove the unused NI_HW_REBOOT config option. We're not going to use this.

Signed-off-by: Jeff Westfahl <[email protected]>
Updated registers to match the latest CPLD documentation, removed several
sysfs files that were only used for development debugging, and removed
several now unused constants.

Signed-off-by: Jeff Westfahl <[email protected]>
These changes add support for PIEs (physical interface elements), which
are defined as physical elements fixed to a controller/chassis with
which a user can interact (e.g. LEDs and switches) and whose meaning
is user-defined and implementation-specific.

The support for these elements, in terms of enumerating and interacting
with them (i.e. retrieving the list of elements, getting/setting their
current state, enabling notifications, etc.) is embedded within the
BIOS as a set of ACPI methods. The changes to the CPLD driver act as a
bridge between these methods and existing Linux kernel facilities as
described below to expose the elements and any applicable metadata to
user mode. The metadata or knowledge needed for the interpretation
thereof is not a prerequisite to interacting with the elements--it is
there for upper-level value add software to use to improve the user
experience. In other words, Linux users familiar with the class drivers
by which the elements are surfaced should not have any issues
interfacing with them without knowing the meaning of the attached
metadata.

Output elements, which consist currently of LEDs, are surfaced via the
LED class driver. Each LED and color becomes its own LED class device
with the naming convention 'nilrt:{name}:{color}'. Any additional
attributes/metadata intended for upper-level software are appended to
the name, each separated by colons, as suggested by the LED class driver
documentation in the Linux kernel proper, except where there is already
a standard way to communicate a specific piece of metadata (e.g.,
maximum brightness, which is exposed via the /sys/class/leds/.../
max_brightness attribute node).

Input elements as surfaced via the input class driver. As with output
elements, each input element registers its own separate driver whose
name and associated metadata are transmitted via the name attribute
attached to the input device, retrievable via the EVIOCGNAME ioctl,
using the same convention as described above for output elements. The
input class driver model is that events are pushed (i.e. reported) to
indicate state changes, so to facilitate this, the CPLD driver has an
ACPI notify callback that is invoked when an input element changes state
and its BIOS support generates a general purpose event per the ACPI
GPE model. The notify callback checks the instantaneous state of the
input element and reports a keyboard event on its particular device with
a scan code of 256 (BTN_0), where a key down event means that the input
element is in the '1' state (down, engaged, on, pressed, etc.) and a key
up event means that the input element is in the '0' state (off,
disengaged, released, etc.). User mode software can then monitor for
these specific events to determine when the state of the element has
changed, or can use the EVIOCGKEY ioctl on the appropriate input device
to retrieve the instantaneous state of the element.

Signed-off-by: Aaron Rossetto <[email protected]>
(joshc: fixed up strnicmp -> strncasecmp for 4.0)
Signed-off-by: Josh Cartwright <[email protected]>
[mpeterse: change return type of nirtfeatures_acpi_remove due to 6c0eb5b]
Signed-off-by: Mike Petersen <[email protected]>
For compatibility with myRIO, don't change the name of the wireless
PIE LEDs.

Signed-off-by: Nathan Sullivan <[email protected]>
Reviewed-by: Jaeden Amero <[email protected]>
Reviewed-by: Josh Cartwright <[email protected]>
Natinst-ReviewBoard-ID: 107067
Natinst-CAR-ID: 540272
The MMC driver will enable/disable external regulators as part of
enabling/disabling the SD Host Controller. The WLAN_PWD_L line
(controlled from the CPLD) must be enabled/disabled at the same
time that the controller is enabled/disabled. Allow the MMC
driver to just control that pin directly via the regulator
framework.

Signed-off-by: James Minor <[email protected]>
Add the new Fire Eagle backplane ID so we stop complaining on boot.

Signed-off-by: Kyle Roeschley <[email protected]>
Signed-off-by: Brad Mouring <[email protected]>
Acked-by: Xander Huff <[email protected]>
Natinst-ReviewBoard-ID: 152156
Fix checkpatch warnings:
  Block comments use * on subsequent lines
  Block comments use a trailing */ on a separate line
  Comparisons should place the constant on the right side of the test
  break is not useful after a goto or return

Signed-off-by: Xander Huff <[email protected]>
Natinst-ReviewBoard-ID: 157395
This commit assumes that BIOS will implement a change to add a new field to
PIEC capability structure. Also bumping the capabilities version by 1.
Adding IRQ mechanism for user Push button instead of GPIO

This change registers and requests an IRQ for User push button.Adds
a new handler pushbutton_interrupt_handler() to handle the interrupt
when the button is pressed or released. Adds a new field to struct
nirtfeatures_pie_descriptor called notification_method. If this field is 1,
it indicates interrupt mechanism. We check this field only for caps
version=3 and pie_type=switch. Also bumps the MAX_PIE_CAPS_VERSION to 3.

The kernel and BIOS have to be updated at the same time in order for this
change to be successful. If kernel is updated first on a controller, user
button will simply not function but will have no other side effects. If
BIOS is updated first, then system will end in kernel panic and reboot
constantly.

Signed-off-by: Akash Mankar <[email protected]>
Signed-off-by: Brad Mouring <[email protected]>
Acked-by: Zach Hindes <[email protected]>
Acked-by: Aaron Rossetto <[email protected]>
Natinst-ReviewBoard-ID: 174593
On Fire Eagle, the Ironclad ASIC has an internal watchdog which will
reset the chip if the its firmware hangs. Unless we're in button-
directed safemode, this will also reset the whole system. Add this reset
reason to our strings so we can tell when this happens.

Signed-off-by: Kyle Roeschley <[email protected]>
Signed-off-by: Brad Mouring <[email protected]>
Acked-by: James Minor <[email protected]>
Acked-by: Zach Brown <[email protected]>
Acked-by: Akash Mankar <[email protected]>
Natinst-ReviewBoard-ID: 176049
Adding a new ACPI resource to device BIOS exposed the fact that our
error handling on a failed device probe is very broken. To fix this, use
managed allocation (devm_*) for all resources which support it.

Signed-off-by: Kyle Roeschley <[email protected]>
Signed-off-by: Brad Mouring <[email protected]>
Acked-by: James Minor <[email protected]>
Acked-by: Zach Brown <[email protected]>
Acked-by: Akash Mankar <[email protected]>
Natinst-ReviewBoard-ID: 176049
[mpeterse: change return type of nirtfeatures_acpi_remove due to 6c0eb5b]
Signed-off-by: Mike Petersen <[email protected]>
Add the new Swordfish backplane ID to stop errors on boot.

Signed-off-by: Kyle Roeschley <[email protected]>
Signed-off-by: Brad Mouring <[email protected]>
Acked-by: Zach Brown <[email protected]>
Acked-by: Nathan Sullivan <[email protected]>
Acked-by: Julia Cartwright <[email protected]>
Natinst-ReviewBoard-ID: 227200
Unlike all previous controllers, Swordfish targets do not have bi-color
power and status LEDs. Check our backplane ID and don't register the
second color if we're on a Swordfish.

Signed-off-by: Kyle Roeschley <[email protected]>
Signed-off-by: Brad Mouring <[email protected]>
Acked-by: Zach Brown <[email protected]>
Acked-by: Nathan Sullivan <[email protected]>
Acked-by: Julia Cartwright <[email protected]>
Natinst-ReviewBoard-ID: 227200
Natinst-CAR-ID: 691081
Prior to commit 7142f92 ("wireless: carl9170: fix LEDS build errors &
warnings") support for MAC80211_LEDS, NEW_LEDS and LEDS_CLASS config
options was automatically enabled by having CONFIG_CARL9170=m in
nati_x86_64_defconfig.

The aforementioned commit removed the automatic selection in favor of
CARL9170_LEDS config option declaring a dependency on MAC80211_LEDS.

This results in linker errors if the nirtfeatures driver is enabled via
CONFIG_NI_RT_FEATURES since this driver makes use of functionality provided
by the NEW_LEDS and LEDS_CLASS configuration options:

  LD      .tmp_vmlinux.kallsyms1
ld: drivers/misc/nirtfeatures.o: in function `nirtfeatures_parse_led_pie.isra.0':
nirtfeatures.c:(.text+0x103b): undefined reference to `devm_led_classdev_register_ext'
ld: drivers/misc/nirtfeatures.o: in function `nirtfeatures_acpi_add':
nirtfeatures.c:(.text+0x14ad): undefined reference to `devm_led_classdev_register_ext'
make: *** [Makefile:1179: vmlinux] Error 1

Automatically select support for NEW_LEDS and by extension LEDS_CLASS if
NI_RT_FEATURES is enabled.

Signed-off-by: Gratian Crisan <[email protected]>
wanahmadzainie and others added 24 commits March 7, 2025 18:34
The issue is, if core soft reset is issued while Intel Apollo Lake
USB mux is in Host role mode, it takes close to 7 minutes before we
are able to switch USB mux from Host mode to Device mode. This is
due to RTL bug.

The workaround is to let BIOS issue the core soft reset via _DSM
method. It will ensure that USB mux is in Device role mode before
issuing core soft reset, and will inform the driver whether the
reset is success within the timeout value, or the timeout is exceeded.

commit cd78b8067c6e ("usb: dwc3: call _DSM for core soft reset")
originated from http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-4.1/

Signed-off-by: Wan Ahmad Zainie <[email protected]>
[[email protected]: changed the way has_dsm_for_softreset property is
set in dwc3-pci.c and read in core.c]
Signed-off-by: Akash Mankar <[email protected]>
Signed-off-by: Brad Mouring <[email protected]>
Acked-by: Gratian Crisan <[email protected]>
Acked-by: Brandon Streiff <[email protected]>
Natinst-ReviewBoard-ID: 178124
[gratian: fixed merge conflicts, mainly due to dwc3_soft_reset removal]
Signed-off-by: Gratian Crisan <[email protected]>
[bstreiff: fixed merge conflicts due to property refactor by 1a7b12f
 ("usb: dwc3: pci: Supply device properties via driver data")]
[gratian: fix merge conflict with f580170
 ("usb: dwc3: Add splitdisable quirk for Hisilicon Kirin Soc")]
Signed-off-by: Gratian Crisan <[email protected]>
[gratian: fix conflict with 582ab24
 ("usb: dwc3: pci: Set "linux,phy_charger_detect" property on some Bay Trail boards")]
Signed-off-by: Gratian Crisan <[email protected]>
[cvadrevu: fix trivial conflict with 0471616
 ("usb: dwc3: Add remote wakeup handling")]
[cvadrevu: fix trivial conflict with 4e8ef34
 ("usb: dwc3: fix gadget mode suspend interrupt handler issue")]
[cvadrevu: fix conflict with 8bea147
 ("usb: dwc3: Soft reset phy on probe for host")]
[cvadrevu: fix conflict with 917dc99
 ("usb: dwc3: pci: Change PCI device macros")]
Signed-off-by: Chaitanya Vadrevu <[email protected]>
[cvadrevu: fix conflict with 4fad737
 ("usb: dwc3: core: Fix system suspend on TI AM62 platforms")]
[cvadrevu: fix conflict with e8d48c2
 ("Revert "usb: dwc3: Soft reset phy on probe for host"")]
Signed-off-by: Chaitanya Vadrevu <[email protected]>
Commit d86ff33 ("efivarfs: expose used and total size") introduced the
ability to query the efivars file system size with utilities like 'df'.

Unfortunately this introduces large latency spikes in real-time tasks on
PREEMPT_RT configured kernels. Skip the EFI run-time services query for
EFI_RT_SUPPORTED_QUERY_VARIABLE_INFO if on PREEMPT_RT. The 'df'
functionality is lost but the rest of the efivars run-time services
continue to work.

Upstream status: Inappropriate (configuration)

  - upstream sets EFI_DISABLE_RUNTIME to 'default y if PREEMPT_RT' thus
    avoiding the problem entirely.

  - NILRT sets EFI_DISABLE_RUNTIME to 'n' and uses EFI run-time services to
    access EFI vars at run-time.[1][2]

[1] https://review-board.natinst.com/r/271066
[2] https://review-board.natinst.com/r/303906

Signed-off-by: Gratian Crisan <[email protected]>
This reverts commit d9ae0aa.

It provides similar functionality to our out-of-tree commit 13dc7b7
("mmc: sdhci: Handle tuning error interrupts"). However it doesn't cover
the cases where the "Tuning Error" interrupt is received during sdhci
operations that don't have a data transfer associated with them. On our
systems this results in a kernel splat:

  mmc0: Got data interrupt 0x04000000 even though no data operation was in progress.
  mmc0: sdhci: ============ SDHCI REGISTER DUMP ===========
  mmc0: sdhci: Sys addr:  0x12a65200 | Version:  0x0000b502
  mmc0: sdhci: Blk size:  0x00007040 | Blk cnt:  0x00000001
  mmc0: sdhci: Argument:  0x00010000 | Trn mode: 0x00000010
  mmc0: sdhci: Present:   0x01ff0000 | Host ctl: 0x00000016
  mmc0: sdhci: Power:     0x0000000f | Blk gap:  0x00000000
  mmc0: sdhci: Wake-up:   0x00000000 | Clock:    0x00000107
  mmc0: sdhci: Timeout:   0x0000000a | Int stat: 0x00000000
  mmc0: sdhci: Int enab:  0x03ff008b | Sig enab: 0x03ff008b
  mmc0: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000
  mmc0: sdhci: Caps:      0x076864b2 | Caps_1:   0x00000004
  mmc0: sdhci: Cmd:       0x00000d1a | Max curr: 0x00000000
  mmc0: sdhci: Resp[0]:   0x00400900 | Resp[1]:  0x00000000
  mmc0: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000000
  mmc0: sdhci: Host ctl2: 0x0000000c
  mmc0: sdhci: ADMA Err:  0x00000003 | ADMA Ptr: 0x12a65200
  mmc0: sdhci: ============================================
  I/O error, dev mmcblk0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
  Buffer I/O error on dev mmcblk0, logical block 0, async page read

Revert the upstream commit in favor of our out-of-tree commit until a
proper upstream fix is found. See link to ongoing upstream conversation.

Natinst-AzDo-ID: 2805437

Link: https://lore.kernel.org/linux-mmc/[email protected]

[erick: fix conflict when reverting d9ae0aa ("mmc: sdhci.h: Add support for "Tuning Error" interrupts") in favor of our 2c7cba1 ("mmc: sdhci: Handle tuning error interrupts")]

Signed-off-by: Erick Shepherd <[email protected]>
[cvadrevu: squash all defconfig commits accumulated up to 6.6.77-rt50 and regenerate for 6.12.16-rt9]
Signed-off-by: Chaitanya Vadrevu <[email protected]>
[cvadrevu: squash all defconfig commits accumulated up to 6.6.77-rt50 and regenerate for 6.12.16-rt9]
Signed-off-by: Chaitanya Vadrevu <[email protected]>
…overlays

Create a common device tree include file for NI Zynq based products.
Create initial overlays for Zynq based target variants.

Signed-off-by: Gratian Crisan <[email protected]>
Signed-off-by: Josh Cartwright <[email protected]>
(cherry picked from commit c01c07f)
Signed-off-by: deooi <[email protected]>
The chipidea USB controller driver requires a phy in the tree,
so add one for all NI Zynq devices.  Remove USB items from the
ni-zynq tree include since they are now in zynq-7000.dtsi.

Signed-off-by: Nathan Sullivan <[email protected]>
Acked-by: Josh Cartwright <[email protected]>
Acked-by: Jaeden Amero <[email protected]>
Natinst-ReviewBoard-ID: 108233
(cherry picked from commit 24943ed)
Signed-off-by: deooi <[email protected]>
Signed-off-by: Nathan Sullivan <[email protected]>
Acked-by: Josh Cartwright <[email protected]>
Acked-by: Jaeden Amero <[email protected]>
Natinst-ReviewBoard-ID: 108233
(cherry picked from commit fe67634)
Signed-off-by: deooi <[email protected]>
Since NI controllers care more about determinism than power savings,
disable PM options that hinder the former at the expense of the
latter.

Signed-off-by: Brad Mouring <[email protected]>
Acked-by: Josh Cartwright <[email protected]>
Natinst-ReviewBoard-ID: 127729
Natinst-CAR-ID: 568817
(cherry picked from commit 8400eae)
Signed-off-by: deooi <[email protected]>
Device tree for Bluefin devices as of Rev A.

Signed-off-by: Brandon Streiff <[email protected]>
Acked-by: Nathan Sullivan <[email protected]>
Natinst-ReviewBoard-ID: 158229
(cherry picked from commit c0feb6b)
Signed-off-by: deooi <[email protected]>
This keeps us for having to scan for it.

Signed-off-by: Brandon Streiff <[email protected]>
Natinst-ReviewBoard-ID: 168093
(cherry picked from commit 56f25b5)
Signed-off-by: deooi <[email protected]>
This change is needed to keep up with the latest file directory.

Signed-off-by: deooi <[email protected]>
Add a new config parameter CONFIG_MTD_RESERVE_END. This is used with
command line partition parsing to reserve space at the end of a partition
defined with a size of '-', which indicates it should use all remaining
space.

Signed-off-by: Jeff Westfahl <[email protected]>
(cherry picked from commit 68ca952)
Signed-off-by: Hatsy Rei <[email protected]>
The Zynq static memory controller is based on ARM PL353. The following commit
[3fa059c nand: pl353: Renamed zynq_nand driver as pl353_nand]
renamed the driver to "pl353-nand" to match the hardware. This creates problems
on shipping hardware due to a mismatch between what u-boot expects
(via bootargs/mtdparts) and the kernel driver name. This commit reverts the
NAND driver name to the old "xilinx_nand" in order to preserve compatibility.

Signed-off-by: Gratian Crisan <[email protected]>
Acked-by: Joseph Hershberger <[email protected]>
Acked-by: Terry Wilcox <[email protected]>
Natinst-ReviewBoard-ID: 79256
(cherry picked from commit df46525)
Signed-off-by: Hatsy Rei <[email protected]>
Drop device tree bindings which are already declared in zynq-7000.dtsi.
This includes CPU, CAN, FPGA, PL353 SMC, NAND, GPIO, I2C and SPI
bindings.

'fpgaperipheral' node, now 'devcfg' in zynq-7000.dtsi describes the
Xilinx Zynq FPGA Manager.

Signed-off-by: Hatsy Rei <[email protected]>
Enable PL353 SMC and NAND device tree nodes declared in zynq-7000.dtsi.
Indicate via 'nand-on-flash-bbt' property that bad block table is stored
on the nand flash, and 'nand-ecc-mode' property that on-die ECC is used.

Signed-off-by: Hatsy Rei <[email protected]>
Avoid redeclaring these nodes and just extend them via phandles.

Signed-off-by: Hatsy Rei <[email protected]>
zynq-7000.dtsi contains updated AMBA and GPIO device tree node phandles.
Adopt these changes by referencing i2c0 phandle instead of amba node for
overriding i2c bindings, and refer to gpio0 phandle instead of gpio.

Signed-off-by: Hatsy Rei <[email protected]>
Update 'compatible' property to match what is expected by the latest
NI 16550 UART Driver.

Signed-off-by: HatsyRei <[email protected]>
Use platform_device_register_simple to create a parent device
if parent device pointer is null.

Signed-off-by: Kevin Lim <[email protected]>
Add GitHub actions to do PR sanity checks.

Signed-off-by: Chaitanya Vadrevu <[email protected]>
include linux/wait.h for wait_queue_head_t

Signed-off-by: Chaitanya Vadrevu <[email protected]>
Existing devices may contain partitions formatted with subpages, but the
default PL35X NAND driver does not support them. This commit implements
subpage read and write support for on-die ECC devices using the PL35X
NAND driver.

Signed-off-by: HatsyRei <[email protected]>
The National Instruments (NI) 16550 is a 16550-like UART with larger
FIFOs and embedded RS-232/RS-485 transceiver control circuitry. This
patch adds a driver that can operate this UART, which is used for
onboard serial ports in several NI embedded controller designs.

Portions of this driver were originally written by Jaeden Amero and
Karthik Manamcheri, with extensive cleanups and refactors since by
Brenda Streiff.

Cc: Gratian Crisan <[email protected]>
Co-developed-by: Jason Smith <[email protected]>
Signed-off-by: Jason Smith <[email protected]>
Signed-off-by: Chaitanya Vadrevu <[email protected]>
@chaitu236 chaitu236 requested review from gratian and a team March 10, 2025 20:00
@gratian gratian merged commit b83fe9c into ni:nilrt/master/6.12 Mar 13, 2025
1 check failed
@chaitu236 chaitu236 deleted the dev/cvadrevu/6.12 branch March 31, 2025 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.