summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2013-10-17 17:34:56 +0900
committerTom Rini <trini@ti.com>2013-10-31 13:25:38 -0400
commit44e32c7144883ed56d449dec169ad916af85479d (patch)
tree934b637173b32cc338d152c1d02392e177acb034 /drivers
parent2fc7ef6196d955f3a708ff60d0e549fb0ff6e431 (diff)
drivers: usb: convert makefiles to Kbuild style
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/eth/Makefile28
-rw-r--r--drivers/usb/gadget/Makefile60
-rw-r--r--drivers/usb/host/Makefile80
-rw-r--r--drivers/usb/musb-new/Makefile35
-rw-r--r--drivers/usb/musb/Makefile36
-rw-r--r--drivers/usb/phy/Makefile26
-rw-r--r--drivers/usb/ulpi/Makefile28
7 files changed, 69 insertions, 224 deletions
diff --git a/drivers/usb/eth/Makefile b/drivers/usb/eth/Makefile
index 04a8b58c891..03f54749f72 100644
--- a/drivers/usb/eth/Makefile
+++ b/drivers/usb/eth/Makefile
@@ -3,31 +3,9 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB := $(obj)libusb_eth.o
-
# new USB host ethernet layer dependencies
-COBJS-$(CONFIG_USB_HOST_ETHER) += usb_ether.o
+obj-$(CONFIG_USB_HOST_ETHER) += usb_ether.o
ifdef CONFIG_USB_ETHER_ASIX
-COBJS-y += asix.o
+obj-y += asix.o
endif
-COBJS-$(CONFIG_USB_ETHER_SMSC95XX) += smsc95xx.o
-
-COBJS := $(COBJS-y)
-SRCS := $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-
-all: $(LIB)
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-$(CONFIG_USB_ETHER_SMSC95XX) += smsc95xx.o
diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
index afaf5ce872f..f52d3f45003 100644
--- a/drivers/usb/gadget/Makefile
+++ b/drivers/usb/gadget/Makefile
@@ -5,59 +5,37 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB := $(obj)libusb_gadget.o
-
# if defined(CONFIG_USB_GADGET) || defined(CONFIG_USB_ETHER)
# Everytime you forget how crufty makefiles can get things like
# this remind you...
ifneq (,$(CONFIG_USB_GADGET)$(CONFIG_USB_ETHER))
-COBJS-y += epautoconf.o config.o usbstring.o
+obj-y += epautoconf.o config.o usbstring.o
endif
# new USB gadget layer dependencies
ifdef CONFIG_USB_GADGET
-COBJS-$(CONFIG_USB_GADGET_ATMEL_USBA) += atmel_usba_udc.o
-COBJS-$(CONFIG_USB_GADGET_S3C_UDC_OTG) += s3c_udc_otg.o
-COBJS-$(CONFIG_USB_GADGET_FOTG210) += fotg210.o
-COBJS-$(CONFIG_THOR_FUNCTION) += f_thor.o
-COBJS-$(CONFIG_USBDOWNLOAD_GADGET) += g_dnl.o
-COBJS-$(CONFIG_DFU_FUNCTION) += f_dfu.o
-COBJS-$(CONFIG_USB_GADGET_MASS_STORAGE) += f_mass_storage.o
+obj-$(CONFIG_USB_GADGET_ATMEL_USBA) += atmel_usba_udc.o
+obj-$(CONFIG_USB_GADGET_S3C_UDC_OTG) += s3c_udc_otg.o
+obj-$(CONFIG_USB_GADGET_FOTG210) += fotg210.o
+obj-$(CONFIG_THOR_FUNCTION) += f_thor.o
+obj-$(CONFIG_USBDOWNLOAD_GADGET) += g_dnl.o
+obj-$(CONFIG_DFU_FUNCTION) += f_dfu.o
+obj-$(CONFIG_USB_GADGET_MASS_STORAGE) += f_mass_storage.o
endif
ifdef CONFIG_USB_ETHER
-COBJS-y += ether.o
-COBJS-$(CONFIG_USB_ETH_RNDIS) += rndis.o
-COBJS-$(CONFIG_MV_UDC) += mv_udc.o
-COBJS-$(CONFIG_CPU_PXA25X) += pxa25x_udc.o
+obj-y += ether.o
+obj-$(CONFIG_USB_ETH_RNDIS) += rndis.o
+obj-$(CONFIG_MV_UDC) += mv_udc.o
+obj-$(CONFIG_CPU_PXA25X) += pxa25x_udc.o
else
# Devices not related to the new gadget layer depend on CONFIG_USB_DEVICE
ifdef CONFIG_USB_DEVICE
-COBJS-y += core.o
-COBJS-y += ep0.o
-COBJS-$(CONFIG_DW_UDC) += designware_udc.o
-COBJS-$(CONFIG_OMAP1510) += omap1510_udc.o
-COBJS-$(CONFIG_OMAP1610) += omap1510_udc.o
-COBJS-$(CONFIG_MPC885_FAMILY) += mpc8xx_udc.o
-COBJS-$(CONFIG_CPU_PXA27X) += pxa27x_udc.o
+obj-y += core.o
+obj-y += ep0.o
+obj-$(CONFIG_DW_UDC) += designware_udc.o
+obj-$(CONFIG_OMAP1510) += omap1510_udc.o
+obj-$(CONFIG_OMAP1610) += omap1510_udc.o
+obj-$(CONFIG_MPC885_FAMILY) += mpc8xx_udc.o
+obj-$(CONFIG_CPU_PXA27X) += pxa27x_udc.o
endif
endif
-
-COBJS := $(COBJS-y)
-SRCS := $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-
-all: $(LIB)
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile
index 328752ccdbe..14170282dbb 100644
--- a/drivers/usb/host/Makefile
+++ b/drivers/usb/host/Makefile
@@ -5,62 +5,40 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB := $(obj)libusb_host.o
-
# ohci
-COBJS-$(CONFIG_USB_OHCI_NEW) += ohci-hcd.o
-COBJS-$(CONFIG_USB_ATMEL) += ohci-at91.o
-COBJS-$(CONFIG_USB_OHCI_DA8XX) += ohci-da8xx.o
-COBJS-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o
-COBJS-$(CONFIG_USB_R8A66597_HCD) += r8a66597-hcd.o
-COBJS-$(CONFIG_USB_SL811HS) += sl811-hcd.o
-COBJS-$(CONFIG_USB_OHCI_S3C24XX) += ohci-s3c24xx.o
+obj-$(CONFIG_USB_OHCI_NEW) += ohci-hcd.o
+obj-$(CONFIG_USB_ATMEL) += ohci-at91.o
+obj-$(CONFIG_USB_OHCI_DA8XX) += ohci-da8xx.o
+obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o
+obj-$(CONFIG_USB_R8A66597_HCD) += r8a66597-hcd.o
+obj-$(CONFIG_USB_SL811HS) += sl811-hcd.o
+obj-$(CONFIG_USB_OHCI_S3C24XX) += ohci-s3c24xx.o
# echi
-COBJS-$(CONFIG_USB_EHCI) += ehci-hcd.o
-COBJS-$(CONFIG_USB_EHCI_ARMADA100) += ehci-armada100.o utmi-armada100.o
-COBJS-$(CONFIG_USB_EHCI_ATMEL) += ehci-atmel.o
+obj-$(CONFIG_USB_EHCI) += ehci-hcd.o
+obj-$(CONFIG_USB_EHCI_ARMADA100) += ehci-armada100.o utmi-armada100.o
+obj-$(CONFIG_USB_EHCI_ATMEL) += ehci-atmel.o
ifdef CONFIG_MPC512X
-COBJS-$(CONFIG_USB_EHCI_FSL) += ehci-mpc512x.o
+obj-$(CONFIG_USB_EHCI_FSL) += ehci-mpc512x.o
else
-COBJS-$(CONFIG_USB_EHCI_FSL) += ehci-fsl.o
+obj-$(CONFIG_USB_EHCI_FSL) += ehci-fsl.o
endif
-COBJS-$(CONFIG_USB_EHCI_FARADAY) += ehci-faraday.o
-COBJS-$(CONFIG_USB_EHCI_EXYNOS) += ehci-exynos.o
-COBJS-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o
-COBJS-$(CONFIG_USB_EHCI_MXS) += ehci-mxs.o
-COBJS-$(CONFIG_USB_EHCI_MX5) += ehci-mx5.o
-COBJS-$(CONFIG_USB_EHCI_MX6) += ehci-mx6.o
-COBJS-$(CONFIG_USB_EHCI_OMAP) += ehci-omap.o
-COBJS-$(CONFIG_USB_EHCI_PPC4XX) += ehci-ppc4xx.o
-COBJS-$(CONFIG_USB_EHCI_IXP4XX) += ehci-ixp.o
-COBJS-$(CONFIG_USB_EHCI_MARVELL) += ehci-marvell.o
-COBJS-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o
-COBJS-$(CONFIG_USB_EHCI_SPEAR) += ehci-spear.o
-COBJS-$(CONFIG_USB_EHCI_TEGRA) += ehci-tegra.o
-COBJS-$(CONFIG_USB_EHCI_VCT) += ehci-vct.o
+obj-$(CONFIG_USB_EHCI_FARADAY) += ehci-faraday.o
+obj-$(CONFIG_USB_EHCI_EXYNOS) += ehci-exynos.o
+obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o
+obj-$(CONFIG_USB_EHCI_MXS) += ehci-mxs.o
+obj-$(CONFIG_USB_EHCI_MX5) += ehci-mx5.o
+obj-$(CONFIG_USB_EHCI_MX6) += ehci-mx6.o
+obj-$(CONFIG_USB_EHCI_OMAP) += ehci-omap.o
+obj-$(CONFIG_USB_EHCI_PPC4XX) += ehci-ppc4xx.o
+obj-$(CONFIG_USB_EHCI_IXP4XX) += ehci-ixp.o
+obj-$(CONFIG_USB_EHCI_MARVELL) += ehci-marvell.o
+obj-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o
+obj-$(CONFIG_USB_EHCI_SPEAR) += ehci-spear.o
+obj-$(CONFIG_USB_EHCI_TEGRA) += ehci-tegra.o
+obj-$(CONFIG_USB_EHCI_VCT) += ehci-vct.o
# xhci
-COBJS-$(CONFIG_USB_XHCI) += xhci.o xhci-mem.o xhci-ring.o
-COBJS-$(CONFIG_USB_XHCI_EXYNOS) += xhci-exynos5.o
-COBJS-$(CONFIG_USB_XHCI_OMAP) += xhci-omap.o
-
-COBJS := $(COBJS-y)
-SRCS := $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-
-all: $(LIB)
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-$(CONFIG_USB_XHCI) += xhci.o xhci-mem.o xhci-ring.o
+obj-$(CONFIG_USB_XHCI_EXYNOS) += xhci-exynos5.o
+obj-$(CONFIG_USB_XHCI_OMAP) += xhci-omap.o
diff --git a/drivers/usb/musb-new/Makefile b/drivers/usb/musb-new/Makefile
index 626af3e8cd2..ba72348b76a 100644
--- a/drivers/usb/musb-new/Makefile
+++ b/drivers/usb/musb-new/Makefile
@@ -2,37 +2,14 @@
# for USB OTG silicon based on Mentor Graphics INVENTRA designs
#
-include $(TOPDIR)/config.mk
-
-LIB := $(obj)libusb_musb-new.o
-
-COBJS-$(CONFIG_MUSB_GADGET) += musb_gadget.o musb_gadget_ep0.o musb_core.o
-COBJS-$(CONFIG_MUSB_GADGET) += musb_uboot.o
-COBJS-$(CONFIG_MUSB_HOST) += musb_host.o musb_core.o musb_uboot.o
-COBJS-$(CONFIG_USB_MUSB_DSPS) += musb_dsps.o
-COBJS-$(CONFIG_USB_MUSB_AM35X) += am35x.o
-COBJS-$(CONFIG_USB_MUSB_OMAP2PLUS) += omap2430.o
+obj-$(CONFIG_MUSB_GADGET) += musb_gadget.o musb_gadget_ep0.o musb_core.o
+obj-$(CONFIG_MUSB_GADGET) += musb_uboot.o
+obj-$(CONFIG_MUSB_HOST) += musb_host.o musb_core.o musb_uboot.o
+obj-$(CONFIG_USB_MUSB_DSPS) += musb_dsps.o
+obj-$(CONFIG_USB_MUSB_AM35X) += am35x.o
+obj-$(CONFIG_USB_MUSB_OMAP2PLUS) += omap2430.o
CFLAGS_NO_WARN := $(call cc-option,-Wno-unused-variable) \
$(call cc-option,-Wno-unused-but-set-variable) \
$(call cc-option,-Wno-unused-label)
CFLAGS += $(CFLAGS_NO_WARN)
-
-COBJS := $(sort $(COBJS-y))
-SRCS := $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-
-all: $(LIB)
-
-#$(LIB): $(OBJS)
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
diff --git a/drivers/usb/musb/Makefile b/drivers/usb/musb/Makefile
index aa2126dcb01..3c9ed98bc04 100644
--- a/drivers/usb/musb/Makefile
+++ b/drivers/usb/musb/Makefile
@@ -5,32 +5,10 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB := $(obj)libusb_musb.o
-
-COBJS-$(CONFIG_MUSB_HCD) += musb_hcd.o musb_core.o
-COBJS-$(CONFIG_MUSB_UDC) += musb_udc.o musb_core.o
-COBJS-$(CONFIG_USB_BLACKFIN) += blackfin_usb.o
-COBJS-$(CONFIG_USB_DAVINCI) += davinci.o
-COBJS-$(CONFIG_USB_OMAP3) += omap3.o
-COBJS-$(CONFIG_USB_DA8XX) += da8xx.o
-COBJS-$(CONFIG_USB_AM35X) += am35x.o
-
-COBJS := $(COBJS-y)
-SRCS := $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-
-all: $(LIB)
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-$(CONFIG_MUSB_HCD) += musb_hcd.o musb_core.o
+obj-$(CONFIG_MUSB_UDC) += musb_udc.o musb_core.o
+obj-$(CONFIG_USB_BLACKFIN) += blackfin_usb.o
+obj-$(CONFIG_USB_DAVINCI) += davinci.o
+obj-$(CONFIG_USB_OMAP3) += omap3.o
+obj-$(CONFIG_USB_DA8XX) += da8xx.o
+obj-$(CONFIG_USB_AM35X) += am35x.o
diff --git a/drivers/usb/phy/Makefile b/drivers/usb/phy/Makefile
index 5beec7854ce..93d147e26f1 100644
--- a/drivers/usb/phy/Makefile
+++ b/drivers/usb/phy/Makefile
@@ -5,27 +5,5 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB := $(obj)libusb_phy.o
-
-COBJS-$(CONFIG_TWL4030_USB) += twl4030.o
-COBJS-$(CONFIG_OMAP_USB_PHY) += omap_usb_phy.o
-
-COBJS := $(COBJS-y)
-SRCS := $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-
-all: $(LIB)
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-$(CONFIG_TWL4030_USB) += twl4030.o
+obj-$(CONFIG_OMAP_USB_PHY) += omap_usb_phy.o
diff --git a/drivers/usb/ulpi/Makefile b/drivers/usb/ulpi/Makefile
index ba5a1ab5bf6..a21fe2c936e 100644
--- a/drivers/usb/ulpi/Makefile
+++ b/drivers/usb/ulpi/Makefile
@@ -4,28 +4,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
-include $(TOPDIR)/config.mk
-
-LIB := $(obj)libusb_ulpi.o
-
-COBJS-$(CONFIG_USB_ULPI) += ulpi.o
-COBJS-$(CONFIG_USB_ULPI_VIEWPORT) += ulpi-viewport.o
-COBJS-$(CONFIG_USB_ULPI_VIEWPORT_OMAP) += omap-ulpi-viewport.o
-
-COBJS := $(COBJS-y)
-SRCS := $(COBJS:.o=.c)
-OBJS := $(addprefix $(obj),$(COBJS))
-
-all: $(LIB)
-
-$(LIB): $(obj).depend $(OBJS)
- $(call cmd_link_o_target, $(OBJS))
-
-#########################################################################
-
-# defines $(obj).depend target
-include $(SRCTREE)/rules.mk
-
-sinclude $(obj).depend
-
-#########################################################################
+obj-$(CONFIG_USB_ULPI) += ulpi.o
+obj-$(CONFIG_USB_ULPI_VIEWPORT) += ulpi-viewport.o
+obj-$(CONFIG_USB_ULPI_VIEWPORT_OMAP) += omap-ulpi-viewport.o