|
@@ -41,6 +41,7 @@
|
|
|
#include <linux/fsl_devices.h>
|
|
|
#include <linux/dmapool.h>
|
|
|
#include <linux/delay.h>
|
|
|
+#include <linux/of_device.h>
|
|
|
|
|
|
#include <asm/byteorder.h>
|
|
|
#include <asm/io.h>
|
|
@@ -2438,11 +2439,6 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
|
|
|
unsigned int i;
|
|
|
u32 dccparams;
|
|
|
|
|
|
- if (strcmp(pdev->name, driver_name)) {
|
|
|
- VDBG("Wrong device");
|
|
|
- return -ENODEV;
|
|
|
- }
|
|
|
-
|
|
|
udc_controller = kzalloc(sizeof(struct fsl_udc), GFP_KERNEL);
|
|
|
if (udc_controller == NULL) {
|
|
|
ERR("malloc udc failed\n");
|
|
@@ -2756,22 +2752,32 @@ static int fsl_udc_otg_resume(struct device *dev)
|
|
|
|
|
|
return fsl_udc_resume(NULL);
|
|
|
}
|
|
|
-
|
|
|
/*-------------------------------------------------------------------------
|
|
|
Register entry point for the peripheral controller driver
|
|
|
--------------------------------------------------------------------------*/
|
|
|
-
|
|
|
+static const struct platform_device_id fsl_udc_devtype[] = {
|
|
|
+ {
|
|
|
+ .name = "imx-udc-mx27",
|
|
|
+ }, {
|
|
|
+ .name = "imx-udc-mx51",
|
|
|
+ }, {
|
|
|
+ /* sentinel */
|
|
|
+ }
|
|
|
+};
|
|
|
+MODULE_DEVICE_TABLE(platform, fsl_udc_devtype);
|
|
|
static struct platform_driver udc_driver = {
|
|
|
- .remove = __exit_p(fsl_udc_remove),
|
|
|
+ .remove = __exit_p(fsl_udc_remove),
|
|
|
+ /* Just for FSL i.mx SoC currently */
|
|
|
+ .id_table = fsl_udc_devtype,
|
|
|
/* these suspend and resume are not usb suspend and resume */
|
|
|
- .suspend = fsl_udc_suspend,
|
|
|
- .resume = fsl_udc_resume,
|
|
|
- .driver = {
|
|
|
- .name = (char *)driver_name,
|
|
|
- .owner = THIS_MODULE,
|
|
|
- /* udc suspend/resume called from OTG driver */
|
|
|
- .suspend = fsl_udc_otg_suspend,
|
|
|
- .resume = fsl_udc_otg_resume,
|
|
|
+ .suspend = fsl_udc_suspend,
|
|
|
+ .resume = fsl_udc_resume,
|
|
|
+ .driver = {
|
|
|
+ .name = (char *)driver_name,
|
|
|
+ .owner = THIS_MODULE,
|
|
|
+ /* udc suspend/resume called from OTG driver */
|
|
|
+ .suspend = fsl_udc_otg_suspend,
|
|
|
+ .resume = fsl_udc_otg_resume,
|
|
|
},
|
|
|
};
|
|
|
|