usb: {ohci,ehci}-platform: Use new OF big-endian helper function
Subsystems (4)
PATCH v2 1/1 usb: {ohci,ehci}-platform: Use new OF big-endian helper function
This handles the existing "big-endian" case, and in addition, it also does the right thing when "native-endian" is specified.
--- Documentation/devicetree/bindings/usb/usb-ehci.txt | 2 ++ Documentation/devicetree/bindings/usb/usb-ohci.txt | 2 ++ drivers/usb/host/ehci-platform.c | 2 +- drivers/usb/host/ohci-platform.c | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-)
V1->V2: Tweak documentation per feedback on the list
This depends on the new of_device_is_big_endian() function, which is being handled through Grant's tree.
Documentation/devicetree/bindings/usb/usb-ehci.txt +2 -0
@@ -12,6 +12,8 @@ Optional properties: - big-endian-regs : boolean, set this for hcds with big-endian registers - big-endian-desc : boolean, set this for hcds with big-endian descriptors - big-endian : boolean, for hcds with big-endian-regs + big-endian-desc + - native-endian : boolean, enables big-endian-regs + big-endian-desc + if the CPU is running in big-endian mode - clocks : a list of phandle + clock specifier pairs - phys : phandle + phy specifier pair - phy-names : "usb"
Documentation/devicetree/bindings/usb/usb-ohci.txt +2 -0
@@ -9,6 +9,8 @@ Optional properties: - big-endian-regs : boolean, set this for hcds with big-endian registers - big-endian-desc : boolean, set this for hcds with big-endian descriptors - big-endian : boolean, for hcds with big-endian-regs + big-endian-desc +- native-endian : boolean, enables big-endian-regs + big-endian-desc + if the CPU is running in big-endian mode - no-big-frame-no : boolean, set if frame_no lives in bits [15:0] of HCCA - num-ports : u32, to override the detected port count - clocks : a list of phandle + clock specifier pairs
drivers/usb/host/ehci-platform.c +1 -1
@@ -187,7 +187,7 @@ static int ehci_platform_probe(struct platform_device *dev)if (of_property_read_bool (dev->dev.of_node,"big-endian-desc" )) ehci->big_endian_desc =1 ; -if (of_property_read_bool (dev->dev.of_node,"big-endian" )) +if (of_device_is_big_endian (dev->dev.of_node)) ehci->big_endian_mmio = ehci->big_endian_desc =1 ; priv->phy =devm_phy_get (&dev->dev,"usb" );
drivers/usb/host/ohci-platform.c +1 -1
@@ -157,7 +157,7 @@ static int ohci_platform_probe(struct platform_device *dev)if (of_property_read_bool (dev->dev.of_node,"big-endian-desc" )) ohci->flags |=OHCI_QUIRK_BE_DESC ; -if (of_property_read_bool (dev->dev.of_node,"big-endian" )) +if (of_device_is_big_endian (dev->dev.of_node)) ohci->flags |=OHCI_QUIRK_BE_MMIO |OHCI_QUIRK_BE_DESC ;if (of_property_read_bool (dev->dev.of_node,"no-big-frame-no" ))
Signature · 6 lines
2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Greg KH
Acked-byQuoted 13 lines · Kevin Cernekee
This handles the existing "big-endian" case, and in addition, it also does the right thing when "native-endian" is specified.
Signed-off-by Kevin Cernekee <[email protected]>--- Documentation/devicetree/bindings/usb/usb-ehci.txt | 2 ++ Documentation/devicetree/bindings/usb/usb-ohci.txt | 2 ++ drivers/usb/host/ehci-platform.c | 2 +- drivers/usb/host/ohci-platform.c | 2 +- 4 files changed, 6 insertions(+), 2 deletions(-)
Quoted 4 lines
V1->V2: Tweak documentation per feedback on the listThis depends on the new
of_device_is_big_endian()function, which is being handled through Grant's tree.
Feel free to take this one through Grant's tree too:
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html