summaryrefslogtreecommitdiff
path: root/cpu/nios2
diff options
context:
space:
mode:
authorHeiko Schocher <hs@pollux.denx.de>2006-04-20 12:49:05 +0200
committerHeiko Schocher <hs@pollux.denx.de>2006-04-20 12:49:05 +0200
commit7fd392c2d0b27e372a1771e0bda877820b30d6e0 (patch)
tree71222692aef61104cb12e504846e354bc83a6555 /cpu/nios2
parent60e270a4903b3379d6859418d99aeef1d0d0cdff (diff)
downloadu-boot-imx-7fd392c2d0b27e372a1771e0bda877820b30d6e0.zip
u-boot-imx-7fd392c2d0b27e372a1771e0bda877820b30d6e0.tar.gz
u-boot-imx-7fd392c2d0b27e372a1771e0bda877820b30d6e0.tar.bz2
* Add EPCS Controller bootrom work-around for Nios-II
Patch from Scott McNutt 11, Aug 2005 -When booting from an epcs controller, the epcs bootrom may leave the slave select in an asserted state causing soft reset hang. This patch ensures slave select is negated at reset.
Diffstat (limited to 'cpu/nios2')
-rw-r--r--cpu/nios2/epcs.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/cpu/nios2/epcs.c b/cpu/nios2/epcs.c
index fd9fd84..414c38c 100644
--- a/cpu/nios2/epcs.c
+++ b/cpu/nios2/epcs.c
@@ -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];