Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e7109a96e6e2a1f7c4b778146902d86c4f558949
Commit:     e7109a96e6e2a1f7c4b778146902d86c4f558949
Parent:     fef96086270e8d3c99fb2bfc72eef94d95ab2240
Author:     Paul Mundt <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 8 15:27:55 2007 +0900
Committer:  Paul Mundt <[EMAIL PROTECTED]>
CommitDate: Fri Sep 21 11:57:48 2007 +0900

    sh: x3proto: Hook up ethernet and USB platform devices.
    
    Now that we have a way of enabling the IRQs, hook up the platform
    devices and wrap in to ILSEL for mapping the vectors.
    
    Signed-off-by: Paul Mundt <[EMAIL PROTECTED]>
---
 arch/sh/boards/renesas/x3proto/setup.c |   82 ++++++++++++++++++++++++++++++++
 1 files changed, 82 insertions(+), 0 deletions(-)

diff --git a/arch/sh/boards/renesas/x3proto/setup.c 
b/arch/sh/boards/renesas/x3proto/setup.c
index 5dfa0f3..0e26d3e 100644
--- a/arch/sh/boards/renesas/x3proto/setup.c
+++ b/arch/sh/boards/renesas/x3proto/setup.c
@@ -13,6 +13,7 @@
 #include <linux/platform_device.h>
 #include <linux/kernel.h>
 #include <linux/io.h>
+#include <asm/ilsel.h>
 
 static struct resource heartbeat_resources[] = {
        [0] = {
@@ -29,12 +30,93 @@ static struct platform_device heartbeat_device = {
        .resource       = heartbeat_resources,
 };
 
+static struct resource smc91x_resources[] = {
+       [0] = {
+               .start          = 0x18000300,
+               .end            = 0x18000300 + 0x10 - 1,
+               .flags          = IORESOURCE_MEM,
+       },
+       [1] = {
+               /* Filled in by ilsel */
+               .flags          = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device smc91x_device = {
+       .name           = "smc91x",
+       .id             = -1,
+       .resource       = smc91x_resources,
+       .num_resources  = ARRAY_SIZE(smc91x_resources),
+};
+
+static struct resource r8a66597_usb_host_resources[] = {
+       [0] = {
+               .name   = "r8a66597_hcd",
+               .start  = 0x18040000,
+               .end    = 0x18080000 - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .name   = "r8a66597_hcd",
+               /* Filled in by ilsel */
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device r8a66597_usb_host_device = {
+       .name           = "r8a66597_hcd",
+       .id             = -1,
+       .dev = {
+               .dma_mask               = NULL,         /* don't use dma */
+               .coherent_dma_mask      = 0xffffffff,
+       },
+       .num_resources  = ARRAY_SIZE(r8a66597_usb_host_resources),
+       .resource       = r8a66597_usb_host_resources,
+};
+
+static struct resource m66592_usb_peripheral_resources[] = {
+       [0] = {
+               .name   = "m66592_udc",
+               .start  = 0x18080000,
+               .end    = 0x180c0000 - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .name   = "m66592_udc",
+               /* Filled in by ilsel */
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device m66592_usb_peripheral_device = {
+       .name           = "m66592_udc",
+       .id             = -1,
+       .dev = {
+               .dma_mask               = NULL,         /* don't use dma */
+               .coherent_dma_mask      = 0xffffffff,
+       },
+       .num_resources  = ARRAY_SIZE(m66592_usb_peripheral_resources),
+       .resource       = m66592_usb_peripheral_resources,
+};
+
 static struct platform_device *x3proto_devices[] __initdata = {
        &heartbeat_device,
+       &smc91x_device,
+       &r8a66597_usb_host_device,
+       &m66592_usb_peripheral_device,
 };
 
 static int __init x3proto_devices_setup(void)
 {
+       r8a66597_usb_host_resources[1].start =
+               r8a66597_usb_host_resources[1].end = ilsel_enable(ILSEL_USBH_I);
+
+       m66592_usb_peripheral_resources[1].start =
+               m66592_usb_peripheral_resources[1].end = 
ilsel_enable(ILSEL_USBP_I);
+
+       smc91x_resources[1].start =
+               smc91x_resources[1].end = ilsel_enable(ILSEL_LAN);
+
        return platform_add_devices(x3proto_devices,
                                    ARRAY_SIZE(x3proto_devices));
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to