[1/5] usb: chipidea: tegra: add tegra specific flags for host mode
diff mbox series

Message ID 20191002014153.29831-2-pgwipeout@gmail.com
State New
Headers show
Series
  • enable tegra-udc host mode
Related show

Commit Message

Peter Geis Oct. 2, 2019, 1:41 a.m. UTC
Tegra controllers require special handlers for aligned dma, as generic
helpers do not exist yet. Add a flag to set for Tegra devices to permit
these handlers.
Also, some Tegra controllers require a double reset, set from the device
tree. Add a flag for this as well.

Signed-off-by: Peter Geis <pgwipeout@gmail.com>
---
 include/linux/usb/chipidea.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Thierry Reding Oct. 2, 2019, 11:10 a.m. UTC | #1
On Tue, Oct 01, 2019 at 09:41:49PM -0400, Peter Geis wrote:
> Tegra controllers require special handlers for aligned dma, as generic
> helpers do not exist yet. Add a flag to set for Tegra devices to permit
> these handlers.
> Also, some Tegra controllers require a double reset, set from the device
> tree. Add a flag for this as well.
> 
> Signed-off-by: Peter Geis <pgwipeout@gmail.com>
> ---
>  include/linux/usb/chipidea.h | 2 ++
>  1 file changed, 2 insertions(+)

I think it's best to introduce these flags with the same patches that
add support for the features that they control. That way it becomes much
clearer what they're used for.

Thierry

> 
> diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h
> index edd89b7c8f18..88cc13fe582f 100644
> --- a/include/linux/usb/chipidea.h
> +++ b/include/linux/usb/chipidea.h
> @@ -62,6 +62,8 @@ struct ci_hdrc_platform_data {
>  #define CI_HDRC_REQUIRES_ALIGNED_DMA	BIT(13)
>  #define CI_HDRC_IMX_IS_HSIC		BIT(14)
>  #define CI_HDRC_PMQOS			BIT(15)
> +#define CI_HDRC_TEGRA_HOST		BIT(16)
> +#define CI_HDRC_TEGRA_DOUBLE_RESET	BIT(17)
>  	enum usb_dr_mode	dr_mode;
>  #define CI_HDRC_CONTROLLER_RESET_EVENT		0
>  #define CI_HDRC_CONTROLLER_STOPPED_EVENT	1
> -- 
> 2.17.1
>
Peter Geis Oct. 2, 2019, 12:02 p.m. UTC | #2
On Wed, Oct 2, 2019 at 7:10 AM Thierry Reding <thierry.reding@gmail.com> wrote:
>
> On Tue, Oct 01, 2019 at 09:41:49PM -0400, Peter Geis wrote:
> > Tegra controllers require special handlers for aligned dma, as generic
> > helpers do not exist yet. Add a flag to set for Tegra devices to permit
> > these handlers.
> > Also, some Tegra controllers require a double reset, set from the device
> > tree. Add a flag for this as well.
> >
> > Signed-off-by: Peter Geis <pgwipeout@gmail.com>
> > ---
> >  include/linux/usb/chipidea.h | 2 ++
> >  1 file changed, 2 insertions(+)
>
> I think it's best to introduce these flags with the same patches that
> add support for the features that they control. That way it becomes much
> clearer what they're used for.
>
> Thierry

Understood, I'll rework the patch layout.

>
> >
> > diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h
> > index edd89b7c8f18..88cc13fe582f 100644
> > --- a/include/linux/usb/chipidea.h
> > +++ b/include/linux/usb/chipidea.h
> > @@ -62,6 +62,8 @@ struct ci_hdrc_platform_data {
> >  #define CI_HDRC_REQUIRES_ALIGNED_DMA BIT(13)
> >  #define CI_HDRC_IMX_IS_HSIC          BIT(14)
> >  #define CI_HDRC_PMQOS                        BIT(15)
> > +#define CI_HDRC_TEGRA_HOST           BIT(16)
> > +#define CI_HDRC_TEGRA_DOUBLE_RESET   BIT(17)
> >       enum usb_dr_mode        dr_mode;
> >  #define CI_HDRC_CONTROLLER_RESET_EVENT               0
> >  #define CI_HDRC_CONTROLLER_STOPPED_EVENT     1
> > --
> > 2.17.1
> >

Patch
diff mbox series

diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h
index edd89b7c8f18..88cc13fe582f 100644
--- a/include/linux/usb/chipidea.h
+++ b/include/linux/usb/chipidea.h
@@ -62,6 +62,8 @@  struct ci_hdrc_platform_data {
 #define CI_HDRC_REQUIRES_ALIGNED_DMA	BIT(13)
 #define CI_HDRC_IMX_IS_HSIC		BIT(14)
 #define CI_HDRC_PMQOS			BIT(15)
+#define CI_HDRC_TEGRA_HOST		BIT(16)
+#define CI_HDRC_TEGRA_DOUBLE_RESET	BIT(17)
 	enum usb_dr_mode	dr_mode;
 #define CI_HDRC_CONTROLLER_RESET_EVENT		0
 #define CI_HDRC_CONTROLLER_STOPPED_EVENT	1