summaryrefslogtreecommitdiff
path: root/arch/arm/mach-snapdragon/of_fixup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-snapdragon/of_fixup.c')
-rw-r--r--arch/arm/mach-snapdragon/of_fixup.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/arm/mach-snapdragon/of_fixup.c b/arch/arm/mach-snapdragon/of_fixup.c
index 55368dd43b6..1ea0c18c2f2 100644
--- a/arch/arm/mach-snapdragon/of_fixup.c
+++ b/arch/arm/mach-snapdragon/of_fixup.c
@@ -86,13 +86,13 @@ static int fixup_qcom_dwc3(struct device_node *glue_np)
}
/* Overwrite "phy-names" to only contain a single entry */
- ret = of_write_prop(dwc3, "phy-names", strlen("usb2-phy"), "usb2-phy");
+ ret = of_write_prop(dwc3, "phy-names", strlen("usb2-phy") + 1, "usb2-phy");
if (ret) {
log_err("Failed to overwrite 'phy-names' property: %d\n", ret);
return ret;
}
- ret = of_write_prop(dwc3, "maximum-speed", strlen("high-speed"), "high-speed");
+ ret = of_write_prop(dwc3, "maximum-speed", strlen("high-speed") + 1, "high-speed");
if (ret) {
log_err("Failed to set 'maximum-speed' property: %d\n", ret);
return ret;
@@ -161,14 +161,14 @@ int ft_board_setup(void *blob, struct bd_info __maybe_unused *bd)
struct fdt_header *fdt = blob;
int node;
- /* We only want to do this fix-up for the RB1 board, quick return for all others */
- if (!fdt_node_check_compatible(fdt, 0, "qcom,qrb4210-rb2"))
- return 0;
-
- fdt_for_each_node_by_compatible(node, blob, 0, "snps,dwc3") {
- log_debug("%s: Setting 'dr_mode' to OTG\n", fdt_get_name(blob, node, NULL));
- fdt_setprop_string(fdt, node, "dr_mode", "otg");
- break;
+ /* On RB1/2 we need to fix-up the dr_mode */
+ if (!fdt_node_check_compatible(fdt, 0, "qcom,qrb4210-rb2") ||
+ !fdt_node_check_compatible(fdt, 0, "qcom,qrb2210-rb1")) {
+ fdt_for_each_node_by_compatible(node, blob, 0, "snps,dwc3") {
+ log_debug("%s: Setting 'dr_mode' to OTG\n", fdt_get_name(blob, node, NULL));
+ fdt_setprop_string(fdt, node, "dr_mode", "otg");
+ break;
+ }
}
return 0;