summaryrefslogtreecommitdiff
path: root/src/soc/intel/jasperlake/acpi
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/jasperlake/acpi')
-rw-r--r--src/soc/intel/jasperlake/acpi/gpio.asl2
-rw-r--r--src/soc/intel/jasperlake/acpi/gpio_op.asl126
2 files changed, 1 insertions, 127 deletions
diff --git a/src/soc/intel/jasperlake/acpi/gpio.asl b/src/soc/intel/jasperlake/acpi/gpio.asl
index f8b180df11..e39ac8afc2 100644
--- a/src/soc/intel/jasperlake/acpi/gpio.asl
+++ b/src/soc/intel/jasperlake/acpi/gpio.asl
@@ -1,10 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <intelblocks/gpio.h>
+#include <soc/intel/common/block/acpi/acpi/gpio_op.asl>
#include <soc/gpio_defs.h>
#include <soc/irq.h>
#include <soc/pcr_ids.h>
-#include "gpio_op.asl"
#include <soc/intel/common/acpi/gpio.asl>
diff --git a/src/soc/intel/jasperlake/acpi/gpio_op.asl b/src/soc/intel/jasperlake/acpi/gpio_op.asl
deleted file mode 100644
index ff12da4c10..0000000000
--- a/src/soc/intel/jasperlake/acpi/gpio_op.asl
+++ /dev/null
@@ -1,126 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-/*
- * Get GPIO Value
- * Arg0 - GPIO Number
- */
-Method (GRXS, 1, Serialized)
-{
- OperationRegion (PREG, SystemMemory, GADD (Arg0), 4)
- Field (PREG, AnyAcc, NoLock, Preserve)
- {
- VAL0, 32
- }
- Local0 = (PAD_CFG0_RX_STATE & VAL0) >> PAD_CFG0_RX_STATE_BIT
-
- Return (Local0)
-}
-
-/*
- * Get GPIO Tx Value
- * Arg0 - GPIO Number
- */
-Method (GTXS, 1, Serialized)
-{
- OperationRegion (PREG, SystemMemory, GADD (Arg0), 4)
- Field (PREG, AnyAcc, NoLock, Preserve)
- {
- VAL0, 32
- }
- Local0 = PAD_CFG0_TX_STATE & VAL0
-
- Return (Local0)
-}
-
-/*
- * Set GPIO Tx Value
- * Arg0 - GPIO Number
- */
-Method (STXS, 1, Serialized)
-{
- OperationRegion (PREG, SystemMemory, GADD (Arg0), 4)
- Field (PREG, AnyAcc, NoLock, Preserve)
- {
- VAL0, 32
- }
- VAL0 |= PAD_CFG0_TX_STATE
-}
-
-/*
- * Clear GPIO Tx Value
- * Arg0 - GPIO Number
- */
-Method (CTXS, 1, Serialized)
-{
- OperationRegion (PREG, SystemMemory, GADD (Arg0), 4)
- Field (PREG, AnyAcc, NoLock, Preserve)
- {
- VAL0, 32
- }
- VAL0 &= ~PAD_CFG0_TX_STATE
-}
-
-/*
- * Set Pad mode
- * Arg0 - GPIO Number
- * Arg1 - Pad mode
- * 0 = GPIO control pad
- * 1 = Native Function 1
- * 2 = Native Function 2
- * 3 = Native Function 3
- */
-Method (GPMO, 2, Serialized)
-{
- OperationRegion (PREG, SystemMemory, GADD (Arg0), 4)
- Field (PREG, AnyAcc, NoLock, Preserve)
- {
- VAL0, 32
- }
- Local0 = ~PAD_CFG0_MODE_MASK & VAL0
- Arg1 = (Arg1 << PAD_CFG0_MODE_SHIFT) & PAD_CFG0_MODE_MASK
- VAL0 = Local0 | Arg1
-}
-
-/*
- * Enable/Disable Tx buffer
- * Arg0 - GPIO Number
- * Arg1 - TxBuffer state
- * 0 = Disable Tx Buffer
- * 1 = Enable Tx Buffer
- */
-Method (GTXE, 2, Serialized)
-{
- OperationRegion (PREG, SystemMemory, GADD (Arg0), 4)
- Field (PREG, AnyAcc, NoLock, Preserve)
- {
- VAL0, 32
- }
-
- If (Arg1 == 1) {
- VAL0 &= ~PAD_CFG0_TX_DISABLE
- } ElseIf (Arg1 == 0){
- VAL0 &= PAD_CFG0_TX_DISABLE
- }
-}
-
-/*
- * Enable/Disable Rx buffer
- * Arg0 - GPIO Number
- * Arg1 - RxBuffer state
- * 0 = Disable Rx Buffer
- * 1 = Enable Rx Buffer
- */
-Method (GRXE, 2, Serialized)
-{
- OperationRegion (PREG, SystemMemory, GADD (Arg0), 4)
- Field (PREG, AnyAcc, NoLock, Preserve)
- {
- VAL0, 32
- }
-
- If (Arg1 == 1) {
- VAL0 &= ~PAD_CFG0_RX_DISABLE
- } ElseIf (Arg1 == 0){
- VAL0 |= PAD_CFG0_RX_DISABLE
- }
-}