aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorRoland Stigge <stigge@antcom.de>2012-03-12 17:54:50 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-13 17:27:28 -0400
commit286431048b99705b555b6040da72bb2964386cea (patch)
tree0953844c5a8739fd10ae808933d3c4a16ec68151 /drivers/usb/host
parent32abd56a507e60e374dc7bb4912258225f9cf530 (diff)
USB: ohci-nxp: Rename symbols from pnx4008 to nxp
Since this driver is compatible with several NXP devices, the driver was renamed accordingly. This patch also changes the respective symbol names. Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ohci-hcd.c2
-rw-r--r--drivers/usb/host/ohci-nxp.c53
2 files changed, 28 insertions, 27 deletions
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 4b011b7c1ce4..dba50deb7e9a 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -1052,7 +1052,7 @@ MODULE_LICENSE ("GPL");
1052 1052
1053#ifdef CONFIG_ARCH_PNX4008 1053#ifdef CONFIG_ARCH_PNX4008
1054#include "ohci-nxp.c" 1054#include "ohci-nxp.c"
1055#define PLATFORM_DRIVER usb_hcd_pnx4008_driver 1055#define PLATFORM_DRIVER usb_hcd_nxp_driver
1056#endif 1056#endif
1057 1057
1058#ifdef CONFIG_ARCH_DAVINCI_DA8XX 1058#ifdef CONFIG_ARCH_DAVINCI_DA8XX
diff --git a/drivers/usb/host/ohci-nxp.c b/drivers/usb/host/ohci-nxp.c
index 0013db7bdf92..a12c6b40472e 100644
--- a/drivers/usb/host/ohci-nxp.c
+++ b/drivers/usb/host/ohci-nxp.c
@@ -1,7 +1,8 @@
1/* 1/*
2 * drivers/usb/host/ohci-pnx4008.c 2 * driver for NXP USB Host devices
3 * 3 *
4 * driver for Philips PNX4008 USB Host 4 * Currently supported OHCI host devices:
5 * - Philips PNX4008
5 * 6 *
6 * Authors: Dmitry Chigirev <source@mvista.com> 7 * Authors: Dmitry Chigirev <source@mvista.com>
7 * Vitaly Wool <vitalywool@gmail.com> 8 * Vitaly Wool <vitalywool@gmail.com>
@@ -121,13 +122,13 @@ static int isp1301_remove(struct i2c_client *client)
121} 122}
122 123
123static const struct i2c_device_id isp1301_id[] = { 124static const struct i2c_device_id isp1301_id[] = {
124 { "isp1301_pnx", 0 }, 125 { "isp1301_nxp", 0 },
125 { } 126 { }
126}; 127};
127 128
128static struct i2c_driver isp1301_driver = { 129static struct i2c_driver isp1301_driver = {
129 .driver = { 130 .driver = {
130 .name = "isp1301_pnx", 131 .name = "isp1301_nxp",
131 }, 132 },
132 .probe = isp1301_probe, 133 .probe = isp1301_probe,
133 .remove = isp1301_remove, 134 .remove = isp1301_remove,
@@ -180,14 +181,14 @@ static inline void isp1301_vbus_off(void)
180 ISP1301_I2C_OTG_CONTROL_1 | ISP1301_I2C_REG_CLEAR_ADDR); 181 ISP1301_I2C_OTG_CONTROL_1 | ISP1301_I2C_REG_CLEAR_ADDR);
181} 182}
182 183
183static void pnx4008_start_hc(void) 184static void nxp_start_hc(void)
184{ 185{
185 unsigned long tmp = __raw_readl(USB_OTG_STAT_CONTROL) | HOST_EN; 186 unsigned long tmp = __raw_readl(USB_OTG_STAT_CONTROL) | HOST_EN;
186 __raw_writel(tmp, USB_OTG_STAT_CONTROL); 187 __raw_writel(tmp, USB_OTG_STAT_CONTROL);
187 isp1301_vbus_on(); 188 isp1301_vbus_on();
188} 189}
189 190
190static void pnx4008_stop_hc(void) 191static void nxp_stop_hc(void)
191{ 192{
192 unsigned long tmp; 193 unsigned long tmp;
193 isp1301_vbus_off(); 194 isp1301_vbus_off();
@@ -195,7 +196,7 @@ static void pnx4008_stop_hc(void)
195 __raw_writel(tmp, USB_OTG_STAT_CONTROL); 196 __raw_writel(tmp, USB_OTG_STAT_CONTROL);
196} 197}
197 198
198static int __devinit ohci_pnx4008_start(struct usb_hcd *hcd) 199static int __devinit ohci_nxp_start(struct usb_hcd *hcd)
199{ 200{
200 struct ohci_hcd *ohci = hcd_to_ohci(hcd); 201 struct ohci_hcd *ohci = hcd_to_ohci(hcd);
201 int ret; 202 int ret;
@@ -211,9 +212,9 @@ static int __devinit ohci_pnx4008_start(struct usb_hcd *hcd)
211 return 0; 212 return 0;
212} 213}
213 214
214static const struct hc_driver ohci_pnx4008_hc_driver = { 215static const struct hc_driver ohci_nxp_hc_driver = {
215 .description = hcd_name, 216 .description = hcd_name,
216 .product_desc = "pnx4008 OHCI", 217 .product_desc = "nxp OHCI",
217 218
218 /* 219 /*
219 * generic hardware linkage 220 * generic hardware linkage
@@ -225,7 +226,7 @@ static const struct hc_driver ohci_pnx4008_hc_driver = {
225 /* 226 /*
226 * basic lifecycle operations 227 * basic lifecycle operations
227 */ 228 */
228 .start = ohci_pnx4008_start, 229 .start = ohci_nxp_start,
229 .stop = ohci_stop, 230 .stop = ohci_stop,
230 .shutdown = ohci_shutdown, 231 .shutdown = ohci_shutdown,
231 232
@@ -255,7 +256,7 @@ static const struct hc_driver ohci_pnx4008_hc_driver = {
255 256
256#define USB_CLOCK_MASK (AHB_M_CLOCK_ON| OTG_CLOCK_ON | HOST_CLOCK_ON | I2C_CLOCK_ON) 257#define USB_CLOCK_MASK (AHB_M_CLOCK_ON| OTG_CLOCK_ON | HOST_CLOCK_ON | I2C_CLOCK_ON)
257 258
258static void pnx4008_set_usb_bits(void) 259static void nxp_set_usb_bits(void)
259{ 260{
260 start_int_set_falling_edge(SE_USB_OTG_ATX_INT_N); 261 start_int_set_falling_edge(SE_USB_OTG_ATX_INT_N);
261 start_int_ack(SE_USB_OTG_ATX_INT_N); 262 start_int_ack(SE_USB_OTG_ATX_INT_N);
@@ -282,7 +283,7 @@ static void pnx4008_set_usb_bits(void)
282 start_int_umask(SE_USB_AHB_NEED_CLK_INT); 283 start_int_umask(SE_USB_AHB_NEED_CLK_INT);
283} 284}
284 285
285static void pnx4008_unset_usb_bits(void) 286static void nxp_unset_usb_bits(void)
286{ 287{
287 start_int_mask(SE_USB_OTG_ATX_INT_N); 288 start_int_mask(SE_USB_OTG_ATX_INT_N);
288 start_int_mask(SE_USB_OTG_TIMER_INT); 289 start_int_mask(SE_USB_OTG_TIMER_INT);
@@ -292,17 +293,17 @@ static void pnx4008_unset_usb_bits(void)
292 start_int_mask(SE_USB_AHB_NEED_CLK_INT); 293 start_int_mask(SE_USB_AHB_NEED_CLK_INT);
293} 294}
294 295
295static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev) 296static int __devinit usb_hcd_nxp_probe(struct platform_device *pdev)
296{ 297{
297 struct usb_hcd *hcd = 0; 298 struct usb_hcd *hcd = 0;
298 struct ohci_hcd *ohci; 299 struct ohci_hcd *ohci;
299 const struct hc_driver *driver = &ohci_pnx4008_hc_driver; 300 const struct hc_driver *driver = &ohci_nxp_hc_driver;
300 struct i2c_adapter *i2c_adap; 301 struct i2c_adapter *i2c_adap;
301 struct i2c_board_info i2c_info; 302 struct i2c_board_info i2c_info;
302 303
303 int ret = 0, irq; 304 int ret = 0, irq;
304 305
305 dev_dbg(&pdev->dev, "%s: " DRIVER_DESC " (pnx4008)\n", hcd_name); 306 dev_dbg(&pdev->dev, "%s: " DRIVER_DESC " (nxp)\n", hcd_name);
306 if (usb_disabled()) { 307 if (usb_disabled()) {
307 err("USB is disabled"); 308 err("USB is disabled");
308 ret = -ENODEV; 309 ret = -ENODEV;
@@ -327,7 +328,7 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev)
327 } 328 }
328 i2c_adap = i2c_get_adapter(2); 329 i2c_adap = i2c_get_adapter(2);
329 memset(&i2c_info, 0, sizeof(struct i2c_board_info)); 330 memset(&i2c_info, 0, sizeof(struct i2c_board_info));
330 strlcpy(i2c_info.type, "isp1301_pnx", I2C_NAME_SIZE); 331 strlcpy(i2c_info.type, "isp1301_nxp", I2C_NAME_SIZE);
331 isp1301_i2c_client = i2c_new_probed_device(i2c_adap, &i2c_info, 332 isp1301_i2c_client = i2c_new_probed_device(i2c_adap, &i2c_info,
332 normal_i2c, NULL); 333 normal_i2c, NULL);
333 i2c_put_adapter(i2c_adap); 334 i2c_put_adapter(i2c_adap);
@@ -375,7 +376,7 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev)
375 } 376 }
376 377
377 /* Set all USB bits in the Start Enable register */ 378 /* Set all USB bits in the Start Enable register */
378 pnx4008_set_usb_bits(); 379 nxp_set_usb_bits();
379 380
380 hcd->rsrc_start = pdev->resource[0].start; 381 hcd->rsrc_start = pdev->resource[0].start;
381 hcd->rsrc_len = pdev->resource[0].end - pdev->resource[0].start + 1; 382 hcd->rsrc_len = pdev->resource[0].end - pdev->resource[0].start + 1;
@@ -392,7 +393,7 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev)
392 goto out4; 393 goto out4;
393 } 394 }
394 395
395 pnx4008_start_hc(); 396 nxp_start_hc();
396 platform_set_drvdata(pdev, hcd); 397 platform_set_drvdata(pdev, hcd);
397 ohci = hcd_to_ohci(hcd); 398 ohci = hcd_to_ohci(hcd);
398 ohci_hcd_init(ohci); 399 ohci_hcd_init(ohci);
@@ -402,9 +403,9 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev)
402 if (ret == 0) 403 if (ret == 0)
403 return ret; 404 return ret;
404 405
405 pnx4008_stop_hc(); 406 nxp_stop_hc();
406out4: 407out4:
407 pnx4008_unset_usb_bits(); 408 nxp_unset_usb_bits();
408 usb_put_hcd(hcd); 409 usb_put_hcd(hcd);
409out3: 410out3:
410 clk_disable(usb_clk); 411 clk_disable(usb_clk);
@@ -419,15 +420,15 @@ out:
419 return ret; 420 return ret;
420} 421}
421 422
422static int usb_hcd_pnx4008_remove(struct platform_device *pdev) 423static int usb_hcd_nxp_remove(struct platform_device *pdev)
423{ 424{
424 struct usb_hcd *hcd = platform_get_drvdata(pdev); 425 struct usb_hcd *hcd = platform_get_drvdata(pdev);
425 426
426 usb_remove_hcd(hcd); 427 usb_remove_hcd(hcd);
427 pnx4008_stop_hc(); 428 nxp_stop_hc();
428 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); 429 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
429 usb_put_hcd(hcd); 430 usb_put_hcd(hcd);
430 pnx4008_unset_usb_bits(); 431 nxp_unset_usb_bits();
431 clk_disable(usb_clk); 432 clk_disable(usb_clk);
432 clk_put(usb_clk); 433 clk_put(usb_clk);
433 i2c_unregister_device(isp1301_i2c_client); 434 i2c_unregister_device(isp1301_i2c_client);
@@ -442,12 +443,12 @@ static int usb_hcd_pnx4008_remove(struct platform_device *pdev)
442/* work with hotplug and coldplug */ 443/* work with hotplug and coldplug */
443MODULE_ALIAS("platform:usb-ohci"); 444MODULE_ALIAS("platform:usb-ohci");
444 445
445static struct platform_driver usb_hcd_pnx4008_driver = { 446static struct platform_driver usb_hcd_nxp_driver = {
446 .driver = { 447 .driver = {
447 .name = "usb-ohci", 448 .name = "usb-ohci",
448 .owner = THIS_MODULE, 449 .owner = THIS_MODULE,
449 }, 450 },
450 .probe = usb_hcd_pnx4008_probe, 451 .probe = usb_hcd_nxp_probe,
451 .remove = usb_hcd_pnx4008_remove, 452 .remove = usb_hcd_nxp_remove,
452}; 453};
453 454