Skip to content

Commit

Permalink
[ARM] 5512/1: Add w90p910 rtc,kpi and usbd device platform_device def…
Browse files Browse the repository at this point in the history
…ine.

Add rtc,kpi and usbd device platform_device define
in arch/arm/mach-w90x900/mach-w90p910evb.c.

Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
wanzongshun authored and Russell King committed May 18, 2009
1 parent 0351c50 commit e1baa01
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions arch/arm/mach-w90x900/mach-w90p910evb.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,76 @@ struct platform_device w90x900_device_ts = {
};
EXPORT_SYMBOL(w90x900_device_ts);

/* RTC controller*/

static struct resource w90x900_rtc_resource[] = {
[0] = {
.start = W90X900_PA_RTC,
.end = W90X900_PA_RTC + 0xff,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_RTC,
.end = IRQ_RTC,
.flags = IORESOURCE_IRQ,
},
};

struct platform_device w90x900_device_rtc = {
.name = "w90x900-rtc",
.id = -1,
.num_resources = ARRAY_SIZE(w90x900_rtc_resource),
.resource = w90x900_rtc_resource,
};
EXPORT_SYMBOL(w90x900_device_rtc);

/* KPI controller*/

static struct resource w90x900_kpi_resource[] = {
[0] = {
.start = W90X900_PA_KPI,
.end = W90X900_PA_KPI + W90X900_SZ_KPI - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_KPI,
.end = IRQ_KPI,
.flags = IORESOURCE_IRQ,
}

};

struct platform_device w90x900_device_kpi = {
.name = "w90x900-kpi",
.id = -1,
.num_resources = ARRAY_SIZE(w90x900_kpi_resource),
.resource = w90x900_kpi_resource,
};
EXPORT_SYMBOL(w90x900_device_kpi);

/* USB Device (Gadget)*/

static struct resource w90x900_usbgadget_resource[] = {
[0] = {
.start = W90X900_PA_USBDEV,
.end = W90X900_PA_USBDEV + W90X900_SZ_USBDEV - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
.start = IRQ_USBD,
.end = IRQ_USBD,
.flags = IORESOURCE_IRQ,
}
};

struct platform_device w90x900_device_usbgadget = {
.name = "w90x900-usbgadget",
.id = -1,
.num_resources = ARRAY_SIZE(w90x900_usbgadget_resource),
.resource = w90x900_usbgadget_resource,
};
EXPORT_SYMBOL(w90x900_device_usbgadget);

static struct map_desc w90p910_iodesc[] __initdata = {
};

Expand All @@ -169,6 +239,9 @@ static struct platform_device *w90p910evb_dev[] __initdata = {
&w90x900_device_usb_ehci,
&w90x900_device_usb_ohci,
&w90x900_device_ts,
&w90x900_device_rtc,
&w90x900_device_kpi,
&w90x900_device_usbgadget,
};

static void __init w90p910evb_map_io(void)
Expand Down

0 comments on commit e1baa01

Please sign in to comment.