LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (http://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   How to initialize MCI for SDIO 4 bit wide bus mode on AT91SAM9261 Evalution Kit (http://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/how-to-initialize-mci-for-sdio-4-bit-wide-bus-mode-on-at91sam9261-evalution-kit-871830/)

blink182 03-29-2011 11:14 PM

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 !

nini09 04-01-2011 03:29 PM

I am very confusing words. Where is your code, in Uboot or Linux kernel?

blink182 04-03-2011 05:22 AM

hi nini09 . I place my code in bootstrap . Am I placing it in the wrong place ?

nini09 04-04-2011 03:16 PM

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


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