diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/acpi/acbuffer.h | 2 | ||||
| -rw-r--r-- | include/acpi/acconfig.h | 2 | ||||
| -rw-r--r-- | include/acpi/acexcep.h | 2 | ||||
| -rw-r--r-- | include/acpi/acnames.h | 2 | ||||
| -rw-r--r-- | include/acpi/acoutput.h | 2 | ||||
| -rw-r--r-- | include/acpi/acpi.h | 2 | ||||
| -rw-r--r-- | include/acpi/acpiosxf.h | 2 | ||||
| -rw-r--r-- | include/acpi/acpixf.h | 18 | ||||
| -rw-r--r-- | include/acpi/acrestyp.h | 42 | ||||
| -rw-r--r-- | include/acpi/actbl.h | 2 | ||||
| -rw-r--r-- | include/acpi/actbl1.h | 2 | ||||
| -rw-r--r-- | include/acpi/actbl2.h | 2 | ||||
| -rw-r--r-- | include/acpi/actbl3.h | 2 | ||||
| -rw-r--r-- | include/acpi/actypes.h | 14 | ||||
| -rw-r--r-- | include/acpi/platform/acenv.h | 2 | ||||
| -rw-r--r-- | include/acpi/platform/acenvex.h | 2 | ||||
| -rw-r--r-- | include/acpi/platform/acgcc.h | 2 | ||||
| -rw-r--r-- | include/acpi/platform/aclinux.h | 2 | ||||
| -rw-r--r-- | include/acpi/platform/aclinuxex.h | 2 | ||||
| -rw-r--r-- | include/linux/acpi.h | 22 | ||||
| -rw-r--r-- | include/linux/cpufreq.h | 10 | ||||
| -rw-r--r-- | include/linux/devfreq-event.h | 196 | ||||
| -rw-r--r-- | include/linux/pci.h | 9 | ||||
| -rw-r--r-- | include/linux/pm.h | 2 | ||||
| -rw-r--r-- | include/linux/pm_domain.h | 4 | ||||
| -rw-r--r-- | include/linux/resource_ext.h | 77 |
26 files changed, 355 insertions, 71 deletions
diff --git a/include/acpi/acbuffer.h b/include/acpi/acbuffer.h index d5ec6c87810f..6b040f4ddfab 100644 --- a/include/acpi/acbuffer.h +++ b/include/acpi/acbuffer.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 5a0a3e5daf85..03aacfb3e98b 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h index 8b06e4c1dd5d..11c3a011dcbf 100644 --- a/include/acpi/acexcep.h +++ b/include/acpi/acexcep.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acnames.h b/include/acpi/acnames.h index 7461327e14e4..273de709495c 100644 --- a/include/acpi/acnames.h +++ b/include/acpi/acnames.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h index 1baae6edda89..9318a87ee39a 100644 --- a/include/acpi/acoutput.h +++ b/include/acpi/acoutput.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acpi.h b/include/acpi/acpi.h index a08e55a263c9..b0bb30ebb807 100644 --- a/include/acpi/acpi.h +++ b/include/acpi/acpi.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 03b3e6d405ff..0bc78df66d4b 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | *****************************************************************************/ | 7 | *****************************************************************************/ |
| 8 | 8 | ||
| 9 | /* | 9 | /* |
| 10 | * Copyright (C) 2000 - 2014, Intel Corp. | 10 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 11 | * All rights reserved. | 11 | * All rights reserved. |
| 12 | * | 12 | * |
| 13 | * Redistribution and use in source and binary forms, with or without | 13 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 5ba78464c1b1..d56f5d722138 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
| @@ -46,7 +46,7 @@ | |||
| 46 | 46 | ||
| 47 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 47 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
| 48 | 48 | ||
| 49 | #define ACPI_CA_VERSION 0x20141107 | 49 | #define ACPI_CA_VERSION 0x20150204 |
| 50 | 50 | ||
| 51 | #include <acpi/acconfig.h> | 51 | #include <acpi/acconfig.h> |
| 52 | #include <acpi/actypes.h> | 52 | #include <acpi/actypes.h> |
| @@ -569,6 +569,14 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |||
| 569 | address, | 569 | address, |
| 570 | void *context)) | 570 | void *context)) |
| 571 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 571 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 572 | acpi_install_gpe_raw_handler(acpi_handle | ||
| 573 | gpe_device, | ||
| 574 | u32 gpe_number, | ||
| 575 | u32 type, | ||
| 576 | acpi_gpe_handler | ||
| 577 | address, | ||
| 578 | void *context)) | ||
| 579 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
| 572 | acpi_remove_gpe_handler(acpi_handle gpe_device, | 580 | acpi_remove_gpe_handler(acpi_handle gpe_device, |
| 573 | u32 gpe_number, | 581 | u32 gpe_number, |
| 574 | acpi_gpe_handler | 582 | acpi_gpe_handler |
| @@ -891,12 +899,6 @@ ACPI_APP_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(1) | |||
| 891 | ACPI_GLOBAL(u8, acpi_gbl_permanent_mmap); | 899 | ACPI_GLOBAL(u8, acpi_gbl_permanent_mmap); |
| 892 | 900 | ||
| 893 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status | 901 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
| 894 | acpi_get_id(acpi_handle object, | ||
| 895 | acpi_owner_id * out_type)) | ||
| 896 | |||
| 897 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_unload_table_id(acpi_owner_id id)) | ||
| 898 | |||
| 899 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status | ||
| 900 | acpi_get_table_with_size(acpi_string signature, | 902 | acpi_get_table_with_size(acpi_string signature, |
| 901 | u32 instance, | 903 | u32 instance, |
| 902 | struct acpi_table_header | 904 | struct acpi_table_header |
diff --git a/include/acpi/acrestyp.h b/include/acpi/acrestyp.h index eb760ca0b2e0..ebe242638591 100644 --- a/include/acpi/acrestyp.h +++ b/include/acpi/acrestyp.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
| @@ -305,43 +305,51 @@ struct acpi_resource_source { | |||
| 305 | u8 max_address_fixed; \ | 305 | u8 max_address_fixed; \ |
| 306 | union acpi_resource_attribute info; | 306 | union acpi_resource_attribute info; |
| 307 | 307 | ||
| 308 | struct acpi_resource_address { | 308 | struct acpi_address16_attribute { |
| 309 | ACPI_RESOURCE_ADDRESS_COMMON}; | 309 | u16 granularity; |
| 310 | |||
| 311 | struct acpi_resource_address16 { | ||
| 312 | ACPI_RESOURCE_ADDRESS_COMMON u16 granularity; | ||
| 313 | u16 minimum; | 310 | u16 minimum; |
| 314 | u16 maximum; | 311 | u16 maximum; |
| 315 | u16 translation_offset; | 312 | u16 translation_offset; |
| 316 | u16 address_length; | 313 | u16 address_length; |
| 317 | struct acpi_resource_source resource_source; | ||
| 318 | }; | 314 | }; |
| 319 | 315 | ||
| 320 | struct acpi_resource_address32 { | 316 | struct acpi_address32_attribute { |
| 321 | ACPI_RESOURCE_ADDRESS_COMMON u32 granularity; | 317 | u32 granularity; |
| 322 | u32 minimum; | 318 | u32 minimum; |
| 323 | u32 maximum; | 319 | u32 maximum; |
| 324 | u32 translation_offset; | 320 | u32 translation_offset; |
| 325 | u32 address_length; | 321 | u32 address_length; |
| 326 | struct acpi_resource_source resource_source; | ||
| 327 | }; | 322 | }; |
| 328 | 323 | ||
| 329 | struct acpi_resource_address64 { | 324 | struct acpi_address64_attribute { |
| 330 | ACPI_RESOURCE_ADDRESS_COMMON u64 granularity; | 325 | u64 granularity; |
| 331 | u64 minimum; | 326 | u64 minimum; |
| 332 | u64 maximum; | 327 | u64 maximum; |
| 333 | u64 translation_offset; | 328 | u64 translation_offset; |
| 334 | u64 address_length; | 329 | u64 address_length; |
| 330 | }; | ||
| 331 | |||
| 332 | struct acpi_resource_address { | ||
| 333 | ACPI_RESOURCE_ADDRESS_COMMON}; | ||
| 334 | |||
| 335 | struct acpi_resource_address16 { | ||
| 336 | ACPI_RESOURCE_ADDRESS_COMMON struct acpi_address16_attribute address; | ||
| 337 | struct acpi_resource_source resource_source; | ||
| 338 | }; | ||
| 339 | |||
| 340 | struct acpi_resource_address32 { | ||
| 341 | ACPI_RESOURCE_ADDRESS_COMMON struct acpi_address32_attribute address; | ||
| 342 | struct acpi_resource_source resource_source; | ||
| 343 | }; | ||
| 344 | |||
| 345 | struct acpi_resource_address64 { | ||
| 346 | ACPI_RESOURCE_ADDRESS_COMMON struct acpi_address64_attribute address; | ||
| 335 | struct acpi_resource_source resource_source; | 347 | struct acpi_resource_source resource_source; |
| 336 | }; | 348 | }; |
| 337 | 349 | ||
| 338 | struct acpi_resource_extended_address64 { | 350 | struct acpi_resource_extended_address64 { |
| 339 | ACPI_RESOURCE_ADDRESS_COMMON u8 revision_ID; | 351 | ACPI_RESOURCE_ADDRESS_COMMON u8 revision_ID; |
| 340 | u64 granularity; | 352 | struct acpi_address64_attribute address; |
| 341 | u64 minimum; | ||
| 342 | u64 maximum; | ||
| 343 | u64 translation_offset; | ||
| 344 | u64 address_length; | ||
| 345 | u64 type_specific; | 353 | u64 type_specific; |
| 346 | }; | 354 | }; |
| 347 | 355 | ||
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index bee19d8170c5..d4081fef1095 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index 29e79370641d..b80b0e6dabc5 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index ecff62405f17..f06d75e5fa54 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h index 5480cb2236bf..440ca8104b43 100644 --- a/include/acpi/actbl3.h +++ b/include/acpi/actbl3.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index bbef17368e49..b034f1068dfe 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
| @@ -744,7 +744,7 @@ typedef u32 acpi_event_status; | |||
| 744 | /* | 744 | /* |
| 745 | * GPE info flags - Per GPE | 745 | * GPE info flags - Per GPE |
| 746 | * +-------+-+-+---+ | 746 | * +-------+-+-+---+ |
| 747 | * | 7:4 |3|2|1:0| | 747 | * | 7:5 |4|3|2:0| |
| 748 | * +-------+-+-+---+ | 748 | * +-------+-+-+---+ |
| 749 | * | | | | | 749 | * | | | | |
| 750 | * | | | +-- Type of dispatch:to method, handler, notify, or none | 750 | * | | | +-- Type of dispatch:to method, handler, notify, or none |
| @@ -756,13 +756,15 @@ typedef u32 acpi_event_status; | |||
| 756 | #define ACPI_GPE_DISPATCH_METHOD (u8) 0x01 | 756 | #define ACPI_GPE_DISPATCH_METHOD (u8) 0x01 |
| 757 | #define ACPI_GPE_DISPATCH_HANDLER (u8) 0x02 | 757 | #define ACPI_GPE_DISPATCH_HANDLER (u8) 0x02 |
| 758 | #define ACPI_GPE_DISPATCH_NOTIFY (u8) 0x03 | 758 | #define ACPI_GPE_DISPATCH_NOTIFY (u8) 0x03 |
| 759 | #define ACPI_GPE_DISPATCH_MASK (u8) 0x03 | 759 | #define ACPI_GPE_DISPATCH_RAW_HANDLER (u8) 0x04 |
| 760 | #define ACPI_GPE_DISPATCH_MASK (u8) 0x07 | ||
| 761 | #define ACPI_GPE_DISPATCH_TYPE(flags) ((u8) ((flags) & ACPI_GPE_DISPATCH_MASK)) | ||
| 760 | 762 | ||
| 761 | #define ACPI_GPE_LEVEL_TRIGGERED (u8) 0x04 | 763 | #define ACPI_GPE_LEVEL_TRIGGERED (u8) 0x08 |
| 762 | #define ACPI_GPE_EDGE_TRIGGERED (u8) 0x00 | 764 | #define ACPI_GPE_EDGE_TRIGGERED (u8) 0x00 |
| 763 | #define ACPI_GPE_XRUPT_TYPE_MASK (u8) 0x04 | 765 | #define ACPI_GPE_XRUPT_TYPE_MASK (u8) 0x08 |
| 764 | 766 | ||
| 765 | #define ACPI_GPE_CAN_WAKE (u8) 0x08 | 767 | #define ACPI_GPE_CAN_WAKE (u8) 0x10 |
| 766 | 768 | ||
| 767 | /* | 769 | /* |
| 768 | * Flags for GPE and Lock interfaces | 770 | * Flags for GPE and Lock interfaces |
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index 5f8cc1fa3278..ad74dc51d5b7 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/platform/acenvex.h b/include/acpi/platform/acenvex.h index 2b612384c994..71e5ec5b07a3 100644 --- a/include/acpi/platform/acenvex.h +++ b/include/acpi/platform/acenvex.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/platform/acgcc.h b/include/acpi/platform/acgcc.h index 384875da3713..f54de0a63558 100644 --- a/include/acpi/platform/acgcc.h +++ b/include/acpi/platform/acgcc.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 1ba7c190c2cc..74ba46c8157a 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/acpi/platform/aclinuxex.h b/include/acpi/platform/aclinuxex.h index 568d4b886712..acedc3f026de 100644 --- a/include/acpi/platform/aclinuxex.h +++ b/include/acpi/platform/aclinuxex.h | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
| 6 | 6 | ||
| 7 | /* | 7 | /* |
| 8 | * Copyright (C) 2000 - 2014, Intel Corp. | 8 | * Copyright (C) 2000 - 2015, Intel Corp. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * | 10 | * |
| 11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index d459cd17b477..24c7aa8b1d20 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | 27 | ||
| 28 | #include <linux/errno.h> | 28 | #include <linux/errno.h> |
| 29 | #include <linux/ioport.h> /* for struct resource */ | 29 | #include <linux/ioport.h> /* for struct resource */ |
| 30 | #include <linux/resource_ext.h> | ||
| 30 | #include <linux/device.h> | 31 | #include <linux/device.h> |
| 31 | #include <linux/property.h> | 32 | #include <linux/property.h> |
| 32 | 33 | ||
| @@ -151,6 +152,10 @@ int acpi_map_cpu(acpi_handle handle, int physid, int *pcpu); | |||
| 151 | int acpi_unmap_cpu(int cpu); | 152 | int acpi_unmap_cpu(int cpu); |
| 152 | #endif /* CONFIG_ACPI_HOTPLUG_CPU */ | 153 | #endif /* CONFIG_ACPI_HOTPLUG_CPU */ |
| 153 | 154 | ||
| 155 | #ifdef CONFIG_ACPI_HOTPLUG_IOAPIC | ||
| 156 | int acpi_get_ioapic_id(acpi_handle handle, u32 gsi_base, u64 *phys_addr); | ||
| 157 | #endif | ||
| 158 | |||
| 154 | int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base); | 159 | int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base); |
| 155 | int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); | 160 | int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); |
| 156 | int acpi_ioapic_registered(acpi_handle handle, u32 gsi_base); | 161 | int acpi_ioapic_registered(acpi_handle handle, u32 gsi_base); |
| @@ -288,22 +293,25 @@ extern int pnpacpi_disabled; | |||
| 288 | bool acpi_dev_resource_memory(struct acpi_resource *ares, struct resource *res); | 293 | bool acpi_dev_resource_memory(struct acpi_resource *ares, struct resource *res); |
| 289 | bool acpi_dev_resource_io(struct acpi_resource *ares, struct resource *res); | 294 | bool acpi_dev_resource_io(struct acpi_resource *ares, struct resource *res); |
| 290 | bool acpi_dev_resource_address_space(struct acpi_resource *ares, | 295 | bool acpi_dev_resource_address_space(struct acpi_resource *ares, |
| 291 | struct resource *res); | 296 | struct resource_win *win); |
| 292 | bool acpi_dev_resource_ext_address_space(struct acpi_resource *ares, | 297 | bool acpi_dev_resource_ext_address_space(struct acpi_resource *ares, |
| 293 | struct resource *res); | 298 | struct resource_win *win); |
| 294 | unsigned long acpi_dev_irq_flags(u8 triggering, u8 polarity, u8 shareable); | 299 | unsigned long acpi_dev_irq_flags(u8 triggering, u8 polarity, u8 shareable); |
| 295 | bool acpi_dev_resource_interrupt(struct acpi_resource *ares, int index, | 300 | bool acpi_dev_resource_interrupt(struct acpi_resource *ares, int index, |
| 296 | struct resource *res); | 301 | struct resource *res); |
| 297 | 302 | ||
| 298 | struct resource_list_entry { | ||
| 299 | struct list_head node; | ||
| 300 | struct resource res; | ||
| 301 | }; | ||
| 302 | |||
| 303 | void acpi_dev_free_resource_list(struct list_head *list); | 303 | void acpi_dev_free_resource_list(struct list_head *list); |
| 304 | int acpi_dev_get_resources(struct acpi_device *adev, struct list_head *list, | 304 | int acpi_dev_get_resources(struct acpi_device *adev, struct list_head *list, |
| 305 | int (*preproc)(struct acpi_resource *, void *), | 305 | int (*preproc)(struct acpi_resource *, void *), |
| 306 | void *preproc_data); | 306 | void *preproc_data); |
| 307 | int acpi_dev_filter_resource_type(struct acpi_resource *ares, | ||
| 308 | unsigned long types); | ||
| 309 | |||
| 310 | static inline int acpi_dev_filter_resource_type_cb(struct acpi_resource *ares, | ||
| 311 | void *arg) | ||
| 312 | { | ||
| 313 | return acpi_dev_filter_resource_type(ares, (unsigned long)arg); | ||
| 314 | } | ||
| 307 | 315 | ||
| 308 | int acpi_check_resource_conflict(const struct resource *res); | 316 | int acpi_check_resource_conflict(const struct resource *res); |
| 309 | 317 | ||
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 4d078cebafd2..2ee4888c1f47 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
| @@ -66,8 +66,6 @@ struct cpufreq_policy { | |||
| 66 | unsigned int shared_type; /* ACPI: ANY or ALL affected CPUs | 66 | unsigned int shared_type; /* ACPI: ANY or ALL affected CPUs |
| 67 | should set cpufreq */ | 67 | should set cpufreq */ |
| 68 | unsigned int cpu; /* cpu nr of CPU managing this policy */ | 68 | unsigned int cpu; /* cpu nr of CPU managing this policy */ |
| 69 | unsigned int last_cpu; /* cpu nr of previous CPU that managed | ||
| 70 | * this policy */ | ||
| 71 | struct clk *clk; | 69 | struct clk *clk; |
| 72 | struct cpufreq_cpuinfo cpuinfo;/* see above */ | 70 | struct cpufreq_cpuinfo cpuinfo;/* see above */ |
| 73 | 71 | ||
| @@ -113,6 +111,9 @@ struct cpufreq_policy { | |||
| 113 | wait_queue_head_t transition_wait; | 111 | wait_queue_head_t transition_wait; |
| 114 | struct task_struct *transition_task; /* Task which is doing the transition */ | 112 | struct task_struct *transition_task; /* Task which is doing the transition */ |
| 115 | 113 | ||
| 114 | /* cpufreq-stats */ | ||
| 115 | struct cpufreq_stats *stats; | ||
| 116 | |||
| 116 | /* For cpufreq driver's internal use */ | 117 | /* For cpufreq driver's internal use */ |
| 117 | void *driver_data; | 118 | void *driver_data; |
| 118 | }; | 119 | }; |
| @@ -367,9 +368,8 @@ static inline void cpufreq_resume(void) {} | |||
| 367 | #define CPUFREQ_INCOMPATIBLE (1) | 368 | #define CPUFREQ_INCOMPATIBLE (1) |
| 368 | #define CPUFREQ_NOTIFY (2) | 369 | #define CPUFREQ_NOTIFY (2) |
| 369 | #define CPUFREQ_START (3) | 370 | #define CPUFREQ_START (3) |
| 370 | #define CPUFREQ_UPDATE_POLICY_CPU (4) | 371 | #define CPUFREQ_CREATE_POLICY (4) |
| 371 | #define CPUFREQ_CREATE_POLICY (5) | 372 | #define CPUFREQ_REMOVE_POLICY (5) |
| 372 | #define CPUFREQ_REMOVE_POLICY (6) | ||
| 373 | 373 | ||
| 374 | #ifdef CONFIG_CPU_FREQ | 374 | #ifdef CONFIG_CPU_FREQ |
| 375 | int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list); | 375 | int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list); |
diff --git a/include/linux/devfreq-event.h b/include/linux/devfreq-event.h new file mode 100644 index 000000000000..602fbbfcfeed --- /dev/null +++ b/include/linux/devfreq-event.h | |||
| @@ -0,0 +1,196 @@ | |||
| 1 | /* | ||
| 2 | * devfreq-event: a framework to provide raw data and events of devfreq devices | ||
| 3 | * | ||
| 4 | * Copyright (C) 2014 Samsung Electronics | ||
| 5 | * Author: Chanwoo Choi <cw00.choi@samsung.com> | ||
| 6 | * | ||
| 7 | * This program is free software; you can redistribute it and/or modify | ||
| 8 | * it under the terms of the GNU General Public License version 2 as | ||
| 9 | * published by the Free Software Foundation. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef __LINUX_DEVFREQ_EVENT_H__ | ||
| 13 | #define __LINUX_DEVFREQ_EVENT_H__ | ||
| 14 | |||
| 15 | #include <linux/device.h> | ||
| 16 | |||
| 17 | /** | ||
| 18 | * struct devfreq_event_dev - the devfreq-event device | ||
| 19 | * | ||
| 20 | * @node : Contain the devfreq-event device that have been registered. | ||
| 21 | * @dev : the device registered by devfreq-event class. dev.parent is | ||
| 22 | * the device using devfreq-event. | ||
| 23 | * @lock : a mutex to protect accessing devfreq-event. | ||
| 24 | * @enable_count: the number of enable function have been called. | ||
| 25 | * @desc : the description for devfreq-event device. | ||
| 26 | * | ||
| 27 | * This structure contains devfreq-event device information. | ||
| 28 | */ | ||
| 29 | struct devfreq_event_dev { | ||
| 30 | struct list_head node; | ||
| 31 | |||
| 32 | struct device dev; | ||
| 33 | struct mutex lock; | ||
| 34 | u32 enable_count; | ||
| 35 | |||
| 36 | const struct devfreq_event_desc *desc; | ||
| 37 | }; | ||
| 38 | |||
| 39 | /** | ||
| 40 | * struct devfreq_event_data - the devfreq-event data | ||
| 41 | * | ||
| 42 | * @load_count : load count of devfreq-event device for the given period. | ||
| 43 | * @total_count : total count of devfreq-event device for the given period. | ||
| 44 | * each count may represent a clock cycle, a time unit | ||
| 45 | * (ns/us/...), or anything the device driver wants. | ||
| 46 | * Generally, utilization is load_count / total_count. | ||
| 47 | * | ||
| 48 | * This structure contains the data of devfreq-event device for polling period. | ||
| 49 | */ | ||
| 50 | struct devfreq_event_data { | ||
| 51 | unsigned long load_count; | ||
| 52 | unsigned long total_count; | ||
| 53 | }; | ||
| 54 | |||
| 55 | /** | ||
| 56 | * struct devfreq_event_ops - the operations of devfreq-event device | ||
| 57 | * | ||
| 58 | * @enable : Enable the devfreq-event device. | ||
| 59 | * @disable : Disable the devfreq-event device. | ||
| 60 | * @reset : Reset all setting of the devfreq-event device. | ||
| 61 | * @set_event : Set the specific event type for the devfreq-event device. | ||
| 62 | * @get_event : Get the result of the devfreq-event devie with specific | ||
| 63 | * event type. | ||
| 64 | * | ||
| 65 | * This structure contains devfreq-event device operations which can be | ||
| 66 | * implemented by devfreq-event device drivers. | ||
| 67 | */ | ||
| 68 | struct devfreq_event_ops { | ||
| 69 | /* Optional functions */ | ||
| 70 | int (*enable)(struct devfreq_event_dev *edev); | ||
| 71 | int (*disable)(struct devfreq_event_dev *edev); | ||
| 72 | int (*reset)(struct devfreq_event_dev *edev); | ||
| 73 | |||
| 74 | /* Mandatory functions */ | ||
| 75 | int (*set_event)(struct devfreq_event_dev *edev); | ||
| 76 | int (*get_event)(struct devfreq_event_dev *edev, | ||
| 77 | struct devfreq_event_data *edata); | ||
| 78 | }; | ||
| 79 | |||
| 80 | /** | ||
| 81 | * struct devfreq_event_desc - the descriptor of devfreq-event device | ||
| 82 | * | ||
| 83 | * @name : the name of devfreq-event device. | ||
| 84 | * @driver_data : the private data for devfreq-event driver. | ||
| 85 | * @ops : the operation to control devfreq-event device. | ||
| 86 | * | ||
| 87 | * Each devfreq-event device is described with a this structure. | ||
| 88 | * This structure contains the various data for devfreq-event device. | ||
| 89 | */ | ||
| 90 | struct devfreq_event_desc { | ||
| 91 | const char *name; | ||
| 92 | void *driver_data; | ||
| 93 | |||
| 94 | struct devfreq_event_ops *ops; | ||
| 95 | }; | ||
| 96 | |||
| 97 | #if defined(CONFIG_PM_DEVFREQ_EVENT) | ||
| 98 | extern int devfreq_event_enable_edev(struct devfreq_event_dev *edev); | ||
| 99 | extern int devfreq_event_disable_edev(struct devfreq_event_dev *edev); | ||
| 100 | extern bool devfreq_event_is_enabled(struct devfreq_event_dev *edev); | ||
| 101 | extern int devfreq_event_set_event(struct devfreq_event_dev *edev); | ||
| 102 | extern int devfreq_event_get_event(struct devfreq_event_dev *edev, | ||
| 103 | struct devfreq_event_data *edata); | ||
| 104 | extern int devfreq_event_reset_event(struct devfreq_event_dev *edev); | ||
| 105 | extern struct devfreq_event_dev *devfreq_event_get_edev_by_phandle( | ||
| 106 | struct device *dev, int index); | ||
| 107 | extern int devfreq_event_get_edev_count(struct device *dev); | ||
| 108 | extern struct devfreq_event_dev *devfreq_event_add_edev(struct device *dev, | ||
| 109 | struct devfreq_event_desc *desc); | ||
| 110 | extern int devfreq_event_remove_edev(struct devfreq_event_dev *edev); | ||
| 111 | extern struct devfreq_event_dev *devm_devfreq_event_add_edev(struct device *dev, | ||
| 112 | struct devfreq_event_desc *desc); | ||
| 113 | extern void devm_devfreq_event_remove_edev(struct device *dev, | ||
| 114 | struct devfreq_event_dev *edev); | ||
| 115 | static inline void *devfreq_event_get_drvdata(struct devfreq_event_dev *edev) | ||
| 116 | { | ||
| 117 | return edev->desc->driver_data; | ||
| 118 | } | ||
| 119 | #else | ||
| 120 | static inline int devfreq_event_enable_edev(struct devfreq_event_dev *edev) | ||
| 121 | { | ||
| 122 | return -EINVAL; | ||
| 123 | } | ||
| 124 | |||
| 125 | static inline int devfreq_event_disable_edev(struct devfreq_event_dev *edev) | ||
| 126 | { | ||
| 127 | return -EINVAL; | ||
| 128 | } | ||
| 129 | |||
| 130 | static inline bool devfreq_event_is_enabled(struct devfreq_event_dev *edev) | ||
| 131 | { | ||
| 132 | return false; | ||
| 133 | } | ||
| 134 | |||
| 135 | static inline int devfreq_event_set_event(struct devfreq_event_dev *edev) | ||
| 136 | { | ||
| 137 | return -EINVAL; | ||
| 138 | } | ||
| 139 | |||
| 140 | static inline int devfreq_event_get_event(struct devfreq_event_dev *edev, | ||
| 141 | struct devfreq_event_data *edata) | ||
| 142 | { | ||
| 143 | return -EINVAL; | ||
| 144 | } | ||
| 145 | |||
| 146 | static inline int devfreq_event_reset_event(struct devfreq_event_dev *edev) | ||
| 147 | { | ||
| 148 | return -EINVAL; | ||
| 149 | } | ||
| 150 | |||
| 151 | static inline void *devfreq_event_get_drvdata(struct devfreq_event_dev *edev) | ||
| 152 | { | ||
| 153 | return ERR_PTR(-EINVAL); | ||
| 154 | } | ||
| 155 | |||
| 156 | static inline struct devfreq_event_dev *devfreq_event_get_edev_by_phandle( | ||
| 157 | struct device *dev, int index) | ||
| 158 | { | ||
| 159 | return ERR_PTR(-EINVAL); | ||
| 160 | } | ||
| 161 | |||
| 162 | static inline int devfreq_event_get_edev_count(struct device *dev) | ||
| 163 | { | ||
| 164 | return -EINVAL; | ||
| 165 | } | ||
| 166 | |||
| 167 | static inline struct devfreq_event_dev *devfreq_event_add_edev(struct device *dev, | ||
| 168 | struct devfreq_event_desc *desc) | ||
| 169 | { | ||
| 170 | return ERR_PTR(-EINVAL); | ||
| 171 | } | ||
| 172 | |||
| 173 | static inline int devfreq_event_remove_edev(struct devfreq_event_dev *edev) | ||
| 174 | { | ||
| 175 | return -EINVAL; | ||
| 176 | } | ||
| 177 | |||
| 178 | static inline struct devfreq_event_dev *devm_devfreq_event_add_edev( | ||
| 179 | struct device *dev, | ||
| 180 | struct devfreq_event_desc *desc) | ||
| 181 | { | ||
| 182 | return ERR_PTR(-EINVAL); | ||
| 183 | } | ||
| 184 | |||
| 185 | static inline void devm_devfreq_event_remove_edev(struct device *dev, | ||
| 186 | struct devfreq_event_dev *edev) | ||
| 187 | { | ||
| 188 | } | ||
| 189 | |||
| 190 | static inline void *devfreq_event_get_drvdata(struct devfreq_event_dev *edev) | ||
| 191 | { | ||
| 192 | return NULL; | ||
| 193 | } | ||
| 194 | #endif /* CONFIG_PM_DEVFREQ_EVENT */ | ||
| 195 | |||
| 196 | #endif /* __LINUX_DEVFREQ_EVENT_H__ */ | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index 421eb6a9e600..211e9da8a7d7 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #include <linux/atomic.h> | 29 | #include <linux/atomic.h> |
| 30 | #include <linux/device.h> | 30 | #include <linux/device.h> |
| 31 | #include <linux/io.h> | 31 | #include <linux/io.h> |
| 32 | #include <linux/resource_ext.h> | ||
| 32 | #include <uapi/linux/pci.h> | 33 | #include <uapi/linux/pci.h> |
| 33 | 34 | ||
| 34 | #include <linux/pci_ids.h> | 35 | #include <linux/pci_ids.h> |
| @@ -399,16 +400,10 @@ static inline int pci_channel_offline(struct pci_dev *pdev) | |||
| 399 | return (pdev->error_state != pci_channel_io_normal); | 400 | return (pdev->error_state != pci_channel_io_normal); |
| 400 | } | 401 | } |
| 401 | 402 | ||
| 402 | struct pci_host_bridge_window { | ||
| 403 | struct list_head list; | ||
| 404 | struct resource *res; /* host bridge aperture (CPU address) */ | ||
| 405 | resource_size_t offset; /* bus address + offset = CPU address */ | ||
| 406 | }; | ||
| 407 | |||
| 408 | struct pci_host_bridge { | 403 | struct pci_host_bridge { |
| 409 | struct device dev; | 404 | struct device dev; |
| 410 | struct pci_bus *bus; /* root bus */ | 405 | struct pci_bus *bus; /* root bus */ |
| 411 | struct list_head windows; /* pci_host_bridge_windows */ | 406 | struct list_head windows; /* resource_entry */ |
| 412 | void (*release_fn)(struct pci_host_bridge *); | 407 | void (*release_fn)(struct pci_host_bridge *); |
| 413 | void *release_data; | 408 | void *release_data; |
| 414 | }; | 409 | }; |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 8b5976364619..e2f1be6dd9dd 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
| @@ -597,7 +597,7 @@ struct dev_pm_info { | |||
| 597 | 597 | ||
| 598 | extern void update_pm_runtime_accounting(struct device *dev); | 598 | extern void update_pm_runtime_accounting(struct device *dev); |
| 599 | extern int dev_pm_get_subsys_data(struct device *dev); | 599 | extern int dev_pm_get_subsys_data(struct device *dev); |
| 600 | extern int dev_pm_put_subsys_data(struct device *dev); | 600 | extern void dev_pm_put_subsys_data(struct device *dev); |
| 601 | 601 | ||
| 602 | /* | 602 | /* |
| 603 | * Power domains provide callbacks that are executed during system suspend, | 603 | * Power domains provide callbacks that are executed during system suspend, |
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index a9edab2c787a..080e778118ba 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h | |||
| @@ -113,8 +113,6 @@ struct generic_pm_domain_data { | |||
| 113 | struct pm_domain_data base; | 113 | struct pm_domain_data base; |
| 114 | struct gpd_timing_data td; | 114 | struct gpd_timing_data td; |
| 115 | struct notifier_block nb; | 115 | struct notifier_block nb; |
| 116 | struct mutex lock; | ||
| 117 | unsigned int refcount; | ||
| 118 | int need_restore; | 116 | int need_restore; |
| 119 | }; | 117 | }; |
| 120 | 118 | ||
| @@ -140,7 +138,6 @@ extern int __pm_genpd_name_add_device(const char *domain_name, | |||
| 140 | 138 | ||
| 141 | extern int pm_genpd_remove_device(struct generic_pm_domain *genpd, | 139 | extern int pm_genpd_remove_device(struct generic_pm_domain *genpd, |
| 142 | struct device *dev); | 140 | struct device *dev); |
| 143 | extern void pm_genpd_dev_need_restore(struct device *dev, bool val); | ||
| 144 | extern int pm_genpd_add_subdomain(struct generic_pm_domain *genpd, | 141 | extern int pm_genpd_add_subdomain(struct generic_pm_domain *genpd, |
| 145 | struct generic_pm_domain *new_subdomain); | 142 | struct generic_pm_domain *new_subdomain); |
| 146 | extern int pm_genpd_add_subdomain_names(const char *master_name, | 143 | extern int pm_genpd_add_subdomain_names(const char *master_name, |
| @@ -187,7 +184,6 @@ static inline int pm_genpd_remove_device(struct generic_pm_domain *genpd, | |||
| 187 | { | 184 | { |
| 188 | return -ENOSYS; | 185 | return -ENOSYS; |
| 189 | } | 186 | } |
| 190 | static inline void pm_genpd_dev_need_restore(struct device *dev, bool val) {} | ||
| 191 | static inline int pm_genpd_add_subdomain(struct generic_pm_domain *genpd, | 187 | static inline int pm_genpd_add_subdomain(struct generic_pm_domain *genpd, |
| 192 | struct generic_pm_domain *new_sd) | 188 | struct generic_pm_domain *new_sd) |
| 193 | { | 189 | { |
diff --git a/include/linux/resource_ext.h b/include/linux/resource_ext.h new file mode 100644 index 000000000000..e2bf63d881d4 --- /dev/null +++ b/include/linux/resource_ext.h | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2015, Intel Corporation | ||
| 3 | * Author: Jiang Liu <jiang.liu@linux.intel.com> | ||
| 4 | * | ||
| 5 | * This program is free software; you can redistribute it and/or modify it | ||
| 6 | * under the terms and conditions of the GNU General Public License, | ||
| 7 | * version 2, as published by the Free Software Foundation. | ||
| 8 | * | ||
| 9 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
| 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 12 | * more details. | ||
| 13 | */ | ||
| 14 | #ifndef _LINUX_RESOURCE_EXT_H | ||
| 15 | #define _LINUX_RESOURCE_EXT_H | ||
| 16 | #include <linux/types.h> | ||
| 17 | #include <linux/list.h> | ||
| 18 | #include <linux/ioport.h> | ||
| 19 | #include <linux/slab.h> | ||
| 20 | |||
| 21 | /* Represent resource window for bridge devices */ | ||
| 22 | struct resource_win { | ||
| 23 | struct resource res; /* In master (CPU) address space */ | ||
| 24 | resource_size_t offset; /* Translation offset for bridge */ | ||
| 25 | }; | ||
| 26 | |||
| 27 | /* | ||
| 28 | * Common resource list management data structure and interfaces to support | ||
| 29 | * ACPI, PNP and PCI host bridge etc. | ||
| 30 | */ | ||
| 31 | struct resource_entry { | ||
| 32 | struct list_head node; | ||
| 33 | struct resource *res; /* In master (CPU) address space */ | ||
| 34 | resource_size_t offset; /* Translation offset for bridge */ | ||
| 35 | struct resource __res; /* Default storage for res */ | ||
| 36 | }; | ||
| 37 | |||
| 38 | extern struct resource_entry * | ||
| 39 | resource_list_create_entry(struct resource *res, size_t extra_size); | ||
| 40 | extern void resource_list_free(struct list_head *head); | ||
| 41 | |||
| 42 | static inline void resource_list_add(struct resource_entry *entry, | ||
| 43 | struct list_head *head) | ||
| 44 | { | ||
| 45 | list_add(&entry->node, head); | ||
| 46 | } | ||
| 47 | |||
| 48 | static inline void resource_list_add_tail(struct resource_entry *entry, | ||
| 49 | struct list_head *head) | ||
| 50 | { | ||
| 51 | list_add_tail(&entry->node, head); | ||
| 52 | } | ||
| 53 | |||
| 54 | static inline void resource_list_del(struct resource_entry *entry) | ||
| 55 | { | ||
| 56 | list_del(&entry->node); | ||
| 57 | } | ||
| 58 | |||
| 59 | static inline void resource_list_free_entry(struct resource_entry *entry) | ||
| 60 | { | ||
| 61 | kfree(entry); | ||
| 62 | } | ||
| 63 | |||
| 64 | static inline void | ||
| 65 | resource_list_destroy_entry(struct resource_entry *entry) | ||
| 66 | { | ||
| 67 | resource_list_del(entry); | ||
| 68 | resource_list_free_entry(entry); | ||
| 69 | } | ||
| 70 | |||
| 71 | #define resource_list_for_each_entry(entry, list) \ | ||
| 72 | list_for_each_entry((entry), (list), node) | ||
| 73 | |||
| 74 | #define resource_list_for_each_entry_safe(entry, tmp, list) \ | ||
| 75 | list_for_each_entry_safe((entry), (tmp), (list), node) | ||
| 76 | |||
| 77 | #endif /* _LINUX_RESOURCE_EXT_H */ | ||
