Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:24:03

0001 /*******************************************************************************
0002  *
0003  * Module Name: rsserial - GPIO/SerialBus resource descriptors
0004  *
0005  ******************************************************************************/
0006 
0007 /******************************************************************************
0008  *
0009  * 1. Copyright Notice
0010  *
0011  * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp.
0012  * All rights reserved.
0013  *
0014  * 2. License
0015  *
0016  * 2.1. This is your license from Intel Corp. under its intellectual property
0017  * rights. You may have additional license terms from the party that provided
0018  * you this software, covering your right to use that party's intellectual
0019  * property rights.
0020  *
0021  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
0022  * copy of the source code appearing in this file ("Covered Code") an
0023  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
0024  * base code distributed originally by Intel ("Original Intel Code") to copy,
0025  * make derivatives, distribute, use and display any portion of the Covered
0026  * Code in any form, with the right to sublicense such rights; and
0027  *
0028  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
0029  * license (with the right to sublicense), under only those claims of Intel
0030  * patents that are infringed by the Original Intel Code, to make, use, sell,
0031  * offer to sell, and import the Covered Code and derivative works thereof
0032  * solely to the minimum extent necessary to exercise the above copyright
0033  * license, and in no event shall the patent license extend to any additions
0034  * to or modifications of the Original Intel Code. No other license or right
0035  * is granted directly or by implication, estoppel or otherwise;
0036  *
0037  * The above copyright and patent license is granted only if the following
0038  * conditions are met:
0039  *
0040  * 3. Conditions
0041  *
0042  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
0043  * Redistribution of source code of any substantial portion of the Covered
0044  * Code or modification with rights to further distribute source must include
0045  * the above Copyright Notice, the above License, this list of Conditions,
0046  * and the following Disclaimer and Export Compliance provision. In addition,
0047  * Licensee must cause all Covered Code to which Licensee contributes to
0048  * contain a file documenting the changes Licensee made to create that Covered
0049  * Code and the date of any change. Licensee must include in that file the
0050  * documentation of any changes made by any predecessor Licensee. Licensee
0051  * must include a prominent statement that the modification is derived,
0052  * directly or indirectly, from Original Intel Code.
0053  *
0054  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
0055  * Redistribution of source code of any substantial portion of the Covered
0056  * Code or modification without rights to further distribute source must
0057  * include the following Disclaimer and Export Compliance provision in the
0058  * documentation and/or other materials provided with distribution. In
0059  * addition, Licensee may not authorize further sublicense of source of any
0060  * portion of the Covered Code, and must include terms to the effect that the
0061  * license from Licensee to its licensee is limited to the intellectual
0062  * property embodied in the software Licensee provides to its licensee, and
0063  * not to intellectual property embodied in modifications its licensee may
0064  * make.
0065  *
0066  * 3.3. Redistribution of Executable. Redistribution in executable form of any
0067  * substantial portion of the Covered Code or modification must reproduce the
0068  * above Copyright Notice, and the following Disclaimer and Export Compliance
0069  * provision in the documentation and/or other materials provided with the
0070  * distribution.
0071  *
0072  * 3.4. Intel retains all right, title, and interest in and to the Original
0073  * Intel Code.
0074  *
0075  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
0076  * Intel shall be used in advertising or otherwise to promote the sale, use or
0077  * other dealings in products derived from or relating to the Covered Code
0078  * without prior written authorization from Intel.
0079  *
0080  * 4. Disclaimer and Export Compliance
0081  *
0082  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
0083  * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
0084  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
0085  * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
0086  * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
0087  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
0088  * PARTICULAR PURPOSE.
0089  *
0090  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
0091  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
0092  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
0093  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
0094  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
0095  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
0096  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
0097  * LIMITED REMEDY.
0098  *
0099  * 4.3. Licensee shall not export, either directly or indirectly, any of this
0100  * software or system incorporating such software without first obtaining any
0101  * required license or other approval from the U. S. Department of Commerce or
0102  * any other agency or department of the United States Government. In the
0103  * event Licensee exports any such software from the United States or
0104  * re-exports any such software from a foreign destination, Licensee shall
0105  * ensure that the distribution and export/re-export of the software is in
0106  * compliance with all laws, regulations, orders, or other restrictions of the
0107  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
0108  * any of its subsidiaries will export/re-export any technical data, process,
0109  * software, or service, directly or indirectly, to any country for which the
0110  * United States government or any agency thereof requires an export license,
0111  * other governmental approval, or letter of assurance, without first obtaining
0112  * such license, approval or letter.
0113  *
0114  *****************************************************************************
0115  *
0116  * Alternatively, you may choose to be licensed under the terms of the
0117  * following license:
0118  *
0119  * Redistribution and use in source and binary forms, with or without
0120  * modification, are permitted provided that the following conditions
0121  * are met:
0122  * 1. Redistributions of source code must retain the above copyright
0123  *    notice, this list of conditions, and the following disclaimer,
0124  *    without modification.
0125  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
0126  *    substantially similar to the "NO WARRANTY" disclaimer below
0127  *    ("Disclaimer") and any redistribution must be conditioned upon
0128  *    including a substantially similar Disclaimer requirement for further
0129  *    binary redistribution.
0130  * 3. Neither the names of the above-listed copyright holders nor the names
0131  *    of any contributors may be used to endorse or promote products derived
0132  *    from this software without specific prior written permission.
0133  *
0134  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
0135  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
0136  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
0137  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
0138  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
0139  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
0140  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
0141  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
0142  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0143  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
0144  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0145  *
0146  * Alternatively, you may choose to be licensed under the terms of the
0147  * GNU General Public License ("GPL") version 2 as published by the Free
0148  * Software Foundation.
0149  *
0150  *****************************************************************************/
0151 
0152 #include "acpi.h"
0153 #include "accommon.h"
0154 #include "acresrc.h"
0155 
0156 #define _COMPONENT          ACPI_RESOURCES
0157         ACPI_MODULE_NAME    ("rsserial")
0158 
0159 
0160 /*******************************************************************************
0161  *
0162  * AcpiRsConvertGpio
0163  *
0164  ******************************************************************************/
0165 
0166 ACPI_RSCONVERT_INFO     AcpiRsConvertGpio[18] =
0167 {
0168     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_GPIO,
0169                         ACPI_RS_SIZE (ACPI_RESOURCE_GPIO),
0170                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertGpio)},
0171 
0172     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_GPIO,
0173                         sizeof (AML_RESOURCE_GPIO),
0174                         0},
0175 
0176     /*
0177      * These fields are contiguous in both the source and destination:
0178      * RevisionId
0179      * ConnectionType
0180      */
0181     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.Gpio.RevisionId),
0182                         AML_OFFSET (Gpio.RevisionId),
0183                         2},
0184 
0185     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.ProducerConsumer),
0186                         AML_OFFSET (Gpio.Flags),
0187                         0},
0188 
0189     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.Shareable),
0190                         AML_OFFSET (Gpio.IntFlags),
0191                         3},
0192 
0193     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.WakeCapable),
0194                         AML_OFFSET (Gpio.IntFlags),
0195                         4},
0196 
0197     {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.Gpio.IoRestriction),
0198                         AML_OFFSET (Gpio.IntFlags),
0199                         0},
0200 
0201     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.Triggering),
0202                         AML_OFFSET (Gpio.IntFlags),
0203                         0},
0204 
0205     {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.Gpio.Polarity),
0206                         AML_OFFSET (Gpio.IntFlags),
0207                         1},
0208 
0209     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.Gpio.PinConfig),
0210                         AML_OFFSET (Gpio.PinConfig),
0211                         1},
0212 
0213     /*
0214      * These fields are contiguous in both the source and destination:
0215      * DriveStrength
0216      * DebounceTimeout
0217      */
0218     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.Gpio.DriveStrength),
0219                         AML_OFFSET (Gpio.DriveStrength),
0220                         2},
0221 
0222     /* Pin Table */
0223 
0224     {ACPI_RSC_COUNT_GPIO_PIN, ACPI_RS_OFFSET (Data.Gpio.PinTableLength),
0225                         AML_OFFSET (Gpio.PinTableOffset),
0226                         AML_OFFSET (Gpio.ResSourceOffset)},
0227 
0228     {ACPI_RSC_MOVE_GPIO_PIN, ACPI_RS_OFFSET (Data.Gpio.PinTable),
0229                         AML_OFFSET (Gpio.PinTableOffset),
0230                         0},
0231 
0232     /* Resource Source */
0233 
0234     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.Gpio.ResourceSource.Index),
0235                         AML_OFFSET (Gpio.ResSourceIndex),
0236                         1},
0237 
0238     {ACPI_RSC_COUNT_GPIO_RES,  ACPI_RS_OFFSET (Data.Gpio.ResourceSource.StringLength),
0239                         AML_OFFSET (Gpio.ResSourceOffset),
0240                         AML_OFFSET (Gpio.VendorOffset)},
0241 
0242     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.Gpio.ResourceSource.StringPtr),
0243                         AML_OFFSET (Gpio.ResSourceOffset),
0244                         0},
0245 
0246     /* Vendor Data */
0247 
0248     {ACPI_RSC_COUNT_GPIO_VEN,   ACPI_RS_OFFSET (Data.Gpio.VendorLength),
0249                         AML_OFFSET (Gpio.VendorLength),
0250                         1},
0251 
0252     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.Gpio.VendorData),
0253                         AML_OFFSET (Gpio.VendorOffset),
0254                         0},
0255 };
0256 
0257 /*******************************************************************************
0258  *
0259  * AcpiRsConvertClockInput
0260  *
0261  ******************************************************************************/
0262 
0263 ACPI_RSCONVERT_INFO     AcpiRsConvertClockInput[8] =
0264 {
0265     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_CLOCK_INPUT,
0266                         ACPI_RS_SIZE (ACPI_RESOURCE_CLOCK_INPUT),
0267                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertClockInput)},
0268 
0269     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_CLOCK_INPUT,
0270                         sizeof (AML_RESOURCE_CLOCK_INPUT),
0271                         0},
0272 
0273     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.ClockInput.RevisionId),
0274                         AML_OFFSET (ClockInput.RevisionId),
0275                         1},
0276 
0277     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.ClockInput.Mode),
0278                         AML_OFFSET (ClockInput.Flags),
0279                         0},
0280 
0281     {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.ClockInput.Scale),
0282                         AML_OFFSET (ClockInput.Flags),
0283                         1},
0284 
0285     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.ClockInput.FrequencyDivisor),
0286                         AML_OFFSET (ClockInput.FrequencyDivisor),
0287                         2},
0288 
0289     {ACPI_RSC_MOVE32,   ACPI_RS_OFFSET (Data.ClockInput.FrequencyNumerator),
0290                         AML_OFFSET (ClockInput.FrequencyNumerator),
0291                         4},
0292 
0293     /* Resource Source */
0294     {ACPI_RSC_SOURCE,    ACPI_RS_OFFSET (Data.ClockInput.ResourceSource),
0295                         0,
0296                         sizeof(AML_RESOURCE_CLOCK_INPUT)},
0297 
0298 };
0299 
0300 
0301 /*******************************************************************************
0302  *
0303  * AcpiRsConvertPinfunction
0304  *
0305  ******************************************************************************/
0306 
0307 ACPI_RSCONVERT_INFO     AcpiRsConvertPinFunction[13] =
0308 {
0309     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_PIN_FUNCTION,
0310                         ACPI_RS_SIZE (ACPI_RESOURCE_PIN_FUNCTION),
0311                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertPinFunction)},
0312 
0313     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_PIN_FUNCTION,
0314                         sizeof (AML_RESOURCE_PIN_FUNCTION),
0315                         0},
0316 
0317     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.PinFunction.RevisionId),
0318                         AML_OFFSET (PinFunction.RevisionId),
0319                         1},
0320 
0321     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.PinFunction.Shareable),
0322                         AML_OFFSET (PinFunction.Flags),
0323                         0},
0324 
0325     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.PinFunction.PinConfig),
0326                         AML_OFFSET (PinFunction.PinConfig),
0327                         1},
0328 
0329     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.PinFunction.FunctionNumber),
0330                         AML_OFFSET (PinFunction.FunctionNumber),
0331                         2},
0332 
0333     /* Pin Table */
0334 
0335     /*
0336      * It is OK to use GPIO operations here because none of them refer GPIO
0337      * structures directly but instead use offsets given here.
0338      */
0339 
0340     {ACPI_RSC_COUNT_GPIO_PIN, ACPI_RS_OFFSET (Data.PinFunction.PinTableLength),
0341                         AML_OFFSET (PinFunction.PinTableOffset),
0342                         AML_OFFSET (PinFunction.ResSourceOffset)},
0343 
0344     {ACPI_RSC_MOVE_GPIO_PIN, ACPI_RS_OFFSET (Data.PinFunction.PinTable),
0345                         AML_OFFSET (PinFunction.PinTableOffset),
0346                         0},
0347 
0348     /* Resource Source */
0349 
0350     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.PinFunction.ResourceSource.Index),
0351                         AML_OFFSET (PinFunction.ResSourceIndex),
0352                         1},
0353 
0354     {ACPI_RSC_COUNT_GPIO_RES,  ACPI_RS_OFFSET (Data.PinFunction.ResourceSource.StringLength),
0355                         AML_OFFSET (PinFunction.ResSourceOffset),
0356                         AML_OFFSET (PinFunction.VendorOffset)},
0357 
0358     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.PinFunction.ResourceSource.StringPtr),
0359                         AML_OFFSET (PinFunction.ResSourceOffset),
0360                         0},
0361 
0362     /* Vendor Data */
0363 
0364     {ACPI_RSC_COUNT_GPIO_VEN,   ACPI_RS_OFFSET (Data.PinFunction.VendorLength),
0365                         AML_OFFSET (PinFunction.VendorLength),
0366                         1},
0367 
0368     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.PinFunction.VendorData),
0369                         AML_OFFSET (PinFunction.VendorOffset),
0370                         0},
0371 };
0372 
0373 
0374 /*******************************************************************************
0375  *
0376  * AcpiRsConvertCsi2SerialBus
0377  *
0378  ******************************************************************************/
0379 
0380 ACPI_RSCONVERT_INFO     AcpiRsConvertCsi2SerialBus[14] =
0381 {
0382     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_SERIAL_BUS,
0383                         ACPI_RS_SIZE (ACPI_RESOURCE_CSI2_SERIALBUS),
0384                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertCsi2SerialBus)},
0385 
0386     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_SERIAL_BUS,
0387                         sizeof (AML_RESOURCE_CSI2_SERIALBUS),
0388                         0},
0389 
0390     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.RevisionId),
0391                         AML_OFFSET (CommonSerialBus.RevisionId),
0392                         1},
0393 
0394     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.Csi2SerialBus.Type),
0395                         AML_OFFSET (Csi2SerialBus.Type),
0396                         1},
0397 
0398     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Csi2SerialBus.ProducerConsumer),
0399                         AML_OFFSET (Csi2SerialBus.Flags),
0400                         1},
0401 
0402     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Csi2SerialBus.SlaveMode),
0403                         AML_OFFSET (Csi2SerialBus.Flags),
0404                         0},
0405 
0406     {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.Csi2SerialBus.PhyType),
0407                         AML_OFFSET (Csi2SerialBus.TypeSpecificFlags),
0408                         0},
0409 
0410     {ACPI_RSC_6BITFLAG, ACPI_RS_OFFSET (Data.Csi2SerialBus.LocalPortInstance),
0411                         AML_OFFSET (Csi2SerialBus.TypeSpecificFlags),
0412                         2},
0413 
0414     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.Csi2SerialBus.TypeRevisionId),
0415                         AML_OFFSET (Csi2SerialBus.TypeRevisionId),
0416                         1},
0417 
0418     /* Vendor data */
0419 
0420     {ACPI_RSC_COUNT_SERIAL_VEN, ACPI_RS_OFFSET (Data.Csi2SerialBus.VendorLength),
0421                         AML_OFFSET (Csi2SerialBus.TypeDataLength),
0422                         AML_RESOURCE_CSI2_MIN_DATA_LEN},
0423 
0424     {ACPI_RSC_MOVE_SERIAL_VEN,  ACPI_RS_OFFSET (Data.Csi2SerialBus.VendorData),
0425                         0,
0426                         sizeof (AML_RESOURCE_CSI2_SERIALBUS)},
0427 
0428     /* Resource Source */
0429 
0430     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.Csi2SerialBus.ResourceSource.Index),
0431                         AML_OFFSET (Csi2SerialBus.ResSourceIndex),
0432                         1},
0433 
0434     {ACPI_RSC_COUNT_SERIAL_RES, ACPI_RS_OFFSET (Data.Csi2SerialBus.ResourceSource.StringLength),
0435                         AML_OFFSET (Csi2SerialBus.TypeDataLength),
0436                         sizeof (AML_RESOURCE_CSI2_SERIALBUS)},
0437 
0438     {ACPI_RSC_MOVE_SERIAL_RES,  ACPI_RS_OFFSET (Data.Csi2SerialBus.ResourceSource.StringPtr),
0439                         AML_OFFSET (Csi2SerialBus.TypeDataLength),
0440                         sizeof (AML_RESOURCE_CSI2_SERIALBUS)},
0441 };
0442 
0443 
0444 /*******************************************************************************
0445  *
0446  * AcpiRsConvertI2cSerialBus
0447  *
0448  ******************************************************************************/
0449 
0450 ACPI_RSCONVERT_INFO     AcpiRsConvertI2cSerialBus[17] =
0451 {
0452     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_SERIAL_BUS,
0453                         ACPI_RS_SIZE (ACPI_RESOURCE_I2C_SERIALBUS),
0454                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertI2cSerialBus)},
0455 
0456     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_SERIAL_BUS,
0457                         sizeof (AML_RESOURCE_I2C_SERIALBUS),
0458                         0},
0459 
0460     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.RevisionId),
0461                         AML_OFFSET (CommonSerialBus.RevisionId),
0462                         1},
0463 
0464     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.Type),
0465                         AML_OFFSET (CommonSerialBus.Type),
0466                         1},
0467 
0468     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.SlaveMode),
0469                         AML_OFFSET (CommonSerialBus.Flags),
0470                         0},
0471 
0472     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ProducerConsumer),
0473                         AML_OFFSET (CommonSerialBus.Flags),
0474                         1},
0475 
0476     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ConnectionSharing),
0477                         AML_OFFSET (CommonSerialBus.Flags),
0478                         2},
0479 
0480     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId),
0481                         AML_OFFSET (CommonSerialBus.TypeRevisionId),
0482                         1},
0483 
0484     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.CommonSerialBus.TypeDataLength),
0485                         AML_OFFSET (CommonSerialBus.TypeDataLength),
0486                         1},
0487 
0488     /* Vendor data */
0489 
0490     {ACPI_RSC_COUNT_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorLength),
0491                         AML_OFFSET (CommonSerialBus.TypeDataLength),
0492                         AML_RESOURCE_I2C_MIN_DATA_LEN},
0493 
0494     {ACPI_RSC_MOVE_SERIAL_VEN,  ACPI_RS_OFFSET (Data.CommonSerialBus.VendorData),
0495                         0,
0496                         sizeof (AML_RESOURCE_I2C_SERIALBUS)},
0497 
0498     /* Resource Source */
0499 
0500     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.Index),
0501                         AML_OFFSET (CommonSerialBus.ResSourceIndex),
0502                         1},
0503 
0504     {ACPI_RSC_COUNT_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringLength),
0505                         AML_OFFSET (CommonSerialBus.TypeDataLength),
0506                         sizeof (AML_RESOURCE_COMMON_SERIALBUS)},
0507 
0508     {ACPI_RSC_MOVE_SERIAL_RES,  ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringPtr),
0509                         AML_OFFSET (CommonSerialBus.TypeDataLength),
0510                         sizeof (AML_RESOURCE_COMMON_SERIALBUS)},
0511 
0512     /* I2C bus type specific */
0513 
0514     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.I2cSerialBus.AccessMode),
0515                         AML_OFFSET (I2cSerialBus.TypeSpecificFlags),
0516                         0},
0517 
0518     {ACPI_RSC_MOVE32,   ACPI_RS_OFFSET (Data.I2cSerialBus.ConnectionSpeed),
0519                         AML_OFFSET (I2cSerialBus.ConnectionSpeed),
0520                         1},
0521 
0522     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.I2cSerialBus.SlaveAddress),
0523                         AML_OFFSET (I2cSerialBus.SlaveAddress),
0524                         1},
0525 };
0526 
0527 
0528 /*******************************************************************************
0529  *
0530  * AcpiRsConvertSpiSerialBus
0531  *
0532  ******************************************************************************/
0533 
0534 ACPI_RSCONVERT_INFO     AcpiRsConvertSpiSerialBus[21] =
0535 {
0536     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_SERIAL_BUS,
0537                         ACPI_RS_SIZE (ACPI_RESOURCE_SPI_SERIALBUS),
0538                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertSpiSerialBus)},
0539 
0540     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_SERIAL_BUS,
0541                         sizeof (AML_RESOURCE_SPI_SERIALBUS),
0542                         0},
0543 
0544     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.RevisionId),
0545                         AML_OFFSET (CommonSerialBus.RevisionId),
0546                         1},
0547 
0548     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.Type),
0549                         AML_OFFSET (CommonSerialBus.Type),
0550                         1},
0551 
0552     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.SlaveMode),
0553                         AML_OFFSET (CommonSerialBus.Flags),
0554                         0},
0555 
0556     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ProducerConsumer),
0557                         AML_OFFSET (CommonSerialBus.Flags),
0558                         1},
0559 
0560     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ConnectionSharing),
0561                         AML_OFFSET (CommonSerialBus.Flags),
0562                         2},
0563 
0564     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId),
0565                         AML_OFFSET (CommonSerialBus.TypeRevisionId),
0566                         1},
0567 
0568     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.CommonSerialBus.TypeDataLength),
0569                         AML_OFFSET (CommonSerialBus.TypeDataLength),
0570                         1},
0571 
0572     /* Vendor data */
0573 
0574     {ACPI_RSC_COUNT_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorLength),
0575                         AML_OFFSET (CommonSerialBus.TypeDataLength),
0576                         AML_RESOURCE_SPI_MIN_DATA_LEN},
0577 
0578     {ACPI_RSC_MOVE_SERIAL_VEN,  ACPI_RS_OFFSET (Data.CommonSerialBus.VendorData),
0579                         0,
0580                         sizeof (AML_RESOURCE_SPI_SERIALBUS)},
0581 
0582     /* Resource Source */
0583 
0584     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.Index),
0585                         AML_OFFSET (CommonSerialBus.ResSourceIndex),
0586                         1},
0587 
0588     {ACPI_RSC_COUNT_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringLength),
0589                         AML_OFFSET (CommonSerialBus.TypeDataLength),
0590                         sizeof (AML_RESOURCE_COMMON_SERIALBUS)},
0591 
0592     {ACPI_RSC_MOVE_SERIAL_RES,  ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringPtr),
0593                         AML_OFFSET (CommonSerialBus.TypeDataLength),
0594                         sizeof (AML_RESOURCE_COMMON_SERIALBUS)},
0595 
0596     /* Spi bus type specific  */
0597 
0598     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.SpiSerialBus.WireMode),
0599                         AML_OFFSET (SpiSerialBus.TypeSpecificFlags),
0600                         0},
0601 
0602     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.SpiSerialBus.DevicePolarity),
0603                         AML_OFFSET (SpiSerialBus.TypeSpecificFlags),
0604                         1},
0605 
0606     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.SpiSerialBus.DataBitLength),
0607                         AML_OFFSET (SpiSerialBus.DataBitLength),
0608                         1},
0609 
0610     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.SpiSerialBus.ClockPhase),
0611                         AML_OFFSET (SpiSerialBus.ClockPhase),
0612                         1},
0613 
0614     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.SpiSerialBus.ClockPolarity),
0615                         AML_OFFSET (SpiSerialBus.ClockPolarity),
0616                         1},
0617 
0618     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.SpiSerialBus.DeviceSelection),
0619                         AML_OFFSET (SpiSerialBus.DeviceSelection),
0620                         1},
0621 
0622     {ACPI_RSC_MOVE32,   ACPI_RS_OFFSET (Data.SpiSerialBus.ConnectionSpeed),
0623                         AML_OFFSET (SpiSerialBus.ConnectionSpeed),
0624                         1},
0625 };
0626 
0627 
0628 /*******************************************************************************
0629  *
0630  * AcpiRsConvertUartSerialBus
0631  *
0632  ******************************************************************************/
0633 
0634 ACPI_RSCONVERT_INFO     AcpiRsConvertUartSerialBus[23] =
0635 {
0636     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_SERIAL_BUS,
0637                         ACPI_RS_SIZE (ACPI_RESOURCE_UART_SERIALBUS),
0638                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertUartSerialBus)},
0639 
0640     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_SERIAL_BUS,
0641                         sizeof (AML_RESOURCE_UART_SERIALBUS),
0642                         0},
0643 
0644     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.RevisionId),
0645                         AML_OFFSET (CommonSerialBus.RevisionId),
0646                         1},
0647 
0648     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.Type),
0649                         AML_OFFSET (CommonSerialBus.Type),
0650                         1},
0651 
0652     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.SlaveMode),
0653                         AML_OFFSET (CommonSerialBus.Flags),
0654                         0},
0655 
0656     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ProducerConsumer),
0657                         AML_OFFSET (CommonSerialBus.Flags),
0658                         1},
0659 
0660     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ConnectionSharing),
0661                         AML_OFFSET (CommonSerialBus.Flags),
0662                         2},
0663 
0664     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId),
0665                         AML_OFFSET (CommonSerialBus.TypeRevisionId),
0666                         1},
0667 
0668     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.CommonSerialBus.TypeDataLength),
0669                         AML_OFFSET (CommonSerialBus.TypeDataLength),
0670                         1},
0671 
0672     /* Vendor data */
0673 
0674     {ACPI_RSC_COUNT_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorLength),
0675                         AML_OFFSET (CommonSerialBus.TypeDataLength),
0676                         AML_RESOURCE_UART_MIN_DATA_LEN},
0677 
0678     {ACPI_RSC_MOVE_SERIAL_VEN,  ACPI_RS_OFFSET (Data.CommonSerialBus.VendorData),
0679                         0,
0680                         sizeof (AML_RESOURCE_UART_SERIALBUS)},
0681 
0682     /* Resource Source */
0683 
0684     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.Index),
0685                         AML_OFFSET (CommonSerialBus.ResSourceIndex),
0686                         1},
0687 
0688     {ACPI_RSC_COUNT_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringLength),
0689                         AML_OFFSET (CommonSerialBus.TypeDataLength),
0690                         sizeof (AML_RESOURCE_COMMON_SERIALBUS)},
0691 
0692     {ACPI_RSC_MOVE_SERIAL_RES,  ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringPtr),
0693                         AML_OFFSET (CommonSerialBus.TypeDataLength),
0694                         sizeof (AML_RESOURCE_COMMON_SERIALBUS)},
0695 
0696     /* Uart bus type specific  */
0697 
0698     {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.FlowControl),
0699                         AML_OFFSET (UartSerialBus.TypeSpecificFlags),
0700                         0},
0701 
0702     {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.StopBits),
0703                         AML_OFFSET (UartSerialBus.TypeSpecificFlags),
0704                         2},
0705 
0706     {ACPI_RSC_3BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.DataBits),
0707                         AML_OFFSET (UartSerialBus.TypeSpecificFlags),
0708                         4},
0709 
0710     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.Endian),
0711                         AML_OFFSET (UartSerialBus.TypeSpecificFlags),
0712                         7},
0713 
0714     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.UartSerialBus.Parity),
0715                         AML_OFFSET (UartSerialBus.Parity),
0716                         1},
0717 
0718     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.UartSerialBus.LinesEnabled),
0719                         AML_OFFSET (UartSerialBus.LinesEnabled),
0720                         1},
0721 
0722     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.UartSerialBus.RxFifoSize),
0723                         AML_OFFSET (UartSerialBus.RxFifoSize),
0724                         1},
0725 
0726     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.UartSerialBus.TxFifoSize),
0727                         AML_OFFSET (UartSerialBus.TxFifoSize),
0728                         1},
0729 
0730     {ACPI_RSC_MOVE32,   ACPI_RS_OFFSET (Data.UartSerialBus.DefaultBaudRate),
0731                         AML_OFFSET (UartSerialBus.DefaultBaudRate),
0732                         1},
0733 };
0734 
0735 
0736 /*******************************************************************************
0737  *
0738  * AcpiRsConvertPinConfig
0739  *
0740  ******************************************************************************/
0741 
0742 ACPI_RSCONVERT_INFO     AcpiRsConvertPinConfig[14] =
0743 {
0744     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_PIN_CONFIG,
0745                         ACPI_RS_SIZE (ACPI_RESOURCE_PIN_CONFIG),
0746                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertPinConfig)},
0747 
0748     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_PIN_CONFIG,
0749                         sizeof (AML_RESOURCE_PIN_CONFIG),
0750                         0},
0751 
0752     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.PinConfig.RevisionId),
0753                         AML_OFFSET (PinConfig.RevisionId),
0754                         1},
0755 
0756     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.PinConfig.Shareable),
0757                         AML_OFFSET (PinConfig.Flags),
0758                         0},
0759 
0760     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.PinConfig.ProducerConsumer),
0761                         AML_OFFSET (PinConfig.Flags),
0762                         1},
0763 
0764     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.PinConfig.PinConfigType),
0765                         AML_OFFSET (PinConfig.PinConfigType),
0766                         1},
0767 
0768     {ACPI_RSC_MOVE32,   ACPI_RS_OFFSET (Data.PinConfig.PinConfigValue),
0769                         AML_OFFSET (PinConfig.PinConfigValue),
0770                         1},
0771 
0772     /* Pin Table */
0773 
0774     /*
0775      * It is OK to use GPIO operations here because none of them refer GPIO
0776      * structures directly but instead use offsets given here.
0777      */
0778 
0779     {ACPI_RSC_COUNT_GPIO_PIN, ACPI_RS_OFFSET (Data.PinConfig.PinTableLength),
0780                         AML_OFFSET (PinConfig.PinTableOffset),
0781                         AML_OFFSET (PinConfig.ResSourceOffset)},
0782 
0783     {ACPI_RSC_MOVE_GPIO_PIN, ACPI_RS_OFFSET (Data.PinConfig.PinTable),
0784                         AML_OFFSET (PinConfig.PinTableOffset),
0785                         0},
0786 
0787     /* Resource Source */
0788 
0789     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.PinConfig.ResourceSource.Index),
0790                         AML_OFFSET (PinConfig.ResSourceIndex),
0791                         1},
0792 
0793     {ACPI_RSC_COUNT_GPIO_RES,  ACPI_RS_OFFSET (Data.PinConfig.ResourceSource.StringLength),
0794                         AML_OFFSET (PinConfig.ResSourceOffset),
0795                         AML_OFFSET (PinConfig.VendorOffset)},
0796 
0797     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.PinConfig.ResourceSource.StringPtr),
0798                         AML_OFFSET (PinConfig.ResSourceOffset),
0799                         0},
0800 
0801     /* Vendor Data */
0802 
0803     {ACPI_RSC_COUNT_GPIO_VEN,   ACPI_RS_OFFSET (Data.PinConfig.VendorLength),
0804                         AML_OFFSET (PinConfig.VendorLength),
0805                         1},
0806 
0807     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.PinConfig.VendorData),
0808                         AML_OFFSET (PinConfig.VendorOffset),
0809                         0},
0810 };
0811 
0812 /*******************************************************************************
0813  *
0814  * AcpiRsConvertPinGroup
0815  *
0816  ******************************************************************************/
0817 
0818 ACPI_RSCONVERT_INFO     AcpiRsConvertPinGroup[10] =
0819 {
0820     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_PIN_GROUP,
0821                         ACPI_RS_SIZE (ACPI_RESOURCE_PIN_GROUP),
0822                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertPinGroup)},
0823 
0824     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_PIN_GROUP,
0825                         sizeof (AML_RESOURCE_PIN_GROUP),
0826                         0},
0827 
0828     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.PinGroup.RevisionId),
0829                         AML_OFFSET (PinGroup.RevisionId),
0830                         1},
0831 
0832     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.PinGroup.ProducerConsumer),
0833                         AML_OFFSET (PinGroup.Flags),
0834                         0},
0835 
0836     /* Pin Table */
0837 
0838     /*
0839      * It is OK to use GPIO operations here because none of them refer GPIO
0840      * structures directly but instead use offsets given here.
0841      */
0842 
0843     {ACPI_RSC_COUNT_GPIO_PIN, ACPI_RS_OFFSET (Data.PinGroup.PinTableLength),
0844                         AML_OFFSET (PinGroup.PinTableOffset),
0845                         AML_OFFSET (PinGroup.LabelOffset)},
0846 
0847     {ACPI_RSC_MOVE_GPIO_PIN, ACPI_RS_OFFSET (Data.PinGroup.PinTable),
0848                         AML_OFFSET (PinGroup.PinTableOffset),
0849                         0},
0850 
0851     /* Resource Label */
0852 
0853     {ACPI_RSC_COUNT_GPIO_RES, ACPI_RS_OFFSET (Data.PinGroup.ResourceLabel.StringLength),
0854                         AML_OFFSET (PinGroup.LabelOffset),
0855                         AML_OFFSET (PinGroup.VendorOffset)},
0856 
0857     {ACPI_RSC_MOVE_GPIO_RES, ACPI_RS_OFFSET (Data.PinGroup.ResourceLabel.StringPtr),
0858                         AML_OFFSET (PinGroup.LabelOffset),
0859                         0},
0860 
0861     /* Vendor Data */
0862 
0863     {ACPI_RSC_COUNT_GPIO_VEN,   ACPI_RS_OFFSET (Data.PinGroup.VendorLength),
0864                         AML_OFFSET (PinGroup.VendorLength),
0865                         1},
0866 
0867     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.PinGroup.VendorData),
0868                         AML_OFFSET (PinGroup.VendorOffset),
0869                         0},
0870 };
0871 
0872 /*******************************************************************************
0873  *
0874  * AcpiRsConvertPinGroupFunction
0875  *
0876  ******************************************************************************/
0877 
0878 ACPI_RSCONVERT_INFO     AcpiRsConvertPinGroupFunction[13] =
0879 {
0880     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION,
0881                         ACPI_RS_SIZE (ACPI_RESOURCE_PIN_GROUP_FUNCTION),
0882                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertPinGroupFunction)},
0883 
0884     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION,
0885                         sizeof (AML_RESOURCE_PIN_GROUP_FUNCTION),
0886                         0},
0887 
0888     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.PinGroupFunction.RevisionId),
0889                         AML_OFFSET (PinGroupFunction.RevisionId),
0890                         1},
0891 
0892     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.PinGroupFunction.Shareable),
0893                         AML_OFFSET (PinGroupFunction.Flags),
0894                         0},
0895 
0896     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.PinGroupFunction.ProducerConsumer),
0897                         AML_OFFSET (PinGroupFunction.Flags),
0898                         1},
0899 
0900     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.PinGroupFunction.FunctionNumber),
0901                         AML_OFFSET (PinGroupFunction.FunctionNumber),
0902                         1},
0903 
0904     /* Resource Source */
0905 
0906     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.PinGroupFunction.ResourceSource.Index),
0907                         AML_OFFSET (PinGroupFunction.ResSourceIndex),
0908                         1},
0909 
0910     {ACPI_RSC_COUNT_GPIO_RES,  ACPI_RS_OFFSET (Data.PinGroupFunction.ResourceSource.StringLength),
0911                         AML_OFFSET (PinGroupFunction.ResSourceOffset),
0912                         AML_OFFSET (PinGroupFunction.ResSourceLabelOffset)},
0913 
0914     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.PinGroupFunction.ResourceSource.StringPtr),
0915                         AML_OFFSET (PinGroupFunction.ResSourceOffset),
0916                         0},
0917 
0918     /* Resource Source Label */
0919 
0920     {ACPI_RSC_COUNT_GPIO_RES,  ACPI_RS_OFFSET (Data.PinGroupFunction.ResourceSourceLabel.StringLength),
0921                         AML_OFFSET (PinGroupFunction.ResSourceLabelOffset),
0922                         AML_OFFSET (PinGroupFunction.VendorOffset)},
0923 
0924     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.PinGroupFunction.ResourceSourceLabel.StringPtr),
0925                         AML_OFFSET (PinGroupFunction.ResSourceLabelOffset),
0926                         0},
0927 
0928     /* Vendor Data */
0929 
0930     {ACPI_RSC_COUNT_GPIO_VEN,   ACPI_RS_OFFSET (Data.PinGroupFunction.VendorLength),
0931                         AML_OFFSET (PinGroupFunction.VendorLength),
0932                         1},
0933 
0934     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.PinGroupFunction.VendorData),
0935                         AML_OFFSET (PinGroupFunction.VendorOffset),
0936                         0},
0937 };
0938 
0939 /*******************************************************************************
0940  *
0941  * AcpiRsConvertPinGroupConfig
0942  *
0943  ******************************************************************************/
0944 
0945 ACPI_RSCONVERT_INFO     AcpiRsConvertPinGroupConfig[14] =
0946 {
0947     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG,
0948                         ACPI_RS_SIZE (ACPI_RESOURCE_PIN_GROUP_CONFIG),
0949                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertPinGroupConfig)},
0950 
0951     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG,
0952                         sizeof (AML_RESOURCE_PIN_GROUP_CONFIG),
0953                         0},
0954 
0955     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.PinGroupConfig.RevisionId),
0956                         AML_OFFSET (PinGroupConfig.RevisionId),
0957                         1},
0958 
0959     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.PinGroupConfig.Shareable),
0960                         AML_OFFSET (PinGroupConfig.Flags),
0961                         0},
0962 
0963     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.PinGroupConfig.ProducerConsumer),
0964                         AML_OFFSET (PinGroupConfig.Flags),
0965                         1},
0966 
0967     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.PinGroupConfig.PinConfigType),
0968                         AML_OFFSET (PinGroupConfig.PinConfigType),
0969                         1},
0970 
0971     {ACPI_RSC_MOVE32,   ACPI_RS_OFFSET (Data.PinGroupConfig.PinConfigValue),
0972                         AML_OFFSET (PinGroupConfig.PinConfigValue),
0973                         1},
0974 
0975     /* Resource Source */
0976 
0977     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.PinGroupConfig.ResourceSource.Index),
0978                         AML_OFFSET (PinGroupConfig.ResSourceIndex),
0979                         1},
0980 
0981     {ACPI_RSC_COUNT_GPIO_RES,  ACPI_RS_OFFSET (Data.PinGroupConfig.ResourceSource.StringLength),
0982                         AML_OFFSET (PinGroupConfig.ResSourceOffset),
0983                         AML_OFFSET (PinGroupConfig.ResSourceLabelOffset)},
0984 
0985     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.PinGroupConfig.ResourceSource.StringPtr),
0986                         AML_OFFSET (PinGroupConfig.ResSourceOffset),
0987                         0},
0988 
0989     /* Resource Source Label */
0990 
0991     {ACPI_RSC_COUNT_GPIO_RES,  ACPI_RS_OFFSET (Data.PinGroupConfig.ResourceSourceLabel.StringLength),
0992                         AML_OFFSET (PinGroupConfig.ResSourceLabelOffset),
0993                         AML_OFFSET (PinGroupConfig.VendorOffset)},
0994 
0995     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.PinGroupConfig.ResourceSourceLabel.StringPtr),
0996                         AML_OFFSET (PinGroupConfig.ResSourceLabelOffset),
0997                         0},
0998 
0999     /* Vendor Data */
1000 
1001     {ACPI_RSC_COUNT_GPIO_VEN,   ACPI_RS_OFFSET (Data.PinGroupConfig.VendorLength),
1002                         AML_OFFSET (PinGroupConfig.VendorLength),
1003                         1},
1004 
1005     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.PinGroupConfig.VendorData),
1006                         AML_OFFSET (PinGroupConfig.VendorOffset),
1007                         0},
1008 };