static inline
int usb_probe(struct xn_tool *tool)
{
printf("\nUsb Probe:\n");
gpio_set_pin(S3C_GPK7, S3C_GPK7_OUTP);
gpio_set_value(S3C_GPK7, 1);
gpio_set_pin(S3C_GPH2, S3C_GPH2_OUTP);
gpio_set_value(S3C_GPH2, 1);
gpio_set_pin(S3C_GPC0, S3C_GPC0_OUTP);
gpio_set_value(S3C_GPC0, 0);
udelay(1000000);
if(uboot_cmd_call("usb start") == -1)
{
printf("usb start fail\n");
goto out1;
}
if(uboot_cmd_call("usb tree") == -1)
{
printf("show usb tree fail\n");
goto out1;
}
wait_user_ack(tool);
return 0;
out1:
printf("USB..................................................[ERROR]\n");
wait_user_ack(tool);
return 0;
}
阅读(3255) | 评论(0) | 转发(1) |