Release 4.11 arch/arm/mach-davinci/usb.c
/*
* USB
*/
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <linux/usb/musb.h>
#include <mach/common.h>
#include <mach/irqs.h>
#include <mach/cputype.h>
#include <linux/platform_data/usb-davinci.h>
#define DAVINCI_USB_OTG_BASE 0x01c64000
#if IS_ENABLED(CONFIG_USB_MUSB_HDRC)
static struct musb_hdrc_config musb_config = {
.multipoint = true,
.num_eps = 5,
.ram_bits = 10,
};
static struct musb_hdrc_platform_data usb_data = {
/* OTG requires a Mini-AB connector */
.mode = MUSB_OTG,
.clock = "usb",
.config = &musb_config,
};
static struct resource usb_resources[] = {
{
/* physical address */
.start = DAVINCI_USB_OTG_BASE,
.end = DAVINCI_USB_OTG_BASE + 0x5ff,
.flags = IORESOURCE_MEM,
},
{
.start = IRQ_USBINT,
.flags = IORESOURCE_IRQ,
.name = "mc"
},
{
/* placeholder for the dedicated CPPI IRQ */
.flags = IORESOURCE_IRQ,
.name = "dma"
},
};
static u64 usb_dmamask = DMA_BIT_MASK(32);
static struct platform_device usb_dev = {
.name = "musb-davinci",
.id = -1,
.dev = {
.platform_data = &usb_data,
.dma_mask = &usb_dmamask,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
.resource = usb_resources,
.num_resources = ARRAY_SIZE(usb_resources),
};
void __init davinci_setup_usb(unsigned mA, unsigned potpgt_ms)
{
usb_data.power = mA > 510 ? 255 : mA / 2;
usb_data.potpgt = (potpgt_ms + 1) / 2;
if (cpu_is_davinci_dm646x()) {
/* Override the defaults as DM6467 uses different IRQs. */
usb_dev.resource[1].start = IRQ_DM646X_USBINT;
usb_dev.resource[2].start = IRQ_DM646X_USBDMAINT;
} else /* other devices don't have dedicated CPPI IRQ */
usb_dev.num_resources = 2;
platform_device_register(&usb_dev);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Sergei Shtylyov | 51 | 62.20% | 2 | 66.67% |
David Brownell | 31 | 37.80% | 1 | 33.33% |
Total | 82 | 100.00% | 3 | 100.00% |
#else
void __init davinci_setup_usb(unsigned mA, unsigned potpgt_ms)
{
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
David Brownell | 9 | 81.82% | 1 | 50.00% |
Sergei Shtylyov | 2 | 18.18% | 1 | 50.00% |
Total | 11 | 100.00% | 2 | 100.00% |
#endif /* CONFIG_USB_MUSB_HDRC */
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
David Brownell | 210 | 69.54% | 3 | 25.00% |
Sergei Shtylyov | 66 | 21.85% | 3 | 25.00% |
Hema Kalliguddi | 12 | 3.97% | 1 | 8.33% |
Yang Hongyang | 8 | 2.65% | 1 | 8.33% |
Kevin Hilman | 3 | 0.99% | 1 | 8.33% |
Arnd Bergmann | 1 | 0.33% | 1 | 8.33% |
Felipe Balbi | 1 | 0.33% | 1 | 8.33% |
Lad Prabhakar | 1 | 0.33% | 1 | 8.33% |
Total | 302 | 100.00% | 12 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.