Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
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.


  Search this Thread
Old 03-29-2011, 10:14 PM   #1
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 :

	/*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*/

	/* 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, 02:29 PM   #2
Senior Member
Registered: Apr 2009
Posts: 1,436

Rep: Reputation: 133Reputation: 133
I am very confusing words. Where is your code, in Uboot or Linux kernel?
Old 04-03-2011, 04:22 AM   #3
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, 02:16 PM   #4
Senior Member
Registered: Apr 2009
Posts: 1,436

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


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 12 01-01-2016 09:22 PM
Wireless LAN SDIO card - Wrong SDIO driver loaded [i.MX31] Robert_A Programming 2 03-14-2011 11:14 AM
64 bit flash -- system wide setting? michalng Debian 5 04-08-2009 07:16 AM
Error unable to initialize video mode kellyalittlesexy Linux - Games 1 01-06-2007 08: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 12:35 AM

All times are GMT -5. The time now is 11:51 AM.

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