start_kernel()里写gpio死机
在uboot里调用led_rk3288_start_kernel()是ok的,但是在linux的start_kernel()里调用却死机了#define LEDRK(x) (*(uint32_t *)(0xff7f0000+x))
void led_rk3288_start_kernel(void)
{
uint32_t i=0;
LEDRK(0x80)=(LEDRK(0x80))|0x001c0000;
udelay(1000);
LEDRK(0x80)=(LEDRK(0x80))&0xffffffe3;
udelay(1000);
LEDRK(0x80)=LEDRK(0x80)&0xffe3ffff;
udelay(1000);
LEDRK(0x4)=(LEDRK(0x4))|0x6;
udelay(1000);
while(i<10)
{
if(i%2)
LEDRK(0)=(LEDRK(0))&0xfffffff9;
else
LEDRK(0)=(LEDRK(0))|0x6;
udelay(1000*1000);
i++;
}
}
在start_kernel你去掉调用led_rk3288_start_kernel()就是好的,不明白
页:
[1]