summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_dsps.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/musb/musb_dsps.c')
-rw-r--r--drivers/usb/musb/musb_dsps.c38
1 files changed, 12 insertions, 26 deletions
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index d54a663e9d..97b64302ec 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
/*
* Texas Instruments DSPS platforms "glue layer"
*
@@ -7,22 +8,6 @@
*
* This file is part of the Inventra Controller Driver for Linux.
*
- * The Inventra Controller Driver for Linux is free software; you
- * can redistribute it and/or modify it under the terms of the GNU
- * General Public License version 2 as published by the Free Software
- * Foundation.
- *
- * The Inventra Controller Driver for Linux is distributed in
- * the hope that it will be useful, but WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
- * License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with The Inventra Controller Driver for Linux ; if not,
- * write to the Free Software Foundation, Inc., 59 Temple Place,
- * Suite 330, Boston, MA 02111-1307 USA
- *
* musb_dsps.c will be a common file for all the TI DSPS platforms
* such as dm64x, dm36x, dm35x, da8x, am35x and ti81x.
* For now only ti81x is using this and in future davinci.c, am35x.c
@@ -32,8 +17,8 @@
#include <common.h>
#include <init.h>
#include <clock.h>
-#include <usb/usb.h>
-#include <usb/musb.h>
+#include <linux/usb/usb.h>
+#include <linux/usb/musb.h>
#include <malloc.h>
#include <linux/err.h>
#include <linux/barebox-wrapper.h>
@@ -114,7 +99,7 @@ struct dsps_musb_wrapper {
* DSPS glue structure.
*/
struct dsps_glue {
- struct device_d *dev;
+ struct device *dev;
void __iomem *base;
unsigned long flags;
enum musb_mode mode;
@@ -123,7 +108,7 @@ struct dsps_glue {
const struct dsps_musb_wrapper *wrp; /* wrapper register offsets */
struct poller_async timer; /* otg_workaround timer */
uint64_t last_timer; /* last timer data for each instance */
- struct device_d otg_dev;
+ struct device otg_dev;
uint32_t otgmode;
struct musb_hdrc_platform_data pdata;
};
@@ -275,11 +260,11 @@ static int get_int_prop(struct device_node *dn, const char *s)
return val;
}
-static int get_musb_port_mode(struct device_d *dev)
+static int get_musb_port_mode(struct device *dev)
{
enum usb_dr_mode mode;
- mode = of_usb_get_dr_mode(dev->device_node, NULL);
+ mode = of_usb_get_dr_mode(dev->of_node, NULL);
switch (mode) {
case USB_DR_MODE_HOST:
return MUSB_PORT_MODE_HOST;
@@ -312,15 +297,15 @@ static int dsps_set_mode(void *ctx, enum usb_dr_mode mode)
return musb_init_controller(&glue->musb, &glue->pdata);
}
-static int dsps_probe(struct device_d *dev)
+static int dsps_probe(struct device *dev)
{
struct resource *iores[2];
struct musb_hdrc_platform_data *pdata;
struct musb_hdrc_config *config;
- struct device_node *dn = dev->device_node;
+ struct device_node *dn = dev->of_node;
const struct dsps_musb_wrapper *wrp;
struct device_node *phy_node;
- struct device_d *phy_dev;
+ struct device *phy_dev;
struct dsps_glue *glue;
int ret;
@@ -443,8 +428,9 @@ static __maybe_unused struct of_device_id musb_dsps_dt_ids[] = {
/* sentinel */
},
};
+MODULE_DEVICE_TABLE(of, musb_dsps_dt_ids);
-static struct driver_d dsps_usbss_driver = {
+static struct driver dsps_usbss_driver = {
.name = "musb-dsps",
.probe = dsps_probe,
.of_compatible = DRV_OF_COMPAT(musb_dsps_dt_ids),