From bf719f66a7f2261b69b397072cec5ad99c573891 Mon Sep 17 00:00:00 2001 From: Hadi Asyrafi Date: Wed, 12 Jun 2019 11:24:12 +0800 Subject: [PATCH] intel: Pull out common drivers into platform common Signed-off-by: Hadi Asyrafi Change-Id: Ib79e2c6fe6e66dec5004701133ad6a5f4c78f2fa --- drivers/intel/soc/stratix10/io/s10_memmap_qspi.c | 2 +- .../soc/{stratix10 => common}/drivers/qspi/cadence_qspi.c | 0 .../soc/{stratix10 => common}/drivers/qspi/cadence_qspi.h | 4 ++-- plat/intel/soc/{stratix10 => common}/drivers/wdt/watchdog.c | 0 plat/intel/soc/{stratix10 => common}/drivers/wdt/watchdog.h | 4 ++-- plat/intel/soc/stratix10/bl2_plat_setup.c | 4 ++-- plat/intel/soc/stratix10/platform.mk | 5 +++-- 7 files changed, 10 insertions(+), 9 deletions(-) rename plat/intel/soc/{stratix10 => common}/drivers/qspi/cadence_qspi.c (100%) rename plat/intel/soc/{stratix10 => common}/drivers/qspi/cadence_qspi.h (99%) rename plat/intel/soc/{stratix10 => common}/drivers/wdt/watchdog.c (100%) rename plat/intel/soc/{stratix10 => common}/drivers/wdt/watchdog.h (93%) diff --git a/drivers/intel/soc/stratix10/io/s10_memmap_qspi.c b/drivers/intel/soc/stratix10/io/s10_memmap_qspi.c index 7d7d55fe..a0fc034d 100644 --- a/drivers/intel/soc/stratix10/io/s10_memmap_qspi.c +++ b/drivers/intel/soc/stratix10/io/s10_memmap_qspi.c @@ -15,7 +15,7 @@ #include #include -#include "drivers/qspi/cadence_qspi.h" +#include "qspi/cadence_qspi.h" /* As we need to be able to keep state for seek, only one file can be open * at a time. Make this a structure and point to the entity->info. When we diff --git a/plat/intel/soc/stratix10/drivers/qspi/cadence_qspi.c b/plat/intel/soc/common/drivers/qspi/cadence_qspi.c similarity index 100% rename from plat/intel/soc/stratix10/drivers/qspi/cadence_qspi.c rename to plat/intel/soc/common/drivers/qspi/cadence_qspi.c diff --git a/plat/intel/soc/stratix10/drivers/qspi/cadence_qspi.h b/plat/intel/soc/common/drivers/qspi/cadence_qspi.h similarity index 99% rename from plat/intel/soc/stratix10/drivers/qspi/cadence_qspi.h rename to plat/intel/soc/common/drivers/qspi/cadence_qspi.h index e419161c..3906a1ae 100644 --- a/plat/intel/soc/stratix10/drivers/qspi/cadence_qspi.h +++ b/plat/intel/soc/common/drivers/qspi/cadence_qspi.h @@ -4,8 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ -#ifndef __CAD_QSPI_H__ -#define __CAD_QSPI_H__ +#ifndef CAD_QSPI_H +#define CAD_QSPI_H #define CAD_QSPI_MICRON_N25Q_SUPPORT 1 diff --git a/plat/intel/soc/stratix10/drivers/wdt/watchdog.c b/plat/intel/soc/common/drivers/wdt/watchdog.c similarity index 100% rename from plat/intel/soc/stratix10/drivers/wdt/watchdog.c rename to plat/intel/soc/common/drivers/wdt/watchdog.c diff --git a/plat/intel/soc/stratix10/drivers/wdt/watchdog.h b/plat/intel/soc/common/drivers/wdt/watchdog.h similarity index 93% rename from plat/intel/soc/stratix10/drivers/wdt/watchdog.h rename to plat/intel/soc/common/drivers/wdt/watchdog.h index e9202367..9410242a 100644 --- a/plat/intel/soc/stratix10/drivers/wdt/watchdog.h +++ b/plat/intel/soc/common/drivers/wdt/watchdog.h @@ -4,8 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ -#ifndef __CAD_WATCHDOG_H__ -#define __CAD_WATCHDOG_H__ +#ifndef CAD_WATCHDOG_H +#define CAD_WATCHDOG_H #define WDT_BASE (0xFFD00200) #define WDT_REG_SIZE_OFFSET (0x4) diff --git a/plat/intel/soc/stratix10/bl2_plat_setup.c b/plat/intel/soc/stratix10/bl2_plat_setup.c index 58e8c029..78301628 100644 --- a/plat/intel/soc/stratix10/bl2_plat_setup.c +++ b/plat/intel/soc/stratix10/bl2_plat_setup.c @@ -31,8 +31,8 @@ #include "s10_pinmux.h" #include "aarch64/stratix10_private.h" #include "include/s10_mailbox.h" -#include "drivers/qspi/cadence_qspi.h" -#include "drivers/wdt/watchdog.h" +#include "qspi/cadence_qspi.h" +#include "wdt/watchdog.h" const mmap_region_t plat_stratix10_mmap[] = { diff --git a/plat/intel/soc/stratix10/platform.mk b/plat/intel/soc/stratix10/platform.mk index fdd6e45b..c1d62da9 100644 --- a/plat/intel/soc/stratix10/platform.mk +++ b/plat/intel/soc/stratix10/platform.mk @@ -7,6 +7,7 @@ PLAT_INCLUDES := \ -Iplat/intel/soc/stratix10/ \ -Iplat/intel/soc/stratix10/include/ \ + -Iplat/intel/soc/common/drivers/ PLAT_BL_COMMON_SOURCES := \ lib/xlat_tables/xlat_tables_common.c \ @@ -46,8 +47,8 @@ BL2_SOURCES += \ plat/intel/soc/stratix10/soc/s10_system_manager.c \ common/desc_image_load.c \ plat/intel/soc/stratix10/soc/s10_mailbox.c \ - plat/intel/soc/stratix10/drivers/qspi/cadence_qspi.c \ - plat/intel/soc/stratix10/drivers/wdt/watchdog.c + plat/intel/soc/common/drivers/qspi/cadence_qspi.c \ + plat/intel/soc/common/drivers/wdt/watchdog.c BL31_SOURCES += drivers/arm/cci/cci.c \ lib/cpus/aarch64/cortex_a53.S \ -- 2.30.2