xref: /openbmc/linux/drivers/acpi/acpica/rsinfo.c (revision 97028ce6fca0fec53ee71e2fd5acfb2dc8430f1f)
195b482a8SLen Brown /*******************************************************************************
295b482a8SLen Brown  *
395b482a8SLen Brown  * Module Name: rsinfo - Dispatch and Info tables
495b482a8SLen Brown  *
595b482a8SLen Brown  ******************************************************************************/
695b482a8SLen Brown 
795b482a8SLen Brown /*
87735ca0eSBob Moore  * Copyright (C) 2000 - 2017, Intel Corp.
995b482a8SLen Brown  * All rights reserved.
1095b482a8SLen Brown  *
1195b482a8SLen Brown  * Redistribution and use in source and binary forms, with or without
1295b482a8SLen Brown  * modification, are permitted provided that the following conditions
1395b482a8SLen Brown  * are met:
1495b482a8SLen Brown  * 1. Redistributions of source code must retain the above copyright
1595b482a8SLen Brown  *    notice, this list of conditions, and the following disclaimer,
1695b482a8SLen Brown  *    without modification.
1795b482a8SLen Brown  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
1895b482a8SLen Brown  *    substantially similar to the "NO WARRANTY" disclaimer below
1995b482a8SLen Brown  *    ("Disclaimer") and any redistribution must be conditioned upon
2095b482a8SLen Brown  *    including a substantially similar Disclaimer requirement for further
2195b482a8SLen Brown  *    binary redistribution.
2295b482a8SLen Brown  * 3. Neither the names of the above-listed copyright holders nor the names
2395b482a8SLen Brown  *    of any contributors may be used to endorse or promote products derived
2495b482a8SLen Brown  *    from this software without specific prior written permission.
2595b482a8SLen Brown  *
2695b482a8SLen Brown  * Alternatively, this software may be distributed under the terms of the
2795b482a8SLen Brown  * GNU General Public License ("GPL") version 2 as published by the Free
2895b482a8SLen Brown  * Software Foundation.
2995b482a8SLen Brown  *
3095b482a8SLen Brown  * NO WARRANTY
3195b482a8SLen Brown  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3295b482a8SLen Brown  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3395b482a8SLen Brown  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
3495b482a8SLen Brown  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3595b482a8SLen Brown  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3695b482a8SLen Brown  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3795b482a8SLen Brown  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3895b482a8SLen Brown  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
3995b482a8SLen Brown  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
4095b482a8SLen Brown  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
4195b482a8SLen Brown  * POSSIBILITY OF SUCH DAMAGES.
4295b482a8SLen Brown  */
4395b482a8SLen Brown 
4495b482a8SLen Brown #include <acpi/acpi.h>
45e2f7a777SLen Brown #include "accommon.h"
46e2f7a777SLen Brown #include "acresrc.h"
4795b482a8SLen Brown 
4895b482a8SLen Brown #define _COMPONENT          ACPI_RESOURCES
4995b482a8SLen Brown ACPI_MODULE_NAME("rsinfo")
5095b482a8SLen Brown 
5195b482a8SLen Brown /*
5295b482a8SLen Brown  * Resource dispatch and information tables. Any new resource types (either
5395b482a8SLen Brown  * Large or Small) must be reflected in each of these tables, so they are here
5495b482a8SLen Brown  * in one place.
5595b482a8SLen Brown  *
5695b482a8SLen Brown  * The tables for Large descriptors are indexed by bits 6:0 of the AML
5795b482a8SLen Brown  * descriptor type byte. The tables for Small descriptors are indexed by
5895b482a8SLen Brown  * bits 6:3 of the descriptor byte. The tables for internal resource
5995b482a8SLen Brown  * descriptors are indexed by the acpi_resource_type field.
6095b482a8SLen Brown  */
6195b482a8SLen Brown /* Dispatch table for resource-to-AML (Set Resource) conversion functions */
6295b482a8SLen Brown struct acpi_rsconvert_info *acpi_gbl_set_resource_dispatch[] = {
6395b482a8SLen Brown 	acpi_rs_set_irq,	/* 0x00, ACPI_RESOURCE_TYPE_IRQ */
6495b482a8SLen Brown 	acpi_rs_convert_dma,	/* 0x01, ACPI_RESOURCE_TYPE_DMA */
6595b482a8SLen Brown 	acpi_rs_set_start_dpf,	/* 0x02, ACPI_RESOURCE_TYPE_START_DEPENDENT */
6695b482a8SLen Brown 	acpi_rs_convert_end_dpf,	/* 0x03, ACPI_RESOURCE_TYPE_END_DEPENDENT */
6795b482a8SLen Brown 	acpi_rs_convert_io,	/* 0x04, ACPI_RESOURCE_TYPE_IO */
6895b482a8SLen Brown 	acpi_rs_convert_fixed_io,	/* 0x05, ACPI_RESOURCE_TYPE_FIXED_IO */
6995b482a8SLen Brown 	acpi_rs_set_vendor,	/* 0x06, ACPI_RESOURCE_TYPE_VENDOR */
7095b482a8SLen Brown 	acpi_rs_convert_end_tag,	/* 0x07, ACPI_RESOURCE_TYPE_END_TAG */
7195b482a8SLen Brown 	acpi_rs_convert_memory24,	/* 0x08, ACPI_RESOURCE_TYPE_MEMORY24 */
7295b482a8SLen Brown 	acpi_rs_convert_memory32,	/* 0x09, ACPI_RESOURCE_TYPE_MEMORY32 */
7395b482a8SLen Brown 	acpi_rs_convert_fixed_memory32,	/* 0x0A, ACPI_RESOURCE_TYPE_FIXED_MEMORY32 */
7495b482a8SLen Brown 	acpi_rs_convert_address16,	/* 0x0B, ACPI_RESOURCE_TYPE_ADDRESS16 */
7595b482a8SLen Brown 	acpi_rs_convert_address32,	/* 0x0C, ACPI_RESOURCE_TYPE_ADDRESS32 */
7695b482a8SLen Brown 	acpi_rs_convert_address64,	/* 0x0D, ACPI_RESOURCE_TYPE_ADDRESS64 */
7795b482a8SLen Brown 	acpi_rs_convert_ext_address64,	/* 0x0E, ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 */
7895b482a8SLen Brown 	acpi_rs_convert_ext_irq,	/* 0x0F, ACPI_RESOURCE_TYPE_EXTENDED_IRQ */
79e0fe0a8dSLin Ming 	acpi_rs_convert_generic_reg,	/* 0x10, ACPI_RESOURCE_TYPE_GENERIC_REGISTER */
80e0fe0a8dSLin Ming 	acpi_rs_convert_gpio,	/* 0x11, ACPI_RESOURCE_TYPE_GPIO */
81e0fe0a8dSLin Ming 	acpi_rs_convert_fixed_dma,	/* 0x12, ACPI_RESOURCE_TYPE_FIXED_DMA */
82e0fe0a8dSLin Ming 	NULL,			/* 0x13, ACPI_RESOURCE_TYPE_SERIAL_BUS - Use subtype table below */
832b726930SMika Westerberg 	acpi_rs_convert_pin_function,	/* 0x14, ACPI_RESOURCE_TYPE_PIN_FUNCTION */
84*97028ce6SMika Westerberg 	acpi_rs_convert_pin_config,	/* 0x15, ACPI_RESOURCE_TYPE_PIN_CONFIG */
8595b482a8SLen Brown };
8695b482a8SLen Brown 
8795b482a8SLen Brown /* Dispatch tables for AML-to-resource (Get Resource) conversion functions */
8895b482a8SLen Brown 
8995b482a8SLen Brown struct acpi_rsconvert_info *acpi_gbl_get_resource_dispatch[] = {
9095b482a8SLen Brown 	/* Small descriptors */
9195b482a8SLen Brown 
9295b482a8SLen Brown 	NULL,			/* 0x00, Reserved */
9395b482a8SLen Brown 	NULL,			/* 0x01, Reserved */
9495b482a8SLen Brown 	NULL,			/* 0x02, Reserved */
9595b482a8SLen Brown 	NULL,			/* 0x03, Reserved */
9695b482a8SLen Brown 	acpi_rs_get_irq,	/* 0x04, ACPI_RESOURCE_NAME_IRQ */
9795b482a8SLen Brown 	acpi_rs_convert_dma,	/* 0x05, ACPI_RESOURCE_NAME_DMA */
9895b482a8SLen Brown 	acpi_rs_get_start_dpf,	/* 0x06, ACPI_RESOURCE_NAME_START_DEPENDENT */
9995b482a8SLen Brown 	acpi_rs_convert_end_dpf,	/* 0x07, ACPI_RESOURCE_NAME_END_DEPENDENT */
10095b482a8SLen Brown 	acpi_rs_convert_io,	/* 0x08, ACPI_RESOURCE_NAME_IO */
10195b482a8SLen Brown 	acpi_rs_convert_fixed_io,	/* 0x09, ACPI_RESOURCE_NAME_FIXED_IO */
102e0fe0a8dSLin Ming 	acpi_rs_convert_fixed_dma,	/* 0x0A, ACPI_RESOURCE_NAME_FIXED_DMA */
10395b482a8SLen Brown 	NULL,			/* 0x0B, Reserved */
10495b482a8SLen Brown 	NULL,			/* 0x0C, Reserved */
10595b482a8SLen Brown 	NULL,			/* 0x0D, Reserved */
10695b482a8SLen Brown 	acpi_rs_get_vendor_small,	/* 0x0E, ACPI_RESOURCE_NAME_VENDOR_SMALL */
10795b482a8SLen Brown 	acpi_rs_convert_end_tag,	/* 0x0F, ACPI_RESOURCE_NAME_END_TAG */
10895b482a8SLen Brown 
10995b482a8SLen Brown 	/* Large descriptors */
11095b482a8SLen Brown 
11195b482a8SLen Brown 	NULL,			/* 0x00, Reserved */
11295b482a8SLen Brown 	acpi_rs_convert_memory24,	/* 0x01, ACPI_RESOURCE_NAME_MEMORY24 */
11395b482a8SLen Brown 	acpi_rs_convert_generic_reg,	/* 0x02, ACPI_RESOURCE_NAME_GENERIC_REGISTER */
11495b482a8SLen Brown 	NULL,			/* 0x03, Reserved */
11595b482a8SLen Brown 	acpi_rs_get_vendor_large,	/* 0x04, ACPI_RESOURCE_NAME_VENDOR_LARGE */
11695b482a8SLen Brown 	acpi_rs_convert_memory32,	/* 0x05, ACPI_RESOURCE_NAME_MEMORY32 */
11795b482a8SLen Brown 	acpi_rs_convert_fixed_memory32,	/* 0x06, ACPI_RESOURCE_NAME_FIXED_MEMORY32 */
11895b482a8SLen Brown 	acpi_rs_convert_address32,	/* 0x07, ACPI_RESOURCE_NAME_ADDRESS32 */
11995b482a8SLen Brown 	acpi_rs_convert_address16,	/* 0x08, ACPI_RESOURCE_NAME_ADDRESS16 */
12095b482a8SLen Brown 	acpi_rs_convert_ext_irq,	/* 0x09, ACPI_RESOURCE_NAME_EXTENDED_IRQ */
12195b482a8SLen Brown 	acpi_rs_convert_address64,	/* 0x0A, ACPI_RESOURCE_NAME_ADDRESS64 */
122e0fe0a8dSLin Ming 	acpi_rs_convert_ext_address64,	/* 0x0B, ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 */
123e0fe0a8dSLin Ming 	acpi_rs_convert_gpio,	/* 0x0C, ACPI_RESOURCE_NAME_GPIO */
1242b726930SMika Westerberg 	acpi_rs_convert_pin_function,	/* 0x0D, ACPI_RESOURCE_NAME_PIN_FUNCTION */
125e0fe0a8dSLin Ming 	NULL,			/* 0x0E, ACPI_RESOURCE_NAME_SERIAL_BUS - Use subtype table below */
126*97028ce6SMika Westerberg 	acpi_rs_convert_pin_config,	/* 0x0F, ACPI_RESOURCE_NAME_PIN_CONFIG */
127e0fe0a8dSLin Ming };
128e0fe0a8dSLin Ming 
129e0fe0a8dSLin Ming /* Subtype table for serial_bus -- I2C, SPI, and UART */
130e0fe0a8dSLin Ming 
131e0fe0a8dSLin Ming struct acpi_rsconvert_info *acpi_gbl_convert_resource_serial_bus_dispatch[] = {
132e0fe0a8dSLin Ming 	NULL,
133e0fe0a8dSLin Ming 	acpi_rs_convert_i2c_serial_bus,
134e0fe0a8dSLin Ming 	acpi_rs_convert_spi_serial_bus,
135e0fe0a8dSLin Ming 	acpi_rs_convert_uart_serial_bus,
13695b482a8SLen Brown };
13795b482a8SLen Brown 
1383334861bSLv Zheng #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUGGER)
13995b482a8SLen Brown 
14095b482a8SLen Brown /* Dispatch table for resource dump functions */
14195b482a8SLen Brown 
14295b482a8SLen Brown struct acpi_rsdump_info *acpi_gbl_dump_resource_dispatch[] = {
14395b482a8SLen Brown 	acpi_rs_dump_irq,	/* ACPI_RESOURCE_TYPE_IRQ */
14495b482a8SLen Brown 	acpi_rs_dump_dma,	/* ACPI_RESOURCE_TYPE_DMA */
14595b482a8SLen Brown 	acpi_rs_dump_start_dpf,	/* ACPI_RESOURCE_TYPE_START_DEPENDENT */
14695b482a8SLen Brown 	acpi_rs_dump_end_dpf,	/* ACPI_RESOURCE_TYPE_END_DEPENDENT */
14795b482a8SLen Brown 	acpi_rs_dump_io,	/* ACPI_RESOURCE_TYPE_IO */
14895b482a8SLen Brown 	acpi_rs_dump_fixed_io,	/* ACPI_RESOURCE_TYPE_FIXED_IO */
14995b482a8SLen Brown 	acpi_rs_dump_vendor,	/* ACPI_RESOURCE_TYPE_VENDOR */
15095b482a8SLen Brown 	acpi_rs_dump_end_tag,	/* ACPI_RESOURCE_TYPE_END_TAG */
15195b482a8SLen Brown 	acpi_rs_dump_memory24,	/* ACPI_RESOURCE_TYPE_MEMORY24 */
15295b482a8SLen Brown 	acpi_rs_dump_memory32,	/* ACPI_RESOURCE_TYPE_MEMORY32 */
15395b482a8SLen Brown 	acpi_rs_dump_fixed_memory32,	/* ACPI_RESOURCE_TYPE_FIXED_MEMORY32 */
15495b482a8SLen Brown 	acpi_rs_dump_address16,	/* ACPI_RESOURCE_TYPE_ADDRESS16 */
15595b482a8SLen Brown 	acpi_rs_dump_address32,	/* ACPI_RESOURCE_TYPE_ADDRESS32 */
15695b482a8SLen Brown 	acpi_rs_dump_address64,	/* ACPI_RESOURCE_TYPE_ADDRESS64 */
15795b482a8SLen Brown 	acpi_rs_dump_ext_address64,	/* ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 */
15895b482a8SLen Brown 	acpi_rs_dump_ext_irq,	/* ACPI_RESOURCE_TYPE_EXTENDED_IRQ */
15995b482a8SLen Brown 	acpi_rs_dump_generic_reg,	/* ACPI_RESOURCE_TYPE_GENERIC_REGISTER */
160e0fe0a8dSLin Ming 	acpi_rs_dump_gpio,	/* ACPI_RESOURCE_TYPE_GPIO */
161e0fe0a8dSLin Ming 	acpi_rs_dump_fixed_dma,	/* ACPI_RESOURCE_TYPE_FIXED_DMA */
162e0fe0a8dSLin Ming 	NULL,			/* ACPI_RESOURCE_TYPE_SERIAL_BUS */
1632b726930SMika Westerberg 	acpi_rs_dump_pin_function,	/* ACPI_RESOURCE_TYPE_PIN_FUNCTION */
164*97028ce6SMika Westerberg 	acpi_rs_dump_pin_config,	/* ACPI_RESOURCE_TYPE_PIN_CONFIG */
165e0fe0a8dSLin Ming };
166e0fe0a8dSLin Ming 
167e0fe0a8dSLin Ming struct acpi_rsdump_info *acpi_gbl_dump_serial_bus_dispatch[] = {
168e0fe0a8dSLin Ming 	NULL,
169e0fe0a8dSLin Ming 	acpi_rs_dump_i2c_serial_bus,	/* AML_RESOURCE_I2C_BUS_TYPE */
170e0fe0a8dSLin Ming 	acpi_rs_dump_spi_serial_bus,	/* AML_RESOURCE_SPI_BUS_TYPE */
171e0fe0a8dSLin Ming 	acpi_rs_dump_uart_serial_bus,	/* AML_RESOURCE_UART_BUS_TYPE */
17295b482a8SLen Brown };
17395b482a8SLen Brown #endif
17495b482a8SLen Brown 
17595b482a8SLen Brown /*
17695b482a8SLen Brown  * Base sizes for external AML resource descriptors, indexed by internal type.
17795b482a8SLen Brown  * Includes size of the descriptor header (1 byte for small descriptors,
17895b482a8SLen Brown  * 3 bytes for large descriptors)
17995b482a8SLen Brown  */
18095b482a8SLen Brown const u8 acpi_gbl_aml_resource_sizes[] = {
18195b482a8SLen Brown 	sizeof(struct aml_resource_irq),	/* ACPI_RESOURCE_TYPE_IRQ (optional Byte 3 always created) */
18295b482a8SLen Brown 	sizeof(struct aml_resource_dma),	/* ACPI_RESOURCE_TYPE_DMA */
18395b482a8SLen Brown 	sizeof(struct aml_resource_start_dependent),	/* ACPI_RESOURCE_TYPE_START_DEPENDENT (optional Byte 1 always created) */
18495b482a8SLen Brown 	sizeof(struct aml_resource_end_dependent),	/* ACPI_RESOURCE_TYPE_END_DEPENDENT */
18595b482a8SLen Brown 	sizeof(struct aml_resource_io),	/* ACPI_RESOURCE_TYPE_IO */
18695b482a8SLen Brown 	sizeof(struct aml_resource_fixed_io),	/* ACPI_RESOURCE_TYPE_FIXED_IO */
18795b482a8SLen Brown 	sizeof(struct aml_resource_vendor_small),	/* ACPI_RESOURCE_TYPE_VENDOR */
18895b482a8SLen Brown 	sizeof(struct aml_resource_end_tag),	/* ACPI_RESOURCE_TYPE_END_TAG */
18995b482a8SLen Brown 	sizeof(struct aml_resource_memory24),	/* ACPI_RESOURCE_TYPE_MEMORY24 */
19095b482a8SLen Brown 	sizeof(struct aml_resource_memory32),	/* ACPI_RESOURCE_TYPE_MEMORY32 */
19195b482a8SLen Brown 	sizeof(struct aml_resource_fixed_memory32),	/* ACPI_RESOURCE_TYPE_FIXED_MEMORY32 */
19295b482a8SLen Brown 	sizeof(struct aml_resource_address16),	/* ACPI_RESOURCE_TYPE_ADDRESS16 */
19395b482a8SLen Brown 	sizeof(struct aml_resource_address32),	/* ACPI_RESOURCE_TYPE_ADDRESS32 */
19495b482a8SLen Brown 	sizeof(struct aml_resource_address64),	/* ACPI_RESOURCE_TYPE_ADDRESS64 */
19595b482a8SLen Brown 	sizeof(struct aml_resource_extended_address64),	/*ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 */
19695b482a8SLen Brown 	sizeof(struct aml_resource_extended_irq),	/* ACPI_RESOURCE_TYPE_EXTENDED_IRQ */
197e0fe0a8dSLin Ming 	sizeof(struct aml_resource_generic_register),	/* ACPI_RESOURCE_TYPE_GENERIC_REGISTER */
198e0fe0a8dSLin Ming 	sizeof(struct aml_resource_gpio),	/* ACPI_RESOURCE_TYPE_GPIO */
199e0fe0a8dSLin Ming 	sizeof(struct aml_resource_fixed_dma),	/* ACPI_RESOURCE_TYPE_FIXED_DMA */
200e0fe0a8dSLin Ming 	sizeof(struct aml_resource_common_serialbus),	/* ACPI_RESOURCE_TYPE_SERIAL_BUS */
2012b726930SMika Westerberg 	sizeof(struct aml_resource_pin_function),	/* ACPI_RESOURCE_TYPE_PIN_FUNCTION */
202*97028ce6SMika Westerberg 	sizeof(struct aml_resource_pin_config),	/* ACPI_RESOURCE_TYPE_PIN_CONFIG */
20395b482a8SLen Brown };
20495b482a8SLen Brown 
20595b482a8SLen Brown const u8 acpi_gbl_resource_struct_sizes[] = {
20695b482a8SLen Brown 	/* Small descriptors */
20795b482a8SLen Brown 
20895b482a8SLen Brown 	0,
20995b482a8SLen Brown 	0,
21095b482a8SLen Brown 	0,
21195b482a8SLen Brown 	0,
21295b482a8SLen Brown 	ACPI_RS_SIZE(struct acpi_resource_irq),
21395b482a8SLen Brown 	ACPI_RS_SIZE(struct acpi_resource_dma),
21495b482a8SLen Brown 	ACPI_RS_SIZE(struct acpi_resource_start_dependent),
21595b482a8SLen Brown 	ACPI_RS_SIZE_MIN,
21695b482a8SLen Brown 	ACPI_RS_SIZE(struct acpi_resource_io),
21795b482a8SLen Brown 	ACPI_RS_SIZE(struct acpi_resource_fixed_io),
218e0fe0a8dSLin Ming 	ACPI_RS_SIZE(struct acpi_resource_fixed_dma),
21995b482a8SLen Brown 	0,
22095b482a8SLen Brown 	0,
22195b482a8SLen Brown 	0,
22295b482a8SLen Brown 	ACPI_RS_SIZE(struct acpi_resource_vendor),
22395b482a8SLen Brown 	ACPI_RS_SIZE_MIN,
22495b482a8SLen Brown 
22595b482a8SLen Brown 	/* Large descriptors */
22695b482a8SLen Brown 
22795b482a8SLen Brown 	0,
22895b482a8SLen Brown 	ACPI_RS_SIZE(struct acpi_resource_memory24),
22995b482a8SLen Brown 	ACPI_RS_SIZE(struct acpi_resource_generic_register),
23095b482a8SLen Brown 	0,
23195b482a8SLen Brown 	ACPI_RS_SIZE(struct acpi_resource_vendor),
23295b482a8SLen Brown 	ACPI_RS_SIZE(struct acpi_resource_memory32),
23395b482a8SLen Brown 	ACPI_RS_SIZE(struct acpi_resource_fixed_memory32),
23495b482a8SLen Brown 	ACPI_RS_SIZE(struct acpi_resource_address32),
23595b482a8SLen Brown 	ACPI_RS_SIZE(struct acpi_resource_address16),
23695b482a8SLen Brown 	ACPI_RS_SIZE(struct acpi_resource_extended_irq),
23795b482a8SLen Brown 	ACPI_RS_SIZE(struct acpi_resource_address64),
238e0fe0a8dSLin Ming 	ACPI_RS_SIZE(struct acpi_resource_extended_address64),
239e0fe0a8dSLin Ming 	ACPI_RS_SIZE(struct acpi_resource_gpio),
2402b726930SMika Westerberg 	ACPI_RS_SIZE(struct acpi_resource_pin_function),
241*97028ce6SMika Westerberg 	ACPI_RS_SIZE(struct acpi_resource_common_serialbus),
242*97028ce6SMika Westerberg 	ACPI_RS_SIZE(struct acpi_resource_pin_config),
243e0fe0a8dSLin Ming };
244e0fe0a8dSLin Ming 
245e0fe0a8dSLin Ming const u8 acpi_gbl_aml_resource_serial_bus_sizes[] = {
246e0fe0a8dSLin Ming 	0,
247e0fe0a8dSLin Ming 	sizeof(struct aml_resource_i2c_serialbus),
248e0fe0a8dSLin Ming 	sizeof(struct aml_resource_spi_serialbus),
249e0fe0a8dSLin Ming 	sizeof(struct aml_resource_uart_serialbus),
250e0fe0a8dSLin Ming };
251e0fe0a8dSLin Ming 
252e0fe0a8dSLin Ming const u8 acpi_gbl_resource_struct_serial_bus_sizes[] = {
253e0fe0a8dSLin Ming 	0,
254e0fe0a8dSLin Ming 	ACPI_RS_SIZE(struct acpi_resource_i2c_serialbus),
255e0fe0a8dSLin Ming 	ACPI_RS_SIZE(struct acpi_resource_spi_serialbus),
256e0fe0a8dSLin Ming 	ACPI_RS_SIZE(struct acpi_resource_uart_serialbus),
25795b482a8SLen Brown };
258