~ubuntu-branches/ubuntu/saucy/linux-ti-omap4/saucy-proposed

« back to all changes in this revision

Viewing changes to drivers/usb/host/ehci-orion.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati, Stefan Bader, Upstream Kernel Changes
  • Date: 2012-08-15 17:17:43 UTC
  • Revision ID: package-import@ubuntu.com-20120815171743-h5wnuf51xe7pvdid
Tags: 3.5.0-207.13
[ Paolo Pisati ]

* Start new release

[ Stefan Bader ]

* (config) Enable getabis to use local package copies

[ Upstream Kernel Changes ]

* fixup: gargabe collect iva_seq[0|1] init
* [Config] enable all SND_OMAP_SOC_*s
* fixup: cm2xxx_3xxx.o is needed for omap2_cm_read|write_reg
* fixup: add some snd_soc_dai* helper functions
* fixup: s/snd_soc_dpcm_params/snd_soc_dpcm/g
* fixup: typo, no_host_mode and useless SDP4430 init
* fixup: enable again aess hwmod

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#include <linux/module.h>
13
13
#include <linux/platform_device.h>
14
14
#include <linux/mbus.h>
 
15
#include <linux/clk.h>
15
16
#include <plat/ehci-orion.h>
16
17
 
17
18
#define rdl(off)        __raw_readl(hcd->regs + (off))
198
199
        struct resource *res;
199
200
        struct usb_hcd *hcd;
200
201
        struct ehci_hcd *ehci;
 
202
        struct clk *clk;
201
203
        void __iomem *regs;
202
204
        int irq, err;
203
205
 
238
240
                goto err2;
239
241
        }
240
242
 
 
243
        /* Not all platforms can gate the clock, so it is not
 
244
           an error if the clock does not exists. */
 
245
        clk = clk_get(&pdev->dev, NULL);
 
246
        if (!IS_ERR(clk)) {
 
247
                clk_prepare_enable(clk);
 
248
                clk_put(clk);
 
249
        }
 
250
 
241
251
        hcd = usb_create_hcd(&ehci_orion_hc_driver,
242
252
                        &pdev->dev, dev_name(&pdev->dev));
243
253
        if (!hcd) {
301
311
static int __exit ehci_orion_drv_remove(struct platform_device *pdev)
302
312
{
303
313
        struct usb_hcd *hcd = platform_get_drvdata(pdev);
 
314
        struct clk *clk;
304
315
 
305
316
        usb_remove_hcd(hcd);
306
317
        iounmap(hcd->regs);
307
318
        release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
308
319
        usb_put_hcd(hcd);
309
320
 
 
321
        clk = clk_get(&pdev->dev, NULL);
 
322
        if (!IS_ERR(clk)) {
 
323
                clk_disable_unprepare(clk);
 
324
                clk_put(clk);
 
325
        }
310
326
        return 0;
311
327
}
312
328