From: Andy Green <andy.gr...@linaro.org>

I found this useful during debugging failure of xloader before
serial had come up on Panda.

Cc: Menon Nishanth <menon.nisha...@gmail.com>
Signed-off-by: Andy Green <a...@warmcat.com>
---

 board/omap4430panda/omap4430panda.c |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/board/omap4430panda/omap4430panda.c 
b/board/omap4430panda/omap4430panda.c
index c2fd1f9..b263e50 100644
--- a/board/omap4430panda/omap4430panda.c
+++ b/board/omap4430panda/omap4430panda.c
@@ -714,6 +714,27 @@ int dram_init(void)
        return 0;
 }
 
+/* this flashes the Panda LEDs forever, if called after muxconf */
+
+void spam(void)
+{
+       volatile int n;
+       unsigned int v = __raw_readl(O4_GPIO_BASE + 0x134);
+       __raw_writel((v & ~(0x03 << 7)), O4_GPIO_BASE + 0x134);
+
+       v = __raw_readl(O4_GPIO_BASE + 0x13c);
+
+       while (1) {
+               __raw_writel((v & ~(0x03 << 7)), O4_GPIO_BASE + 0x13c);
+               for (n = 0; n< 100000; n++)
+                       ;
+
+               __raw_writel((v | (0x03 << 7)), O4_GPIO_BASE + 0x13c);
+               for (n = 0; n< 100000; n++)
+                       ;
+       }
+}
+
 #define                OMAP44XX_WKUP_CTRL_BASE         0x4A31E000 
 #if 1
 #define M0_SAFE M0


_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to