From b0ad7a76f121b9f88adc2cfca2ab70ff75f9c812 Mon Sep 17 00:00:00 2001 From: Huang Ying Date: Thu, 8 Dec 2011 11:25:40 +0800 Subject: [PATCH] --- yaml --- r: 286475 b: refs/heads/master c: 04c25997c97e57d95d1f5a7a6e5fff2411dbd48b h: refs/heads/master i: 286473: 0c17802b189ff6215b7d5ffc7e1fc0224d6e758b 286471: c2712f1568c61b30aab3e49691e4f145950e9c11 v: v3 --- [refs] | 2 +- trunk/drivers/acpi/acpica/Makefile | 158 ++------ trunk/drivers/acpi/acpica/accommon.h | 2 +- trunk/drivers/acpi/acpica/acconfig.h | 9 +- trunk/drivers/acpi/acpica/acdebug.h | 2 +- trunk/drivers/acpi/acpica/acdispat.h | 2 +- trunk/drivers/acpi/acpica/acevents.h | 3 +- trunk/drivers/acpi/acpica/acglobal.h | 17 +- trunk/drivers/acpi/acpica/achware.h | 2 +- trunk/drivers/acpi/acpica/acinterp.h | 4 +- trunk/drivers/acpi/acpica/aclocal.h | 26 +- trunk/drivers/acpi/acpica/acmacros.h | 2 +- trunk/drivers/acpi/acpica/acnamesp.h | 2 +- trunk/drivers/acpi/acpica/acobject.h | 8 +- trunk/drivers/acpi/acpica/acopcode.h | 6 +- trunk/drivers/acpi/acpica/acparser.h | 2 +- trunk/drivers/acpi/acpica/acpredef.h | 41 +- trunk/drivers/acpi/acpica/acresrc.h | 115 ++---- trunk/drivers/acpi/acpica/acstruct.h | 2 +- trunk/drivers/acpi/acpica/actables.h | 2 +- trunk/drivers/acpi/acpica/acutils.h | 21 +- trunk/drivers/acpi/acpica/amlcode.h | 29 +- trunk/drivers/acpi/acpica/amlresrc.h | 138 +------ trunk/drivers/acpi/acpica/dsargs.c | 18 +- trunk/drivers/acpi/acpica/dscontrol.c | 2 +- trunk/drivers/acpi/acpica/dsfield.c | 83 +--- trunk/drivers/acpi/acpica/dsinit.c | 2 +- trunk/drivers/acpi/acpica/dsmethod.c | 2 +- trunk/drivers/acpi/acpica/dsmthdat.c | 2 +- trunk/drivers/acpi/acpica/dsobject.c | 2 +- trunk/drivers/acpi/acpica/dsopcode.c | 2 +- trunk/drivers/acpi/acpica/dsutils.c | 2 +- trunk/drivers/acpi/acpica/dswexec.c | 2 +- trunk/drivers/acpi/acpica/dswload.c | 2 +- trunk/drivers/acpi/acpica/dswload2.c | 2 +- trunk/drivers/acpi/acpica/dswscope.c | 2 +- trunk/drivers/acpi/acpica/dswstate.c | 2 +- trunk/drivers/acpi/acpica/evevent.c | 14 +- trunk/drivers/acpi/acpica/evglock.c | 8 +- trunk/drivers/acpi/acpica/evgpe.c | 2 +- trunk/drivers/acpi/acpica/evgpeblk.c | 2 +- trunk/drivers/acpi/acpica/evgpeinit.c | 2 +- trunk/drivers/acpi/acpica/evgpeutil.c | 2 +- trunk/drivers/acpi/acpica/evmisc.c | 2 +- trunk/drivers/acpi/acpica/evregion.c | 31 +- trunk/drivers/acpi/acpica/evrgnini.c | 2 +- trunk/drivers/acpi/acpica/evsci.c | 2 +- trunk/drivers/acpi/acpica/evxface.c | 2 +- trunk/drivers/acpi/acpica/evxfevnt.c | 2 +- trunk/drivers/acpi/acpica/evxfgpe.c | 2 +- trunk/drivers/acpi/acpica/evxfregn.c | 2 +- trunk/drivers/acpi/acpica/exconfig.c | 8 +- trunk/drivers/acpi/acpica/exconvrt.c | 2 +- trunk/drivers/acpi/acpica/excreate.c | 31 +- trunk/drivers/acpi/acpica/exdebug.c | 2 +- trunk/drivers/acpi/acpica/exdump.c | 9 +- trunk/drivers/acpi/acpica/exfield.c | 30 +- trunk/drivers/acpi/acpica/exfldio.c | 38 +- trunk/drivers/acpi/acpica/exmisc.c | 2 +- trunk/drivers/acpi/acpica/exmutex.c | 2 +- trunk/drivers/acpi/acpica/exnames.c | 2 +- trunk/drivers/acpi/acpica/exoparg1.c | 2 +- trunk/drivers/acpi/acpica/exoparg2.c | 2 +- trunk/drivers/acpi/acpica/exoparg3.c | 2 +- trunk/drivers/acpi/acpica/exoparg6.c | 2 +- trunk/drivers/acpi/acpica/exprep.c | 27 +- trunk/drivers/acpi/acpica/exregion.c | 2 +- trunk/drivers/acpi/acpica/exresnte.c | 2 +- trunk/drivers/acpi/acpica/exresolv.c | 2 +- trunk/drivers/acpi/acpica/exresop.c | 2 +- trunk/drivers/acpi/acpica/exstore.c | 2 +- trunk/drivers/acpi/acpica/exstoren.c | 2 +- trunk/drivers/acpi/acpica/exstorob.c | 2 +- trunk/drivers/acpi/acpica/exsystem.c | 2 +- trunk/drivers/acpi/acpica/exutils.c | 27 +- trunk/drivers/acpi/acpica/hwacpi.c | 2 +- trunk/drivers/acpi/acpica/hwgpe.c | 2 +- trunk/drivers/acpi/acpica/hwpci.c | 2 +- trunk/drivers/acpi/acpica/hwregs.c | 2 +- trunk/drivers/acpi/acpica/hwsleep.c | 2 +- trunk/drivers/acpi/acpica/hwtimer.c | 2 +- trunk/drivers/acpi/acpica/hwvalid.c | 4 +- trunk/drivers/acpi/acpica/hwxface.c | 2 +- trunk/drivers/acpi/acpica/nsaccess.c | 2 +- trunk/drivers/acpi/acpica/nsalloc.c | 2 +- trunk/drivers/acpi/acpica/nsdump.c | 2 +- trunk/drivers/acpi/acpica/nsdumpdv.c | 2 +- trunk/drivers/acpi/acpica/nseval.c | 2 +- trunk/drivers/acpi/acpica/nsinit.c | 2 +- trunk/drivers/acpi/acpica/nsload.c | 2 +- trunk/drivers/acpi/acpica/nsnames.c | 2 +- trunk/drivers/acpi/acpica/nsobject.c | 2 +- trunk/drivers/acpi/acpica/nsparse.c | 2 +- trunk/drivers/acpi/acpica/nspredef.c | 31 +- trunk/drivers/acpi/acpica/nsrepair.c | 3 +- trunk/drivers/acpi/acpica/nsrepair2.c | 7 +- trunk/drivers/acpi/acpica/nssearch.c | 2 +- trunk/drivers/acpi/acpica/nsutils.c | 2 +- trunk/drivers/acpi/acpica/nswalk.c | 2 +- trunk/drivers/acpi/acpica/nsxfeval.c | 2 +- trunk/drivers/acpi/acpica/nsxfname.c | 2 +- trunk/drivers/acpi/acpica/nsxfobj.c | 2 +- trunk/drivers/acpi/acpica/psargs.c | 143 +------ trunk/drivers/acpi/acpica/psloop.c | 2 +- trunk/drivers/acpi/acpica/psopcode.c | 15 +- trunk/drivers/acpi/acpica/psparse.c | 2 +- trunk/drivers/acpi/acpica/psscope.c | 2 +- trunk/drivers/acpi/acpica/pstree.c | 8 +- trunk/drivers/acpi/acpica/psutils.c | 2 +- trunk/drivers/acpi/acpica/pswalk.c | 2 +- trunk/drivers/acpi/acpica/psxface.c | 2 +- trunk/drivers/acpi/acpica/rsaddr.c | 2 +- trunk/drivers/acpi/acpica/rscalc.c | 89 +---- trunk/drivers/acpi/acpica/rscreate.c | 69 +--- trunk/drivers/acpi/acpica/rsdump.c | 196 +-------- trunk/drivers/acpi/acpica/rsinfo.c | 58 +-- trunk/drivers/acpi/acpica/rsio.c | 2 +- trunk/drivers/acpi/acpica/rsirq.c | 33 +- trunk/drivers/acpi/acpica/rslist.c | 77 +--- trunk/drivers/acpi/acpica/rsmemory.c | 2 +- trunk/drivers/acpi/acpica/rsmisc.c | 269 +------------ trunk/drivers/acpi/acpica/rsserial.c | 441 -------------------- trunk/drivers/acpi/acpica/rsutils.c | 56 +-- trunk/drivers/acpi/acpica/rsxface.c | 52 +-- trunk/drivers/acpi/acpica/tbfadt.c | 41 +- trunk/drivers/acpi/acpica/tbfind.c | 2 +- trunk/drivers/acpi/acpica/tbinstal.c | 2 +- trunk/drivers/acpi/acpica/tbutils.c | 9 +- trunk/drivers/acpi/acpica/tbxface.c | 2 +- trunk/drivers/acpi/acpica/tbxfroot.c | 2 +- trunk/drivers/acpi/acpica/utaddress.c | 294 -------------- trunk/drivers/acpi/acpica/utalloc.c | 2 +- trunk/drivers/acpi/acpica/utcopy.c | 2 +- trunk/drivers/acpi/acpica/utdebug.c | 2 +- trunk/drivers/acpi/acpica/utdecode.c | 6 +- trunk/drivers/acpi/acpica/utdelete.c | 15 +- trunk/drivers/acpi/acpica/uteval.c | 2 +- trunk/drivers/acpi/acpica/utglobal.c | 8 +- trunk/drivers/acpi/acpica/utids.c | 2 +- trunk/drivers/acpi/acpica/utinit.c | 3 +- trunk/drivers/acpi/acpica/utlock.c | 2 +- trunk/drivers/acpi/acpica/utmath.c | 2 +- trunk/drivers/acpi/acpica/utmisc.c | 2 +- trunk/drivers/acpi/acpica/utmutex.c | 11 +- trunk/drivers/acpi/acpica/utobject.c | 2 +- trunk/drivers/acpi/acpica/utosi.c | 2 +- trunk/drivers/acpi/acpica/utresrc.c | 278 ++----------- trunk/drivers/acpi/acpica/utstate.c | 2 +- trunk/drivers/acpi/acpica/utxface.c | 40 +- trunk/drivers/acpi/acpica/utxferror.c | 2 +- trunk/drivers/acpi/acpica/utxfmutex.c | 187 --------- trunk/drivers/acpi/atomicio.c | 36 +- trunk/drivers/acpi/osl.c | 202 +++++++++- trunk/include/acpi/acnames.h | 1 - trunk/include/acpi/acpiosxf.h | 7 + trunk/include/acpi/acpixf.h | 32 +- trunk/include/acpi/acrestyp.h | 207 +--------- trunk/include/acpi/actbl.h | 23 +- trunk/include/acpi/actbl1.h | 57 +-- trunk/include/acpi/actbl3.h | 552 -------------------------- trunk/include/acpi/actypes.h | 12 +- 161 files changed, 635 insertions(+), 4032 deletions(-) delete mode 100644 trunk/drivers/acpi/acpica/rsserial.c delete mode 100644 trunk/drivers/acpi/acpica/utaddress.c delete mode 100644 trunk/drivers/acpi/acpica/utxfmutex.c delete mode 100644 trunk/include/acpi/actbl3.h diff --git a/[refs] b/[refs] index 656eb41ad7d5..a525153a03d6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5d1f86572685d577b76142b7c61453000e1a5e26 +refs/heads/master: 04c25997c97e57d95d1f5a7a6e5fff2411dbd48b diff --git a/trunk/drivers/acpi/acpica/Makefile b/trunk/drivers/acpi/acpica/Makefile index 0ca208b6dcf0..301bd2d388ad 100644 --- a/trunk/drivers/acpi/acpica/Makefile +++ b/trunk/drivers/acpi/acpica/Makefile @@ -8,151 +8,41 @@ ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT # use acpi.o to put all files here into acpi.o modparam namespace obj-y += acpi.o -acpi-y := \ - dsargs.o \ - dscontrol.o \ - dsfield.o \ - dsinit.o \ - dsmethod.o \ - dsmthdat.o \ - dsobject.o \ - dsopcode.o \ - dsutils.o \ - dswexec.o \ - dswload.o \ - dswload2.o \ - dswscope.o \ - dswstate.o +acpi-y := dsfield.o dsmthdat.o dsopcode.o dswexec.o dswscope.o \ + dsmethod.o dsobject.o dsutils.o dswload.o dswstate.o \ + dsinit.o dsargs.o dscontrol.o dswload2.o -acpi-y += \ - evevent.o \ - evgpe.o \ - evgpeblk.o \ - evgpeinit.o \ - evgpeutil.o \ - evglock.o \ - evmisc.o \ - evregion.o \ - evrgnini.o \ - evsci.o \ - evxface.o \ - evxfevnt.o \ - evxfgpe.o \ - evxfregn.o +acpi-y += evevent.o evregion.o evsci.o evxfevnt.o \ + evmisc.o evrgnini.o evxface.o evxfregn.o \ + evgpe.o evgpeblk.o evgpeinit.o evgpeutil.o evxfgpe.o evglock.o -acpi-y += \ - exconfig.o \ - exconvrt.o \ - excreate.o \ - exdebug.o \ - exdump.o \ - exfield.o \ - exfldio.o \ - exmutex.o \ - exnames.o \ - exoparg1.o \ - exoparg2.o \ - exoparg3.o \ - exoparg6.o \ - exprep.o \ - exmisc.o \ - exregion.o \ - exresnte.o \ - exresolv.o \ - exresop.o \ - exstore.o \ - exstoren.o \ - exstorob.o \ - exsystem.o \ - exutils.o +acpi-y += exconfig.o exfield.o exnames.o exoparg6.o exresolv.o exstorob.o\ + exconvrt.o exfldio.o exoparg1.o exprep.o exresop.o exsystem.o\ + excreate.o exmisc.o exoparg2.o exregion.o exstore.o exutils.o \ + exdump.o exmutex.o exoparg3.o exresnte.o exstoren.o exdebug.o -acpi-y += \ - hwacpi.o \ - hwgpe.o \ - hwpci.o \ - hwregs.o \ - hwsleep.o \ - hwvalid.o \ - hwxface.o +acpi-y += hwacpi.o hwgpe.o hwregs.o hwsleep.o hwxface.o hwvalid.o hwpci.o acpi-$(ACPI_FUTURE_USAGE) += hwtimer.o -acpi-y += \ - nsaccess.o \ - nsalloc.o \ - nsdump.o \ - nseval.o \ - nsinit.o \ - nsload.o \ - nsnames.o \ - nsobject.o \ - nsparse.o \ - nspredef.o \ - nsrepair.o \ - nsrepair2.o \ - nssearch.o \ - nsutils.o \ - nswalk.o \ - nsxfeval.o \ - nsxfname.o \ - nsxfobj.o +acpi-y += nsaccess.o nsload.o nssearch.o nsxfeval.o \ + nsalloc.o nseval.o nsnames.o nsutils.o nsxfname.o \ + nsdump.o nsinit.o nsobject.o nswalk.o nsxfobj.o \ + nsparse.o nspredef.o nsrepair.o nsrepair2.o acpi-$(ACPI_FUTURE_USAGE) += nsdumpdv.o -acpi-y += \ - psargs.o \ - psloop.o \ - psopcode.o \ - psparse.o \ - psscope.o \ - pstree.o \ - psutils.o \ - pswalk.o \ - psxface.o +acpi-y += psargs.o psparse.o psloop.o pstree.o pswalk.o \ + psopcode.o psscope.o psutils.o psxface.o -acpi-y += \ - rsaddr.o \ - rscalc.o \ - rscreate.o \ - rsinfo.o \ - rsio.o \ - rsirq.o \ - rslist.o \ - rsmemory.o \ - rsmisc.o \ - rsserial.o \ - rsutils.o \ - rsxface.o +acpi-y += rsaddr.o rscreate.o rsinfo.o rsio.o rslist.o rsmisc.o rsxface.o \ + rscalc.o rsirq.o rsmemory.o rsutils.o acpi-$(ACPI_FUTURE_USAGE) += rsdump.o -acpi-y += \ - tbfadt.o \ - tbfind.o \ - tbinstal.o \ - tbutils.o \ - tbxface.o \ - tbxfroot.o +acpi-y += tbxface.o tbinstal.o tbutils.o tbfind.o tbfadt.o tbxfroot.o -acpi-y += \ - utaddress.o \ - utalloc.o \ - utcopy.o \ - utdebug.o \ - utdecode.o \ - utdelete.o \ - uteval.o \ - utglobal.o \ - utids.o \ - utinit.o \ - utlock.o \ - utmath.o \ - utmisc.o \ - utmutex.o \ - utobject.o \ - utosi.o \ - utresrc.o \ - utstate.o \ - utxface.o \ - utxferror.o \ - utxfmutex.o +acpi-y += utalloc.o utdebug.o uteval.o utinit.o utmisc.o utxface.o \ + utcopy.o utdelete.o utglobal.o utmath.o utobject.o \ + utstate.o utmutex.o utobject.o utresrc.o utlock.o utids.o \ + utosi.o utxferror.o utdecode.o diff --git a/trunk/drivers/acpi/acpica/accommon.h b/trunk/drivers/acpi/acpica/accommon.h index a44bd424f9f4..e0ba17f0a7c8 100644 --- a/trunk/drivers/acpi/acpica/accommon.h +++ b/trunk/drivers/acpi/acpica/accommon.h @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/acconfig.h b/trunk/drivers/acpi/acpica/acconfig.h index 1f30af613e87..f895a244ca7e 100644 --- a/trunk/drivers/acpi/acpica/acconfig.h +++ b/trunk/drivers/acpi/acpica/acconfig.h @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -123,10 +123,6 @@ #define ACPI_MAX_SLEEP 2000 /* Two seconds */ -/* Address Range lists are per-space_id (Memory and I/O only) */ - -#define ACPI_ADDRESS_RANGE_MAX 2 - /****************************************************************************** * * ACPI Specification constants (Do not change unless the specification changes) @@ -206,10 +202,9 @@ #define ACPI_RSDP_CHECKSUM_LENGTH 20 #define ACPI_RSDP_XCHECKSUM_LENGTH 36 -/* SMBus, GSBus and IPMI bidirectional buffer size */ +/* SMBus and IPMI bidirectional buffer size */ #define ACPI_SMBUS_BUFFER_SIZE 34 -#define ACPI_GSBUS_BUFFER_SIZE 34 #define ACPI_IPMI_BUFFER_SIZE 66 /* _sx_d and _sx_w control methods */ diff --git a/trunk/drivers/acpi/acpica/acdebug.h b/trunk/drivers/acpi/acpica/acdebug.h index deaa81979561..eb0b1f8dee6d 100644 --- a/trunk/drivers/acpi/acpica/acdebug.h +++ b/trunk/drivers/acpi/acpica/acdebug.h @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/acdispat.h b/trunk/drivers/acpi/acpica/acdispat.h index 5935ba6707e2..2d1b7ffa377a 100644 --- a/trunk/drivers/acpi/acpica/acdispat.h +++ b/trunk/drivers/acpi/acpica/acdispat.h @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/acevents.h b/trunk/drivers/acpi/acpica/acevents.h index c53caa521a30..bea3b4899183 100644 --- a/trunk/drivers/acpi/acpica/acevents.h +++ b/trunk/drivers/acpi/acpica/acevents.h @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -162,7 +162,6 @@ acpi_status acpi_ev_initialize_op_regions(void); acpi_status acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, - union acpi_operand_object *field_obj, u32 function, u32 region_offset, u32 bit_width, u64 *value); diff --git a/trunk/drivers/acpi/acpica/acglobal.h b/trunk/drivers/acpi/acpica/acglobal.h index 261fd5eb2b68..76dc02f15574 100644 --- a/trunk/drivers/acpi/acpica/acglobal.h +++ b/trunk/drivers/acpi/acpica/acglobal.h @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -140,19 +140,8 @@ u32 acpi_gbl_trace_flags; acpi_name acpi_gbl_trace_method_name; u8 acpi_gbl_system_awake_and_running; -/* - * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning - * that the ACPI hardware is no longer required. A flag in the FADT indicates - * a reduced HW machine, and that flag is duplicated here for convenience. - */ -u8 acpi_gbl_reduced_hardware; - #endif -/* Do not disassemble buffers to resource descriptors */ - -ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_no_resource_disassembly, FALSE); - /***************************************************************************** * * Debug support @@ -218,7 +207,7 @@ ACPI_EXTERN struct acpi_rw_lock acpi_gbl_namespace_rw_lock; /***************************************************************************** * - * Mutual exclusion within ACPICA subsystem + * Mutual exlusion within ACPICA subsystem * ****************************************************************************/ @@ -306,8 +295,6 @@ ACPI_EXTERN u8 acpi_gbl_acpi_hardware_present; ACPI_EXTERN u8 acpi_gbl_events_initialized; ACPI_EXTERN u8 acpi_gbl_osi_data; ACPI_EXTERN struct acpi_interface_info *acpi_gbl_supported_interfaces; -ACPI_EXTERN struct acpi_address_range - *acpi_gbl_address_range_list[ACPI_ADDRESS_RANGE_MAX]; #ifndef DEFINE_ACPI_GLOBALS diff --git a/trunk/drivers/acpi/acpica/achware.h b/trunk/drivers/acpi/acpica/achware.h index 677793e938f5..e7213beaafc7 100644 --- a/trunk/drivers/acpi/acpica/achware.h +++ b/trunk/drivers/acpi/acpica/achware.h @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/acinterp.h b/trunk/drivers/acpi/acpica/acinterp.h index eb308635da72..3731e1c34b83 100644 --- a/trunk/drivers/acpi/acpica/acinterp.h +++ b/trunk/drivers/acpi/acpica/acinterp.h @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -468,8 +468,6 @@ void acpi_ex_eisa_id_to_string(char *dest, u64 compressed_id); void acpi_ex_integer_to_string(char *dest, u64 value); -u8 acpi_is_valid_space_id(u8 space_id); - /* * exregion - default op_region handlers */ diff --git a/trunk/drivers/acpi/acpica/aclocal.h b/trunk/drivers/acpi/acpica/aclocal.h index 3f24068837d5..5552125d8340 100644 --- a/trunk/drivers/acpi/acpica/aclocal.h +++ b/trunk/drivers/acpi/acpica/aclocal.h @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -53,7 +53,7 @@ typedef u32 acpi_mutex_handle; /* Total number of aml opcodes defined */ -#define AML_NUM_OPCODES 0x81 +#define AML_NUM_OPCODES 0x7F /* Forward declarations */ @@ -249,16 +249,12 @@ struct acpi_create_field_info { struct acpi_namespace_node *field_node; struct acpi_namespace_node *register_node; struct acpi_namespace_node *data_register_node; - struct acpi_namespace_node *connection_node; - u8 *resource_buffer; u32 bank_value; u32 field_bit_position; u32 field_bit_length; - u16 resource_length; u8 field_flags; u8 attribute; u8 field_type; - u8 access_length; }; typedef @@ -319,8 +315,7 @@ struct acpi_name_info { /* * Used for ACPI_PTYPE1_FIXED, ACPI_PTYPE1_VAR, ACPI_PTYPE2, - * ACPI_PTYPE2_MIN, ACPI_PTYPE2_PKG_COUNT, ACPI_PTYPE2_COUNT, - * ACPI_PTYPE2_FIX_VAR + * ACPI_PTYPE2_MIN, ACPI_PTYPE2_PKG_COUNT, ACPI_PTYPE2_COUNT */ struct acpi_package_info { u8 type; @@ -630,15 +625,6 @@ union acpi_generic_state { typedef acpi_status(*ACPI_EXECUTE_OP) (struct acpi_walk_state * walk_state); -/* Address Range info block */ - -struct acpi_address_range { - struct acpi_address_range *next; - struct acpi_namespace_node *region_node; - acpi_physical_address start_address; - acpi_physical_address end_address; -}; - /***************************************************************************** * * Parser typedefs and structs @@ -965,7 +951,7 @@ struct acpi_port_info { #define ACPI_RESOURCE_NAME_END_DEPENDENT 0x38 #define ACPI_RESOURCE_NAME_IO 0x40 #define ACPI_RESOURCE_NAME_FIXED_IO 0x48 -#define ACPI_RESOURCE_NAME_FIXED_DMA 0x50 +#define ACPI_RESOURCE_NAME_RESERVED_S1 0x50 #define ACPI_RESOURCE_NAME_RESERVED_S2 0x58 #define ACPI_RESOURCE_NAME_RESERVED_S3 0x60 #define ACPI_RESOURCE_NAME_RESERVED_S4 0x68 @@ -987,9 +973,7 @@ struct acpi_port_info { #define ACPI_RESOURCE_NAME_EXTENDED_IRQ 0x89 #define ACPI_RESOURCE_NAME_ADDRESS64 0x8A #define ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 0x8B -#define ACPI_RESOURCE_NAME_GPIO 0x8C -#define ACPI_RESOURCE_NAME_SERIAL_BUS 0x8E -#define ACPI_RESOURCE_NAME_LARGE_MAX 0x8E +#define ACPI_RESOURCE_NAME_LARGE_MAX 0x8B /***************************************************************************** * diff --git a/trunk/drivers/acpi/acpica/acmacros.h b/trunk/drivers/acpi/acpica/acmacros.h index ef338a96f5b2..b7491ee1fba6 100644 --- a/trunk/drivers/acpi/acpica/acmacros.h +++ b/trunk/drivers/acpi/acpica/acmacros.h @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/acnamesp.h b/trunk/drivers/acpi/acpica/acnamesp.h index 2c9e0f049523..79a598c67fe3 100644 --- a/trunk/drivers/acpi/acpica/acnamesp.h +++ b/trunk/drivers/acpi/acpica/acnamesp.h @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/acobject.h b/trunk/drivers/acpi/acpica/acobject.h index c065078ca83b..1055769f2f01 100644 --- a/trunk/drivers/acpi/acpica/acobject.h +++ b/trunk/drivers/acpi/acpica/acobject.h @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -254,7 +254,6 @@ ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO}; u32 base_byte_offset; /* Byte offset within containing object */\ u32 value; /* Value to store into the Bank or Index register */\ u8 start_field_bit_offset;/* Bit offset within first field datum (0-63) */\ - u8 access_length; /* For serial regions/fields */ struct acpi_object_field_common { /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */ @@ -262,9 +261,7 @@ struct acpi_object_field_common { /* COMMON FIELD (for BUFFER, REGION, BANK, and }; struct acpi_object_region_field { - ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO u16 resource_length; - union acpi_operand_object *region_obj; /* Containing op_region object */ - u8 *resource_buffer; /* resource_template for serial regions/fields */ + ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Containing op_region object */ }; struct acpi_object_bank_field { @@ -361,7 +358,6 @@ typedef enum { */ struct acpi_object_extra { ACPI_OBJECT_COMMON_HEADER struct acpi_namespace_node *method_REG; /* _REG method for this region (if any) */ - struct acpi_namespace_node *scope_node; void *region_context; /* Region-specific data */ u8 *aml_start; u32 aml_length; diff --git a/trunk/drivers/acpi/acpica/acopcode.h b/trunk/drivers/acpi/acpica/acopcode.h index 9440d053fbb3..bb2ccfad7376 100644 --- a/trunk/drivers/acpi/acpica/acopcode.h +++ b/trunk/drivers/acpi/acpica/acopcode.h @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -93,7 +93,6 @@ #define ARGP_CONCAT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) #define ARGP_CONCAT_RES_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) #define ARGP_COND_REF_OF_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_SUPERNAME) -#define ARGP_CONNECTFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING) #define ARGP_CONTINUE_OP ARG_NONE #define ARGP_COPY_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_SIMPLENAME) #define ARGP_CREATE_BIT_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME) @@ -165,7 +164,6 @@ #define ARGP_RETURN_OP ARGP_LIST1 (ARGP_TERMARG) #define ARGP_REVISION_OP ARG_NONE #define ARGP_SCOPE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_TERMLIST) -#define ARGP_SERIALFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING) #define ARGP_SHIFT_LEFT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) #define ARGP_SHIFT_RIGHT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) #define ARGP_SIGNAL_OP ARGP_LIST1 (ARGP_SUPERNAME) @@ -225,7 +223,6 @@ #define ARGI_CONCAT_OP ARGI_LIST3 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA, ARGI_TARGETREF) #define ARGI_CONCAT_RES_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_BUFFER, ARGI_TARGETREF) #define ARGI_COND_REF_OF_OP ARGI_LIST2 (ARGI_OBJECT_REF, ARGI_TARGETREF) -#define ARGI_CONNECTFIELD_OP ARGI_INVALID_OPCODE #define ARGI_CONTINUE_OP ARGI_INVALID_OPCODE #define ARGI_COPY_OP ARGI_LIST2 (ARGI_ANYTYPE, ARGI_SIMPLE_TARGET) #define ARGI_CREATE_BIT_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE) @@ -297,7 +294,6 @@ #define ARGI_RETURN_OP ARGI_INVALID_OPCODE #define ARGI_REVISION_OP ARG_NONE #define ARGI_SCOPE_OP ARGI_INVALID_OPCODE -#define ARGI_SERIALFIELD_OP ARGI_INVALID_OPCODE #define ARGI_SHIFT_LEFT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) #define ARGI_SHIFT_RIGHT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) #define ARGI_SIGNAL_OP ARGI_LIST1 (ARGI_EVENT) diff --git a/trunk/drivers/acpi/acpica/acparser.h b/trunk/drivers/acpi/acpica/acparser.h index b725d780d34d..5ea1e06afa20 100644 --- a/trunk/drivers/acpi/acpica/acparser.h +++ b/trunk/drivers/acpi/acpica/acparser.h @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/acpredef.h b/trunk/drivers/acpi/acpica/acpredef.h index bbb34c9be4e8..c445cca490ea 100644 --- a/trunk/drivers/acpi/acpica/acpredef.h +++ b/trunk/drivers/acpi/acpica/acpredef.h @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -94,14 +94,6 @@ * ACPI_PTYPE2_REV_FIXED: Revision at start, each subpackage is Fixed-length * (Used for _ART, _FPS) * - * ACPI_PTYPE2_FIX_VAR: Each subpackage consists of some fixed-length elements - * followed by an optional element - * object type - * count - * object type - * count = 0 (optional) - * (Used for _DLM) - * *****************************************************************************/ enum acpi_return_package_types { @@ -113,8 +105,7 @@ enum acpi_return_package_types { ACPI_PTYPE2_PKG_COUNT = 6, ACPI_PTYPE2_FIXED = 7, ACPI_PTYPE2_MIN = 8, - ACPI_PTYPE2_REV_FIXED = 9, - ACPI_PTYPE2_FIX_VAR = 10 + ACPI_PTYPE2_REV_FIXED = 9 }; #ifdef ACPI_CREATE_PREDEFINED_TABLE @@ -163,7 +154,6 @@ static const union acpi_predefined_info predefined_names[] = {{"_AC8", 0, ACPI_RTYPE_INTEGER}}, {{"_AC9", 0, ACPI_RTYPE_INTEGER}}, {{"_ADR", 0, ACPI_RTYPE_INTEGER}}, - {{"_AEI", 0, ACPI_RTYPE_BUFFER}}, {{"_AL0", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Refs) */ {{{ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0,0}, 0,0}}, @@ -239,13 +229,6 @@ static const union acpi_predefined_info predefined_names[] = {{"_CID", 0, ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING | ACPI_RTYPE_PACKAGE}}, /* Variable-length (Ints/Strs) */ {{{ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING, 0,0}, 0,0}}, - {{"_CLS", 0, ACPI_RTYPE_PACKAGE}}, /* Fixed-length (3 Int) */ - {{{ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 3, 0}, 0, 0}}, - - {{"_CPC", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Ints/Bufs) */ - {{{ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER | ACPI_RTYPE_BUFFER, 0, 0}, 0, - 0}}, - {{"_CRS", 0, ACPI_RTYPE_BUFFER}}, {{"_CRT", 0, ACPI_RTYPE_INTEGER}}, {{"_CSD", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (1 Int(n), n-1 Int) */ @@ -254,21 +237,12 @@ static const union acpi_predefined_info predefined_names[] = {{"_CST", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (1 Int(n), n Pkg (1 Buf/3 Int) */ {{{ACPI_PTYPE2_PKG_COUNT,ACPI_RTYPE_BUFFER, 1, ACPI_RTYPE_INTEGER}, 3,0}}, - {{"_CWS", 1, ACPI_RTYPE_INTEGER}}, {{"_DCK", 1, ACPI_RTYPE_INTEGER}}, {{"_DCS", 0, ACPI_RTYPE_INTEGER}}, {{"_DDC", 1, ACPI_RTYPE_INTEGER | ACPI_RTYPE_BUFFER}}, {{"_DDN", 0, ACPI_RTYPE_STRING}}, - {{"_DEP", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Refs) */ - {{{ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0}, 0, 0}}, - {{"_DGS", 0, ACPI_RTYPE_INTEGER}}, {{"_DIS", 0, 0}}, - - {{"_DLM", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each (1 Ref, 0/1 Optional Buf/Ref) */ - {{{ACPI_PTYPE2_FIX_VAR, ACPI_RTYPE_REFERENCE, 1, - ACPI_RTYPE_REFERENCE | ACPI_RTYPE_BUFFER}, 0, 0}}, - {{"_DMA", 0, ACPI_RTYPE_BUFFER}}, {{"_DOD", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Ints) */ {{{ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 0,0}, 0,0}}, @@ -288,7 +262,6 @@ static const union acpi_predefined_info predefined_names[] = {{"_EJ3", 1, 0}}, {{"_EJ4", 1, 0}}, {{"_EJD", 0, ACPI_RTYPE_STRING}}, - {{"_EVT", 1, 0}}, {{"_FDE", 0, ACPI_RTYPE_BUFFER}}, {{"_FDI", 0, ACPI_RTYPE_PACKAGE}}, /* Fixed-length (16 Int) */ {{{ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 16,0}, 0,0}}, @@ -308,17 +281,14 @@ static const union acpi_predefined_info predefined_names[] = {{{ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 3, 0}, 0, 0}}, {{"_GAI", 0, ACPI_RTYPE_INTEGER}}, - {{"_GCP", 0, ACPI_RTYPE_INTEGER}}, {{"_GHL", 0, ACPI_RTYPE_INTEGER}}, {{"_GLK", 0, ACPI_RTYPE_INTEGER}}, {{"_GPD", 0, ACPI_RTYPE_INTEGER}}, {{"_GPE", 0, ACPI_RTYPE_INTEGER}}, /* _GPE method, not _GPE scope */ - {{"_GRT", 0, ACPI_RTYPE_BUFFER}}, {{"_GSB", 0, ACPI_RTYPE_INTEGER}}, {{"_GTF", 0, ACPI_RTYPE_BUFFER}}, {{"_GTM", 0, ACPI_RTYPE_BUFFER}}, {{"_GTS", 1, 0}}, - {{"_GWS", 1, ACPI_RTYPE_INTEGER}}, {{"_HID", 0, ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING}}, {{"_HOT", 0, ACPI_RTYPE_INTEGER}}, {{"_HPP", 0, ACPI_RTYPE_PACKAGE}}, /* Fixed-length (4 Int) */ @@ -333,7 +303,6 @@ static const union acpi_predefined_info predefined_names[] = {{"_HPX", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each (var Ints) */ {{{ACPI_PTYPE2_MIN, ACPI_RTYPE_INTEGER, 5,0}, 0,0}}, - {{"_HRV", 0, ACPI_RTYPE_INTEGER}}, {{"_IFT", 0, ACPI_RTYPE_INTEGER}}, /* See IPMI spec */ {{"_INI", 0, 0}}, {{"_IRC", 0, 0}}, @@ -392,9 +361,6 @@ static const union acpi_predefined_info predefined_names[] = {{"_PR3", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Refs) */ {{{ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0}, 0, 0}}, - {{"_PRE", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Refs) */ - {{{ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0}, 0, 0}}, - {{"_PRL", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Refs) */ {{{ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0}, 0, 0}}, @@ -425,7 +391,6 @@ static const union acpi_predefined_info predefined_names[] = {{"_PSD", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Pkgs) each (5 Int) with count */ {{{ACPI_PTYPE2_COUNT, ACPI_RTYPE_INTEGER,0,0}, 0,0}}, - {{"_PSE", 1, 0}}, {{"_PSL", 0, ACPI_RTYPE_PACKAGE}}, /* Variable-length (Refs) */ {{{ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0,0}, 0,0}}, @@ -492,7 +457,6 @@ static const union acpi_predefined_info predefined_names[] = {{"_SLI", 0, ACPI_RTYPE_BUFFER}}, {{"_SPD", 1, ACPI_RTYPE_INTEGER}}, {{"_SRS", 1, 0}}, - {{"_SRT", 1, ACPI_RTYPE_INTEGER}}, {{"_SRV", 0, ACPI_RTYPE_INTEGER}}, /* See IPMI spec */ {{"_SST", 1, 0}}, {{"_STA", 0, ACPI_RTYPE_INTEGER}}, @@ -500,7 +464,6 @@ static const union acpi_predefined_info predefined_names[] = {{"_STP", 2, ACPI_RTYPE_INTEGER}}, {{"_STR", 0, ACPI_RTYPE_BUFFER}}, {{"_STV", 2, ACPI_RTYPE_INTEGER}}, - {{"_SUB", 0, ACPI_RTYPE_STRING}}, {{"_SUN", 0, ACPI_RTYPE_INTEGER}}, {{"_SWS", 0, ACPI_RTYPE_INTEGER}}, {{"_TC1", 0, ACPI_RTYPE_INTEGER}}, diff --git a/trunk/drivers/acpi/acpica/acresrc.h b/trunk/drivers/acpi/acpica/acresrc.h index 0347d0993497..f08b55b7f3a0 100644 --- a/trunk/drivers/acpi/acpica/acresrc.h +++ b/trunk/drivers/acpi/acpica/acresrc.h @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -73,40 +73,28 @@ typedef const struct acpi_rsconvert_info { /* Resource conversion opcodes */ -typedef enum { - ACPI_RSC_INITGET = 0, - ACPI_RSC_INITSET, - ACPI_RSC_FLAGINIT, - ACPI_RSC_1BITFLAG, - ACPI_RSC_2BITFLAG, - ACPI_RSC_3BITFLAG, - ACPI_RSC_ADDRESS, - ACPI_RSC_BITMASK, - ACPI_RSC_BITMASK16, - ACPI_RSC_COUNT, - ACPI_RSC_COUNT16, - ACPI_RSC_COUNT_GPIO_PIN, - ACPI_RSC_COUNT_GPIO_RES, - ACPI_RSC_COUNT_GPIO_VEN, - ACPI_RSC_COUNT_SERIAL_RES, - ACPI_RSC_COUNT_SERIAL_VEN, - ACPI_RSC_DATA8, - ACPI_RSC_EXIT_EQ, - ACPI_RSC_EXIT_LE, - ACPI_RSC_EXIT_NE, - ACPI_RSC_LENGTH, - ACPI_RSC_MOVE_GPIO_PIN, - ACPI_RSC_MOVE_GPIO_RES, - ACPI_RSC_MOVE_SERIAL_RES, - ACPI_RSC_MOVE_SERIAL_VEN, - ACPI_RSC_MOVE8, - ACPI_RSC_MOVE16, - ACPI_RSC_MOVE32, - ACPI_RSC_MOVE64, - ACPI_RSC_SET8, - ACPI_RSC_SOURCE, - ACPI_RSC_SOURCEX -} ACPI_RSCONVERT_OPCODES; +#define ACPI_RSC_INITGET 0 +#define ACPI_RSC_INITSET 1 +#define ACPI_RSC_FLAGINIT 2 +#define ACPI_RSC_1BITFLAG 3 +#define ACPI_RSC_2BITFLAG 4 +#define ACPI_RSC_COUNT 5 +#define ACPI_RSC_COUNT16 6 +#define ACPI_RSC_LENGTH 7 +#define ACPI_RSC_MOVE8 8 +#define ACPI_RSC_MOVE16 9 +#define ACPI_RSC_MOVE32 10 +#define ACPI_RSC_MOVE64 11 +#define ACPI_RSC_SET8 12 +#define ACPI_RSC_DATA8 13 +#define ACPI_RSC_ADDRESS 14 +#define ACPI_RSC_SOURCE 15 +#define ACPI_RSC_SOURCEX 16 +#define ACPI_RSC_BITMASK 17 +#define ACPI_RSC_BITMASK16 18 +#define ACPI_RSC_EXIT_NE 19 +#define ACPI_RSC_EXIT_LE 20 +#define ACPI_RSC_EXIT_EQ 21 /* Resource Conversion sub-opcodes */ @@ -118,9 +106,6 @@ typedef enum { #define ACPI_RS_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_resource,f) #define AML_OFFSET(f) (u8) ACPI_OFFSET (union aml_resource,f) -/* - * Individual entry for the resource dump tables - */ typedef const struct acpi_rsdump_info { u8 opcode; u8 offset; @@ -131,25 +116,20 @@ typedef const struct acpi_rsdump_info { /* Values for the Opcode field above */ -typedef enum { - ACPI_RSD_TITLE = 0, - ACPI_RSD_1BITFLAG, - ACPI_RSD_2BITFLAG, - ACPI_RSD_3BITFLAG, - ACPI_RSD_ADDRESS, - ACPI_RSD_DWORDLIST, - ACPI_RSD_LITERAL, - ACPI_RSD_LONGLIST, - ACPI_RSD_SHORTLIST, - ACPI_RSD_SHORTLISTX, - ACPI_RSD_SOURCE, - ACPI_RSD_STRING, - ACPI_RSD_UINT8, - ACPI_RSD_UINT16, - ACPI_RSD_UINT32, - ACPI_RSD_UINT64, - ACPI_RSD_WORDLIST -} ACPI_RSDUMP_OPCODES; +#define ACPI_RSD_TITLE 0 +#define ACPI_RSD_LITERAL 1 +#define ACPI_RSD_STRING 2 +#define ACPI_RSD_UINT8 3 +#define ACPI_RSD_UINT16 4 +#define ACPI_RSD_UINT32 5 +#define ACPI_RSD_UINT64 6 +#define ACPI_RSD_1BITFLAG 7 +#define ACPI_RSD_2BITFLAG 8 +#define ACPI_RSD_SHORTLIST 9 +#define ACPI_RSD_LONGLIST 10 +#define ACPI_RSD_DWORDLIST 11 +#define ACPI_RSD_ADDRESS 12 +#define ACPI_RSD_SOURCE 13 /* restore default alignment */ @@ -158,18 +138,13 @@ typedef enum { /* Resource tables indexed by internal resource type */ extern const u8 acpi_gbl_aml_resource_sizes[]; -extern const u8 acpi_gbl_aml_resource_serial_bus_sizes[]; extern struct acpi_rsconvert_info *acpi_gbl_set_resource_dispatch[]; /* Resource tables indexed by raw AML resource descriptor type */ extern const u8 acpi_gbl_resource_struct_sizes[]; -extern const u8 acpi_gbl_resource_struct_serial_bus_sizes[]; extern struct acpi_rsconvert_info *acpi_gbl_get_resource_dispatch[]; -extern struct acpi_rsconvert_info - *acpi_gbl_convert_resource_serial_bus_dispatch[]; - struct acpi_vendor_walk_info { struct acpi_vendor_uuid *uuid; struct acpi_buffer *buffer; @@ -215,10 +190,6 @@ acpi_status acpi_rs_set_srs_method_data(struct acpi_namespace_node *node, struct acpi_buffer *ret_buffer); -acpi_status -acpi_rs_get_aei_method_data(struct acpi_namespace_node *node, - struct acpi_buffer *ret_buffer); - /* * rscalc */ @@ -322,11 +293,6 @@ extern struct acpi_rsconvert_info acpi_rs_convert_address16[]; extern struct acpi_rsconvert_info acpi_rs_convert_ext_irq[]; extern struct acpi_rsconvert_info acpi_rs_convert_address64[]; extern struct acpi_rsconvert_info acpi_rs_convert_ext_address64[]; -extern struct acpi_rsconvert_info acpi_rs_convert_gpio[]; -extern struct acpi_rsconvert_info acpi_rs_convert_fixed_dma[]; -extern struct acpi_rsconvert_info acpi_rs_convert_i2c_serial_bus[]; -extern struct acpi_rsconvert_info acpi_rs_convert_spi_serial_bus[]; -extern struct acpi_rsconvert_info acpi_rs_convert_uart_serial_bus[]; /* These resources require separate get/set tables */ @@ -344,7 +310,6 @@ extern struct acpi_rsconvert_info acpi_rs_set_vendor[]; * rsinfo */ extern struct acpi_rsdump_info *acpi_gbl_dump_resource_dispatch[]; -extern struct acpi_rsdump_info *acpi_gbl_dump_serial_bus_dispatch[]; /* * rsdump @@ -366,12 +331,6 @@ extern struct acpi_rsdump_info acpi_rs_dump_address64[]; extern struct acpi_rsdump_info acpi_rs_dump_ext_address64[]; extern struct acpi_rsdump_info acpi_rs_dump_ext_irq[]; extern struct acpi_rsdump_info acpi_rs_dump_generic_reg[]; -extern struct acpi_rsdump_info acpi_rs_dump_gpio[]; -extern struct acpi_rsdump_info acpi_rs_dump_fixed_dma[]; -extern struct acpi_rsdump_info acpi_rs_dump_common_serial_bus[]; -extern struct acpi_rsdump_info acpi_rs_dump_i2c_serial_bus[]; -extern struct acpi_rsdump_info acpi_rs_dump_spi_serial_bus[]; -extern struct acpi_rsdump_info acpi_rs_dump_uart_serial_bus[]; #endif #endif /* __ACRESRC_H__ */ diff --git a/trunk/drivers/acpi/acpica/acstruct.h b/trunk/drivers/acpi/acpica/acstruct.h index 0404df605bc1..1623b245dde2 100644 --- a/trunk/drivers/acpi/acpica/acstruct.h +++ b/trunk/drivers/acpi/acpica/acstruct.h @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/actables.h b/trunk/drivers/acpi/acpica/actables.h index d5bec304c823..967f08124eba 100644 --- a/trunk/drivers/acpi/acpica/actables.h +++ b/trunk/drivers/acpi/acpica/actables.h @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/acutils.h b/trunk/drivers/acpi/acpica/acutils.h index 925ccf22101b..99c140d8e348 100644 --- a/trunk/drivers/acpi/acpica/acutils.h +++ b/trunk/drivers/acpi/acpica/acutils.h @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -45,7 +45,6 @@ #define _ACUTILS_H extern const u8 acpi_gbl_resource_aml_sizes[]; -extern const u8 acpi_gbl_resource_aml_serial_bus_sizes[]; /* Strings used by the disassembler and debugger resource dump routines */ @@ -579,24 +578,6 @@ acpi_ut_create_list(char *list_name, #endif /* ACPI_DBG_TRACK_ALLOCATIONS */ -/* - * utaddress - address range check - */ -acpi_status -acpi_ut_add_address_range(acpi_adr_space_type space_id, - acpi_physical_address address, - u32 length, struct acpi_namespace_node *region_node); - -void -acpi_ut_remove_address_range(acpi_adr_space_type space_id, - struct acpi_namespace_node *region_node); - -u32 -acpi_ut_check_address_range(acpi_adr_space_type space_id, - acpi_physical_address address, u32 length, u8 warn); - -void acpi_ut_delete_address_lists(void); - /* * utxferror - various error/warning output functions */ diff --git a/trunk/drivers/acpi/acpica/amlcode.h b/trunk/drivers/acpi/acpica/amlcode.h index 905280fec0fa..1077f17859ed 100644 --- a/trunk/drivers/acpi/acpica/amlcode.h +++ b/trunk/drivers/acpi/acpica/amlcode.h @@ -7,7 +7,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -188,14 +188,6 @@ #define AML_LLESSEQUAL_OP (u16) 0x9294 #define AML_LNOTEQUAL_OP (u16) 0x9293 -/* - * Opcodes for "Field" operators - */ -#define AML_FIELD_OFFSET_OP (u8) 0x00 -#define AML_FIELD_ACCESS_OP (u8) 0x01 -#define AML_FIELD_CONNECTION_OP (u8) 0x02 /* ACPI 5.0 */ -#define AML_FIELD_EXT_ACCESS_OP (u8) 0x03 /* ACPI 5.0 */ - /* * Internal opcodes * Use only "Unknown" AML opcodes, don't attempt to use @@ -210,8 +202,6 @@ #define AML_INT_METHODCALL_OP (u16) 0x0035 #define AML_INT_RETURN_VALUE_OP (u16) 0x0036 #define AML_INT_EVAL_SUBTREE_OP (u16) 0x0037 -#define AML_INT_CONNECTION_OP (u16) 0x0038 -#define AML_INT_EXTACCESSFIELD_OP (u16) 0x0039 #define ARG_NONE 0x0 @@ -466,16 +456,13 @@ typedef enum { * access_as keyword */ typedef enum { - AML_FIELD_ATTRIB_QUICK = 0x02, - AML_FIELD_ATTRIB_SEND_RCV = 0x04, - AML_FIELD_ATTRIB_BYTE = 0x06, - AML_FIELD_ATTRIB_WORD = 0x08, - AML_FIELD_ATTRIB_BLOCK = 0x0A, - AML_FIELD_ATTRIB_MULTIBYTE = 0x0B, - AML_FIELD_ATTRIB_WORD_CALL = 0x0C, - AML_FIELD_ATTRIB_BLOCK_CALL = 0x0D, - AML_FIELD_ATTRIB_RAW_BYTES = 0x0E, - AML_FIELD_ATTRIB_RAW_PROCESS = 0x0F + AML_FIELD_ATTRIB_SMB_QUICK = 0x02, + AML_FIELD_ATTRIB_SMB_SEND_RCV = 0x04, + AML_FIELD_ATTRIB_SMB_BYTE = 0x06, + AML_FIELD_ATTRIB_SMB_WORD = 0x08, + AML_FIELD_ATTRIB_SMB_BLOCK = 0x0A, + AML_FIELD_ATTRIB_SMB_WORD_CALL = 0x0C, + AML_FIELD_ATTRIB_SMB_BLOCK_CALL = 0x0D } AML_ACCESS_ATTRIBUTE; /* Bit fields in the AML method_flags byte */ diff --git a/trunk/drivers/acpi/acpica/amlresrc.h b/trunk/drivers/acpi/acpica/amlresrc.h index 7b2128f274e7..59122cde247c 100644 --- a/trunk/drivers/acpi/acpica/amlresrc.h +++ b/trunk/drivers/acpi/acpica/amlresrc.h @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -58,48 +58,29 @@ #define ACPI_RESTAG_TYPESPECIFICATTRIBUTES "_ATT" #define ACPI_RESTAG_BASEADDRESS "_BAS" #define ACPI_RESTAG_BUSMASTER "_BM_" /* Master(1), Slave(0) */ -#define ACPI_RESTAG_DEBOUNCETIME "_DBT" #define ACPI_RESTAG_DECODE "_DEC" -#define ACPI_RESTAG_DEVICEPOLARITY "_DPL" #define ACPI_RESTAG_DMA "_DMA" #define ACPI_RESTAG_DMATYPE "_TYP" /* Compatible(0), A(1), B(2), F(3) */ -#define ACPI_RESTAG_DRIVESTRENGTH "_DRS" -#define ACPI_RESTAG_ENDIANNESS "_END" -#define ACPI_RESTAG_FLOWCONTROL "_FLC" #define ACPI_RESTAG_GRANULARITY "_GRA" #define ACPI_RESTAG_INTERRUPT "_INT" #define ACPI_RESTAG_INTERRUPTLEVEL "_LL_" /* active_lo(1), active_hi(0) */ #define ACPI_RESTAG_INTERRUPTSHARE "_SHR" /* Shareable(1), no_share(0) */ #define ACPI_RESTAG_INTERRUPTTYPE "_HE_" /* Edge(1), Level(0) */ -#define ACPI_RESTAG_IORESTRICTION "_IOR" #define ACPI_RESTAG_LENGTH "_LEN" -#define ACPI_RESTAG_LINE "_LIN" #define ACPI_RESTAG_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */ #define ACPI_RESTAG_MEMTYPE "_MEM" /* non_cache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */ #define ACPI_RESTAG_MAXADDR "_MAX" #define ACPI_RESTAG_MINADDR "_MIN" #define ACPI_RESTAG_MAXTYPE "_MAF" #define ACPI_RESTAG_MINTYPE "_MIF" -#define ACPI_RESTAG_MODE "_MOD" -#define ACPI_RESTAG_PARITY "_PAR" -#define ACPI_RESTAG_PHASE "_PHA" -#define ACPI_RESTAG_PIN "_PIN" -#define ACPI_RESTAG_PINCONFIG "_PPI" -#define ACPI_RESTAG_POLARITY "_POL" #define ACPI_RESTAG_REGISTERBITOFFSET "_RBO" #define ACPI_RESTAG_REGISTERBITWIDTH "_RBW" #define ACPI_RESTAG_RANGETYPE "_RNG" #define ACPI_RESTAG_READWRITETYPE "_RW_" /* read_only(0), Writeable (1) */ -#define ACPI_RESTAG_LENGTH_RX "_RXL" -#define ACPI_RESTAG_LENGTH_TX "_TXL" -#define ACPI_RESTAG_SLAVEMODE "_SLV" -#define ACPI_RESTAG_SPEED "_SPE" -#define ACPI_RESTAG_STOPBITS "_STB" #define ACPI_RESTAG_TRANSLATION "_TRA" #define ACPI_RESTAG_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */ #define ACPI_RESTAG_TYPE "_TTP" /* Translation(1), Static (0) */ #define ACPI_RESTAG_XFERTYPE "_SIZ" /* 8(0), 8_and16(1), 16(2) */ -#define ACPI_RESTAG_VENDORDATA "_VEN" /* Default sizes for "small" resource descriptors */ @@ -109,7 +90,6 @@ #define ASL_RDESC_END_DEPEND_SIZE 0x00 #define ASL_RDESC_IO_SIZE 0x07 #define ASL_RDESC_FIXED_IO_SIZE 0x03 -#define ASL_RDESC_FIXED_DMA_SIZE 0x05 #define ASL_RDESC_END_TAG_SIZE 0x01 struct asl_resource_node { @@ -184,12 +164,6 @@ struct aml_resource_end_tag { AML_RESOURCE_SMALL_HEADER_COMMON u8 checksum; }; -struct aml_resource_fixed_dma { - AML_RESOURCE_SMALL_HEADER_COMMON u16 request_lines; - u16 channels; - u8 width; -}; - /* * LARGE descriptors */ @@ -289,110 +263,6 @@ struct aml_resource_generic_register { u64 address; }; -/* Common descriptor for gpio_int and gpio_io (ACPI 5.0) */ - -struct aml_resource_gpio { - AML_RESOURCE_LARGE_HEADER_COMMON u8 revision_id; - u8 connection_type; - u16 flags; - u16 int_flags; - u8 pin_config; - u16 drive_strength; - u16 debounce_timeout; - u16 pin_table_offset; - u8 res_source_index; - u16 res_source_offset; - u16 vendor_offset; - u16 vendor_length; - /* - * Optional fields follow immediately: - * 1) PIN list (Words) - * 2) Resource Source String - * 3) Vendor Data bytes - */ -}; - -#define AML_RESOURCE_GPIO_REVISION 1 /* ACPI 5.0 */ - -/* Values for connection_type above */ - -#define AML_RESOURCE_GPIO_TYPE_INT 0 -#define AML_RESOURCE_GPIO_TYPE_IO 1 -#define AML_RESOURCE_MAX_GPIOTYPE 1 - -/* Common preamble for all serial descriptors (ACPI 5.0) */ - -#define AML_RESOURCE_SERIAL_COMMON \ - u8 revision_id; \ - u8 res_source_index; \ - u8 type; \ - u8 flags; \ - u16 type_specific_flags; \ - u8 type_revision_id; \ - u16 type_data_length; \ - -/* Values for the type field above */ - -#define AML_RESOURCE_I2C_SERIALBUSTYPE 1 -#define AML_RESOURCE_SPI_SERIALBUSTYPE 2 -#define AML_RESOURCE_UART_SERIALBUSTYPE 3 -#define AML_RESOURCE_MAX_SERIALBUSTYPE 3 -#define AML_RESOURCE_VENDOR_SERIALBUSTYPE 192 /* Vendor defined is 0xC0-0xFF (NOT SUPPORTED) */ - -struct aml_resource_common_serialbus { -AML_RESOURCE_LARGE_HEADER_COMMON AML_RESOURCE_SERIAL_COMMON}; - -struct aml_resource_i2c_serialbus { - AML_RESOURCE_LARGE_HEADER_COMMON - AML_RESOURCE_SERIAL_COMMON u32 connection_speed; - u16 slave_address; - /* - * Optional fields follow immediately: - * 1) Vendor Data bytes - * 2) Resource Source String - */ -}; - -#define AML_RESOURCE_I2C_REVISION 1 /* ACPI 5.0 */ -#define AML_RESOURCE_I2C_TYPE_REVISION 1 /* ACPI 5.0 */ -#define AML_RESOURCE_I2C_MIN_DATA_LEN 6 - -struct aml_resource_spi_serialbus { - AML_RESOURCE_LARGE_HEADER_COMMON - AML_RESOURCE_SERIAL_COMMON u32 connection_speed; - u8 data_bit_length; - u8 clock_phase; - u8 clock_polarity; - u16 device_selection; - /* - * Optional fields follow immediately: - * 1) Vendor Data bytes - * 2) Resource Source String - */ -}; - -#define AML_RESOURCE_SPI_REVISION 1 /* ACPI 5.0 */ -#define AML_RESOURCE_SPI_TYPE_REVISION 1 /* ACPI 5.0 */ -#define AML_RESOURCE_SPI_MIN_DATA_LEN 9 - -struct aml_resource_uart_serialbus { - AML_RESOURCE_LARGE_HEADER_COMMON - AML_RESOURCE_SERIAL_COMMON u32 default_baud_rate; - u16 rx_fifo_size; - u16 tx_fifo_size; - u8 parity; - u8 lines_enabled; - /* - * Optional fields follow immediately: - * 1) Vendor Data bytes - * 2) Resource Source String - */ -}; - -#define AML_RESOURCE_UART_REVISION 1 /* ACPI 5.0 */ -#define AML_RESOURCE_UART_TYPE_REVISION 1 /* ACPI 5.0 */ -#define AML_RESOURCE_UART_MIN_DATA_LEN 10 - /* restore default alignment */ #pragma pack() @@ -414,7 +284,6 @@ union aml_resource { struct aml_resource_end_dependent end_dpf; struct aml_resource_io io; struct aml_resource_fixed_io fixed_io; - struct aml_resource_fixed_dma fixed_dma; struct aml_resource_vendor_small vendor_small; struct aml_resource_end_tag end_tag; @@ -430,11 +299,6 @@ union aml_resource { struct aml_resource_address64 address64; struct aml_resource_extended_address64 ext_address64; struct aml_resource_extended_irq extended_irq; - struct aml_resource_gpio gpio; - struct aml_resource_i2c_serialbus i2c_serial_bus; - struct aml_resource_spi_serialbus spi_serial_bus; - struct aml_resource_uart_serialbus uart_serial_bus; - struct aml_resource_common_serialbus common_serial_bus; /* Utility overlays */ diff --git a/trunk/drivers/acpi/acpica/dsargs.c b/trunk/drivers/acpi/acpica/dsargs.c index 80eb1900297f..8c7b99728aa2 100644 --- a/trunk/drivers/acpi/acpica/dsargs.c +++ b/trunk/drivers/acpi/acpica/dsargs.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -250,13 +250,6 @@ acpi_ds_get_bank_field_arguments(union acpi_operand_object *obj_desc) status = acpi_ds_execute_arguments(node, node->parent, extra_desc->extra.aml_length, extra_desc->extra.aml_start); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - - status = acpi_ut_add_address_range(obj_desc->region.space_id, - obj_desc->region.address, - obj_desc->region.length, node); return_ACPI_STATUS(status); } @@ -391,15 +384,8 @@ acpi_status acpi_ds_get_region_arguments(union acpi_operand_object *obj_desc) /* Execute the argument AML */ - status = acpi_ds_execute_arguments(node, extra_desc->extra.scope_node, + status = acpi_ds_execute_arguments(node, node->parent, extra_desc->extra.aml_length, extra_desc->extra.aml_start); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - - status = acpi_ut_add_address_range(obj_desc->region.space_id, - obj_desc->region.address, - obj_desc->region.length, node); return_ACPI_STATUS(status); } diff --git a/trunk/drivers/acpi/acpica/dscontrol.c b/trunk/drivers/acpi/acpica/dscontrol.c index effe4ca1133f..26c49fff58da 100644 --- a/trunk/drivers/acpi/acpica/dscontrol.c +++ b/trunk/drivers/acpi/acpica/dscontrol.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/dsfield.c b/trunk/drivers/acpi/acpica/dsfield.c index cd243cf2cab2..34be60c0e448 100644 --- a/trunk/drivers/acpi/acpica/dsfield.c +++ b/trunk/drivers/acpi/acpica/dsfield.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -221,7 +221,6 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info, { acpi_status status; u64 position; - union acpi_parse_object *child; ACPI_FUNCTION_TRACE_PTR(ds_get_field_names, info); @@ -233,11 +232,10 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info, while (arg) { /* - * Four types of field elements are handled: - * 1) Name - Enters a new named field into the namespace - * 2) Offset - specifies a bit offset - * 3) access_as - changes the access mode/attributes - * 4) Connection - Associate a resource template with the field + * Three types of field elements are handled: + * 1) Offset - specifies a bit offset + * 2) access_as - changes the access mode + * 3) Name - Enters a new named field into the namespace */ switch (arg->common.aml_opcode) { case AML_INT_RESERVEDFIELD_OP: @@ -255,70 +253,21 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info, break; case AML_INT_ACCESSFIELD_OP: - case AML_INT_EXTACCESSFIELD_OP: + /* - * Get new access_type, access_attribute, and access_length fields - * -- to be used for all field units that follow, until the - * end-of-field or another access_as keyword is encountered. - * NOTE. These three bytes are encoded in the integer value - * of the parseop for convenience. + * Get a new access_type and access_attribute -- to be used for all + * field units that follow, until field end or another access_as + * keyword. * * In field_flags, preserve the flag bits other than the - * ACCESS_TYPE bits. + * ACCESS_TYPE bits */ - - /* access_type (byte_acc, word_acc, etc.) */ - info->field_flags = (u8) ((info-> field_flags & ~(AML_FIELD_ACCESS_TYPE_MASK)) | - ((u8)((u32)(arg->common.value.integer & 0x07)))); - - /* access_attribute (attrib_quick, attrib_byte, etc.) */ - - info->attribute = - (u8)((arg->common.value.integer >> 8) & 0xFF); - - /* access_length (for serial/buffer protocols) */ - - info->access_length = - (u8)((arg->common.value.integer >> 16) & 0xFF); - break; - - case AML_INT_CONNECTION_OP: - /* - * Clear any previous connection. New connection is used for all - * fields that follow, similar to access_as - */ - info->resource_buffer = NULL; - info->connection_node = NULL; + ((u8) ((u32) arg->common.value.integer >> 8))); - /* - * A Connection() is either an actual resource descriptor (buffer) - * or a named reference to a resource template - */ - child = arg->common.value.arg; - if (child->common.aml_opcode == AML_INT_BYTELIST_OP) { - info->resource_buffer = child->named.data; - info->resource_length = - (u16)child->named.value.integer; - } else { - /* Lookup the Connection() namepath, it should already exist */ - - status = acpi_ns_lookup(walk_state->scope_info, - child->common.value. - name, ACPI_TYPE_ANY, - ACPI_IMODE_EXECUTE, - ACPI_NS_DONT_OPEN_SCOPE, - walk_state, - &info->connection_node); - if (ACPI_FAILURE(status)) { - ACPI_ERROR_NAMESPACE(child->common. - value.name, - status); - return_ACPI_STATUS(status); - } - } + info->attribute = (u8) (arg->common.value.integer); break; case AML_INT_NAMEDFIELD_OP: @@ -425,8 +374,6 @@ acpi_ds_create_field(union acpi_parse_object *op, } } - ACPI_MEMSET(&info, 0, sizeof(struct acpi_create_field_info)); - /* Second arg is the field flags */ arg = arg->common.next; @@ -439,6 +386,7 @@ acpi_ds_create_field(union acpi_parse_object *op, info.region_node = region_node; status = acpi_ds_get_field_names(&info, walk_state, arg->common.next); + return_ACPI_STATUS(status); } @@ -526,8 +474,8 @@ acpi_ds_init_field_objects(union acpi_parse_object *op, */ while (arg) { /* - * Ignore OFFSET/ACCESSAS/CONNECTION terms here; we are only interested - * in the field names in order to enter them into the namespace. + * Ignore OFFSET and ACCESSAS terms here; we are only interested in the + * field names in order to enter them into the namespace. */ if (arg->common.aml_opcode == AML_INT_NAMEDFIELD_OP) { status = acpi_ns_lookup(walk_state->scope_info, @@ -703,5 +651,6 @@ acpi_ds_create_index_field(union acpi_parse_object *op, info.region_node = region_node; status = acpi_ds_get_field_names(&info, walk_state, arg->common.next); + return_ACPI_STATUS(status); } diff --git a/trunk/drivers/acpi/acpica/dsinit.c b/trunk/drivers/acpi/acpica/dsinit.c index 9e5ac7f780a7..a7718bf2b9a1 100644 --- a/trunk/drivers/acpi/acpica/dsinit.c +++ b/trunk/drivers/acpi/acpica/dsinit.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/dsmethod.c b/trunk/drivers/acpi/acpica/dsmethod.c index 00f5dab5bcc0..5d797751e205 100644 --- a/trunk/drivers/acpi/acpica/dsmethod.c +++ b/trunk/drivers/acpi/acpica/dsmethod.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/dsmthdat.c b/trunk/drivers/acpi/acpica/dsmthdat.c index b40bd507be5d..905ce29a92e1 100644 --- a/trunk/drivers/acpi/acpica/dsmthdat.c +++ b/trunk/drivers/acpi/acpica/dsmthdat.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/dsobject.c b/trunk/drivers/acpi/acpica/dsobject.c index d7045ca3e32a..f42e17e5c252 100644 --- a/trunk/drivers/acpi/acpica/dsobject.c +++ b/trunk/drivers/acpi/acpica/dsobject.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/dsopcode.c b/trunk/drivers/acpi/acpica/dsopcode.c index e5eff7585102..c627a288e027 100644 --- a/trunk/drivers/acpi/acpica/dsopcode.c +++ b/trunk/drivers/acpi/acpica/dsopcode.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/dsutils.c b/trunk/drivers/acpi/acpica/dsutils.c index 1abcda31037f..2c477ce172fa 100644 --- a/trunk/drivers/acpi/acpica/dsutils.c +++ b/trunk/drivers/acpi/acpica/dsutils.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/dswexec.c b/trunk/drivers/acpi/acpica/dswexec.c index 642f3c053e87..fe40e4c6554f 100644 --- a/trunk/drivers/acpi/acpica/dswexec.c +++ b/trunk/drivers/acpi/acpica/dswexec.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/dswload.c b/trunk/drivers/acpi/acpica/dswload.c index 552aa3a50c84..324acec1179a 100644 --- a/trunk/drivers/acpi/acpica/dswload.c +++ b/trunk/drivers/acpi/acpica/dswload.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/dswload2.c b/trunk/drivers/acpi/acpica/dswload2.c index ae7147724763..976318138c56 100644 --- a/trunk/drivers/acpi/acpica/dswload2.c +++ b/trunk/drivers/acpi/acpica/dswload2.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/dswscope.c b/trunk/drivers/acpi/acpica/dswscope.c index 9e9490a9cbf0..76a661fc1e09 100644 --- a/trunk/drivers/acpi/acpica/dswscope.c +++ b/trunk/drivers/acpi/acpica/dswscope.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/dswstate.c b/trunk/drivers/acpi/acpica/dswstate.c index c9c2ac13e7cc..a6c374ef9914 100644 --- a/trunk/drivers/acpi/acpica/dswstate.c +++ b/trunk/drivers/acpi/acpica/dswstate.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/evevent.c b/trunk/drivers/acpi/acpica/evevent.c index 6729ebe2f1e6..d458b041e651 100644 --- a/trunk/drivers/acpi/acpica/evevent.c +++ b/trunk/drivers/acpi/acpica/evevent.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -71,12 +71,6 @@ acpi_status acpi_ev_initialize_events(void) ACPI_FUNCTION_TRACE(ev_initialize_events); - /* If Hardware Reduced flag is set, there are no fixed events */ - - if (acpi_gbl_reduced_hardware) { - return_ACPI_STATUS(AE_OK); - } - /* * Initialize the Fixed and General Purpose Events. This is done prior to * enabling SCIs to prevent interrupts from occurring before the handlers @@ -117,12 +111,6 @@ acpi_status acpi_ev_install_xrupt_handlers(void) ACPI_FUNCTION_TRACE(ev_install_xrupt_handlers); - /* If Hardware Reduced flag is set, there is no ACPI h/w */ - - if (acpi_gbl_reduced_hardware) { - return_ACPI_STATUS(AE_OK); - } - /* Install the SCI handler */ status = acpi_ev_install_sci_handler(); diff --git a/trunk/drivers/acpi/acpica/evglock.c b/trunk/drivers/acpi/acpica/evglock.c index 5e5683cb1f0d..56a562a1e5d7 100644 --- a/trunk/drivers/acpi/acpica/evglock.c +++ b/trunk/drivers/acpi/acpica/evglock.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -70,12 +70,6 @@ acpi_status acpi_ev_init_global_lock_handler(void) ACPI_FUNCTION_TRACE(ev_init_global_lock_handler); - /* If Hardware Reduced flag is set, there is no global lock */ - - if (acpi_gbl_reduced_hardware) { - return_ACPI_STATUS(AE_OK); - } - /* Attempt installation of the global lock handler */ status = acpi_install_fixed_event_handler(ACPI_EVENT_GLOBAL, diff --git a/trunk/drivers/acpi/acpica/evgpe.c b/trunk/drivers/acpi/acpica/evgpe.c index 9e88cb6fb25e..65c79add3b19 100644 --- a/trunk/drivers/acpi/acpica/evgpe.c +++ b/trunk/drivers/acpi/acpica/evgpe.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/evgpeblk.c b/trunk/drivers/acpi/acpica/evgpeblk.c index be75339cd5dd..ca2c41a53311 100644 --- a/trunk/drivers/acpi/acpica/evgpeblk.c +++ b/trunk/drivers/acpi/acpica/evgpeblk.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/evgpeinit.c b/trunk/drivers/acpi/acpica/evgpeinit.c index adf7494da9db..ce9aa9f9a972 100644 --- a/trunk/drivers/acpi/acpica/evgpeinit.c +++ b/trunk/drivers/acpi/acpica/evgpeinit.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/evgpeutil.c b/trunk/drivers/acpi/acpica/evgpeutil.c index 25073932aa10..80a81d0c4a80 100644 --- a/trunk/drivers/acpi/acpica/evgpeutil.c +++ b/trunk/drivers/acpi/acpica/evgpeutil.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/evmisc.c b/trunk/drivers/acpi/acpica/evmisc.c index 84966f416463..d0b331844427 100644 --- a/trunk/drivers/acpi/acpica/evmisc.c +++ b/trunk/drivers/acpi/acpica/evmisc.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/evregion.c b/trunk/drivers/acpi/acpica/evregion.c index 1b0180a1b798..f0edf5c43c03 100644 --- a/trunk/drivers/acpi/acpica/evregion.c +++ b/trunk/drivers/acpi/acpica/evregion.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -329,7 +329,6 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function) * FUNCTION: acpi_ev_address_space_dispatch * * PARAMETERS: region_obj - Internal region object - * field_obj - Corresponding field. Can be NULL. * Function - Read or Write operation * region_offset - Where in the region to read or write * bit_width - Field width in bits (8, 16, 32, or 64) @@ -345,7 +344,6 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function) acpi_status acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, - union acpi_operand_object *field_obj, u32 function, u32 region_offset, u32 bit_width, u64 *value) { @@ -355,7 +353,6 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, union acpi_operand_object *handler_desc; union acpi_operand_object *region_obj2; void *region_context = NULL; - struct acpi_connection_info *context; ACPI_FUNCTION_TRACE(ev_address_space_dispatch); @@ -378,8 +375,6 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, return_ACPI_STATUS(AE_NOT_EXIST); } - context = handler_desc->address_space.context; - /* * It may be the case that the region has never been initialized. * Some types of regions require special init code @@ -409,7 +404,8 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, acpi_ex_exit_interpreter(); status = region_setup(region_obj, ACPI_REGION_ACTIVATE, - context, ®ion_context); + handler_desc->address_space.context, + ®ion_context); /* Re-enter the interpreter */ @@ -459,25 +455,6 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, acpi_ut_get_region_name(region_obj->region. space_id))); - /* - * Special handling for generic_serial_bus and general_purpose_io: - * There are three extra parameters that must be passed to the - * handler via the context: - * 1) Connection buffer, a resource template from Connection() op. - * 2) Length of the above buffer. - * 3) Actual access length from the access_as() op. - */ - if (((region_obj->region.space_id == ACPI_ADR_SPACE_GSBUS) || - (region_obj->region.space_id == ACPI_ADR_SPACE_GPIO)) && - context && field_obj) { - - /* Get the Connection (resource_template) buffer */ - - context->connection = field_obj->field.resource_buffer; - context->length = field_obj->field.resource_length; - context->access_length = field_obj->field.access_length; - } - if (!(handler_desc->address_space.handler_flags & ACPI_ADDR_HANDLER_DEFAULT_INSTALLED)) { /* @@ -492,7 +469,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, status = handler(function, (region_obj->region.address + region_offset), - bit_width, value, context, + bit_width, value, handler_desc->address_space.context, region_obj2->extra.region_context); if (ACPI_FAILURE(status)) { diff --git a/trunk/drivers/acpi/acpica/evrgnini.c b/trunk/drivers/acpi/acpica/evrgnini.c index 819c17f5897a..55a5d35ef34a 100644 --- a/trunk/drivers/acpi/acpica/evrgnini.c +++ b/trunk/drivers/acpi/acpica/evrgnini.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/evsci.c b/trunk/drivers/acpi/acpica/evsci.c index 26065c612e76..2ebd40e1a3ef 100644 --- a/trunk/drivers/acpi/acpica/evsci.c +++ b/trunk/drivers/acpi/acpica/evsci.c @@ -6,7 +6,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/evxface.c b/trunk/drivers/acpi/acpica/evxface.c index 61944e89565a..f4f523bf5939 100644 --- a/trunk/drivers/acpi/acpica/evxface.c +++ b/trunk/drivers/acpi/acpica/evxface.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/evxfevnt.c b/trunk/drivers/acpi/acpica/evxfevnt.c index 1768bbec1002..20516e599476 100644 --- a/trunk/drivers/acpi/acpica/evxfevnt.c +++ b/trunk/drivers/acpi/acpica/evxfevnt.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/evxfgpe.c b/trunk/drivers/acpi/acpica/evxfgpe.c index 33388fd69df4..f06a3ee356ba 100644 --- a/trunk/drivers/acpi/acpica/evxfgpe.c +++ b/trunk/drivers/acpi/acpica/evxfgpe.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/evxfregn.c b/trunk/drivers/acpi/acpica/evxfregn.c index 6019208cd4b6..aee887e3ca5c 100644 --- a/trunk/drivers/acpi/acpica/evxfregn.c +++ b/trunk/drivers/acpi/acpica/evxfregn.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/exconfig.c b/trunk/drivers/acpi/acpica/exconfig.c index c86d44e41bc8..745a42b401f5 100644 --- a/trunk/drivers/acpi/acpica/exconfig.c +++ b/trunk/drivers/acpi/acpica/exconfig.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -297,9 +297,9 @@ acpi_ex_region_read(union acpi_operand_object *obj_desc, u32 length, u8 *buffer) /* Bytewise reads */ for (i = 0; i < length; i++) { - status = - acpi_ev_address_space_dispatch(obj_desc, NULL, ACPI_READ, - region_offset, 8, &value); + status = acpi_ev_address_space_dispatch(obj_desc, ACPI_READ, + region_offset, 8, + &value); if (ACPI_FAILURE(status)) { return status; } diff --git a/trunk/drivers/acpi/acpica/exconvrt.c b/trunk/drivers/acpi/acpica/exconvrt.c index e385436bd424..74162a11817d 100644 --- a/trunk/drivers/acpi/acpica/exconvrt.c +++ b/trunk/drivers/acpi/acpica/exconvrt.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/excreate.c b/trunk/drivers/acpi/acpica/excreate.c index 3f5bc998c1cb..110711afada8 100644 --- a/trunk/drivers/acpi/acpica/excreate.c +++ b/trunk/drivers/acpi/acpica/excreate.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -267,7 +267,7 @@ acpi_status acpi_ex_create_mutex(struct acpi_walk_state *walk_state) * * PARAMETERS: aml_start - Pointer to the region declaration AML * aml_length - Max length of the declaration AML - * space_id - Address space ID for the region + * region_space - space_iD for the region * walk_state - Current state * * RETURN: Status @@ -279,7 +279,7 @@ acpi_status acpi_ex_create_mutex(struct acpi_walk_state *walk_state) acpi_status acpi_ex_create_region(u8 * aml_start, u32 aml_length, - u8 space_id, struct acpi_walk_state *walk_state) + u8 region_space, struct acpi_walk_state *walk_state) { acpi_status status; union acpi_operand_object *obj_desc; @@ -304,19 +304,16 @@ acpi_ex_create_region(u8 * aml_start, * Space ID must be one of the predefined IDs, or in the user-defined * range */ - if (!acpi_is_valid_space_id(space_id)) { - /* - * Print an error message, but continue. We don't want to abort - * a table load for this exception. Instead, if the region is - * actually used at runtime, abort the executing method. - */ - ACPI_ERROR((AE_INFO, - "Invalid/unknown Address Space ID: 0x%2.2X", - space_id)); + if ((region_space >= ACPI_NUM_PREDEFINED_REGIONS) && + (region_space < ACPI_USER_REGION_BEGIN) && + (region_space != ACPI_ADR_SPACE_DATA_TABLE)) { + ACPI_ERROR((AE_INFO, "Invalid AddressSpace type 0x%X", + region_space)); + return_ACPI_STATUS(AE_AML_INVALID_SPACE_ID); } ACPI_DEBUG_PRINT((ACPI_DB_LOAD, "Region Type - %s (0x%X)\n", - acpi_ut_get_region_name(space_id), space_id)); + acpi_ut_get_region_name(region_space), region_space)); /* Create the region descriptor */ @@ -333,16 +330,10 @@ acpi_ex_create_region(u8 * aml_start, region_obj2 = obj_desc->common.next_object; region_obj2->extra.aml_start = aml_start; region_obj2->extra.aml_length = aml_length; - if (walk_state->scope_info) { - region_obj2->extra.scope_node = - walk_state->scope_info->scope.node; - } else { - region_obj2->extra.scope_node = node; - } /* Init the region from the operands */ - obj_desc->region.space_id = space_id; + obj_desc->region.space_id = region_space; obj_desc->region.address = 0; obj_desc->region.length = 0; obj_desc->region.node = node; diff --git a/trunk/drivers/acpi/acpica/exdebug.c b/trunk/drivers/acpi/acpica/exdebug.c index e211e9c19215..c7a2f1edd282 100644 --- a/trunk/drivers/acpi/acpica/exdebug.c +++ b/trunk/drivers/acpi/acpica/exdebug.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/exdump.c b/trunk/drivers/acpi/acpica/exdump.c index 2a6ac0a3bc1e..61b8c0e8b74d 100644 --- a/trunk/drivers/acpi/acpica/exdump.c +++ b/trunk/drivers/acpi/acpica/exdump.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -192,13 +192,10 @@ static struct acpi_exdump_info acpi_ex_dump_buffer_field[3] = { "Buffer Object"} }; -static struct acpi_exdump_info acpi_ex_dump_region_field[5] = { +static struct acpi_exdump_info acpi_ex_dump_region_field[3] = { {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_region_field), NULL}, {ACPI_EXD_FIELD, 0, NULL}, - {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(field.access_length), "AccessLength"}, - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(field.region_obj), "Region Object"}, - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(field.resource_buffer), - "ResourceBuffer"} + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(field.region_obj), "Region Object"} }; static struct acpi_exdump_info acpi_ex_dump_bank_field[5] = { diff --git a/trunk/drivers/acpi/acpica/exfield.c b/trunk/drivers/acpi/acpica/exfield.c index dc092f5b35d6..0bde2230c028 100644 --- a/trunk/drivers/acpi/acpica/exfield.c +++ b/trunk/drivers/acpi/acpica/exfield.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -100,25 +100,18 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state, (obj_desc->field.region_obj->region.space_id == ACPI_ADR_SPACE_SMBUS || obj_desc->field.region_obj->region.space_id == - ACPI_ADR_SPACE_GSBUS - || obj_desc->field.region_obj->region.space_id == ACPI_ADR_SPACE_IPMI)) { /* - * This is an SMBus, GSBus or IPMI read. We must create a buffer to hold + * This is an SMBus or IPMI read. We must create a buffer to hold * the data and then directly access the region handler. * - * Note: SMBus and GSBus protocol value is passed in upper 16-bits of Function + * Note: Smbus protocol value is passed in upper 16-bits of Function */ if (obj_desc->field.region_obj->region.space_id == ACPI_ADR_SPACE_SMBUS) { length = ACPI_SMBUS_BUFFER_SIZE; function = ACPI_READ | (obj_desc->field.attribute << 16); - } else if (obj_desc->field.region_obj->region.space_id == - ACPI_ADR_SPACE_GSBUS) { - length = ACPI_GSBUS_BUFFER_SIZE; - function = - ACPI_READ | (obj_desc->field.attribute << 16); } else { /* IPMI */ length = ACPI_IPMI_BUFFER_SIZE; @@ -255,23 +248,21 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc, (obj_desc->field.region_obj->region.space_id == ACPI_ADR_SPACE_SMBUS || obj_desc->field.region_obj->region.space_id == - ACPI_ADR_SPACE_GSBUS - || obj_desc->field.region_obj->region.space_id == ACPI_ADR_SPACE_IPMI)) { /* - * This is an SMBus, GSBus or IPMI write. We will bypass the entire field + * This is an SMBus or IPMI write. We will bypass the entire field * mechanism and handoff the buffer directly to the handler. For * these address spaces, the buffer is bi-directional; on a write, * return data is returned in the same buffer. * * Source must be a buffer of sufficient size: - * ACPI_SMBUS_BUFFER_SIZE, ACPI_GSBUS_BUFFER_SIZE, or ACPI_IPMI_BUFFER_SIZE. + * ACPI_SMBUS_BUFFER_SIZE or ACPI_IPMI_BUFFER_SIZE. * - * Note: SMBus and GSBus protocol type is passed in upper 16-bits of Function + * Note: SMBus protocol type is passed in upper 16-bits of Function */ if (source_desc->common.type != ACPI_TYPE_BUFFER) { ACPI_ERROR((AE_INFO, - "SMBus/IPMI/GenericSerialBus write requires Buffer, found type %s", + "SMBus or IPMI write requires Buffer, found type %s", acpi_ut_get_object_type_name(source_desc))); return_ACPI_STATUS(AE_AML_OPERAND_TYPE); @@ -282,11 +273,6 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc, length = ACPI_SMBUS_BUFFER_SIZE; function = ACPI_WRITE | (obj_desc->field.attribute << 16); - } else if (obj_desc->field.region_obj->region.space_id == - ACPI_ADR_SPACE_GSBUS) { - length = ACPI_GSBUS_BUFFER_SIZE; - function = - ACPI_WRITE | (obj_desc->field.attribute << 16); } else { /* IPMI */ length = ACPI_IPMI_BUFFER_SIZE; @@ -295,7 +281,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc, if (source_desc->buffer.length < length) { ACPI_ERROR((AE_INFO, - "SMBus/IPMI/GenericSerialBus write requires Buffer of length %u, found length %u", + "SMBus or IPMI write requires Buffer of length %u, found length %u", length, source_desc->buffer.length)); return_ACPI_STATUS(AE_AML_BUFFER_LIMIT); diff --git a/trunk/drivers/acpi/acpica/exfldio.c b/trunk/drivers/acpi/acpica/exfldio.c index 149de45fdadd..f915a7f3f921 100644 --- a/trunk/drivers/acpi/acpica/exfldio.c +++ b/trunk/drivers/acpi/acpica/exfldio.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -86,7 +86,6 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc, { acpi_status status = AE_OK; union acpi_operand_object *rgn_desc; - u8 space_id; ACPI_FUNCTION_TRACE_U32(ex_setup_region, field_datum_byte_offset); @@ -102,17 +101,6 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc, return_ACPI_STATUS(AE_AML_OPERAND_TYPE); } - space_id = rgn_desc->region.space_id; - - /* Validate the Space ID */ - - if (!acpi_is_valid_space_id(space_id)) { - ACPI_ERROR((AE_INFO, - "Invalid/unknown Address Space ID: 0x%2.2X", - space_id)); - return_ACPI_STATUS(AE_AML_INVALID_SPACE_ID); - } - /* * If the Region Address and Length have not been previously evaluated, * evaluate them now and save the results. @@ -131,12 +119,11 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc, } /* - * Exit now for SMBus, GSBus or IPMI address space, it has a non-linear + * Exit now for SMBus or IPMI address space, it has a non-linear * address space and the request cannot be directly validated */ - if (space_id == ACPI_ADR_SPACE_SMBUS || - space_id == ACPI_ADR_SPACE_GSBUS || - space_id == ACPI_ADR_SPACE_IPMI) { + if (rgn_desc->region.space_id == ACPI_ADR_SPACE_SMBUS || + rgn_desc->region.space_id == ACPI_ADR_SPACE_IPMI) { /* SMBus or IPMI has a non-linear address space */ @@ -284,12 +271,11 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc, /* Invoke the appropriate address_space/op_region handler */ - status = acpi_ev_address_space_dispatch(rgn_desc, obj_desc, - function, region_offset, - ACPI_MUL_8(obj_desc-> - common_field. - access_byte_width), - value); + status = + acpi_ev_address_space_dispatch(rgn_desc, function, region_offset, + ACPI_MUL_8(obj_desc->common_field. + access_byte_width), + value); if (ACPI_FAILURE(status)) { if (status == AE_NOT_IMPLEMENTED) { @@ -330,7 +316,6 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc, static u8 acpi_ex_register_overflow(union acpi_operand_object *obj_desc, u64 value) { - ACPI_FUNCTION_NAME(ex_register_overflow); if (obj_desc->common_field.bit_length >= ACPI_INTEGER_BIT_SIZE) { /* @@ -345,11 +330,6 @@ acpi_ex_register_overflow(union acpi_operand_object *obj_desc, u64 value) * The Value is larger than the maximum value that can fit into * the register. */ - ACPI_ERROR((AE_INFO, - "Index value 0x%8.8X%8.8X overflows field width 0x%X", - ACPI_FORMAT_UINT64(value), - obj_desc->common_field.bit_length)); - return (TRUE); } diff --git a/trunk/drivers/acpi/acpica/exmisc.c b/trunk/drivers/acpi/acpica/exmisc.c index 0a0893310348..703d88ed0b3d 100644 --- a/trunk/drivers/acpi/acpica/exmisc.c +++ b/trunk/drivers/acpi/acpica/exmisc.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/exmutex.c b/trunk/drivers/acpi/acpica/exmutex.c index 60933e9dc3c0..be1c56ead653 100644 --- a/trunk/drivers/acpi/acpica/exmutex.c +++ b/trunk/drivers/acpi/acpica/exmutex.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/exnames.c b/trunk/drivers/acpi/acpica/exnames.c index fcc75fa27d32..49ec049c157e 100644 --- a/trunk/drivers/acpi/acpica/exnames.c +++ b/trunk/drivers/acpi/acpica/exnames.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/exoparg1.c b/trunk/drivers/acpi/acpica/exoparg1.c index 9ba8c73cea16..236ead14b7f7 100644 --- a/trunk/drivers/acpi/acpica/exoparg1.c +++ b/trunk/drivers/acpi/acpica/exoparg1.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/exoparg2.c b/trunk/drivers/acpi/acpica/exoparg2.c index 879e8a277b94..2571b4a310f4 100644 --- a/trunk/drivers/acpi/acpica/exoparg2.c +++ b/trunk/drivers/acpi/acpica/exoparg2.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/exoparg3.c b/trunk/drivers/acpi/acpica/exoparg3.c index 71fcc65c9ffa..1b48d9d28c9a 100644 --- a/trunk/drivers/acpi/acpica/exoparg3.c +++ b/trunk/drivers/acpi/acpica/exoparg3.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/exoparg6.c b/trunk/drivers/acpi/acpica/exoparg6.c index 0786b8659061..f4a2787e8e92 100644 --- a/trunk/drivers/acpi/acpica/exoparg6.c +++ b/trunk/drivers/acpi/acpica/exoparg6.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/exprep.c b/trunk/drivers/acpi/acpica/exprep.c index 30157f5a12d7..cc95e2000406 100644 --- a/trunk/drivers/acpi/acpica/exprep.c +++ b/trunk/drivers/acpi/acpica/exprep.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -47,7 +47,6 @@ #include "acinterp.h" #include "amlcode.h" #include "acnamesp.h" -#include "acdispat.h" #define _COMPONENT ACPI_EXECUTER ACPI_MODULE_NAME("exprep") @@ -456,30 +455,6 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info) obj_desc->field.region_obj = acpi_ns_get_attached_object(info->region_node); - /* Fields specific to generic_serial_bus fields */ - - obj_desc->field.access_length = info->access_length; - - if (info->connection_node) { - second_desc = info->connection_node->object; - if (!(second_desc->common.flags & AOPOBJ_DATA_VALID)) { - status = - acpi_ds_get_buffer_arguments(second_desc); - if (ACPI_FAILURE(status)) { - acpi_ut_delete_object_desc(obj_desc); - return_ACPI_STATUS(status); - } - } - - obj_desc->field.resource_buffer = - second_desc->buffer.pointer; - obj_desc->field.resource_length = - (u16)second_desc->buffer.length; - } else if (info->resource_buffer) { - obj_desc->field.resource_buffer = info->resource_buffer; - obj_desc->field.resource_length = info->resource_length; - } - /* Allow full data read from EC address space */ if ((obj_desc->field.region_obj->region.space_id == diff --git a/trunk/drivers/acpi/acpica/exregion.c b/trunk/drivers/acpi/acpica/exregion.c index 12d51df6d3bf..f0d5e14f1f2c 100644 --- a/trunk/drivers/acpi/acpica/exregion.c +++ b/trunk/drivers/acpi/acpica/exregion.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/exresnte.c b/trunk/drivers/acpi/acpica/exresnte.c index fa50e77e64a8..55997e46948b 100644 --- a/trunk/drivers/acpi/acpica/exresnte.c +++ b/trunk/drivers/acpi/acpica/exresnte.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/exresolv.c b/trunk/drivers/acpi/acpica/exresolv.c index 6e335dc34528..db502cd7d934 100644 --- a/trunk/drivers/acpi/acpica/exresolv.c +++ b/trunk/drivers/acpi/acpica/exresolv.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/exresop.c b/trunk/drivers/acpi/acpica/exresop.c index a67b1d925ddd..e3bb00ccdff5 100644 --- a/trunk/drivers/acpi/acpica/exresop.c +++ b/trunk/drivers/acpi/acpica/exresop.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/exstore.c b/trunk/drivers/acpi/acpica/exstore.c index c6cf843cc4c9..c0c8842dd344 100644 --- a/trunk/drivers/acpi/acpica/exstore.c +++ b/trunk/drivers/acpi/acpica/exstore.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/exstoren.c b/trunk/drivers/acpi/acpica/exstoren.c index b35bed52e061..a979017d56b8 100644 --- a/trunk/drivers/acpi/acpica/exstoren.c +++ b/trunk/drivers/acpi/acpica/exstoren.c @@ -7,7 +7,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/exstorob.c b/trunk/drivers/acpi/acpica/exstorob.c index 65a45d8335c8..dc665cc554de 100644 --- a/trunk/drivers/acpi/acpica/exstorob.c +++ b/trunk/drivers/acpi/acpica/exstorob.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/exsystem.c b/trunk/drivers/acpi/acpica/exsystem.c index 191a12945226..df66e7b686be 100644 --- a/trunk/drivers/acpi/acpica/exsystem.c +++ b/trunk/drivers/acpi/acpica/exsystem.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/exutils.c b/trunk/drivers/acpi/acpica/exutils.c index eb6798ba8b59..8ad93146dd32 100644 --- a/trunk/drivers/acpi/acpica/exutils.c +++ b/trunk/drivers/acpi/acpica/exutils.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -435,29 +435,4 @@ void acpi_ex_integer_to_string(char *out_string, u64 value) } } -/******************************************************************************* - * - * FUNCTION: acpi_is_valid_space_id - * - * PARAMETERS: space_id - ID to be validated - * - * RETURN: TRUE if valid/supported ID. - * - * DESCRIPTION: Validate an operation region space_iD. - * - ******************************************************************************/ - -u8 acpi_is_valid_space_id(u8 space_id) -{ - - if ((space_id >= ACPI_NUM_PREDEFINED_REGIONS) && - (space_id < ACPI_USER_REGION_BEGIN) && - (space_id != ACPI_ADR_SPACE_DATA_TABLE) && - (space_id != ACPI_ADR_SPACE_FIXED_HARDWARE)) { - return (FALSE); - } - - return (TRUE); -} - #endif diff --git a/trunk/drivers/acpi/acpica/hwacpi.c b/trunk/drivers/acpi/acpica/hwacpi.c index d21ec5f0b3a9..fc380d3d45ab 100644 --- a/trunk/drivers/acpi/acpica/hwacpi.c +++ b/trunk/drivers/acpi/acpica/hwacpi.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/hwgpe.c b/trunk/drivers/acpi/acpica/hwgpe.c index 1a6894afef79..f610d88a66be 100644 --- a/trunk/drivers/acpi/acpica/hwgpe.c +++ b/trunk/drivers/acpi/acpica/hwgpe.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/hwpci.c b/trunk/drivers/acpi/acpica/hwpci.c index 1455ddcdc32c..050fd227951b 100644 --- a/trunk/drivers/acpi/acpica/hwpci.c +++ b/trunk/drivers/acpi/acpica/hwpci.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/hwregs.c b/trunk/drivers/acpi/acpica/hwregs.c index 4ea4eeb51bfd..cc70f3fdcdd1 100644 --- a/trunk/drivers/acpi/acpica/hwregs.c +++ b/trunk/drivers/acpi/acpica/hwregs.c @@ -7,7 +7,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/hwsleep.c b/trunk/drivers/acpi/acpica/hwsleep.c index 3c4a922a9fc2..d52da3073650 100644 --- a/trunk/drivers/acpi/acpica/hwsleep.c +++ b/trunk/drivers/acpi/acpica/hwsleep.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/hwtimer.c b/trunk/drivers/acpi/acpica/hwtimer.c index d4973d9da9f1..50d21c40b5c1 100644 --- a/trunk/drivers/acpi/acpica/hwtimer.c +++ b/trunk/drivers/acpi/acpica/hwtimer.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/hwvalid.c b/trunk/drivers/acpi/acpica/hwvalid.c index 6e5c43a60bb7..5f1605874655 100644 --- a/trunk/drivers/acpi/acpica/hwvalid.c +++ b/trunk/drivers/acpi/acpica/hwvalid.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -134,8 +134,6 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width) /* Supported widths are 8/16/32 */ if ((bit_width != 8) && (bit_width != 16) && (bit_width != 32)) { - ACPI_ERROR((AE_INFO, - "Bad BitWidth parameter: %8.8X", bit_width)); return AE_BAD_PARAMETER; } diff --git a/trunk/drivers/acpi/acpica/hwxface.c b/trunk/drivers/acpi/acpica/hwxface.c index 7bdbbcf35f85..c2793a82f120 100644 --- a/trunk/drivers/acpi/acpica/hwxface.c +++ b/trunk/drivers/acpi/acpica/hwxface.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/nsaccess.c b/trunk/drivers/acpi/acpica/nsaccess.c index 61623f3f6826..d93172fd15a8 100644 --- a/trunk/drivers/acpi/acpica/nsaccess.c +++ b/trunk/drivers/acpi/acpica/nsaccess.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/nsalloc.c b/trunk/drivers/acpi/acpica/nsalloc.c index 7c3d3ceb98b3..1d0ef15d158f 100644 --- a/trunk/drivers/acpi/acpica/nsalloc.c +++ b/trunk/drivers/acpi/acpica/nsalloc.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/nsdump.c b/trunk/drivers/acpi/acpica/nsdump.c index b7f2b3be79ac..b683cc2ff9d3 100644 --- a/trunk/drivers/acpi/acpica/nsdump.c +++ b/trunk/drivers/acpi/acpica/nsdump.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/nsdumpdv.c b/trunk/drivers/acpi/acpica/nsdumpdv.c index 30ea5bc53a78..2ed294b7a4db 100644 --- a/trunk/drivers/acpi/acpica/nsdumpdv.c +++ b/trunk/drivers/acpi/acpica/nsdumpdv.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/nseval.c b/trunk/drivers/acpi/acpica/nseval.c index f375cb82e321..c1bd02b1a058 100644 --- a/trunk/drivers/acpi/acpica/nseval.c +++ b/trunk/drivers/acpi/acpica/nseval.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/nsinit.c b/trunk/drivers/acpi/acpica/nsinit.c index 9d84ec2f0211..fd7c6380e294 100644 --- a/trunk/drivers/acpi/acpica/nsinit.c +++ b/trunk/drivers/acpi/acpica/nsinit.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/nsload.c b/trunk/drivers/acpi/acpica/nsload.c index 5cbf15ffe7d8..5f7dc691c183 100644 --- a/trunk/drivers/acpi/acpica/nsload.c +++ b/trunk/drivers/acpi/acpica/nsload.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/nsnames.c b/trunk/drivers/acpi/acpica/nsnames.c index b20e7c8c3ffb..d5fa520c3de5 100644 --- a/trunk/drivers/acpi/acpica/nsnames.c +++ b/trunk/drivers/acpi/acpica/nsnames.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/nsobject.c b/trunk/drivers/acpi/acpica/nsobject.c index dd77a3ce6e50..3bb8bf105ea2 100644 --- a/trunk/drivers/acpi/acpica/nsobject.c +++ b/trunk/drivers/acpi/acpica/nsobject.c @@ -6,7 +6,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/nsparse.c b/trunk/drivers/acpi/acpica/nsparse.c index ec7ba2d3463c..b3234fa795b8 100644 --- a/trunk/drivers/acpi/acpica/nsparse.c +++ b/trunk/drivers/acpi/acpica/nsparse.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/nspredef.c b/trunk/drivers/acpi/acpica/nspredef.c index bbe46a447d34..c845c8089f39 100644 --- a/trunk/drivers/acpi/acpica/nspredef.c +++ b/trunk/drivers/acpi/acpica/nspredef.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -620,7 +620,6 @@ acpi_ns_check_package(struct acpi_predefined_data *data, case ACPI_PTYPE2_FIXED: case ACPI_PTYPE2_MIN: case ACPI_PTYPE2_COUNT: - case ACPI_PTYPE2_FIX_VAR: /* * These types all return a single Package that consists of a @@ -760,34 +759,6 @@ acpi_ns_check_package_list(struct acpi_predefined_data *data, } break; - case ACPI_PTYPE2_FIX_VAR: - /* - * Each subpackage has a fixed number of elements and an - * optional element - */ - expected_count = - package->ret_info.count1 + package->ret_info.count2; - if (sub_package->package.count < expected_count) { - goto package_too_small; - } - - status = - acpi_ns_check_package_elements(data, sub_elements, - package->ret_info. - object_type1, - package->ret_info. - count1, - package->ret_info. - object_type2, - sub_package->package. - count - - package->ret_info. - count1, 0); - if (ACPI_FAILURE(status)) { - return (status); - } - break; - case ACPI_PTYPE2_FIXED: /* Each sub-package has a fixed length */ diff --git a/trunk/drivers/acpi/acpica/nsrepair.c b/trunk/drivers/acpi/acpica/nsrepair.c index 9c35d20eb52b..ac7b854b0bd7 100644 --- a/trunk/drivers/acpi/acpica/nsrepair.c +++ b/trunk/drivers/acpi/acpica/nsrepair.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -634,7 +634,6 @@ acpi_ns_remove_null_elements(struct acpi_predefined_data *data, case ACPI_PTYPE2_FIXED: case ACPI_PTYPE2_MIN: case ACPI_PTYPE2_REV_FIXED: - case ACPI_PTYPE2_FIX_VAR: break; default: diff --git a/trunk/drivers/acpi/acpica/nsrepair2.c b/trunk/drivers/acpi/acpica/nsrepair2.c index 726bc8e687f7..024c4f263f87 100644 --- a/trunk/drivers/acpi/acpica/nsrepair2.c +++ b/trunk/drivers/acpi/acpica/nsrepair2.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -467,12 +467,11 @@ acpi_ns_repair_HID(struct acpi_predefined_data *data, } /* - * Copy and uppercase the string. From the ACPI 5.0 specification: + * Copy and uppercase the string. From the ACPI specification: * * A valid PNP ID must be of the form "AAA####" where A is an uppercase * letter and # is a hex digit. A valid ACPI ID must be of the form - * "NNNN####" where N is an uppercase letter or decimal digit, and - * # is a hex digit. + * "ACPI####" where # is a hex digit. */ for (dest = new_string->string.pointer; *source; dest++, source++) { *dest = (char)ACPI_TOUPPER(*source); diff --git a/trunk/drivers/acpi/acpica/nssearch.c b/trunk/drivers/acpi/acpica/nssearch.c index 507043d66114..28b0d7a62b99 100644 --- a/trunk/drivers/acpi/acpica/nssearch.c +++ b/trunk/drivers/acpi/acpica/nssearch.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/nsutils.c b/trunk/drivers/acpi/acpica/nsutils.c index a535b7afda5c..cb1b104a69a2 100644 --- a/trunk/drivers/acpi/acpica/nsutils.c +++ b/trunk/drivers/acpi/acpica/nsutils.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/nswalk.c b/trunk/drivers/acpi/acpica/nswalk.c index f69895a54895..345f0c3c6ad2 100644 --- a/trunk/drivers/acpi/acpica/nswalk.c +++ b/trunk/drivers/acpi/acpica/nswalk.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/nsxfeval.c b/trunk/drivers/acpi/acpica/nsxfeval.c index 71d15f61807b..e7f016d1b226 100644 --- a/trunk/drivers/acpi/acpica/nsxfeval.c +++ b/trunk/drivers/acpi/acpica/nsxfeval.c @@ -6,7 +6,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/nsxfname.c b/trunk/drivers/acpi/acpica/nsxfname.c index af401c9c4dfc..83bf93024303 100644 --- a/trunk/drivers/acpi/acpica/nsxfname.c +++ b/trunk/drivers/acpi/acpica/nsxfname.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/nsxfobj.c b/trunk/drivers/acpi/acpica/nsxfobj.c index 880a605cee20..57e6d825ed84 100644 --- a/trunk/drivers/acpi/acpica/nsxfobj.c +++ b/trunk/drivers/acpi/acpica/nsxfobj.c @@ -6,7 +6,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/psargs.c b/trunk/drivers/acpi/acpica/psargs.c index 5ac36aba507c..e1fad0ee0136 100644 --- a/trunk/drivers/acpi/acpica/psargs.c +++ b/trunk/drivers/acpi/acpica/psargs.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -484,54 +484,34 @@ acpi_ps_get_next_simple_arg(struct acpi_parse_state *parser_state, static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state *parser_state) { - u32 aml_offset; + u32 aml_offset = (u32) + ACPI_PTR_DIFF(parser_state->aml, + parser_state->aml_start); union acpi_parse_object *field; - union acpi_parse_object *arg = NULL; u16 opcode; u32 name; - u8 access_type; - u8 access_attribute; - u8 access_length; - u32 pkg_length; - u8 *pkg_end; - u32 buffer_length; ACPI_FUNCTION_TRACE(ps_get_next_field); - aml_offset = - (u32)ACPI_PTR_DIFF(parser_state->aml, parser_state->aml_start); - /* Determine field type */ switch (ACPI_GET8(parser_state->aml)) { - case AML_FIELD_OFFSET_OP: - - opcode = AML_INT_RESERVEDFIELD_OP; - parser_state->aml++; - break; - - case AML_FIELD_ACCESS_OP: + default: - opcode = AML_INT_ACCESSFIELD_OP; - parser_state->aml++; + opcode = AML_INT_NAMEDFIELD_OP; break; - case AML_FIELD_CONNECTION_OP: + case 0x00: - opcode = AML_INT_CONNECTION_OP; + opcode = AML_INT_RESERVEDFIELD_OP; parser_state->aml++; break; - case AML_FIELD_EXT_ACCESS_OP: + case 0x01: - opcode = AML_INT_EXTACCESSFIELD_OP; + opcode = AML_INT_ACCESSFIELD_OP; parser_state->aml++; break; - - default: - - opcode = AML_INT_NAMEDFIELD_OP; - break; } /* Allocate a new field op */ @@ -569,111 +549,16 @@ static union acpi_parse_object *acpi_ps_get_next_field(struct acpi_parse_state break; case AML_INT_ACCESSFIELD_OP: - case AML_INT_EXTACCESSFIELD_OP: /* * Get access_type and access_attrib and merge into the field Op - * access_type is first operand, access_attribute is second. stuff - * these bytes into the node integer value for convenience. + * access_type is first operand, access_attribute is second */ - - /* Get the two bytes (Type/Attribute) */ - - access_type = ACPI_GET8(parser_state->aml); + field->common.value.integer = + (((u32) ACPI_GET8(parser_state->aml) << 8)); parser_state->aml++; - access_attribute = ACPI_GET8(parser_state->aml); + field->common.value.integer |= ACPI_GET8(parser_state->aml); parser_state->aml++; - - field->common.value.integer = (u8)access_type; - field->common.value.integer |= (u16)(access_attribute << 8); - - /* This opcode has a third byte, access_length */ - - if (opcode == AML_INT_EXTACCESSFIELD_OP) { - access_length = ACPI_GET8(parser_state->aml); - parser_state->aml++; - - field->common.value.integer |= - (u32)(access_length << 16); - } - break; - - case AML_INT_CONNECTION_OP: - - /* - * Argument for Connection operator can be either a Buffer - * (resource descriptor), or a name_string. - */ - if (ACPI_GET8(parser_state->aml) == AML_BUFFER_OP) { - parser_state->aml++; - - pkg_end = parser_state->aml; - pkg_length = - acpi_ps_get_next_package_length(parser_state); - pkg_end += pkg_length; - - if (parser_state->aml < pkg_end) { - - /* Non-empty list */ - - arg = acpi_ps_alloc_op(AML_INT_BYTELIST_OP); - if (!arg) { - return_PTR(NULL); - } - - /* Get the actual buffer length argument */ - - opcode = ACPI_GET8(parser_state->aml); - parser_state->aml++; - - switch (opcode) { - case AML_BYTE_OP: /* AML_BYTEDATA_ARG */ - buffer_length = - ACPI_GET8(parser_state->aml); - parser_state->aml += 1; - break; - - case AML_WORD_OP: /* AML_WORDDATA_ARG */ - buffer_length = - ACPI_GET16(parser_state->aml); - parser_state->aml += 2; - break; - - case AML_DWORD_OP: /* AML_DWORDATA_ARG */ - buffer_length = - ACPI_GET32(parser_state->aml); - parser_state->aml += 4; - break; - - default: - buffer_length = 0; - break; - } - - /* Fill in bytelist data */ - - arg->named.value.size = buffer_length; - arg->named.data = parser_state->aml; - } - - /* Skip to End of byte data */ - - parser_state->aml = pkg_end; - } else { - arg = acpi_ps_alloc_op(AML_INT_NAMEPATH_OP); - if (!arg) { - return_PTR(NULL); - } - - /* Get the Namestring argument */ - - arg->common.value.name = - acpi_ps_get_next_namestring(parser_state); - } - - /* Link the buffer/namestring to parent (CONNECTION_OP) */ - - acpi_ps_append_arg(field, arg); break; default: diff --git a/trunk/drivers/acpi/acpica/psloop.c b/trunk/drivers/acpi/acpica/psloop.c index 9547ad8a620b..01dd70d1de51 100644 --- a/trunk/drivers/acpi/acpica/psloop.c +++ b/trunk/drivers/acpi/acpica/psloop.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/psopcode.c b/trunk/drivers/acpi/acpica/psopcode.c index a0226fdcf75c..bed08de7528c 100644 --- a/trunk/drivers/acpi/acpica/psopcode.c +++ b/trunk/drivers/acpi/acpica/psopcode.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -638,16 +638,7 @@ const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES] = { /* 7E */ ACPI_OP("Timer", ARGP_TIMER_OP, ARGI_TIMER_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_0A_0T_1R, - AML_FLAGS_EXEC_0A_0T_1R), - -/* ACPI 5.0 opcodes */ - -/* 7F */ ACPI_OP("-ConnectField-", ARGP_CONNECTFIELD_OP, - ARGI_CONNECTFIELD_OP, ACPI_TYPE_ANY, - AML_CLASS_INTERNAL, AML_TYPE_BOGUS, AML_HAS_ARGS), -/* 80 */ ACPI_OP("-ExtAccessField-", ARGP_CONNECTFIELD_OP, - ARGI_CONNECTFIELD_OP, ACPI_TYPE_ANY, - AML_CLASS_INTERNAL, AML_TYPE_BOGUS, 0) + AML_FLAGS_EXEC_0A_0T_1R) /*! [End] no source code translation !*/ }; @@ -666,7 +657,7 @@ static const u8 acpi_gbl_short_op_index[256] = { /* 0x20 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, /* 0x28 */ _UNK, _UNK, _UNK, _UNK, _UNK, 0x63, _PFX, _PFX, /* 0x30 */ 0x67, 0x66, 0x68, 0x65, 0x69, 0x64, 0x6A, 0x7D, -/* 0x38 */ 0x7F, 0x80, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, +/* 0x38 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, /* 0x40 */ _UNK, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, /* 0x48 */ _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, /* 0x50 */ _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, _ASC, diff --git a/trunk/drivers/acpi/acpica/psparse.c b/trunk/drivers/acpi/acpica/psparse.c index 2ff9c35a1968..9bb0cbd37b5e 100644 --- a/trunk/drivers/acpi/acpica/psparse.c +++ b/trunk/drivers/acpi/acpica/psparse.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/psscope.c b/trunk/drivers/acpi/acpica/psscope.c index c872aa4b926e..a5faa1323a02 100644 --- a/trunk/drivers/acpi/acpica/psscope.c +++ b/trunk/drivers/acpi/acpica/psscope.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/pstree.c b/trunk/drivers/acpi/acpica/pstree.c index 2b03cdbbe1c0..f1464c03aa42 100644 --- a/trunk/drivers/acpi/acpica/pstree.c +++ b/trunk/drivers/acpi/acpica/pstree.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -74,12 +74,6 @@ union acpi_parse_object *acpi_ps_get_arg(union acpi_parse_object *op, u32 argn) ACPI_FUNCTION_ENTRY(); -/* - if (Op->Common.aml_opcode == AML_INT_CONNECTION_OP) - { - return (Op->Common.Value.Arg); - } -*/ /* Get the info structure for this opcode */ op_info = acpi_ps_get_opcode_info(op->common.aml_opcode); diff --git a/trunk/drivers/acpi/acpica/psutils.c b/trunk/drivers/acpi/acpica/psutils.c index 13bb131ae125..7eda78503422 100644 --- a/trunk/drivers/acpi/acpica/psutils.c +++ b/trunk/drivers/acpi/acpica/psutils.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/pswalk.c b/trunk/drivers/acpi/acpica/pswalk.c index ab96cf47896d..3312d6368bf1 100644 --- a/trunk/drivers/acpi/acpica/pswalk.c +++ b/trunk/drivers/acpi/acpica/pswalk.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/psxface.c b/trunk/drivers/acpi/acpica/psxface.c index 9d98c5ff66a5..8086805d4494 100644 --- a/trunk/drivers/acpi/acpica/psxface.c +++ b/trunk/drivers/acpi/acpica/psxface.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/rsaddr.c b/trunk/drivers/acpi/acpica/rsaddr.c index a0305652394f..9e66f9078426 100644 --- a/trunk/drivers/acpi/acpica/rsaddr.c +++ b/trunk/drivers/acpi/acpica/rsaddr.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/rscalc.c b/trunk/drivers/acpi/acpica/rscalc.c index 3c6df4b7eb2d..3a8a89ec2ca4 100644 --- a/trunk/drivers/acpi/acpica/rscalc.c +++ b/trunk/drivers/acpi/acpica/rscalc.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -313,38 +313,6 @@ acpi_rs_get_aml_length(struct acpi_resource * resource, acpi_size * size_needed) resource_source)); break; - case ACPI_RESOURCE_TYPE_GPIO: - - total_size = - (acpi_rs_length) (total_size + - (resource->data.gpio. - pin_table_length * 2) + - resource->data.gpio. - resource_source.string_length + - resource->data.gpio. - vendor_length); - - break; - - case ACPI_RESOURCE_TYPE_SERIAL_BUS: - - total_size = - acpi_gbl_aml_resource_serial_bus_sizes[resource-> - data. - common_serial_bus. - type]; - - total_size = (acpi_rs_length) (total_size + - resource->data. - i2c_serial_bus. - resource_source. - string_length + - resource->data. - i2c_serial_bus. - vendor_length); - - break; - default: break; } @@ -394,11 +362,10 @@ acpi_rs_get_list_length(u8 * aml_buffer, u32 extra_struct_bytes; u8 resource_index; u8 minimum_aml_resource_length; - union aml_resource *aml_resource; ACPI_FUNCTION_TRACE(rs_get_list_length); - *size_needed = ACPI_RS_SIZE_MIN; /* Minimum size is one end_tag */ + *size_needed = 0; end_aml = aml_buffer + aml_buffer_length; /* Walk the list of AML resource descriptors */ @@ -409,15 +376,9 @@ acpi_rs_get_list_length(u8 * aml_buffer, status = acpi_ut_validate_resource(aml_buffer, &resource_index); if (ACPI_FAILURE(status)) { - /* - * Exit on failure. Cannot continue because the descriptor length - * may be bogus also. - */ return_ACPI_STATUS(status); } - aml_resource = (void *)aml_buffer; - /* Get the resource length and base (minimum) AML size */ resource_length = acpi_ut_get_resource_length(aml_buffer); @@ -461,8 +422,10 @@ acpi_rs_get_list_length(u8 * aml_buffer, case ACPI_RESOURCE_NAME_END_TAG: /* - * End Tag: This is the normal exit + * End Tag: + * This is the normal exit, add size of end_tag */ + *size_needed += ACPI_RS_SIZE_MIN; return_ACPI_STATUS(AE_OK); case ACPI_RESOURCE_NAME_ADDRESS32: @@ -494,33 +457,6 @@ acpi_rs_get_list_length(u8 * aml_buffer, minimum_aml_resource_length); break; - case ACPI_RESOURCE_NAME_GPIO: - - /* Vendor data is optional */ - - if (aml_resource->gpio.vendor_length) { - extra_struct_bytes += - aml_resource->gpio.vendor_offset - - aml_resource->gpio.pin_table_offset + - aml_resource->gpio.vendor_length; - } else { - extra_struct_bytes += - aml_resource->large_header.resource_length + - sizeof(struct aml_resource_large_header) - - aml_resource->gpio.pin_table_offset; - } - break; - - case ACPI_RESOURCE_NAME_SERIAL_BUS: - - minimum_aml_resource_length = - acpi_gbl_resource_aml_serial_bus_sizes - [aml_resource->common_serial_bus.type]; - extra_struct_bytes += - aml_resource->common_serial_bus.resource_length - - minimum_aml_resource_length; - break; - default: break; } @@ -531,18 +467,9 @@ acpi_rs_get_list_length(u8 * aml_buffer, * Important: Round the size up for the appropriate alignment. This * is a requirement on IA64. */ - if (acpi_ut_get_resource_type(aml_buffer) == - ACPI_RESOURCE_NAME_SERIAL_BUS) { - buffer_size = - acpi_gbl_resource_struct_serial_bus_sizes - [aml_resource->common_serial_bus.type] + - extra_struct_bytes; - } else { - buffer_size = - acpi_gbl_resource_struct_sizes[resource_index] + - extra_struct_bytes; - } - buffer_size = (u32)ACPI_ROUND_UP_TO_NATIVE_WORD(buffer_size); + buffer_size = acpi_gbl_resource_struct_sizes[resource_index] + + extra_struct_bytes; + buffer_size = (u32) ACPI_ROUND_UP_TO_NATIVE_WORD(buffer_size); *size_needed += buffer_size; diff --git a/trunk/drivers/acpi/acpica/rscreate.c b/trunk/drivers/acpi/acpica/rscreate.c index 46d6eb38ae66..4ce6e1147e80 100644 --- a/trunk/drivers/acpi/acpica/rscreate.c +++ b/trunk/drivers/acpi/acpica/rscreate.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -49,70 +49,6 @@ #define _COMPONENT ACPI_RESOURCES ACPI_MODULE_NAME("rscreate") -/******************************************************************************* - * - * FUNCTION: acpi_buffer_to_resource - * - * PARAMETERS: aml_buffer - Pointer to the resource byte stream - * aml_buffer_length - Length of the aml_buffer - * resource_ptr - Where the converted resource is returned - * - * RETURN: Status - * - * DESCRIPTION: Convert a raw AML buffer to a resource list - * - ******************************************************************************/ -acpi_status -acpi_buffer_to_resource(u8 *aml_buffer, - u16 aml_buffer_length, - struct acpi_resource **resource_ptr) -{ - acpi_status status; - acpi_size list_size_needed; - void *resource; - void *current_resource_ptr; - - /* - * Note: we allow AE_AML_NO_RESOURCE_END_TAG, since an end tag - * is not required here. - */ - - /* Get the required length for the converted resource */ - - status = acpi_rs_get_list_length(aml_buffer, aml_buffer_length, - &list_size_needed); - if (status == AE_AML_NO_RESOURCE_END_TAG) { - status = AE_OK; - } - if (ACPI_FAILURE(status)) { - return (status); - } - - /* Allocate a buffer for the converted resource */ - - resource = ACPI_ALLOCATE_ZEROED(list_size_needed); - current_resource_ptr = resource; - if (!resource) { - return (AE_NO_MEMORY); - } - - /* Perform the AML-to-Resource conversion */ - - status = acpi_ut_walk_aml_resources(aml_buffer, aml_buffer_length, - acpi_rs_convert_aml_to_resources, - ¤t_resource_ptr); - if (status == AE_AML_NO_RESOURCE_END_TAG) { - status = AE_OK; - } - if (ACPI_FAILURE(status)) { - ACPI_FREE(resource); - } else { - *resource_ptr = resource; - } - - return (status); -} - /******************************************************************************* * * FUNCTION: acpi_rs_create_resource_list @@ -130,10 +66,9 @@ acpi_buffer_to_resource(u8 *aml_buffer, * of device resources. * ******************************************************************************/ - acpi_status acpi_rs_create_resource_list(union acpi_operand_object *aml_buffer, - struct acpi_buffer * output_buffer) + struct acpi_buffer *output_buffer) { acpi_status status; diff --git a/trunk/drivers/acpi/acpica/rsdump.c b/trunk/drivers/acpi/acpica/rsdump.c index b4c581132393..33db7520c74b 100644 --- a/trunk/drivers/acpi/acpica/rsdump.c +++ b/trunk/drivers/acpi/acpica/rsdump.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -61,13 +61,11 @@ static void acpi_rs_out_integer64(char *title, u64 value); static void acpi_rs_out_title(char *title); -static void acpi_rs_dump_byte_list(u16 length, u8 *data); +static void acpi_rs_dump_byte_list(u16 length, u8 * data); -static void acpi_rs_dump_word_list(u16 length, u16 *data); +static void acpi_rs_dump_dword_list(u8 length, u32 * data); -static void acpi_rs_dump_dword_list(u8 length, u32 *data); - -static void acpi_rs_dump_short_byte_list(u8 length, u8 *data); +static void acpi_rs_dump_short_byte_list(u8 length, u8 * data); static void acpi_rs_dump_resource_source(struct acpi_resource_source *resource_source); @@ -311,125 +309,6 @@ struct acpi_rsdump_info acpi_rs_dump_generic_reg[6] = { {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(generic_reg.address), "Address", NULL} }; -struct acpi_rsdump_info acpi_rs_dump_gpio[16] = { - {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_gpio), "GPIO", NULL}, - {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(gpio.revision_id), "RevisionId", NULL}, - {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(gpio.connection_type), - "ConnectionType", acpi_gbl_ct_decode}, - {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(gpio.producer_consumer), - "ProducerConsumer", acpi_gbl_consume_decode}, - {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(gpio.pin_config), "PinConfig", - acpi_gbl_ppc_decode}, - {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(gpio.sharable), "Sharable", - acpi_gbl_shr_decode}, - {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(gpio.io_restriction), - "IoRestriction", acpi_gbl_ior_decode}, - {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(gpio.triggering), "Triggering", - acpi_gbl_he_decode}, - {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(gpio.polarity), "Polarity", - acpi_gbl_ll_decode}, - {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(gpio.drive_strength), "DriveStrength", - NULL}, - {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(gpio.debounce_timeout), - "DebounceTimeout", NULL}, - {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(gpio.resource_source), - "ResourceSource", NULL}, - {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(gpio.pin_table_length), - "PinTableLength", NULL}, - {ACPI_RSD_WORDLIST, ACPI_RSD_OFFSET(gpio.pin_table), "PinTable", NULL}, - {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(gpio.vendor_length), "VendorLength", - NULL}, - {ACPI_RSD_SHORTLISTX, ACPI_RSD_OFFSET(gpio.vendor_data), "VendorData", - NULL}, -}; - -struct acpi_rsdump_info acpi_rs_dump_fixed_dma[4] = { - {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_fixed_dma), - "FixedDma", NULL}, - {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(fixed_dma.request_lines), - "RequestLines", NULL}, - {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(fixed_dma.channels), "Channels", - NULL}, - {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(fixed_dma.width), "TransferWidth", - acpi_gbl_dts_decode}, -}; - -#define ACPI_RS_DUMP_COMMON_SERIAL_BUS \ - {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.revision_id), "RevisionId", NULL}, \ - {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.type), "Type", acpi_gbl_sbt_decode}, \ - {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (common_serial_bus.producer_consumer), "ProducerConsumer", acpi_gbl_consume_decode}, \ - {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (common_serial_bus.slave_mode), "SlaveMode", acpi_gbl_sm_decode}, \ - {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.type_revision_id), "TypeRevisionId", NULL}, \ - {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (common_serial_bus.type_data_length), "TypeDataLength", NULL}, \ - {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (common_serial_bus.resource_source), "ResourceSource", NULL}, \ - {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (common_serial_bus.vendor_length), "VendorLength", NULL}, \ - {ACPI_RSD_SHORTLISTX,ACPI_RSD_OFFSET (common_serial_bus.vendor_data), "VendorData", NULL}, - -struct acpi_rsdump_info acpi_rs_dump_common_serial_bus[10] = { - {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_common_serial_bus), - "Common Serial Bus", NULL}, - ACPI_RS_DUMP_COMMON_SERIAL_BUS -}; - -struct acpi_rsdump_info acpi_rs_dump_i2c_serial_bus[13] = { - {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_i2c_serial_bus), - "I2C Serial Bus", NULL}, - ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_1BITFLAG, - ACPI_RSD_OFFSET(i2c_serial_bus. - access_mode), - "AccessMode", acpi_gbl_am_decode}, - {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(i2c_serial_bus.connection_speed), - "ConnectionSpeed", NULL}, - {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(i2c_serial_bus.slave_address), - "SlaveAddress", NULL}, -}; - -struct acpi_rsdump_info acpi_rs_dump_spi_serial_bus[17] = { - {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_spi_serial_bus), - "Spi Serial Bus", NULL}, - ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_1BITFLAG, - ACPI_RSD_OFFSET(spi_serial_bus. - wire_mode), "WireMode", - acpi_gbl_wm_decode}, - {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(spi_serial_bus.device_polarity), - "DevicePolarity", acpi_gbl_dp_decode}, - {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(spi_serial_bus.data_bit_length), - "DataBitLength", NULL}, - {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(spi_serial_bus.clock_phase), - "ClockPhase", acpi_gbl_cph_decode}, - {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(spi_serial_bus.clock_polarity), - "ClockPolarity", acpi_gbl_cpo_decode}, - {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(spi_serial_bus.device_selection), - "DeviceSelection", NULL}, - {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(spi_serial_bus.connection_speed), - "ConnectionSpeed", NULL}, -}; - -struct acpi_rsdump_info acpi_rs_dump_uart_serial_bus[19] = { - {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_uart_serial_bus), - "Uart Serial Bus", NULL}, - ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_2BITFLAG, - ACPI_RSD_OFFSET(uart_serial_bus. - flow_control), - "FlowControl", acpi_gbl_fc_decode}, - {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(uart_serial_bus.stop_bits), - "StopBits", acpi_gbl_sb_decode}, - {ACPI_RSD_3BITFLAG, ACPI_RSD_OFFSET(uart_serial_bus.data_bits), - "DataBits", acpi_gbl_bpb_decode}, - {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(uart_serial_bus.endian), "Endian", - acpi_gbl_ed_decode}, - {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(uart_serial_bus.parity), "Parity", - acpi_gbl_pt_decode}, - {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(uart_serial_bus.lines_enabled), - "LinesEnabled", NULL}, - {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(uart_serial_bus.rx_fifo_size), - "RxFifoSize", NULL}, - {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(uart_serial_bus.tx_fifo_size), - "TxFifoSize", NULL}, - {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(uart_serial_bus.default_baud_rate), - "ConnectionSpeed", NULL}, -}; - /* * Tables used for common address descriptor flag fields */ @@ -534,14 +413,7 @@ acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table) /* Data items, 8/16/32/64 bit */ case ACPI_RSD_UINT8: - if (table->pointer) { - acpi_rs_out_string(name, ACPI_CAST_PTR(char, - table-> - pointer - [*target])); - } else { - acpi_rs_out_integer8(name, ACPI_GET8(target)); - } + acpi_rs_out_integer8(name, ACPI_GET8(target)); break; case ACPI_RSD_UINT16: @@ -572,13 +444,6 @@ acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table) 0x03])); break; - case ACPI_RSD_3BITFLAG: - acpi_rs_out_string(name, ACPI_CAST_PTR(char, - table-> - pointer[*target & - 0x07])); - break; - case ACPI_RSD_SHORTLIST: /* * Short byte list (single line output) for DMA and IRQ resources @@ -591,20 +456,6 @@ acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table) } break; - case ACPI_RSD_SHORTLISTX: - /* - * Short byte list (single line output) for GPIO vendor data - * Note: The list length is obtained from the previous table entry - */ - if (previous_target) { - acpi_rs_out_title(name); - acpi_rs_dump_short_byte_list(*previous_target, - * - (ACPI_CAST_INDIRECT_PTR - (u8, target))); - } - break; - case ACPI_RSD_LONGLIST: /* * Long byte list for Vendor resource data @@ -629,18 +480,6 @@ acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table) } break; - case ACPI_RSD_WORDLIST: - /* - * Word list for GPIO Pin Table - * Note: The list length is obtained from the previous table entry - */ - if (previous_target) { - acpi_rs_dump_word_list(*previous_target, - *(ACPI_CAST_INDIRECT_PTR - (u16, target))); - } - break; - case ACPI_RSD_ADDRESS: /* * Common flags for all Address resources @@ -788,20 +627,14 @@ void acpi_rs_dump_resource_list(struct acpi_resource *resource_list) /* Dump the resource descriptor */ - if (type == ACPI_RESOURCE_TYPE_SERIAL_BUS) { - acpi_rs_dump_descriptor(&resource_list->data, - acpi_gbl_dump_serial_bus_dispatch - [resource_list->data. - common_serial_bus.type]); - } else { - acpi_rs_dump_descriptor(&resource_list->data, - acpi_gbl_dump_resource_dispatch - [type]); - } + acpi_rs_dump_descriptor(&resource_list->data, + acpi_gbl_dump_resource_dispatch[type]); /* Point to the next resource structure */ - resource_list = ACPI_NEXT_RESOURCE(resource_list); + resource_list = + ACPI_ADD_PTR(struct acpi_resource, resource_list, + resource_list->length); /* Exit when END_TAG descriptor is reached */ @@ -935,13 +768,4 @@ static void acpi_rs_dump_dword_list(u8 length, u32 * data) } } -static void acpi_rs_dump_word_list(u16 length, u16 *data) -{ - u16 i; - - for (i = 0; i < length; i++) { - acpi_os_printf("%25s%2.2X : %4.4X\n", "Word", i, data[i]); - } -} - #endif diff --git a/trunk/drivers/acpi/acpica/rsinfo.c b/trunk/drivers/acpi/acpica/rsinfo.c index a9fa5158200b..f9ea60872aa4 100644 --- a/trunk/drivers/acpi/acpica/rsinfo.c +++ b/trunk/drivers/acpi/acpica/rsinfo.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -76,10 +76,7 @@ struct acpi_rsconvert_info *acpi_gbl_set_resource_dispatch[] = { acpi_rs_convert_address64, /* 0x0D, ACPI_RESOURCE_TYPE_ADDRESS64 */ acpi_rs_convert_ext_address64, /* 0x0E, ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 */ acpi_rs_convert_ext_irq, /* 0x0F, ACPI_RESOURCE_TYPE_EXTENDED_IRQ */ - acpi_rs_convert_generic_reg, /* 0x10, ACPI_RESOURCE_TYPE_GENERIC_REGISTER */ - acpi_rs_convert_gpio, /* 0x11, ACPI_RESOURCE_TYPE_GPIO */ - acpi_rs_convert_fixed_dma, /* 0x12, ACPI_RESOURCE_TYPE_FIXED_DMA */ - NULL, /* 0x13, ACPI_RESOURCE_TYPE_SERIAL_BUS - Use subtype table below */ + acpi_rs_convert_generic_reg /* 0x10, ACPI_RESOURCE_TYPE_GENERIC_REGISTER */ }; /* Dispatch tables for AML-to-resource (Get Resource) conversion functions */ @@ -97,7 +94,7 @@ struct acpi_rsconvert_info *acpi_gbl_get_resource_dispatch[] = { acpi_rs_convert_end_dpf, /* 0x07, ACPI_RESOURCE_NAME_END_DEPENDENT */ acpi_rs_convert_io, /* 0x08, ACPI_RESOURCE_NAME_IO */ acpi_rs_convert_fixed_io, /* 0x09, ACPI_RESOURCE_NAME_FIXED_IO */ - acpi_rs_convert_fixed_dma, /* 0x0A, ACPI_RESOURCE_NAME_FIXED_DMA */ + NULL, /* 0x0A, Reserved */ NULL, /* 0x0B, Reserved */ NULL, /* 0x0C, Reserved */ NULL, /* 0x0D, Reserved */ @@ -117,19 +114,7 @@ struct acpi_rsconvert_info *acpi_gbl_get_resource_dispatch[] = { acpi_rs_convert_address16, /* 0x08, ACPI_RESOURCE_NAME_ADDRESS16 */ acpi_rs_convert_ext_irq, /* 0x09, ACPI_RESOURCE_NAME_EXTENDED_IRQ */ acpi_rs_convert_address64, /* 0x0A, ACPI_RESOURCE_NAME_ADDRESS64 */ - acpi_rs_convert_ext_address64, /* 0x0B, ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 */ - acpi_rs_convert_gpio, /* 0x0C, ACPI_RESOURCE_NAME_GPIO */ - NULL, /* 0x0D, Reserved */ - NULL, /* 0x0E, ACPI_RESOURCE_NAME_SERIAL_BUS - Use subtype table below */ -}; - -/* Subtype table for serial_bus -- I2C, SPI, and UART */ - -struct acpi_rsconvert_info *acpi_gbl_convert_resource_serial_bus_dispatch[] = { - NULL, - acpi_rs_convert_i2c_serial_bus, - acpi_rs_convert_spi_serial_bus, - acpi_rs_convert_uart_serial_bus, + acpi_rs_convert_ext_address64 /* 0x0B, ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 */ }; #ifdef ACPI_FUTURE_USAGE @@ -155,16 +140,6 @@ struct acpi_rsdump_info *acpi_gbl_dump_resource_dispatch[] = { acpi_rs_dump_ext_address64, /* ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 */ acpi_rs_dump_ext_irq, /* ACPI_RESOURCE_TYPE_EXTENDED_IRQ */ acpi_rs_dump_generic_reg, /* ACPI_RESOURCE_TYPE_GENERIC_REGISTER */ - acpi_rs_dump_gpio, /* ACPI_RESOURCE_TYPE_GPIO */ - acpi_rs_dump_fixed_dma, /* ACPI_RESOURCE_TYPE_FIXED_DMA */ - NULL, /* ACPI_RESOURCE_TYPE_SERIAL_BUS */ -}; - -struct acpi_rsdump_info *acpi_gbl_dump_serial_bus_dispatch[] = { - NULL, - acpi_rs_dump_i2c_serial_bus, /* AML_RESOURCE_I2C_BUS_TYPE */ - acpi_rs_dump_spi_serial_bus, /* AML_RESOURCE_SPI_BUS_TYPE */ - acpi_rs_dump_uart_serial_bus, /* AML_RESOURCE_UART_BUS_TYPE */ }; #endif @@ -191,10 +166,7 @@ const u8 acpi_gbl_aml_resource_sizes[] = { sizeof(struct aml_resource_address64), /* ACPI_RESOURCE_TYPE_ADDRESS64 */ sizeof(struct aml_resource_extended_address64), /*ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 */ sizeof(struct aml_resource_extended_irq), /* ACPI_RESOURCE_TYPE_EXTENDED_IRQ */ - sizeof(struct aml_resource_generic_register), /* ACPI_RESOURCE_TYPE_GENERIC_REGISTER */ - sizeof(struct aml_resource_gpio), /* ACPI_RESOURCE_TYPE_GPIO */ - sizeof(struct aml_resource_fixed_dma), /* ACPI_RESOURCE_TYPE_FIXED_DMA */ - sizeof(struct aml_resource_common_serialbus), /* ACPI_RESOURCE_TYPE_SERIAL_BUS */ + sizeof(struct aml_resource_generic_register) /* ACPI_RESOURCE_TYPE_GENERIC_REGISTER */ }; const u8 acpi_gbl_resource_struct_sizes[] = { @@ -210,7 +182,7 @@ const u8 acpi_gbl_resource_struct_sizes[] = { ACPI_RS_SIZE_MIN, ACPI_RS_SIZE(struct acpi_resource_io), ACPI_RS_SIZE(struct acpi_resource_fixed_io), - ACPI_RS_SIZE(struct acpi_resource_fixed_dma), + 0, 0, 0, 0, @@ -230,21 +202,5 @@ const u8 acpi_gbl_resource_struct_sizes[] = { ACPI_RS_SIZE(struct acpi_resource_address16), ACPI_RS_SIZE(struct acpi_resource_extended_irq), ACPI_RS_SIZE(struct acpi_resource_address64), - ACPI_RS_SIZE(struct acpi_resource_extended_address64), - ACPI_RS_SIZE(struct acpi_resource_gpio), - ACPI_RS_SIZE(struct acpi_resource_common_serialbus) -}; - -const u8 acpi_gbl_aml_resource_serial_bus_sizes[] = { - 0, - sizeof(struct aml_resource_i2c_serialbus), - sizeof(struct aml_resource_spi_serialbus), - sizeof(struct aml_resource_uart_serialbus), -}; - -const u8 acpi_gbl_resource_struct_serial_bus_sizes[] = { - 0, - ACPI_RS_SIZE(struct acpi_resource_i2c_serialbus), - ACPI_RS_SIZE(struct acpi_resource_spi_serialbus), - ACPI_RS_SIZE(struct acpi_resource_uart_serialbus), + ACPI_RS_SIZE(struct acpi_resource_extended_address64) }; diff --git a/trunk/drivers/acpi/acpica/rsio.c b/trunk/drivers/acpi/acpica/rsio.c index f6a081057a22..0c7efef008be 100644 --- a/trunk/drivers/acpi/acpica/rsio.c +++ b/trunk/drivers/acpi/acpica/rsio.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/rsirq.c b/trunk/drivers/acpi/acpica/rsirq.c index e23a9ec248cb..50b8ad211167 100644 --- a/trunk/drivers/acpi/acpica/rsirq.c +++ b/trunk/drivers/acpi/acpica/rsirq.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -264,34 +264,3 @@ struct acpi_rsconvert_info acpi_rs_convert_dma[6] = { AML_OFFSET(dma.dma_channel_mask), ACPI_RS_OFFSET(data.dma.channel_count)} }; - -/******************************************************************************* - * - * acpi_rs_convert_fixed_dma - * - ******************************************************************************/ - -struct acpi_rsconvert_info acpi_rs_convert_fixed_dma[4] = { - {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_FIXED_DMA, - ACPI_RS_SIZE(struct acpi_resource_fixed_dma), - ACPI_RSC_TABLE_SIZE(acpi_rs_convert_fixed_dma)}, - - {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_FIXED_DMA, - sizeof(struct aml_resource_fixed_dma), - 0}, - - /* - * These fields are contiguous in both the source and destination: - * request_lines - * Channels - */ - - {ACPI_RSC_MOVE16, ACPI_RS_OFFSET(data.fixed_dma.request_lines), - AML_OFFSET(fixed_dma.request_lines), - 2}, - - {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.fixed_dma.width), - AML_OFFSET(fixed_dma.width), - 1}, - -}; diff --git a/trunk/drivers/acpi/acpica/rslist.c b/trunk/drivers/acpi/acpica/rslist.c index 9be129f5d6f4..1bfcef736c50 100644 --- a/trunk/drivers/acpi/acpica/rslist.c +++ b/trunk/drivers/acpi/acpica/rslist.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -70,8 +70,6 @@ acpi_rs_convert_aml_to_resources(u8 * aml, struct acpi_resource **resource_ptr = ACPI_CAST_INDIRECT_PTR(struct acpi_resource, context); struct acpi_resource *resource; - union aml_resource *aml_resource; - struct acpi_rsconvert_info *conversion_table; acpi_status status; ACPI_FUNCTION_TRACE(rs_convert_aml_to_resources); @@ -86,37 +84,14 @@ acpi_rs_convert_aml_to_resources(u8 * aml, "Misaligned resource pointer %p", resource)); } - /* Get the appropriate conversion info table */ - - aml_resource = ACPI_CAST_PTR(union aml_resource, aml); - if (acpi_ut_get_resource_type(aml) == ACPI_RESOURCE_NAME_SERIAL_BUS) { - if (aml_resource->common_serial_bus.type > - AML_RESOURCE_MAX_SERIALBUSTYPE) { - conversion_table = NULL; - } else { - /* This is an I2C, SPI, or UART serial_bus descriptor */ - - conversion_table = - acpi_gbl_convert_resource_serial_bus_dispatch - [aml_resource->common_serial_bus.type]; - } - } else { - conversion_table = - acpi_gbl_get_resource_dispatch[resource_index]; - } - - if (!conversion_table) { - ACPI_ERROR((AE_INFO, - "Invalid/unsupported resource descriptor: Type 0x%2.2X", - resource_index)); - return (AE_AML_INVALID_RESOURCE_TYPE); - } - /* Convert the AML byte stream resource to a local resource struct */ status = - acpi_rs_convert_aml_to_resource(resource, aml_resource, - conversion_table); + acpi_rs_convert_aml_to_resource(resource, + ACPI_CAST_PTR(union aml_resource, + aml), + acpi_gbl_get_resource_dispatch + [resource_index]); if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, status, "Could not convert AML resource (Type 0x%X)", @@ -131,7 +106,7 @@ acpi_rs_convert_aml_to_resources(u8 * aml, /* Point to the next structure in the output buffer */ - *resource_ptr = ACPI_NEXT_RESOURCE(resource); + *resource_ptr = ACPI_ADD_PTR(void, resource, resource->length); return_ACPI_STATUS(AE_OK); } @@ -160,7 +135,6 @@ acpi_rs_convert_resources_to_aml(struct acpi_resource *resource, { u8 *aml = output_buffer; u8 *end_aml = output_buffer + aml_size_needed; - struct acpi_rsconvert_info *conversion_table; acpi_status status; ACPI_FUNCTION_TRACE(rs_convert_resources_to_aml); @@ -180,34 +154,11 @@ acpi_rs_convert_resources_to_aml(struct acpi_resource *resource, /* Perform the conversion */ - if (resource->type == ACPI_RESOURCE_TYPE_SERIAL_BUS) { - if (resource->data.common_serial_bus.type > - AML_RESOURCE_MAX_SERIALBUSTYPE) { - conversion_table = NULL; - } else { - /* This is an I2C, SPI, or UART serial_bus descriptor */ - - conversion_table = - acpi_gbl_convert_resource_serial_bus_dispatch - [resource->data.common_serial_bus.type]; - } - } else { - conversion_table = - acpi_gbl_set_resource_dispatch[resource->type]; - } - - if (!conversion_table) { - ACPI_ERROR((AE_INFO, - "Invalid/unsupported resource descriptor: Type 0x%2.2X", - resource->type)); - return (AE_AML_INVALID_RESOURCE_TYPE); - } - - status = acpi_rs_convert_resource_to_aml(resource, - ACPI_CAST_PTR(union - aml_resource, - aml), - conversion_table); + status = acpi_rs_convert_resource_to_aml(resource, ACPI_CAST_PTR(union + aml_resource, + aml), + acpi_gbl_set_resource_dispatch + [resource->type]); if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, status, "Could not convert resource (type 0x%X) to AML", @@ -241,7 +192,9 @@ acpi_rs_convert_resources_to_aml(struct acpi_resource *resource, /* Point to the next input resource descriptor */ - resource = ACPI_NEXT_RESOURCE(resource); + resource = + ACPI_ADD_PTR(struct acpi_resource, resource, + resource->length); } /* Completed buffer, but did not find an end_tag resource descriptor */ diff --git a/trunk/drivers/acpi/acpica/rsmemory.c b/trunk/drivers/acpi/acpica/rsmemory.c index 4fd611ad02b4..7cc6d8625f1e 100644 --- a/trunk/drivers/acpi/acpica/rsmemory.c +++ b/trunk/drivers/acpi/acpica/rsmemory.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/rsmisc.c b/trunk/drivers/acpi/acpica/rsmisc.c index 8073b371cc7c..410264b22a29 100644 --- a/trunk/drivers/acpi/acpica/rsmisc.c +++ b/trunk/drivers/acpi/acpica/rsmisc.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -83,10 +83,6 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, ACPI_FUNCTION_TRACE(rs_convert_aml_to_resource); - if (!info) { - return_ACPI_STATUS(AE_BAD_PARAMETER); - } - if (((acpi_size) resource) & 0x3) { /* Each internal resource struct is expected to be 32-bit aligned */ @@ -105,6 +101,7 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, * table length (# of table entries) */ count = INIT_TABLE_LENGTH(info); + while (count) { /* * Source is the external AML byte stream buffer, @@ -148,14 +145,6 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, ((ACPI_GET8(source) >> info->value) & 0x03); break; - case ACPI_RSC_3BITFLAG: - /* - * Mask and shift the flag bits - */ - ACPI_SET8(destination) = (u8) - ((ACPI_GET8(source) >> info->value) & 0x07); - break; - case ACPI_RSC_COUNT: item_count = ACPI_GET8(source); @@ -174,69 +163,6 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, (info->value * (item_count - 1)); break; - case ACPI_RSC_COUNT_GPIO_PIN: - - target = ACPI_ADD_PTR(void, aml, info->value); - item_count = ACPI_GET16(target) - ACPI_GET16(source); - - resource->length = resource->length + item_count; - item_count = item_count / 2; - ACPI_SET16(destination) = item_count; - break; - - case ACPI_RSC_COUNT_GPIO_VEN: - - item_count = ACPI_GET8(source); - ACPI_SET8(destination) = (u8)item_count; - - resource->length = resource->length + - (info->value * item_count); - break; - - case ACPI_RSC_COUNT_GPIO_RES: - - /* - * Vendor data is optional (length/offset may both be zero) - * Examine vendor data length field first - */ - target = ACPI_ADD_PTR(void, aml, (info->value + 2)); - if (ACPI_GET16(target)) { - - /* Use vendor offset to get resource source length */ - - target = ACPI_ADD_PTR(void, aml, info->value); - item_count = - ACPI_GET16(target) - ACPI_GET16(source); - } else { - /* No vendor data to worry about */ - - item_count = aml->large_header.resource_length + - sizeof(struct aml_resource_large_header) - - ACPI_GET16(source); - } - - resource->length = resource->length + item_count; - ACPI_SET16(destination) = item_count; - break; - - case ACPI_RSC_COUNT_SERIAL_VEN: - - item_count = ACPI_GET16(source) - info->value; - - resource->length = resource->length + item_count; - ACPI_SET16(destination) = item_count; - break; - - case ACPI_RSC_COUNT_SERIAL_RES: - - item_count = (aml_resource_length + - sizeof(struct aml_resource_large_header)) - - ACPI_GET16(source) - info->value; - - resource->length = resource->length + item_count; - ACPI_SET16(destination) = item_count; - break; - case ACPI_RSC_LENGTH: resource->length = resource->length + info->value; @@ -257,72 +183,6 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, info->opcode); break; - case ACPI_RSC_MOVE_GPIO_PIN: - - /* Generate and set the PIN data pointer */ - - target = (char *)ACPI_ADD_PTR(void, resource, - (resource->length - - item_count * 2)); - *(u16 **)destination = ACPI_CAST_PTR(u16, target); - - /* Copy the PIN data */ - - source = ACPI_ADD_PTR(void, aml, ACPI_GET16(source)); - acpi_rs_move_data(target, source, item_count, - info->opcode); - break; - - case ACPI_RSC_MOVE_GPIO_RES: - - /* Generate and set the resource_source string pointer */ - - target = (char *)ACPI_ADD_PTR(void, resource, - (resource->length - - item_count)); - *(u8 **)destination = ACPI_CAST_PTR(u8, target); - - /* Copy the resource_source string */ - - source = ACPI_ADD_PTR(void, aml, ACPI_GET16(source)); - acpi_rs_move_data(target, source, item_count, - info->opcode); - break; - - case ACPI_RSC_MOVE_SERIAL_VEN: - - /* Generate and set the Vendor Data pointer */ - - target = (char *)ACPI_ADD_PTR(void, resource, - (resource->length - - item_count)); - *(u8 **)destination = ACPI_CAST_PTR(u8, target); - - /* Copy the Vendor Data */ - - source = ACPI_ADD_PTR(void, aml, info->value); - acpi_rs_move_data(target, source, item_count, - info->opcode); - break; - - case ACPI_RSC_MOVE_SERIAL_RES: - - /* Generate and set the resource_source string pointer */ - - target = (char *)ACPI_ADD_PTR(void, resource, - (resource->length - - item_count)); - *(u8 **)destination = ACPI_CAST_PTR(u8, target); - - /* Copy the resource_source string */ - - source = - ACPI_ADD_PTR(void, aml, - (ACPI_GET16(source) + info->value)); - acpi_rs_move_data(target, source, item_count, - info->opcode); - break; - case ACPI_RSC_SET8: ACPI_MEMSET(destination, info->aml_offset, info->value); @@ -359,18 +219,13 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource, * Optional resource_source (Index and String). This is the more * complicated case used by the Interrupt() macro */ - target = ACPI_ADD_PTR(char, resource, - info->aml_offset + - (item_count * 4)); + target = + ACPI_ADD_PTR(char, resource, + info->aml_offset + (item_count * 4)); resource->length += acpi_rs_get_resource_source(aml_resource_length, - (acpi_rs_length) - (((item_count - - 1) * sizeof(u32)) + - info->value), - destination, aml, - target); + (acpi_rs_length) (((item_count - 1) * sizeof(u32)) + info->value), destination, aml, target); break; case ACPI_RSC_BITMASK: @@ -472,7 +327,6 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource, { void *source = NULL; void *destination; - char *target; acpi_rsdesc_size aml_length = 0; u8 count; u16 temp16 = 0; @@ -480,10 +334,6 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource, ACPI_FUNCTION_TRACE(rs_convert_resource_to_aml); - if (!info) { - return_ACPI_STATUS(AE_BAD_PARAMETER); - } - /* * First table entry must be ACPI_RSC_INITxxx and must contain the * table length (# of table entries) @@ -533,14 +383,6 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource, ((ACPI_GET8(source) & 0x03) << info->value); break; - case ACPI_RSC_3BITFLAG: - /* - * Mask and shift the flag bits - */ - ACPI_SET8(destination) |= (u8) - ((ACPI_GET8(source) & 0x07) << info->value); - break; - case ACPI_RSC_COUNT: item_count = ACPI_GET8(source); @@ -558,63 +400,6 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource, acpi_rs_set_resource_length(aml_length, aml); break; - case ACPI_RSC_COUNT_GPIO_PIN: - - item_count = ACPI_GET16(source); - ACPI_SET16(destination) = (u16)aml_length; - - aml_length = (u16)(aml_length + item_count * 2); - target = ACPI_ADD_PTR(void, aml, info->value); - ACPI_SET16(target) = (u16)aml_length; - acpi_rs_set_resource_length(aml_length, aml); - break; - - case ACPI_RSC_COUNT_GPIO_VEN: - - item_count = ACPI_GET16(source); - ACPI_SET16(destination) = (u16)item_count; - - aml_length = - (u16)(aml_length + (info->value * item_count)); - acpi_rs_set_resource_length(aml_length, aml); - break; - - case ACPI_RSC_COUNT_GPIO_RES: - - /* Set resource source string length */ - - item_count = ACPI_GET16(source); - ACPI_SET16(destination) = (u16)aml_length; - - /* Compute offset for the Vendor Data */ - - aml_length = (u16)(aml_length + item_count); - target = ACPI_ADD_PTR(void, aml, info->value); - - /* Set vendor offset only if there is vendor data */ - - if (resource->data.gpio.vendor_length) { - ACPI_SET16(target) = (u16)aml_length; - } - - acpi_rs_set_resource_length(aml_length, aml); - break; - - case ACPI_RSC_COUNT_SERIAL_VEN: - - item_count = ACPI_GET16(source); - ACPI_SET16(destination) = item_count + info->value; - aml_length = (u16)(aml_length + item_count); - acpi_rs_set_resource_length(aml_length, aml); - break; - - case ACPI_RSC_COUNT_SERIAL_RES: - - item_count = ACPI_GET16(source); - aml_length = (u16)(aml_length + item_count); - acpi_rs_set_resource_length(aml_length, aml); - break; - case ACPI_RSC_LENGTH: acpi_rs_set_resource_length(info->value, aml); @@ -632,48 +417,6 @@ acpi_rs_convert_resource_to_aml(struct acpi_resource *resource, info->opcode); break; - case ACPI_RSC_MOVE_GPIO_PIN: - - destination = (char *)ACPI_ADD_PTR(void, aml, - ACPI_GET16 - (destination)); - source = *(u16 **)source; - acpi_rs_move_data(destination, source, item_count, - info->opcode); - break; - - case ACPI_RSC_MOVE_GPIO_RES: - - /* Used for both resource_source string and vendor_data */ - - destination = (char *)ACPI_ADD_PTR(void, aml, - ACPI_GET16 - (destination)); - source = *(u8 **)source; - acpi_rs_move_data(destination, source, item_count, - info->opcode); - break; - - case ACPI_RSC_MOVE_SERIAL_VEN: - - destination = (char *)ACPI_ADD_PTR(void, aml, - (aml_length - - item_count)); - source = *(u8 **)source; - acpi_rs_move_data(destination, source, item_count, - info->opcode); - break; - - case ACPI_RSC_MOVE_SERIAL_RES: - - destination = (char *)ACPI_ADD_PTR(void, aml, - (aml_length - - item_count)); - source = *(u8 **)source; - acpi_rs_move_data(destination, source, item_count, - info->opcode); - break; - case ACPI_RSC_ADDRESS: /* Set the Resource Type, General Flags, and Type-Specific Flags */ diff --git a/trunk/drivers/acpi/acpica/rsserial.c b/trunk/drivers/acpi/acpica/rsserial.c deleted file mode 100644 index 9aa5e689b444..000000000000 --- a/trunk/drivers/acpi/acpica/rsserial.c +++ /dev/null @@ -1,441 +0,0 @@ -/******************************************************************************* - * - * Module Name: rsserial - GPIO/serial_bus resource descriptors - * - ******************************************************************************/ - -/* - * Copyright (C) 2000 - 2012, Intel Corp. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions, and the following disclaimer, - * without modification. - * 2. Redistributions in binary form must reproduce at minimum a disclaimer - * substantially similar to the "NO WARRANTY" disclaimer below - * ("Disclaimer") and any redistribution must be conditioned upon - * including a substantially similar Disclaimer requirement for further - * binary redistribution. - * 3. Neither the names of the above-listed copyright holders nor the names - * of any contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * Alternatively, this software may be distributed under the terms of the - * GNU General Public License ("GPL") version 2 as published by the Free - * Software Foundation. - * - * NO WARRANTY - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - */ - -#include -#include "accommon.h" -#include "acresrc.h" - -#define _COMPONENT ACPI_RESOURCES -ACPI_MODULE_NAME("rsserial") - -/******************************************************************************* - * - * acpi_rs_convert_gpio - * - ******************************************************************************/ -struct acpi_rsconvert_info acpi_rs_convert_gpio[17] = { - {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_GPIO, - ACPI_RS_SIZE(struct acpi_resource_gpio), - ACPI_RSC_TABLE_SIZE(acpi_rs_convert_gpio)}, - - {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_GPIO, - sizeof(struct aml_resource_gpio), - 0}, - - /* - * These fields are contiguous in both the source and destination: - * revision_id - * connection_type - */ - {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.gpio.revision_id), - AML_OFFSET(gpio.revision_id), - 2}, - - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.gpio.producer_consumer), - AML_OFFSET(gpio.flags), - 0}, - - {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET(data.gpio.sharable), - AML_OFFSET(gpio.int_flags), - 3}, - - {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET(data.gpio.io_restriction), - AML_OFFSET(gpio.int_flags), - 0}, - - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.gpio.triggering), - AML_OFFSET(gpio.int_flags), - 0}, - - {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET(data.gpio.polarity), - AML_OFFSET(gpio.int_flags), - 1}, - - {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.gpio.pin_config), - AML_OFFSET(gpio.pin_config), - 1}, - - /* - * These fields are contiguous in both the source and destination: - * drive_strength - * debounce_timeout - */ - {ACPI_RSC_MOVE16, ACPI_RS_OFFSET(data.gpio.drive_strength), - AML_OFFSET(gpio.drive_strength), - 2}, - - /* Pin Table */ - - {ACPI_RSC_COUNT_GPIO_PIN, ACPI_RS_OFFSET(data.gpio.pin_table_length), - AML_OFFSET(gpio.pin_table_offset), - AML_OFFSET(gpio.res_source_offset)}, - - {ACPI_RSC_MOVE_GPIO_PIN, ACPI_RS_OFFSET(data.gpio.pin_table), - AML_OFFSET(gpio.pin_table_offset), - 0}, - - /* Resource Source */ - - {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.gpio.resource_source.index), - AML_OFFSET(gpio.res_source_index), - 1}, - - {ACPI_RSC_COUNT_GPIO_RES, - ACPI_RS_OFFSET(data.gpio.resource_source.string_length), - AML_OFFSET(gpio.res_source_offset), - AML_OFFSET(gpio.vendor_offset)}, - - {ACPI_RSC_MOVE_GPIO_RES, - ACPI_RS_OFFSET(data.gpio.resource_source.string_ptr), - AML_OFFSET(gpio.res_source_offset), - 0}, - - /* Vendor Data */ - - {ACPI_RSC_COUNT_GPIO_VEN, ACPI_RS_OFFSET(data.gpio.vendor_length), - AML_OFFSET(gpio.vendor_length), - 1}, - - {ACPI_RSC_MOVE_GPIO_RES, ACPI_RS_OFFSET(data.gpio.vendor_data), - AML_OFFSET(gpio.vendor_offset), - 0}, -}; - -/******************************************************************************* - * - * acpi_rs_convert_i2c_serial_bus - * - ******************************************************************************/ - -struct acpi_rsconvert_info acpi_rs_convert_i2c_serial_bus[16] = { - {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS, - ACPI_RS_SIZE(struct acpi_resource_i2c_serialbus), - ACPI_RSC_TABLE_SIZE(acpi_rs_convert_i2c_serial_bus)}, - - {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_SERIAL_BUS, - sizeof(struct aml_resource_i2c_serialbus), - 0}, - - {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.common_serial_bus.revision_id), - AML_OFFSET(common_serial_bus.revision_id), - 1}, - - {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.common_serial_bus.type), - AML_OFFSET(common_serial_bus.type), - 1}, - - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.common_serial_bus.slave_mode), - AML_OFFSET(common_serial_bus.flags), - 0}, - - {ACPI_RSC_1BITFLAG, - ACPI_RS_OFFSET(data.common_serial_bus.producer_consumer), - AML_OFFSET(common_serial_bus.flags), - 1}, - - {ACPI_RSC_MOVE8, - ACPI_RS_OFFSET(data.common_serial_bus.type_revision_id), - AML_OFFSET(common_serial_bus.type_revision_id), - 1}, - - {ACPI_RSC_MOVE16, - ACPI_RS_OFFSET(data.common_serial_bus.type_data_length), - AML_OFFSET(common_serial_bus.type_data_length), - 1}, - - /* Vendor data */ - - {ACPI_RSC_COUNT_SERIAL_VEN, - ACPI_RS_OFFSET(data.common_serial_bus.vendor_length), - AML_OFFSET(common_serial_bus.type_data_length), - AML_RESOURCE_I2C_MIN_DATA_LEN}, - - {ACPI_RSC_MOVE_SERIAL_VEN, - ACPI_RS_OFFSET(data.common_serial_bus.vendor_data), - 0, - sizeof(struct aml_resource_i2c_serialbus)}, - - /* Resource Source */ - - {ACPI_RSC_MOVE8, - ACPI_RS_OFFSET(data.common_serial_bus.resource_source.index), - AML_OFFSET(common_serial_bus.res_source_index), - 1}, - - {ACPI_RSC_COUNT_SERIAL_RES, - ACPI_RS_OFFSET(data.common_serial_bus.resource_source.string_length), - AML_OFFSET(common_serial_bus.type_data_length), - sizeof(struct aml_resource_common_serialbus)}, - - {ACPI_RSC_MOVE_SERIAL_RES, - ACPI_RS_OFFSET(data.common_serial_bus.resource_source.string_ptr), - AML_OFFSET(common_serial_bus.type_data_length), - sizeof(struct aml_resource_common_serialbus)}, - - /* I2C bus type specific */ - - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.i2c_serial_bus.access_mode), - AML_OFFSET(i2c_serial_bus.type_specific_flags), - 0}, - - {ACPI_RSC_MOVE32, ACPI_RS_OFFSET(data.i2c_serial_bus.connection_speed), - AML_OFFSET(i2c_serial_bus.connection_speed), - 1}, - - {ACPI_RSC_MOVE16, ACPI_RS_OFFSET(data.i2c_serial_bus.slave_address), - AML_OFFSET(i2c_serial_bus.slave_address), - 1}, -}; - -/******************************************************************************* - * - * acpi_rs_convert_spi_serial_bus - * - ******************************************************************************/ - -struct acpi_rsconvert_info acpi_rs_convert_spi_serial_bus[20] = { - {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS, - ACPI_RS_SIZE(struct acpi_resource_spi_serialbus), - ACPI_RSC_TABLE_SIZE(acpi_rs_convert_spi_serial_bus)}, - - {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_SERIAL_BUS, - sizeof(struct aml_resource_spi_serialbus), - 0}, - - {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.common_serial_bus.revision_id), - AML_OFFSET(common_serial_bus.revision_id), - 1}, - - {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.common_serial_bus.type), - AML_OFFSET(common_serial_bus.type), - 1}, - - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.common_serial_bus.slave_mode), - AML_OFFSET(common_serial_bus.flags), - 0}, - - {ACPI_RSC_1BITFLAG, - ACPI_RS_OFFSET(data.common_serial_bus.producer_consumer), - AML_OFFSET(common_serial_bus.flags), - 1}, - - {ACPI_RSC_MOVE8, - ACPI_RS_OFFSET(data.common_serial_bus.type_revision_id), - AML_OFFSET(common_serial_bus.type_revision_id), - 1}, - - {ACPI_RSC_MOVE16, - ACPI_RS_OFFSET(data.common_serial_bus.type_data_length), - AML_OFFSET(common_serial_bus.type_data_length), - 1}, - - /* Vendor data */ - - {ACPI_RSC_COUNT_SERIAL_VEN, - ACPI_RS_OFFSET(data.common_serial_bus.vendor_length), - AML_OFFSET(common_serial_bus.type_data_length), - AML_RESOURCE_SPI_MIN_DATA_LEN}, - - {ACPI_RSC_MOVE_SERIAL_VEN, - ACPI_RS_OFFSET(data.common_serial_bus.vendor_data), - 0, - sizeof(struct aml_resource_spi_serialbus)}, - - /* Resource Source */ - - {ACPI_RSC_MOVE8, - ACPI_RS_OFFSET(data.common_serial_bus.resource_source.index), - AML_OFFSET(common_serial_bus.res_source_index), - 1}, - - {ACPI_RSC_COUNT_SERIAL_RES, - ACPI_RS_OFFSET(data.common_serial_bus.resource_source.string_length), - AML_OFFSET(common_serial_bus.type_data_length), - sizeof(struct aml_resource_common_serialbus)}, - - {ACPI_RSC_MOVE_SERIAL_RES, - ACPI_RS_OFFSET(data.common_serial_bus.resource_source.string_ptr), - AML_OFFSET(common_serial_bus.type_data_length), - sizeof(struct aml_resource_common_serialbus)}, - - /* Spi bus type specific */ - - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.spi_serial_bus.wire_mode), - AML_OFFSET(spi_serial_bus.type_specific_flags), - 0}, - - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.spi_serial_bus.device_polarity), - AML_OFFSET(spi_serial_bus.type_specific_flags), - 1}, - - {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.spi_serial_bus.data_bit_length), - AML_OFFSET(spi_serial_bus.data_bit_length), - 1}, - - {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.spi_serial_bus.clock_phase), - AML_OFFSET(spi_serial_bus.clock_phase), - 1}, - - {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.spi_serial_bus.clock_polarity), - AML_OFFSET(spi_serial_bus.clock_polarity), - 1}, - - {ACPI_RSC_MOVE16, ACPI_RS_OFFSET(data.spi_serial_bus.device_selection), - AML_OFFSET(spi_serial_bus.device_selection), - 1}, - - {ACPI_RSC_MOVE32, ACPI_RS_OFFSET(data.spi_serial_bus.connection_speed), - AML_OFFSET(spi_serial_bus.connection_speed), - 1}, -}; - -/******************************************************************************* - * - * acpi_rs_convert_uart_serial_bus - * - ******************************************************************************/ - -struct acpi_rsconvert_info acpi_rs_convert_uart_serial_bus[22] = { - {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS, - ACPI_RS_SIZE(struct acpi_resource_uart_serialbus), - ACPI_RSC_TABLE_SIZE(acpi_rs_convert_uart_serial_bus)}, - - {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_SERIAL_BUS, - sizeof(struct aml_resource_uart_serialbus), - 0}, - - {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.common_serial_bus.revision_id), - AML_OFFSET(common_serial_bus.revision_id), - 1}, - - {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.common_serial_bus.type), - AML_OFFSET(common_serial_bus.type), - 1}, - - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.common_serial_bus.slave_mode), - AML_OFFSET(common_serial_bus.flags), - 0}, - - {ACPI_RSC_1BITFLAG, - ACPI_RS_OFFSET(data.common_serial_bus.producer_consumer), - AML_OFFSET(common_serial_bus.flags), - 1}, - - {ACPI_RSC_MOVE8, - ACPI_RS_OFFSET(data.common_serial_bus.type_revision_id), - AML_OFFSET(common_serial_bus.type_revision_id), - 1}, - - {ACPI_RSC_MOVE16, - ACPI_RS_OFFSET(data.common_serial_bus.type_data_length), - AML_OFFSET(common_serial_bus.type_data_length), - 1}, - - /* Vendor data */ - - {ACPI_RSC_COUNT_SERIAL_VEN, - ACPI_RS_OFFSET(data.common_serial_bus.vendor_length), - AML_OFFSET(common_serial_bus.type_data_length), - AML_RESOURCE_UART_MIN_DATA_LEN}, - - {ACPI_RSC_MOVE_SERIAL_VEN, - ACPI_RS_OFFSET(data.common_serial_bus.vendor_data), - 0, - sizeof(struct aml_resource_uart_serialbus)}, - - /* Resource Source */ - - {ACPI_RSC_MOVE8, - ACPI_RS_OFFSET(data.common_serial_bus.resource_source.index), - AML_OFFSET(common_serial_bus.res_source_index), - 1}, - - {ACPI_RSC_COUNT_SERIAL_RES, - ACPI_RS_OFFSET(data.common_serial_bus.resource_source.string_length), - AML_OFFSET(common_serial_bus.type_data_length), - sizeof(struct aml_resource_common_serialbus)}, - - {ACPI_RSC_MOVE_SERIAL_RES, - ACPI_RS_OFFSET(data.common_serial_bus.resource_source.string_ptr), - AML_OFFSET(common_serial_bus.type_data_length), - sizeof(struct aml_resource_common_serialbus)}, - - /* Uart bus type specific */ - - {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET(data.uart_serial_bus.flow_control), - AML_OFFSET(uart_serial_bus.type_specific_flags), - 0}, - - {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET(data.uart_serial_bus.stop_bits), - AML_OFFSET(uart_serial_bus.type_specific_flags), - 2}, - - {ACPI_RSC_3BITFLAG, ACPI_RS_OFFSET(data.uart_serial_bus.data_bits), - AML_OFFSET(uart_serial_bus.type_specific_flags), - 4}, - - {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.uart_serial_bus.endian), - AML_OFFSET(uart_serial_bus.type_specific_flags), - 7}, - - {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.uart_serial_bus.parity), - AML_OFFSET(uart_serial_bus.parity), - 1}, - - {ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.uart_serial_bus.lines_enabled), - AML_OFFSET(uart_serial_bus.lines_enabled), - 1}, - - {ACPI_RSC_MOVE16, ACPI_RS_OFFSET(data.uart_serial_bus.rx_fifo_size), - AML_OFFSET(uart_serial_bus.rx_fifo_size), - 1}, - - {ACPI_RSC_MOVE16, ACPI_RS_OFFSET(data.uart_serial_bus.tx_fifo_size), - AML_OFFSET(uart_serial_bus.tx_fifo_size), - 1}, - - {ACPI_RSC_MOVE32, - ACPI_RS_OFFSET(data.uart_serial_bus.default_baud_rate), - AML_OFFSET(uart_serial_bus.default_baud_rate), - 1}, -}; diff --git a/trunk/drivers/acpi/acpica/rsutils.c b/trunk/drivers/acpi/acpica/rsutils.c index 433a375deb93..231811e56939 100644 --- a/trunk/drivers/acpi/acpica/rsutils.c +++ b/trunk/drivers/acpi/acpica/rsutils.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -144,9 +144,6 @@ acpi_rs_move_data(void *destination, void *source, u16 item_count, u8 move_type) * since there are no alignment or endian issues */ case ACPI_RSC_MOVE8: - case ACPI_RSC_MOVE_GPIO_RES: - case ACPI_RSC_MOVE_SERIAL_VEN: - case ACPI_RSC_MOVE_SERIAL_RES: ACPI_MEMCPY(destination, source, item_count); return; @@ -156,7 +153,6 @@ acpi_rs_move_data(void *destination, void *source, u16 item_count, u8 move_type) * misaligned memory transfers */ case ACPI_RSC_MOVE16: - case ACPI_RSC_MOVE_GPIO_PIN: ACPI_MOVE_16_TO_16(&ACPI_CAST_PTR(u16, destination)[i], &ACPI_CAST_PTR(u16, source)[i]); break; @@ -592,56 +588,6 @@ acpi_rs_get_prs_method_data(struct acpi_namespace_node *node, } #endif /* ACPI_FUTURE_USAGE */ -/******************************************************************************* - * - * FUNCTION: acpi_rs_get_aei_method_data - * - * PARAMETERS: Node - Device node - * ret_buffer - Pointer to a buffer structure for the - * results - * - * RETURN: Status - * - * DESCRIPTION: This function is called to get the _AEI value of an object - * contained in an object specified by the handle passed in - * - * If the function fails an appropriate status will be returned - * and the contents of the callers buffer is undefined. - * - ******************************************************************************/ - -acpi_status -acpi_rs_get_aei_method_data(struct acpi_namespace_node *node, - struct acpi_buffer *ret_buffer) -{ - union acpi_operand_object *obj_desc; - acpi_status status; - - ACPI_FUNCTION_TRACE(rs_get_aei_method_data); - - /* Parameters guaranteed valid by caller */ - - /* Execute the method, no parameters */ - - status = acpi_ut_evaluate_object(node, METHOD_NAME__AEI, - ACPI_BTYPE_BUFFER, &obj_desc); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - - /* - * Make the call to create a resource linked list from the - * byte stream buffer that comes back from the _CRS method - * execution. - */ - status = acpi_rs_create_resource_list(obj_desc, ret_buffer); - - /* On exit, we must delete the object returned by evaluate_object */ - - acpi_ut_remove_reference(obj_desc); - return_ACPI_STATUS(status); -} - /******************************************************************************* * * FUNCTION: acpi_rs_get_method_data diff --git a/trunk/drivers/acpi/acpica/rsxface.c b/trunk/drivers/acpi/acpica/rsxface.c index f58c098c7aeb..fe86b37b16ce 100644 --- a/trunk/drivers/acpi/acpica/rsxface.c +++ b/trunk/drivers/acpi/acpica/rsxface.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -307,46 +307,6 @@ acpi_set_current_resources(acpi_handle device_handle, ACPI_EXPORT_SYMBOL(acpi_set_current_resources) -/******************************************************************************* - * - * FUNCTION: acpi_get_event_resources - * - * PARAMETERS: device_handle - Handle to the device object for the - * device we are getting resources - * in_buffer - Pointer to a buffer containing the - * resources to be set for the device - * - * RETURN: Status - * - * DESCRIPTION: This function is called to get the event resources for a - * specific device. The caller must first acquire a handle for - * the desired device. The resource data is passed to the routine - * the buffer pointed to by the in_buffer variable. Uses the - * _AEI method. - * - ******************************************************************************/ -acpi_status -acpi_get_event_resources(acpi_handle device_handle, - struct acpi_buffer *ret_buffer) -{ - acpi_status status; - struct acpi_namespace_node *node; - - ACPI_FUNCTION_TRACE(acpi_get_event_resources); - - /* Validate parameters then dispatch to internal routine */ - - status = acpi_rs_validate_parameters(device_handle, ret_buffer, &node); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - - status = acpi_rs_get_aei_method_data(node, ret_buffer); - return_ACPI_STATUS(status); -} - -ACPI_EXPORT_SYMBOL(acpi_get_event_resources) - /****************************************************************************** * * FUNCTION: acpi_resource_to_address64 @@ -526,9 +486,8 @@ acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context) * * PARAMETERS: device_handle - Handle to the device object for the * device we are querying - * Name - Method name of the resources we want. - * (METHOD_NAME__CRS, METHOD_NAME__PRS, or - * METHOD_NAME__AEI) + * Name - Method name of the resources we want + * (METHOD_NAME__CRS or METHOD_NAME__PRS) * user_function - Called for each resource * Context - Passed to user_function * @@ -555,12 +514,11 @@ acpi_walk_resources(acpi_handle device_handle, if (!device_handle || !user_function || !name || (!ACPI_COMPARE_NAME(name, METHOD_NAME__CRS) && - !ACPI_COMPARE_NAME(name, METHOD_NAME__PRS) && - !ACPI_COMPARE_NAME(name, METHOD_NAME__AEI))) { + !ACPI_COMPARE_NAME(name, METHOD_NAME__PRS))) { return_ACPI_STATUS(AE_BAD_PARAMETER); } - /* Get the _CRS/_PRS/_AEI resource list */ + /* Get the _CRS or _PRS resource list */ buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER; status = acpi_rs_get_method_data(device_handle, name, &buffer); diff --git a/trunk/drivers/acpi/acpica/tbfadt.c b/trunk/drivers/acpi/acpica/tbfadt.c index c5d870406f41..6f5588e62c0a 100644 --- a/trunk/drivers/acpi/acpica/tbfadt.c +++ b/trunk/drivers/acpi/acpica/tbfadt.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -63,15 +63,14 @@ static void acpi_tb_setup_fadt_registers(void); typedef struct acpi_fadt_info { char *name; - u16 address64; - u16 address32; - u16 length; + u8 address64; + u8 address32; + u8 length; u8 default_length; u8 type; } acpi_fadt_info; -#define ACPI_FADT_OPTIONAL 0 #define ACPI_FADT_REQUIRED 1 #define ACPI_FADT_SEPARATE_LENGTH 2 @@ -88,7 +87,7 @@ static struct acpi_fadt_info fadt_info_table[] = { ACPI_FADT_OFFSET(pm1b_event_block), ACPI_FADT_OFFSET(pm1_event_length), ACPI_PM1_REGISTER_WIDTH * 2, /* Enable + Status register */ - ACPI_FADT_OPTIONAL}, + 0}, {"Pm1aControlBlock", ACPI_FADT_OFFSET(xpm1a_control_block), @@ -102,7 +101,7 @@ static struct acpi_fadt_info fadt_info_table[] = { ACPI_FADT_OFFSET(pm1b_control_block), ACPI_FADT_OFFSET(pm1_control_length), ACPI_PM1_REGISTER_WIDTH, - ACPI_FADT_OPTIONAL}, + 0}, {"Pm2ControlBlock", ACPI_FADT_OFFSET(xpm2_control_block), @@ -140,7 +139,7 @@ static struct acpi_fadt_info fadt_info_table[] = { typedef struct acpi_fadt_pm_info { struct acpi_generic_address *target; - u16 source; + u8 source; u8 register_num; } acpi_fadt_pm_info; @@ -254,13 +253,8 @@ void acpi_tb_parse_fadt(u32 table_index) acpi_tb_install_table((acpi_physical_address) acpi_gbl_FADT.Xdsdt, ACPI_SIG_DSDT, ACPI_TABLE_INDEX_DSDT); - /* If Hardware Reduced flag is set, there is no FACS */ - - if (!acpi_gbl_reduced_hardware) { - acpi_tb_install_table((acpi_physical_address) acpi_gbl_FADT. - Xfacs, ACPI_SIG_FACS, - ACPI_TABLE_INDEX_FACS); - } + acpi_tb_install_table((acpi_physical_address) acpi_gbl_FADT.Xfacs, + ACPI_SIG_FACS, ACPI_TABLE_INDEX_FACS); } /******************************************************************************* @@ -283,12 +277,12 @@ void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length) { /* * Check if the FADT is larger than the largest table that we expect - * (the ACPI 5.0 version). If so, truncate the table, and issue + * (the ACPI 2.0/3.0 version). If so, truncate the table, and issue * a warning. */ if (length > sizeof(struct acpi_table_fadt)) { ACPI_WARNING((AE_INFO, - "FADT (revision %u) is longer than ACPI 5.0 version, " + "FADT (revision %u) is longer than ACPI 2.0 version, " "truncating length %u to %u", table->revision, length, (u32)sizeof(struct acpi_table_fadt))); @@ -303,13 +297,6 @@ void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length) ACPI_MEMCPY(&acpi_gbl_FADT, table, ACPI_MIN(length, sizeof(struct acpi_table_fadt))); - /* Take a copy of the Hardware Reduced flag */ - - acpi_gbl_reduced_hardware = FALSE; - if (acpi_gbl_FADT.flags & ACPI_FADT_HW_REDUCED) { - acpi_gbl_reduced_hardware = TRUE; - } - /* Convert the local copy of the FADT to the common internal format */ acpi_tb_convert_fadt(); @@ -515,12 +502,6 @@ static void acpi_tb_validate_fadt(void) acpi_gbl_FADT.Xdsdt = (u64) acpi_gbl_FADT.dsdt; } - /* If Hardware Reduced flag is set, we are all done */ - - if (acpi_gbl_reduced_hardware) { - return; - } - /* Examine all of the 64-bit extended address fields (X fields) */ for (i = 0; i < ACPI_FADT_INFO_ENTRIES; i++) { diff --git a/trunk/drivers/acpi/acpica/tbfind.c b/trunk/drivers/acpi/acpica/tbfind.c index 4903e36ea75a..a55cb2bb5abb 100644 --- a/trunk/drivers/acpi/acpica/tbfind.c +++ b/trunk/drivers/acpi/acpica/tbfind.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/tbinstal.c b/trunk/drivers/acpi/acpica/tbinstal.c index 1aecf7baa4e0..62365f6075dd 100644 --- a/trunk/drivers/acpi/acpica/tbinstal.c +++ b/trunk/drivers/acpi/acpica/tbinstal.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/tbutils.c b/trunk/drivers/acpi/acpica/tbutils.c index 09ca39e14337..0f2d395feaba 100644 --- a/trunk/drivers/acpi/acpica/tbutils.c +++ b/trunk/drivers/acpi/acpica/tbutils.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -135,13 +135,6 @@ acpi_status acpi_tb_initialize_facs(void) { acpi_status status; - /* If Hardware Reduced flag is set, there is no FACS */ - - if (acpi_gbl_reduced_hardware) { - acpi_gbl_FACS = NULL; - return (AE_OK); - } - status = acpi_get_table_by_index(ACPI_TABLE_INDEX_FACS, ACPI_CAST_INDIRECT_PTR(struct acpi_table_header, diff --git a/trunk/drivers/acpi/acpica/tbxface.c b/trunk/drivers/acpi/acpica/tbxface.c index abcc6412c244..e7d13f5d3f2d 100644 --- a/trunk/drivers/acpi/acpica/tbxface.c +++ b/trunk/drivers/acpi/acpica/tbxface.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/tbxfroot.c b/trunk/drivers/acpi/acpica/tbxfroot.c index 4258f647ca3d..7eb6c6cc1edf 100644 --- a/trunk/drivers/acpi/acpica/tbxfroot.c +++ b/trunk/drivers/acpi/acpica/tbxfroot.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/utaddress.c b/trunk/drivers/acpi/acpica/utaddress.c deleted file mode 100644 index 67932aebe6dd..000000000000 --- a/trunk/drivers/acpi/acpica/utaddress.c +++ /dev/null @@ -1,294 +0,0 @@ -/****************************************************************************** - * - * Module Name: utaddress - op_region address range check - * - *****************************************************************************/ - -/* - * Copyright (C) 2000 - 2012, Intel Corp. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions, and the following disclaimer, - * without modification. - * 2. Redistributions in binary form must reproduce at minimum a disclaimer - * substantially similar to the "NO WARRANTY" disclaimer below - * ("Disclaimer") and any redistribution must be conditioned upon - * including a substantially similar Disclaimer requirement for further - * binary redistribution. - * 3. Neither the names of the above-listed copyright holders nor the names - * of any contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * Alternatively, this software may be distributed under the terms of the - * GNU General Public License ("GPL") version 2 as published by the Free - * Software Foundation. - * - * NO WARRANTY - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - */ - -#include -#include "accommon.h" -#include "acnamesp.h" - -#define _COMPONENT ACPI_UTILITIES -ACPI_MODULE_NAME("utaddress") - -/******************************************************************************* - * - * FUNCTION: acpi_ut_add_address_range - * - * PARAMETERS: space_id - Address space ID - * Address - op_region start address - * Length - op_region length - * region_node - op_region namespace node - * - * RETURN: Status - * - * DESCRIPTION: Add the Operation Region address range to the global list. - * The only supported Space IDs are Memory and I/O. Called when - * the op_region address/length operands are fully evaluated. - * - * MUTEX: Locks the namespace - * - * NOTE: Because this interface is only called when an op_region argument - * list is evaluated, there cannot be any duplicate region_nodes. - * Duplicate Address/Length values are allowed, however, so that multiple - * address conflicts can be detected. - * - ******************************************************************************/ -acpi_status -acpi_ut_add_address_range(acpi_adr_space_type space_id, - acpi_physical_address address, - u32 length, struct acpi_namespace_node *region_node) -{ - struct acpi_address_range *range_info; - acpi_status status; - - ACPI_FUNCTION_TRACE(ut_add_address_range); - - if ((space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY) && - (space_id != ACPI_ADR_SPACE_SYSTEM_IO)) { - return_ACPI_STATUS(AE_OK); - } - - /* Allocate/init a new info block, add it to the appropriate list */ - - range_info = ACPI_ALLOCATE(sizeof(struct acpi_address_range)); - if (!range_info) { - return_ACPI_STATUS(AE_NO_MEMORY); - } - - range_info->start_address = address; - range_info->end_address = (address + length - 1); - range_info->region_node = region_node; - - status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); - if (ACPI_FAILURE(status)) { - ACPI_FREE(range_info); - return_ACPI_STATUS(status); - } - - range_info->next = acpi_gbl_address_range_list[space_id]; - acpi_gbl_address_range_list[space_id] = range_info; - - ACPI_DEBUG_PRINT((ACPI_DB_NAMES, - "\nAdded [%4.4s] address range: 0x%p-0x%p\n", - acpi_ut_get_node_name(range_info->region_node), - ACPI_CAST_PTR(void, address), - ACPI_CAST_PTR(void, range_info->end_address))); - - (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); - return_ACPI_STATUS(AE_OK); -} - -/******************************************************************************* - * - * FUNCTION: acpi_ut_remove_address_range - * - * PARAMETERS: space_id - Address space ID - * region_node - op_region namespace node - * - * RETURN: None - * - * DESCRIPTION: Remove the Operation Region from the global list. The only - * supported Space IDs are Memory and I/O. Called when an - * op_region is deleted. - * - * MUTEX: Assumes the namespace is locked - * - ******************************************************************************/ - -void -acpi_ut_remove_address_range(acpi_adr_space_type space_id, - struct acpi_namespace_node *region_node) -{ - struct acpi_address_range *range_info; - struct acpi_address_range *prev; - - ACPI_FUNCTION_TRACE(ut_remove_address_range); - - if ((space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY) && - (space_id != ACPI_ADR_SPACE_SYSTEM_IO)) { - return_VOID; - } - - /* Get the appropriate list head and check the list */ - - range_info = prev = acpi_gbl_address_range_list[space_id]; - while (range_info) { - if (range_info->region_node == region_node) { - if (range_info == prev) { /* Found at list head */ - acpi_gbl_address_range_list[space_id] = - range_info->next; - } else { - prev->next = range_info->next; - } - - ACPI_DEBUG_PRINT((ACPI_DB_NAMES, - "\nRemoved [%4.4s] address range: 0x%p-0x%p\n", - acpi_ut_get_node_name(range_info-> - region_node), - ACPI_CAST_PTR(void, - range_info-> - start_address), - ACPI_CAST_PTR(void, - range_info-> - end_address))); - - ACPI_FREE(range_info); - return_VOID; - } - - prev = range_info; - range_info = range_info->next; - } - - return_VOID; -} - -/******************************************************************************* - * - * FUNCTION: acpi_ut_check_address_range - * - * PARAMETERS: space_id - Address space ID - * Address - Start address - * Length - Length of address range - * Warn - TRUE if warning on overlap desired - * - * RETURN: Count of the number of conflicts detected. Zero is always - * returned for Space IDs other than Memory or I/O. - * - * DESCRIPTION: Check if the input address range overlaps any of the - * ASL operation region address ranges. The only supported - * Space IDs are Memory and I/O. - * - * MUTEX: Assumes the namespace is locked. - * - ******************************************************************************/ - -u32 -acpi_ut_check_address_range(acpi_adr_space_type space_id, - acpi_physical_address address, u32 length, u8 warn) -{ - struct acpi_address_range *range_info; - acpi_physical_address end_address; - char *pathname; - u32 overlap_count = 0; - - ACPI_FUNCTION_TRACE(ut_check_address_range); - - if ((space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY) && - (space_id != ACPI_ADR_SPACE_SYSTEM_IO)) { - return_UINT32(0); - } - - range_info = acpi_gbl_address_range_list[space_id]; - end_address = address + length - 1; - - /* Check entire list for all possible conflicts */ - - while (range_info) { - /* - * Check if the requested Address/Length overlaps this address_range. - * Four cases to consider: - * - * 1) Input address/length is contained completely in the address range - * 2) Input address/length overlaps range at the range start - * 3) Input address/length overlaps range at the range end - * 4) Input address/length completely encompasses the range - */ - if ((address <= range_info->end_address) && - (end_address >= range_info->start_address)) { - - /* Found an address range overlap */ - - overlap_count++; - if (warn) { /* Optional warning message */ - pathname = - acpi_ns_get_external_pathname(range_info-> - region_node); - - ACPI_WARNING((AE_INFO, - "0x%p-0x%p %s conflicts with Region %s %d", - ACPI_CAST_PTR(void, address), - ACPI_CAST_PTR(void, end_address), - acpi_ut_get_region_name(space_id), - pathname, overlap_count)); - ACPI_FREE(pathname); - } - } - - range_info = range_info->next; - } - - return_UINT32(overlap_count); -} - -/******************************************************************************* - * - * FUNCTION: acpi_ut_delete_address_lists - * - * PARAMETERS: None - * - * RETURN: None - * - * DESCRIPTION: Delete all global address range lists (called during - * subsystem shutdown). - * - ******************************************************************************/ - -void acpi_ut_delete_address_lists(void) -{ - struct acpi_address_range *next; - struct acpi_address_range *range_info; - int i; - - /* Delete all elements in all address range lists */ - - for (i = 0; i < ACPI_ADDRESS_RANGE_MAX; i++) { - next = acpi_gbl_address_range_list[i]; - - while (next) { - range_info = next; - next = range_info->next; - ACPI_FREE(range_info); - } - - acpi_gbl_address_range_list[i] = NULL; - } -} diff --git a/trunk/drivers/acpi/acpica/utalloc.c b/trunk/drivers/acpi/acpica/utalloc.c index 9982d2ea66fb..0a697351cf69 100644 --- a/trunk/drivers/acpi/acpica/utalloc.c +++ b/trunk/drivers/acpi/acpica/utalloc.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/utcopy.c b/trunk/drivers/acpi/acpica/utcopy.c index 3317c0a406ee..aded299a2fa8 100644 --- a/trunk/drivers/acpi/acpica/utcopy.c +++ b/trunk/drivers/acpi/acpica/utcopy.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/utdebug.c b/trunk/drivers/acpi/acpica/utdebug.c index a0998a886318..a1f8d7509e66 100644 --- a/trunk/drivers/acpi/acpica/utdebug.c +++ b/trunk/drivers/acpi/acpica/utdebug.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/utdecode.c b/trunk/drivers/acpi/acpica/utdecode.c index d42ede5260c7..8b087e2d64f4 100644 --- a/trunk/drivers/acpi/acpica/utdecode.c +++ b/trunk/drivers/acpi/acpica/utdecode.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -171,9 +171,7 @@ const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] = { "SMBus", "SystemCMOS", "PCIBARTarget", - "IPMI", - "GeneralPurposeIo", - "GenericSerialBus" + "IPMI" }; char *acpi_ut_get_region_name(u8 space_id) diff --git a/trunk/drivers/acpi/acpica/utdelete.c b/trunk/drivers/acpi/acpica/utdelete.c index 2a6c3e183697..31f5a7832ef1 100644 --- a/trunk/drivers/acpi/acpica/utdelete.c +++ b/trunk/drivers/acpi/acpica/utdelete.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -215,14 +215,11 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object) ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, "***** Region %p\n", object)); - /* - * Update address_range list. However, only permanent regions - * are installed in this list. (Not created within a method) - */ - if (!(object->region.node->flags & ANOBJ_TEMPORARY)) { - acpi_ut_remove_address_range(object->region.space_id, - object->region.node); - } + /* Invalidate the region address/length via the host OS */ + + acpi_os_invalidate_address(object->region.space_id, + object->region.address, + (acpi_size) object->region.length); second_desc = acpi_ns_get_secondary_object(object); if (second_desc) { diff --git a/trunk/drivers/acpi/acpica/uteval.c b/trunk/drivers/acpi/acpica/uteval.c index 479f32b33415..18f73c9d10bc 100644 --- a/trunk/drivers/acpi/acpica/uteval.c +++ b/trunk/drivers/acpi/acpica/uteval.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/utglobal.c b/trunk/drivers/acpi/acpica/utglobal.c index 4153584cf526..ffba0a39c3e8 100644 --- a/trunk/drivers/acpi/acpica/utglobal.c +++ b/trunk/drivers/acpi/acpica/utglobal.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -264,12 +264,6 @@ acpi_status acpi_ut_init_globals(void) return_ACPI_STATUS(status); } - /* Address Range lists */ - - for (i = 0; i < ACPI_ADDRESS_RANGE_MAX; i++) { - acpi_gbl_address_range_list[i] = NULL; - } - /* Mutex locked flags */ for (i = 0; i < ACPI_NUM_MUTEX; i++) { diff --git a/trunk/drivers/acpi/acpica/utids.c b/trunk/drivers/acpi/acpica/utids.c index c92eb1d93785..b679ea693545 100644 --- a/trunk/drivers/acpi/acpica/utids.c +++ b/trunk/drivers/acpi/acpica/utids.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/utinit.c b/trunk/drivers/acpi/acpica/utinit.c index 8359c0c5dc98..191b6828cce9 100644 --- a/trunk/drivers/acpi/acpica/utinit.c +++ b/trunk/drivers/acpi/acpica/utinit.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -92,7 +92,6 @@ static void acpi_ut_terminate(void) gpe_xrupt_info = next_gpe_xrupt_info; } - acpi_ut_delete_address_lists(); return_VOID; } diff --git a/trunk/drivers/acpi/acpica/utlock.c b/trunk/drivers/acpi/acpica/utlock.c index 155fd786d0f2..f6bb75c6faf5 100644 --- a/trunk/drivers/acpi/acpica/utlock.c +++ b/trunk/drivers/acpi/acpica/utlock.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/utmath.c b/trunk/drivers/acpi/acpica/utmath.c index 2491a552b0e6..ce481da9bb45 100644 --- a/trunk/drivers/acpi/acpica/utmath.c +++ b/trunk/drivers/acpi/acpica/utmath.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/utmisc.c b/trunk/drivers/acpi/acpica/utmisc.c index 86f19db74e05..c33a852d4f42 100644 --- a/trunk/drivers/acpi/acpica/utmisc.c +++ b/trunk/drivers/acpi/acpica/utmisc.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/utmutex.c b/trunk/drivers/acpi/acpica/utmutex.c index 43174df33121..7d797e2baecd 100644 --- a/trunk/drivers/acpi/acpica/utmutex.c +++ b/trunk/drivers/acpi/acpica/utmutex.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -293,10 +293,14 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id) acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id) { + acpi_thread_id this_thread_id; + ACPI_FUNCTION_NAME(ut_release_mutex); + this_thread_id = acpi_os_get_thread_id(); + ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Thread %u releasing Mutex [%s]\n", - (u32)acpi_os_get_thread_id(), + (u32)this_thread_id, acpi_ut_get_mutex_name(mutex_id))); if (mutex_id > ACPI_MAX_MUTEX) { @@ -325,8 +329,7 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id) * the ACPI subsystem code. */ for (i = mutex_id; i < ACPI_NUM_MUTEX; i++) { - if (acpi_gbl_mutex_info[i].thread_id == - acpi_os_get_thread_id()) { + if (acpi_gbl_mutex_info[i].thread_id == this_thread_id) { if (i == mutex_id) { continue; } diff --git a/trunk/drivers/acpi/acpica/utobject.c b/trunk/drivers/acpi/acpica/utobject.c index b112744fc9ae..188340a017b4 100644 --- a/trunk/drivers/acpi/acpica/utobject.c +++ b/trunk/drivers/acpi/acpica/utobject.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/utosi.c b/trunk/drivers/acpi/acpica/utosi.c index 2360cf70c18c..1fb10cb8f11d 100644 --- a/trunk/drivers/acpi/acpica/utosi.c +++ b/trunk/drivers/acpi/acpica/utosi.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/utresrc.c b/trunk/drivers/acpi/acpica/utresrc.c index 9d441ea70305..6ffd3a8bdaa5 100644 --- a/trunk/drivers/acpi/acpica/utresrc.c +++ b/trunk/drivers/acpi/acpica/utresrc.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,7 +43,7 @@ #include #include "accommon.h" -#include "acresrc.h" +#include "amlresrc.h" #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME("utresrc") @@ -154,138 +154,6 @@ const char *acpi_gbl_typ_decode[] = { "TypeF" }; -const char *acpi_gbl_ppc_decode[] = { - "PullDefault", - "PullUp", - "PullDown", - "PullNone" -}; - -const char *acpi_gbl_ior_decode[] = { - "IoRestrictionNone", - "IoRestrictionInputOnly", - "IoRestrictionOutputOnly", - "IoRestrictionNoneAndPreserve" -}; - -const char *acpi_gbl_dts_decode[] = { - "Width8bit", - "Width16bit", - "Width32bit", - "Width64bit", - "Width128bit", - "Width256bit", -}; - -/* GPIO connection type */ - -const char *acpi_gbl_ct_decode[] = { - "Interrupt", - "I/O" -}; - -/* Serial bus type */ - -const char *acpi_gbl_sbt_decode[] = { - "/* UNKNOWN serial bus type */", - "I2C", - "SPI", - "UART" -}; - -/* I2C serial bus access mode */ - -const char *acpi_gbl_am_decode[] = { - "AddressingMode7Bit", - "AddressingMode10Bit" -}; - -/* I2C serial bus slave mode */ - -const char *acpi_gbl_sm_decode[] = { - "ControllerInitiated", - "DeviceInitiated" -}; - -/* SPI serial bus wire mode */ - -const char *acpi_gbl_wm_decode[] = { - "FourWireMode", - "ThreeWireMode" -}; - -/* SPI serial clock phase */ - -const char *acpi_gbl_cph_decode[] = { - "ClockPhaseFirst", - "ClockPhaseSecond" -}; - -/* SPI serial bus clock polarity */ - -const char *acpi_gbl_cpo_decode[] = { - "ClockPolarityLow", - "ClockPolarityHigh" -}; - -/* SPI serial bus device polarity */ - -const char *acpi_gbl_dp_decode[] = { - "PolarityLow", - "PolarityHigh" -}; - -/* UART serial bus endian */ - -const char *acpi_gbl_ed_decode[] = { - "LittleEndian", - "BigEndian" -}; - -/* UART serial bus bits per byte */ - -const char *acpi_gbl_bpb_decode[] = { - "DataBitsFive", - "DataBitsSix", - "DataBitsSeven", - "DataBitsEight", - "DataBitsNine", - "/* UNKNOWN Bits per byte */", - "/* UNKNOWN Bits per byte */", - "/* UNKNOWN Bits per byte */" -}; - -/* UART serial bus stop bits */ - -const char *acpi_gbl_sb_decode[] = { - "StopBitsNone", - "StopBitsOne", - "StopBitsOnePlusHalf", - "StopBitsTwo" -}; - -/* UART serial bus flow control */ - -const char *acpi_gbl_fc_decode[] = { - "FlowControlNone", - "FlowControlHardware", - "FlowControlXON", - "/* UNKNOWN flow control keyword */" -}; - -/* UART serial bus parity type */ - -const char *acpi_gbl_pt_decode[] = { - "ParityTypeNone", - "ParityTypeEven", - "ParityTypeOdd", - "ParityTypeMark", - "ParityTypeSpace", - "/* UNKNOWN parity keyword */", - "/* UNKNOWN parity keyword */", - "/* UNKNOWN parity keyword */" -}; - #endif /* @@ -305,7 +173,7 @@ const u8 acpi_gbl_resource_aml_sizes[] = { ACPI_AML_SIZE_SMALL(struct aml_resource_end_dependent), ACPI_AML_SIZE_SMALL(struct aml_resource_io), ACPI_AML_SIZE_SMALL(struct aml_resource_fixed_io), - ACPI_AML_SIZE_SMALL(struct aml_resource_fixed_dma), + 0, 0, 0, 0, @@ -325,17 +193,7 @@ const u8 acpi_gbl_resource_aml_sizes[] = { ACPI_AML_SIZE_LARGE(struct aml_resource_address16), ACPI_AML_SIZE_LARGE(struct aml_resource_extended_irq), ACPI_AML_SIZE_LARGE(struct aml_resource_address64), - ACPI_AML_SIZE_LARGE(struct aml_resource_extended_address64), - ACPI_AML_SIZE_LARGE(struct aml_resource_gpio), - 0, - ACPI_AML_SIZE_LARGE(struct aml_resource_common_serialbus), -}; - -const u8 acpi_gbl_resource_aml_serial_bus_sizes[] = { - 0, - ACPI_AML_SIZE_LARGE(struct aml_resource_i2c_serialbus), - ACPI_AML_SIZE_LARGE(struct aml_resource_spi_serialbus), - ACPI_AML_SIZE_LARGE(struct aml_resource_uart_serialbus), + ACPI_AML_SIZE_LARGE(struct aml_resource_extended_address64) }; /* @@ -351,49 +209,35 @@ static const u8 acpi_gbl_resource_types[] = { 0, 0, 0, - ACPI_SMALL_VARIABLE_LENGTH, /* 04 IRQ */ - ACPI_FIXED_LENGTH, /* 05 DMA */ - ACPI_SMALL_VARIABLE_LENGTH, /* 06 start_dependent_functions */ - ACPI_FIXED_LENGTH, /* 07 end_dependent_functions */ - ACPI_FIXED_LENGTH, /* 08 IO */ - ACPI_FIXED_LENGTH, /* 09 fixed_iO */ - ACPI_FIXED_LENGTH, /* 0_a fixed_dMA */ + ACPI_SMALL_VARIABLE_LENGTH, + ACPI_FIXED_LENGTH, + ACPI_SMALL_VARIABLE_LENGTH, + ACPI_FIXED_LENGTH, + ACPI_FIXED_LENGTH, + ACPI_FIXED_LENGTH, + 0, 0, 0, 0, - ACPI_VARIABLE_LENGTH, /* 0_e vendor_short */ - ACPI_FIXED_LENGTH, /* 0_f end_tag */ + ACPI_VARIABLE_LENGTH, + ACPI_FIXED_LENGTH, /* Large descriptors */ 0, - ACPI_FIXED_LENGTH, /* 01 Memory24 */ - ACPI_FIXED_LENGTH, /* 02 generic_register */ + ACPI_FIXED_LENGTH, + ACPI_FIXED_LENGTH, 0, - ACPI_VARIABLE_LENGTH, /* 04 vendor_long */ - ACPI_FIXED_LENGTH, /* 05 Memory32 */ - ACPI_FIXED_LENGTH, /* 06 memory32_fixed */ - ACPI_VARIABLE_LENGTH, /* 07 Dword* address */ - ACPI_VARIABLE_LENGTH, /* 08 Word* address */ - ACPI_VARIABLE_LENGTH, /* 09 extended_iRQ */ - ACPI_VARIABLE_LENGTH, /* 0_a Qword* address */ - ACPI_FIXED_LENGTH, /* 0_b Extended* address */ - ACPI_VARIABLE_LENGTH, /* 0_c Gpio* */ - 0, - ACPI_VARIABLE_LENGTH /* 0_e *serial_bus */ + ACPI_VARIABLE_LENGTH, + ACPI_FIXED_LENGTH, + ACPI_FIXED_LENGTH, + ACPI_VARIABLE_LENGTH, + ACPI_VARIABLE_LENGTH, + ACPI_VARIABLE_LENGTH, + ACPI_VARIABLE_LENGTH, + ACPI_FIXED_LENGTH }; -/* - * For the i_aSL compiler/disassembler, we don't want any error messages - * because the disassembler uses the resource validation code to determine - * if Buffer objects are actually Resource Templates. - */ -#ifdef ACPI_ASL_COMPILER -#define ACPI_RESOURCE_ERROR(plist) -#else -#define ACPI_RESOURCE_ERROR(plist) ACPI_ERROR(plist) -#endif - /******************************************************************************* * * FUNCTION: acpi_ut_walk_aml_resources @@ -421,7 +265,6 @@ acpi_ut_walk_aml_resources(u8 * aml, u8 resource_index; u32 length; u32 offset = 0; - u8 end_tag[2] = { 0x79, 0x00 }; ACPI_FUNCTION_TRACE(ut_walk_aml_resources); @@ -443,10 +286,6 @@ acpi_ut_walk_aml_resources(u8 * aml, status = acpi_ut_validate_resource(aml, &resource_index); if (ACPI_FAILURE(status)) { - /* - * Exit on failure. Cannot continue because the descriptor length - * may be bogus also. - */ return_ACPI_STATUS(status); } @@ -461,7 +300,7 @@ acpi_ut_walk_aml_resources(u8 * aml, user_function(aml, length, offset, resource_index, context); if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); + return (status); } } @@ -494,19 +333,7 @@ acpi_ut_walk_aml_resources(u8 * aml, /* Did not find an end_tag descriptor */ - if (user_function) { - - /* Insert an end_tag anyway. acpi_rs_get_list_length always leaves room */ - - (void)acpi_ut_validate_resource(end_tag, &resource_index); - status = - user_function(end_tag, 2, offset, resource_index, context); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - } - - return_ACPI_STATUS(AE_AML_NO_RESOURCE_END_TAG); + return (AE_AML_NO_RESOURCE_END_TAG); } /******************************************************************************* @@ -527,7 +354,6 @@ acpi_ut_walk_aml_resources(u8 * aml, acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index) { - union aml_resource *aml_resource; u8 resource_type; u8 resource_index; acpi_rs_length resource_length; @@ -549,7 +375,7 @@ acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index) /* Verify the large resource type (name) against the max */ if (resource_type > ACPI_RESOURCE_NAME_LARGE_MAX) { - goto invalid_resource; + return (AE_AML_INVALID_RESOURCE_TYPE); } /* @@ -566,17 +392,15 @@ acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index) ((resource_type & ACPI_RESOURCE_NAME_SMALL_MASK) >> 3); } - /* - * Check validity of the resource type, via acpi_gbl_resource_types. Zero - * indicates an invalid resource. - */ + /* Check validity of the resource type, zero indicates name is invalid */ + if (!acpi_gbl_resource_types[resource_index]) { - goto invalid_resource; + return (AE_AML_INVALID_RESOURCE_TYPE); } /* - * Validate the resource_length field. This ensures that the length - * is at least reasonable, and guarantees that it is non-zero. + * 2) Validate the resource_length field. This ensures that the length + * is at least reasonable, and guarantees that it is non-zero. */ resource_length = acpi_ut_get_resource_length(aml); minimum_resource_length = acpi_gbl_resource_aml_sizes[resource_index]; @@ -589,7 +413,7 @@ acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index) /* Fixed length resource, length must match exactly */ if (resource_length != minimum_resource_length) { - goto bad_resource_length; + return (AE_AML_BAD_RESOURCE_LENGTH); } break; @@ -598,7 +422,7 @@ acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index) /* Variable length resource, length must be at least the minimum */ if (resource_length < minimum_resource_length) { - goto bad_resource_length; + return (AE_AML_BAD_RESOURCE_LENGTH); } break; @@ -608,7 +432,7 @@ acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index) if ((resource_length > minimum_resource_length) || (resource_length < (minimum_resource_length - 1))) { - goto bad_resource_length; + return (AE_AML_BAD_RESOURCE_LENGTH); } break; @@ -616,23 +440,7 @@ acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index) /* Shouldn't happen (because of validation earlier), but be sure */ - goto invalid_resource; - } - - aml_resource = ACPI_CAST_PTR(union aml_resource, aml); - if (resource_type == ACPI_RESOURCE_NAME_SERIAL_BUS) { - - /* Validate the bus_type field */ - - if ((aml_resource->common_serial_bus.type == 0) || - (aml_resource->common_serial_bus.type > - AML_RESOURCE_MAX_SERIALBUSTYPE)) { - ACPI_RESOURCE_ERROR((AE_INFO, - "Invalid/unsupported SerialBus resource descriptor: BusType 0x%2.2X", - aml_resource->common_serial_bus. - type)); - return (AE_AML_INVALID_RESOURCE_TYPE); - } + return (AE_AML_INVALID_RESOURCE_TYPE); } /* Optionally return the resource table index */ @@ -642,22 +450,6 @@ acpi_status acpi_ut_validate_resource(void *aml, u8 * return_index) } return (AE_OK); - - invalid_resource: - - ACPI_RESOURCE_ERROR((AE_INFO, - "Invalid/unsupported resource descriptor: Type 0x%2.2X", - resource_type)); - return (AE_AML_INVALID_RESOURCE_TYPE); - - bad_resource_length: - - ACPI_RESOURCE_ERROR((AE_INFO, - "Invalid resource descriptor length: Type " - "0x%2.2X, Length 0x%4.4X, MinLength 0x%4.4X", - resource_type, resource_length, - minimum_resource_length)); - return (AE_AML_BAD_RESOURCE_LENGTH); } /******************************************************************************* diff --git a/trunk/drivers/acpi/acpica/utstate.c b/trunk/drivers/acpi/acpica/utstate.c index 4267477c2797..30c21e1a9360 100644 --- a/trunk/drivers/acpi/acpica/utstate.c +++ b/trunk/drivers/acpi/acpica/utstate.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/utxface.c b/trunk/drivers/acpi/acpica/utxface.c index 644e8c8ebc4b..420ebfe08c72 100644 --- a/trunk/drivers/acpi/acpica/utxface.c +++ b/trunk/drivers/acpi/acpica/utxface.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -48,7 +48,6 @@ #include "acnamesp.h" #include "acdebug.h" #include "actables.h" -#include "acinterp.h" #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME("utxface") @@ -641,41 +640,4 @@ acpi_status acpi_install_interface_handler(acpi_interface_handler handler) } ACPI_EXPORT_SYMBOL(acpi_install_interface_handler) - -/***************************************************************************** - * - * FUNCTION: acpi_check_address_range - * - * PARAMETERS: space_id - Address space ID - * Address - Start address - * Length - Length - * Warn - TRUE if warning on overlap desired - * - * RETURN: Count of the number of conflicts detected. - * - * DESCRIPTION: Check if the input address range overlaps any of the - * ASL operation region address ranges. - * - ****************************************************************************/ -u32 -acpi_check_address_range(acpi_adr_space_type space_id, - acpi_physical_address address, - acpi_size length, u8 warn) -{ - u32 overlaps; - acpi_status status; - - status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); - if (ACPI_FAILURE(status)) { - return (0); - } - - overlaps = acpi_ut_check_address_range(space_id, address, - (u32)length, warn); - - (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); - return (overlaps); -} - -ACPI_EXPORT_SYMBOL(acpi_check_address_range) #endif /* !ACPI_ASL_COMPILER */ diff --git a/trunk/drivers/acpi/acpica/utxferror.c b/trunk/drivers/acpi/acpica/utxferror.c index 52b568af1819..8d0245ec4315 100644 --- a/trunk/drivers/acpi/acpica/utxferror.c +++ b/trunk/drivers/acpi/acpica/utxferror.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2012, Intel Corp. + * Copyright (C) 2000 - 2011, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/trunk/drivers/acpi/acpica/utxfmutex.c b/trunk/drivers/acpi/acpica/utxfmutex.c deleted file mode 100644 index 1427d191d15a..000000000000 --- a/trunk/drivers/acpi/acpica/utxfmutex.c +++ /dev/null @@ -1,187 +0,0 @@ -/******************************************************************************* - * - * Module Name: utxfmutex - external AML mutex access functions - * - ******************************************************************************/ - -/* - * Copyright (C) 2000 - 2012, Intel Corp. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions, and the following disclaimer, - * without modification. - * 2. Redistributions in binary form must reproduce at minimum a disclaimer - * substantially similar to the "NO WARRANTY" disclaimer below - * ("Disclaimer") and any redistribution must be conditioned upon - * including a substantially similar Disclaimer requirement for further - * binary redistribution. - * 3. Neither the names of the above-listed copyright holders nor the names - * of any contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * Alternatively, this software may be distributed under the terms of the - * GNU General Public License ("GPL") version 2 as published by the Free - * Software Foundation. - * - * NO WARRANTY - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - */ - -#include -#include "accommon.h" -#include "acnamesp.h" - -#define _COMPONENT ACPI_UTILITIES -ACPI_MODULE_NAME("utxfmutex") - -/* Local prototypes */ -static acpi_status -acpi_ut_get_mutex_object(acpi_handle handle, - acpi_string pathname, - union acpi_operand_object **ret_obj); - -/******************************************************************************* - * - * FUNCTION: acpi_ut_get_mutex_object - * - * PARAMETERS: Handle - Mutex or prefix handle (optional) - * Pathname - Mutex pathname (optional) - * ret_obj - Where the mutex object is returned - * - * RETURN: Status - * - * DESCRIPTION: Get an AML mutex object. The mutex node is pointed to by - * Handle:Pathname. Either Handle or Pathname can be NULL, but - * not both. - * - ******************************************************************************/ - -static acpi_status -acpi_ut_get_mutex_object(acpi_handle handle, - acpi_string pathname, - union acpi_operand_object **ret_obj) -{ - struct acpi_namespace_node *mutex_node; - union acpi_operand_object *mutex_obj; - acpi_status status; - - /* Parameter validation */ - - if (!ret_obj || (!handle && !pathname)) { - return (AE_BAD_PARAMETER); - } - - /* Get a the namespace node for the mutex */ - - mutex_node = handle; - if (pathname != NULL) { - status = acpi_get_handle(handle, pathname, - ACPI_CAST_PTR(acpi_handle, - &mutex_node)); - if (ACPI_FAILURE(status)) { - return (status); - } - } - - /* Ensure that we actually have a Mutex object */ - - if (!mutex_node || (mutex_node->type != ACPI_TYPE_MUTEX)) { - return (AE_TYPE); - } - - /* Get the low-level mutex object */ - - mutex_obj = acpi_ns_get_attached_object(mutex_node); - if (!mutex_obj) { - return (AE_NULL_OBJECT); - } - - *ret_obj = mutex_obj; - return (AE_OK); -} - -/******************************************************************************* - * - * FUNCTION: acpi_acquire_mutex - * - * PARAMETERS: Handle - Mutex or prefix handle (optional) - * Pathname - Mutex pathname (optional) - * Timeout - Max time to wait for the lock (millisec) - * - * RETURN: Status - * - * DESCRIPTION: Acquire an AML mutex. This is a device driver interface to - * AML mutex objects, and allows for transaction locking between - * drivers and AML code. The mutex node is pointed to by - * Handle:Pathname. Either Handle or Pathname can be NULL, but - * not both. - * - ******************************************************************************/ - -acpi_status -acpi_acquire_mutex(acpi_handle handle, acpi_string pathname, u16 timeout) -{ - acpi_status status; - union acpi_operand_object *mutex_obj; - - /* Get the low-level mutex associated with Handle:Pathname */ - - status = acpi_ut_get_mutex_object(handle, pathname, &mutex_obj); - if (ACPI_FAILURE(status)) { - return (status); - } - - /* Acquire the OS mutex */ - - status = acpi_os_acquire_mutex(mutex_obj->mutex.os_mutex, timeout); - return (status); -} - -/******************************************************************************* - * - * FUNCTION: acpi_release_mutex - * - * PARAMETERS: Handle - Mutex or prefix handle (optional) - * Pathname - Mutex pathname (optional) - * - * RETURN: Status - * - * DESCRIPTION: Release an AML mutex. This is a device driver interface to - * AML mutex objects, and allows for transaction locking between - * drivers and AML code. The mutex node is pointed to by - * Handle:Pathname. Either Handle or Pathname can be NULL, but - * not both. - * - ******************************************************************************/ - -acpi_status acpi_release_mutex(acpi_handle handle, acpi_string pathname) -{ - acpi_status status; - union acpi_operand_object *mutex_obj; - - /* Get the low-level mutex associated with Handle:Pathname */ - - status = acpi_ut_get_mutex_object(handle, pathname, &mutex_obj); - if (ACPI_FAILURE(status)) { - return (status); - } - - /* Release the OS mutex */ - - acpi_os_release_mutex(mutex_obj->mutex.os_mutex); - return (AE_OK); -} diff --git a/trunk/drivers/acpi/atomicio.c b/trunk/drivers/acpi/atomicio.c index cfc0cc10af39..1016f186c17c 100644 --- a/trunk/drivers/acpi/atomicio.c +++ b/trunk/drivers/acpi/atomicio.c @@ -260,6 +260,21 @@ int acpi_post_unmap_gar(struct acpi_generic_address *reg) } EXPORT_SYMBOL_GPL(acpi_post_unmap_gar); +#ifdef readq +static inline u64 read64(const volatile void __iomem *addr) +{ + return readq(addr); +} +#else +static inline u64 read64(const volatile void __iomem *addr) +{ + u64 l, h; + l = readl(addr); + h = readl(addr+4); + return l | (h << 32); +} +#endif + /* * Can be used in atomic (including NMI) or process context. RCU read * lock can only be released after the IO memory area accessing. @@ -280,11 +295,9 @@ static int acpi_atomic_read_mem(u64 paddr, u64 *val, u32 width) case 32: *val = readl(addr); break; -#ifdef readq case 64: - *val = readq(addr); + *val = read64(addr); break; -#endif default: return -EINVAL; } @@ -293,6 +306,19 @@ static int acpi_atomic_read_mem(u64 paddr, u64 *val, u32 width) return 0; } +#ifdef writeq +static inline void write64(u64 val, volatile void __iomem *addr) +{ + writeq(val, addr); +} +#else +static inline void write64(u64 val, volatile void __iomem *addr) +{ + writel(val, addr); + writel(val>>32, addr+4); +} +#endif + static int acpi_atomic_write_mem(u64 paddr, u64 val, u32 width) { void __iomem *addr; @@ -309,11 +335,9 @@ static int acpi_atomic_write_mem(u64 paddr, u64 val, u32 width) case 32: writel(val, addr); break; -#ifdef writeq case 64: - writeq(val, addr); + write64(val, addr); break; -#endif default: return -EINVAL; } diff --git a/trunk/drivers/acpi/osl.c b/trunk/drivers/acpi/osl.c index 3e57fbdf50a3..f31c5c5f1b7e 100644 --- a/trunk/drivers/acpi/osl.c +++ b/trunk/drivers/acpi/osl.c @@ -83,6 +83,19 @@ static struct workqueue_struct *kacpi_notify_wq; struct workqueue_struct *kacpi_hotplug_wq; EXPORT_SYMBOL(kacpi_hotplug_wq); +struct acpi_res_list { + resource_size_t start; + resource_size_t end; + acpi_adr_space_type resource_type; /* IO port, System memory, ...*/ + char name[5]; /* only can have a length of 4 chars, make use of this + one instead of res->name, no need to kalloc then */ + struct list_head resource_list; + int count; +}; + +static LIST_HEAD(resource_list_head); +static DEFINE_SPINLOCK(acpi_res_lock); + /* * This list of permanent mappings is for memory that may be accessed from * interrupt context, where we can't do the ioremap(). @@ -1265,28 +1278,44 @@ __setup("acpi_enforce_resources=", acpi_enforce_resources_setup); * drivers */ int acpi_check_resource_conflict(const struct resource *res) { - acpi_adr_space_type space_id; - acpi_size length; - u8 warn = 0; - int clash = 0; + struct acpi_res_list *res_list_elem; + int ioport = 0, clash = 0; if (acpi_enforce_resources == ENFORCE_RESOURCES_NO) return 0; if (!(res->flags & IORESOURCE_IO) && !(res->flags & IORESOURCE_MEM)) return 0; - if (res->flags & IORESOURCE_IO) - space_id = ACPI_ADR_SPACE_SYSTEM_IO; - else - space_id = ACPI_ADR_SPACE_SYSTEM_MEMORY; + ioport = res->flags & IORESOURCE_IO; + + spin_lock(&acpi_res_lock); + list_for_each_entry(res_list_elem, &resource_list_head, + resource_list) { + if (ioport && (res_list_elem->resource_type + != ACPI_ADR_SPACE_SYSTEM_IO)) + continue; + if (!ioport && (res_list_elem->resource_type + != ACPI_ADR_SPACE_SYSTEM_MEMORY)) + continue; - length = res->end - res->start + 1; - if (acpi_enforce_resources != ENFORCE_RESOURCES_NO) - warn = 1; - clash = acpi_check_address_range(space_id, res->start, length, warn); + if (res->end < res_list_elem->start + || res_list_elem->end < res->start) + continue; + clash = 1; + break; + } + spin_unlock(&acpi_res_lock); if (clash) { if (acpi_enforce_resources != ENFORCE_RESOURCES_NO) { + printk(KERN_WARNING "ACPI: resource %s %pR" + " conflicts with ACPI region %s " + "[%s 0x%zx-0x%zx]\n", + res->name, res, res_list_elem->name, + (res_list_elem->resource_type == + ACPI_ADR_SPACE_SYSTEM_IO) ? "io" : "mem", + (size_t) res_list_elem->start, + (size_t) res_list_elem->end); if (acpi_enforce_resources == ENFORCE_RESOURCES_LAX) printk(KERN_NOTICE "ACPI: This conflict may" " cause random problems and system" @@ -1438,6 +1467,155 @@ acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object) kmem_cache_free(cache, object); return (AE_OK); } + +static inline int acpi_res_list_add(struct acpi_res_list *res) +{ + struct acpi_res_list *res_list_elem; + + list_for_each_entry(res_list_elem, &resource_list_head, + resource_list) { + + if (res->resource_type == res_list_elem->resource_type && + res->start == res_list_elem->start && + res->end == res_list_elem->end) { + + /* + * The Region(addr,len) already exist in the list, + * just increase the count + */ + + res_list_elem->count++; + return 0; + } + } + + res->count = 1; + list_add(&res->resource_list, &resource_list_head); + return 1; +} + +static inline void acpi_res_list_del(struct acpi_res_list *res) +{ + struct acpi_res_list *res_list_elem; + + list_for_each_entry(res_list_elem, &resource_list_head, + resource_list) { + + if (res->resource_type == res_list_elem->resource_type && + res->start == res_list_elem->start && + res->end == res_list_elem->end) { + + /* + * If the res count is decreased to 0, + * remove and free it + */ + + if (--res_list_elem->count == 0) { + list_del(&res_list_elem->resource_list); + kfree(res_list_elem); + } + return; + } + } +} + +acpi_status +acpi_os_invalidate_address( + u8 space_id, + acpi_physical_address address, + acpi_size length) +{ + struct acpi_res_list res; + + switch (space_id) { + case ACPI_ADR_SPACE_SYSTEM_IO: + case ACPI_ADR_SPACE_SYSTEM_MEMORY: + /* Only interference checks against SystemIO and SystemMemory + are needed */ + res.start = address; + res.end = address + length - 1; + res.resource_type = space_id; + spin_lock(&acpi_res_lock); + acpi_res_list_del(&res); + spin_unlock(&acpi_res_lock); + break; + case ACPI_ADR_SPACE_PCI_CONFIG: + case ACPI_ADR_SPACE_EC: + case ACPI_ADR_SPACE_SMBUS: + case ACPI_ADR_SPACE_CMOS: + case ACPI_ADR_SPACE_PCI_BAR_TARGET: + case ACPI_ADR_SPACE_DATA_TABLE: + case ACPI_ADR_SPACE_FIXED_HARDWARE: + break; + } + return AE_OK; +} + +/****************************************************************************** + * + * FUNCTION: acpi_os_validate_address + * + * PARAMETERS: space_id - ACPI space ID + * address - Physical address + * length - Address length + * + * RETURN: AE_OK if address/length is valid for the space_id. Otherwise, + * should return AE_AML_ILLEGAL_ADDRESS. + * + * DESCRIPTION: Validate a system address via the host OS. Used to validate + * the addresses accessed by AML operation regions. + * + *****************************************************************************/ + +acpi_status +acpi_os_validate_address ( + u8 space_id, + acpi_physical_address address, + acpi_size length, + char *name) +{ + struct acpi_res_list *res; + int added; + if (acpi_enforce_resources == ENFORCE_RESOURCES_NO) + return AE_OK; + + switch (space_id) { + case ACPI_ADR_SPACE_SYSTEM_IO: + case ACPI_ADR_SPACE_SYSTEM_MEMORY: + /* Only interference checks against SystemIO and SystemMemory + are needed */ + res = kzalloc(sizeof(struct acpi_res_list), GFP_KERNEL); + if (!res) + return AE_OK; + /* ACPI names are fixed to 4 bytes, still better use strlcpy */ + strlcpy(res->name, name, 5); + res->start = address; + res->end = address + length - 1; + res->resource_type = space_id; + spin_lock(&acpi_res_lock); + added = acpi_res_list_add(res); + spin_unlock(&acpi_res_lock); + pr_debug("%s %s resource: start: 0x%llx, end: 0x%llx, " + "name: %s\n", added ? "Added" : "Already exist", + (space_id == ACPI_ADR_SPACE_SYSTEM_IO) + ? "SystemIO" : "System Memory", + (unsigned long long)res->start, + (unsigned long long)res->end, + res->name); + if (!added) + kfree(res); + break; + case ACPI_ADR_SPACE_PCI_CONFIG: + case ACPI_ADR_SPACE_EC: + case ACPI_ADR_SPACE_SMBUS: + case ACPI_ADR_SPACE_CMOS: + case ACPI_ADR_SPACE_PCI_BAR_TARGET: + case ACPI_ADR_SPACE_DATA_TABLE: + case ACPI_ADR_SPACE_FIXED_HARDWARE: + break; + } + return AE_OK; +} #endif acpi_status __init acpi_os_initialize(void) diff --git a/trunk/include/acpi/acnames.h b/trunk/include/acpi/acnames.h index 5b5af0d30a97..fc1575fd4596 100644 --- a/trunk/include/acpi/acnames.h +++ b/trunk/include/acpi/acnames.h @@ -58,7 +58,6 @@ #define METHOD_NAME__PRT "_PRT" #define METHOD_NAME__CRS "_CRS" #define METHOD_NAME__PRS "_PRS" -#define METHOD_NAME__AEI "_AEI" #define METHOD_NAME__PRW "_PRW" #define METHOD_NAME__SRS "_SRS" diff --git a/trunk/include/acpi/acpiosxf.h b/trunk/include/acpi/acpiosxf.h index 2fe8639b3ae7..83062ed0ef2f 100644 --- a/trunk/include/acpi/acpiosxf.h +++ b/trunk/include/acpi/acpiosxf.h @@ -238,6 +238,13 @@ acpi_os_write_pci_configuration(struct acpi_pci_id *pci_id, /* * Miscellaneous */ +acpi_status +acpi_os_validate_address(u8 space_id, acpi_physical_address address, + acpi_size length, char *name); +acpi_status +acpi_os_invalidate_address(u8 space_id, acpi_physical_address address, + acpi_size length); + u64 acpi_os_get_timer(void); acpi_status acpi_os_signal(u32 function, void *info); diff --git a/trunk/include/acpi/acpixf.h b/trunk/include/acpi/acpixf.h index dceeaf51d706..f554a9313b43 100644 --- a/trunk/include/acpi/acpixf.h +++ b/trunk/include/acpi/acpixf.h @@ -47,7 +47,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20120111 +#define ACPI_CA_VERSION 0x20110623 #include "actypes.h" #include "actbl.h" @@ -74,7 +74,6 @@ extern u8 acpi_gbl_disable_auto_repair; extern u32 acpi_current_gpe_count; extern struct acpi_table_fadt acpi_gbl_FADT; extern u8 acpi_gbl_system_awake_and_running; -extern u8 acpi_gbl_reduced_hardware; /* ACPI 5.0 */ extern u32 acpi_rsdt_forced; /* @@ -112,11 +111,6 @@ acpi_status acpi_install_interface(acpi_string interface_name); acpi_status acpi_remove_interface(acpi_string interface_name); -u32 -acpi_check_address_range(acpi_adr_space_type space_id, - acpi_physical_address address, - acpi_size length, u8 warn); - /* * ACPI Memory management */ @@ -282,23 +276,12 @@ acpi_status acpi_install_exception_handler(acpi_exception_handler handler); acpi_status acpi_install_interface_handler(acpi_interface_handler handler); /* - * Global Lock interfaces + * Event interfaces */ acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle); acpi_status acpi_release_global_lock(u32 handle); -/* - * Interfaces to AML mutex objects - */ -acpi_status -acpi_acquire_mutex(acpi_handle handle, acpi_string pathname, u16 timeout); - -acpi_status acpi_release_mutex(acpi_handle handle, acpi_string pathname); - -/* - * Fixed Event interfaces - */ acpi_status acpi_enable_event(u32 event, u32 flags); acpi_status acpi_disable_event(u32 event, u32 flags); @@ -308,7 +291,7 @@ acpi_status acpi_clear_event(u32 event); acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status); /* - * General Purpose Event (GPE) Interfaces + * GPE Interfaces */ acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number); @@ -362,10 +345,6 @@ acpi_status acpi_get_possible_resources(acpi_handle device, struct acpi_buffer *ret_buffer); #endif -acpi_status -acpi_get_event_resources(acpi_handle device_handle, - struct acpi_buffer *ret_buffer); - acpi_status acpi_walk_resources(acpi_handle device, char *name, @@ -381,11 +360,6 @@ acpi_status acpi_resource_to_address64(struct acpi_resource *resource, struct acpi_resource_address64 *out); -acpi_status -acpi_buffer_to_resource(u8 *aml_buffer, - u16 aml_buffer_length, - struct acpi_resource **resource_ptr); - /* * Hardware (ACPI device) interfaces */ diff --git a/trunk/include/acpi/acrestyp.h b/trunk/include/acpi/acrestyp.h index 3506e39a66b1..0a66cc45dd6b 100644 --- a/trunk/include/acpi/acrestyp.h +++ b/trunk/include/acpi/acrestyp.h @@ -61,14 +61,11 @@ typedef u32 acpi_rsdesc_size; /* Max Resource Descriptor size is (Length+3) = (6 #define ACPI_WRITE_COMBINING_MEMORY (u8) 0x02 #define ACPI_PREFETCHABLE_MEMORY (u8) 0x03 -/*! [Begin] no source code translation */ /* * IO Attributes - * The ISA IO ranges are: n000-n0FFh, n400-n4FFh, n800-n8FFh, nC00-nCFFh. - * The non-ISA IO ranges are: n100-n3FFh, n500-n7FFh, n900-nBFFh, nCD0-nFFFh. + * The ISA IO ranges are: n000-n0_fFh, n400-n4_fFh, n800-n8_fFh, n_c00-n_cFFh. + * The non-ISA IO ranges are: n100-n3_fFh, n500-n7_fFh, n900-n_bFFh, n_cd0-n_fFFh. */ -/*! [End] no source code translation !*/ - #define ACPI_NON_ISA_ONLY_RANGES (u8) 0x01 #define ACPI_ISA_ONLY_RANGES (u8) 0x02 #define ACPI_ENTIRE_RANGE (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES) @@ -84,26 +81,16 @@ typedef u32 acpi_rsdesc_size; /* Max Resource Descriptor size is (Length+3) = (6 #define ACPI_DECODE_16 (u8) 0x01 /* 16-bit IO address decode */ /* - * Interrupt attributes - used in multiple descriptors + * IRQ Attributes */ - -/* Triggering */ - #define ACPI_LEVEL_SENSITIVE (u8) 0x00 #define ACPI_EDGE_SENSITIVE (u8) 0x01 -/* Polarity */ - #define ACPI_ACTIVE_HIGH (u8) 0x00 #define ACPI_ACTIVE_LOW (u8) 0x01 -#define ACPI_ACTIVE_BOTH (u8) 0x02 - -/* Sharing */ #define ACPI_EXCLUSIVE (u8) 0x00 #define ACPI_SHARED (u8) 0x01 -#define ACPI_EXCLUSIVE_AND_WAKE (u8) 0x02 -#define ACPI_SHARED_AND_WAKE (u8) 0x03 /* * DMA Attributes @@ -140,8 +127,6 @@ typedef u32 acpi_rsdesc_size; /* Max Resource Descriptor size is (Length+3) = (6 #define ACPI_POS_DECODE (u8) 0x00 #define ACPI_SUB_DECODE (u8) 0x01 -/* Producer/Consumer */ - #define ACPI_PRODUCER (u8) 0x00 #define ACPI_CONSUMER (u8) 0x01 @@ -207,21 +192,6 @@ struct acpi_resource_fixed_io { u8 address_length; }; -struct acpi_resource_fixed_dma { - u16 request_lines; - u16 channels; - u8 width; -}; - -/* Values for Width field above */ - -#define ACPI_DMA_WIDTH8 0 -#define ACPI_DMA_WIDTH16 1 -#define ACPI_DMA_WIDTH32 2 -#define ACPI_DMA_WIDTH64 3 -#define ACPI_DMA_WIDTH128 4 -#define ACPI_DMA_WIDTH256 5 - struct acpi_resource_vendor { u16 byte_length; u8 byte_data[1]; @@ -359,166 +329,6 @@ struct acpi_resource_generic_register { u64 address; }; -struct acpi_resource_gpio { - u8 revision_id; - u8 connection_type; - u8 producer_consumer; /* For values, see Producer/Consumer above */ - u8 pin_config; - u8 sharable; /* For values, see Interrupt Attributes above */ - u8 io_restriction; - u8 triggering; /* For values, see Interrupt Attributes above */ - u8 polarity; /* For values, see Interrupt Attributes above */ - u16 drive_strength; - u16 debounce_timeout; - u16 pin_table_length; - u16 vendor_length; - struct acpi_resource_source resource_source; - u16 *pin_table; - u8 *vendor_data; -}; - -/* Values for GPIO connection_type field above */ - -#define ACPI_RESOURCE_GPIO_TYPE_INT 0 -#define ACPI_RESOURCE_GPIO_TYPE_IO 1 - -/* Values for pin_config field above */ - -#define ACPI_PIN_CONFIG_DEFAULT 0 -#define ACPI_PIN_CONFIG_PULLUP 1 -#define ACPI_PIN_CONFIG_PULLDOWN 2 -#define ACPI_PIN_CONFIG_NOPULL 3 - -/* Values for io_restriction field above */ - -#define ACPI_IO_RESTRICT_NONE 0 -#define ACPI_IO_RESTRICT_INPUT 1 -#define ACPI_IO_RESTRICT_OUTPUT 2 -#define ACPI_IO_RESTRICT_NONE_PRESERVE 3 - -/* Common structure for I2C, SPI, and UART serial descriptors */ - -#define ACPI_RESOURCE_SERIAL_COMMON \ - u8 revision_id; \ - u8 type; \ - u8 producer_consumer; /* For values, see Producer/Consumer above */\ - u8 slave_mode; \ - u8 type_revision_id; \ - u16 type_data_length; \ - u16 vendor_length; \ - struct acpi_resource_source resource_source; \ - u8 *vendor_data; - -struct acpi_resource_common_serialbus { -ACPI_RESOURCE_SERIAL_COMMON}; - -/* Values for the Type field above */ - -#define ACPI_RESOURCE_SERIAL_TYPE_I2C 1 -#define ACPI_RESOURCE_SERIAL_TYPE_SPI 2 -#define ACPI_RESOURCE_SERIAL_TYPE_UART 3 - -/* Values for slave_mode field above */ - -#define ACPI_CONTROLLER_INITIATED 0 -#define ACPI_DEVICE_INITIATED 1 - -struct acpi_resource_i2c_serialbus { - ACPI_RESOURCE_SERIAL_COMMON u8 access_mode; - u16 slave_address; - u32 connection_speed; -}; - -/* Values for access_mode field above */ - -#define ACPI_I2C_7BIT_MODE 0 -#define ACPI_I2C_10BIT_MODE 1 - -struct acpi_resource_spi_serialbus { - ACPI_RESOURCE_SERIAL_COMMON u8 wire_mode; - u8 device_polarity; - u8 data_bit_length; - u8 clock_phase; - u8 clock_polarity; - u16 device_selection; - u32 connection_speed; -}; - -/* Values for wire_mode field above */ - -#define ACPI_SPI_4WIRE_MODE 0 -#define ACPI_SPI_3WIRE_MODE 1 - -/* Values for device_polarity field above */ - -#define ACPI_SPI_ACTIVE_LOW 0 -#define ACPI_SPI_ACTIVE_HIGH 1 - -/* Values for clock_phase field above */ - -#define ACPI_SPI_FIRST_PHASE 0 -#define ACPI_SPI_SECOND_PHASE 1 - -/* Values for clock_polarity field above */ - -#define ACPI_SPI_START_LOW 0 -#define ACPI_SPI_START_HIGH 1 - -struct acpi_resource_uart_serialbus { - ACPI_RESOURCE_SERIAL_COMMON u8 endian; - u8 data_bits; - u8 stop_bits; - u8 flow_control; - u8 parity; - u8 lines_enabled; - u16 rx_fifo_size; - u16 tx_fifo_size; - u32 default_baud_rate; -}; - -/* Values for Endian field above */ - -#define ACPI_UART_LITTLE_ENDIAN 0 -#define ACPI_UART_BIG_ENDIAN 1 - -/* Values for data_bits field above */ - -#define ACPI_UART_5_DATA_BITS 0 -#define ACPI_UART_6_DATA_BITS 1 -#define ACPI_UART_7_DATA_BITS 2 -#define ACPI_UART_8_DATA_BITS 3 -#define ACPI_UART_9_DATA_BITS 4 - -/* Values for stop_bits field above */ - -#define ACPI_UART_NO_STOP_BITS 0 -#define ACPI_UART_1_STOP_BIT 1 -#define ACPI_UART_1P5_STOP_BITS 2 -#define ACPI_UART_2_STOP_BITS 3 - -/* Values for flow_control field above */ - -#define ACPI_UART_FLOW_CONTROL_NONE 0 -#define ACPI_UART_FLOW_CONTROL_HW 1 -#define ACPI_UART_FLOW_CONTROL_XON_XOFF 2 - -/* Values for Parity field above */ - -#define ACPI_UART_PARITY_NONE 0 -#define ACPI_UART_PARITY_EVEN 1 -#define ACPI_UART_PARITY_ODD 2 -#define ACPI_UART_PARITY_MARK 3 -#define ACPI_UART_PARITY_SPACE 4 - -/* Values for lines_enabled bitfield above */ - -#define ACPI_UART_CARRIER_DETECT (1<<2) -#define ACPI_UART_RING_INDICATOR (1<<3) -#define ACPI_UART_DATA_SET_READY (1<<4) -#define ACPI_UART_DATA_TERMINAL_READY (1<<5) -#define ACPI_UART_CLEAR_TO_SEND (1<<6) -#define ACPI_UART_REQUEST_TO_SEND (1<<7) - /* ACPI_RESOURCE_TYPEs */ #define ACPI_RESOURCE_TYPE_IRQ 0 @@ -538,10 +348,7 @@ struct acpi_resource_uart_serialbus { #define ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 14 /* ACPI 3.0 */ #define ACPI_RESOURCE_TYPE_EXTENDED_IRQ 15 #define ACPI_RESOURCE_TYPE_GENERIC_REGISTER 16 -#define ACPI_RESOURCE_TYPE_GPIO 17 /* ACPI 5.0 */ -#define ACPI_RESOURCE_TYPE_FIXED_DMA 18 /* ACPI 5.0 */ -#define ACPI_RESOURCE_TYPE_SERIAL_BUS 19 /* ACPI 5.0 */ -#define ACPI_RESOURCE_TYPE_MAX 19 +#define ACPI_RESOURCE_TYPE_MAX 16 /* Master union for resource descriptors */ @@ -551,7 +358,6 @@ union acpi_resource_data { struct acpi_resource_start_dependent start_dpf; struct acpi_resource_io io; struct acpi_resource_fixed_io fixed_io; - struct acpi_resource_fixed_dma fixed_dma; struct acpi_resource_vendor vendor; struct acpi_resource_vendor_typed vendor_typed; struct acpi_resource_end_tag end_tag; @@ -564,11 +370,6 @@ union acpi_resource_data { struct acpi_resource_extended_address64 ext_address64; struct acpi_resource_extended_irq extended_irq; struct acpi_resource_generic_register generic_reg; - struct acpi_resource_gpio gpio; - struct acpi_resource_i2c_serialbus i2c_serial_bus; - struct acpi_resource_spi_serialbus spi_serial_bus; - struct acpi_resource_uart_serialbus uart_serial_bus; - struct acpi_resource_common_serialbus common_serial_bus; /* Common fields */ diff --git a/trunk/include/acpi/actbl.h b/trunk/include/acpi/actbl.h index 8e1b92f6f650..f1380287ed4d 100644 --- a/trunk/include/acpi/actbl.h +++ b/trunk/include/acpi/actbl.h @@ -255,8 +255,6 @@ struct acpi_table_fadt { struct acpi_generic_address xpm_timer_block; /* 64-bit Extended Power Mgt Timer Ctrl Reg Blk address */ struct acpi_generic_address xgpe0_block; /* 64-bit Extended General Purpose Event 0 Reg Blk address */ struct acpi_generic_address xgpe1_block; /* 64-bit Extended General Purpose Event 1 Reg Blk address */ - struct acpi_generic_address sleep_control; /* 64-bit Sleep Control register */ - struct acpi_generic_address sleep_status; /* 64-bit Sleep Status register */ }; /* Masks for FADT Boot Architecture Flags (boot_flags) */ @@ -266,7 +264,6 @@ struct acpi_table_fadt { #define ACPI_FADT_NO_VGA (1<<2) /* 02: [V4] It is not safe to probe for VGA hardware */ #define ACPI_FADT_NO_MSI (1<<3) /* 03: [V4] Message Signaled Interrupts (MSI) must not be enabled */ #define ACPI_FADT_NO_ASPM (1<<4) /* 04: [V4] PCIe ASPM control must not be enabled */ -#define ACPI_FADT_NO_CMOS_RTC (1<<5) /* 05: [V5] No CMOS real-time clock present */ #define FADT2_REVISION_ID 3 @@ -292,8 +289,6 @@ struct acpi_table_fadt { #define ACPI_FADT_REMOTE_POWER_ON (1<<17) /* 17: [V4] System is compatible with remote power on (ACPI 3.0) */ #define ACPI_FADT_APIC_CLUSTER (1<<18) /* 18: [V4] All local APICs must use cluster model (ACPI 3.0) */ #define ACPI_FADT_APIC_PHYSICAL (1<<19) /* 19: [V4] All local x_aPICs must use physical dest mode (ACPI 3.0) */ -#define ACPI_FADT_HW_REDUCED (1<<20) /* 20: [V5] ACPI hardware is not implemented (ACPI 5.0) */ -#define ACPI_FADT_LOW_POWER_S0 (1<<21) /* 21: [V5] S0 power savings are equal or better than S3 (ACPI 5.0) */ /* Values for preferred_profile (Preferred Power Management Profiles) */ @@ -304,16 +299,14 @@ enum acpi_prefered_pm_profiles { PM_WORKSTATION = 3, PM_ENTERPRISE_SERVER = 4, PM_SOHO_SERVER = 5, - PM_APPLIANCE_PC = 6, - PM_PERFORMANCE_SERVER = 7, - PM_TABLET = 8 + PM_APPLIANCE_PC = 6 }; /* Reset to default packing */ #pragma pack() -#define ACPI_FADT_OFFSET(f) (u16) ACPI_OFFSET (struct acpi_table_fadt, f) +#define ACPI_FADT_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_table_fadt, f) /* * Internal table-related structures @@ -349,7 +342,6 @@ struct acpi_table_desc { #include #include -#include /* * Sizes of the various flavors of FADT. We need to look closely @@ -359,15 +351,12 @@ struct acpi_table_desc { * FADT is the bottom line as to what the version really is. * * For reference, the values below are as follows: - * FADT V1 size: 0x074 - * FADT V2 size: 0x084 - * FADT V3 size: 0x0F4 - * FADT V4 size: 0x0F4 - * FADT V5 size: 0x10C + * FADT V1 size: 0x74 + * FADT V2 size: 0x84 + * FADT V3+ size: 0xF4 */ #define ACPI_FADT_V1_SIZE (u32) (ACPI_FADT_OFFSET (flags) + 4) #define ACPI_FADT_V2_SIZE (u32) (ACPI_FADT_OFFSET (reserved4[0]) + 3) -#define ACPI_FADT_V3_SIZE (u32) (ACPI_FADT_OFFSET (sleep_control)) -#define ACPI_FADT_V5_SIZE (u32) (sizeof (struct acpi_table_fadt)) +#define ACPI_FADT_V3_SIZE (u32) (sizeof (struct acpi_table_fadt)) #endif /* __ACTBL_H__ */ diff --git a/trunk/include/acpi/actbl1.h b/trunk/include/acpi/actbl1.h index 71e747beac8f..7504bc99b29b 100644 --- a/trunk/include/acpi/actbl1.h +++ b/trunk/include/acpi/actbl1.h @@ -228,8 +228,7 @@ enum acpi_einj_actions { ACPI_EINJ_EXECUTE_OPERATION = 5, ACPI_EINJ_CHECK_BUSY_STATUS = 6, ACPI_EINJ_GET_COMMAND_STATUS = 7, - ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS = 8, - ACPI_EINJ_ACTION_RESERVED = 9, /* 9 and greater are reserved */ + ACPI_EINJ_ACTION_RESERVED = 8, /* 8 and greater are reserved */ ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */ }; @@ -241,27 +240,7 @@ enum acpi_einj_instructions { ACPI_EINJ_WRITE_REGISTER = 2, ACPI_EINJ_WRITE_REGISTER_VALUE = 3, ACPI_EINJ_NOOP = 4, - ACPI_EINJ_FLUSH_CACHELINE = 5, - ACPI_EINJ_INSTRUCTION_RESERVED = 6 /* 6 and greater are reserved */ -}; - -struct acpi_einj_error_type_with_addr { - u32 error_type; - u32 vendor_struct_offset; - u32 flags; - u32 apic_id; - u64 address; - u64 range; - u32 pcie_id; -}; - -struct acpi_einj_vendor { - u32 length; - u32 pcie_id; - u16 vendor_id; - u16 device_id; - u8 revision_id; - u8 reserved[3]; + ACPI_EINJ_INSTRUCTION_RESERVED = 5 /* 5 and greater are reserved */ }; /* EINJ Trigger Error Action Table */ @@ -296,7 +275,6 @@ enum acpi_einj_command_status { #define ACPI_EINJ_PLATFORM_CORRECTABLE (1<<9) #define ACPI_EINJ_PLATFORM_UNCORRECTABLE (1<<10) #define ACPI_EINJ_PLATFORM_FATAL (1<<11) -#define ACPI_EINJ_VENDOR_DEFINED (1<<31) /******************************************************************************* * @@ -653,9 +631,7 @@ enum acpi_madt_type { ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8, ACPI_MADT_TYPE_LOCAL_X2APIC = 9, ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10, - ACPI_MADT_TYPE_GENERIC_INTERRUPT = 11, - ACPI_MADT_TYPE_GENERIC_DISTRIBUTOR = 12, - ACPI_MADT_TYPE_RESERVED = 13 /* 13 and greater are reserved */ + ACPI_MADT_TYPE_RESERVED = 11 /* 11 and greater are reserved */ }; /* @@ -776,36 +752,11 @@ struct acpi_madt_local_x2apic_nmi { u8 reserved[3]; }; -/* 11: Generic Interrupt (ACPI 5.0) */ - -struct acpi_madt_generic_interrupt { - struct acpi_subtable_header header; - u16 reserved; /* Reserved - must be zero */ - u32 gic_id; - u32 uid; - u32 flags; - u32 parking_version; - u32 performance_interrupt; - u64 parked_address; - u64 base_address; -}; - -/* 12: Generic Distributor (ACPI 5.0) */ - -struct acpi_madt_generic_distributor { - struct acpi_subtable_header header; - u16 reserved; /* Reserved - must be zero */ - u32 gic_id; - u64 base_address; - u32 global_irq_base; - u32 reserved2; /* Reserved - must be zero */ -}; - /* * Common flags fields for MADT subtables */ -/* MADT Local APIC flags (lapic_flags) and GIC flags */ +/* MADT Local APIC flags (lapic_flags) */ #define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */ diff --git a/trunk/include/acpi/actbl3.h b/trunk/include/acpi/actbl3.h deleted file mode 100644 index c22ce80e9535..000000000000 --- a/trunk/include/acpi/actbl3.h +++ /dev/null @@ -1,552 +0,0 @@ -/****************************************************************************** - * - * Name: actbl3.h - ACPI Table Definitions - * - *****************************************************************************/ - -/* - * Copyright (C) 2000 - 2011, Intel Corp. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions, and the following disclaimer, - * without modification. - * 2. Redistributions in binary form must reproduce at minimum a disclaimer - * substantially similar to the "NO WARRANTY" disclaimer below - * ("Disclaimer") and any redistribution must be conditioned upon - * including a substantially similar Disclaimer requirement for further - * binary redistribution. - * 3. Neither the names of the above-listed copyright holders nor the names - * of any contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * Alternatively, this software may be distributed under the terms of the - * GNU General Public License ("GPL") version 2 as published by the Free - * Software Foundation. - * - * NO WARRANTY - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - */ - -#ifndef __ACTBL3_H__ -#define __ACTBL3_H__ - -/******************************************************************************* - * - * Additional ACPI Tables (3) - * - * These tables are not consumed directly by the ACPICA subsystem, but are - * included here to support device drivers and the AML disassembler. - * - * The tables in this file are fully defined within the ACPI specification. - * - ******************************************************************************/ - -/* - * Values for description table header signatures for tables defined in this - * file. Useful because they make it more difficult to inadvertently type in - * the wrong signature. - */ -#define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */ -#define ACPI_SIG_DRTM "DRTM" /* Dynamic Root of Trust for Measurement table */ -#define ACPI_SIG_FPDT "FPDT" /* Firmware Performance Data Table */ -#define ACPI_SIG_GTDT "GTDT" /* Generic Timer Description Table */ -#define ACPI_SIG_MPST "MPST" /* Memory Power State Table */ -#define ACPI_SIG_PCCT "PCCT" /* Platform Communications Channel Table */ -#define ACPI_SIG_PMTT "PMTT" /* Platform Memory Topology Table */ -#define ACPI_SIG_RASF "RASF" /* RAS Feature table */ - -#define ACPI_SIG_S3PT "S3PT" /* S3 Performance (sub)Table */ -#define ACPI_SIG_PCCS "PCC" /* PCC Shared Memory Region */ - -/* Reserved table signatures */ - -#define ACPI_SIG_CSRT "CSRT" /* Core System Resources Table */ -#define ACPI_SIG_DBG2 "DBG2" /* Debug Port table 2 */ -#define ACPI_SIG_MATR "MATR" /* Memory Address Translation Table */ -#define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */ -#define ACPI_SIG_WPBT "WPBT" /* Windows Platform Binary Table */ - -/* - * All tables must be byte-packed to match the ACPI specification, since - * the tables are provided by the system BIOS. - */ -#pragma pack(1) - -/* - * Note about bitfields: The u8 type is used for bitfields in ACPI tables. - * This is the only type that is even remotely portable. Anything else is not - * portable, so do not use any other bitfield types. - */ - -/******************************************************************************* - * - * BGRT - Boot Graphics Resource Table (ACPI 5.0) - * Version 1 - * - ******************************************************************************/ - -struct acpi_table_bgrt { - struct acpi_table_header header; /* Common ACPI table header */ - u16 version; - u8 status; - u8 image_type; - u64 image_address; - u32 image_offset_x; - u32 image_offset_y; -}; - -/******************************************************************************* - * - * DRTM - Dynamic Root of Trust for Measurement table - * - ******************************************************************************/ - -struct acpi_table_drtm { - struct acpi_table_header header; /* Common ACPI table header */ - u64 entry_base_address; - u64 entry_length; - u32 entry_address32; - u64 entry_address64; - u64 exit_address; - u64 log_area_address; - u32 log_area_length; - u64 arch_dependent_address; - u32 flags; -}; - -/* 1) Validated Tables List */ - -struct acpi_drtm_vtl_list { - u32 validated_table_list_count; -}; - -/* 2) Resources List */ - -struct acpi_drtm_resource_list { - u32 resource_list_count; -}; - -/* 3) Platform-specific Identifiers List */ - -struct acpi_drtm_id_list { - u32 id_list_count; -}; - -/******************************************************************************* - * - * FPDT - Firmware Performance Data Table (ACPI 5.0) - * Version 1 - * - ******************************************************************************/ - -struct acpi_table_fpdt { - struct acpi_table_header header; /* Common ACPI table header */ -}; - -/* FPDT subtable header */ - -struct acpi_fpdt_header { - u16 type; - u8 length; - u8 revision; -}; - -/* Values for Type field above */ - -enum acpi_fpdt_type { - ACPI_FPDT_TYPE_BOOT = 0, - ACPI_FPDT_TYPE_S3PERF = 1, -}; - -/* - * FPDT subtables - */ - -/* 0: Firmware Basic Boot Performance Record */ - -struct acpi_fpdt_boot { - struct acpi_fpdt_header header; - u8 reserved[4]; - u64 reset_end; - u64 load_start; - u64 startup_start; - u64 exit_services_entry; - u64 exit_services_exit; -}; - -/* 1: S3 Performance Table Pointer Record */ - -struct acpi_fpdt_s3pt_ptr { - struct acpi_fpdt_header header; - u8 reserved[4]; - u64 address; -}; - -/* - * S3PT - S3 Performance Table. This table is pointed to by the - * FPDT S3 Pointer Record above. - */ -struct acpi_table_s3pt { - u8 signature[4]; /* "S3PT" */ - u32 length; -}; - -/* - * S3PT Subtables - */ -struct acpi_s3pt_header { - u16 type; - u8 length; - u8 revision; -}; - -/* Values for Type field above */ - -enum acpi_s3pt_type { - ACPI_S3PT_TYPE_RESUME = 0, - ACPI_S3PT_TYPE_SUSPEND = 1, -}; - -struct acpi_s3pt_resume { - struct acpi_s3pt_header header; - u32 resume_count; - u64 full_resume; - u64 average_resume; -}; - -struct acpi_s3pt_suspend { - struct acpi_s3pt_header header; - u64 suspend_start; - u64 suspend_end; -}; - -/******************************************************************************* - * - * GTDT - Generic Timer Description Table (ACPI 5.0) - * Version 1 - * - ******************************************************************************/ - -struct acpi_table_gtdt { - struct acpi_table_header header; /* Common ACPI table header */ - u64 address; - u32 flags; - u32 secure_pl1_interrupt; - u32 secure_pl1_flags; - u32 non_secure_pl1_interrupt; - u32 non_secure_pl1_flags; - u32 virtual_timer_interrupt; - u32 virtual_timer_flags; - u32 non_secure_pl2_interrupt; - u32 non_secure_pl2_flags; -}; - -/* Values for Flags field above */ - -#define ACPI_GTDT_MAPPED_BLOCK_PRESENT 1 - -/* Values for all "TimerFlags" fields above */ - -#define ACPI_GTDT_INTERRUPT_MODE 1 -#define ACPI_GTDT_INTERRUPT_POLARITY 2 - -/******************************************************************************* - * - * MPST - Memory Power State Table (ACPI 5.0) - * Version 1 - * - ******************************************************************************/ - -#define ACPI_MPST_CHANNEL_INFO \ - u16 reserved1; \ - u8 channel_id; \ - u8 reserved2; \ - u16 power_node_count; - -/* Main table */ - -struct acpi_table_mpst { - struct acpi_table_header header; /* Common ACPI table header */ - ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */ -}; - -/* Memory Platform Communication Channel Info */ - -struct acpi_mpst_channel { - ACPI_MPST_CHANNEL_INFO /* Platform Communication Channel */ -}; - -/* Memory Power Node Structure */ - -struct acpi_mpst_power_node { - u8 flags; - u8 reserved1; - u16 node_id; - u32 length; - u64 range_address; - u64 range_length; - u8 num_power_states; - u8 num_physical_components; - u16 reserved2; -}; - -/* Values for Flags field above */ - -#define ACPI_MPST_ENABLED 1 -#define ACPI_MPST_POWER_MANAGED 2 -#define ACPI_MPST_HOT_PLUG_CAPABLE 4 - -/* Memory Power State Structure (follows POWER_NODE above) */ - -struct acpi_mpst_power_state { - u8 power_state; - u8 info_index; -}; - -/* Physical Component ID Structure (follows POWER_STATE above) */ - -struct acpi_mpst_component { - u16 component_id; -}; - -/* Memory Power State Characteristics Structure (follows all POWER_NODEs) */ - -struct acpi_mpst_data_hdr { - u16 characteristics_count; -}; - -struct acpi_mpst_power_data { - u8 revision; - u8 flags; - u16 reserved1; - u32 average_power; - u32 power_saving; - u64 exit_latency; - u64 reserved2; -}; - -/* Values for Flags field above */ - -#define ACPI_MPST_PRESERVE 1 -#define ACPI_MPST_AUTOENTRY 2 -#define ACPI_MPST_AUTOEXIT 4 - -/* Shared Memory Region (not part of an ACPI table) */ - -struct acpi_mpst_shared { - u32 signature; - u16 pcc_command; - u16 pcc_status; - u16 command_register; - u16 status_register; - u16 power_state_id; - u16 power_node_id; - u64 energy_consumed; - u64 average_power; -}; - -/******************************************************************************* - * - * PCCT - Platform Communications Channel Table (ACPI 5.0) - * Version 1 - * - ******************************************************************************/ - -struct acpi_table_pcct { - struct acpi_table_header header; /* Common ACPI table header */ - u32 flags; - u32 latency; - u32 reserved; -}; - -/* Values for Flags field above */ - -#define ACPI_PCCT_DOORBELL 1 - -/* - * PCCT subtables - */ - -/* 0: Generic Communications Subspace */ - -struct acpi_pcct_subspace { - struct acpi_subtable_header header; - u8 reserved[6]; - u64 base_address; - u64 length; - struct acpi_generic_address doorbell_register; - u64 preserve_mask; - u64 write_mask; -}; - -/* - * PCC memory structures (not part of the ACPI table) - */ - -/* Shared Memory Region */ - -struct acpi_pcct_shared_memory { - u32 signature; - u16 command; - u16 status; -}; - -/******************************************************************************* - * - * PMTT - Platform Memory Topology Table (ACPI 5.0) - * Version 1 - * - ******************************************************************************/ - -struct acpi_table_pmtt { - struct acpi_table_header header; /* Common ACPI table header */ - u32 reserved; -}; - -/* Common header for PMTT subtables that follow main table */ - -struct acpi_pmtt_header { - u8 type; - u8 reserved1; - u16 length; - u16 flags; - u16 reserved2; -}; - -/* Values for Type field above */ - -#define ACPI_PMTT_TYPE_SOCKET 0 -#define ACPI_PMTT_TYPE_CONTROLLER 1 -#define ACPI_PMTT_TYPE_DIMM 2 -#define ACPI_PMTT_TYPE_RESERVED 3 /* 0x03-0xFF are reserved */ - -/* Values for Flags field above */ - -#define ACPI_PMTT_TOP_LEVEL 0x0001 -#define ACPI_PMTT_PHYSICAL 0x0002 -#define ACPI_PMTT_MEMORY_TYPE 0x000C - -/* - * PMTT subtables, correspond to Type in struct acpi_pmtt_header - */ - -/* 0: Socket Structure */ - -struct acpi_pmtt_socket { - struct acpi_pmtt_header header; - u16 socket_id; - u16 reserved; -}; - -/* 1: Memory Controller subtable */ - -struct acpi_pmtt_controller { - struct acpi_pmtt_header header; - u32 read_latency; - u32 write_latency; - u32 read_bandwidth; - u32 write_bandwidth; - u16 access_width; - u16 alignment; - u16 reserved; - u16 domain_count; -}; - -/* 1a: Proximity Domain substructure */ - -struct acpi_pmtt_domain { - u32 proximity_domain; -}; - -/* 2: Physical Component Identifier (DIMM) */ - -struct acpi_pmtt_physical_component { - struct acpi_pmtt_header header; - u16 component_id; - u16 reserved; - u32 memory_size; - u32 bios_handle; -}; - -/******************************************************************************* - * - * RASF - RAS Feature Table (ACPI 5.0) - * Version 1 - * - ******************************************************************************/ - -struct acpi_table_rasf { - struct acpi_table_header header; /* Common ACPI table header */ - u8 channel_id[12]; -}; - -/* RASF Platform Communication Channel Shared Memory Region */ - -struct acpi_rasf_shared_memory { - u32 signature; - u16 command; - u16 status; - u64 requested_address; - u64 requested_length; - u64 actual_address; - u64 actual_length; - u16 flags; - u8 speed; -}; - -/* Masks for Flags and Speed fields above */ - -#define ACPI_RASF_SCRUBBER_RUNNING 1 -#define ACPI_RASF_SPEED (7<<1) - -/* Channel Commands */ - -enum acpi_rasf_commands { - ACPI_RASF_GET_RAS_CAPABILITIES = 1, - ACPI_RASF_GET_PATROL_PARAMETERS = 2, - ACPI_RASF_START_PATROL_SCRUBBER = 3, - ACPI_RASF_STOP_PATROL_SCRUBBER = 4 -}; - -/* Channel Command flags */ - -#define ACPI_RASF_GENERATE_SCI (1<<15) - -/* Status values */ - -enum acpi_rasf_status { - ACPI_RASF_SUCCESS = 0, - ACPI_RASF_NOT_VALID = 1, - ACPI_RASF_NOT_SUPPORTED = 2, - ACPI_RASF_BUSY = 3, - ACPI_RASF_FAILED = 4, - ACPI_RASF_ABORTED = 5, - ACPI_RASF_INVALID_DATA = 6 -}; - -/* Status flags */ - -#define ACPI_RASF_COMMAND_COMPLETE (1) -#define ACPI_RASF_SCI_DOORBELL (1<<1) -#define ACPI_RASF_ERROR (1<<2) -#define ACPI_RASF_STATUS (0x1F<<3) - -/* Reset to default packing */ - -#pragma pack() - -#endif /* __ACTBL3_H__ */ diff --git a/trunk/include/acpi/actypes.h b/trunk/include/acpi/actypes.h index d5dee7ce9474..ed73f6705c86 100644 --- a/trunk/include/acpi/actypes.h +++ b/trunk/include/acpi/actypes.h @@ -712,10 +712,8 @@ typedef u8 acpi_adr_space_type; #define ACPI_ADR_SPACE_CMOS (acpi_adr_space_type) 5 #define ACPI_ADR_SPACE_PCI_BAR_TARGET (acpi_adr_space_type) 6 #define ACPI_ADR_SPACE_IPMI (acpi_adr_space_type) 7 -#define ACPI_ADR_SPACE_GPIO (acpi_adr_space_type) 8 -#define ACPI_ADR_SPACE_GSBUS (acpi_adr_space_type) 9 -#define ACPI_NUM_PREDEFINED_REGIONS 10 +#define ACPI_NUM_PREDEFINED_REGIONS 8 /* * Special Address Spaces @@ -959,14 +957,6 @@ acpi_status(*acpi_adr_space_handler) (u32 function, #define ACPI_DEFAULT_HANDLER NULL -/* Special Context data for generic_serial_bus/general_purpose_io (ACPI 5.0) */ - -struct acpi_connection_info { - u8 *connection; - u16 length; - u8 access_length; -}; - typedef acpi_status(*acpi_adr_space_setup) (acpi_handle region_handle, u32 function,