Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 303428
b: refs/heads/master
c: 673eef9
h: refs/heads/master
v: v3
  • Loading branch information
Neil Zhang authored and Haojian Zhuang committed May 3, 2012
1 parent cab3e3f commit cec9ea9
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 75b1bdf51c4b5c383296de2df9ad83b1b8dd287f
refs/heads/master: 673eef981436ffb015f491e2c58b83b2015ed878
37 changes: 37 additions & 0 deletions trunk/arch/arm/mach-mmp/ttc_dkb.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/interrupt.h>
#include <linux/i2c/pca953x.h>
#include <linux/gpio.h>
#include <linux/platform_data/mv_usb.h>

#include <asm/mach-types.h>
#include <asm/mach/arch.h>
Expand All @@ -25,6 +26,7 @@
#include <mach/mfp-pxa910.h>
#include <mach/pxa910.h>
#include <mach/irqs.h>
#include <mach/regs-usb.h>

#include "common.h"

Expand Down Expand Up @@ -144,6 +146,26 @@ static struct i2c_board_info ttc_dkb_i2c_info[] = {
},
};

#ifdef CONFIG_USB_SUPPORT
#if defined(CONFIG_USB_MV_UDC) || defined(CONFIG_USB_EHCI_MV_U2O)

static char *pxa910_usb_clock_name[] = {
[0] = "U2OCLK",
};

static struct mv_usb_platform_data ttc_usb_pdata = {
.clknum = 1,
.clkname = pxa910_usb_clock_name,
.vbus = NULL,
.mode = MV_USB_MODE_OTG,
.otg_force_a_bus_req = 1,
.phy_init = pxa_usb_phy_init,
.phy_deinit = pxa_usb_phy_deinit,
.set_vbus = NULL,
};
#endif
#endif

static void __init ttc_dkb_init(void)
{
mfp_config(ARRAY_AND_SIZE(ttc_dkb_pin_config));
Expand All @@ -154,6 +176,21 @@ static void __init ttc_dkb_init(void)
/* off-chip devices */
pxa910_add_twsi(0, NULL, ARRAY_AND_SIZE(ttc_dkb_i2c_info));
platform_add_devices(ARRAY_AND_SIZE(ttc_dkb_devices));

#ifdef CONFIG_USB_MV_UDC
pxa168_device_u2o.dev.platform_data = &ttc_usb_pdata;
platform_device_register(&pxa168_device_u2o);
#endif

#ifdef CONFIG_USB_EHCI_MV_U2O
pxa168_device_u2oehci.dev.platform_data = &ttc_usb_pdata;
platform_device_register(&pxa168_device_u2oehci);
#endif

#ifdef CONFIG_USB_MV_OTG
pxa168_device_u2ootg.dev.platform_data = &ttc_usb_pdata;
platform_device_register(&pxa168_device_u2ootg);
#endif
}

MACHINE_START(TTC_DKB, "PXA910-based TTC_DKB Development Platform")
Expand Down

0 comments on commit cec9ea9

Please sign in to comment.