From 7f1a46e2e89da3bdec34116f7906cc417bbf98c4 Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Thu, 1 Feb 2018 21:58:52 +0000 Subject: [PATCH] [atheros] Fix-up the base address stuff after I did a drive-by with the calibration data location. The old way required the data to be present really early and copied it from memory mapped NOR flash; this only worked during kernel boot but not for ath/ath_hal modules. Tested: * AR9331, Carambola2, ath/hal modules. --- sys/mips/conf/AR933X_BASE.hints | 14 +++++++++++--- sys/mips/conf/std.AR933X | 3 +++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/sys/mips/conf/AR933X_BASE.hints b/sys/mips/conf/AR933X_BASE.hints index 48de2c513d9f..e208c6a3fef9 100644 --- a/sys/mips/conf/AR933X_BASE.hints +++ b/sys/mips/conf/AR933X_BASE.hints @@ -9,6 +9,10 @@ hint.apb.0.at="nexus0" hint.apb.0.irq=4 +# ART calibration data mapping device +hint.ar71xx_caldata.0.at="nexus0" +hint.ar71xx_caldata.0.order=0 + # uart0 hint.uart.0.at="apb0" # NB: This isn't an ns8250 UART @@ -39,9 +43,13 @@ hint.ath.0.msize=0x20000 hint.ath.0.irq=0 hint.ath.0.vendor_id=0x168c hint.ath.0.device_id=0x0035 -# Set this to define where the ath calibration data -# should be fetched from in physical memory. -# hint.ath.0.eepromaddr=0x1fff1000 + +# Where the ART is - last 64k in the first 8MB of flash +#hint.ar71xx_caldata.0.map.0.ath_fixup_addr=0x1fff0000 +#hint.ar71xx_caldata.0.map.0.ath_fixup_size=16384 + +# And now tell the ath(4) driver where to look! +#hint.ath.0.eeprom_firmware="ar71xx_caldata.0.map.0.eeprom_firmware" # SPI flash hint.spi.0.at="nexus0" diff --git a/sys/mips/conf/std.AR933X b/sys/mips/conf/std.AR933X index 5bc3980bddd4..832e1db3c958 100644 --- a/sys/mips/conf/std.AR933X +++ b/sys/mips/conf/std.AR933X @@ -62,6 +62,9 @@ makeoptions MODULES_OVERRIDE+="hwpmc_mips24k" option AH_SUPPORT_AR9330 # Chipset support option ATH_EEPROM_FIRMWARE # Use EEPROM from flash +# Support EEPROM caldata in AHB devices +options ATH_EEPROM_FIRMWARE + device usb device ehci