forked from Minki/linux
[POWERPC] 83xx: USB device tree cleanups
Remove device_type = "usb" for 83xx SoC USB controller Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
This commit is contained in:
parent
e10241d8a1
commit
866b6ddd28
|
@ -1411,7 +1411,6 @@ platforms are moved over to use the flattened-device-tree model.
|
||||||
|
|
||||||
Example multi port host USB controller device node :
|
Example multi port host USB controller device node :
|
||||||
usb@22000 {
|
usb@22000 {
|
||||||
device_type = "usb";
|
|
||||||
compatible = "fsl-usb2-mph";
|
compatible = "fsl-usb2-mph";
|
||||||
reg = <22000 1000>;
|
reg = <22000 1000>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
@ -1425,7 +1424,6 @@ platforms are moved over to use the flattened-device-tree model.
|
||||||
|
|
||||||
Example dual role USB controller device node :
|
Example dual role USB controller device node :
|
||||||
usb@23000 {
|
usb@23000 {
|
||||||
device_type = "usb";
|
|
||||||
compatible = "fsl-usb2-dr";
|
compatible = "fsl-usb2-dr";
|
||||||
reg = <23000 1000>;
|
reg = <23000 1000>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
@ -1589,7 +1587,6 @@ platforms are moved over to use the flattened-device-tree model.
|
||||||
iii) USB (Universal Serial Bus Controller)
|
iii) USB (Universal Serial Bus Controller)
|
||||||
|
|
||||||
Required properties:
|
Required properties:
|
||||||
- device_type : should be "usb".
|
|
||||||
- compatible : could be "qe_udc" or "fhci-hcd".
|
- compatible : could be "qe_udc" or "fhci-hcd".
|
||||||
- mode : the could be "host" or "slave".
|
- mode : the could be "host" or "slave".
|
||||||
- reg : Offset and length of the register set for the device
|
- reg : Offset and length of the register set for the device
|
||||||
|
@ -1603,7 +1600,6 @@ platforms are moved over to use the flattened-device-tree model.
|
||||||
|
|
||||||
Example(slave):
|
Example(slave):
|
||||||
usb@6c0 {
|
usb@6c0 {
|
||||||
device_type = "usb";
|
|
||||||
compatible = "qe_udc";
|
compatible = "qe_udc";
|
||||||
reg = <6c0 40>;
|
reg = <6c0 40>;
|
||||||
interrupts = <8b 0>;
|
interrupts = <8b 0>;
|
||||||
|
|
|
@ -92,7 +92,6 @@
|
||||||
|
|
||||||
/* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
|
/* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
|
||||||
usb@23000 {
|
usb@23000 {
|
||||||
device_type = "usb";
|
|
||||||
compatible = "fsl-usb2-dr";
|
compatible = "fsl-usb2-dr";
|
||||||
reg = <23000 1000>;
|
reg = <23000 1000>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
|
|
@ -210,7 +210,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
usb@6c0 {
|
usb@6c0 {
|
||||||
device_type = "usb";
|
|
||||||
compatible = "qe_udc";
|
compatible = "qe_udc";
|
||||||
reg = <6c0 40 8B00 100>;
|
reg = <6c0 40 8B00 100>;
|
||||||
interrupts = <b>;
|
interrupts = <b>;
|
||||||
|
|
|
@ -91,7 +91,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
usb@22000 {
|
usb@22000 {
|
||||||
device_type = "usb";
|
|
||||||
compatible = "fsl-usb2-mph";
|
compatible = "fsl-usb2-mph";
|
||||||
reg = <22000 1000>;
|
reg = <22000 1000>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
@ -103,7 +102,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
usb@23000 {
|
usb@23000 {
|
||||||
device_type = "usb";
|
|
||||||
compatible = "fsl-usb2-dr";
|
compatible = "fsl-usb2-dr";
|
||||||
reg = <23000 1000>;
|
reg = <23000 1000>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
|
|
@ -89,7 +89,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
usb@23000 {
|
usb@23000 {
|
||||||
device_type = "usb";
|
|
||||||
compatible = "fsl-usb2-dr";
|
compatible = "fsl-usb2-dr";
|
||||||
reg = <23000 1000>;
|
reg = <23000 1000>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
|
|
@ -104,7 +104,6 @@
|
||||||
/* phy type (ULPI or SERIAL) are only types supportted for MPH */
|
/* phy type (ULPI or SERIAL) are only types supportted for MPH */
|
||||||
/* port = 0 or 1 */
|
/* port = 0 or 1 */
|
||||||
usb@22000 {
|
usb@22000 {
|
||||||
device_type = "usb";
|
|
||||||
compatible = "fsl-usb2-mph";
|
compatible = "fsl-usb2-mph";
|
||||||
reg = <22000 1000>;
|
reg = <22000 1000>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
@ -116,7 +115,6 @@
|
||||||
};
|
};
|
||||||
/* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
|
/* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */
|
||||||
usb@23000 {
|
usb@23000 {
|
||||||
device_type = "usb";
|
|
||||||
compatible = "fsl-usb2-dr";
|
compatible = "fsl-usb2-dr";
|
||||||
reg = <23000 1000>;
|
reg = <23000 1000>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
|
|
@ -241,7 +241,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
usb@6c0 {
|
usb@6c0 {
|
||||||
device_type = "usb";
|
|
||||||
compatible = "qe_udc";
|
compatible = "qe_udc";
|
||||||
reg = <6c0 40 8B00 100>;
|
reg = <6c0 40 8B00 100>;
|
||||||
interrupts = <b>;
|
interrupts = <b>;
|
||||||
|
|
|
@ -41,7 +41,7 @@ int mpc834x_usb_cfg(void)
|
||||||
sicrl = in_be32(immap + MPC83XX_SICRL_OFFS) & ~MPC834X_SICRL_USB_MASK;
|
sicrl = in_be32(immap + MPC83XX_SICRL_OFFS) & ~MPC834X_SICRL_USB_MASK;
|
||||||
sicrh = in_be32(immap + MPC83XX_SICRH_OFFS) & ~MPC834X_SICRH_USB_UTMI;
|
sicrh = in_be32(immap + MPC83XX_SICRH_OFFS) & ~MPC834X_SICRH_USB_UTMI;
|
||||||
|
|
||||||
np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr");
|
np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr");
|
||||||
if (np) {
|
if (np) {
|
||||||
sccr |= MPC83XX_SCCR_USB_DRCM_11; /* 1:3 */
|
sccr |= MPC83XX_SCCR_USB_DRCM_11; /* 1:3 */
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ int mpc834x_usb_cfg(void)
|
||||||
port0_is_dr = 1;
|
port0_is_dr = 1;
|
||||||
of_node_put(np);
|
of_node_put(np);
|
||||||
}
|
}
|
||||||
np = of_find_compatible_node(NULL, "usb", "fsl-usb2-mph");
|
np = of_find_compatible_node(NULL, NULL, "fsl-usb2-mph");
|
||||||
if (np) {
|
if (np) {
|
||||||
sccr |= MPC83XX_SCCR_USB_MPHCM_11; /* 1:3 */
|
sccr |= MPC83XX_SCCR_USB_MPHCM_11; /* 1:3 */
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ int mpc831x_usb_cfg(void)
|
||||||
const void *dr_mode;
|
const void *dr_mode;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr");
|
np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr");
|
||||||
if (!np)
|
if (!np)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
prop = of_get_property(np, "phy_type", NULL);
|
prop = of_get_property(np, "phy_type", NULL);
|
||||||
|
@ -188,7 +188,7 @@ int mpc837x_usb_cfg(void)
|
||||||
const void *prop;
|
const void *prop;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
np = of_find_compatible_node(NULL, "usb", "fsl-usb2-dr");
|
np = of_find_compatible_node(NULL, NULL, "fsl-usb2-dr");
|
||||||
if (!np)
|
if (!np)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
prop = of_get_property(np, "phy_type", NULL);
|
prop = of_get_property(np, "phy_type", NULL);
|
||||||
|
|
|
@ -531,14 +531,12 @@ static enum fsl_usb2_phy_modes determine_usb_phy(const char *phy_type)
|
||||||
static int __init fsl_usb_of_init(void)
|
static int __init fsl_usb_of_init(void)
|
||||||
{
|
{
|
||||||
struct device_node *np;
|
struct device_node *np;
|
||||||
unsigned int i;
|
unsigned int i = 0;
|
||||||
struct platform_device *usb_dev_mph = NULL, *usb_dev_dr_host = NULL,
|
struct platform_device *usb_dev_mph = NULL, *usb_dev_dr_host = NULL,
|
||||||
*usb_dev_dr_client = NULL;
|
*usb_dev_dr_client = NULL;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
for (np = NULL, i = 0;
|
for_each_compatible_node(np, NULL, "fsl-usb2-mph") {
|
||||||
(np = of_find_compatible_node(np, "usb", "fsl-usb2-mph")) != NULL;
|
|
||||||
i++) {
|
|
||||||
struct resource r[2];
|
struct resource r[2];
|
||||||
struct fsl_usb2_platform_data usb_data;
|
struct fsl_usb2_platform_data usb_data;
|
||||||
const unsigned char *prop = NULL;
|
const unsigned char *prop = NULL;
|
||||||
|
@ -581,11 +579,10 @@ static int __init fsl_usb_of_init(void)
|
||||||
fsl_usb2_platform_data));
|
fsl_usb2_platform_data));
|
||||||
if (ret)
|
if (ret)
|
||||||
goto unreg_mph;
|
goto unreg_mph;
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (np = NULL;
|
for_each_compatible_node(np, NULL, "fsl-usb2-dr") {
|
||||||
(np = of_find_compatible_node(np, "usb", "fsl-usb2-dr")) != NULL;
|
|
||||||
i++) {
|
|
||||||
struct resource r[2];
|
struct resource r[2];
|
||||||
struct fsl_usb2_platform_data usb_data;
|
struct fsl_usb2_platform_data usb_data;
|
||||||
const unsigned char *prop = NULL;
|
const unsigned char *prop = NULL;
|
||||||
|
@ -657,6 +654,7 @@ static int __init fsl_usb_of_init(void)
|
||||||
fsl_usb2_platform_data))))
|
fsl_usb2_platform_data))))
|
||||||
goto unreg_dr;
|
goto unreg_dr;
|
||||||
}
|
}
|
||||||
|
i++;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user