}
}
-const struct musb_platform_ops musb_ops = {
+static const struct musb_platform_ops am35x_ops = {
.init = am35x_musb_init,
.exit = am35x_musb_exit,
glue->dev = &pdev->dev;
glue->musb = musb;
+ pdata->platform_ops = &am35x_ops;
+
platform_set_drvdata(pdev, glue);
ret = platform_device_add_resources(musb, pdev->resource,
return 0;
}
-const struct musb_platform_ops musb_ops = {
+static const struct musb_platform_ops bfin_ops = {
.init = bfin_musb_init,
.exit = bfin_musb_exit,
glue->dev = &pdev->dev;
glue->musb = musb;
+ pdata->platform_ops = &bfin_ops;
+
platform_set_drvdata(pdev, glue);
ret = platform_device_add_resources(musb, pdev->resource,
return 0;
}
-const struct musb_platform_ops musb_ops = {
+static const struct musb_platform_ops da8xx_ops = {
.init = da8xx_musb_init,
.exit = da8xx_musb_exit,
glue->dev = &pdev->dev;
glue->musb = musb;
+ pdata->platform_ops = &da8xx_ops;
+
platform_set_drvdata(pdev, glue);
ret = platform_device_add_resources(musb, pdev->resource,
return 0;
}
-const struct musb_platform_ops musb_ops = {
+static const struct musb_platform_ops davinci_ops = {
.init = davinci_musb_init,
.exit = davinci_musb_exit,
glue->dev = &pdev->dev;
glue->musb = musb;
+ pdata->platform_ops = &davinci_ops;
+
platform_set_drvdata(pdev, glue);
ret = platform_device_add_resources(musb, pdev->resource,
}
musb->controller = dev;
- musb->ops = &musb_ops;
return musb;
}
musb->board_set_power = plat->set_power;
musb->set_clock = plat->set_clock;
musb->min_power = plat->min_power;
+ musb->ops = plat->platform_ops;
/* Clock usage is chip-specific ... functional clock (DaVinci,
* OMAP2430), or PHY ref (some TUSB6010 boards). All this core
void (*set_vbus)(struct musb *musb, int on);
};
-extern const struct musb_platform_ops musb_ops;
-
/*
* struct musb_hw_ep - endpoint hardware (bidirectional)
*
return 0;
}
-const struct musb_platform_ops musb_ops = {
+static const struct musb_platform_ops omap2430_ops = {
.init = omap2430_musb_init,
.exit = omap2430_musb_exit,
glue->dev = &pdev->dev;
glue->musb = musb;
+ pdata->platform_ops = &omap2430_ops;
+
platform_set_drvdata(pdev, glue);
ret = platform_device_add_resources(musb, pdev->resource,
return 0;
}
-const struct musb_platform_ops musb_ops = {
+static const struct musb_platform_ops tusb_ops = {
.init = tusb_musb_init,
.exit = tusb_musb_exit,
glue->dev = &pdev->dev;
glue->musb = musb;
+ pdata->platform_ops = &tusb_ops;
+
platform_set_drvdata(pdev, glue);
ret = platform_device_add_resources(musb, pdev->resource,
/* Architecture specific board data */
void *board_data;
+
+ /* Platform specific struct musb_ops pointer */
+ const void *platform_ops;
};