summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYi Chou <yich@google.com>2023-03-25 17:07:42 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-04-18 05:03:02 +0000
commitaf177eb7ecaef30671ee99738f0bf5442d7f590e (patch)
tree9da0f1fe2681060605ab92084f1dab985ed8c178
parent848e5a749e7cd6d02a2b31ee275470ba68cbe43d (diff)
downloadchrome-ec-af177eb7ecaef30671ee99738f0bf5442d7f590e.tar.gz
clock: Remove the weak definition clock_enable_module
BUG=b:248508087 TEST=make buildall -j200 TEST=./util/compare_build.sh -b all => Most of the compare result match except for adlrvpm_ite, adlrvpp_ite, adlrvpp_mchp1727, cozmo, icarus, it8xxx2_pdevb, mchpevb1, npcx_evb, npcx_evb_arm pico. And differ the change is the address of clock_enable_module. BRANCH=none Change-Id: I5750c5d5037f303f6cf55a73a1cd5a9501b49aa1 Signed-off-by: Yi Chou <yich@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4369174 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
-rw-r--r--chip/host/clock.c4
-rw-r--r--chip/ish/clock.c4
-rw-r--r--chip/it83xx/clock.c4
-rw-r--r--chip/max32660/clock_chip.c4
-rw-r--r--chip/mchp/clock.c4
-rw-r--r--chip/mt_scp/mt818x/clock_mt8183.c4
-rw-r--r--chip/mt_scp/mt818x/clock_mt8186.c4
-rw-r--r--chip/mt_scp/mt8192/clock.c4
-rw-r--r--chip/mt_scp/mt8195/clock.c4
-rw-r--r--chip/npcx/clock.c11
-rw-r--r--common/system.c9
-rw-r--r--zephyr/shim/chip/CMakeLists.txt2
-rw-r--r--zephyr/shim/chip/it8xxx2/clock.c4
-rw-r--r--zephyr/shim/chip/stm32/CMakeLists.txt2
-rw-r--r--zephyr/shim/chip/stm32/clock.c10
-rw-r--r--zephyr/shim/chip/stub/CMakeLists.txt7
-rw-r--r--zephyr/shim/chip/stub/clock.c10
17 files changed, 82 insertions, 9 deletions
diff --git a/chip/host/clock.c b/chip/host/clock.c
index 4f90067f3a..defb12f4f0 100644
--- a/chip/host/clock.c
+++ b/chip/host/clock.c
@@ -11,3 +11,7 @@ int clock_get_freq(void)
{
return 16000000;
}
+
+void clock_enable_module(enum module_id module, int enable)
+{
+}
diff --git a/chip/ish/clock.c b/chip/ish/clock.c
index f9fec0b7d2..2fefa11c2f 100644
--- a/chip/ish/clock.c
+++ b/chip/ish/clock.c
@@ -29,3 +29,7 @@ void clock_refresh_console_in_use(void)
*/
ish_pm_refresh_console_in_use();
}
+
+void clock_enable_module(enum module_id module, int enable)
+{
+}
diff --git a/chip/it83xx/clock.c b/chip/it83xx/clock.c
index fccc62eee7..abbbcf3b58 100644
--- a/chip/it83xx/clock.c
+++ b/chip/it83xx/clock.c
@@ -701,3 +701,7 @@ DECLARE_CONSOLE_COMMAND(idlestats, command_idle_stats, "",
#endif /* CONFIG_CMD_IDLE_STATS */
#endif /* CONFIG_LOW_POWER_IDLE */
+
+void clock_enable_module(enum module_id module, int enable)
+{
+}
diff --git a/chip/max32660/clock_chip.c b/chip/max32660/clock_chip.c
index 26225401ba..8e497c846b 100644
--- a/chip/max32660/clock_chip.c
+++ b/chip/max32660/clock_chip.c
@@ -139,3 +139,7 @@ void clock_init(void)
}
}
}
+
+void clock_enable_module(enum module_id module, int enable)
+{
+}
diff --git a/chip/mchp/clock.c b/chip/mchp/clock.c
index 0323d16f8f..8732e21117 100644
--- a/chip/mchp/clock.c
+++ b/chip/mchp/clock.c
@@ -750,3 +750,7 @@ DECLARE_CONSOLE_COMMAND(
"Give a timeout value for the console in use timeout.\n"
"See also 'sleep mask'.");
#endif /* CONFIG_LOW_POWER_IDLE */
+
+void clock_enable_module(enum module_id module, int enable)
+{
+}
diff --git a/chip/mt_scp/mt818x/clock_mt8183.c b/chip/mt_scp/mt818x/clock_mt8183.c
index fca89cd2a5..a48eee952a 100644
--- a/chip/mt_scp/mt818x/clock_mt8183.c
+++ b/chip/mt_scp/mt818x/clock_mt8183.c
@@ -370,3 +370,7 @@ static int command_ulposc(int argc, const char *argv[])
}
DECLARE_CONSOLE_COMMAND(ulposc, command_ulposc, "[calibrate]",
"Calibrate ULPOSC frequency");
+
+void clock_enable_module(enum module_id module, int enable)
+{
+}
diff --git a/chip/mt_scp/mt818x/clock_mt8186.c b/chip/mt_scp/mt818x/clock_mt8186.c
index cb0d339b5f..eafc5992fd 100644
--- a/chip/mt_scp/mt818x/clock_mt8186.c
+++ b/chip/mt_scp/mt818x/clock_mt8186.c
@@ -376,3 +376,7 @@ static int command_ulposc(int argc, const char *argv[])
}
DECLARE_CONSOLE_COMMAND(ulposc, command_ulposc, "[calibrate]",
"Calibrate ULPOSC frequency");
+
+void clock_enable_module(enum module_id module, int enable)
+{
+}
diff --git a/chip/mt_scp/mt8192/clock.c b/chip/mt_scp/mt8192/clock.c
index 21d07d410a..ec6e3f2537 100644
--- a/chip/mt_scp/mt8192/clock.c
+++ b/chip/mt_scp/mt8192/clock.c
@@ -381,3 +381,7 @@ int command_ulposc(int argc, const char *argv[])
DECLARE_CONSOLE_COMMAND(ulposc, command_ulposc, "[ulposc]",
"Measure ULPOSC frequency");
#endif
+
+void clock_enable_module(enum module_id module, int enable)
+{
+}
diff --git a/chip/mt_scp/mt8195/clock.c b/chip/mt_scp/mt8195/clock.c
index 779f356bab..e41a360ae8 100644
--- a/chip/mt_scp/mt8195/clock.c
+++ b/chip/mt_scp/mt8195/clock.c
@@ -501,3 +501,7 @@ int command_ulposc(int argc, const char *argv[])
DECLARE_CONSOLE_COMMAND(ulposc, command_ulposc, "[ulposc]",
"Measure ULPOSC frequency");
#endif
+
+void clock_enable_module(enum module_id module, int enable)
+{
+}
diff --git a/chip/npcx/clock.c b/chip/npcx/clock.c
index 1ab4d1063a..992fc1b628 100644
--- a/chip/npcx/clock.c
+++ b/chip/npcx/clock.c
@@ -162,6 +162,11 @@ void clock_turbo(void)
*/
NPCX_HFCBCD = NPCX_HFCBCD & 0xF3;
}
+
+void clock_enable_module(enum module_id module, int enable)
+{
+}
+
#elif NPCX_FAMILY_VERSION >= NPCX_FAMILY_NPCX7
void clock_turbo(void)
{
@@ -200,6 +205,12 @@ void clock_enable_module(enum module_id module, int enable)
}
}
+#else
+
+void clock_enable_module(enum module_id module, int enable)
+{
+}
+
#endif
/**
diff --git a/common/system.c b/common/system.c
index f598fb36c9..f7bdd5d402 100644
--- a/common/system.c
+++ b/common/system.c
@@ -1835,15 +1835,6 @@ __overridable int board_write_mac_addr(const char *mac_addr)
}
#endif /* CONFIG_MAC_ADDR_LEN */
-__attribute__((weak)) void clock_enable_module(enum module_id module,
- int enable)
-{
- /*
- * Default weak implementation - for chips that don't support this
- * function.
- */
-}
-
__test_only void system_common_reset_state(void)
{
jdata = 0;
diff --git a/zephyr/shim/chip/CMakeLists.txt b/zephyr/shim/chip/CMakeLists.txt
index 0236570ddd..a899a96070 100644
--- a/zephyr/shim/chip/CMakeLists.txt
+++ b/zephyr/shim/chip/CMakeLists.txt
@@ -10,5 +10,7 @@ elseif (DEFINED CONFIG_SOC_FAMILY_MEC)
add_subdirectory(mchp)
elseif (DEFINED CONFIG_SOC_FAMILY_STM32)
add_subdirectory(stm32)
+else ()
+ add_subdirectory(stub)
endif()
diff --git a/zephyr/shim/chip/it8xxx2/clock.c b/zephyr/shim/chip/it8xxx2/clock.c
index a4df87dc1d..ede854ac14 100644
--- a/zephyr/shim/chip/it8xxx2/clock.c
+++ b/zephyr/shim/chip/it8xxx2/clock.c
@@ -31,3 +31,7 @@ int clock_get_freq(void)
return pll_reg_to_freq[reg_val];
}
+
+void clock_enable_module(enum module_id module, int enable)
+{
+}
diff --git a/zephyr/shim/chip/stm32/CMakeLists.txt b/zephyr/shim/chip/stm32/CMakeLists.txt
index 52787ce656..8dfbcd5834 100644
--- a/zephyr/shim/chip/stm32/CMakeLists.txt
+++ b/zephyr/shim/chip/stm32/CMakeLists.txt
@@ -3,3 +3,5 @@
# found in the LICENSE file.
cros_ec_library_include_directories(include)
+
+zephyr_library_sources(clock.c)
diff --git a/zephyr/shim/chip/stm32/clock.c b/zephyr/shim/chip/stm32/clock.c
new file mode 100644
index 0000000000..5adf7b2412
--- /dev/null
+++ b/zephyr/shim/chip/stm32/clock.c
@@ -0,0 +1,10 @@
+/* Copyright 2023 The ChromiumOS Authors
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "clock.h"
+
+void clock_enable_module(enum module_id module, int enable)
+{
+}
diff --git a/zephyr/shim/chip/stub/CMakeLists.txt b/zephyr/shim/chip/stub/CMakeLists.txt
new file mode 100644
index 0000000000..8dfbcd5834
--- /dev/null
+++ b/zephyr/shim/chip/stub/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Copyright 2023 The ChromiumOS Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+cros_ec_library_include_directories(include)
+
+zephyr_library_sources(clock.c)
diff --git a/zephyr/shim/chip/stub/clock.c b/zephyr/shim/chip/stub/clock.c
new file mode 100644
index 0000000000..5adf7b2412
--- /dev/null
+++ b/zephyr/shim/chip/stub/clock.c
@@ -0,0 +1,10 @@
+/* Copyright 2023 The ChromiumOS Authors
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "clock.h"
+
+void clock_enable_module(enum module_id module, int enable)
+{
+}