HI
I am trying to toggle led on 7th pin of port 1 in uboot for dm8148 . board/ti/ti8148/evm.c.
but now the problem i am getting is, my delay function is not working in uboot can you please tell me how to provide delay in uboot so that i can check the blinking of the led.
my code is below:
uu_delay(unsigned int cnt)
{
unsigned int i=0,j=0;
for(i=0;i<cnt;i++)
for(j=0;j<0x9ffffff;j++);
}
void gpio_pad_config_mux(void)
{
unsigned int i, val;
printf("Enabling the 7th pin of port 1 as output\n");
while(1)
{
val=__raw_readl(GPIO1_DATAOUT);
val&=0xffffff7f;
__raw_writel(val,GPIO1_DATAOUT);
printf("LEd ON\n");
uu_delay(0xffffff);
uu_delay(0xffffff);
uu_delay(0xffffff);
val=__raw_readl(GPIO1_DATAOUT);
val|=0xffffffff;
__raw_writel(val,GPIO1_DATAOUT);
printf("LED OFF\n");
uu_delay(0xffffff);
uu_delay(0xffffff);
uu_delay(0xffffff);
}
}
BR