rsserial.c revision 245582
1227896Sjkim/******************************************************************************* 2227896Sjkim * 3227896Sjkim * Module Name: rsserial - GPIO/SerialBus resource descriptors 4227896Sjkim * 5227896Sjkim ******************************************************************************/ 6227896Sjkim 7227896Sjkim/* 8245582Sjkim * Copyright (C) 2000 - 2013, 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 60245582SjkimACPI_RSCONVERT_INFO AcpiRsConvertGpio[18] = 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 83245582Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.Sharable), 84227896Sjkim AML_OFFSET (Gpio.IntFlags), 85227896Sjkim 3}, 86227896Sjkim 87245582Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.WakeCapable), 88245582Sjkim AML_OFFSET (Gpio.IntFlags), 89245582Sjkim 4}, 90245582Sjkim 91227896Sjkim {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.Gpio.IoRestriction), 92227896Sjkim AML_OFFSET (Gpio.IntFlags), 93227896Sjkim 0}, 94227896Sjkim 95227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.Triggering), 96227896Sjkim AML_OFFSET (Gpio.IntFlags), 97227896Sjkim 0}, 98227896Sjkim 99227896Sjkim {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.Gpio.Polarity), 100227896Sjkim AML_OFFSET (Gpio.IntFlags), 101227896Sjkim 1}, 102227896Sjkim 103227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.Gpio.PinConfig), 104227896Sjkim AML_OFFSET (Gpio.PinConfig), 105227896Sjkim 1}, 106227896Sjkim 107227896Sjkim /* 108227896Sjkim * These fields are contiguous in both the source and destination: 109227896Sjkim * DriveStrength 110227896Sjkim * DebounceTimeout 111227896Sjkim */ 112227896Sjkim {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.Gpio.DriveStrength), 113227896Sjkim AML_OFFSET (Gpio.DriveStrength), 114227896Sjkim 2}, 115227896Sjkim 116227896Sjkim /* Pin Table */ 117227896Sjkim 118227896Sjkim {ACPI_RSC_COUNT_GPIO_PIN, ACPI_RS_OFFSET (Data.Gpio.PinTableLength), 119227896Sjkim AML_OFFSET (Gpio.PinTableOffset), 120227896Sjkim AML_OFFSET (Gpio.ResSourceOffset)}, 121227896Sjkim 122227896Sjkim {ACPI_RSC_MOVE_GPIO_PIN, ACPI_RS_OFFSET (Data.Gpio.PinTable), 123227896Sjkim AML_OFFSET (Gpio.PinTableOffset), 124227896Sjkim 0}, 125227896Sjkim 126227896Sjkim /* Resource Source */ 127227896Sjkim 128227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.Gpio.ResourceSource.Index), 129227896Sjkim AML_OFFSET (Gpio.ResSourceIndex), 130227896Sjkim 1}, 131227896Sjkim 132227896Sjkim {ACPI_RSC_COUNT_GPIO_RES, ACPI_RS_OFFSET (Data.Gpio.ResourceSource.StringLength), 133227896Sjkim AML_OFFSET (Gpio.ResSourceOffset), 134227896Sjkim AML_OFFSET (Gpio.VendorOffset)}, 135227896Sjkim 136227896Sjkim {ACPI_RSC_MOVE_GPIO_RES, ACPI_RS_OFFSET (Data.Gpio.ResourceSource.StringPtr), 137227896Sjkim AML_OFFSET (Gpio.ResSourceOffset), 138227896Sjkim 0}, 139227896Sjkim 140227896Sjkim /* Vendor Data */ 141227896Sjkim 142227896Sjkim {ACPI_RSC_COUNT_GPIO_VEN, ACPI_RS_OFFSET (Data.Gpio.VendorLength), 143227896Sjkim AML_OFFSET (Gpio.VendorLength), 144227896Sjkim 1}, 145227896Sjkim 146227896Sjkim {ACPI_RSC_MOVE_GPIO_RES, ACPI_RS_OFFSET (Data.Gpio.VendorData), 147227896Sjkim AML_OFFSET (Gpio.VendorOffset), 148227896Sjkim 0}, 149227896Sjkim}; 150227896Sjkim 151227896Sjkim 152227896Sjkim/******************************************************************************* 153227896Sjkim * 154227896Sjkim * AcpiRsConvertI2cSerialBus 155227896Sjkim * 156227896Sjkim ******************************************************************************/ 157227896Sjkim 158227896SjkimACPI_RSCONVERT_INFO AcpiRsConvertI2cSerialBus[16] = 159227896Sjkim{ 160227896Sjkim {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS, 161227896Sjkim ACPI_RS_SIZE (ACPI_RESOURCE_I2C_SERIALBUS), 162227896Sjkim ACPI_RSC_TABLE_SIZE (AcpiRsConvertI2cSerialBus)}, 163227896Sjkim 164227896Sjkim {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_SERIAL_BUS, 165227896Sjkim sizeof (AML_RESOURCE_I2C_SERIALBUS), 166227896Sjkim 0}, 167227896Sjkim 168227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.RevisionId), 169227896Sjkim AML_OFFSET (CommonSerialBus.RevisionId), 170227896Sjkim 1}, 171227896Sjkim 172227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.Type), 173227896Sjkim AML_OFFSET (CommonSerialBus.Type), 174227896Sjkim 1}, 175227896Sjkim 176227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.SlaveMode), 177227896Sjkim AML_OFFSET (CommonSerialBus.Flags), 178227896Sjkim 0}, 179227896Sjkim 180227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ProducerConsumer), 181227896Sjkim AML_OFFSET (CommonSerialBus.Flags), 182227896Sjkim 1}, 183227896Sjkim 184227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId), 185227896Sjkim AML_OFFSET (CommonSerialBus.TypeRevisionId), 186227896Sjkim 1}, 187227896Sjkim 188227896Sjkim {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeDataLength), 189227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 190227896Sjkim 1}, 191227896Sjkim 192227896Sjkim /* Vendor data */ 193227896Sjkim 194227896Sjkim {ACPI_RSC_COUNT_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorLength), 195227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 196227896Sjkim AML_RESOURCE_I2C_MIN_DATA_LEN}, 197227896Sjkim 198227896Sjkim {ACPI_RSC_MOVE_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorData), 199227896Sjkim 0, 200227896Sjkim sizeof (AML_RESOURCE_I2C_SERIALBUS)}, 201227896Sjkim 202227896Sjkim /* Resource Source */ 203227896Sjkim 204227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.Index), 205227896Sjkim AML_OFFSET (CommonSerialBus.ResSourceIndex), 206227896Sjkim 1}, 207227896Sjkim 208227896Sjkim {ACPI_RSC_COUNT_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringLength), 209227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 210227896Sjkim sizeof (AML_RESOURCE_COMMON_SERIALBUS)}, 211227896Sjkim 212227896Sjkim {ACPI_RSC_MOVE_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringPtr), 213227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 214227896Sjkim sizeof (AML_RESOURCE_COMMON_SERIALBUS)}, 215227896Sjkim 216227896Sjkim /* I2C bus type specific */ 217227896Sjkim 218227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.I2cSerialBus.AccessMode), 219227896Sjkim AML_OFFSET (I2cSerialBus.TypeSpecificFlags), 220227896Sjkim 0}, 221227896Sjkim 222227896Sjkim {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.I2cSerialBus.ConnectionSpeed), 223227896Sjkim AML_OFFSET (I2cSerialBus.ConnectionSpeed), 224227896Sjkim 1}, 225227896Sjkim 226227896Sjkim {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.I2cSerialBus.SlaveAddress), 227227896Sjkim AML_OFFSET (I2cSerialBus.SlaveAddress), 228227896Sjkim 1}, 229227896Sjkim}; 230227896Sjkim 231227896Sjkim 232227896Sjkim/******************************************************************************* 233227896Sjkim * 234227896Sjkim * AcpiRsConvertSpiSerialBus 235227896Sjkim * 236227896Sjkim ******************************************************************************/ 237227896Sjkim 238227896SjkimACPI_RSCONVERT_INFO AcpiRsConvertSpiSerialBus[20] = 239227896Sjkim{ 240227896Sjkim {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS, 241227896Sjkim ACPI_RS_SIZE (ACPI_RESOURCE_SPI_SERIALBUS), 242227896Sjkim ACPI_RSC_TABLE_SIZE (AcpiRsConvertSpiSerialBus)}, 243227896Sjkim 244227896Sjkim {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_SERIAL_BUS, 245227896Sjkim sizeof (AML_RESOURCE_SPI_SERIALBUS), 246227896Sjkim 0}, 247227896Sjkim 248227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.RevisionId), 249227896Sjkim AML_OFFSET (CommonSerialBus.RevisionId), 250227896Sjkim 1}, 251227896Sjkim 252227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.Type), 253227896Sjkim AML_OFFSET (CommonSerialBus.Type), 254227896Sjkim 1}, 255227896Sjkim 256227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.SlaveMode), 257227896Sjkim AML_OFFSET (CommonSerialBus.Flags), 258227896Sjkim 0}, 259227896Sjkim 260227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ProducerConsumer), 261227896Sjkim AML_OFFSET (CommonSerialBus.Flags), 262227896Sjkim 1}, 263227896Sjkim 264227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId), 265227896Sjkim AML_OFFSET (CommonSerialBus.TypeRevisionId), 266227896Sjkim 1}, 267227896Sjkim 268227896Sjkim {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeDataLength), 269227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 270227896Sjkim 1}, 271227896Sjkim 272227896Sjkim /* Vendor data */ 273227896Sjkim 274227896Sjkim {ACPI_RSC_COUNT_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorLength), 275227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 276227896Sjkim AML_RESOURCE_SPI_MIN_DATA_LEN}, 277227896Sjkim 278227896Sjkim {ACPI_RSC_MOVE_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorData), 279227896Sjkim 0, 280227896Sjkim sizeof (AML_RESOURCE_SPI_SERIALBUS)}, 281227896Sjkim 282227896Sjkim /* Resource Source */ 283227896Sjkim 284227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.Index), 285227896Sjkim AML_OFFSET (CommonSerialBus.ResSourceIndex), 286227896Sjkim 1}, 287227896Sjkim 288227896Sjkim {ACPI_RSC_COUNT_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringLength), 289227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 290227896Sjkim sizeof (AML_RESOURCE_COMMON_SERIALBUS)}, 291227896Sjkim 292227896Sjkim {ACPI_RSC_MOVE_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringPtr), 293227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 294227896Sjkim sizeof (AML_RESOURCE_COMMON_SERIALBUS)}, 295227896Sjkim 296227896Sjkim /* Spi bus type specific */ 297227896Sjkim 298227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.SpiSerialBus.WireMode), 299227896Sjkim AML_OFFSET (SpiSerialBus.TypeSpecificFlags), 300227896Sjkim 0}, 301227896Sjkim 302227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.SpiSerialBus.DevicePolarity), 303227896Sjkim AML_OFFSET (SpiSerialBus.TypeSpecificFlags), 304227896Sjkim 1}, 305227896Sjkim 306227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.SpiSerialBus.DataBitLength), 307227896Sjkim AML_OFFSET (SpiSerialBus.DataBitLength), 308227896Sjkim 1}, 309227896Sjkim 310227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.SpiSerialBus.ClockPhase), 311227896Sjkim AML_OFFSET (SpiSerialBus.ClockPhase), 312227896Sjkim 1}, 313227896Sjkim 314227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.SpiSerialBus.ClockPolarity), 315227896Sjkim AML_OFFSET (SpiSerialBus.ClockPolarity), 316227896Sjkim 1}, 317227896Sjkim 318227896Sjkim {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.SpiSerialBus.DeviceSelection), 319227896Sjkim AML_OFFSET (SpiSerialBus.DeviceSelection), 320227896Sjkim 1}, 321227896Sjkim 322227896Sjkim {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.SpiSerialBus.ConnectionSpeed), 323227896Sjkim AML_OFFSET (SpiSerialBus.ConnectionSpeed), 324227896Sjkim 1}, 325227896Sjkim}; 326227896Sjkim 327227896Sjkim 328227896Sjkim/******************************************************************************* 329227896Sjkim * 330227896Sjkim * AcpiRsConvertUartSerialBus 331227896Sjkim * 332227896Sjkim ******************************************************************************/ 333227896Sjkim 334227896SjkimACPI_RSCONVERT_INFO AcpiRsConvertUartSerialBus[22] = 335227896Sjkim{ 336227896Sjkim {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS, 337227896Sjkim ACPI_RS_SIZE (ACPI_RESOURCE_UART_SERIALBUS), 338227896Sjkim ACPI_RSC_TABLE_SIZE (AcpiRsConvertUartSerialBus)}, 339227896Sjkim 340227896Sjkim {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_SERIAL_BUS, 341227896Sjkim sizeof (AML_RESOURCE_UART_SERIALBUS), 342227896Sjkim 0}, 343227896Sjkim 344227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.RevisionId), 345227896Sjkim AML_OFFSET (CommonSerialBus.RevisionId), 346227896Sjkim 1}, 347227896Sjkim 348227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.Type), 349227896Sjkim AML_OFFSET (CommonSerialBus.Type), 350227896Sjkim 1}, 351227896Sjkim 352227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.SlaveMode), 353227896Sjkim AML_OFFSET (CommonSerialBus.Flags), 354227896Sjkim 0}, 355227896Sjkim 356227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ProducerConsumer), 357227896Sjkim AML_OFFSET (CommonSerialBus.Flags), 358227896Sjkim 1}, 359227896Sjkim 360227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId), 361227896Sjkim AML_OFFSET (CommonSerialBus.TypeRevisionId), 362227896Sjkim 1}, 363227896Sjkim 364227896Sjkim {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeDataLength), 365227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 366227896Sjkim 1}, 367227896Sjkim 368227896Sjkim /* Vendor data */ 369227896Sjkim 370227896Sjkim {ACPI_RSC_COUNT_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorLength), 371227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 372227896Sjkim AML_RESOURCE_UART_MIN_DATA_LEN}, 373227896Sjkim 374227896Sjkim {ACPI_RSC_MOVE_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorData), 375227896Sjkim 0, 376227896Sjkim sizeof (AML_RESOURCE_UART_SERIALBUS)}, 377227896Sjkim 378227896Sjkim /* Resource Source */ 379227896Sjkim 380227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.Index), 381227896Sjkim AML_OFFSET (CommonSerialBus.ResSourceIndex), 382227896Sjkim 1}, 383227896Sjkim 384227896Sjkim {ACPI_RSC_COUNT_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringLength), 385227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 386227896Sjkim sizeof (AML_RESOURCE_COMMON_SERIALBUS)}, 387227896Sjkim 388227896Sjkim {ACPI_RSC_MOVE_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringPtr), 389227896Sjkim AML_OFFSET (CommonSerialBus.TypeDataLength), 390227896Sjkim sizeof (AML_RESOURCE_COMMON_SERIALBUS)}, 391227896Sjkim 392227896Sjkim /* Uart bus type specific */ 393227896Sjkim 394227896Sjkim {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.FlowControl), 395227896Sjkim AML_OFFSET (UartSerialBus.TypeSpecificFlags), 396227896Sjkim 0}, 397227896Sjkim 398227896Sjkim {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.StopBits), 399227896Sjkim AML_OFFSET (UartSerialBus.TypeSpecificFlags), 400227896Sjkim 2}, 401227896Sjkim 402227896Sjkim {ACPI_RSC_3BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.DataBits), 403227896Sjkim AML_OFFSET (UartSerialBus.TypeSpecificFlags), 404227896Sjkim 4}, 405227896Sjkim 406227896Sjkim {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.Endian), 407227896Sjkim AML_OFFSET (UartSerialBus.TypeSpecificFlags), 408227896Sjkim 7}, 409227896Sjkim 410227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.UartSerialBus.Parity), 411227896Sjkim AML_OFFSET (UartSerialBus.Parity), 412227896Sjkim 1}, 413227896Sjkim 414227896Sjkim {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.UartSerialBus.LinesEnabled), 415227896Sjkim AML_OFFSET (UartSerialBus.LinesEnabled), 416227896Sjkim 1}, 417227896Sjkim 418227896Sjkim {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.UartSerialBus.RxFifoSize), 419227896Sjkim AML_OFFSET (UartSerialBus.RxFifoSize), 420227896Sjkim 1}, 421227896Sjkim 422227896Sjkim {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.UartSerialBus.TxFifoSize), 423227896Sjkim AML_OFFSET (UartSerialBus.TxFifoSize), 424227896Sjkim 1}, 425227896Sjkim 426227896Sjkim {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.UartSerialBus.DefaultBaudRate), 427227896Sjkim AML_OFFSET (UartSerialBus.DefaultBaudRate), 428227896Sjkim 1}, 429227896Sjkim}; 430