summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-09-01 12:41:53 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-09-01 13:48:12 +0200
commit1a6eac4c9038027e4efc2987811429ff7a2c7826 (patch)
tree55eac3f6bdb31551da50f6d2de9b06559ae057c7 /drivers
parentfea6d25116ad1522ee2c7cb252a27797341ee584 (diff)
downloadbarebox-1a6eac4c9038027e4efc2987811429ff7a2c7826.tar.gz
barebox-1a6eac4c9038027e4efc2987811429ff7a2c7826.tar.xz
usb: gadget: fsl_udc: add imx6_barebox_(load/start)_usb
These can be called from barebox PBL when booted from USB to continue USB boot. This isn't necessary in the general case when RAM setup is done via DCD, but for cases where setup is done in PBL, these helpers come in handy. Tested on i.MX6Q. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220901104153.171235-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/fsl_udc_pbl.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/usb/gadget/fsl_udc_pbl.c b/drivers/usb/gadget/fsl_udc_pbl.c
index 0fbe941b12..8b714d4c8b 100644
--- a/drivers/usb/gadget/fsl_udc_pbl.c
+++ b/drivers/usb/gadget/fsl_udc_pbl.c
@@ -4,6 +4,7 @@
#include <usb/ch9.h>
#include <soc/fsl/fsl_udc.h>
#include <mach/imx8mm-regs.h>
+#include <mach/imx6-regs.h>
static void fsl_queue_td(struct usb_dr_device *dr, struct ep_td_struct *dtd,
int ep_is_in)
@@ -199,6 +200,16 @@ int imx_barebox_start_usb(void __iomem *dr, void *dest)
bb();
}
+int imx6_barebox_load_usb(void *dest)
+{
+ return imx_barebox_load_usb(IOMEM(MX6_OTG_BASE_ADDR), dest);
+}
+
+int imx6_barebox_start_usb(void *dest)
+{
+ return imx_barebox_start_usb(IOMEM(MX6_OTG_BASE_ADDR), dest);
+}
+
int imx8mm_barebox_load_usb(void *dest)
{
return imx_barebox_load_usb(IOMEM(MX8MM_USB1_BASE_ADDR), dest);