[U-Boot] [PATCH] FPGA: Cyclon II: Correctly reset the FPGA before configuration

Stefan Roese sr at denx.de
Tue Oct 23 11:11:41 CEST 2012


From: Stephan Gatzka <stephan.gatzka at hbm.com>

Deassert the CONFIG pin before asserting it again. This assures that the
FPGA will be resetted and therefore configuration will be correctly
enabled.

This is also already done on other FPGA's, e.g. Stratix.

Signed-off-by: Stephan Gatzka <stephan.gatzka at hbm.com>
Signed-off-by: Stefan Roese <sr at denx.de>
---
 drivers/fpga/cyclon2.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/fpga/cyclon2.c b/drivers/fpga/cyclon2.c
index 26494a3..0773e73 100644
--- a/drivers/fpga/cyclon2.c
+++ b/drivers/fpga/cyclon2.c
@@ -144,6 +144,8 @@ static int CYC2_ps_load(Altera_desc *desc, const void *buf, size_t bsize)
 		}
 
 		/* Establish the initial state */
+		(*fn->config) (FALSE, TRUE, cookie);	/* De-assert nCONFIG */
+		udelay(100);
 		(*fn->config) (TRUE, TRUE, cookie);	/* Assert nCONFIG */
 
 		udelay(2);		/* T_cfg > 2us	*/
-- 
1.8.0



More information about the U-Boot mailing list