Adrian Chadd wrote: > Is there an easy way to get an EEPROM/OTP contents dump in ath9k?
For AR93xx you can try to use the following script: #!/usr/bin/perl -w my $debugPath = '/debug/ath9k/phy0'; sub RegGet($) { open(F,">$debugPath/regidx") or die("Unable to open $debugPath/regidx."); printf(F "0x%x\n",shift()); close(F); open(F,"$debugPath/regval") or die("Unable to open $debugPath/regval."); local $val = <F>; $val =~ s/\s+$//g; close(F); return hex($val); } sub EepromRead($) { RegGet(0x2000 + ((shift()/2) << 2)); while ((RegGet(0x4084) & 0x50000) != 0) {} return RegGet(0x4084); } for (local $addr = 0; $addr < 0x400; $addr += 2) { printf("\n%04x:",$addr) if ($addr%16 == 0); local $val = EepromRead($addr); printf(" %02x %02x",$val >> 8,$val & 0xff); } printf("\n"); _______________________________________________ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel