aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/musb/am35x.c4
-rw-r--r--drivers/usb/musb/blackfin.c4
-rw-r--r--drivers/usb/musb/da8xx.c4
-rw-r--r--drivers/usb/musb/davinci.c4
-rw-r--r--drivers/usb/musb/musb_core.c2
-rw-r--r--drivers/usb/musb/musb_core.h2
-rw-r--r--drivers/usb/musb/omap2430.c4
-rw-r--r--drivers/usb/musb/tusb6010.c4
-rw-r--r--include/linux/usb/musb.h3
9 files changed, 22 insertions, 9 deletions
diff --git a/drivers/usb/musb/am35x.c b/drivers/usb/musb/am35x.c
index 355883c5ffed..e372c87f37e2 100644
--- a/drivers/usb/musb/am35x.c
+++ b/drivers/usb/musb/am35x.c
@@ -530,7 +530,7 @@ void musb_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
530 } 530 }
531} 531}
532 532
533const struct musb_platform_ops musb_ops = { 533static const struct musb_platform_ops am35x_ops = {
534 .init = am35x_musb_init, 534 .init = am35x_musb_init,
535 .exit = am35x_musb_exit, 535 .exit = am35x_musb_exit,
536 536
@@ -572,6 +572,8 @@ static int __init am35x_probe(struct platform_device *pdev)
572 glue->dev = &pdev->dev; 572 glue->dev = &pdev->dev;
573 glue->musb = musb; 573 glue->musb = musb;
574 574
575 pdata->platform_ops = &am35x_ops;
576
575 platform_set_drvdata(pdev, glue); 577 platform_set_drvdata(pdev, glue);
576 578
577 ret = platform_device_add_resources(musb, pdev->resource, 579 ret = platform_device_add_resources(musb, pdev->resource,
diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
index 02eded21d171..03cb001c0e19 100644
--- a/drivers/usb/musb/blackfin.c
+++ b/drivers/usb/musb/blackfin.c
@@ -436,7 +436,7 @@ static int bfin_musb_exit(struct musb *musb)
436 return 0; 436 return 0;
437} 437}
438 438
439const struct musb_platform_ops musb_ops = { 439static const struct musb_platform_ops bfin_ops = {
440 .init = bfin_musb_init, 440 .init = bfin_musb_init,
441 .exit = bfin_musb_exit, 441 .exit = bfin_musb_exit,
442 442
@@ -479,6 +479,8 @@ static int __init bfin_probe(struct platform_device *pdev)
479 glue->dev = &pdev->dev; 479 glue->dev = &pdev->dev;
480 glue->musb = musb; 480 glue->musb = musb;
481 481
482 pdata->platform_ops = &bfin_ops;
483
482 platform_set_drvdata(pdev, glue); 484 platform_set_drvdata(pdev, glue);
483 485
484 ret = platform_device_add_resources(musb, pdev->resource, 486 ret = platform_device_add_resources(musb, pdev->resource,
diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c
index 94ddfe01d673..45ccac3aad9d 100644
--- a/drivers/usb/musb/da8xx.c
+++ b/drivers/usb/musb/da8xx.c
@@ -475,7 +475,7 @@ static int da8xx_musb_exit(struct musb *musb)
475 return 0; 475 return 0;
476} 476}
477 477
478const struct musb_platform_ops musb_ops = { 478static const struct musb_platform_ops da8xx_ops = {
479 .init = da8xx_musb_init, 479 .init = da8xx_musb_init,
480 .exit = da8xx_musb_exit, 480 .exit = da8xx_musb_exit,
481 481
@@ -517,6 +517,8 @@ static int __init da8xx_probe(struct platform_device *pdev)
517 glue->dev = &pdev->dev; 517 glue->dev = &pdev->dev;
518 glue->musb = musb; 518 glue->musb = musb;
519 519
520 pdata->platform_ops = &da8xx_ops;
521
520 platform_set_drvdata(pdev, glue); 522 platform_set_drvdata(pdev, glue);
521 523
522 ret = platform_device_add_resources(musb, pdev->resource, 524 ret = platform_device_add_resources(musb, pdev->resource,
diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c
index 661870a1cd4d..831a04dd5a53 100644
--- a/drivers/usb/musb/davinci.c
+++ b/drivers/usb/musb/davinci.c
@@ -510,7 +510,7 @@ static int davinci_musb_exit(struct musb *musb)
510 return 0; 510 return 0;
511} 511}
512 512
513const struct musb_platform_ops musb_ops = { 513static const struct musb_platform_ops davinci_ops = {
514 .init = davinci_musb_init, 514 .init = davinci_musb_init,
515 .exit = davinci_musb_exit, 515 .exit = davinci_musb_exit,
516 516
@@ -551,6 +551,8 @@ static int __init davinci_probe(struct platform_device *pdev)
551 glue->dev = &pdev->dev; 551 glue->dev = &pdev->dev;
552 glue->musb = musb; 552 glue->musb = musb;
553 553
554 pdata->platform_ops = &davinci_ops;
555
554 platform_set_drvdata(pdev, glue); 556 platform_set_drvdata(pdev, glue);
555 557
556 ret = platform_device_add_resources(musb, pdev->resource, 558 ret = platform_device_add_resources(musb, pdev->resource,
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 1ca14f90c994..dcc77ef6cfff 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -1897,7 +1897,6 @@ allocate_instance(struct device *dev,
1897 } 1897 }
1898 1898
1899 musb->controller = dev; 1899 musb->controller = dev;
1900 musb->ops = &musb_ops;
1901 1900
1902 return musb; 1901 return musb;
1903} 1902}
@@ -1997,6 +1996,7 @@ bad_config:
1997 musb->board_set_power = plat->set_power; 1996 musb->board_set_power = plat->set_power;
1998 musb->set_clock = plat->set_clock; 1997 musb->set_clock = plat->set_clock;
1999 musb->min_power = plat->min_power; 1998 musb->min_power = plat->min_power;
1999 musb->ops = plat->platform_ops;
2000 2000
2001 /* Clock usage is chip-specific ... functional clock (DaVinci, 2001 /* Clock usage is chip-specific ... functional clock (DaVinci,
2002 * OMAP2430), or PHY ref (some TUSB6010 boards). All this core 2002 * OMAP2430), or PHY ref (some TUSB6010 boards). All this core
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index 9594b9d1d27b..fac1eab3c59f 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -281,8 +281,6 @@ struct musb_platform_ops {
281 void (*set_vbus)(struct musb *musb, int on); 281 void (*set_vbus)(struct musb *musb, int on);
282}; 282};
283 283
284extern const struct musb_platform_ops musb_ops;
285
286/* 284/*
287 * struct musb_hw_ep - endpoint hardware (bidirectional) 285 * struct musb_hw_ep - endpoint hardware (bidirectional)
288 * 286 *
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index bca9df7557a4..2eea1703e630 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -333,7 +333,7 @@ static int omap2430_musb_exit(struct musb *musb)
333 return 0; 333 return 0;
334} 334}
335 335
336const struct musb_platform_ops musb_ops = { 336static const struct musb_platform_ops omap2430_ops = {
337 .init = omap2430_musb_init, 337 .init = omap2430_musb_init,
338 .exit = omap2430_musb_exit, 338 .exit = omap2430_musb_exit,
339 339
@@ -378,6 +378,8 @@ static int __init omap2430_probe(struct platform_device *pdev)
378 glue->dev = &pdev->dev; 378 glue->dev = &pdev->dev;
379 glue->musb = musb; 379 glue->musb = musb;
380 380
381 pdata->platform_ops = &omap2430_ops;
382
381 platform_set_drvdata(pdev, glue); 383 platform_set_drvdata(pdev, glue);
382 384
383 ret = platform_device_add_resources(musb, pdev->resource, 385 ret = platform_device_add_resources(musb, pdev->resource,
diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c
index 2ff78d6b2eff..d6b832641c53 100644
--- a/drivers/usb/musb/tusb6010.c
+++ b/drivers/usb/musb/tusb6010.c
@@ -1178,7 +1178,7 @@ static int tusb_musb_exit(struct musb *musb)
1178 return 0; 1178 return 0;
1179} 1179}
1180 1180
1181const struct musb_platform_ops musb_ops = { 1181static const struct musb_platform_ops tusb_ops = {
1182 .init = tusb_musb_init, 1182 .init = tusb_musb_init,
1183 .exit = tusb_musb_exit, 1183 .exit = tusb_musb_exit,
1184 1184
@@ -1221,6 +1221,8 @@ static int __init tusb_probe(struct platform_device *pdev)
1221 glue->dev = &pdev->dev; 1221 glue->dev = &pdev->dev;
1222 glue->musb = musb; 1222 glue->musb = musb;
1223 1223
1224 pdata->platform_ops = &tusb_ops;
1225
1224 platform_set_drvdata(pdev, glue); 1226 platform_set_drvdata(pdev, glue);
1225 1227
1226 ret = platform_device_add_resources(musb, pdev->resource, 1228 ret = platform_device_add_resources(musb, pdev->resource,
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h
index e2191d4db4dd..6f4e5014cf5e 100644
--- a/include/linux/usb/musb.h
+++ b/include/linux/usb/musb.h
@@ -126,6 +126,9 @@ struct musb_hdrc_platform_data {
126 126
127 /* Architecture specific board data */ 127 /* Architecture specific board data */
128 void *board_data; 128 void *board_data;
129
130 /* Platform specific struct musb_ops pointer */
131 const void *platform_ops;
129}; 132};
130 133
131 134