aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-30 20:25:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-30 20:25:34 -0400
commit27c1ee3f929555b71fa39ec0d81a7e7185de1b16 (patch)
tree42e40bdfe4efac660d650658019391536ce67a42 /drivers/usb
parent37cd9600a9e20359b0283983c9e3a55d84347168 (diff)
parent086ff4b3a7fb9cdf41e6a5d0ccd99b86d84633a1 (diff)
Merge branch 'akpm' (Andrew's patch-bomb)
Merge Andrew's first set of patches: "Non-MM patches: - lots of misc bits - tree-wide have_clk() cleanups - quite a lot of printk tweaks. I draw your attention to "printk: convert the format for KERN_<LEVEL> to a 2 byte pattern" which looks a bit scary. But afaict it's solid. - backlight updates - lib/ feature work (notably the addition and use of memweight()) - checkpatch updates - rtc updates - nilfs updates - fatfs updates (partial, still waiting for acks) - kdump, proc, fork, IPC, sysctl, taskstats, pps, etc - new fault-injection feature work" * Merge emailed patches from Andrew Morton <akpm@linux-foundation.org>: (128 commits) drivers/misc/lkdtm.c: fix missing allocation failure check lib/scatterlist: do not re-write gfp_flags in __sg_alloc_table() fault-injection: add tool to run command with failslab or fail_page_alloc fault-injection: add selftests for cpu and memory hotplug powerpc: pSeries reconfig notifier error injection module memory: memory notifier error injection module PM: PM notifier error injection module cpu: rewrite cpu-notifier-error-inject module fault-injection: notifier error injection c/r: fcntl: add F_GETOWNER_UIDS option resource: make sure requested range is included in the root range include/linux/aio.h: cpp->C conversions fs: cachefiles: add support for large files in filesystem caching pps: return PTR_ERR on error in device_create taskstats: check nla_reserve() return sysctl: suppress kmemleak messages ipc: use Kconfig options for __ARCH_WANT_[COMPAT_]IPC_PARSE_VERSION ipc: compat: use signed size_t types for msgsnd and msgrcv ipc: allow compat IPC version field parsing if !ARCH_WANT_OLD_COMPAT_IPC ipc: add COMPAT_SHMLBA support ...
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/m66592-udc.c9
-rw-r--r--drivers/usb/gadget/m66592-udc.h5
-rw-r--r--drivers/usb/gadget/r8a66597-udc.c11
-rw-r--r--drivers/usb/gadget/r8a66597-udc.h5
-rw-r--r--drivers/usb/host/r8a66597-hcd.c12
-rw-r--r--drivers/usb/host/r8a66597.h5
-rw-r--r--drivers/usb/musb/musb_core.h8
7 files changed, 4 insertions, 51 deletions
diff --git a/drivers/usb/gadget/m66592-udc.c b/drivers/usb/gadget/m66592-udc.c
index 8981fbb5748c..cf6bd626f3fe 100644
--- a/drivers/usb/gadget/m66592-udc.c
+++ b/drivers/usb/gadget/m66592-udc.c
@@ -1583,12 +1583,10 @@ static int __exit m66592_remove(struct platform_device *pdev)
1583 iounmap(m66592->reg); 1583 iounmap(m66592->reg);
1584 free_irq(platform_get_irq(pdev, 0), m66592); 1584 free_irq(platform_get_irq(pdev, 0), m66592);
1585 m66592_free_request(&m66592->ep[0].ep, m66592->ep0_req); 1585 m66592_free_request(&m66592->ep[0].ep, m66592->ep0_req);
1586#ifdef CONFIG_HAVE_CLK
1587 if (m66592->pdata->on_chip) { 1586 if (m66592->pdata->on_chip) {
1588 clk_disable(m66592->clk); 1587 clk_disable(m66592->clk);
1589 clk_put(m66592->clk); 1588 clk_put(m66592->clk);
1590 } 1589 }
1591#endif
1592 kfree(m66592); 1590 kfree(m66592);
1593 return 0; 1591 return 0;
1594} 1592}
@@ -1602,9 +1600,7 @@ static int __init m66592_probe(struct platform_device *pdev)
1602 struct resource *res, *ires; 1600 struct resource *res, *ires;
1603 void __iomem *reg = NULL; 1601 void __iomem *reg = NULL;
1604 struct m66592 *m66592 = NULL; 1602 struct m66592 *m66592 = NULL;
1605#ifdef CONFIG_HAVE_CLK
1606 char clk_name[8]; 1603 char clk_name[8];
1607#endif
1608 int ret = 0; 1604 int ret = 0;
1609 int i; 1605 int i;
1610 1606
@@ -1671,7 +1667,6 @@ static int __init m66592_probe(struct platform_device *pdev)
1671 goto clean_up; 1667 goto clean_up;
1672 } 1668 }
1673 1669
1674#ifdef CONFIG_HAVE_CLK
1675 if (m66592->pdata->on_chip) { 1670 if (m66592->pdata->on_chip) {
1676 snprintf(clk_name, sizeof(clk_name), "usbf%d", pdev->id); 1671 snprintf(clk_name, sizeof(clk_name), "usbf%d", pdev->id);
1677 m66592->clk = clk_get(&pdev->dev, clk_name); 1672 m66592->clk = clk_get(&pdev->dev, clk_name);
@@ -1683,7 +1678,7 @@ static int __init m66592_probe(struct platform_device *pdev)
1683 } 1678 }
1684 clk_enable(m66592->clk); 1679 clk_enable(m66592->clk);
1685 } 1680 }
1686#endif 1681
1687 INIT_LIST_HEAD(&m66592->gadget.ep_list); 1682 INIT_LIST_HEAD(&m66592->gadget.ep_list);
1688 m66592->gadget.ep0 = &m66592->ep[0].ep; 1683 m66592->gadget.ep0 = &m66592->ep[0].ep;
1689 INIT_LIST_HEAD(&m66592->gadget.ep0->ep_list); 1684 INIT_LIST_HEAD(&m66592->gadget.ep0->ep_list);
@@ -1731,13 +1726,11 @@ err_add_udc:
1731 m66592_free_request(&m66592->ep[0].ep, m66592->ep0_req); 1726 m66592_free_request(&m66592->ep[0].ep, m66592->ep0_req);
1732 1727
1733clean_up3: 1728clean_up3:
1734#ifdef CONFIG_HAVE_CLK
1735 if (m66592->pdata->on_chip) { 1729 if (m66592->pdata->on_chip) {
1736 clk_disable(m66592->clk); 1730 clk_disable(m66592->clk);
1737 clk_put(m66592->clk); 1731 clk_put(m66592->clk);
1738 } 1732 }
1739clean_up2: 1733clean_up2:
1740#endif
1741 free_irq(ires->start, m66592); 1734 free_irq(ires->start, m66592);
1742clean_up: 1735clean_up:
1743 if (m66592) { 1736 if (m66592) {
diff --git a/drivers/usb/gadget/m66592-udc.h b/drivers/usb/gadget/m66592-udc.h
index 88c85b4116a2..16c7e14678b8 100644
--- a/drivers/usb/gadget/m66592-udc.h
+++ b/drivers/usb/gadget/m66592-udc.h
@@ -13,10 +13,7 @@
13#ifndef __M66592_UDC_H__ 13#ifndef __M66592_UDC_H__
14#define __M66592_UDC_H__ 14#define __M66592_UDC_H__
15 15
16#ifdef CONFIG_HAVE_CLK
17#include <linux/clk.h> 16#include <linux/clk.h>
18#endif
19
20#include <linux/usb/m66592.h> 17#include <linux/usb/m66592.h>
21 18
22#define M66592_SYSCFG 0x00 19#define M66592_SYSCFG 0x00
@@ -468,9 +465,7 @@ struct m66592_ep {
468struct m66592 { 465struct m66592 {
469 spinlock_t lock; 466 spinlock_t lock;
470 void __iomem *reg; 467 void __iomem *reg;
471#ifdef CONFIG_HAVE_CLK
472 struct clk *clk; 468 struct clk *clk;
473#endif
474 struct m66592_platdata *pdata; 469 struct m66592_platdata *pdata;
475 unsigned long irq_trigger; 470 unsigned long irq_trigger;
476 471
diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c
index f3ac2a20c27c..5a80751accb7 100644
--- a/drivers/usb/gadget/r8a66597-udc.c
+++ b/drivers/usb/gadget/r8a66597-udc.c
@@ -1831,12 +1831,12 @@ static int __exit r8a66597_remove(struct platform_device *pdev)
1831 iounmap(r8a66597->sudmac_reg); 1831 iounmap(r8a66597->sudmac_reg);
1832 free_irq(platform_get_irq(pdev, 0), r8a66597); 1832 free_irq(platform_get_irq(pdev, 0), r8a66597);
1833 r8a66597_free_request(&r8a66597->ep[0].ep, r8a66597->ep0_req); 1833 r8a66597_free_request(&r8a66597->ep[0].ep, r8a66597->ep0_req);
1834#ifdef CONFIG_HAVE_CLK 1834
1835 if (r8a66597->pdata->on_chip) { 1835 if (r8a66597->pdata->on_chip) {
1836 clk_disable(r8a66597->clk); 1836 clk_disable(r8a66597->clk);
1837 clk_put(r8a66597->clk); 1837 clk_put(r8a66597->clk);
1838 } 1838 }
1839#endif 1839
1840 device_unregister(&r8a66597->gadget.dev); 1840 device_unregister(&r8a66597->gadget.dev);
1841 kfree(r8a66597); 1841 kfree(r8a66597);
1842 return 0; 1842 return 0;
@@ -1868,9 +1868,7 @@ static int __init r8a66597_sudmac_ioremap(struct r8a66597 *r8a66597,
1868 1868
1869static int __init r8a66597_probe(struct platform_device *pdev) 1869static int __init r8a66597_probe(struct platform_device *pdev)
1870{ 1870{
1871#ifdef CONFIG_HAVE_CLK
1872 char clk_name[8]; 1871 char clk_name[8];
1873#endif
1874 struct resource *res, *ires; 1872 struct resource *res, *ires;
1875 int irq; 1873 int irq;
1876 void __iomem *reg = NULL; 1874 void __iomem *reg = NULL;
@@ -1934,7 +1932,6 @@ static int __init r8a66597_probe(struct platform_device *pdev)
1934 r8a66597->timer.data = (unsigned long)r8a66597; 1932 r8a66597->timer.data = (unsigned long)r8a66597;
1935 r8a66597->reg = reg; 1933 r8a66597->reg = reg;
1936 1934
1937#ifdef CONFIG_HAVE_CLK
1938 if (r8a66597->pdata->on_chip) { 1935 if (r8a66597->pdata->on_chip) {
1939 snprintf(clk_name, sizeof(clk_name), "usb%d", pdev->id); 1936 snprintf(clk_name, sizeof(clk_name), "usb%d", pdev->id);
1940 r8a66597->clk = clk_get(&pdev->dev, clk_name); 1937 r8a66597->clk = clk_get(&pdev->dev, clk_name);
@@ -1946,7 +1943,7 @@ static int __init r8a66597_probe(struct platform_device *pdev)
1946 } 1943 }
1947 clk_enable(r8a66597->clk); 1944 clk_enable(r8a66597->clk);
1948 } 1945 }
1949#endif 1946
1950 if (r8a66597->pdata->sudmac) { 1947 if (r8a66597->pdata->sudmac) {
1951 ret = r8a66597_sudmac_ioremap(r8a66597, pdev); 1948 ret = r8a66597_sudmac_ioremap(r8a66597, pdev);
1952 if (ret < 0) 1949 if (ret < 0)
@@ -2006,13 +2003,11 @@ err_add_udc:
2006clean_up3: 2003clean_up3:
2007 free_irq(irq, r8a66597); 2004 free_irq(irq, r8a66597);
2008clean_up2: 2005clean_up2:
2009#ifdef CONFIG_HAVE_CLK
2010 if (r8a66597->pdata->on_chip) { 2006 if (r8a66597->pdata->on_chip) {
2011 clk_disable(r8a66597->clk); 2007 clk_disable(r8a66597->clk);
2012 clk_put(r8a66597->clk); 2008 clk_put(r8a66597->clk);
2013 } 2009 }
2014clean_up_dev: 2010clean_up_dev:
2015#endif
2016 device_unregister(&r8a66597->gadget.dev); 2011 device_unregister(&r8a66597->gadget.dev);
2017clean_up: 2012clean_up:
2018 if (r8a66597) { 2013 if (r8a66597) {
diff --git a/drivers/usb/gadget/r8a66597-udc.h b/drivers/usb/gadget/r8a66597-udc.h
index 99908c76ccd1..45c4b2df1785 100644
--- a/drivers/usb/gadget/r8a66597-udc.h
+++ b/drivers/usb/gadget/r8a66597-udc.h
@@ -13,10 +13,7 @@
13#ifndef __R8A66597_H__ 13#ifndef __R8A66597_H__
14#define __R8A66597_H__ 14#define __R8A66597_H__
15 15
16#ifdef CONFIG_HAVE_CLK
17#include <linux/clk.h> 16#include <linux/clk.h>
18#endif
19
20#include <linux/usb/r8a66597.h> 17#include <linux/usb/r8a66597.h>
21 18
22#define R8A66597_MAX_SAMPLING 10 19#define R8A66597_MAX_SAMPLING 10
@@ -92,9 +89,7 @@ struct r8a66597 {
92 void __iomem *reg; 89 void __iomem *reg;
93 void __iomem *sudmac_reg; 90 void __iomem *sudmac_reg;
94 91
95#ifdef CONFIG_HAVE_CLK
96 struct clk *clk; 92 struct clk *clk;
97#endif
98 struct r8a66597_platdata *pdata; 93 struct r8a66597_platdata *pdata;
99 94
100 struct usb_gadget gadget; 95 struct usb_gadget gadget;
diff --git a/drivers/usb/host/r8a66597-hcd.c b/drivers/usb/host/r8a66597-hcd.c
index c868be65e763..4c634eb56358 100644
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -95,9 +95,7 @@ static int r8a66597_clock_enable(struct r8a66597 *r8a66597)
95 int i = 0; 95 int i = 0;
96 96
97 if (r8a66597->pdata->on_chip) { 97 if (r8a66597->pdata->on_chip) {
98#ifdef CONFIG_HAVE_CLK
99 clk_enable(r8a66597->clk); 98 clk_enable(r8a66597->clk);
100#endif
101 do { 99 do {
102 r8a66597_write(r8a66597, SCKE, SYSCFG0); 100 r8a66597_write(r8a66597, SCKE, SYSCFG0);
103 tmp = r8a66597_read(r8a66597, SYSCFG0); 101 tmp = r8a66597_read(r8a66597, SYSCFG0);
@@ -141,9 +139,7 @@ static void r8a66597_clock_disable(struct r8a66597 *r8a66597)
141 udelay(1); 139 udelay(1);
142 140
143 if (r8a66597->pdata->on_chip) { 141 if (r8a66597->pdata->on_chip) {
144#ifdef CONFIG_HAVE_CLK
145 clk_disable(r8a66597->clk); 142 clk_disable(r8a66597->clk);
146#endif
147 } else { 143 } else {
148 r8a66597_bclr(r8a66597, PLLC, SYSCFG0); 144 r8a66597_bclr(r8a66597, PLLC, SYSCFG0);
149 r8a66597_bclr(r8a66597, XCKE, SYSCFG0); 145 r8a66597_bclr(r8a66597, XCKE, SYSCFG0);
@@ -2406,19 +2402,15 @@ static int __devexit r8a66597_remove(struct platform_device *pdev)
2406 del_timer_sync(&r8a66597->rh_timer); 2402 del_timer_sync(&r8a66597->rh_timer);
2407 usb_remove_hcd(hcd); 2403 usb_remove_hcd(hcd);
2408 iounmap(r8a66597->reg); 2404 iounmap(r8a66597->reg);
2409#ifdef CONFIG_HAVE_CLK
2410 if (r8a66597->pdata->on_chip) 2405 if (r8a66597->pdata->on_chip)
2411 clk_put(r8a66597->clk); 2406 clk_put(r8a66597->clk);
2412#endif
2413 usb_put_hcd(hcd); 2407 usb_put_hcd(hcd);
2414 return 0; 2408 return 0;
2415} 2409}
2416 2410
2417static int __devinit r8a66597_probe(struct platform_device *pdev) 2411static int __devinit r8a66597_probe(struct platform_device *pdev)
2418{ 2412{
2419#ifdef CONFIG_HAVE_CLK
2420 char clk_name[8]; 2413 char clk_name[8];
2421#endif
2422 struct resource *res = NULL, *ires; 2414 struct resource *res = NULL, *ires;
2423 int irq = -1; 2415 int irq = -1;
2424 void __iomem *reg = NULL; 2416 void __iomem *reg = NULL;
@@ -2482,7 +2474,6 @@ static int __devinit r8a66597_probe(struct platform_device *pdev)
2482 r8a66597->irq_sense_low = irq_trigger == IRQF_TRIGGER_LOW; 2474 r8a66597->irq_sense_low = irq_trigger == IRQF_TRIGGER_LOW;
2483 2475
2484 if (r8a66597->pdata->on_chip) { 2476 if (r8a66597->pdata->on_chip) {
2485#ifdef CONFIG_HAVE_CLK
2486 snprintf(clk_name, sizeof(clk_name), "usb%d", pdev->id); 2477 snprintf(clk_name, sizeof(clk_name), "usb%d", pdev->id);
2487 r8a66597->clk = clk_get(&pdev->dev, clk_name); 2478 r8a66597->clk = clk_get(&pdev->dev, clk_name);
2488 if (IS_ERR(r8a66597->clk)) { 2479 if (IS_ERR(r8a66597->clk)) {
@@ -2491,7 +2482,6 @@ static int __devinit r8a66597_probe(struct platform_device *pdev)
2491 ret = PTR_ERR(r8a66597->clk); 2482 ret = PTR_ERR(r8a66597->clk);
2492 goto clean_up2; 2483 goto clean_up2;
2493 } 2484 }
2494#endif
2495 r8a66597->max_root_hub = 1; 2485 r8a66597->max_root_hub = 1;
2496 } else 2486 } else
2497 r8a66597->max_root_hub = 2; 2487 r8a66597->max_root_hub = 2;
@@ -2531,11 +2521,9 @@ static int __devinit r8a66597_probe(struct platform_device *pdev)
2531 return 0; 2521 return 0;
2532 2522
2533clean_up3: 2523clean_up3:
2534#ifdef CONFIG_HAVE_CLK
2535 if (r8a66597->pdata->on_chip) 2524 if (r8a66597->pdata->on_chip)
2536 clk_put(r8a66597->clk); 2525 clk_put(r8a66597->clk);
2537clean_up2: 2526clean_up2:
2538#endif
2539 usb_put_hcd(hcd); 2527 usb_put_hcd(hcd);
2540 2528
2541clean_up: 2529clean_up:
diff --git a/drivers/usb/host/r8a66597.h b/drivers/usb/host/r8a66597.h
index f28782d20eef..672cea307abb 100644
--- a/drivers/usb/host/r8a66597.h
+++ b/drivers/usb/host/r8a66597.h
@@ -26,10 +26,7 @@
26#ifndef __R8A66597_H__ 26#ifndef __R8A66597_H__
27#define __R8A66597_H__ 27#define __R8A66597_H__
28 28
29#ifdef CONFIG_HAVE_CLK
30#include <linux/clk.h> 29#include <linux/clk.h>
31#endif
32
33#include <linux/usb/r8a66597.h> 30#include <linux/usb/r8a66597.h>
34 31
35#define R8A66597_MAX_NUM_PIPE 10 32#define R8A66597_MAX_NUM_PIPE 10
@@ -113,9 +110,7 @@ struct r8a66597_root_hub {
113struct r8a66597 { 110struct r8a66597 {
114 spinlock_t lock; 111 spinlock_t lock;
115 void __iomem *reg; 112 void __iomem *reg;
116#ifdef CONFIG_HAVE_CLK
117 struct clk *clk; 113 struct clk *clk;
118#endif
119 struct r8a66597_platdata *pdata; 114 struct r8a66597_platdata *pdata;
120 struct r8a66597_device device0; 115 struct r8a66597_device device0;
121 struct r8a66597_root_hub root_hub[R8A66597_MAX_ROOT_HUB]; 116 struct r8a66597_root_hub root_hub[R8A66597_MAX_ROOT_HUB];
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index dbcdeea30f09..586105b55a7c 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -81,14 +81,6 @@ struct musb_ep;
81#define is_peripheral_active(m) (!(m)->is_host) 81#define is_peripheral_active(m) (!(m)->is_host)
82#define is_host_active(m) ((m)->is_host) 82#define is_host_active(m) ((m)->is_host)
83 83
84#ifndef CONFIG_HAVE_CLK
85/* Dummy stub for clk framework */
86#define clk_get(dev, id) NULL
87#define clk_put(clock) do {} while (0)
88#define clk_enable(clock) do {} while (0)
89#define clk_disable(clock) do {} while (0)
90#endif
91
92#ifdef CONFIG_PROC_FS 84#ifdef CONFIG_PROC_FS
93#include <linux/fs.h> 85#include <linux/fs.h>
94#define MUSB_CONFIG_PROC_FS 86#define MUSB_CONFIG_PROC_FS