summaryrefslogtreecommitdiff
path: root/sys/src/9/imx8
AgeCommit message (Collapse)Author
2023-05-13imx8: move fpon()/fpoff() into l.scinap_lenrek
avoid the dynamic code generating syswr() in the hot path...
2023-04-24imx8: provide PCIWINDOW constant, use PCIWADDR() for MSI_TARGET_ADDRcinap_lenrek
2023-04-24imx8: add vpu clocks and irq indices, correct a typo (no functional change)Sigrid Solveig Haflínudóttir
2023-04-19imx8: make etheriwl work on MNT Reform, move it to port/ (thanks cinap); ↵Sigrid Solveig Haflínudóttir
tested with 6205
2023-04-08kernel: Clear secrets on rebootcinap_lenrek
The idea is that when we reboot, we zero out memory written by processes that have the private flag set (such as factotum and keyfs), and also clear the secrmem pool, which contains TLS keys and the state of the random number generator. This is so the newly booted kernel or firmware will not find these secret keys in memory.
2023-02-10reform: put default "console=0" in #eccinap_lenrek
The default configuration for "console=0" should go into CONFADDR when using /dev/reboot.
2023-02-06reform: move SAI iomux/clock initialization into probe()cinap_lenrek
2023-01-03devip: actually put igmp in ip sectioncinap_lenrek
2023-01-03devip: add igmp protocol support to all kernelscinap_lenrek
2022-12-29reform/usdhc: fix debug print, R1b response handled by controllercinap_lenrek
The debug print contidion was wrong and would always result in a debug print, even if the command just timed out. The R1b response seems to be handled internally by the controller, so we do not need to wait for datadone interrupt.
2022-12-27sdmmc: new interface for SDiocinap_lenrek
We want to support the internal emmc device on the reform, which has a different initialization sequence from SDcard. The problem is, all mmc controller drivers where using the command index to derive the command properties. The command index's interpretation depends on the command set. And MMC has different commands then SD. Also, there are the APP_CMD escaped commands which drivers then tried to recover the state... All of this is total nonsense... The controller drivers should not care and the command properties should be maintained by port/sdmmc.c. So we pass the command as a struct SDiocmd, which has all the properties (command index, response type, data transfer mode... and even a string for debugging). The controller just converts this into register values and just executes the commands. Next, the controller drivers shouldnt snoop on the commands and then try to apply bus and frequency switching on their own. This is now made explicit by having SDio.bus(io, width, speed) function.
2022-12-11sdmmc: multiple controller supportcinap_lenrek
remove the global sdio struct and add a addmmcio() function for drivers to register their controllers. there is a SDio.aux pointer now where controller drivers can stash a pointer to their private data. SDio.init() also can signal that it wants to be called again for more controllers by returning > 0 (see pc/pmmc.c). this is in preparation for supporting the internal mmc device in the mnt-reform which is hooked up to usdhc1.
2022-12-10imx8: cleanup framebuffer codecinap_lenrek
We can get rid of a bunch of stuff now that we'r using a softscreen. Get rid of the static Memimage and Memdata for the framebuffer; just allocate gscreen as a memimage from the image pool. Avoid exporting fbraw pointer, just have screeninit() return it. Remove fbmemalloc() function. it used to create a write-thru mapping but given that we are no more reading the framebuffer, we can use ucalloc() instead.
2022-12-05imx8: a simple softscreenSigrid Solveig Haflínudóttir
2022-12-03usbxhci: cleanupcinap_lenrek
2022-12-03usbxhci: split usbxhci in portable and pci / soc specific driverscinap_lenrek
For the reform kernel, we used to have a slightly modified copy of port/usbxhci.c as the controller was implemented in soc specific registers and requires some rocket science initialization. Instead, we want to have a common generic xhci driver (usbxhci) and separate drivers that deal with the specific implementation such as usbxhcipci and usbxhciimx.
2022-10-31reform: only override console=0 when no plan9.ini is passedcinap_lenrek
The kernel used to always set console=0, which as usefull during bring-up, but makes it impossible to use the uart for other purposes. We now have the ability to pass plan9.ini using the u-boot script, so add the console=0 line there. To make debugging easy, we still apply console=0 if no plan9.ini has been passed.
2022-09-25devpci: provide a #$ device for PCI config accesscinap_lenrek
We want to provide userspace PCI config space access on platforms that have PCI, but do not have ISA bus. For this, provide a stripped down version of devpnp, wiht only the pci support that can then be used by pi4 (bcm64) and reform (imx8) kernels.
2022-09-07imx8/pm: provide acpi(1)-compatible battery readingsSigrid Solveig Haflínudóttir
2022-09-05imx8/lcd: rework screen blankingSigrid Solveig Haflínudóttir
The previously reverted change has been reworked - things get shut down in the right order, with clocks gated. A lock is no longer needed either. The combined effect is ~25mA saved when screen is off, compared to no changes.
2022-09-04imx8/clock: 1.6Ghz - forgot to push the rest of the changeSigrid Solveig Haflínudóttir
2022-09-03imx8: go back to 1.6GhzSigrid Solveig Haflínudóttir
2022-09-02imx8/lcd: disable the bridge output on blankSigrid Solveig Haflínudóttir
Disabling LCDIF often produces flickering output at the top of the LCD panel (timings going wrong?). Instead, just disable the output on the bridge, which is much simpler, doesn't seem to cause any issues, and saves enough power just as well.
2022-09-01imx8/lcd: toggle lcdif on blankscreenSigrid Solveig Haflínudóttir
Stop DOTCLK on interrupt after the current frame is done, toggle PWM2.
2022-08-30revert a3dc4d80a899b28130729721b90a0506e44b8d76, didnt work, back to iprint()cinap_lenrek
2022-08-29imx8/sai: reduce watermark; use the fifo size reported by the platform; ↵Sigrid Solveig Haflínudóttir
remove useless stuff
2022-08-25imx8: invalidate l2 cache as well (fixes not fully cleared BSS on cold boot)Sigrid Solveig Haflínudóttir
2022-08-21imx8: 1.5Ghz turbocinap_lenrek
2022-08-21imx8: use print() instead of iprint() for cpuidprint(), so it gets logged in ↵cinap_lenrek
kmesg
2022-08-21imx8: disable turbo mode, set to 1.4GHz which is stable on first bootSigrid Solveig Haflínudóttir
2022-08-20imx8/sai, aux/wm8960: expose jack detect status in #A/audiostatSigrid Solveig Haflínudóttir
2022-08-20imx8/gpio: missed change in the previous commitSigrid Solveig Haflínudóttir
2022-08-20imx8/gpio: add interrupt handlers supportSigrid Solveig Haflínudóttir
2022-08-19imx8/sai: flush the ring on close to avoid garbage leftovers on restartsSigrid Solveig Haflínudóttir
2022-08-19imx8/sai: do not strangle the core with interrupts on underrunsSigrid Solveig Haflínudóttir
2022-08-18imx8/sai: double the delay; set clock explicitlySigrid Solveig Haflínudóttir
2022-08-18imx8/sai: increase watermark, run in slave mode, continue on fifo errorsSigrid Solveig Haflínudóttir
2022-08-17imx8: add a semi-working SAI2 audio driverSigrid Solveig Haflínudóttir
2022-08-17kernel: allocate notes in heapcinap_lenrek
de-bloat the proc structure by allocating notes with on the heap instead of embedding them in the proc structure. This saves around 640 bytes per process.
2022-08-17kernel: simplify notify() adding common popnote() functioncinap_lenrek
Handlin notes is common for all architectures except how the note has to be pushed on the user stack. This change adds a popnote() function that returns only the note string or nil if the process should not be notified (no notes or user notes hold off). Popnote() also handles common errors like notify during note handling or missing note handler and will suicide the process in that case.
2022-08-16imx8/usbxhciimx: fix a set and not used warningSigrid Solveig Haflínudóttir
2022-08-15imx8: enable/expose tmuSigrid Solveig Haflínudóttir
2025-05-14kernel: get rid of Proc.kstackglenda
The kernel stack is now above the Proc structure, so the explicit kstack pointer can be eliminated.
2022-08-129: compute available kernel pages using sizeof(Proc*)Ori Bernstein
procs come from the dynamic pools, so we don't need to remove the memory used by possible procs from the total available.
2022-08-109/port: allow kiloprocs -- allocate procs lazilyOri Bernstein
Treallocate the small data structures around procs eagerly, but use malloc to allocate the large proc data structures when we need them, which allows us to scale to many more procs. There are still many scalability bottlenecks, so we only crank up the nproc limit by a little bit this time around, and crank it up more as we optimize more.
2022-08-08imx8: add aux/imx8pm with lcd brightness controlSigrid Solveig Haflínudóttir
2022-07-31usb: fix ehci isochronous "in" split transactionscinap_lenrek
For "in" transactions, the "Total Bytes to Transfer" field in the siTD is decremented by the controller by the actual transfer size, so what remains in the field is the residue number of bytes. Also, handle restart when we get a zero byte read on a isochronous "in" endpoint in devusb itself (removing the restart code for xhci drivers). This fixes audio recording with a usb1.1 audio device connected to ehci controller.
2022-07-30imx8: increase cpu frequency from 1.4 to 1.6ghzcinap_lenrek
the RM seems to be outdated in this regard, saying the core is targeted at 1.4ghz.
2022-07-21devrtc: fix mistake.cinap_lenrek
2022-07-20imx8: add simple i2c rtc driver for NXP PCF8523cinap_lenrek
datasheet: http://nxp.com/docs/en/data-sheet/PCF8523.pdf