Commit c026c987 authored by Anton Vorontsov's avatar Anton Vorontsov Committed by Kumar Gala

powerpc/83xx: Do not configure or probe disabled FSL DR USB controllers

On MPC837X CPUs Dual-Role USB isn't always available (for example DR
USB pins can be muxed away to eSDHC).

U-Boot adds status = "disabled" property into the DR USB nodes to
indicate that we must not try to configure or probe Dual-Role USB,
otherwise we'll break eSDHC support on targets with MPC837X CPUs.
Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
parent 30c40469
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/stddef.h> #include <linux/stddef.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/of.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/prom.h> #include <asm/prom.h>
...@@ -210,7 +211,7 @@ int mpc837x_usb_cfg(void) ...@@ -210,7 +211,7 @@ int mpc837x_usb_cfg(void)
int ret = 0; int ret = 0;
np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr"); np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr");
if (!np) if (!np || !of_device_is_available(np))
return -ENODEV; return -ENODEV;
prop = of_get_property(np, "phy_type", NULL); prop = of_get_property(np, "phy_type", NULL);
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/of.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <linux/phy.h> #include <linux/phy.h>
#include <linux/phy_fixed.h> #include <linux/phy_fixed.h>
...@@ -328,6 +329,9 @@ static int __init fsl_usb_of_init(void) ...@@ -328,6 +329,9 @@ static int __init fsl_usb_of_init(void)
struct fsl_usb2_platform_data usb_data; struct fsl_usb2_platform_data usb_data;
const unsigned char *prop = NULL; const unsigned char *prop = NULL;
if (!of_device_is_available(np))
continue;
memset(&r, 0, sizeof(r)); memset(&r, 0, sizeof(r));
memset(&usb_data, 0, sizeof(usb_data)); memset(&usb_data, 0, sizeof(usb_data));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment