Lance Zhao | f51b127 | 2015-11-09 17:06:34 -0800 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2016 Intel Corp. |
Lance Zhao | e904c7c | 2015-11-10 19:00:18 -0800 | [diff] [blame] | 5 | * (Written by Lance Zhao <lijian.zhao@intel.com> for Intel Corp.) |
Lance Zhao | f51b127 | 2015-11-09 17:06:34 -0800 | [diff] [blame] | 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 2 of the License, or |
| 10 | * (at your option) any later version. |
Martin Roth | ebabfad | 2016-04-10 11:09:16 -0600 | [diff] [blame] | 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
Lance Zhao | f51b127 | 2015-11-09 17:06:34 -0800 | [diff] [blame] | 16 | */ |
| 17 | |
| 18 | #include <arch/acpi.h> |
Lance Zhao | 1bd0c0c | 2016-04-19 18:04:21 -0700 | [diff] [blame] | 19 | #include <arch/acpigen.h> |
Lance Zhao | 2fc82d6 | 2015-11-16 18:33:21 -0800 | [diff] [blame] | 20 | #include <arch/ioapic.h> |
| 21 | #include <arch/smp/mpspec.h> |
Lance Zhao | 1bd0c0c | 2016-04-19 18:04:21 -0700 | [diff] [blame] | 22 | #include <cbmem.h> |
Lance Zhao | e904c7c | 2015-11-10 19:00:18 -0800 | [diff] [blame] | 23 | #include <cpu/x86/smm.h> |
Aaron Durbin | 1ee6f0b | 2016-06-10 15:50:34 -0500 | [diff] [blame] | 24 | #include <cpu/cpu.h> |
Lance Zhao | e904c7c | 2015-11-10 19:00:18 -0800 | [diff] [blame] | 25 | #include <soc/acpi.h> |
Hannah Williams | 0f61da8 | 2016-04-18 13:47:08 -0700 | [diff] [blame] | 26 | #include <soc/intel/common/acpi.h> |
Lance Zhao | e904c7c | 2015-11-10 19:00:18 -0800 | [diff] [blame] | 27 | #include <soc/iomap.h> |
| 28 | #include <soc/pm.h> |
Lance Zhao | 1bd0c0c | 2016-04-19 18:04:21 -0700 | [diff] [blame] | 29 | #include <soc/nvs.h> |
Shaunak Saha | cd9e1e4 | 2016-07-12 01:22:33 -0700 | [diff] [blame] | 30 | #include <soc/pci_devs.h> |
Aaron Durbin | 9e81540 | 2016-09-13 12:31:57 -0500 | [diff] [blame] | 31 | #include <string.h> |
Vaibhav Shankar | ef8deaf | 2016-08-23 17:56:17 -0700 | [diff] [blame] | 32 | #include <soc/gpio.h> |
Shaunak Saha | cd9e1e4 | 2016-07-12 01:22:33 -0700 | [diff] [blame] | 33 | #include "chip.h" |
Lance Zhao | f51b127 | 2015-11-09 17:06:34 -0800 | [diff] [blame] | 34 | |
Hannah Williams | 0f61da8 | 2016-04-18 13:47:08 -0700 | [diff] [blame] | 35 | #define CSTATE_RES(address_space, width, offset, address) \ |
| 36 | { \ |
| 37 | .space_id = address_space, \ |
| 38 | .bit_width = width, \ |
| 39 | .bit_offset = offset, \ |
| 40 | .addrl = address, \ |
| 41 | } |
| 42 | |
Lance Zhao | f51b127 | 2015-11-09 17:06:34 -0800 | [diff] [blame] | 43 | unsigned long acpi_fill_mcfg(unsigned long current) |
| 44 | { |
Lance Zhao | 2c34e31 | 2015-11-16 18:13:23 -0800 | [diff] [blame] | 45 | /* PCI Segment Group 0, Start Bus Number 0, End Bus Number is 255 */ |
| 46 | current += acpi_create_mcfg_mmconfig((void *) current, |
| 47 | CONFIG_MMCONF_BASE_ADDRESS, 0, 0, |
| 48 | 255); |
Lance Zhao | e904c7c | 2015-11-10 19:00:18 -0800 | [diff] [blame] | 49 | return current; |
Lance Zhao | f51b127 | 2015-11-09 17:06:34 -0800 | [diff] [blame] | 50 | } |
Lance Zhao | e904c7c | 2015-11-10 19:00:18 -0800 | [diff] [blame] | 51 | |
Lance Zhao | e904c7c | 2015-11-10 19:00:18 -0800 | [diff] [blame] | 52 | static int acpi_sci_irq(void) |
| 53 | { |
| 54 | int sci_irq = 9; |
| 55 | return sci_irq; |
| 56 | } |
| 57 | |
Lance Zhao | 2fc82d6 | 2015-11-16 18:33:21 -0800 | [diff] [blame] | 58 | static unsigned long acpi_madt_irq_overrides(unsigned long current) |
| 59 | { |
| 60 | int sci = acpi_sci_irq(); |
Lee Leahy | a444753 | 2017-03-09 10:45:02 -0800 | [diff] [blame] | 61 | uint16_t flags = MP_IRQ_TRIGGER_LEVEL | MP_IRQ_POLARITY_LOW; |
Lance Zhao | 2fc82d6 | 2015-11-16 18:33:21 -0800 | [diff] [blame] | 62 | |
| 63 | /* INT_SRC_OVR */ |
| 64 | current += acpi_create_madt_irqoverride((void *)current, 0, 0, 2, 0); |
| 65 | |
| 66 | /* SCI */ |
Lee Leahy | 07441b5 | 2017-03-09 10:59:25 -0800 | [diff] [blame] | 67 | current += acpi_create_madt_irqoverride((void *)current, 0, sci, sci, |
| 68 | flags); |
Lance Zhao | 2fc82d6 | 2015-11-16 18:33:21 -0800 | [diff] [blame] | 69 | |
| 70 | return current; |
| 71 | } |
| 72 | |
| 73 | unsigned long acpi_fill_madt(unsigned long current) |
| 74 | { |
| 75 | /* Local APICs */ |
| 76 | current = acpi_create_madt_lapics(current); |
| 77 | |
| 78 | /* IOAPIC */ |
| 79 | current += acpi_create_madt_ioapic((void *) current, |
| 80 | 2, IO_APIC_ADDR, 0); |
| 81 | |
| 82 | return acpi_madt_irq_overrides(current); |
| 83 | } |
| 84 | |
Lee Leahy | 68571c1 | 2017-03-09 09:26:05 -0800 | [diff] [blame] | 85 | void acpi_fill_fadt(acpi_fadt_t *fadt) |
Lance Zhao | e904c7c | 2015-11-10 19:00:18 -0800 | [diff] [blame] | 86 | { |
| 87 | const uint16_t pmbase = ACPI_PMIO_BASE; |
| 88 | |
Aaron Durbin | c3ee3f6 | 2016-05-11 10:35:49 -0500 | [diff] [blame] | 89 | /* Use ACPI 5.0 revision. */ |
| 90 | fadt->header.revision = ACPI_FADT_REV_ACPI_5_0; |
| 91 | |
Lance Zhao | e904c7c | 2015-11-10 19:00:18 -0800 | [diff] [blame] | 92 | fadt->sci_int = acpi_sci_irq(); |
Hannah Williams | 6516422 | 2016-06-24 14:13:45 -0700 | [diff] [blame] | 93 | fadt->smi_cmd = APM_CNT; |
| 94 | fadt->acpi_enable = APM_CNT_ACPI_ENABLE; |
| 95 | fadt->acpi_disable = APM_CNT_ACPI_DISABLE; |
Lance Zhao | e904c7c | 2015-11-10 19:00:18 -0800 | [diff] [blame] | 96 | |
| 97 | fadt->pm1a_evt_blk = pmbase + PM1_STS; |
| 98 | fadt->pm1a_cnt_blk = pmbase + PM1_CNT; |
| 99 | fadt->pm_tmr_blk = pmbase + PM1_TMR; |
| 100 | fadt->gpe0_blk = pmbase + GPE0_STS(0); |
| 101 | |
| 102 | fadt->pm1_evt_len = 4; |
| 103 | fadt->pm1_cnt_len = 2; |
| 104 | fadt->pm_tmr_len = 4; |
| 105 | /* There are 4 GPE0 STS/EN pairs each 32 bits wide. */ |
| 106 | fadt->gpe0_blk_len = 2 * GPE0_REG_MAX * sizeof(uint32_t); |
| 107 | fadt->p_lvl2_lat = ACPI_FADT_C2_NOT_SUPPORTED; |
| 108 | fadt->p_lvl3_lat = ACPI_FADT_C3_NOT_SUPPORTED; |
| 109 | fadt->flush_size = 0x400; /* twice of cache size*/ |
| 110 | fadt->flush_stride = 0x10; /* Cache line width */ |
| 111 | fadt->duty_offset = 1; |
| 112 | fadt->duty_width = 3; |
| 113 | fadt->day_alrm = 0xd; |
| 114 | fadt->iapc_boot_arch = ACPI_FADT_LEGACY_DEVICES | ACPI_FADT_8042; |
| 115 | |
| 116 | fadt->flags = ACPI_FADT_WBINVD | ACPI_FADT_C1_SUPPORTED | |
| 117 | ACPI_FADT_C2_MP_SUPPORTED | ACPI_FADT_SLEEP_BUTTON | |
| 118 | ACPI_FADT_RESET_REGISTER | ACPI_FADT_SEALED_CASE | |
| 119 | ACPI_FADT_S4_RTC_WAKE | ACPI_FADT_PLATFORM_CLOCK; |
| 120 | |
| 121 | fadt->reset_reg.space_id = 1; |
| 122 | fadt->reset_reg.bit_width = 8; |
| 123 | fadt->reset_reg.addrl = 0xcf9; |
| 124 | fadt->reset_value = 6; |
| 125 | |
| 126 | fadt->x_pm1a_evt_blk.space_id = 1; |
| 127 | fadt->x_pm1a_evt_blk.bit_width = fadt->pm1_evt_len * 8; |
| 128 | fadt->x_pm1a_evt_blk.addrl = pmbase + PM1_STS; |
| 129 | |
| 130 | fadt->x_pm1b_evt_blk.space_id = 1; |
| 131 | |
| 132 | fadt->x_pm1a_cnt_blk.space_id = 1; |
| 133 | fadt->x_pm1a_cnt_blk.bit_width = fadt->pm1_cnt_len * 8; |
| 134 | fadt->x_pm1a_cnt_blk.addrl = pmbase + PM1_CNT; |
| 135 | |
| 136 | fadt->x_pm1b_cnt_blk.space_id = 1; |
| 137 | |
| 138 | fadt->x_pm_tmr_blk.space_id = 1; |
| 139 | fadt->x_pm_tmr_blk.bit_width = fadt->pm_tmr_len * 8; |
| 140 | fadt->x_pm_tmr_blk.addrl = pmbase + PM1_TMR; |
| 141 | |
| 142 | fadt->x_gpe1_blk.space_id = 1; |
Lance Zhao | f51b127 | 2015-11-09 17:06:34 -0800 | [diff] [blame] | 143 | } |
Zhao, Lijian | 30461a9 | 2015-12-01 09:14:20 -0800 | [diff] [blame] | 144 | |
| 145 | unsigned long southbridge_write_acpi_tables(device_t device, |
| 146 | unsigned long current, |
| 147 | struct acpi_rsdp *rsdp) |
| 148 | { |
| 149 | return acpi_write_hpet(device, current, rsdp); |
| 150 | } |
Lance Zhao | 1bd0c0c | 2016-04-19 18:04:21 -0700 | [diff] [blame] | 151 | |
| 152 | static void acpi_create_gnvs(struct global_nvs_t *gnvs) |
| 153 | { |
Shaunak Saha | cd9e1e4 | 2016-07-12 01:22:33 -0700 | [diff] [blame] | 154 | struct soc_intel_apollolake_config *cfg; |
Subrata Banik | 2ee54db | 2017-03-05 12:37:00 +0530 | [diff] [blame^] | 155 | struct device *dev = SA_DEV_ROOT; |
Shaunak Saha | cd9e1e4 | 2016-07-12 01:22:33 -0700 | [diff] [blame] | 156 | |
Aaron Durbin | 9e81540 | 2016-09-13 12:31:57 -0500 | [diff] [blame] | 157 | /* Clear out GNVS. */ |
| 158 | memset(gnvs, 0, sizeof(*gnvs)); |
Shaunak Saha | cd9e1e4 | 2016-07-12 01:22:33 -0700 | [diff] [blame] | 159 | |
Furquan Shaikh | d01f5a0 | 2016-06-13 22:23:49 -0700 | [diff] [blame] | 160 | if (IS_ENABLED(CONFIG_CONSOLE_CBMEM)) |
| 161 | gnvs->cbmc = (uintptr_t)cbmem_find(CBMEM_ID_CONSOLE); |
| 162 | |
Lance Zhao | 1bd0c0c | 2016-04-19 18:04:21 -0700 | [diff] [blame] | 163 | if (IS_ENABLED(CONFIG_CHROMEOS)) { |
| 164 | /* Initialize Verified Boot data */ |
| 165 | chromeos_init_vboot(&gnvs->chromeos); |
| 166 | gnvs->chromeos.vbt2 = ACTIVE_ECFW_RO; |
| 167 | } |
Shaunak Saha | cd9e1e4 | 2016-07-12 01:22:33 -0700 | [diff] [blame] | 168 | |
Shaunak Saha | 60b4618 | 2016-08-02 17:25:13 -0700 | [diff] [blame] | 169 | /* Set unknown wake source */ |
| 170 | gnvs->pm1i = ~0ULL; |
Aaron Durbin | 9e81540 | 2016-09-13 12:31:57 -0500 | [diff] [blame] | 171 | |
Duncan Laurie | 1d359b5 | 2016-09-21 18:30:44 -0700 | [diff] [blame] | 172 | /* CPU core count */ |
| 173 | gnvs->pcnt = dev_count_cpu(); |
| 174 | |
Aaron Durbin | 9e81540 | 2016-09-13 12:31:57 -0500 | [diff] [blame] | 175 | if (!dev || !dev->chip_info) { |
| 176 | printk(BIOS_ERR, "BUG! Could not find SOC devicetree config\n"); |
| 177 | return; |
| 178 | } |
| 179 | cfg = dev->chip_info; |
| 180 | |
| 181 | /* Enable DPTF based on mainboard configuration */ |
| 182 | gnvs->dpte = cfg->dptf_enable; |
Vaibhav Shankar | ef8deaf | 2016-08-23 17:56:17 -0700 | [diff] [blame] | 183 | |
| 184 | /* Assign address of PERST_0 if GPIO is defined in devicetree */ |
| 185 | if (cfg->prt0_gpio != GPIO_PRT0_UDEF) |
| 186 | gnvs->prt0 = (uintptr_t)gpio_dwx_address(cfg->prt0_gpio); |
Venkateswarlu Vinjamuri | 6dd7b40 | 2017-02-24 15:37:30 -0800 | [diff] [blame] | 187 | |
| 188 | /* Assign sdcard cd address if GPIO is defined in devicetree */ |
| 189 | if (cfg->sdcard_cd_gpio) |
| 190 | gnvs->scd0 = (uintptr_t)gpio_dwx_address(cfg->sdcard_cd_gpio); |
Shaunak Saha | 60b4618 | 2016-08-02 17:25:13 -0700 | [diff] [blame] | 191 | } |
| 192 | |
| 193 | /* Save wake source information for calculating ACPI _SWS values */ |
| 194 | int soc_fill_acpi_wake(uint32_t *pm1, uint32_t **gpe0) |
| 195 | { |
| 196 | struct chipset_power_state *ps; |
| 197 | static uint32_t gpe0_sts[GPE0_REG_MAX]; |
| 198 | uint32_t pm1_en; |
| 199 | int i; |
| 200 | |
| 201 | ps = cbmem_find(CBMEM_ID_POWER_STATE); |
| 202 | if (ps == NULL) |
| 203 | return -1; |
| 204 | |
| 205 | /* |
| 206 | * PM1_EN to check the basic wake events which can happen through |
| 207 | * powerbtn or any other wake source like lidopen, key board press etc. |
| 208 | * WAK_STS bit is set when the system is in one of the sleep states |
| 209 | * (via the SLP_EN bit) and an enabled wake event occurs. Upon setting |
| 210 | * this bit, the PMC will transition the system to the ON state and |
| 211 | * can only be set by hardware and can only be cleared by writing a one |
| 212 | * to this bit position. |
| 213 | */ |
| 214 | pm1_en = ps->pm1_en | WAK_STS | RTC_EN | PWRBTN_EN; |
| 215 | *pm1 = ps->pm1_sts & pm1_en; |
| 216 | |
| 217 | /* Mask off GPE0 status bits that are not enabled */ |
| 218 | *gpe0 = &gpe0_sts[0]; |
| 219 | for (i = 0; i < GPE0_REG_MAX; i++) |
| 220 | gpe0_sts[i] = ps->gpe0_sts[i] & ps->gpe0_en[i]; |
| 221 | |
| 222 | return GPE0_REG_MAX; |
Lance Zhao | 1bd0c0c | 2016-04-19 18:04:21 -0700 | [diff] [blame] | 223 | } |
| 224 | |
| 225 | void southbridge_inject_dsdt(device_t device) |
| 226 | { |
| 227 | struct global_nvs_t *gnvs; |
| 228 | |
| 229 | gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS); |
| 230 | |
| 231 | if (gnvs) { |
| 232 | acpi_create_gnvs(gnvs); |
| 233 | acpi_save_gnvs((uintptr_t)gnvs); |
Aaron Durbin | 1ee6f0b | 2016-06-10 15:50:34 -0500 | [diff] [blame] | 234 | /* And tell SMI about it */ |
| 235 | smm_setup_structures(gnvs, NULL, NULL); |
Lance Zhao | 1bd0c0c | 2016-04-19 18:04:21 -0700 | [diff] [blame] | 236 | |
| 237 | /* Add it to DSDT. */ |
| 238 | acpigen_write_scope("\\"); |
| 239 | acpigen_write_name_dword("NVSA", (uintptr_t)gnvs); |
| 240 | acpigen_pop_len(); |
| 241 | } |
| 242 | } |
Hannah Williams | 0f61da8 | 2016-04-18 13:47:08 -0700 | [diff] [blame] | 243 | static acpi_cstate_t cstate_map[] = { |
| 244 | { |
| 245 | /* C1 */ |
| 246 | .ctype = 1, /* ACPI C1 */ |
| 247 | .latency = 1, |
| 248 | .power = 1000, |
| 249 | .resource = CSTATE_RES(ACPI_ADDRESS_SPACE_FIXED, 0, 0, 0), |
| 250 | }, |
| 251 | { |
| 252 | .ctype = 2, /* ACPI C2 */ |
| 253 | .latency = 50, |
| 254 | .power = 10, |
| 255 | .resource = CSTATE_RES(ACPI_ADDRESS_SPACE_IO, 8, 0, 0x415), |
| 256 | }, |
| 257 | { |
| 258 | .ctype = 3, /* ACPI C3 */ |
| 259 | .latency = 150, |
| 260 | .power = 10, |
| 261 | .resource = CSTATE_RES(ACPI_ADDRESS_SPACE_IO, 8, 0, 0x419), |
| 262 | } |
| 263 | }; |
| 264 | |
| 265 | acpi_cstate_t *soc_get_cstate_map(int *entries) |
| 266 | { |
| 267 | *entries = ARRAY_SIZE(cstate_map); |
| 268 | return cstate_map; |
| 269 | } |
| 270 | |
| 271 | uint16_t soc_get_acpi_base_address(void) |
| 272 | { |
| 273 | return ACPI_PMIO_BASE; |
| 274 | } |
Furquan Shaikh | 00a9e38 | 2016-10-20 22:45:26 -0700 | [diff] [blame] | 275 | |
| 276 | static void acpigen_soc_get_dw0_in_local5(uintptr_t addr) |
| 277 | { |
| 278 | /* |
| 279 | * Store (\_SB.GPC0 (addr), Local5) |
| 280 | * \_SB.GPC0 is used to read cfg0 value from dw0. It is defined in |
| 281 | * gpiolib.asl. |
| 282 | */ |
| 283 | acpigen_write_store(); |
| 284 | acpigen_emit_namestring("\\_SB.GPC0"); |
| 285 | acpigen_write_integer(addr); |
| 286 | acpigen_emit_byte(LOCAL5_OP); |
| 287 | } |
| 288 | |
| 289 | static int acpigen_soc_get_gpio_val(unsigned int gpio_num, uint32_t mask) |
| 290 | { |
Lee Leahy | d8fb362 | 2017-03-09 10:10:25 -0800 | [diff] [blame] | 291 | assert(gpio_num < TOTAL_PADS); |
Furquan Shaikh | 00a9e38 | 2016-10-20 22:45:26 -0700 | [diff] [blame] | 292 | uintptr_t addr = (uintptr_t)gpio_dwx_address(gpio_num); |
| 293 | |
| 294 | acpigen_soc_get_dw0_in_local5(addr); |
| 295 | |
| 296 | /* If (And (Local5, mask)) */ |
| 297 | acpigen_write_if_and(LOCAL5_OP, mask); |
| 298 | |
| 299 | /* Store (One, Local0) */ |
| 300 | acpigen_write_store_ops(ONE_OP, LOCAL0_OP); |
| 301 | |
| 302 | acpigen_pop_len(); /* If */ |
| 303 | |
| 304 | /* Else */ |
| 305 | acpigen_write_else(); |
| 306 | |
| 307 | /* Store (Zero, Local0) */ |
| 308 | acpigen_write_store_ops(ZERO_OP, LOCAL0_OP); |
| 309 | |
| 310 | acpigen_pop_len(); /* Else */ |
| 311 | |
| 312 | return 0; |
| 313 | } |
| 314 | |
| 315 | static int acpigen_soc_set_gpio_val(unsigned int gpio_num, uint32_t val) |
| 316 | { |
Lee Leahy | d8fb362 | 2017-03-09 10:10:25 -0800 | [diff] [blame] | 317 | assert(gpio_num < TOTAL_PADS); |
Furquan Shaikh | 00a9e38 | 2016-10-20 22:45:26 -0700 | [diff] [blame] | 318 | uintptr_t addr = (uintptr_t)gpio_dwx_address(gpio_num); |
| 319 | |
| 320 | acpigen_soc_get_dw0_in_local5(addr); |
| 321 | |
| 322 | if (val) { |
| 323 | /* Or (Local5, PAD_CFG0_TX_STATE, Local5) */ |
| 324 | acpigen_write_or(LOCAL5_OP, PAD_CFG0_TX_STATE, LOCAL5_OP); |
| 325 | } else { |
| 326 | /* Not (PAD_CFG0_TX_STATE, Local6) */ |
| 327 | acpigen_write_not(PAD_CFG0_TX_STATE, LOCAL6_OP); |
| 328 | |
| 329 | /* And (Local5, Local6, Local5) */ |
| 330 | acpigen_write_and(LOCAL5_OP, LOCAL6_OP, LOCAL5_OP); |
| 331 | } |
| 332 | |
| 333 | /* |
| 334 | * \_SB.SPC0 (addr, Local5) |
| 335 | * \_SB.SPC0 is used to write cfg0 value in dw0. It is defined in |
| 336 | * gpiolib.asl. |
| 337 | */ |
| 338 | acpigen_emit_namestring("\\_SB.SPC0"); |
| 339 | acpigen_write_integer(addr); |
| 340 | acpigen_emit_byte(LOCAL5_OP); |
| 341 | |
| 342 | return 0; |
| 343 | } |
| 344 | |
| 345 | int acpigen_soc_read_rx_gpio(unsigned int gpio_num) |
| 346 | { |
| 347 | return acpigen_soc_get_gpio_val(gpio_num, PAD_CFG0_RX_STATE); |
| 348 | } |
| 349 | |
| 350 | int acpigen_soc_get_tx_gpio(unsigned int gpio_num) |
| 351 | { |
| 352 | return acpigen_soc_get_gpio_val(gpio_num, PAD_CFG0_TX_STATE); |
| 353 | } |
| 354 | |
| 355 | int acpigen_soc_set_tx_gpio(unsigned int gpio_num) |
| 356 | { |
| 357 | return acpigen_soc_set_gpio_val(gpio_num, 1); |
| 358 | } |
| 359 | |
| 360 | int acpigen_soc_clear_tx_gpio(unsigned int gpio_num) |
| 361 | { |
| 362 | return acpigen_soc_set_gpio_val(gpio_num, 0); |
| 363 | } |