aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2010-01-19 04:36:09 -0500
committerBen Dooks <ben-linux@fluff.org>2010-01-19 04:36:09 -0500
commit668dfc7527eb755e1bf194bf19c0c281e9df6deb (patch)
tree2d9ba8e3ebbb7579f1af0493a9783f640ca86546 /arch/arm/plat-samsung
parent9e157144afe81052f5abe122c2469e33a30d20a5 (diff)
parent22c810ab3e25d16e6f128384d107b933b6fd8fff (diff)
ARM: Merge next-samsung-devupdates1
Merge branch 'next-samsung-devupdates1' into next-samsung-try7
Diffstat (limited to 'arch/arm/plat-samsung')
-rw-r--r--arch/arm/plat-samsung/Makefile1
-rw-r--r--arch/arm/plat-samsung/dev-uart.c44
-rw-r--r--arch/arm/plat-samsung/dev-usb.c25
3 files changed, 67 insertions, 3 deletions
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index ee310384b90f..ceac416d80b8 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/plat-samsung/Makefile
@@ -32,6 +32,7 @@ obj-$(CONFIG_S3C_DEV_HSMMC2) += dev-hsmmc2.o
32obj-y += dev-i2c0.o 32obj-y += dev-i2c0.o
33obj-$(CONFIG_S3C_DEV_I2C1) += dev-i2c1.o 33obj-$(CONFIG_S3C_DEV_I2C1) += dev-i2c1.o
34obj-$(CONFIG_S3C_DEV_FB) += dev-fb.o 34obj-$(CONFIG_S3C_DEV_FB) += dev-fb.o
35obj-y += dev-uart.o
35obj-$(CONFIG_S3C_DEV_USB_HOST) += dev-usb.o 36obj-$(CONFIG_S3C_DEV_USB_HOST) += dev-usb.o
36obj-$(CONFIG_S3C_DEV_USB_HSOTG) += dev-usb-hsotg.o 37obj-$(CONFIG_S3C_DEV_USB_HSOTG) += dev-usb-hsotg.o
37obj-$(CONFIG_S3C_DEV_NAND) += dev-nand.o 38obj-$(CONFIG_S3C_DEV_NAND) += dev-nand.o
diff --git a/arch/arm/plat-samsung/dev-uart.c b/arch/arm/plat-samsung/dev-uart.c
new file mode 100644
index 000000000000..3776cd952450
--- /dev/null
+++ b/arch/arm/plat-samsung/dev-uart.c
@@ -0,0 +1,44 @@
1/* linux/arch/arm/plat-samsung/dev-uart.c
2 * originally from arch/arm/plat-s3c24xx/devs.c
3 *x
4 * Copyright (c) 2004 Simtec Electronics
5 * Ben Dooks <ben@simtec.co.uk>
6 *
7 * Base S3C24XX platform device definitions
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 *
13*/
14
15#include <linux/kernel.h>
16#include <linux/platform_device.h>
17
18/* uart devices */
19
20static struct platform_device s3c24xx_uart_device0 = {
21 .id = 0,
22};
23
24static struct platform_device s3c24xx_uart_device1 = {
25 .id = 1,
26};
27
28static struct platform_device s3c24xx_uart_device2 = {
29 .id = 2,
30};
31
32static struct platform_device s3c24xx_uart_device3 = {
33 .id = 3,
34};
35
36struct platform_device *s3c24xx_uart_src[4] = {
37 &s3c24xx_uart_device0,
38 &s3c24xx_uart_device1,
39 &s3c24xx_uart_device2,
40 &s3c24xx_uart_device3,
41};
42
43struct platform_device *s3c24xx_uart_devs[4] = {
44};
diff --git a/arch/arm/plat-samsung/dev-usb.c b/arch/arm/plat-samsung/dev-usb.c
index 2ee85abed6d9..88165657fa53 100644
--- a/arch/arm/plat-samsung/dev-usb.c
+++ b/arch/arm/plat-samsung/dev-usb.c
@@ -19,7 +19,7 @@
19#include <mach/map.h> 19#include <mach/map.h>
20 20
21#include <plat/devs.h> 21#include <plat/devs.h>
22 22#include <plat/usb-control.h>
23 23
24static struct resource s3c_usb_resource[] = { 24static struct resource s3c_usb_resource[] = {
25 [0] = { 25 [0] = {
@@ -36,7 +36,7 @@ static struct resource s3c_usb_resource[] = {
36 36
37static u64 s3c_device_usb_dmamask = 0xffffffffUL; 37static u64 s3c_device_usb_dmamask = 0xffffffffUL;
38 38
39struct platform_device s3c_device_usb = { 39struct platform_device s3c_device_ohci = {
40 .name = "s3c2410-ohci", 40 .name = "s3c2410-ohci",
41 .id = -1, 41 .id = -1,
42 .num_resources = ARRAY_SIZE(s3c_usb_resource), 42 .num_resources = ARRAY_SIZE(s3c_usb_resource),
@@ -47,4 +47,23 @@ struct platform_device s3c_device_usb = {
47 } 47 }
48}; 48};
49 49
50EXPORT_SYMBOL(s3c_device_usb); 50EXPORT_SYMBOL(s3c_device_ohci);
51
52/**
53 * s3c_ohci_set_platdata - initialise OHCI device platform data
54 * @info: The platform data.
55 *
56 * This call copies the @info passed in and sets the device .platform_data
57 * field to that copy. The @info is copied so that the original can be marked
58 * __initdata.
59 */
60void __init s3c_ohci_set_platdata(struct s3c2410_hcd_info *info)
61{
62 struct s3c2410_hcd_info *npd;
63
64 npd = kmemdup(info, sizeof(struct s3c2410_hcd_info), GFP_KERNEL);
65 if (!npd)
66 printk(KERN_ERR "%s: no memory for platform data\n", __func__);
67
68 s3c_device_ohci.dev.platform_data = npd;
69}