[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit

Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/boot/common/src/uboot/test/test_gpio.c b/boot/common/src/uboot/test/test_gpio.c
new file mode 100644
index 0000000..7a729fa
--- /dev/null
+++ b/boot/common/src/uboot/test/test_gpio.c
@@ -0,0 +1,51 @@
+#include <common.h>

+#include <command.h>

+#include <net.h>

+#include <jffs2/load_kernel.h>

+#include <common.h>

+#include <asm/arch/hardware.h>

+#include <asm/arch/uart.h>

+#include <asm/arch/lsp_crpm.h>

+#include "errno.h"

+

+//#if CONFIG_HARDWARE_TEST

+#if 0

+void gpio_led_on(gpio_pin_t pin, gpio_sel_t val)
+{
+	gpio_sel_t value = gpio_get_reuse(pin);     /*for restore*/

+	gpio_set_reuse(pin,val);                    /* gpio function*/

+	gpio_direction_output(pin,1);               /*out high*/

+	udelay(1000000);

+	gpio_direction_output(pin,0);               /*out low*/

+	gpio_direction_input(pin);
+	gpio_set_reuse(pin,value);                  /*restore*/

+}

+

+void gpio_leds_on(void)
+{		
+	gpio_led_on(GPIO9,1);   /*gpio9 default function is i2c sda1*/

+	gpio_led_on(GPIO11,0);

+	gpio_led_on(GPIO12,0);

+//	gpio_led_on(GPIO13,0);

+//    gpio_led_on(GPIO16,0);

+	gpio_led_on(GPIO17,0);	

+}

+

+

+int do_test_gpio(void) 

+{

+    uint8_t i = 10;

+    while( i-- )

+    {

+        gpio_leds_on();

+    }

+    return 0;

+}

+

+U_BOOT_CMD(

+	test_gpio, CONFIG_SYS_MAXARGS, 0, do_test_gpio,

+	"test_gpio: test_gpio ",

+	""

+);

+

+#endif