DKMS module for MacBook8,1 (12", Early 2015) keyboard/trackpad support. The Wildcat Point GSPI controller (PCI 8086:9ce6) on this hardware has a broken DMA handshake that causes all SPI transfers to time out. This patched version of spi-pxa2xx-pci forces PIO mode (enable_dma=0) for this PCI ID only, leaving DMA enabled for all other LPSS SPI devices. Requires irqpoll on the kernel command line for the SPI IRQ handler to be serviced (since IO-APIC doesn't deliver IRQ 21 from this hardware). Also includes a modprobe blacklist to prevent the in-tree spi_pxa2xx_pci from claiming the device before our patched version. Conflicts with macbook12-spi-driver-dkms (mutually exclusive; this machine uses the in-tree applespi driver instead of the macbook12 out-of-tree one). Closes basecamp/omarchy#1954
34 lines
1.6 KiB
Bash
34 lines
1.6 KiB
Bash
# Maintainer: Alvaro Fraguas <alvarofraguas@gmail.com>
|
|
_pkgbase=spi-pxa2xx-pci-nodma
|
|
pkgname=macbook8-spi-pxa2xx-nodma-dkms
|
|
pkgver=1.0
|
|
pkgrel=1
|
|
pkgdesc="Patched SPI PXA2xx PCI driver forcing PIO mode for MacBook8,1 Wildcat Point GSPI (8086:9ce6)"
|
|
arch=('x86_64')
|
|
url="https://github.com/basecamp/omarchy"
|
|
license=('GPL-2.0-only')
|
|
depends=('dkms' 'linux-headers')
|
|
makedepends=()
|
|
conflicts=('spi_pxa2xx_pci' 'macbook12-spi-driver-dkms')
|
|
provides=('spi_pxa2xx_pci_nodma')
|
|
source=("spi-pxa2xx-pci-nodma.c"
|
|
"spi-pxa2xx.h"
|
|
"Makefile"
|
|
"dkms.conf"
|
|
"macbook8-spi-nodma.conf")
|
|
sha256sums=('ffe04ab2c5d51db36b39eba05ace5faaf33d5004f46608f4fa06343ba873038b'
|
|
'011221bcaae0b8ca2634c3b2624b83b8a7bd94b37427fcd95548b3db705d5ec3'
|
|
'f9d1e48f6a18168105a6f6991953125cdf41457de178c00fe7378376ec11f12f'
|
|
'9fb4503571118d6e128387b99e371fc1f9401fe192f215c5b976a81c4937c514'
|
|
'455d3a9985928a5abc21452ca70c845d9203ec26c8826962607cdfbc2f34d86c')
|
|
|
|
package() {
|
|
# DKMS source files
|
|
install -Dm644 "${srcdir}/spi-pxa2xx-pci-nodma.c" "${pkgdir}/usr/src/${_pkgbase}-${pkgver}/spi-pxa2xx-pci-nodma.c"
|
|
install -Dm644 "${srcdir}/spi-pxa2xx.h" "${pkgdir}/usr/src/${_pkgbase}-${pkgver}/spi-pxa2xx.h"
|
|
install -Dm644 "${srcdir}/Makefile" "${pkgdir}/usr/src/${_pkgbase}-${pkgver}/Makefile"
|
|
install -Dm644 "${srcdir}/dkms.conf" "${pkgdir}/usr/src/${_pkgbase}-${pkgver}/dkms.conf"
|
|
|
|
# Modprobe blacklist: prevent the in-tree spi_pxa2xx_pci from claiming this device
|
|
install -Dm644 "${srcdir}/macbook8-spi-nodma.conf" "${pkgdir}/usr/lib/modprobe.d/macbook8-spi-nodma.conf"
|
|
} |