I want to know how to pin multiplex pins in initial phase of boot i.e is in 
spl(MLO). What I am trying to do is change the default pin configuration to 
gpio one, so that I can see high or low on the pin.

On P8 header I tried to change the mode 0 from default 'TIMER4' to gpio2[2] 
i.e mode 7. So I did this

static struct module_pin_mux gpio2_2_pin_mux[] = {
    {OFFSET(gpmc_wen), (MODE(7) | PULLUDEN)},   
    {-1},
};

and called this function

configure_module_pin_mux(gpio2_2_pin_mux);

in board/ti/am335x/mux.c

I didn't saw any voltage on 7th pin of P8 header?

What is the correct way to do this?

file link : http://textuploader.com/5eh6u you can search with '?' in the 
file to see what I added.

P.S I checked with checking pin mux setting on uart0 and tried to read it 
if that is same.

So I wrote this in ./arch/arm/cpu/armv7/omap-common/boot-common.c

void spl_board_init(void)
{

     /*

     * Save the boot parameters passed from romcode.
     * We cannot delay the saving further than this,
     * to prevent overwrites.
     */
    save_omap_boot_params();
    unsigned int *mfi;
        //control revision register

    /* Prepare console output */
        mfi = *(unsigned int *)(0x44E10980);
        printf("1======> %x\n",mfi);
    preloader_console_init();//it will print uboot version date and time 
information
    mfi = *(unsigned int *)(0x44E10980);
            printf("2======> %x\n",mfi);

more init code.....
}



I wanted to see this setting done in board/ti/am335x/mux.c

static struct module_pin_mux uart0_pin_mux[] = {
    {OFFSET(uart0_rxd), (MODE(0) | PULLUP_EN | RXACTIVE)},  /* UART0_RXD */
    {OFFSET(uart0_txd), (MODE(0) | PULLUDEN)},      /* UART0_TXD */
    {-1},
}

But it printed value as 37. that means the pin is in GPIO mode. How is this 
possible that the pin that should be in mode 0 is in 7th mode?

Please help I am wasting weeks on this topic.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/ebe33cf4-f5d2-4f37-839c-ecc8eb553119%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to