rsserial.c revision 228110
1227896Sjkim/******************************************************************************* 2227896Sjkim * 3227896Sjkim * Module Name: rsserial - GPIO/SerialBus resource descriptors 4227896Sjkim * 5227896Sjkim ******************************************************************************/ 6227896Sjkim 7227896Sjkim/* 8227896Sjkim * Copyright (C) 2000 - 2011, Intel Corp. 9227896Sjkim * All rights reserved. 10227896Sjkim * 11227896Sjkim * Redistribution and use in source and binary forms, with or without 12227896Sjkim * modification, are permitted provided that the following conditions 13227896Sjkim * are met: 14227896Sjkim * 1. Redistributions of source code must retain the above copyright 15227896Sjkim * notice, this list of conditions, and the following disclaimer, 16227896Sjkim * without modification. 17227896Sjkim * 2. Redistributions in binary form must reproduce at minimum a disclaimer 18227896Sjkim * substantially similar to the "NO WARRANTY" disclaimer below 19227896Sjkim * ("Disclaimer") and any redistribution must be conditioned upon 20227896Sjkim * including a substantially similar Disclaimer requirement for further 21227896Sjkim * binary redistribution. 22227896Sjkim * 3. Neither the names of the above-listed copyright holders nor the names 23227896Sjkim * of any contributors may be used to endorse or promote products derived 24227896Sjkim * from this software without specific prior written permission. 25227896Sjkim * 26227896Sjkim * Alternatively, this software may be distributed under the terms of the 27227896Sjkim * GNU General Public License ("GPL") version 2 as published by the Free 28227896Sjkim * Software Foundation. 29227896Sjkim * 30227896Sjkim * NO WARRANTY 31227896Sjkim * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 32227896Sjkim * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 33227896Sjkim * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR 34227896Sjkim * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 35227896Sjkim * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 36227896Sjkim * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 37227896Sjkim * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 38227896Sjkim * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 39227896Sjkim * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 40227896Sjkim * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 41227896Sjkim * POSSIBILITY OF SUCH DAMAGES. 42227896Sjkim */ 43227896Sjkim 44227896Sjkim#define __RSIRQ_C__ 45227896Sjkim 46228110Sjkim#include <contrib/dev/acpica/include/acpi.h> 47228110Sjkim#include <contrib/dev/acpica/include/accommon.h> 48228110Sjkim#include <contrib/dev/acpica/include/acresrc.h> 49227896Sjkim 50227896Sjkim#define _COMPONENT ACPI_RESOURCES 51227896Sjkim ACPI_MODULE_NAME ("rsserial") 52227896Sjkim 53227896Sjkim 54227896Sjkim/******************************************************************************* 55227896Sjkim * 56227896Sjkim * AcpiRsConvertGpio 57227896Sjkim * 58227896Sjkim ******************************************************************************/ 59227896Sjkim 60227896SjkimACPI_RSCONVERT_INFO AcpiRsConvertGpio[17] = 61227896Sjkim{ 62227896Sjkim {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_GPIO, 63227896Sjkim ACPI_RS_SIZE (ACPI_RESOURCE_GPIO), 64227896Sjkim ACPI_RSC_TABLE_SIZE (AcpiRsConvertGpio)}, 65227896Sjkim 66227896Sjkim {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_GPIO, 67227896Sjkim sizeof (AML_RESOURCE_GPIO), 68227896Sjkim 0}, 69227896Sjkim 70227896Sjkim /* 71227896Sjkim * These fields are contiguous in both the source and destination: 72227896Sjkim * RevisionId 73227896Sjkim * ConnectionType 74227896Sjkim */ 75227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.Gpio.RevisionId), 76227896Sjkim AML_OFFSET (Gpio.RevisionId), 77227896Sjkim 2}, 78227896Sjkim 79227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.ProducerConsumer), 80227896Sjkim AML_OFFSET (Gpio.Flags), 81227896Sjkim 0}, 82227896Sjkim 83227896Sjkim {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.Gpio.Sharable), 84227896Sjkim AML_OFFSET (Gpio.IntFlags), 85227896Sjkim 3}, 86227896Sjkim 87227896Sjkim {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.Gpio.IoRestriction), 88227896Sjkim AML_OFFSET (Gpio.IntFlags), 89227896Sjkim 0}, 90227896Sjkim 91227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.Triggering), 92227896Sjkim AML_OFFSET (Gpio.IntFlags), 93227896Sjkim 0}, 94227896Sjkim 95227896Sjkim {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.Gpio.Polarity), 96227896Sjkim AML_OFFSET (Gpio.IntFlags), 97227896Sjkim 1}, 98227896Sjkim 99227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.Gpio.PinConfig), 100227896Sjkim AML_OFFSET (Gpio.PinConfig), 101227896Sjkim 1}, 102227896Sjkim 103227896Sjkim /* 104227896Sjkim * These fields are contiguous in both the source and destination: 105227896Sjkim * DriveStrength 106227896Sjkim * DebounceTimeout 107227896Sjkim */ 108227896Sjkim {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.Gpio.DriveStrength), 109227896Sjkim AML_OFFSET (Gpio.DriveStrength), 110227896Sjkim 2}, 111227896Sjkim 112227896Sjkim /* Pin Table */ 113227896Sjkim 114227896Sjkim {ACPI_RSC_COUNT_GPIO_PIN, ACPI_RS_OFFSET (Data.Gpio.PinTableLength), 115227896Sjkim AML_OFFSET (Gpio.PinTableOffset), 116227896Sjkim AML_OFFSET (Gpio.ResSourceOffset)}, 117227896Sjkim 118227896Sjkim {ACPI_RSC_MOVE_GPIO_PIN, ACPI_RS_OFFSET (Data.Gpio.PinTable), 119227896Sjkim AML_OFFSET (Gpio.PinTableOffset), 120227896Sjkim 0}, 121227896Sjkim 122227896Sjkim /* Resource Source */ 123227896Sjkim 124227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.Gpio.ResourceSource.Index), 125227896Sjkim AML_OFFSET (Gpio.ResSourceIndex), 126227896Sjkim 1}, 127227896Sjkim 128227896Sjkim {ACPI_RSC_COUNT_GPIO_RES, ACPI_RS_OFFSET (Data.Gpio.ResourceSource.StringLength), 129227896Sjkim AML_OFFSET (Gpio.ResSourceOffset), 130227896Sjkim AML_OFFSET (Gpio.VendorOffset)}, 131227896Sjkim 132227896Sjkim {ACPI_RSC_MOVE_GPIO_RES, ACPI_RS_OFFSET (Data.Gpio.ResourceSource.StringPtr), 133227896Sjkim AML_OFFSET (Gpio.ResSourceOffset), 134227896Sjkim 0}, 135227896Sjkim 136227896Sjkim /* Vendor Data */ 137227896Sjkim 138227896Sjkim {ACPI_RSC_COUNT_GPIO_VEN, ACPI_RS_OFFSET (Data.Gpio.VendorLength), 139227896Sjkim AML_OFFSET (Gpio.VendorLength), 140227896Sjkim 1}, 141227896Sjkim 142227896Sjkim {ACPI_RSC_MOVE_GPIO_RES, ACPI_RS_OFFSET (Data.Gpio.VendorData), 143227896Sjkim AML_OFFSET (Gpio.VendorOffset), 144227896Sjkim 0}, 145227896Sjkim}; 146227896Sjkim 147227896Sjkim 148227896Sjkim/******************************************************************************* 149227896Sjkim * 150227896Sjkim * AcpiRsConvertI2cSerialBus 151227896Sjkim * 152227896Sjkim ******************************************************************************/ 153227896Sjkim 154227896SjkimACPI_RSCONVERT_INFO AcpiRsConvertI2cSerialBus[16] = 155227896Sjkim{ 156227896Sjkim {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS, 157227896Sjkim ACPI_RS_SIZE (ACPI_RESOURCE_I2C_SERIALBUS), 158227896Sjkim ACPI_RSC_TABLE_SIZE (AcpiRsConvertI2cSerialBus)}, 159227896Sjkim 160227896Sjkim {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_SERIAL_BUS, 161227896Sjkim sizeof (AML_RESOURCE_I2C_SERIALBUS), 162227896Sjkim 0}, 163227896Sjkim 164227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.RevisionId), 165227896Sjkim AML_OFFSET (CommonSerialBus.RevisionId), 166227896Sjkim 1}, 167227896Sjkim 168227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.Type), 169227896Sjkim AML_OFFSET (CommonSerialBus.Type), 170227896Sjkim 1}, 171227896Sjkim 172227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.SlaveMode), 173227896Sjkim AML_OFFSET (CommonSerialBus.Flags), 174227896Sjkim 0}, 175227896Sjkim 176227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ProducerConsumer), 177227896Sjkim AML_OFFSET (CommonSerialBus.Flags), 178227896Sjkim 1}, 179227896Sjkim 180227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId), 181227896Sjkim AML_OFFSET (CommonSerialBus.TypeRevisionId), 182227896Sjkim 1}, 183227896Sjkim 184227896Sjkim {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeDataLength), 185227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 186227896Sjkim 1}, 187227896Sjkim 188227896Sjkim /* Vendor data */ 189227896Sjkim 190227896Sjkim {ACPI_RSC_COUNT_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorLength), 191227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 192227896Sjkim AML_RESOURCE_I2C_MIN_DATA_LEN}, 193227896Sjkim 194227896Sjkim {ACPI_RSC_MOVE_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorData), 195227896Sjkim 0, 196227896Sjkim sizeof (AML_RESOURCE_I2C_SERIALBUS)}, 197227896Sjkim 198227896Sjkim /* Resource Source */ 199227896Sjkim 200227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.Index), 201227896Sjkim AML_OFFSET (CommonSerialBus.ResSourceIndex), 202227896Sjkim 1}, 203227896Sjkim 204227896Sjkim {ACPI_RSC_COUNT_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringLength), 205227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 206227896Sjkim sizeof (AML_RESOURCE_COMMON_SERIALBUS)}, 207227896Sjkim 208227896Sjkim {ACPI_RSC_MOVE_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringPtr), 209227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 210227896Sjkim sizeof (AML_RESOURCE_COMMON_SERIALBUS)}, 211227896Sjkim 212227896Sjkim /* I2C bus type specific */ 213227896Sjkim 214227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.I2cSerialBus.AccessMode), 215227896Sjkim AML_OFFSET (I2cSerialBus.TypeSpecificFlags), 216227896Sjkim 0}, 217227896Sjkim 218227896Sjkim {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.I2cSerialBus.ConnectionSpeed), 219227896Sjkim AML_OFFSET (I2cSerialBus.ConnectionSpeed), 220227896Sjkim 1}, 221227896Sjkim 222227896Sjkim {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.I2cSerialBus.SlaveAddress), 223227896Sjkim AML_OFFSET (I2cSerialBus.SlaveAddress), 224227896Sjkim 1}, 225227896Sjkim}; 226227896Sjkim 227227896Sjkim 228227896Sjkim/******************************************************************************* 229227896Sjkim * 230227896Sjkim * AcpiRsConvertSpiSerialBus 231227896Sjkim * 232227896Sjkim ******************************************************************************/ 233227896Sjkim 234227896SjkimACPI_RSCONVERT_INFO AcpiRsConvertSpiSerialBus[20] = 235227896Sjkim{ 236227896Sjkim {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS, 237227896Sjkim ACPI_RS_SIZE (ACPI_RESOURCE_SPI_SERIALBUS), 238227896Sjkim ACPI_RSC_TABLE_SIZE (AcpiRsConvertSpiSerialBus)}, 239227896Sjkim 240227896Sjkim {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_SERIAL_BUS, 241227896Sjkim sizeof (AML_RESOURCE_SPI_SERIALBUS), 242227896Sjkim 0}, 243227896Sjkim 244227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.RevisionId), 245227896Sjkim AML_OFFSET (CommonSerialBus.RevisionId), 246227896Sjkim 1}, 247227896Sjkim 248227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.Type), 249227896Sjkim AML_OFFSET (CommonSerialBus.Type), 250227896Sjkim 1}, 251227896Sjkim 252227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.SlaveMode), 253227896Sjkim AML_OFFSET (CommonSerialBus.Flags), 254227896Sjkim 0}, 255227896Sjkim 256227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ProducerConsumer), 257227896Sjkim AML_OFFSET (CommonSerialBus.Flags), 258227896Sjkim 1}, 259227896Sjkim 260227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId), 261227896Sjkim AML_OFFSET (CommonSerialBus.TypeRevisionId), 262227896Sjkim 1}, 263227896Sjkim 264227896Sjkim {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeDataLength), 265227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 266227896Sjkim 1}, 267227896Sjkim 268227896Sjkim /* Vendor data */ 269227896Sjkim 270227896Sjkim {ACPI_RSC_COUNT_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorLength), 271227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 272227896Sjkim AML_RESOURCE_SPI_MIN_DATA_LEN}, 273227896Sjkim 274227896Sjkim {ACPI_RSC_MOVE_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorData), 275227896Sjkim 0, 276227896Sjkim sizeof (AML_RESOURCE_SPI_SERIALBUS)}, 277227896Sjkim 278227896Sjkim /* Resource Source */ 279227896Sjkim 280227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.Index), 281227896Sjkim AML_OFFSET (CommonSerialBus.ResSourceIndex), 282227896Sjkim 1}, 283227896Sjkim 284227896Sjkim {ACPI_RSC_COUNT_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringLength), 285227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 286227896Sjkim sizeof (AML_RESOURCE_COMMON_SERIALBUS)}, 287227896Sjkim 288227896Sjkim {ACPI_RSC_MOVE_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringPtr), 289227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 290227896Sjkim sizeof (AML_RESOURCE_COMMON_SERIALBUS)}, 291227896Sjkim 292227896Sjkim /* Spi bus type specific */ 293227896Sjkim 294227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.SpiSerialBus.WireMode), 295227896Sjkim AML_OFFSET (SpiSerialBus.TypeSpecificFlags), 296227896Sjkim 0}, 297227896Sjkim 298227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.SpiSerialBus.DevicePolarity), 299227896Sjkim AML_OFFSET (SpiSerialBus.TypeSpecificFlags), 300227896Sjkim 1}, 301227896Sjkim 302227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.SpiSerialBus.DataBitLength), 303227896Sjkim AML_OFFSET (SpiSerialBus.DataBitLength), 304227896Sjkim 1}, 305227896Sjkim 306227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.SpiSerialBus.ClockPhase), 307227896Sjkim AML_OFFSET (SpiSerialBus.ClockPhase), 308227896Sjkim 1}, 309227896Sjkim 310227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.SpiSerialBus.ClockPolarity), 311227896Sjkim AML_OFFSET (SpiSerialBus.ClockPolarity), 312227896Sjkim 1}, 313227896Sjkim 314227896Sjkim {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.SpiSerialBus.DeviceSelection), 315227896Sjkim AML_OFFSET (SpiSerialBus.DeviceSelection), 316227896Sjkim 1}, 317227896Sjkim 318227896Sjkim {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.SpiSerialBus.ConnectionSpeed), 319227896Sjkim AML_OFFSET (SpiSerialBus.ConnectionSpeed), 320227896Sjkim 1}, 321227896Sjkim}; 322227896Sjkim 323227896Sjkim 324227896Sjkim/******************************************************************************* 325227896Sjkim * 326227896Sjkim * AcpiRsConvertUartSerialBus 327227896Sjkim * 328227896Sjkim ******************************************************************************/ 329227896Sjkim 330227896SjkimACPI_RSCONVERT_INFO AcpiRsConvertUartSerialBus[22] = 331227896Sjkim{ 332227896Sjkim {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS, 333227896Sjkim ACPI_RS_SIZE (ACPI_RESOURCE_UART_SERIALBUS), 334227896Sjkim ACPI_RSC_TABLE_SIZE (AcpiRsConvertUartSerialBus)}, 335227896Sjkim 336227896Sjkim {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_SERIAL_BUS, 337227896Sjkim sizeof (AML_RESOURCE_UART_SERIALBUS), 338227896Sjkim 0}, 339227896Sjkim 340227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.RevisionId), 341227896Sjkim AML_OFFSET (CommonSerialBus.RevisionId), 342227896Sjkim 1}, 343227896Sjkim 344227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.Type), 345227896Sjkim AML_OFFSET (CommonSerialBus.Type), 346227896Sjkim 1}, 347227896Sjkim 348227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.SlaveMode), 349227896Sjkim AML_OFFSET (CommonSerialBus.Flags), 350227896Sjkim 0}, 351227896Sjkim 352227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ProducerConsumer), 353227896Sjkim AML_OFFSET (CommonSerialBus.Flags), 354227896Sjkim 1}, 355227896Sjkim 356227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId), 357227896Sjkim AML_OFFSET (CommonSerialBus.TypeRevisionId), 358227896Sjkim 1}, 359227896Sjkim 360227896Sjkim {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeDataLength), 361227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 362227896Sjkim 1}, 363227896Sjkim 364227896Sjkim /* Vendor data */ 365227896Sjkim 366227896Sjkim {ACPI_RSC_COUNT_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorLength), 367227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 368227896Sjkim AML_RESOURCE_UART_MIN_DATA_LEN}, 369227896Sjkim 370227896Sjkim {ACPI_RSC_MOVE_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorData), 371227896Sjkim 0, 372227896Sjkim sizeof (AML_RESOURCE_UART_SERIALBUS)}, 373227896Sjkim 374227896Sjkim /* Resource Source */ 375227896Sjkim 376227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.Index), 377227896Sjkim AML_OFFSET (CommonSerialBus.ResSourceIndex), 378227896Sjkim 1}, 379227896Sjkim 380227896Sjkim {ACPI_RSC_COUNT_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringLength), 381227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 382227896Sjkim sizeof (AML_RESOURCE_COMMON_SERIALBUS)}, 383227896Sjkim 384227896Sjkim {ACPI_RSC_MOVE_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringPtr), 385227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 386227896Sjkim sizeof (AML_RESOURCE_COMMON_SERIALBUS)}, 387227896Sjkim 388227896Sjkim /* Uart bus type specific */ 389227896Sjkim 390227896Sjkim {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.FlowControl), 391227896Sjkim AML_OFFSET (UartSerialBus.TypeSpecificFlags), 392227896Sjkim 0}, 393227896Sjkim 394227896Sjkim {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.StopBits), 395227896Sjkim AML_OFFSET (UartSerialBus.TypeSpecificFlags), 396227896Sjkim 2}, 397227896Sjkim 398227896Sjkim {ACPI_RSC_3BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.DataBits), 399227896Sjkim AML_OFFSET (UartSerialBus.TypeSpecificFlags), 400227896Sjkim 4}, 401227896Sjkim 402227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.Endian), 403227896Sjkim AML_OFFSET (UartSerialBus.TypeSpecificFlags), 404227896Sjkim 7}, 405227896Sjkim 406227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.UartSerialBus.Parity), 407227896Sjkim AML_OFFSET (UartSerialBus.Parity), 408227896Sjkim 1}, 409227896Sjkim 410227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.UartSerialBus.LinesEnabled), 411227896Sjkim AML_OFFSET (UartSerialBus.LinesEnabled), 412227896Sjkim 1}, 413227896Sjkim 414227896Sjkim {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.UartSerialBus.RxFifoSize), 415227896Sjkim AML_OFFSET (UartSerialBus.RxFifoSize), 416227896Sjkim 1}, 417227896Sjkim 418227896Sjkim {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.UartSerialBus.TxFifoSize), 419227896Sjkim AML_OFFSET (UartSerialBus.TxFifoSize), 420227896Sjkim 1}, 421227896Sjkim 422227896Sjkim {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.UartSerialBus.DefaultBaudRate), 423227896Sjkim AML_OFFSET (UartSerialBus.DefaultBaudRate), 424227896Sjkim 1}, 425227896Sjkim}; 426