* [PATCH] Update platform data for JZ4740 usb device controller @ 2013-12-19 21:11 Apelete Seketeli 2013-12-19 21:11 ` [PATCH] arch: mips: update " Apelete Seketeli 0 siblings, 1 reply; 3+ messages in thread From: Apelete Seketeli @ 2013-12-19 21:11 UTC (permalink / raw) To: linux-mips; +Cc: linux-kernel, Ralf Baechle, Lars-Peter Clausen, Vinod Koul Hello, Following a few patches sent to the linux-usb mailing list to add USB support for the Ingenic JZ4740 MIPS SoC found in the Ben Nanonote, here is a patch that updates platform data for JZ4740 usb device controller. The patch that comes as a follow-up of this message was originally part of the patch set sent to linux-usb but was split out to separate arch/ from drivers/ files. Changes were rebased on top of Ralf Baechle's Linux MIPS master branch, built and tested on device successfully. The following changes since commit a9b7663: Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux are available in the git repository at: git://seketeli.fr/~apelete/linux-mips.git update-jz4740-arch Apelete Seketeli (1): arch: mips: update platform data for JZ4740 usb device controller arch/mips/include/asm/mach-jz4740/platform.h | 1 + arch/mips/jz4740/board-qi_lb60.c | 1 + arch/mips/jz4740/platform.c | 40 +++++++++++++++----------- 3 files changed, 26 insertions(+), 16 deletions(-) -- 1.7.10.4 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] arch: mips: update platform data for JZ4740 usb device controller 2013-12-19 21:11 [PATCH] Update platform data for JZ4740 usb device controller Apelete Seketeli @ 2013-12-19 21:11 ` Apelete Seketeli 2013-12-20 7:43 ` Lars-Peter Clausen 0 siblings, 1 reply; 3+ messages in thread From: Apelete Seketeli @ 2013-12-19 21:11 UTC (permalink / raw) To: linux-mips; +Cc: linux-kernel, Ralf Baechle, Lars-Peter Clausen, Vinod Koul The platform data already available in tree for JZ4740 USB Device Controller was previously used by an out-of-tree USB gadget driver which was not relying on the musb driver and was written by Ingenic and the Qi-Hardware community. Update platform data for JZ4740 USB device controller to be used with musb driver. Signed-off-by: Apelete Seketeli <apelete@seketeli.net> --- arch/mips/include/asm/mach-jz4740/platform.h | 1 + arch/mips/jz4740/board-qi_lb60.c | 1 + arch/mips/jz4740/platform.c | 40 +++++++++++++++----------- 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/arch/mips/include/asm/mach-jz4740/platform.h b/arch/mips/include/asm/mach-jz4740/platform.h index 05988c2..069b43a 100644 --- a/arch/mips/include/asm/mach-jz4740/platform.h +++ b/arch/mips/include/asm/mach-jz4740/platform.h @@ -21,6 +21,7 @@ extern struct platform_device jz4740_usb_ohci_device; extern struct platform_device jz4740_udc_device; +extern struct platform_device jz4740_udc_xceiv_device; extern struct platform_device jz4740_mmc_device; extern struct platform_device jz4740_rtc_device; extern struct platform_device jz4740_i2c_device; diff --git a/arch/mips/jz4740/board-qi_lb60.c b/arch/mips/jz4740/board-qi_lb60.c index 8a5ec0e..c01900e 100644 --- a/arch/mips/jz4740/board-qi_lb60.c +++ b/arch/mips/jz4740/board-qi_lb60.c @@ -427,6 +427,7 @@ static struct platform_device qi_lb60_audio_device = { static struct platform_device *jz_platform_devices[] __initdata = { &jz4740_udc_device, + &jz4740_udc_xceiv_device, &jz4740_mmc_device, &jz4740_nand_device, &qi_lb60_keypad, diff --git a/arch/mips/jz4740/platform.c b/arch/mips/jz4740/platform.c index df65677..1be41e2 100644 --- a/arch/mips/jz4740/platform.c +++ b/arch/mips/jz4740/platform.c @@ -21,6 +21,8 @@ #include <linux/dma-mapping.h> +#include <linux/usb/musb.h> + #include <asm/mach-jz4740/platform.h> #include <asm/mach-jz4740/base.h> #include <asm/mach-jz4740/irq.h> @@ -56,29 +58,35 @@ struct platform_device jz4740_usb_ohci_device = { .resource = jz4740_usb_ohci_resources, }; -/* UDC (USB gadget controller) */ -static struct resource jz4740_usb_gdt_resources[] = { - { - .start = JZ4740_UDC_BASE_ADDR, - .end = JZ4740_UDC_BASE_ADDR + 0x1000 - 1, - .flags = IORESOURCE_MEM, +/* USB Device Controller */ +struct platform_device jz4740_udc_xceiv_device = { + .name = "usb_phy_gen_xceiv", + .id = 0, +}; + +static struct resource jz4740_udc_resources[] = { + [0] = { + .start = JZ4740_UDC_BASE_ADDR, + .end = JZ4740_UDC_BASE_ADDR + 0x10000 - 1, + .flags = IORESOURCE_MEM, }, - { - .start = JZ4740_IRQ_UDC, - .end = JZ4740_IRQ_UDC, - .flags = IORESOURCE_IRQ, + [1] = { + .start = JZ4740_IRQ_UDC, + .end = JZ4740_IRQ_UDC, + .flags = IORESOURCE_IRQ, + .name = "mc", }, }; struct platform_device jz4740_udc_device = { - .name = "jz-udc", - .id = -1, - .dev = { - .dma_mask = &jz4740_udc_device.dev.coherent_dma_mask, + .name = "musb-jz4740", + .id = -1, + .dev = { + .dma_mask = &jz4740_udc_device.dev.coherent_dma_mask, .coherent_dma_mask = DMA_BIT_MASK(32), }, - .num_resources = ARRAY_SIZE(jz4740_usb_gdt_resources), - .resource = jz4740_usb_gdt_resources, + .num_resources = ARRAY_SIZE(jz4740_udc_resources), + .resource = jz4740_udc_resources, }; /* MMC/SD controller */ -- 1.7.10.4 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] arch: mips: update platform data for JZ4740 usb device controller 2013-12-19 21:11 ` [PATCH] arch: mips: update " Apelete Seketeli @ 2013-12-20 7:43 ` Lars-Peter Clausen 0 siblings, 0 replies; 3+ messages in thread From: Lars-Peter Clausen @ 2013-12-20 7:43 UTC (permalink / raw) To: Apelete Seketeli; +Cc: linux-mips, linux-kernel, Ralf Baechle On 12/19/2013 10:11 PM, Apelete Seketeli wrote: > The platform data already available in tree for JZ4740 USB Device > Controller was previously used by an out-of-tree USB gadget driver > which was not relying on the musb driver and was written by Ingenic > and the Qi-Hardware community. > > Update platform data for JZ4740 USB device controller to be used with > musb driver. > > Signed-off-by: Apelete Seketeli <apelete@seketeli.net> Acked-by: Lars-Peter Clausen <lars@metafoo.de> > --- > arch/mips/include/asm/mach-jz4740/platform.h | 1 + > arch/mips/jz4740/board-qi_lb60.c | 1 + > arch/mips/jz4740/platform.c | 40 +++++++++++++++----------- > 3 files changed, 26 insertions(+), 16 deletions(-) > > diff --git a/arch/mips/include/asm/mach-jz4740/platform.h b/arch/mips/include/asm/mach-jz4740/platform.h > index 05988c2..069b43a 100644 > --- a/arch/mips/include/asm/mach-jz4740/platform.h > +++ b/arch/mips/include/asm/mach-jz4740/platform.h > @@ -21,6 +21,7 @@ > > extern struct platform_device jz4740_usb_ohci_device; > extern struct platform_device jz4740_udc_device; > +extern struct platform_device jz4740_udc_xceiv_device; > extern struct platform_device jz4740_mmc_device; > extern struct platform_device jz4740_rtc_device; > extern struct platform_device jz4740_i2c_device; > diff --git a/arch/mips/jz4740/board-qi_lb60.c b/arch/mips/jz4740/board-qi_lb60.c > index 8a5ec0e..c01900e 100644 > --- a/arch/mips/jz4740/board-qi_lb60.c > +++ b/arch/mips/jz4740/board-qi_lb60.c > @@ -427,6 +427,7 @@ static struct platform_device qi_lb60_audio_device = { > > static struct platform_device *jz_platform_devices[] __initdata = { > &jz4740_udc_device, > + &jz4740_udc_xceiv_device, > &jz4740_mmc_device, > &jz4740_nand_device, > &qi_lb60_keypad, > diff --git a/arch/mips/jz4740/platform.c b/arch/mips/jz4740/platform.c > index df65677..1be41e2 100644 > --- a/arch/mips/jz4740/platform.c > +++ b/arch/mips/jz4740/platform.c > @@ -21,6 +21,8 @@ > > #include <linux/dma-mapping.h> > > +#include <linux/usb/musb.h> > + > #include <asm/mach-jz4740/platform.h> > #include <asm/mach-jz4740/base.h> > #include <asm/mach-jz4740/irq.h> > @@ -56,29 +58,35 @@ struct platform_device jz4740_usb_ohci_device = { > .resource = jz4740_usb_ohci_resources, > }; > > -/* UDC (USB gadget controller) */ > -static struct resource jz4740_usb_gdt_resources[] = { > - { > - .start = JZ4740_UDC_BASE_ADDR, > - .end = JZ4740_UDC_BASE_ADDR + 0x1000 - 1, > - .flags = IORESOURCE_MEM, > +/* USB Device Controller */ > +struct platform_device jz4740_udc_xceiv_device = { > + .name = "usb_phy_gen_xceiv", > + .id = 0, > +}; > + > +static struct resource jz4740_udc_resources[] = { > + [0] = { > + .start = JZ4740_UDC_BASE_ADDR, > + .end = JZ4740_UDC_BASE_ADDR + 0x10000 - 1, > + .flags = IORESOURCE_MEM, > }, > - { > - .start = JZ4740_IRQ_UDC, > - .end = JZ4740_IRQ_UDC, > - .flags = IORESOURCE_IRQ, > + [1] = { > + .start = JZ4740_IRQ_UDC, > + .end = JZ4740_IRQ_UDC, > + .flags = IORESOURCE_IRQ, > + .name = "mc", > }, > }; > > struct platform_device jz4740_udc_device = { > - .name = "jz-udc", > - .id = -1, > - .dev = { > - .dma_mask = &jz4740_udc_device.dev.coherent_dma_mask, > + .name = "musb-jz4740", > + .id = -1, > + .dev = { > + .dma_mask = &jz4740_udc_device.dev.coherent_dma_mask, > .coherent_dma_mask = DMA_BIT_MASK(32), > }, > - .num_resources = ARRAY_SIZE(jz4740_usb_gdt_resources), > - .resource = jz4740_usb_gdt_resources, > + .num_resources = ARRAY_SIZE(jz4740_udc_resources), > + .resource = jz4740_udc_resources, > }; > > /* MMC/SD controller */ > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-20 8:42 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-12-19 21:11 [PATCH] Update platform data for JZ4740 usb device controller Apelete Seketeli 2013-12-19 21:11 ` [PATCH] arch: mips: update " Apelete Seketeli 2013-12-20 7:43 ` Lars-Peter Clausen
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.