]> git.sur5r.net Git - u-boot/blobdiff - cpu/nios2/epcs.c
fix system config overwrite @ MPC834x and MPC8313
[u-boot] / cpu / nios2 / epcs.c
index fd9fd8498a506023b64d577cce6753afb3a1dce4..414c38c2b1df370f8432777e28bb635a90e028ad 100644 (file)
@@ -210,6 +210,21 @@ static struct epcs_devinfo_t devinfo[] = {
        { 0, 0, 0, 0, 0, 0 }
 };
 
+int epcs_reset (void)
+{
+       /* When booting from an epcs controller, the epcs bootrom
+        * code may leave the slave select in an asserted state.
+        * This causes two problems: (1) The initial epcs access
+        * will fail -- not a big deal, and (2) a software reset
+        * will cause the bootrom code to hang since it does not
+        * ensure the select is negated prior to first access -- a
+        * big deal. Here we just negate chip select and everything
+        * gets better :-)
+        */
+       epcs_cs (0); /* Negate chip select */
+       return (0);
+}
+
 epcs_devinfo_t *epcs_dev_find (void)
 {
        unsigned char buf[4];