diff --git a/drivers/bbram/Kconfig.bbram_emul b/drivers/bbram/Kconfig.bbram_emul index 4ed2cb5e66e..9fe7bc4d071 100644 --- a/drivers/bbram/Kconfig.bbram_emul +++ b/drivers/bbram/Kconfig.bbram_emul @@ -1,7 +1,10 @@ # Copyright (c) 2021 Google Inc # SPDX-License-Identifier: Apache-2.0 +DT_COMPAT_ST_BBRAM_EMUL := zephyr,bbram-emul + config BBRAM_EMUL bool "Battery-backed RAM emulated drivers" + default $(dt_compat_enabled,${DT_COMPAT_ST_BBRAM_EMUL}) help This option enables the BBRAM emulation driver. diff --git a/drivers/bbram/Kconfig.npcx b/drivers/bbram/Kconfig.npcx index 3e95e604fff..cd39f1cd328 100644 --- a/drivers/bbram/Kconfig.npcx +++ b/drivers/bbram/Kconfig.npcx @@ -1,8 +1,11 @@ # Copyright (c) 2021 Google Inc # SPDX-License-Identifier: Apache-2.0 +DT_COMPAT_ST_BBRAM_NPCX := nuvoton,npcx-bbram + config BBRAM_NPCX bool "Nuvoton NPCX embedded controller (EC) Battery-backed RAM drivers" depends on SOC_FAMILY_NPCX + default $(dt_compat_enabled,${DT_COMPAT_ST_BBRAM_NPCX}) help This option enables the BBRAM driver for NPCX family of processors. diff --git a/drivers/bbram/bbram_npcx.c b/drivers/bbram/bbram_npcx.c index b7fb8b02ed3..4aa00dd6f08 100644 --- a/drivers/bbram/bbram_npcx.c +++ b/drivers/bbram/bbram_npcx.c @@ -7,7 +7,7 @@ #define DT_DRV_COMPAT nuvoton_npcx_bbram #include -#include +#include #include #include @@ -74,7 +74,7 @@ static int bbram_npcx_read(const struct device *dev, size_t offset, size_t size, } - bytecpy(data, ((volatile uint8_t *)config->base_addr + offset), size); + bytecpy(data, ((uint8_t *)config->base_addr + offset), size); return 0; } @@ -87,7 +87,7 @@ static int bbram_npcx_write(const struct device *dev, size_t offset, size_t size return -EFAULT; } - bytecpy(((volatile uint8_t *)config->base_addr + offset), data, size); + bytecpy(((uint8_t *)config->base_addr + offset), data, size); return 0; } @@ -102,6 +102,8 @@ static const struct bbram_driver_api bbram_npcx_driver_api = { static int bbram_npcx_init(const struct device *dev) { + ARG_UNUSED(dev); + return 0; }