EmbeddedRelated.com
Forums
Memfault State of IoT Report

cs8900a always returning 0x5555

Started by Aimingoo May 22, 2006
Hi- I am working on developing cs8900a driver under linux 2.4. The system
configuration is: arm9+linux(kernel 2.4), the cs8900a is working on IO
mode and its bus address is 0x1001_0000, its default IO base is 0x300.
Problem is, cs8900a always returning 0x5555 when I read like this:

..

static unsigned int virt_base;
		
if(check_mem_region(0x10010000, 0x1000)){
	printk(KERN_INFO "CS8900A: memory already in use\n");
} else 
	request_mem_region(0x10010000, 0x1000, "CS8900A");

virt_base = (unsigned int)ioremap(0x10010000, 0x1000); // 4k bytes

//read the product id
writew(0x0000, virt_base+0x30a);
printk(KERN_INFO "CS8900A :  0x%lx\n", readw(iov6+0x30c));

...

I ' m now struggling with this problem for weeks and would really
apreciate any help on this.

On Mon, 22 May 2006 01:05:02 -0400, "Aimingoo" <aimingoo@gmail.com>
wrote:

>Hi- I am working on developing cs8900a driver under linux 2.4. The system >configuration is: arm9+linux(kernel 2.4), the cs8900a is working on IO >mode and its bus address is 0x1001_0000, its default IO base is 0x300. >Problem is, cs8900a always returning 0x5555 when I read like this:
[snip]
>I ' m now struggling with this problem for weeks and would really >apreciate any help on this.
But you were most likely not searching the comp.arch.embedded archives in google cause otherwise you would have stumbled over my thread about the exactly same problem weeks before :-) : http://groups.google.ch/group/comp.arch.embedded/browse_frm/thread/f0f3de4465c7dc8d/80ea9027f7b0c89a?tvc=1&q=cs8900a+author%3AMarkus+author%3AZingg&hl=de#80ea9027f7b0c89a In short, I did not had enough wait states and hence the controller did not had enough time to set the propper value on the port. Since I also got back 0x5555 and since your controller (arm9) is a pretty fast one I'm somehow confident that your design suffers from the same problem I was facing. HTH Markus
Hi,thanks your time first!
I have accessed the signature of cs8900a correctly via emluator. But I
can't accessed it under linux driver, so I think it may be something wrong
with function 'ioremap' or other mistake, would you give me some advise on
map physical address of cs8900a to virtual address?

Thanks again!

Hi,thanks your time first!
I have accessed the signature of cs8900a correctly via emluator. But I
can't accessed it under linux driver, so I think it may be something wrong
with function 'ioremap' or other mistake, would you give me some advise on
map physical address of cs8900a to virtual address?

Thanks again!

>Hi,thanks your time first! >I have accessed the signature of cs8900a correctly via emluator. But I >can't accessed it under linux driver, so I think it may be something wrong >with function 'ioremap' or other mistake, would you give me some advise on >map physical address of cs8900a to virtual address? > >Thanks again!
I'm sorry, I did not currently use linux. However due to the fact that you see the same pattern (0x5555) I still think it's a timeing issue. The emulator you refer to could be just that tad bit slower with it's operation on the bus to make the difference. Otherwise you might ask in a new thread here about the ioremap function so as other might jump in but again, I'd say it's the timeing. The cs8900a is horribly slow on it's digital interface. I'm not going to use it in a new design for this very reason. Apart from this it's a nice chip though. HTH Markus
Aimingoo wrote:
> > I have accessed the signature of cs8900a correctly via emluator. > But I can't accessed it under linux driver, so I think it may be > something wrong with function 'ioremap' or other mistake, would > you give me some advise on map physical address of cs8900a to > virtual address?
In this particular case it doesn't matter too much, but in general on usenet you should realize that readers may very well not have convenient access to previous articles in a thread. That means that your reply articles should include adequate context, so that they stand by themselves. Google is NOT usenet, it is only a very poor interface to the real usenet system. To include proper context when using google, see my sig. below. Please be sure to read the referenced URLs. -- "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. Click on "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers." - Keith Thompson More details at: <http://cfaj.freeshell.org/google/> Also see <http://www.safalra.com/special/googlegroupsreply/>

Memfault State of IoT Report