From 252457d4b21f46889eebad61d4c0a65331919cec Mon Sep 17 00:00:00 2001 From: Jack Rosenthal Date: Thu, 4 Nov 2021 12:11:58 -0600 Subject: ish: Trim down the release branch In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink Reviewed-by: Tom Hughes --- zephyr/shim/core/CMakeLists.txt | 7 ------ zephyr/shim/core/cortex-m/CMakeLists.txt | 5 ----- zephyr/shim/core/cortex-m/mpu.c | 38 -------------------------------- 3 files changed, 50 deletions(-) delete mode 100644 zephyr/shim/core/CMakeLists.txt delete mode 100644 zephyr/shim/core/cortex-m/CMakeLists.txt delete mode 100644 zephyr/shim/core/cortex-m/mpu.c (limited to 'zephyr/shim/core') diff --git a/zephyr/shim/core/CMakeLists.txt b/zephyr/shim/core/CMakeLists.txt deleted file mode 100644 index e1b13f21f4..0000000000 --- a/zephyr/shim/core/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright 2021 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. - -if (DEFINED CONFIG_CPU_CORTEX_M) - add_subdirectory(cortex-m) -endif() diff --git a/zephyr/shim/core/cortex-m/CMakeLists.txt b/zephyr/shim/core/cortex-m/CMakeLists.txt deleted file mode 100644 index 01e5673f9e..0000000000 --- a/zephyr/shim/core/cortex-m/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -# Copyright 2021 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. - -zephyr_library_sources_ifdef(CONFIG_PLATFORM_EC_MPU mpu.c) diff --git a/zephyr/shim/core/cortex-m/mpu.c b/zephyr/shim/core/cortex-m/mpu.c deleted file mode 100644 index 24d7948143..0000000000 --- a/zephyr/shim/core/cortex-m/mpu.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright 2021 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 "config.h" -#include "mpu.h" -#include "logging/log.h" -#include -#include -#include - -LOG_MODULE_REGISTER(shim_mpu, LOG_LEVEL_ERR); - -void mpu_enable(void) -{ - for (int index = 0; index < mpu_config.num_regions; index++) { - MPU->RNR = index; - MPU->RASR |= MPU_RASR_ENABLE_Msk; - LOG_DBG("[%d] %08x %08x", index, MPU->RBAR, MPU->RASR); - } -} - -static int mpu_disable_fixed_regions(const struct device *dev) -{ - /* MPU is configured and enabled by the Zephyr init code, disable the - * fixed sections by default. - */ - for (int index = 0; index < mpu_config.num_regions; index++) { - MPU->RNR = index; - MPU->RASR &= ~MPU_RASR_ENABLE_Msk; - LOG_DBG("[%d] %08x %08x", index, MPU->RBAR, MPU->RASR); - } - - return 0; -} - -SYS_INIT(mpu_disable_fixed_regions, PRE_KERNEL_1, 50); -- cgit v1.2.1