summaryrefslogtreecommitdiff
path: root/board/davedenx/qong/qong.c
diff options
context:
space:
mode:
authorStefano Babic <sbabic@denx.de>2010-06-29 11:48:24 +0200
committerStefano Babic <sbabic@denx.de>2010-10-13 18:10:56 +0200
commitb9eb3fdf2f545626525b85953d322b2f8d67d319 (patch)
tree9b7b1b7e5db6973f2532fa15a66f9ec65e6336a2 /board/davedenx/qong/qong.c
parent70e23264ffd18270741197be4d59691499c0ba5c (diff)
downloadu-boot-imx-b9eb3fdf2f545626525b85953d322b2f8d67d319.zip
u-boot-imx-b9eb3fdf2f545626525b85953d322b2f8d67d319.tar.gz
u-boot-imx-b9eb3fdf2f545626525b85953d322b2f8d67d319.tar.bz2
MX31: Add support to update FPGA bitstream
The patch adds the possibility to update the QONG FPGA (a Lattice XP2-5E) with u-boot using some GPIOs to drive the JTAG interface. Signed-off-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'board/davedenx/qong/qong.c')
-rw-r--r--board/davedenx/qong/qong.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/board/davedenx/qong/qong.c b/board/davedenx/qong/qong.c
index 9abc29c..efeb0bb 100644
--- a/board/davedenx/qong/qong.c
+++ b/board/davedenx/qong/qong.c
@@ -73,6 +73,15 @@ int board_early_init_f (void)
/* set interrupt pin as input */
mxc_gpio_direction(QONG_FPGA_IRQ_PIN, MXC_GPIO_DIRECTION_IN);
+ /* FPGA JTAG Interface */
+ mx31_gpio_mux(IOMUX_MODE(MUX_CTL_SFS6, MUX_CTL_GPIO));
+ mx31_gpio_mux(IOMUX_MODE(MUX_CTL_SCK6, MUX_CTL_GPIO));
+ mx31_gpio_mux(IOMUX_MODE(MUX_CTL_CAPTURE, MUX_CTL_GPIO));
+ mx31_gpio_mux(IOMUX_MODE(MUX_CTL_COMPARE, MUX_CTL_GPIO));
+ mxc_gpio_direction(QONG_FPGA_TCK_PIN, MXC_GPIO_DIRECTION_OUT);
+ mxc_gpio_direction(QONG_FPGA_TMS_PIN, MXC_GPIO_DIRECTION_OUT);
+ mxc_gpio_direction(QONG_FPGA_TDI_PIN, MXC_GPIO_DIRECTION_OUT);
+ mxc_gpio_direction(QONG_FPGA_TDO_PIN, MXC_GPIO_DIRECTION_IN);
#endif
/* setup pins for UART1 */
@@ -146,6 +155,8 @@ int board_init (void)
gd->bd->bi_arch_number = MACH_TYPE_QONG;
gd->bd->bi_boot_params = (0x80000100); /* adress of boot parameters */
+ qong_fpga_init();
+
return 0;
}