| To: | <linux-mips@linux-mips.org> |
|---|---|
| Subject: | PMON - IdentifyFlashType |
| From: | "erras stefan" <stefan.erras@dallmeier-electronic.com> |
| Date: | Thu, 25 Mar 2004 16:25:03 +0100 |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| Sender: | linux-mips-bounce@linux-mips.org |
| Thread-index: | AcQSfVrEYFBTTkDATxSChIuitybqZw== |
| Thread-topic: | PMON - IdentifyFlashType |
Can anybody of you great guys can explain me the folling function which
I found in PMON:
BOOL IdentifyFlashType()
{
ULONG mId, dId;
WRITE_REGISTER_ULONG(FLASH_START, 0x90909090);
mId = READ_REGISTER_ULONG(FLASH_START);
WRITE_REGISTER_ULONG(FLASH_START, 0x90909090);
dId = READ_REGISTER_ULONG(FLASH_START+4);
if ((mId == 0x00890089) && (dId == 0x00180018))
{
FlashType = 1; // J3 flash
WRITE_REGISTER_ULONG(FLASH_START, 0x00ff00ff);
printf("J3 32MB flash found on this platform\r\n");
return TRUE;
}
else if ((mId == 0x00890089) && (dId == 0x00170017))
{
FlashType = 1; // J3 flash
WRITE_REGISTER_ULONG(FLASH_START, 0x00ff00ff);
printf("J3 16MB flash found on this platform\r\n");
return TRUE;
}
return FALSE;
}
I have to know what the WRITE_REGISTER_ULONG and READ_REGISTER_ULONG
functions do affect.
Why do they write 0x90909090 or 0x00ff00ff to FLASH_START?
Whats the meaning of mId and dId?
Thank you all in advance for your help!!!
Greetings
Stefan
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: missing flush_dcache_page call in 2.4 kernel, Peter Horton |
|---|---|
| Next by Date: | Re: PMON - IdentifyFlashType, Richard Broberg |
| Previous by Thread: | patch: au1000_eth vlan, Bruno Randolf |
| Next by Thread: | Re: PMON - IdentifyFlashType, Richard Broberg |
| Indexes: | [Date] [Thread] [Top] [All Lists] |