aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2013-02-06 08:28:48 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-02-06 14:40:13 -0500
commit36273356b21b212bce97eafd682d6bffe6aa112d (patch)
treebba60434db51b986672270dadad0021ce73a894d
parent5b9479e9f15d98ce7bc43eb39472a86e51cc2c27 (diff)
ARM: OMAP: devices: create device for usb part of control module
A seperate driver has been added to handle the usb part of control module. A device for the above driver is created here, using the register address information to be used by the driver for powering on the PHY and for writing to the mailbox. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--arch/arm/mach-omap2/devices.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 626f3ea3142f..b6cc233214d7 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -20,6 +20,7 @@
20#include <linux/pinctrl/machine.h> 20#include <linux/pinctrl/machine.h>
21#include <linux/platform_data/omap4-keypad.h> 21#include <linux/platform_data/omap4-keypad.h>
22#include <linux/platform_data/omap_ocp2scp.h> 22#include <linux/platform_data/omap_ocp2scp.h>
23#include <linux/usb/omap_control_usb.h>
23 24
24#include <asm/mach-types.h> 25#include <asm/mach-types.h>
25#include <asm/mach/map.h> 26#include <asm/mach/map.h>
@@ -254,6 +255,49 @@ static inline void omap_init_camera(void)
254#endif 255#endif
255} 256}
256 257
258#if IS_ENABLED(CONFIG_OMAP_CONTROL_USB)
259static struct omap_control_usb_platform_data omap4_control_usb_pdata = {
260 .type = 1,
261};
262
263struct resource omap4_control_usb_res[] = {
264 {
265 .name = "control_dev_conf",
266 .start = 0x4a002300,
267 .end = 0x4a002303,
268 .flags = IORESOURCE_MEM,
269 },
270 {
271 .name = "otghs_control",
272 .start = 0x4a00233c,
273 .end = 0x4a00233f,
274 .flags = IORESOURCE_MEM,
275 },
276};
277
278static struct platform_device omap4_control_usb = {
279 .name = "omap-control-usb",
280 .id = -1,
281 .dev = {
282 .platform_data = &omap4_control_usb_pdata,
283 },
284 .num_resources = 2,
285 .resource = omap4_control_usb_res,
286};
287
288static inline void __init omap_init_control_usb(void)
289{
290 if (!cpu_is_omap44xx())
291 return;
292
293 if (platform_device_register(&omap4_control_usb))
294 pr_err("Error registering omap_control_usb device\n");
295}
296
297#else
298static inline void omap_init_control_usb(void) { }
299#endif /* CONFIG_OMAP_CONTROL_USB */
300
257int __init omap4_keyboard_init(struct omap4_keypad_platform_data 301int __init omap4_keyboard_init(struct omap4_keypad_platform_data
258 *sdp4430_keypad_data, struct omap_board_data *bdata) 302 *sdp4430_keypad_data, struct omap_board_data *bdata)
259{ 303{
@@ -721,6 +765,7 @@ static int __init omap2_init_devices(void)
721 omap_init_mbox(); 765 omap_init_mbox();
722 /* If dtb is there, the devices will be created dynamically */ 766 /* If dtb is there, the devices will be created dynamically */
723 if (!of_have_populated_dt()) { 767 if (!of_have_populated_dt()) {
768 omap_init_control_usb();
724 omap_init_dmic(); 769 omap_init_dmic();
725 omap_init_mcpdm(); 770 omap_init_mcpdm();
726 omap_init_mcspi(); 771 omap_init_mcspi();