dwc3-pci.c (51c1685d956221576e165dd88a20063b169bae5a) dwc3-pci.c (0eae2fde164caaa013a3f7341fd3e7e36e8e2865)
1/**
2 * dwc3-pci.c - PCI Specific glue layer
3 *
4 * Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com
5 *
6 * Authors: Felipe Balbi <balbi@ti.com>,
7 * Sebastian Andrzej Siewior <bigeasy@linutronix.de>
8 *

--- 59 unchanged lines hidden (view full) ---

68 { "cs-gpios", &cs_gpios, 1 },
69 { },
70};
71
72static int dwc3_pci_quirks(struct dwc3_pci *dwc)
73{
74 struct platform_device *dwc3 = dwc->dwc3;
75 struct pci_dev *pdev = dwc->pci;
1/**
2 * dwc3-pci.c - PCI Specific glue layer
3 *
4 * Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com
5 *
6 * Authors: Felipe Balbi <balbi@ti.com>,
7 * Sebastian Andrzej Siewior <bigeasy@linutronix.de>
8 *

--- 59 unchanged lines hidden (view full) ---

68 { "cs-gpios", &cs_gpios, 1 },
69 { },
70};
71
72static int dwc3_pci_quirks(struct dwc3_pci *dwc)
73{
74 struct platform_device *dwc3 = dwc->dwc3;
75 struct pci_dev *pdev = dwc->pci;
76 int ret;
77
76
78 struct property_entry sysdev_property[] = {
79 PROPERTY_ENTRY_BOOL("linux,sysdev_is_parent"),
80 { },
81 };
82
83 ret = platform_device_add_properties(dwc3, sysdev_property);
84 if (ret)
85 return ret;
86
87 if (pdev->vendor == PCI_VENDOR_ID_AMD &&
88 pdev->device == PCI_DEVICE_ID_AMD_NL_USB) {
89 struct property_entry properties[] = {
90 PROPERTY_ENTRY_BOOL("snps,has-lpm-erratum"),
91 PROPERTY_ENTRY_U8("snps,lpm-nyet-threshold", 0xf),
92 PROPERTY_ENTRY_BOOL("snps,u2exit_lfps_quirk"),
93 PROPERTY_ENTRY_BOOL("snps,u2ss_inp3_quirk"),
94 PROPERTY_ENTRY_BOOL("snps,req_p1p2p3_quirk"),

--- 5 unchanged lines hidden (view full) ---

100 PROPERTY_ENTRY_U8("snps,tx_de_emphasis", 1),
101 /*
102 * FIXME these quirks should be removed when AMD NL
103 * tapes out
104 */
105 PROPERTY_ENTRY_BOOL("snps,disable_scramble_quirk"),
106 PROPERTY_ENTRY_BOOL("snps,dis_u3_susphy_quirk"),
107 PROPERTY_ENTRY_BOOL("snps,dis_u2_susphy_quirk"),
77 if (pdev->vendor == PCI_VENDOR_ID_AMD &&
78 pdev->device == PCI_DEVICE_ID_AMD_NL_USB) {
79 struct property_entry properties[] = {
80 PROPERTY_ENTRY_BOOL("snps,has-lpm-erratum"),
81 PROPERTY_ENTRY_U8("snps,lpm-nyet-threshold", 0xf),
82 PROPERTY_ENTRY_BOOL("snps,u2exit_lfps_quirk"),
83 PROPERTY_ENTRY_BOOL("snps,u2ss_inp3_quirk"),
84 PROPERTY_ENTRY_BOOL("snps,req_p1p2p3_quirk"),

--- 5 unchanged lines hidden (view full) ---

90 PROPERTY_ENTRY_U8("snps,tx_de_emphasis", 1),
91 /*
92 * FIXME these quirks should be removed when AMD NL
93 * tapes out
94 */
95 PROPERTY_ENTRY_BOOL("snps,disable_scramble_quirk"),
96 PROPERTY_ENTRY_BOOL("snps,dis_u3_susphy_quirk"),
97 PROPERTY_ENTRY_BOOL("snps,dis_u2_susphy_quirk"),
98 PROPERTY_ENTRY_BOOL("linux,sysdev_is_parent"),
108 { },
109 };
110
111 return platform_device_add_properties(dwc3, properties);
112 }
113
114 if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
115 int ret;
116
117 struct property_entry properties[] = {
118 PROPERTY_ENTRY_STRING("dr_mode", "peripheral"),
99 { },
100 };
101
102 return platform_device_add_properties(dwc3, properties);
103 }
104
105 if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
106 int ret;
107
108 struct property_entry properties[] = {
109 PROPERTY_ENTRY_STRING("dr_mode", "peripheral"),
110 PROPERTY_ENTRY_BOOL("linux,sysdev_is_parent"),
119 { }
120 };
121
122 ret = platform_device_add_properties(dwc3, properties);
123 if (ret < 0)
124 return ret;
125
126 if (pdev->device == PCI_DEVICE_ID_INTEL_BXT ||

--- 35 unchanged lines hidden (view full) ---

162 if (pdev->vendor == PCI_VENDOR_ID_SYNOPSYS &&
163 (pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3 ||
164 pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3_AXI ||
165 pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB31)) {
166 struct property_entry properties[] = {
167 PROPERTY_ENTRY_BOOL("snps,usb3_lpm_capable"),
168 PROPERTY_ENTRY_BOOL("snps,has-lpm-erratum"),
169 PROPERTY_ENTRY_BOOL("snps,dis_enblslpm_quirk"),
111 { }
112 };
113
114 ret = platform_device_add_properties(dwc3, properties);
115 if (ret < 0)
116 return ret;
117
118 if (pdev->device == PCI_DEVICE_ID_INTEL_BXT ||

--- 35 unchanged lines hidden (view full) ---

154 if (pdev->vendor == PCI_VENDOR_ID_SYNOPSYS &&
155 (pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3 ||
156 pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3_AXI ||
157 pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB31)) {
158 struct property_entry properties[] = {
159 PROPERTY_ENTRY_BOOL("snps,usb3_lpm_capable"),
160 PROPERTY_ENTRY_BOOL("snps,has-lpm-erratum"),
161 PROPERTY_ENTRY_BOOL("snps,dis_enblslpm_quirk"),
162 PROPERTY_ENTRY_BOOL("linux,sysdev_is_parent"),
170 { },
171 };
172
173 return platform_device_add_properties(dwc3, properties);
174 }
175
176 return 0;
177}

--- 192 unchanged lines hidden ---
163 { },
164 };
165
166 return platform_device_add_properties(dwc3, properties);
167 }
168
169 return 0;
170}

--- 192 unchanged lines hidden ---