Ben Dooks | eca8655 | 2009-03-06 19:49:48 +0000 | [diff] [blame] | 1 | /* linux/arch/arm/plat-s3c/dev-usb.c |
| 2 | * |
| 3 | * Copyright 2008 Simtec Electronics |
| 4 | * Ben Dooks <ben@simtec.co.uk> |
| 5 | * http://armlinux.simtec.co.uk/ |
| 6 | * |
| 7 | * S3C series device definition for USB host |
| 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 | |
Tejun Heo | 5a0e3ad | 2010-03-24 17:04:11 +0900 | [diff] [blame] | 14 | #include <linux/gfp.h> |
Ben Dooks | eca8655 | 2009-03-06 19:49:48 +0000 | [diff] [blame] | 15 | #include <linux/kernel.h> |
| 16 | #include <linux/string.h> |
| 17 | #include <linux/platform_device.h> |
| 18 | |
| 19 | #include <mach/irqs.h> |
| 20 | #include <mach/map.h> |
| 21 | |
| 22 | #include <plat/devs.h> |
Ben Dooks | f126752 | 2010-01-13 14:59:46 +0900 | [diff] [blame] | 23 | #include <plat/usb-control.h> |
Ben Dooks | eca8655 | 2009-03-06 19:49:48 +0000 | [diff] [blame] | 24 | |
| 25 | static struct resource s3c_usb_resource[] = { |
| 26 | [0] = { |
Ben Dooks | e6a2a9c | 2009-03-06 19:51:50 +0000 | [diff] [blame] | 27 | .start = S3C_PA_USBHOST, |
| 28 | .end = S3C_PA_USBHOST + 0x100 - 1, |
Ben Dooks | eca8655 | 2009-03-06 19:49:48 +0000 | [diff] [blame] | 29 | .flags = IORESOURCE_MEM, |
| 30 | }, |
| 31 | [1] = { |
| 32 | .start = IRQ_USBH, |
| 33 | .end = IRQ_USBH, |
| 34 | .flags = IORESOURCE_IRQ, |
| 35 | } |
| 36 | }; |
| 37 | |
| 38 | static u64 s3c_device_usb_dmamask = 0xffffffffUL; |
| 39 | |
Ben Dooks | b813248 | 2009-11-23 00:13:39 +0000 | [diff] [blame] | 40 | struct platform_device s3c_device_ohci = { |
Ben Dooks | eca8655 | 2009-03-06 19:49:48 +0000 | [diff] [blame] | 41 | .name = "s3c2410-ohci", |
| 42 | .id = -1, |
| 43 | .num_resources = ARRAY_SIZE(s3c_usb_resource), |
| 44 | .resource = s3c_usb_resource, |
| 45 | .dev = { |
| 46 | .dma_mask = &s3c_device_usb_dmamask, |
| 47 | .coherent_dma_mask = 0xffffffffUL |
| 48 | } |
| 49 | }; |
| 50 | |
Ben Dooks | b813248 | 2009-11-23 00:13:39 +0000 | [diff] [blame] | 51 | EXPORT_SYMBOL(s3c_device_ohci); |
Ben Dooks | f126752 | 2010-01-13 14:59:46 +0900 | [diff] [blame] | 52 | |
| 53 | /** |
| 54 | * s3c_ohci_set_platdata - initialise OHCI device platform data |
| 55 | * @info: The platform data. |
| 56 | * |
| 57 | * This call copies the @info passed in and sets the device .platform_data |
| 58 | * field to that copy. The @info is copied so that the original can be marked |
| 59 | * __initdata. |
| 60 | */ |
| 61 | void __init s3c_ohci_set_platdata(struct s3c2410_hcd_info *info) |
| 62 | { |
Banajit Goswami | b19952a | 2011-07-21 01:11:48 +0900 | [diff] [blame] | 63 | s3c_set_platdata(info, sizeof(struct s3c2410_hcd_info), |
| 64 | &s3c_device_ohci); |
Ben Dooks | f126752 | 2010-01-13 14:59:46 +0900 | [diff] [blame] | 65 | } |