Hi,
On 09/08/2015 04:16 PM, Felipe Balbi wrote:
On Tue, Sep 08, 2015 at 04:10:12PM -0500, Bin Liu wrote:
Set musb config->maximum_speed based on the dts setting to control musb
speed.
By default musb works in high-speed mode. Adding
maximum-speed = "full-speed";
to dts usb node will force musb to full-speed mode.
Signed-off-by: Bin Liu <b-liu@xxxxxx>
---
drivers/usb/musb/musb_dsps.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 0ca6011..268e2b5 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -736,6 +736,11 @@ static int dsps_create_musb_pdev(struct dsps_glue *glue,
pdata.power = get_int_prop(dn, "mentor,power") / 2;
config->multipoint = of_property_read_bool(dn, "mentor,multipoint");
+ config->maximum_speed = of_usb_get_maximum_speed(musb->dev.of_node);
+ if (config->maximum_speed == USB_SPEED_UNKNOWN ||
+ config->maximum_speed > USB_SPEED_HIGH)
I'd add a log message for > HIGH. That would mean somebody thinks musb
can work in super speed.
Do you mean a comment, not runtime log?
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html