File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818#include <linux/platform_device.h>
1919#include <linux/usb.h>
2020#include <linux/usb/hcd.h>
21+ #include <linux/usb/phy.h>
22+ #include <linux/usb/of.h>
2123
2224#include "ehci.h"
2325
2426#define DRIVER_DESC "EHCI Atmel driver"
2527
2628static const char hcd_name [] = "ehci-atmel" ;
2729
30+ #define EHCI_INSNREG (index ) ((index) * 4 + 0x90)
31+ #define EHCI_INSNREG08_HSIC_EN BIT(2)
32+
2833/* interface and function clocks */
2934#define hcd_to_atmel_ehci_priv (h ) \
3035 ((struct atmel_ehci_priv *)hcd_to_ehci(h)->priv)
@@ -154,6 +159,9 @@ static int ehci_atmel_drv_probe(struct platform_device *pdev)
154159 goto fail_add_hcd ;
155160 device_wakeup_enable (hcd -> self .controller );
156161
162+ if (of_usb_get_phy_mode (pdev -> dev .of_node ) == USBPHY_INTERFACE_MODE_HSIC )
163+ writel (EHCI_INSNREG08_HSIC_EN , hcd -> regs + EHCI_INSNREG (8 ));
164+
157165 return retval ;
158166
159167fail_add_hcd :
You can’t perform that action at this time.
0 commit comments