rsserial.c revision 306536
1227896Sjkim/******************************************************************************* 2227896Sjkim * 3227896Sjkim * Module Name: rsserial - GPIO/SerialBus resource descriptors 4227896Sjkim * 5227896Sjkim ******************************************************************************/ 6227896Sjkim 7227896Sjkim/* 8306536Sjkim * Copyright (C) 2000 - 2016, 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 44228110Sjkim#include <contrib/dev/acpica/include/acpi.h> 45228110Sjkim#include <contrib/dev/acpica/include/accommon.h> 46228110Sjkim#include <contrib/dev/acpica/include/acresrc.h> 47227896Sjkim 48227896Sjkim#define _COMPONENT ACPI_RESOURCES 49227896Sjkim ACPI_MODULE_NAME ("rsserial") 50227896Sjkim 51227896Sjkim 52227896Sjkim/******************************************************************************* 53227896Sjkim * 54227896Sjkim * AcpiRsConvertGpio 55227896Sjkim * 56227896Sjkim ******************************************************************************/ 57227896Sjkim 58245582SjkimACPI_RSCONVERT_INFO AcpiRsConvertGpio[18] = 59227896Sjkim{ 60227896Sjkim {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_GPIO, 61227896Sjkim ACPI_RS_SIZE (ACPI_RESOURCE_GPIO), 62227896Sjkim ACPI_RSC_TABLE_SIZE (AcpiRsConvertGpio)}, 63227896Sjkim 64227896Sjkim {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_GPIO, 65227896Sjkim sizeof (AML_RESOURCE_GPIO), 66227896Sjkim 0}, 67227896Sjkim 68227896Sjkim /* 69227896Sjkim * These fields are contiguous in both the source and destination: 70227896Sjkim * RevisionId 71227896Sjkim * ConnectionType 72227896Sjkim */ 73227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.Gpio.RevisionId), 74227896Sjkim AML_OFFSET (Gpio.RevisionId), 75227896Sjkim 2}, 76227896Sjkim 77227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.ProducerConsumer), 78227896Sjkim AML_OFFSET (Gpio.Flags), 79227896Sjkim 0}, 80227896Sjkim 81245582Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.Sharable), 82227896Sjkim AML_OFFSET (Gpio.IntFlags), 83227896Sjkim 3}, 84227896Sjkim 85245582Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.WakeCapable), 86245582Sjkim AML_OFFSET (Gpio.IntFlags), 87245582Sjkim 4}, 88245582Sjkim 89227896Sjkim {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.Gpio.IoRestriction), 90227896Sjkim AML_OFFSET (Gpio.IntFlags), 91227896Sjkim 0}, 92227896Sjkim 93227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.Triggering), 94227896Sjkim AML_OFFSET (Gpio.IntFlags), 95227896Sjkim 0}, 96227896Sjkim 97227896Sjkim {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.Gpio.Polarity), 98227896Sjkim AML_OFFSET (Gpio.IntFlags), 99227896Sjkim 1}, 100227896Sjkim 101227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.Gpio.PinConfig), 102227896Sjkim AML_OFFSET (Gpio.PinConfig), 103227896Sjkim 1}, 104227896Sjkim 105227896Sjkim /* 106227896Sjkim * These fields are contiguous in both the source and destination: 107227896Sjkim * DriveStrength 108227896Sjkim * DebounceTimeout 109227896Sjkim */ 110227896Sjkim {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.Gpio.DriveStrength), 111227896Sjkim AML_OFFSET (Gpio.DriveStrength), 112227896Sjkim 2}, 113227896Sjkim 114227896Sjkim /* Pin Table */ 115227896Sjkim 116227896Sjkim {ACPI_RSC_COUNT_GPIO_PIN, ACPI_RS_OFFSET (Data.Gpio.PinTableLength), 117227896Sjkim AML_OFFSET (Gpio.PinTableOffset), 118227896Sjkim AML_OFFSET (Gpio.ResSourceOffset)}, 119227896Sjkim 120227896Sjkim {ACPI_RSC_MOVE_GPIO_PIN, ACPI_RS_OFFSET (Data.Gpio.PinTable), 121227896Sjkim AML_OFFSET (Gpio.PinTableOffset), 122227896Sjkim 0}, 123227896Sjkim 124227896Sjkim /* Resource Source */ 125227896Sjkim 126227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.Gpio.ResourceSource.Index), 127227896Sjkim AML_OFFSET (Gpio.ResSourceIndex), 128227896Sjkim 1}, 129227896Sjkim 130227896Sjkim {ACPI_RSC_COUNT_GPIO_RES, ACPI_RS_OFFSET (Data.Gpio.ResourceSource.StringLength), 131227896Sjkim AML_OFFSET (Gpio.ResSourceOffset), 132227896Sjkim AML_OFFSET (Gpio.VendorOffset)}, 133227896Sjkim 134227896Sjkim {ACPI_RSC_MOVE_GPIO_RES, ACPI_RS_OFFSET (Data.Gpio.ResourceSource.StringPtr), 135227896Sjkim AML_OFFSET (Gpio.ResSourceOffset), 136227896Sjkim 0}, 137227896Sjkim 138227896Sjkim /* Vendor Data */ 139227896Sjkim 140227896Sjkim {ACPI_RSC_COUNT_GPIO_VEN, ACPI_RS_OFFSET (Data.Gpio.VendorLength), 141227896Sjkim AML_OFFSET (Gpio.VendorLength), 142227896Sjkim 1}, 143227896Sjkim 144227896Sjkim {ACPI_RSC_MOVE_GPIO_RES, ACPI_RS_OFFSET (Data.Gpio.VendorData), 145227896Sjkim AML_OFFSET (Gpio.VendorOffset), 146227896Sjkim 0}, 147227896Sjkim}; 148227896Sjkim 149227896Sjkim 150227896Sjkim/******************************************************************************* 151227896Sjkim * 152227896Sjkim * AcpiRsConvertI2cSerialBus 153227896Sjkim * 154227896Sjkim ******************************************************************************/ 155227896Sjkim 156306536SjkimACPI_RSCONVERT_INFO AcpiRsConvertI2cSerialBus[17] = 157227896Sjkim{ 158227896Sjkim {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS, 159227896Sjkim ACPI_RS_SIZE (ACPI_RESOURCE_I2C_SERIALBUS), 160227896Sjkim ACPI_RSC_TABLE_SIZE (AcpiRsConvertI2cSerialBus)}, 161227896Sjkim 162227896Sjkim {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_SERIAL_BUS, 163227896Sjkim sizeof (AML_RESOURCE_I2C_SERIALBUS), 164227896Sjkim 0}, 165227896Sjkim 166227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.RevisionId), 167227896Sjkim AML_OFFSET (CommonSerialBus.RevisionId), 168227896Sjkim 1}, 169227896Sjkim 170227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.Type), 171227896Sjkim AML_OFFSET (CommonSerialBus.Type), 172227896Sjkim 1}, 173227896Sjkim 174227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.SlaveMode), 175227896Sjkim AML_OFFSET (CommonSerialBus.Flags), 176227896Sjkim 0}, 177227896Sjkim 178227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ProducerConsumer), 179227896Sjkim AML_OFFSET (CommonSerialBus.Flags), 180227896Sjkim 1}, 181227896Sjkim 182306536Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ConnectionSharing), 183306536Sjkim AML_OFFSET (CommonSerialBus.Flags), 184306536Sjkim 2}, 185306536Sjkim 186227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId), 187227896Sjkim AML_OFFSET (CommonSerialBus.TypeRevisionId), 188227896Sjkim 1}, 189227896Sjkim 190227896Sjkim {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeDataLength), 191227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 192227896Sjkim 1}, 193227896Sjkim 194227896Sjkim /* Vendor data */ 195227896Sjkim 196227896Sjkim {ACPI_RSC_COUNT_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorLength), 197227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 198227896Sjkim AML_RESOURCE_I2C_MIN_DATA_LEN}, 199227896Sjkim 200227896Sjkim {ACPI_RSC_MOVE_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorData), 201227896Sjkim 0, 202227896Sjkim sizeof (AML_RESOURCE_I2C_SERIALBUS)}, 203227896Sjkim 204227896Sjkim /* Resource Source */ 205227896Sjkim 206227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.Index), 207227896Sjkim AML_OFFSET (CommonSerialBus.ResSourceIndex), 208227896Sjkim 1}, 209227896Sjkim 210227896Sjkim {ACPI_RSC_COUNT_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringLength), 211227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 212227896Sjkim sizeof (AML_RESOURCE_COMMON_SERIALBUS)}, 213227896Sjkim 214227896Sjkim {ACPI_RSC_MOVE_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringPtr), 215227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 216227896Sjkim sizeof (AML_RESOURCE_COMMON_SERIALBUS)}, 217227896Sjkim 218227896Sjkim /* I2C bus type specific */ 219227896Sjkim 220227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.I2cSerialBus.AccessMode), 221227896Sjkim AML_OFFSET (I2cSerialBus.TypeSpecificFlags), 222227896Sjkim 0}, 223227896Sjkim 224227896Sjkim {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.I2cSerialBus.ConnectionSpeed), 225227896Sjkim AML_OFFSET (I2cSerialBus.ConnectionSpeed), 226227896Sjkim 1}, 227227896Sjkim 228227896Sjkim {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.I2cSerialBus.SlaveAddress), 229227896Sjkim AML_OFFSET (I2cSerialBus.SlaveAddress), 230227896Sjkim 1}, 231227896Sjkim}; 232227896Sjkim 233227896Sjkim 234227896Sjkim/******************************************************************************* 235227896Sjkim * 236227896Sjkim * AcpiRsConvertSpiSerialBus 237227896Sjkim * 238227896Sjkim ******************************************************************************/ 239227896Sjkim 240306536SjkimACPI_RSCONVERT_INFO AcpiRsConvertSpiSerialBus[21] = 241227896Sjkim{ 242227896Sjkim {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS, 243227896Sjkim ACPI_RS_SIZE (ACPI_RESOURCE_SPI_SERIALBUS), 244227896Sjkim ACPI_RSC_TABLE_SIZE (AcpiRsConvertSpiSerialBus)}, 245227896Sjkim 246227896Sjkim {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_SERIAL_BUS, 247227896Sjkim sizeof (AML_RESOURCE_SPI_SERIALBUS), 248227896Sjkim 0}, 249227896Sjkim 250227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.RevisionId), 251227896Sjkim AML_OFFSET (CommonSerialBus.RevisionId), 252227896Sjkim 1}, 253227896Sjkim 254227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.Type), 255227896Sjkim AML_OFFSET (CommonSerialBus.Type), 256227896Sjkim 1}, 257227896Sjkim 258227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.SlaveMode), 259227896Sjkim AML_OFFSET (CommonSerialBus.Flags), 260227896Sjkim 0}, 261227896Sjkim 262227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ProducerConsumer), 263227896Sjkim AML_OFFSET (CommonSerialBus.Flags), 264227896Sjkim 1}, 265227896Sjkim 266306536Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ConnectionSharing), 267306536Sjkim AML_OFFSET (CommonSerialBus.Flags), 268306536Sjkim 2}, 269306536Sjkim 270227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId), 271227896Sjkim AML_OFFSET (CommonSerialBus.TypeRevisionId), 272227896Sjkim 1}, 273227896Sjkim 274227896Sjkim {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeDataLength), 275227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 276227896Sjkim 1}, 277227896Sjkim 278227896Sjkim /* Vendor data */ 279227896Sjkim 280227896Sjkim {ACPI_RSC_COUNT_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorLength), 281227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 282227896Sjkim AML_RESOURCE_SPI_MIN_DATA_LEN}, 283227896Sjkim 284227896Sjkim {ACPI_RSC_MOVE_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorData), 285227896Sjkim 0, 286227896Sjkim sizeof (AML_RESOURCE_SPI_SERIALBUS)}, 287227896Sjkim 288227896Sjkim /* Resource Source */ 289227896Sjkim 290227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.Index), 291227896Sjkim AML_OFFSET (CommonSerialBus.ResSourceIndex), 292227896Sjkim 1}, 293227896Sjkim 294227896Sjkim {ACPI_RSC_COUNT_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringLength), 295227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 296227896Sjkim sizeof (AML_RESOURCE_COMMON_SERIALBUS)}, 297227896Sjkim 298227896Sjkim {ACPI_RSC_MOVE_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringPtr), 299227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 300227896Sjkim sizeof (AML_RESOURCE_COMMON_SERIALBUS)}, 301227896Sjkim 302227896Sjkim /* Spi bus type specific */ 303227896Sjkim 304227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.SpiSerialBus.WireMode), 305227896Sjkim AML_OFFSET (SpiSerialBus.TypeSpecificFlags), 306227896Sjkim 0}, 307227896Sjkim 308227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.SpiSerialBus.DevicePolarity), 309227896Sjkim AML_OFFSET (SpiSerialBus.TypeSpecificFlags), 310227896Sjkim 1}, 311227896Sjkim 312227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.SpiSerialBus.DataBitLength), 313227896Sjkim AML_OFFSET (SpiSerialBus.DataBitLength), 314227896Sjkim 1}, 315227896Sjkim 316227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.SpiSerialBus.ClockPhase), 317227896Sjkim AML_OFFSET (SpiSerialBus.ClockPhase), 318227896Sjkim 1}, 319227896Sjkim 320227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.SpiSerialBus.ClockPolarity), 321227896Sjkim AML_OFFSET (SpiSerialBus.ClockPolarity), 322227896Sjkim 1}, 323227896Sjkim 324227896Sjkim {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.SpiSerialBus.DeviceSelection), 325227896Sjkim AML_OFFSET (SpiSerialBus.DeviceSelection), 326227896Sjkim 1}, 327227896Sjkim 328227896Sjkim {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.SpiSerialBus.ConnectionSpeed), 329227896Sjkim AML_OFFSET (SpiSerialBus.ConnectionSpeed), 330227896Sjkim 1}, 331227896Sjkim}; 332227896Sjkim 333227896Sjkim 334227896Sjkim/******************************************************************************* 335227896Sjkim * 336227896Sjkim * AcpiRsConvertUartSerialBus 337227896Sjkim * 338227896Sjkim ******************************************************************************/ 339227896Sjkim 340306536SjkimACPI_RSCONVERT_INFO AcpiRsConvertUartSerialBus[23] = 341227896Sjkim{ 342227896Sjkim {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS, 343227896Sjkim ACPI_RS_SIZE (ACPI_RESOURCE_UART_SERIALBUS), 344227896Sjkim ACPI_RSC_TABLE_SIZE (AcpiRsConvertUartSerialBus)}, 345227896Sjkim 346227896Sjkim {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_SERIAL_BUS, 347227896Sjkim sizeof (AML_RESOURCE_UART_SERIALBUS), 348227896Sjkim 0}, 349227896Sjkim 350227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.RevisionId), 351227896Sjkim AML_OFFSET (CommonSerialBus.RevisionId), 352227896Sjkim 1}, 353227896Sjkim 354227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.Type), 355227896Sjkim AML_OFFSET (CommonSerialBus.Type), 356227896Sjkim 1}, 357227896Sjkim 358227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.SlaveMode), 359227896Sjkim AML_OFFSET (CommonSerialBus.Flags), 360227896Sjkim 0}, 361227896Sjkim 362227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ProducerConsumer), 363227896Sjkim AML_OFFSET (CommonSerialBus.Flags), 364227896Sjkim 1}, 365227896Sjkim 366306536Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ConnectionSharing), 367306536Sjkim AML_OFFSET (CommonSerialBus.Flags), 368306536Sjkim 2}, 369306536Sjkim 370227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId), 371227896Sjkim AML_OFFSET (CommonSerialBus.TypeRevisionId), 372227896Sjkim 1}, 373227896Sjkim 374227896Sjkim {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeDataLength), 375227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 376227896Sjkim 1}, 377227896Sjkim 378227896Sjkim /* Vendor data */ 379227896Sjkim 380227896Sjkim {ACPI_RSC_COUNT_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorLength), 381227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 382227896Sjkim AML_RESOURCE_UART_MIN_DATA_LEN}, 383227896Sjkim 384227896Sjkim {ACPI_RSC_MOVE_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorData), 385227896Sjkim 0, 386227896Sjkim sizeof (AML_RESOURCE_UART_SERIALBUS)}, 387227896Sjkim 388227896Sjkim /* Resource Source */ 389227896Sjkim 390227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.Index), 391227896Sjkim AML_OFFSET (CommonSerialBus.ResSourceIndex), 392227896Sjkim 1}, 393227896Sjkim 394227896Sjkim {ACPI_RSC_COUNT_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringLength), 395227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 396227896Sjkim sizeof (AML_RESOURCE_COMMON_SERIALBUS)}, 397227896Sjkim 398227896Sjkim {ACPI_RSC_MOVE_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringPtr), 399227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 400227896Sjkim sizeof (AML_RESOURCE_COMMON_SERIALBUS)}, 401227896Sjkim 402227896Sjkim /* Uart bus type specific */ 403227896Sjkim 404227896Sjkim {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.FlowControl), 405227896Sjkim AML_OFFSET (UartSerialBus.TypeSpecificFlags), 406227896Sjkim 0}, 407227896Sjkim 408227896Sjkim {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.StopBits), 409227896Sjkim AML_OFFSET (UartSerialBus.TypeSpecificFlags), 410227896Sjkim 2}, 411227896Sjkim 412227896Sjkim {ACPI_RSC_3BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.DataBits), 413227896Sjkim AML_OFFSET (UartSerialBus.TypeSpecificFlags), 414227896Sjkim 4}, 415227896Sjkim 416227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.Endian), 417227896Sjkim AML_OFFSET (UartSerialBus.TypeSpecificFlags), 418227896Sjkim 7}, 419227896Sjkim 420227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.UartSerialBus.Parity), 421227896Sjkim AML_OFFSET (UartSerialBus.Parity), 422227896Sjkim 1}, 423227896Sjkim 424227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.UartSerialBus.LinesEnabled), 425227896Sjkim AML_OFFSET (UartSerialBus.LinesEnabled), 426227896Sjkim 1}, 427227896Sjkim 428227896Sjkim {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.UartSerialBus.RxFifoSize), 429227896Sjkim AML_OFFSET (UartSerialBus.RxFifoSize), 430227896Sjkim 1}, 431227896Sjkim 432227896Sjkim {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.UartSerialBus.TxFifoSize), 433227896Sjkim AML_OFFSET (UartSerialBus.TxFifoSize), 434227896Sjkim 1}, 435227896Sjkim 436227896Sjkim {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.UartSerialBus.DefaultBaudRate), 437227896Sjkim AML_OFFSET (UartSerialBus.DefaultBaudRate), 438227896Sjkim 1}, 439227896Sjkim}; 440