Initialization of the MACs...

Austen McDonald austen at cc.gatech.edu
Fri Mar 16 17:21:49 EST 2001


	We are GT are running Linux and don't think that the MACs are
being properly initialized. We've looked at the Diagnostics code (the ARM
assembly) and we know that the MACs are in the slow port area of SRAM and
we know the offsets of the registers we need to access.
	But, our code doesn't work. Here's what Im doing:

#include <asm/arch/hardware.h>
#include <asm/arch/xp1200eb.h>
#include <stdio.h>

int main(int argc, char** argv) {
   unsigned char* mac0 = (unsigned char*)(SRAM_SLOW_PORT_BASE);
   unsigned char* mac1 = (unsigned char*)(SRAM_SLOW_PORT_BASE+0x8000);

   printf("%x\n",*(unsigned short*)(mac0+6*4));
   return 0;
}

which should print out the device ID and revision ID from MAC0 (the octal
MAC) but it just prints 0s. Is there something I have to do first to be
able to read from this SlowPort space?

Austen McDonald
austen at cc.gatech.edu

God does not care about our mathematical difficulties. 
He integrates empirically.
  -- Albert Einstein




More information about the ixp1200 mailing list