summaryrefslogtreecommitdiff
path: root/board/kukui_scp/mdp_ipi_message.c
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2021-11-04 12:11:58 -0600
committerCommit Bot <commit-bot@chromium.org>2021-11-05 04:22:34 +0000
commit252457d4b21f46889eebad61d4c0a65331919cec (patch)
tree01856c4d31d710b20e85a74c8d7b5836e35c3b98 /board/kukui_scp/mdp_ipi_message.c
parent08f5a1e6fc2c9467230444ac9b582dcf4d9f0068 (diff)
downloadchrome-ec-stabilize-14438.B-ish.tar.gz
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 <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Diffstat (limited to 'board/kukui_scp/mdp_ipi_message.c')
-rw-r--r--board/kukui_scp/mdp_ipi_message.c81
1 files changed, 0 insertions, 81 deletions
diff --git a/board/kukui_scp/mdp_ipi_message.c b/board/kukui_scp/mdp_ipi_message.c
deleted file mode 100644
index eca40b741b..0000000000
--- a/board/kukui_scp/mdp_ipi_message.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/* 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 "ipi_chip.h"
-#include "mdp_ipi_message.h"
-#include "queue_policies.h"
-#include "registers.h"
-#include "task.h"
-#include "util.h"
-
-#define CPRINTF(format, args...) cprintf(CC_IPI, format, ##args)
-#define CPRINTS(format, args...) cprints(CC_IPI, format, ##args)
-
-/* Forwad declaration. */
-static struct consumer const event_mdp_consumer;
-static void event_mdp_written(struct consumer const *consumer, size_t count);
-
-static struct queue const event_mdp_queue = QUEUE_DIRECT(4,
- struct mdp_msg_service, null_producer, event_mdp_consumer);
-static struct consumer const event_mdp_consumer = {
- .queue = &event_mdp_queue,
- .ops = &((struct consumer_ops const) {
- .written = event_mdp_written,
- }),
-};
-
-/* Stub functions only provided by private overlays. */
-#ifndef HAVE_PRIVATE_MT8183
-void mdp_common_init(void) {}
-void mdp_ipi_task_handler(void *pvParameters) {}
-#endif
-
-static void event_mdp_written(struct consumer const *consumer, size_t count)
-{
- task_wake(TASK_ID_MDP_SERVICE);
-}
-
-static void mdp_ipi_handler(int id, void *data, unsigned int len)
-{
- struct mdp_msg_service cmd;
-
- cmd.id = id;
- memcpy(cmd.msg, data, MIN(len, sizeof(cmd.msg)));
-
- /*
- * If there is no other IPI handler touch this queue, we don't need to
- * interrupt_disable() or task_disable_irq().
- */
- if (!queue_add_unit(&event_mdp_queue, &cmd))
- CPRINTS("Could not send mdp id: %d to the queue.", id);
-}
-DECLARE_IPI(IPI_MDP_INIT, mdp_ipi_handler, 0);
-DECLARE_IPI(IPI_MDP_FRAME, mdp_ipi_handler, 0);
-DECLARE_IPI(IPI_MDP_DEINIT, mdp_ipi_handler, 0);
-
-/* This function renames from mdp_service_entry. */
-void mdp_service_task(void *u)
-{
- struct mdp_msg_service rsv_msg;
- size_t size;
-
- mdp_common_init();
-
- while (1) {
- /*
- * Queue unit is added in IPI handler, which is in ISR context.
- * Disable IRQ to prevent a clobbered queue.
- */
- ipi_disable_irq(SCP_IRQ_IPC0);
- size = queue_remove_unit(&event_mdp_queue, &rsv_msg);
- ipi_enable_irq(SCP_IRQ_IPC0);
-
- if (!size)
- task_wait_event(-1);
- else
- mdp_ipi_task_handler(&rsv_msg);
- }
-}