Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux...
[cascardo/linux.git] / arch / sh / kernel / cpu / sh4a / setup-sh7786.c
index c016c00..1656b8c 100644 (file)
@@ -29,6 +29,8 @@
 static struct plat_sci_port scif0_platform_data = {
        .mapbase        = 0xffea0000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
+       .scbrr_algo_id  = SCBRR_ALGO_1,
        .type           = PORT_SCIF,
        .irqs           = { 40, 41, 43, 42 },
 };
@@ -47,6 +49,8 @@ static struct platform_device scif0_device = {
 static struct plat_sci_port scif1_platform_data = {
        .mapbase        = 0xffeb0000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
+       .scbrr_algo_id  = SCBRR_ALGO_1,
        .type           = PORT_SCIF,
        .irqs           = { 44, 44, 44, 44 },
 };
@@ -62,6 +66,8 @@ static struct platform_device scif1_device = {
 static struct plat_sci_port scif2_platform_data = {
        .mapbase        = 0xffec0000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
+       .scbrr_algo_id  = SCBRR_ALGO_1,
        .type           = PORT_SCIF,
        .irqs           = { 50, 50, 50, 50 },
 };
@@ -77,6 +83,8 @@ static struct platform_device scif2_device = {
 static struct plat_sci_port scif3_platform_data = {
        .mapbase        = 0xffed0000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
+       .scbrr_algo_id  = SCBRR_ALGO_1,
        .type           = PORT_SCIF,
        .irqs           = { 51, 51, 51, 51 },
 };
@@ -92,6 +100,8 @@ static struct platform_device scif3_device = {
 static struct plat_sci_port scif4_platform_data = {
        .mapbase        = 0xffee0000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
+       .scbrr_algo_id  = SCBRR_ALGO_1,
        .type           = PORT_SCIF,
        .irqs           = { 52, 52, 52, 52 },
 };
@@ -107,6 +117,8 @@ static struct platform_device scif4_device = {
 static struct plat_sci_port scif5_platform_data = {
        .mapbase        = 0xffef0000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
+       .scbrr_algo_id  = SCBRR_ALGO_1,
        .type           = PORT_SCIF,
        .irqs           = { 53, 53, 53, 53 },
 };
@@ -522,10 +534,37 @@ static struct platform_device dma0_device = {
        },
 };
 
+#define USB_EHCI_START 0xffe70000
+#define USB_OHCI_START 0xffe70400
+
+static struct resource usb_ehci_resources[] = {
+       [0] = {
+               .start  = USB_EHCI_START,
+               .end    = USB_EHCI_START + 0x3ff,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = 77,
+               .end    = 77,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device usb_ehci_device = {
+       .name           = "sh_ehci",
+       .id             = -1,
+       .dev = {
+               .dma_mask               = &usb_ehci_device.dev.coherent_dma_mask,
+               .coherent_dma_mask      = DMA_BIT_MASK(32),
+       },
+       .num_resources  = ARRAY_SIZE(usb_ehci_resources),
+       .resource       = usb_ehci_resources,
+};
+
 static struct resource usb_ohci_resources[] = {
        [0] = {
-               .start  = 0xffe70400,
-               .end    = 0xffe704ff,
+               .start  = USB_OHCI_START,
+               .end    = USB_OHCI_START + 0x3ff,
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
@@ -535,12 +574,11 @@ static struct resource usb_ohci_resources[] = {
        },
 };
 
-static u64 usb_ohci_dma_mask = DMA_BIT_MASK(32);
 static struct platform_device usb_ohci_device = {
        .name           = "sh_ohci",
        .id             = -1,
        .dev = {
-               .dma_mask               = &usb_ohci_dma_mask,
+               .dma_mask               = &usb_ohci_device.dev.coherent_dma_mask,
                .coherent_dma_mask      = DMA_BIT_MASK(32),
        },
        .num_resources  = ARRAY_SIZE(usb_ohci_resources),
@@ -570,6 +608,7 @@ static struct platform_device *sh7786_early_devices[] __initdata = {
 
 static struct platform_device *sh7786_devices[] __initdata = {
        &dma0_device,
+       &usb_ehci_device,
        &usb_ohci_device,
 };