Home | History | Annotate | Line # | Download | only in resources
rsserial.c revision 1.1
      1  1.1  christos /*******************************************************************************
      2  1.1  christos  *
      3  1.1  christos  * Module Name: rsserial - GPIO/SerialBus resource descriptors
      4  1.1  christos  *
      5  1.1  christos  ******************************************************************************/
      6  1.1  christos 
      7  1.1  christos /*
      8  1.1  christos  * Copyright (C) 2000 - 2013, Intel Corp.
      9  1.1  christos  * All rights reserved.
     10  1.1  christos  *
     11  1.1  christos  * Redistribution and use in source and binary forms, with or without
     12  1.1  christos  * modification, are permitted provided that the following conditions
     13  1.1  christos  * are met:
     14  1.1  christos  * 1. Redistributions of source code must retain the above copyright
     15  1.1  christos  *    notice, this list of conditions, and the following disclaimer,
     16  1.1  christos  *    without modification.
     17  1.1  christos  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
     18  1.1  christos  *    substantially similar to the "NO WARRANTY" disclaimer below
     19  1.1  christos  *    ("Disclaimer") and any redistribution must be conditioned upon
     20  1.1  christos  *    including a substantially similar Disclaimer requirement for further
     21  1.1  christos  *    binary redistribution.
     22  1.1  christos  * 3. Neither the names of the above-listed copyright holders nor the names
     23  1.1  christos  *    of any contributors may be used to endorse or promote products derived
     24  1.1  christos  *    from this software without specific prior written permission.
     25  1.1  christos  *
     26  1.1  christos  * Alternatively, this software may be distributed under the terms of the
     27  1.1  christos  * GNU General Public License ("GPL") version 2 as published by the Free
     28  1.1  christos  * Software Foundation.
     29  1.1  christos  *
     30  1.1  christos  * NO WARRANTY
     31  1.1  christos  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     32  1.1  christos  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     33  1.1  christos  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
     34  1.1  christos  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     35  1.1  christos  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     36  1.1  christos  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     37  1.1  christos  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     38  1.1  christos  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
     39  1.1  christos  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
     40  1.1  christos  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     41  1.1  christos  * POSSIBILITY OF SUCH DAMAGES.
     42  1.1  christos  */
     43  1.1  christos 
     44  1.1  christos #define __RSIRQ_C__
     45  1.1  christos 
     46  1.1  christos #include "acpi.h"
     47  1.1  christos #include "accommon.h"
     48  1.1  christos #include "acresrc.h"
     49  1.1  christos 
     50  1.1  christos #define _COMPONENT          ACPI_RESOURCES
     51  1.1  christos         ACPI_MODULE_NAME    ("rsserial")
     52  1.1  christos 
     53  1.1  christos 
     54  1.1  christos /*******************************************************************************
     55  1.1  christos  *
     56  1.1  christos  * AcpiRsConvertGpio
     57  1.1  christos  *
     58  1.1  christos  ******************************************************************************/
     59  1.1  christos 
     60  1.1  christos ACPI_RSCONVERT_INFO     AcpiRsConvertGpio[18] =
     61  1.1  christos {
     62  1.1  christos     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_GPIO,
     63  1.1  christos                         ACPI_RS_SIZE (ACPI_RESOURCE_GPIO),
     64  1.1  christos                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertGpio)},
     65  1.1  christos 
     66  1.1  christos     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_GPIO,
     67  1.1  christos                         sizeof (AML_RESOURCE_GPIO),
     68  1.1  christos                         0},
     69  1.1  christos 
     70  1.1  christos     /*
     71  1.1  christos      * These fields are contiguous in both the source and destination:
     72  1.1  christos      * RevisionId
     73  1.1  christos      * ConnectionType
     74  1.1  christos      */
     75  1.1  christos     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.Gpio.RevisionId),
     76  1.1  christos                         AML_OFFSET (Gpio.RevisionId),
     77  1.1  christos                         2},
     78  1.1  christos 
     79  1.1  christos     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.ProducerConsumer),
     80  1.1  christos                         AML_OFFSET (Gpio.Flags),
     81  1.1  christos                         0},
     82  1.1  christos 
     83  1.1  christos     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.Sharable),
     84  1.1  christos                         AML_OFFSET (Gpio.IntFlags),
     85  1.1  christos                         3},
     86  1.1  christos 
     87  1.1  christos     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.WakeCapable),
     88  1.1  christos                         AML_OFFSET (Gpio.IntFlags),
     89  1.1  christos                         4},
     90  1.1  christos 
     91  1.1  christos     {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.Gpio.IoRestriction),
     92  1.1  christos                         AML_OFFSET (Gpio.IntFlags),
     93  1.1  christos                         0},
     94  1.1  christos 
     95  1.1  christos     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.Triggering),
     96  1.1  christos                         AML_OFFSET (Gpio.IntFlags),
     97  1.1  christos                         0},
     98  1.1  christos 
     99  1.1  christos     {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.Gpio.Polarity),
    100  1.1  christos                         AML_OFFSET (Gpio.IntFlags),
    101  1.1  christos                         1},
    102  1.1  christos 
    103  1.1  christos     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.Gpio.PinConfig),
    104  1.1  christos                         AML_OFFSET (Gpio.PinConfig),
    105  1.1  christos                         1},
    106  1.1  christos 
    107  1.1  christos     /*
    108  1.1  christos      * These fields are contiguous in both the source and destination:
    109  1.1  christos      * DriveStrength
    110  1.1  christos      * DebounceTimeout
    111  1.1  christos      */
    112  1.1  christos     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.Gpio.DriveStrength),
    113  1.1  christos                         AML_OFFSET (Gpio.DriveStrength),
    114  1.1  christos                         2},
    115  1.1  christos 
    116  1.1  christos     /* Pin Table */
    117  1.1  christos 
    118  1.1  christos     {ACPI_RSC_COUNT_GPIO_PIN, ACPI_RS_OFFSET (Data.Gpio.PinTableLength),
    119  1.1  christos                         AML_OFFSET (Gpio.PinTableOffset),
    120  1.1  christos                         AML_OFFSET (Gpio.ResSourceOffset)},
    121  1.1  christos 
    122  1.1  christos     {ACPI_RSC_MOVE_GPIO_PIN, ACPI_RS_OFFSET (Data.Gpio.PinTable),
    123  1.1  christos                         AML_OFFSET (Gpio.PinTableOffset),
    124  1.1  christos                         0},
    125  1.1  christos 
    126  1.1  christos     /* Resource Source */
    127  1.1  christos 
    128  1.1  christos     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.Gpio.ResourceSource.Index),
    129  1.1  christos                         AML_OFFSET (Gpio.ResSourceIndex),
    130  1.1  christos                         1},
    131  1.1  christos 
    132  1.1  christos     {ACPI_RSC_COUNT_GPIO_RES,  ACPI_RS_OFFSET (Data.Gpio.ResourceSource.StringLength),
    133  1.1  christos                         AML_OFFSET (Gpio.ResSourceOffset),
    134  1.1  christos                         AML_OFFSET (Gpio.VendorOffset)},
    135  1.1  christos 
    136  1.1  christos     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.Gpio.ResourceSource.StringPtr),
    137  1.1  christos                         AML_OFFSET (Gpio.ResSourceOffset),
    138  1.1  christos                         0},
    139  1.1  christos 
    140  1.1  christos     /* Vendor Data */
    141  1.1  christos 
    142  1.1  christos     {ACPI_RSC_COUNT_GPIO_VEN,   ACPI_RS_OFFSET (Data.Gpio.VendorLength),
    143  1.1  christos                         AML_OFFSET (Gpio.VendorLength),
    144  1.1  christos                         1},
    145  1.1  christos 
    146  1.1  christos     {ACPI_RSC_MOVE_GPIO_RES,   ACPI_RS_OFFSET (Data.Gpio.VendorData),
    147  1.1  christos                         AML_OFFSET (Gpio.VendorOffset),
    148  1.1  christos                         0},
    149  1.1  christos };
    150  1.1  christos 
    151  1.1  christos 
    152  1.1  christos /*******************************************************************************
    153  1.1  christos  *
    154  1.1  christos  * AcpiRsConvertI2cSerialBus
    155  1.1  christos  *
    156  1.1  christos  ******************************************************************************/
    157  1.1  christos 
    158  1.1  christos ACPI_RSCONVERT_INFO     AcpiRsConvertI2cSerialBus[16] =
    159  1.1  christos {
    160  1.1  christos     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_SERIAL_BUS,
    161  1.1  christos                         ACPI_RS_SIZE (ACPI_RESOURCE_I2C_SERIALBUS),
    162  1.1  christos                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertI2cSerialBus)},
    163  1.1  christos 
    164  1.1  christos     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_SERIAL_BUS,
    165  1.1  christos                         sizeof (AML_RESOURCE_I2C_SERIALBUS),
    166  1.1  christos                         0},
    167  1.1  christos 
    168  1.1  christos     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.RevisionId),
    169  1.1  christos                         AML_OFFSET (CommonSerialBus.RevisionId),
    170  1.1  christos                         1},
    171  1.1  christos 
    172  1.1  christos     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.Type),
    173  1.1  christos                         AML_OFFSET (CommonSerialBus.Type),
    174  1.1  christos                         1},
    175  1.1  christos 
    176  1.1  christos     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.SlaveMode),
    177  1.1  christos                         AML_OFFSET (CommonSerialBus.Flags),
    178  1.1  christos                         0},
    179  1.1  christos 
    180  1.1  christos     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ProducerConsumer),
    181  1.1  christos                         AML_OFFSET (CommonSerialBus.Flags),
    182  1.1  christos                         1},
    183  1.1  christos 
    184  1.1  christos     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId),
    185  1.1  christos                         AML_OFFSET (CommonSerialBus.TypeRevisionId),
    186  1.1  christos                         1},
    187  1.1  christos 
    188  1.1  christos     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.CommonSerialBus.TypeDataLength),
    189  1.1  christos                         AML_OFFSET (CommonSerialBus.TypeDataLength),
    190  1.1  christos                         1},
    191  1.1  christos 
    192  1.1  christos     /* Vendor data */
    193  1.1  christos 
    194  1.1  christos     {ACPI_RSC_COUNT_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorLength),
    195  1.1  christos                         AML_OFFSET (CommonSerialBus.TypeDataLength),
    196  1.1  christos                         AML_RESOURCE_I2C_MIN_DATA_LEN},
    197  1.1  christos 
    198  1.1  christos     {ACPI_RSC_MOVE_SERIAL_VEN,  ACPI_RS_OFFSET (Data.CommonSerialBus.VendorData),
    199  1.1  christos                         0,
    200  1.1  christos                         sizeof (AML_RESOURCE_I2C_SERIALBUS)},
    201  1.1  christos 
    202  1.1  christos     /* Resource Source */
    203  1.1  christos 
    204  1.1  christos     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.Index),
    205  1.1  christos                         AML_OFFSET (CommonSerialBus.ResSourceIndex),
    206  1.1  christos                         1},
    207  1.1  christos 
    208  1.1  christos     {ACPI_RSC_COUNT_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringLength),
    209  1.1  christos                         AML_OFFSET (CommonSerialBus.TypeDataLength),
    210  1.1  christos                         sizeof (AML_RESOURCE_COMMON_SERIALBUS)},
    211  1.1  christos 
    212  1.1  christos     {ACPI_RSC_MOVE_SERIAL_RES,  ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringPtr),
    213  1.1  christos                         AML_OFFSET (CommonSerialBus.TypeDataLength),
    214  1.1  christos                         sizeof (AML_RESOURCE_COMMON_SERIALBUS)},
    215  1.1  christos 
    216  1.1  christos     /* I2C bus type specific */
    217  1.1  christos 
    218  1.1  christos     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.I2cSerialBus.AccessMode),
    219  1.1  christos                         AML_OFFSET (I2cSerialBus.TypeSpecificFlags),
    220  1.1  christos                         0},
    221  1.1  christos 
    222  1.1  christos     {ACPI_RSC_MOVE32,   ACPI_RS_OFFSET (Data.I2cSerialBus.ConnectionSpeed),
    223  1.1  christos                         AML_OFFSET (I2cSerialBus.ConnectionSpeed),
    224  1.1  christos                         1},
    225  1.1  christos 
    226  1.1  christos     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.I2cSerialBus.SlaveAddress),
    227  1.1  christos                         AML_OFFSET (I2cSerialBus.SlaveAddress),
    228  1.1  christos                         1},
    229  1.1  christos };
    230  1.1  christos 
    231  1.1  christos 
    232  1.1  christos /*******************************************************************************
    233  1.1  christos  *
    234  1.1  christos  * AcpiRsConvertSpiSerialBus
    235  1.1  christos  *
    236  1.1  christos  ******************************************************************************/
    237  1.1  christos 
    238  1.1  christos ACPI_RSCONVERT_INFO     AcpiRsConvertSpiSerialBus[20] =
    239  1.1  christos {
    240  1.1  christos     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_SERIAL_BUS,
    241  1.1  christos                         ACPI_RS_SIZE (ACPI_RESOURCE_SPI_SERIALBUS),
    242  1.1  christos                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertSpiSerialBus)},
    243  1.1  christos 
    244  1.1  christos     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_SERIAL_BUS,
    245  1.1  christos                         sizeof (AML_RESOURCE_SPI_SERIALBUS),
    246  1.1  christos                         0},
    247  1.1  christos 
    248  1.1  christos     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.RevisionId),
    249  1.1  christos                         AML_OFFSET (CommonSerialBus.RevisionId),
    250  1.1  christos                         1},
    251  1.1  christos 
    252  1.1  christos     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.Type),
    253  1.1  christos                         AML_OFFSET (CommonSerialBus.Type),
    254  1.1  christos                         1},
    255  1.1  christos 
    256  1.1  christos     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.SlaveMode),
    257  1.1  christos                         AML_OFFSET (CommonSerialBus.Flags),
    258  1.1  christos                         0},
    259  1.1  christos 
    260  1.1  christos     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ProducerConsumer),
    261  1.1  christos                         AML_OFFSET (CommonSerialBus.Flags),
    262  1.1  christos                         1},
    263  1.1  christos 
    264  1.1  christos     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId),
    265  1.1  christos                         AML_OFFSET (CommonSerialBus.TypeRevisionId),
    266  1.1  christos                         1},
    267  1.1  christos 
    268  1.1  christos     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.CommonSerialBus.TypeDataLength),
    269  1.1  christos                         AML_OFFSET (CommonSerialBus.TypeDataLength),
    270  1.1  christos                         1},
    271  1.1  christos 
    272  1.1  christos     /* Vendor data */
    273  1.1  christos 
    274  1.1  christos     {ACPI_RSC_COUNT_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorLength),
    275  1.1  christos                         AML_OFFSET (CommonSerialBus.TypeDataLength),
    276  1.1  christos                         AML_RESOURCE_SPI_MIN_DATA_LEN},
    277  1.1  christos 
    278  1.1  christos     {ACPI_RSC_MOVE_SERIAL_VEN,  ACPI_RS_OFFSET (Data.CommonSerialBus.VendorData),
    279  1.1  christos                         0,
    280  1.1  christos                         sizeof (AML_RESOURCE_SPI_SERIALBUS)},
    281  1.1  christos 
    282  1.1  christos     /* Resource Source */
    283  1.1  christos 
    284  1.1  christos     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.Index),
    285  1.1  christos                         AML_OFFSET (CommonSerialBus.ResSourceIndex),
    286  1.1  christos                         1},
    287  1.1  christos 
    288  1.1  christos     {ACPI_RSC_COUNT_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringLength),
    289  1.1  christos                         AML_OFFSET (CommonSerialBus.TypeDataLength),
    290  1.1  christos                         sizeof (AML_RESOURCE_COMMON_SERIALBUS)},
    291  1.1  christos 
    292  1.1  christos     {ACPI_RSC_MOVE_SERIAL_RES,  ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringPtr),
    293  1.1  christos                         AML_OFFSET (CommonSerialBus.TypeDataLength),
    294  1.1  christos                         sizeof (AML_RESOURCE_COMMON_SERIALBUS)},
    295  1.1  christos 
    296  1.1  christos     /* Spi bus type specific  */
    297  1.1  christos 
    298  1.1  christos     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.SpiSerialBus.WireMode),
    299  1.1  christos                         AML_OFFSET (SpiSerialBus.TypeSpecificFlags),
    300  1.1  christos                         0},
    301  1.1  christos 
    302  1.1  christos     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.SpiSerialBus.DevicePolarity),
    303  1.1  christos                         AML_OFFSET (SpiSerialBus.TypeSpecificFlags),
    304  1.1  christos                         1},
    305  1.1  christos 
    306  1.1  christos     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.SpiSerialBus.DataBitLength),
    307  1.1  christos                         AML_OFFSET (SpiSerialBus.DataBitLength),
    308  1.1  christos                         1},
    309  1.1  christos 
    310  1.1  christos     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.SpiSerialBus.ClockPhase),
    311  1.1  christos                         AML_OFFSET (SpiSerialBus.ClockPhase),
    312  1.1  christos                         1},
    313  1.1  christos 
    314  1.1  christos     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.SpiSerialBus.ClockPolarity),
    315  1.1  christos                         AML_OFFSET (SpiSerialBus.ClockPolarity),
    316  1.1  christos                         1},
    317  1.1  christos 
    318  1.1  christos     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.SpiSerialBus.DeviceSelection),
    319  1.1  christos                         AML_OFFSET (SpiSerialBus.DeviceSelection),
    320  1.1  christos                         1},
    321  1.1  christos 
    322  1.1  christos     {ACPI_RSC_MOVE32,   ACPI_RS_OFFSET (Data.SpiSerialBus.ConnectionSpeed),
    323  1.1  christos                         AML_OFFSET (SpiSerialBus.ConnectionSpeed),
    324  1.1  christos                         1},
    325  1.1  christos };
    326  1.1  christos 
    327  1.1  christos 
    328  1.1  christos /*******************************************************************************
    329  1.1  christos  *
    330  1.1  christos  * AcpiRsConvertUartSerialBus
    331  1.1  christos  *
    332  1.1  christos  ******************************************************************************/
    333  1.1  christos 
    334  1.1  christos ACPI_RSCONVERT_INFO     AcpiRsConvertUartSerialBus[22] =
    335  1.1  christos {
    336  1.1  christos     {ACPI_RSC_INITGET,  ACPI_RESOURCE_TYPE_SERIAL_BUS,
    337  1.1  christos                         ACPI_RS_SIZE (ACPI_RESOURCE_UART_SERIALBUS),
    338  1.1  christos                         ACPI_RSC_TABLE_SIZE (AcpiRsConvertUartSerialBus)},
    339  1.1  christos 
    340  1.1  christos     {ACPI_RSC_INITSET,  ACPI_RESOURCE_NAME_SERIAL_BUS,
    341  1.1  christos                         sizeof (AML_RESOURCE_UART_SERIALBUS),
    342  1.1  christos                         0},
    343  1.1  christos 
    344  1.1  christos     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.RevisionId),
    345  1.1  christos                         AML_OFFSET (CommonSerialBus.RevisionId),
    346  1.1  christos                         1},
    347  1.1  christos 
    348  1.1  christos     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.Type),
    349  1.1  christos                         AML_OFFSET (CommonSerialBus.Type),
    350  1.1  christos                         1},
    351  1.1  christos 
    352  1.1  christos     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.SlaveMode),
    353  1.1  christos                         AML_OFFSET (CommonSerialBus.Flags),
    354  1.1  christos                         0},
    355  1.1  christos 
    356  1.1  christos     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ProducerConsumer),
    357  1.1  christos                         AML_OFFSET (CommonSerialBus.Flags),
    358  1.1  christos                         1},
    359  1.1  christos 
    360  1.1  christos     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId),
    361  1.1  christos                         AML_OFFSET (CommonSerialBus.TypeRevisionId),
    362  1.1  christos                         1},
    363  1.1  christos 
    364  1.1  christos     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.CommonSerialBus.TypeDataLength),
    365  1.1  christos                         AML_OFFSET (CommonSerialBus.TypeDataLength),
    366  1.1  christos                         1},
    367  1.1  christos 
    368  1.1  christos     /* Vendor data */
    369  1.1  christos 
    370  1.1  christos     {ACPI_RSC_COUNT_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorLength),
    371  1.1  christos                         AML_OFFSET (CommonSerialBus.TypeDataLength),
    372  1.1  christos                         AML_RESOURCE_UART_MIN_DATA_LEN},
    373  1.1  christos 
    374  1.1  christos     {ACPI_RSC_MOVE_SERIAL_VEN,  ACPI_RS_OFFSET (Data.CommonSerialBus.VendorData),
    375  1.1  christos                         0,
    376  1.1  christos                         sizeof (AML_RESOURCE_UART_SERIALBUS)},
    377  1.1  christos 
    378  1.1  christos     /* Resource Source */
    379  1.1  christos 
    380  1.1  christos     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.Index),
    381  1.1  christos                         AML_OFFSET (CommonSerialBus.ResSourceIndex),
    382  1.1  christos                         1},
    383  1.1  christos 
    384  1.1  christos     {ACPI_RSC_COUNT_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringLength),
    385  1.1  christos                         AML_OFFSET (CommonSerialBus.TypeDataLength),
    386  1.1  christos                         sizeof (AML_RESOURCE_COMMON_SERIALBUS)},
    387  1.1  christos 
    388  1.1  christos     {ACPI_RSC_MOVE_SERIAL_RES,  ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringPtr),
    389  1.1  christos                         AML_OFFSET (CommonSerialBus.TypeDataLength),
    390  1.1  christos                         sizeof (AML_RESOURCE_COMMON_SERIALBUS)},
    391  1.1  christos 
    392  1.1  christos     /* Uart bus type specific  */
    393  1.1  christos 
    394  1.1  christos     {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.FlowControl),
    395  1.1  christos                         AML_OFFSET (UartSerialBus.TypeSpecificFlags),
    396  1.1  christos                         0},
    397  1.1  christos 
    398  1.1  christos     {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.StopBits),
    399  1.1  christos                         AML_OFFSET (UartSerialBus.TypeSpecificFlags),
    400  1.1  christos                         2},
    401  1.1  christos 
    402  1.1  christos     {ACPI_RSC_3BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.DataBits),
    403  1.1  christos                         AML_OFFSET (UartSerialBus.TypeSpecificFlags),
    404  1.1  christos                         4},
    405  1.1  christos 
    406  1.1  christos     {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.Endian),
    407  1.1  christos                         AML_OFFSET (UartSerialBus.TypeSpecificFlags),
    408  1.1  christos                         7},
    409  1.1  christos 
    410  1.1  christos     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.UartSerialBus.Parity),
    411  1.1  christos                         AML_OFFSET (UartSerialBus.Parity),
    412  1.1  christos                         1},
    413  1.1  christos 
    414  1.1  christos     {ACPI_RSC_MOVE8,    ACPI_RS_OFFSET (Data.UartSerialBus.LinesEnabled),
    415  1.1  christos                         AML_OFFSET (UartSerialBus.LinesEnabled),
    416  1.1  christos                         1},
    417  1.1  christos 
    418  1.1  christos     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.UartSerialBus.RxFifoSize),
    419  1.1  christos                         AML_OFFSET (UartSerialBus.RxFifoSize),
    420  1.1  christos                         1},
    421  1.1  christos 
    422  1.1  christos     {ACPI_RSC_MOVE16,   ACPI_RS_OFFSET (Data.UartSerialBus.TxFifoSize),
    423  1.1  christos                         AML_OFFSET (UartSerialBus.TxFifoSize),
    424  1.1  christos                         1},
    425  1.1  christos 
    426  1.1  christos     {ACPI_RSC_MOVE32,   ACPI_RS_OFFSET (Data.UartSerialBus.DefaultBaudRate),
    427  1.1  christos                         AML_OFFSET (UartSerialBus.DefaultBaudRate),
    428  1.1  christos                         1},
    429  1.1  christos };
    430