diff options
author | Lan Tianyu <tianyu.lan@intel.com> | 2012-08-17 02:44:09 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-09-21 13:30:29 -0400 |
commit | 1033f9041d526dd694e2b2e12744e47c41040c4d (patch) | |
tree | a953100e337dd4f464253f88a476f990c4209f26 /include/acpi | |
parent | c46de2263f42fb4bbde411b9126f471e9343cb22 (diff) |
ACPI: Allow ACPI binding with USB-3.0 hub
A USB port's position and connectability can't be identified on some boards
via USB hub registers. ACPI _UPC and _PLD can help to resolve this issue
and so it is necessary to bind USB with ACPI. This patch is to allow ACPI
binding with USB-3.0 hub.
Current ACPI only can bind one struct-device to one ACPI device node.
This can not work with USB-3.0 hub, because the USB-3.0 hub has two logical
devices. Each works for USB-2.0 and USB-3.0 devices. In the Linux USB subsystem,
those two logical hubs are treated as two seperate devices that have two struct
devices. But in the ACPI DSDT, these two logical hubs share one ACPI device
node. So there is a requirement to bind multi struct-devices to one ACPI
device node. This patch is to resolve such problem.
Following is the ACPI device nodes' description under xhci hcd.
Device (XHC)
Device (RHUB)
Device (HSP1)
Device (HSP2)
Device (HSP3)
Device (HSP4)
Device (SSP1)
Device (SSP2)
Device (SSP3)
Device (SSP4)
Topology in the Linux
device XHC
USB-2.0 logical hub USB-3.0 logical hub
HSP1 SSP1
HSP2 SSP2
HSP3 SSP3
HSP4 SSP4
This patch also modifies the output of /proc/acpi/wakeup. One ACPI node
can be associated with multiple devices:
XHC S4 *enabled pci:0000:00:14.0
RHUB S0 disabled usb:usb1
disabled usb:usb2
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Acked-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r-- | include/acpi/acpi_bus.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index bde976ee068d..453596d4ce65 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -282,8 +282,16 @@ struct acpi_device_wakeup { | |||
282 | int prepare_count; | 282 | int prepare_count; |
283 | }; | 283 | }; |
284 | 284 | ||
285 | /* Device */ | 285 | struct acpi_device_physical_node { |
286 | u8 node_id; | ||
287 | struct list_head node; | ||
288 | struct device *dev; | ||
289 | }; | ||
286 | 290 | ||
291 | /* set maximum of physical nodes to 32 for expansibility */ | ||
292 | #define ACPI_MAX_PHYSICAL_NODE 32 | ||
293 | |||
294 | /* Device */ | ||
287 | struct acpi_device { | 295 | struct acpi_device { |
288 | int device_type; | 296 | int device_type; |
289 | acpi_handle handle; /* no handle for fixed hardware */ | 297 | acpi_handle handle; /* no handle for fixed hardware */ |
@@ -304,6 +312,10 @@ struct acpi_device { | |||
304 | struct device dev; | 312 | struct device dev; |
305 | struct acpi_bus_ops bus_ops; /* workaround for different code path for hotplug */ | 313 | struct acpi_bus_ops bus_ops; /* workaround for different code path for hotplug */ |
306 | enum acpi_bus_removal_type removal_type; /* indicate for different removal type */ | 314 | enum acpi_bus_removal_type removal_type; /* indicate for different removal type */ |
315 | u8 physical_node_count; | ||
316 | struct list_head physical_node_list; | ||
317 | struct mutex physical_node_lock; | ||
318 | DECLARE_BITMAP(physical_node_id_bitmap, ACPI_MAX_PHYSICAL_NODE); | ||
307 | }; | 319 | }; |
308 | 320 | ||
309 | static inline void *acpi_driver_data(struct acpi_device *d) | 321 | static inline void *acpi_driver_data(struct acpi_device *d) |
@@ -394,7 +406,6 @@ struct acpi_bus_type { | |||
394 | }; | 406 | }; |
395 | int register_acpi_bus_type(struct acpi_bus_type *); | 407 | int register_acpi_bus_type(struct acpi_bus_type *); |
396 | int unregister_acpi_bus_type(struct acpi_bus_type *); | 408 | int unregister_acpi_bus_type(struct acpi_bus_type *); |
397 | struct device *acpi_get_physical_device(acpi_handle); | ||
398 | 409 | ||
399 | struct acpi_pci_root { | 410 | struct acpi_pci_root { |
400 | struct list_head node; | 411 | struct list_head node; |