Message ID | 1bf89d4301baa8632daf48b3e28858aff5371954.1585958250.git.mirq-linux@rere.qmqm.pl (mailing list archive) |
---|---|
State | Mainlined |
Commit | 95caa2ae70fdbf626335700d24400f47c12825ee |
Headers | show |
Series | [1/5] usb: chipidea: usb2: constify zynq_pdata | expand |
On 20-04-04 02:00:06, Michał Mirosław wrote: > Allow to cut down on driver size for embedded config. > > Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> > --- > drivers/usb/chipidea/Kconfig | 37 ++++++++++++++++++++++++----------- > drivers/usb/chipidea/Makefile | 12 +++++------- > 2 files changed, 31 insertions(+), 18 deletions(-) > > diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig > index d53db520e209..8bafcfc6080d 100644 > --- a/drivers/usb/chipidea/Kconfig > +++ b/drivers/usb/chipidea/Kconfig > @@ -18,17 +18,6 @@ config USB_CHIPIDEA > > if USB_CHIPIDEA > > -config USB_CHIPIDEA_OF > - tristate > - depends on OF > - default USB_CHIPIDEA > - > -config USB_CHIPIDEA_PCI > - tristate > - depends on USB_PCI > - depends on NOP_USB_XCEIV > - default USB_CHIPIDEA > - > config USB_CHIPIDEA_UDC > bool "ChipIdea device controller" > depends on USB_GADGET > @@ -43,4 +32,30 @@ config USB_CHIPIDEA_HOST > help > Say Y here to enable host controller functionality of the > ChipIdea driver. > + > +config USB_CHIPIDEA_PCI > + tristate "Enable PCI glue driver" if EMBEDDED Why depends on EMBEDDED for this driver? Not everyone needs this configuration. Peter > + depends on USB_PCI > + depends on NOP_USB_XCEIV > + default USB_CHIPIDEA > + > +config USB_CHIPIDEA_MSM > + tristate "Enable MSM hsusb glue driver" if EMBEDDED > + default USB_CHIPIDEA > + > +config USB_CHIPIDEA_IMX > + tristate "Enable i.MX USB glue driver" if EMBEDDED > + depends on OF > + default USB_CHIPIDEA > + > +config USB_CHIPIDEA_GENERIC > + tristate "Enable generic USB2 glue driver" if EMBEDDED > + default USB_CHIPIDEA > + > +config USB_CHIPIDEA_TEGRA > + tristate "Enable Tegra UDC glue driver" if EMBEDDED > + depends on OF > + depends on USB_CHIPIDEA_UDC > + default USB_CHIPIDEA > + > endif > diff --git a/drivers/usb/chipidea/Makefile b/drivers/usb/chipidea/Makefile > index 985663ba6e68..fae779a23866 100644 > --- a/drivers/usb/chipidea/Makefile > +++ b/drivers/usb/chipidea/Makefile > @@ -8,10 +8,8 @@ ci_hdrc-$(CONFIG_USB_OTG_FSM) += otg_fsm.o > > # Glue/Bridge layers go here > > -obj-$(CONFIG_USB_CHIPIDEA) += ci_hdrc_usb2.o > -obj-$(CONFIG_USB_CHIPIDEA) += ci_hdrc_msm.o > - > -obj-$(CONFIG_USB_CHIPIDEA_PCI) += ci_hdrc_pci.o > - > -obj-$(CONFIG_USB_CHIPIDEA_OF) += usbmisc_imx.o ci_hdrc_imx.o > -obj-$(CONFIG_USB_CHIPIDEA_OF) += ci_hdrc_tegra.o > +obj-$(CONFIG_USB_CHIPIDEA_GENERIC) += ci_hdrc_usb2.o > +obj-$(CONFIG_USB_CHIPIDEA_MSM) += ci_hdrc_msm.o > +obj-$(CONFIG_USB_CHIPIDEA_PCI) += ci_hdrc_pci.o > +obj-$(CONFIG_USB_CHIPIDEA_IMX) += ci_hdrc_imx.o usbmisc_imx.o > +obj-$(CONFIG_USB_CHIPIDEA_TEGRA) += ci_hdrc_tegra.o > -- > 2.20.1 >
On Tue, Apr 07, 2020 at 03:12:36AM +0000, Peter Chen wrote: > On 20-04-04 02:00:06, Michał Mirosław wrote: > > Allow to cut down on driver size for embedded config. > > > > Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> > > --- > > drivers/usb/chipidea/Kconfig | 37 ++++++++++++++++++++++++----------- > > drivers/usb/chipidea/Makefile | 12 +++++------- > > 2 files changed, 31 insertions(+), 18 deletions(-) > > > > diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig > > index d53db520e209..8bafcfc6080d 100644 > > --- a/drivers/usb/chipidea/Kconfig > > +++ b/drivers/usb/chipidea/Kconfig > > @@ -18,17 +18,6 @@ config USB_CHIPIDEA > > > > if USB_CHIPIDEA > > > > -config USB_CHIPIDEA_OF > > - tristate > > - depends on OF > > - default USB_CHIPIDEA > > - > > -config USB_CHIPIDEA_PCI > > - tristate > > - depends on USB_PCI > > - depends on NOP_USB_XCEIV > > - default USB_CHIPIDEA > > - > > config USB_CHIPIDEA_UDC > > bool "ChipIdea device controller" > > depends on USB_GADGET > > @@ -43,4 +32,30 @@ config USB_CHIPIDEA_HOST > > help > > Say Y here to enable host controller functionality of the > > ChipIdea driver. > > + > > +config USB_CHIPIDEA_PCI > > + tristate "Enable PCI glue driver" if EMBEDDED [...] > Why depends on EMBEDDED for this driver? Not everyone needs this > configuration. This does not make the driver depend on EMBEDDED, only the prompts are. By default (without CONFIG_EMBEDDED) you will have all glue layers built if you enable the driver. I can remove the 'if EMBEDDED', but I suppose those options are only relevant for people building for resource-constrained systems, so would have EMBEDDED enabled anyway. Best Regards, Michał Mirosław
On 20-04-07 22:00:37, Michał Mirosław wrote: > On Tue, Apr 07, 2020 at 03:12:36AM +0000, Peter Chen wrote: > > On 20-04-04 02:00:06, Michał Mirosław wrote: > > > Allow to cut down on driver size for embedded config. > > > > > > Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> > > > --- > > > drivers/usb/chipidea/Kconfig | 37 ++++++++++++++++++++++++----------- > > > drivers/usb/chipidea/Makefile | 12 +++++------- > > > 2 files changed, 31 insertions(+), 18 deletions(-) > > > > > > diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig > > > index d53db520e209..8bafcfc6080d 100644 > > > --- a/drivers/usb/chipidea/Kconfig > > > +++ b/drivers/usb/chipidea/Kconfig > > > @@ -18,17 +18,6 @@ config USB_CHIPIDEA > > > > > > if USB_CHIPIDEA > > > > > > -config USB_CHIPIDEA_OF > > > - tristate > > > - depends on OF > > > - default USB_CHIPIDEA > > > - > > > -config USB_CHIPIDEA_PCI > > > - tristate > > > - depends on USB_PCI > > > - depends on NOP_USB_XCEIV > > > - default USB_CHIPIDEA > > > - > > > config USB_CHIPIDEA_UDC > > > bool "ChipIdea device controller" > > > depends on USB_GADGET > > > @@ -43,4 +32,30 @@ config USB_CHIPIDEA_HOST > > > help > > > Say Y here to enable host controller functionality of the > > > ChipIdea driver. > > > + > > > +config USB_CHIPIDEA_PCI > > > + tristate "Enable PCI glue driver" if EMBEDDED > [...] > > Why depends on EMBEDDED for this driver? Not everyone needs this > > configuration. > > This does not make the driver depend on EMBEDDED, only the prompts are. > By default (without CONFIG_EMBEDDED) you will have all glue layers built > if you enable the driver. I can remove the 'if EMBEDDED', but > I suppose those options are only relevant for people building for > resource-constrained systems, so would have EMBEDDED enabled anyway. > Make sense. I applied this series, thanks.
diff --git a/drivers/usb/chipidea/Kconfig b/drivers/usb/chipidea/Kconfig index d53db520e209..8bafcfc6080d 100644 --- a/drivers/usb/chipidea/Kconfig +++ b/drivers/usb/chipidea/Kconfig @@ -18,17 +18,6 @@ config USB_CHIPIDEA if USB_CHIPIDEA -config USB_CHIPIDEA_OF - tristate - depends on OF - default USB_CHIPIDEA - -config USB_CHIPIDEA_PCI - tristate - depends on USB_PCI - depends on NOP_USB_XCEIV - default USB_CHIPIDEA - config USB_CHIPIDEA_UDC bool "ChipIdea device controller" depends on USB_GADGET @@ -43,4 +32,30 @@ config USB_CHIPIDEA_HOST help Say Y here to enable host controller functionality of the ChipIdea driver. + +config USB_CHIPIDEA_PCI + tristate "Enable PCI glue driver" if EMBEDDED + depends on USB_PCI + depends on NOP_USB_XCEIV + default USB_CHIPIDEA + +config USB_CHIPIDEA_MSM + tristate "Enable MSM hsusb glue driver" if EMBEDDED + default USB_CHIPIDEA + +config USB_CHIPIDEA_IMX + tristate "Enable i.MX USB glue driver" if EMBEDDED + depends on OF + default USB_CHIPIDEA + +config USB_CHIPIDEA_GENERIC + tristate "Enable generic USB2 glue driver" if EMBEDDED + default USB_CHIPIDEA + +config USB_CHIPIDEA_TEGRA + tristate "Enable Tegra UDC glue driver" if EMBEDDED + depends on OF + depends on USB_CHIPIDEA_UDC + default USB_CHIPIDEA + endif diff --git a/drivers/usb/chipidea/Makefile b/drivers/usb/chipidea/Makefile index 985663ba6e68..fae779a23866 100644 --- a/drivers/usb/chipidea/Makefile +++ b/drivers/usb/chipidea/Makefile @@ -8,10 +8,8 @@ ci_hdrc-$(CONFIG_USB_OTG_FSM) += otg_fsm.o # Glue/Bridge layers go here -obj-$(CONFIG_USB_CHIPIDEA) += ci_hdrc_usb2.o -obj-$(CONFIG_USB_CHIPIDEA) += ci_hdrc_msm.o - -obj-$(CONFIG_USB_CHIPIDEA_PCI) += ci_hdrc_pci.o - -obj-$(CONFIG_USB_CHIPIDEA_OF) += usbmisc_imx.o ci_hdrc_imx.o -obj-$(CONFIG_USB_CHIPIDEA_OF) += ci_hdrc_tegra.o +obj-$(CONFIG_USB_CHIPIDEA_GENERIC) += ci_hdrc_usb2.o +obj-$(CONFIG_USB_CHIPIDEA_MSM) += ci_hdrc_msm.o +obj-$(CONFIG_USB_CHIPIDEA_PCI) += ci_hdrc_pci.o +obj-$(CONFIG_USB_CHIPIDEA_IMX) += ci_hdrc_imx.o usbmisc_imx.o +obj-$(CONFIG_USB_CHIPIDEA_TEGRA) += ci_hdrc_tegra.o
Allow to cut down on driver size for embedded config. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> --- drivers/usb/chipidea/Kconfig | 37 ++++++++++++++++++++++++----------- drivers/usb/chipidea/Makefile | 12 +++++------- 2 files changed, 31 insertions(+), 18 deletions(-)