summaryrefslogtreecommitdiffstats
path: root/board/siemens/taurus
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2015-09-08 11:52:52 +0200
committerAndreas Bießmann <andreas.devel@googlemail.com>2015-09-11 09:35:40 +0200
commite8b81eef4499c32b11d5f120171f39f67db0db59 (patch)
tree35238783fe99f677ce446ec153c73ce46c8893d1 /board/siemens/taurus
parent620197670a69dd8bae11134324db296f68ae804b (diff)
downloadblackbird-obmc-uboot-e8b81eef4499c32b11d5f120171f39f67db0db59.tar.gz
blackbird-obmc-uboot-e8b81eef4499c32b11d5f120171f39f67db0db59.zip
at91, taurus, smartweb: add dfu support
[root@pollux dfu-util]# ./src/dfu-util -l dfu-util 0.8 Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. Copyright 2010-2014 Tormod Volden and Stefan Schmidt This program is Free Software and has ABSOLUTELY NO WARRANTY Please report bugs to dfu-util@lists.gnumonks.org Found DFU: [0908:02d2] ver=0212, devnum=119, cfg=1, intf=0, alt=0, name="Linux", serial="UNKNOWN" [root@pollux dfu-util]# Signed-off-by: Heiko Schocher <hs@denx.de> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Diffstat (limited to 'board/siemens/taurus')
-rw-r--r--board/siemens/taurus/taurus.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/board/siemens/taurus/taurus.c b/board/siemens/taurus/taurus.c
index edeb15ba48..72c5e6083d 100644
--- a/board/siemens/taurus/taurus.c
+++ b/board/siemens/taurus/taurus.c
@@ -285,6 +285,29 @@ void spi_cs_deactivate(struct spi_slave *slave)
at91_set_gpio_value(TAURUS_SPI_CS_PIN, 1);
}
+#ifdef CONFIG_USB_GADGET_AT91
+#include <linux/usb/at91_udc.h>
+
+void at91_udp_hw_init(void)
+{
+ at91_pmc_t *pmc = (at91_pmc_t *)ATMEL_BASE_PMC;
+
+ /* Enable PLLB */
+ writel(get_pllb_init(), &pmc->pllbr);
+ while ((readl(&pmc->sr) & AT91_PMC_LOCKB) != AT91_PMC_LOCKB)
+ ;
+
+ /* Enable UDPCK clock, MCK is enabled in at91_clock_init() */
+ at91_periph_clk_enable(ATMEL_ID_UDP);
+
+ writel(AT91SAM926x_PMC_UDP, &pmc->scer);
+}
+
+struct at91_udc_data board_udc_data = {
+ .baseaddr = ATMEL_BASE_UDP0,
+};
+#endif
+
int board_init(void)
{
/* adress of boot parameters */
@@ -297,6 +320,10 @@ int board_init(void)
taurus_macb_hw_init();
#endif
at91_spi0_hw_init(TAURUS_SPI_MASK);
+#ifdef CONFIG_USB_GADGET_AT91
+ at91_udp_hw_init();
+ at91_udc_probe(&board_udc_data);
+#endif
return 0;
}
OpenPOWER on IntegriCloud