Conditionally compile eSPI support
A board may use either the LPC bus or the eSPI bus. Only include eSPI support for boards that use it. Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
committed by
Jeremy Soller
parent
5e884cf413
commit
d687df482a
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
|
||||
ec-y += ec.c
|
||||
ec-y += espi.c
|
||||
ec-$(CONFIG_BUS_ESPI) += espi.c
|
||||
ec-y += gpio.c
|
||||
ec-y += i2c.c
|
||||
ec-y += kbc.c
|
||||
|
@@ -3,15 +3,8 @@
|
||||
#ifndef _EC_ESPI_H
|
||||
#define _EC_ESPI_H
|
||||
|
||||
// eSPI not supported on IT8587E, may not be used on IT5570E
|
||||
#ifndef EC_ESPI
|
||||
#define EC_ESPI 0
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#if CONFIG_EC_ITE_IT5570E
|
||||
|
||||
struct VirtualWire {
|
||||
volatile uint8_t __xdata * index;
|
||||
uint8_t shift;
|
||||
@@ -126,6 +119,4 @@ volatile uint8_t __xdata __at(0x3293) VWCTRL3;
|
||||
volatile uint8_t __xdata __at(0x3295) VWCTRL5;
|
||||
volatile uint8_t __xdata __at(0x3296) VWCTRL6;
|
||||
|
||||
#endif // CONFIG_EC_ITE_IT5570E
|
||||
|
||||
#endif // _EC_ESPI_H
|
||||
|
@@ -3,17 +3,17 @@
|
||||
#include <ec/espi.h>
|
||||
|
||||
// clang-format off
|
||||
#if EC_ESPI
|
||||
#if CONFIG_BUS_ESPI
|
||||
// eSPI signature (byte 7 = 0xA4)
|
||||
static __code const uint8_t __at(0x40) SIGNATURE[16] = {
|
||||
0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA4, 0x95,
|
||||
0x85, 0x12, 0x5A, 0x5A, 0xAA, 0x00, 0x55, 0x55,
|
||||
};
|
||||
#else // EC_ESPI
|
||||
#else // CONFIG_BUS_ESPI
|
||||
// LPC signature (byte 7 = 0xA5)
|
||||
static __code const uint8_t __at(0x40) SIGNATURE[16] = {
|
||||
0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0xA5, 0x94,
|
||||
0x85, 0x12, 0x5A, 0x5A, 0xAA, 0x00, 0x55, 0x55,
|
||||
};
|
||||
#endif // EC_ESPI
|
||||
#endif // CONFIG_BUS_ESPI
|
||||
// clang-format on
|
||||
|
Reference in New Issue
Block a user