LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices



Reply
 
Search this Thread
Old 03-29-2011, 11:14 PM   #1
blink182
LQ Newbie
 
Registered: Oct 2010
Posts: 29

Rep: Reputation: 0
How to initialize MCI for SDIO 4 bit wide bus mode on AT91SAM9261 Evalution Kit


Hello there . I'm trying to enable MCI for SDIO 4 bit wide bus mode on AT91SAM9261 Evalution Kit to test a Wifi application . And I modified the bootstrap sources provided by Atmel a bit to include the SDIO 4 bit mode. I modified the at91sam9261ek.c to add a few statements in the hw_init function :

Code:
	/*Configure processor clock = main clock and  the MCK = Processor Clock divided by 4 */
	writel(0x0,(AT91C_BASE_PMC + PMC_MCKR));

	/* Configure the Peripheral Clocks to enable MCI Clock*/
	pmc_cfg_MCIclk();

	/* Configure the MCI control resgister to enable Multi-Media Interface*/
	writel(AT91C_MCI_MCIEN , (AT91C_BASE_MCI + MCI_CR));

	/* Configure MCI Mode Resgister to set Clock Divider to zero */
	writel(0x0 , (AT91C_BASE_MCI + MCI_MR));

	/* Configure MCI SDCard Register to set slot A and 4-bit SDIO */
	writel(((0x1<<7)|(0x0<<0)),(AT91C_BASE_MCI + MCI_SDCR));
Then , I re-compiled the whole sources and check it with my board . I found that the bootstrap couldn't recognize the Uboot and there is no signal on the MCI_CLK output.

However , when i commented the statement writel(0x0,(AT91C_BASE_PMC + PMC_MCKR)); and re-compiled the sources , the Uboot can be normally loaded . The MCI_CLK could output unstable clock signal for a few seconds then it goes to zero. Could somebody tell me how can i include the SDIO4-bit mode normally ? Sorry for my poor English and I would appreciate your help . Thanks !
 
Old 04-01-2011, 03:29 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,060

Rep: Reputation: 88
I am very confusing words. Where is your code, in Uboot or Linux kernel?
 
Old 04-03-2011, 05:22 AM   #3
blink182
LQ Newbie
 
Registered: Oct 2010
Posts: 29

Original Poster
Rep: Reputation: 0
hi nini09 . I place my code in bootstrap . Am I placing it in the wrong place ?
 
Old 04-04-2011, 03:16 PM   #4
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,060

Rep: Reputation: 88
If your bootstrap is Uboot, it is wrong place. Your code should be in Linux kernel.
 
  


Reply

Tags
bootstrap, embedded, linux, uboot


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
64-Bit CPUs and the Address Bus LinuxCrayon Linux - Hardware 10 12-29-2011 07:36 AM
Wireless LAN SDIO card - Wrong SDIO driver loaded [i.MX31] Robert_A Programming 2 03-14-2011 12:14 PM
64 bit flash -- system wide setting? michalng Debian 5 04-08-2009 08:16 AM
Error unable to initialize video mode kellyalittlesexy Linux - Games 1 01-06-2007 09:02 AM
Memory bus is 64 bit but data access and register is only 32 bit for i386 lilzz Linux - Newbie 3 09-02-2006 01:35 AM


All times are GMT -5. The time now is 03:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration