Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c330fd90 authored by Apelete Seketeli's avatar Apelete Seketeli Committed by Ralf Baechle
Browse files

MIPS: jz4740: update platform data for JZ4740 usb device controller



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: default avatarApelete Seketeli <apelete@seketeli.net>
Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarJohn Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/6265/
parent 14a17836
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -21,6 +21,7 @@


extern struct platform_device jz4740_usb_ohci_device;
extern struct platform_device jz4740_usb_ohci_device;
extern struct platform_device jz4740_udc_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_mmc_device;
extern struct platform_device jz4740_rtc_device;
extern struct platform_device jz4740_rtc_device;
extern struct platform_device jz4740_i2c_device;
extern struct platform_device jz4740_i2c_device;
+1 −0
Original line number Original line Diff line number Diff line
@@ -427,6 +427,7 @@ static struct platform_device qi_lb60_audio_device = {


static struct platform_device *jz_platform_devices[] __initdata = {
static struct platform_device *jz_platform_devices[] __initdata = {
	&jz4740_udc_device,
	&jz4740_udc_device,
	&jz4740_udc_xceiv_device,
	&jz4740_mmc_device,
	&jz4740_mmc_device,
	&jz4740_nand_device,
	&jz4740_nand_device,
	&qi_lb60_keypad,
	&qi_lb60_keypad,
+24 −16
Original line number Original line Diff line number Diff line
@@ -21,6 +21,8 @@


#include <linux/dma-mapping.h>
#include <linux/dma-mapping.h>


#include <linux/usb/musb.h>

#include <asm/mach-jz4740/platform.h>
#include <asm/mach-jz4740/platform.h>
#include <asm/mach-jz4740/base.h>
#include <asm/mach-jz4740/base.h>
#include <asm/mach-jz4740/irq.h>
#include <asm/mach-jz4740/irq.h>
@@ -56,29 +58,35 @@ struct platform_device jz4740_usb_ohci_device = {
	.resource	= jz4740_usb_ohci_resources,
	.resource	= jz4740_usb_ohci_resources,
};
};


/* UDC (USB gadget controller) */
/* USB Device Controller */
static struct resource jz4740_usb_gdt_resources[] = {
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,
		.start = JZ4740_UDC_BASE_ADDR,
		.end	= JZ4740_UDC_BASE_ADDR + 0x1000 - 1,
		.end   = JZ4740_UDC_BASE_ADDR + 0x10000 - 1,
		.flags = IORESOURCE_MEM,
		.flags = IORESOURCE_MEM,
	},
	},
	{
	[1] = {
		.start = JZ4740_IRQ_UDC,
		.start = JZ4740_IRQ_UDC,
		.end   = JZ4740_IRQ_UDC,
		.end   = JZ4740_IRQ_UDC,
		.flags = IORESOURCE_IRQ,
		.flags = IORESOURCE_IRQ,
		.name  = "mc",
	},
	},
};
};


struct platform_device jz4740_udc_device = {
struct platform_device jz4740_udc_device = {
	.name		= "jz-udc",
	.name = "musb-jz4740",
	.id   = -1,
	.id   = -1,
	.dev  = {
	.dev  = {
		.dma_mask          = &jz4740_udc_device.dev.coherent_dma_mask,
		.dma_mask          = &jz4740_udc_device.dev.coherent_dma_mask,
		.coherent_dma_mask = DMA_BIT_MASK(32),
		.coherent_dma_mask = DMA_BIT_MASK(32),
	},
	},
	.num_resources	= ARRAY_SIZE(jz4740_usb_gdt_resources),
	.num_resources = ARRAY_SIZE(jz4740_udc_resources),
	.resource	= jz4740_usb_gdt_resources,
	.resource      = jz4740_udc_resources,
};
};


/* MMC/SD controller */
/* MMC/SD controller */