diff options
-rw-r--r-- | board/fizz/board.h | 1 | ||||
-rw-r--r-- | chip/npcx/build.mk | 1 | ||||
-rw-r--r-- | chip/npcx/cec.c | 22 | ||||
-rw-r--r-- | chip/npcx/registers.h | 1 |
4 files changed, 25 insertions, 0 deletions
diff --git a/board/fizz/board.h b/board/fizz/board.h index f0983f11fe..ef7bbb0c65 100644 --- a/board/fizz/board.h +++ b/board/fizz/board.h @@ -21,6 +21,7 @@ #define CONFIG_BOARD_VERSION #define CONFIG_BOARD_SPECIFIC_VERSION #define CONFIG_CRC8 +#define CONFIG_CEC #define CONFIG_CROS_BOARD_INFO #define CONFIG_DEDICATED_RECOVERY_BUTTON #define CONFIG_EMULATED_SYSRQ diff --git a/chip/npcx/build.mk b/chip/npcx/build.mk index 2cd4d087c2..da5f7cbd2f 100644 --- a/chip/npcx/build.mk +++ b/chip/npcx/build.mk @@ -29,6 +29,7 @@ chip-$(CONFIG_LPC)+=lpc.o chip-$(CONFIG_ESPI)+=espi.o chip-$(CONFIG_PECI)+=peci.o chip-$(CONFIG_HOSTCMD_SPS)+=shi.o +chip-$(CONFIG_CEC)+=cec.o # pwm functions are implemented with the fan functions chip-$(CONFIG_PWM)+=pwm.o chip-$(CONFIG_SPI)+=spi.o diff --git a/chip/npcx/cec.c b/chip/npcx/cec.c new file mode 100644 index 0000000000..f21789781f --- /dev/null +++ b/chip/npcx/cec.c @@ -0,0 +1,22 @@ +/* Copyright 2018 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#include "console.h" +#include "hooks.h" +#include "registers.h" + +#if !(DEBUG_CEC) +#define CPRINTF(...) +#define CPRINTS(...) +#else +#define CPRINTF(format, args...) cprintf(CC_CEC, format, ## args) +#define CPRINTS(format, args...) cprints(CC_CEC, format, ## args) +#endif + +static void cec_init(void) +{ + CPRINTS("CEC initialized"); +} +DECLARE_HOOK(HOOK_INIT, cec_init, HOOK_PRIO_LAST); diff --git a/chip/npcx/registers.h b/chip/npcx/registers.h index 9bca32e82f..b204d96085 100644 --- a/chip/npcx/registers.h +++ b/chip/npcx/registers.h @@ -64,6 +64,7 @@ #define DEBUG_CLK 0 #define DEBUG_LPC 0 #define DEBUG_ESPI 0 +#define DEBUG_CEC 0 /* Modules Map */ #define NPCX_ESPI_BASE_ADDR 0x4000A000 |