[Midnightbsd-cvs] src [8618] trunk/sys/dev/ath/ath_hal: upgrade the AR9285 code to support PCI/ART EEPRO on flash.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Sep 25 13:45:02 EDT 2016
Revision: 8618
http://svnweb.midnightbsd.org/src/?rev=8618
Author: laffer1
Date: 2016-09-25 13:45:02 -0400 (Sun, 25 Sep 2016)
Log Message:
-----------
upgrade the AR9285 code to support PCI/ART EEPRO on flash.
Modified Paths:
--------------
trunk/sys/dev/ath/ath_hal/ah_eeprom_v4k.c
trunk/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c
Modified: trunk/sys/dev/ath/ath_hal/ah_eeprom_v4k.c
===================================================================
--- trunk/sys/dev/ath/ath_hal/ah_eeprom_v4k.c 2016-09-25 17:44:12 UTC (rev 8617)
+++ trunk/sys/dev/ath/ath_hal/ah_eeprom_v4k.c 2016-09-25 17:45:02 UTC (rev 8618)
@@ -298,13 +298,13 @@
"%s Error reading Eeprom MAGIC\n", __func__);
return HAL_EEREAD;
}
+ HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s Eeprom Magic = 0x%x\n",
+ __func__, magic);
+ if (magic != AR5416_EEPROM_MAGIC) {
+ HALDEBUG(ah, HAL_DEBUG_ANY, "Bad magic number\n");
+ return HAL_EEMAGIC;
+ }
}
- HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s Eeprom Magic = 0x%x\n",
- __func__, magic);
- if (magic != AR5416_EEPROM_MAGIC) {
- HALDEBUG(ah, HAL_DEBUG_ANY, "Bad magic number\n");
- return HAL_EEMAGIC;
- }
ee = ath_hal_malloc(sizeof(HAL_EEPROM_v4k));
if (ee == AH_NULL) {
Modified: trunk/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c
===================================================================
--- trunk/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c 2016-09-25 17:44:12 UTC (rev 8617)
+++ trunk/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c 2016-09-25 17:45:02 UTC (rev 8618)
@@ -134,6 +134,18 @@
ar5416InitState(AH5416(ah), devid, sc, st, sh, status);
+ /*
+ * Use the "local" EEPROM data given to us by the higher layers.
+ * This is a private copy out of system flash. The Linux ath9k
+ * commit for the initial AR9130 support mentions MMIO flash
+ * access is "unreliable." -adrian
+ */
+ if (eepromdata != AH_NULL) {
+ AH_PRIVATE(ah)->ah_eepromRead = ath_hal_EepromDataRead;
+ AH_PRIVATE(ah)->ah_eepromWrite = NULL;
+ ah->ah_eepromdata = eepromdata;
+ }
+
/* XXX override with 9285 specific state */
/* override 5416 methods for our needs */
AH5416(ah)->ah_initPLL = ar9280InitPLL;
More information about the Midnightbsd-cvs
mailing list