mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] usb: gadget: fsl_udc: add imx7_barebox_(load/start)_usb
Date: Tue, 18 Oct 2022 11:06:39 +0200	[thread overview]
Message-ID: <20221018090639.GQ6702@pengutronix.de> (raw)
In-Reply-To: <20221017071036.1458761-1-a.fatoum@pengutronix.de>

On Mon, Oct 17, 2022 at 09:10:36AM +0200, Ahmad Fatoum wrote:
> 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.MX7D revision 1.2.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  drivers/usb/gadget/fsl_udc_pbl.c | 11 +++++++++++
>  include/soc/fsl/fsl_udc.h        |  3 +++
>  2 files changed, 14 insertions(+)

Applied, thanks

Sascha

> 
> diff --git a/drivers/usb/gadget/fsl_udc_pbl.c b/drivers/usb/gadget/fsl_udc_pbl.c
> index 8b714d4c8b02..d2f2b9e1959e 100644
> --- a/drivers/usb/gadget/fsl_udc_pbl.c
> +++ b/drivers/usb/gadget/fsl_udc_pbl.c
> @@ -5,6 +5,7 @@
>  #include <soc/fsl/fsl_udc.h>
>  #include <mach/imx8mm-regs.h>
>  #include <mach/imx6-regs.h>
> +#include <mach/imx7-regs.h>
>  
>  static void fsl_queue_td(struct usb_dr_device *dr, struct ep_td_struct *dtd,
>  			 int ep_is_in)
> @@ -210,6 +211,16 @@ int imx6_barebox_start_usb(void *dest)
>  	return imx_barebox_start_usb(IOMEM(MX6_OTG_BASE_ADDR), dest);
>  }
>  
> +int imx7_barebox_load_usb(void *dest)
> +{
> +	return imx_barebox_load_usb(IOMEM(MX7_OTG1_BASE_ADDR), dest);
> +}
> +
> +int imx7_barebox_start_usb(void *dest)
> +{
> +	return imx_barebox_start_usb(IOMEM(MX7_OTG1_BASE_ADDR), dest);
> +}
> +
>  int imx8mm_barebox_load_usb(void *dest)
>  {
>  	return imx_barebox_load_usb(IOMEM(MX8MM_USB1_BASE_ADDR), dest);
> diff --git a/include/soc/fsl/fsl_udc.h b/include/soc/fsl/fsl_udc.h
> index aa1db2fb3816..c1abe222ba2a 100644
> --- a/include/soc/fsl/fsl_udc.h
> +++ b/include/soc/fsl/fsl_udc.h
> @@ -385,6 +385,9 @@ int imx_barebox_start_usb(void __iomem *dr, void *dest);
>  int imx6_barebox_load_usb(void *dest);
>  int imx6_barebox_start_usb(void *dest);
>  
> +int imx7_barebox_load_usb(void *dest);
> +int imx7_barebox_start_usb(void *dest);
> +
>  int imx8mm_barebox_load_usb(void *dest);
>  int imx8mm_barebox_start_usb(void *dest);
>  
> -- 
> 2.30.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



      reply	other threads:[~2022-10-18  9:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-17  7:10 Ahmad Fatoum
2022-10-18  9:06 ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221018090639.GQ6702@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox