ARM: SAMSUNG: Changing the build condition of OTG platform device for samsung.
A message that is not in the archive (sent off-list or not yet received): [email protected]
RFC PATCH 2/5 ARM: SAMSUNG: Changing the build condition of OTG platform device for samsung.
Hi,
Quoted 64 lines · PRAVEEN PANERI
Hi,
Quoted 60 lines · p.paneri at samsung.com
From: Praveen Paneri
Adding dwc driver name in existing platform device
to probe DWC OTG driver.
Introducedotg_set_platdatafunction to pass platform data Added selectable config option to add DWC OTG driver for different machines.Signed-off-by Praveen Paneri---
??arch/arm/plat-samsung/Kconfig???????? |????6 ++++++ ??arch/arm/plat-samsung/Makefile????????|????1 + ??arch/arm/plat-samsung/dev-usb-hsotg.c |?? 20 ++++++++++++++++++++??3 files changed, 27 insertions(+), 0 deletions(-)
arch/arm/plat-samsung/Kconfig +0
-0@@ -227,6 +227,12 @@ config S3C_DEV_USB_HSOTG?? help
?? ??Compile in platform device definition for USB high-speed OtGarch/arm/plat-samsung/Kconfig +6
-0+config S3C_DEV_DWC_OTG + bool + help + ??Compile in platform device definition for DWC OTG. This + ??will make it selectable for different machines. +??config
S3C_DEV_WDT
?? bool
?? default y ifARCH_S3C2410arch/arm/plat-samsung/Makefile +0
-0@@ -49,6 +49,7 @@ obj-$(CONFIG_S3C_DEV_FB) += dev-fb.o??obj-y += dev-uart.o ??obj-$(CONFIG_S3C_DEV_USB_HOST) += dev-usb.o ??obj-$(CONFIG_S3C_DEV_USB_HSOTG) += dev-usb-hsotg.o +obj-$(CONFIG_S3C_DEV_DWC_OTG) += dev-usb-hsotg.o ??obj-$(CONFIG_S3C_DEV_WDT) += dev-wdt.o ??obj-$(CONFIG_S3C_DEV_NAND) += dev-nand.o ??obj-$(CONFIG_S3C_DEV_ONENAND) += dev-onenand.o
arch/arm/plat-samsung/dev-usb-hsotg.c +0
-0@@ -20,6 +20,8 @@??#include
??#include
arch/arm/plat-samsung/dev-usb-hsotg.c +2
-0+#include +#include??static struct resource s3c_usb_hsotg_resources[] = { ?? [0] = {
arch/arm/plat-samsung/dev-usb-hsotg.c +0
-0@@ -37,7 +39,12 @@ static struct resource s3c_usb_hsotg_resources[] = { ??static u64 s3c_hsotg_dmamask = DMA_BIT_MASK(32);
Quoted 11 lines
arch/arm/plat-samsung/dev-usb-hsotg.c static struct resource s3c_usb_hsotg_resources[] = { · line 47
Quoted 7 lines
arch/arm/plat-samsung/dev-usb-hsotg.c +5
-0??struct platform_device s3c_device_usb_hsotg = { +#ifdef CONFIG_S3C_DEV_USB_HSOTG ?? .name = "s3c-hsotg", +#endif +#ifdef CONFIG_S3C_DEV_DWC_OTG + .name ="dwc_otg" , +#endifno, don't do that. See we're going through a big re-factor on the gadget framework to allow multiple UDC drivers to be compiled as modules. The idea is to be able to have distro-like kernels for embedded too.
It can be build as a module but need to make necessary modifications in platform code. Will modify according to the gadget framework. Thanks for the comment.
paneri
Quoted 18 lines
Take a look at my gadget branch [1] and see how the gadget controllers are modified to start allowing that.
I also have patch to the
Kconfigallowing all controllers to be enabled as modules, I just need some more time to figure out one warning on the renenesas controller.IOW, it's best to add both platform devices. Or move to device tree.
--
balbi
RFC PATCH 2/5 ARM: SAMSUNG: Changing the build condition of OTG platform device for samsung.
Hi,
Quoted 14 lines · Praveen Paneri
Quoted 14 lines
Review static struct resource s3c_usb_hsotg_resources[] = { · line 47
Quoted 10 lines
(quoted diff) +5
-0@@ -37,7 +39,12 @@ static struct resource s3c_usb_hsotg_resources[] = { ??static u64 s3c_hsotg_dmamask = DMA_BIT_MASK(32); ??struct platform_device s3c_device_usb_hsotg = { +#ifdef CONFIG_S3C_DEV_USB_HSOTG ?? .name = "s3c-hsotg", +#endif +#ifdef CONFIG_S3C_DEV_DWC_OTG + .name = "dwc_otg", +#endifno, don't do that. See we're going through a big re-factor on the gadget framework to allow multiple UDC drivers to be compiled as modules. The idea is to be able to have distro-like kernels for embedded too.
Quoted 2 lines
It can be build as a module but need to make necessary modifications in platform code. Will modify according to the gadget framework.
can't you do runtime detection of which platform you're running on ? Then you add one or the other platform_device. But ifdeferry won't help you in the long run.
Signature · 8 lines
balbi -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 490 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110621/a1b1e70c/attachment.sig>