#include <linux/usb.h>
#include <linux/platform_device.h>
+#include <asm/bootinfo.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/system.h>
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Jeroen Vreeken (pe1rxq@amsat.org)");
+#define PFX "adm5120-hcd: "
+
#define ADMHCD_REG_CONTROL 0x00
#define ADMHCD_REG_INTSTATUS 0x04
#define ADMHCD_REG_INTENABLE 0x08
err = -ENOMEM;
goto out_mem;
}
-
+
hcd = usb_create_hcd(&adm5120_hc_driver, &pdev->dev, pdev->dev.bus_id);
if (!hcd)
goto out_mem;
.probe = adm5120hcd_probe,
.remove = adm5120hcd_remove,
.driver = {
- .name = "adm5120-hcd",
+ .name = "adm5120-usbc",
.owner = THIS_MODULE,
},
};
static int __init adm5120hcd_init(void)
{
- if (usb_disabled())
+ int ret;
+
+ if (usb_disabled()) {
+ printk(KERN_DEBUG PFX "USB support is disabled\n");
return -ENODEV;
- if (!adm5120_board.has_usb)
+ }
+
+ if (mips_machgroup != MACH_GROUP_ADM5120) {
+ printk(KERN_DEBUG PFX "unsupported machine group\n");
return -ENODEV;
+ }
- return platform_driver_register(&adm5120hcd_driver);
+ ret = platform_driver_register(&adm5120hcd_driver);
+ if (ret == 0)
+ printk(KERN_INFO PFX "registered\n");
+
+ return ret;
}
static void __exit adm5120hcd_exit(void)