~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/arm/mach-omap2/omap_phy_internal.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
{
51
51
        ctrl_base = ioremap(OMAP443X_SCM_BASE, SZ_1K);
52
52
        if (!ctrl_base) {
53
 
                dev_err(dev, "control module ioremap failed\n");
 
53
                pr_err("control module ioremap failed\n");
54
54
                return -ENOMEM;
55
55
        }
56
56
        /* Power down the phy */
57
57
        __raw_writel(PHY_PD, ctrl_base + CONTROL_DEV_CONF);
 
58
 
 
59
        if (!dev) {
 
60
                iounmap(ctrl_base);
 
61
                return 0;
 
62
        }
 
63
 
58
64
        phyclk = clk_get(dev, "ocp2scp_usb_phy_ick");
59
 
 
60
65
        if (IS_ERR(phyclk)) {
61
66
                dev_err(dev, "cannot clk_get ocp2scp_usb_phy_ick\n");
62
67
                iounmap(ctrl_base);
112
117
                else
113
118
                        /*
114
119
                         * Enable VBUS Valid, AValid and IDDIG
115
 
                         * high impedence
 
120
                         * high impedance
116
121
                         */
117
122
                        __raw_writel(IDDIG | AVALID | VBUSVALID,
118
123
                                                ctrl_base + USBOTGHS_CONTROL);
119
124
        } else {
120
 
                /* Enable session END and IDIG to high impedence. */
 
125
                /* Enable session END and IDIG to high impedance. */
121
126
                __raw_writel(SESSEND | IDDIG, ctrl_base +
122
127
                                        USBOTGHS_CONTROL);
123
128
        }
228
233
        regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
229
234
}
230
235
 
231
 
void am35x_musb_set_mode(u8 musb_mode)
 
236
void am35x_set_mode(u8 musb_mode)
232
237
{
233
238
        u32 devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2);
234
239