Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb778553 authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Greg Kroah-Hartman
Browse files

staging: octeon-usb: support official bindings



Support official DT bindings alongside with the deprecated ones.

Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a25e2780
Loading
Loading
Loading
Loading
+10 −4
Original line number Original line Diff line number Diff line
@@ -3593,10 +3593,13 @@ static int octeon_usb_probe(struct platform_device *pdev)
	}
	}
	usbn_node = dev->of_node->parent;
	usbn_node = dev->of_node->parent;


	i = of_property_read_u32(usbn_node,
				 "clock-frequency", &clock_rate);
	if (i)
		i = of_property_read_u32(usbn_node,
		i = of_property_read_u32(usbn_node,
					 "refclk-frequency", &clock_rate);
					 "refclk-frequency", &clock_rate);
	if (i) {
	if (i) {
		dev_err(dev, "No USBN \"refclk-frequency\"\n");
		dev_err(dev, "No USBN \"clock-frequency\"\n");
		return -ENXIO;
		return -ENXIO;
	}
	}
	switch (clock_rate) {
	switch (clock_rate) {
@@ -3610,12 +3613,15 @@ static int octeon_usb_probe(struct platform_device *pdev)
		initialize_flags = CVMX_USB_INITIALIZE_FLAGS_CLOCK_48MHZ;
		initialize_flags = CVMX_USB_INITIALIZE_FLAGS_CLOCK_48MHZ;
		break;
		break;
	default:
	default:
		dev_err(dev, "Illebal USBN \"refclk-frequency\" %u\n",
		dev_err(dev, "Illegal USBN \"clock-frequency\" %u\n",
				clock_rate);
				clock_rate);
		return -ENXIO;
		return -ENXIO;


	}
	}


	i = of_property_read_string(usbn_node,
				    "cavium,refclk-type", &clock_type);
	if (i)
		i = of_property_read_string(usbn_node,
		i = of_property_read_string(usbn_node,
					    "refclk-type", &clock_type);
					    "refclk-type", &clock_type);