summaryrefslogtreecommitdiff
path: root/board/kukui_scp
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
parent08f5a1e6fc2c9467230444ac9b582dcf4d9f0068 (diff)
downloadchrome-ec-stabilize-14588.123.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')
-rw-r--r--board/kukui_scp/board.c21
-rw-r--r--board/kukui_scp/board.h112
-rw-r--r--board/kukui_scp/build.mk23
-rw-r--r--board/kukui_scp/ec.tasklist30
-rw-r--r--board/kukui_scp/fd.c83
-rw-r--r--board/kukui_scp/fd.h35
-rw-r--r--board/kukui_scp/gpio.inc32
-rw-r--r--board/kukui_scp/isp_p1_srv.c83
-rw-r--r--board/kukui_scp/isp_p1_srv.h21
-rwxr-xr-xboard/kukui_scp/isp_p2_srv.c80
-rw-r--r--board/kukui_scp/isp_p2_srv.h21
-rw-r--r--board/kukui_scp/mdp_ipi_message.c81
-rw-r--r--board/kukui_scp/mdp_ipi_message.h19
-rwxr-xr-xboard/kukui_scp/update_scp38
-rw-r--r--board/kukui_scp/vdec.c89
-rw-r--r--board/kukui_scp/vdec.h33
-rw-r--r--board/kukui_scp/venc.c85
-rw-r--r--board/kukui_scp/venc.h30
18 files changed, 0 insertions, 916 deletions
diff --git a/board/kukui_scp/board.c b/board/kukui_scp/board.c
deleted file mode 100644
index e5c4f0c760..0000000000
--- a/board/kukui_scp/board.c
+++ /dev/null
@@ -1,21 +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.
- */
-/* Kukui SCP configuration */
-
-#include "common.h"
-#include "console.h"
-#include "ec_commands.h"
-#include "ec_version.h"
-#include "gpio.h"
-#include "hooks.h"
-#include "power.h"
-#include "registers.h"
-#include "task.h"
-#include "timer.h"
-#include "util.h"
-
-/* Build GPIO tables */
-#include "gpio_list.h"
-
diff --git a/board/kukui_scp/board.h b/board/kukui_scp/board.h
deleted file mode 100644
index 4847cdf939..0000000000
--- a/board/kukui_scp/board.h
+++ /dev/null
@@ -1,112 +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.
- */
-
-/* Kukui SCP configuration */
-
-#ifndef __CROS_EC_BOARD_H
-#define __CROS_EC_BOARD_H
-
-#define CC_DEFAULT (CC_ALL & ~(CC_MASK(CC_HOSTCMD) | CC_MASK(CC_IPI)))
-
-#define CONFIG_FLASH_SIZE_BYTES 0x58000 /* Image file size: 256KB */
-#undef CONFIG_LID_SWITCH
-#undef CONFIG_FW_INCLUDE_RO
-#define CONFIG_MKBP_EVENT
-/* Sent MKBP event via IPI. */
-#define CONFIG_MKBP_USE_CUSTOM
-#define CONFIG_FPU
-#define CONFIG_PRESERVE_LOGS
-
-#define CONFIG_HOSTCMD_ALIGNED
-
-/*
- * RW only, no flash
- * +-------------------- 0x0
- * | ROM vectortable, .text, .rodata, .data LMA
- * +-------------------- 0x10000
- * | RAM .bss, .data
- * +-------------------- 0x7BDB0
- * | IPI shared buffer with AP (288 + 8) * 2
- * +-------------------- 0x7C000
- * | 8KB I-CACHE
- * +-------------------- 0x7E000
- * | 8KB D-CACHE
- * +-------------------- 0x80000
- */
-#define ICACHE_BASE 0x7C000
-#define CONFIG_ROM_BASE 0x0
-#define CONFIG_RAM_BASE 0x58000
-#define CONFIG_ROM_SIZE (CONFIG_RAM_BASE - CONFIG_ROM_BASE)
-#define CONFIG_RAM_SIZE (CONFIG_IPC_SHARED_OBJ_ADDR - CONFIG_RAM_BASE)
-#define CONFIG_CODE_RAM_SIZE CONFIG_RAM_BASE
-#define CONFIG_DATA_RAM_SIZE (ICACHE_BASE - CONFIG_RAM_BASE)
-#define CONFIG_RO_MEM_OFF 0
-
-/* Access DRAM through cached access */
-#define CONFIG_DRAM_BASE 0x10000000
-/* Shared memory address in AP physical address space. */
-#define CONFIG_DRAM_BASE_LOAD 0x50000000
-#define CONFIG_DRAM_SIZE 0x01400000 /* 20 MB */
-
-/* IPI configs */
-#define CONFIG_IPC_SHARED_OBJ_BUF_SIZE 288
-#define CONFIG_IPC_SHARED_OBJ_ADDR \
- (ICACHE_BASE - \
- (CONFIG_IPC_SHARED_OBJ_BUF_SIZE + 2 * 4 /* int32_t */) * 2)
-#define CONFIG_IPI
-#define CONFIG_RPMSG_NAME_SERVICE
-
-#define CONFIG_LTO
-
-/* IPI ID should be in sync across kernel and EC. */
-#define IPI_SCP_INIT 0
-#define IPI_VDEC_H264 1
-#define IPI_VDEC_VP8 2
-#define IPI_VDEC_VP9 3
-#define IPI_VENC_H264 4
-#define IPI_VENC_VP8 5
-#define IPI_MDP_INIT 6
-#define IPI_MDP_DEINIT 7
-#define IPI_MDP_FRAME 8
-#define IPI_DIP 9
-#define IPI_ISP_CMD 10
-#define IPI_ISP_FRAME 11
-#define IPI_FD_CMD 12
-#define IPI_HOST_COMMAND 13
-#define IPI_COUNT 14
-
-#define IPI_NS_SERVICE 0xFF
-
-
-#undef CONFIG_UART_TX_BUF_SIZE
-#define CONFIG_UART_TX_BUF_SIZE 8192
-
-#undef CONFIG_UART_CONSOLE
-/*
- * CONFIG_UART_CONSOLE
- * 0 - SCP UART0
- * 1 - SCP UART1
- * 2 - share with AP UART0
- */
-#define CONFIG_UART_CONSOLE 0
-
-/* We let AP setup the correct pinmux. */
-#undef UART0_PINMUX_11_12
-#undef UART0_PINMUX_110_112
-
-/* Track AP power state */
-#define CONFIG_POWER_TRACK_HOST_SLEEP_STATE
-
-/* Debugging features */
-#define CONFIG_DEBUG_EXCEPTIONS
-#define CONFIG_DEBUG_STACK_OVERFLOW
-#define CONFIG_CMD_GPIO_EXTENDED
-
-#ifndef __ASSEMBLER__
-
-#include "gpio_signal.h"
-
-#endif /* !__ASSEMBLER__ */
-#endif /* __CROS_EC_BOARD_H */
diff --git a/board/kukui_scp/build.mk b/board/kukui_scp/build.mk
deleted file mode 100644
index 19355b5af5..0000000000
--- a/board/kukui_scp/build.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-# -*- makefile -*-
-# 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.
-#
-# Board specific files build
-#
-CHIP:=mt_scp
-CHIP_VARIANT:=mt8183
-
-board-y=board.o
-board-$(HAS_TASK_VDEC_SERVICE)+=vdec.o
-board-$(HAS_TASK_VENC_SERVICE)+=venc.o
-
-# ISP P1
-board-$(HAS_TASK_ISP_SERVICE)+=isp_p1_srv.o
-# FD
-board-$(HAS_TASK_FD_SERVICE)+=fd.o
-
-# ISP P2
-board-$(HAS_TASK_DIP_SERVICE)+=isp_p2_srv.o
-# MDP3
-board-$(HAS_TASK_MDP_SERVICE)+=mdp_ipi_message.o
diff --git a/board/kukui_scp/ec.tasklist b/board/kukui_scp/ec.tasklist
deleted file mode 100644
index 935d409b00..0000000000
--- a/board/kukui_scp/ec.tasklist
+++ /dev/null
@@ -1,30 +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.
- */
-
-/**
- * See CONFIG_TASK_LIST in config.h for details.
- */
-
-/* We don't need uart_task when using scp uart (uart0, uart1). */
-#if CONFIG_UART_CONSOLE == 2
-#define UART_TASK TASK_ALWAYS(APUART, uart_task, NULL, LARGER_TASK_STACK_SIZE)
-#else
-#define UART_TASK
-#endif
-
-#define S3_SUSPEND_TASK_LIST \
- TASK_ALWAYS(VDEC_SERVICE, vdec_service_task, NULL, LARGER_TASK_STACK_SIZE) \
- TASK_ALWAYS(VENC_SERVICE, venc_service_task, NULL, LARGER_TASK_STACK_SIZE) \
- TASK_ALWAYS(FD_SERVICE, fd_service_task, NULL, 760) \
- TASK_ALWAYS(DIP_SERVICE, dip_service_task, NULL, 6400) \
- TASK_ALWAYS(MDP_SERVICE, mdp_service_task, NULL, 1800) \
- TASK_ALWAYS(ISP_SERVICE, isp_service_task, NULL, 880)
-
-#define CONFIG_TASK_LIST \
- TASK_ALWAYS(HOOKS, hook_task, NULL, LARGER_TASK_STACK_SIZE) \
- UART_TASK \
- S3_SUSPEND_TASK_LIST \
- TASK_ALWAYS(HOSTCMD, host_command_task, NULL, LARGER_TASK_STACK_SIZE) \
- TASK_ALWAYS(CONSOLE, console_task, NULL, LARGER_TASK_STACK_SIZE)
diff --git a/board/kukui_scp/fd.c b/board/kukui_scp/fd.c
deleted file mode 100644
index 237f15ca94..0000000000
--- a/board/kukui_scp/fd.c
+++ /dev/null
@@ -1,83 +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 "fd.h"
-#include "hooks.h"
-#include "ipi_chip.h"
-#include "queue.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_fd_consumer;
-static void event_fd_written(struct consumer const *consumer, size_t count);
-
-static struct queue const fd_queue = QUEUE_DIRECT(4, struct fd_msg,
- null_producer,
- event_fd_consumer);
-static struct consumer const event_fd_consumer = {
- .queue = &fd_queue,
- .ops = &((struct consumer_ops const) {
- .written = event_fd_written,
- }),
-};
-
-/* Stub functions only provided by private overlays. */
-// Jerry TODO implement private part and remove this
-#ifndef HAVE_PRIVATE_MT8183
-void fd_ipi_msg_handler(void *data) {}
-#endif
-
-static void event_fd_written(struct consumer const *consumer, size_t count)
-{
- task_wake(TASK_ID_FD_SERVICE);
-}
-
-static void fd_ipi_handler(int id, void *data, uint32_t len)
-{
- struct fd_msg rsv_msg;
-
- if (!len)
- return;
-
- rsv_msg.type = IPI_FD_CMD;
- memcpy(rsv_msg.msg, data, MIN(len, sizeof(rsv_msg.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(&fd_queue, &rsv_msg))
- CPRINTS("Could not send fd %d to the queue.", rsv_msg.type);
-}
-DECLARE_IPI(IPI_FD_CMD, fd_ipi_handler, 0);
-
-/* This function renames from fd_service_entry. */
-void fd_service_task(void *u)
-{
- struct fd_msg rsv_msg;
- size_t size;
-
- 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(&fd_queue, &rsv_msg);
- ipi_enable_irq(SCP_IRQ_IPC0);
-
- if (!size)
- task_wait_event(-1);
- else
- fd_ipi_msg_handler(rsv_msg.msg);
- }
-}
diff --git a/board/kukui_scp/fd.h b/board/kukui_scp/fd.h
deleted file mode 100644
index 3f70387400..0000000000
--- a/board/kukui_scp/fd.h
+++ /dev/null
@@ -1,35 +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.
- */
-
-#ifndef __CROS_EC_SCP_FD_H
-#define __CROS_EC_SCP_FD_H
-
-#include "compile_time_macros.h"
-#include "queue.h"
-#include "registers.h"
-
-enum fd_msg_type {
- FD_IPI_MSG,
- FD_MAX,
-};
-
-enum fd_cmd_type {
- FD_CMD_INIT,
- FD_CMD_ENQ,
- FD_CMD_EXIT,
-};
-
-typedef void (*fd_msg_handler)(void *msg);
-
-struct fd_msg {
- enum fd_msg_type type;
- unsigned char msg[110];
-};
-BUILD_ASSERT(member_size(struct fd_msg, msg) <= CONFIG_IPC_SHARED_OBJ_BUF_SIZE);
-
-/* Functions provided by private overlay. */
-void fd_ipi_msg_handler(void *data);
-
-#endif /* __CROS_EC_SCP_FD_H */
diff --git a/board/kukui_scp/gpio.inc b/board/kukui_scp/gpio.inc
deleted file mode 100644
index b186904aad..0000000000
--- a/board/kukui_scp/gpio.inc
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- mode:c -*-
- *
- * 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.
- */
-
-/* Unimplemented signals which we need to emulate for now */
-UNIMPLEMENTED(ENTERING_RW)
-UNIMPLEMENTED(WP_L)
-
-/*
- * GPIOn = port * 32 + bit
- *
- * EINT ALT function:
- * GPIO[0-3]: Alt3
- * GPIO[4-7]: Alt6
- * UART0 ALT function:
- * GPIO[110]: Alt3 TP_URXD1_AO
- * GPIO[112]: Alt3 TP_UTXD1_AO
- */
-ALTERNATE(PIN_MASK(0, 0x00000070), 6, MODULE_GPIO, 0) /* GPIO 5,6,7 as SCP EINT */
-#if CONFIG_UART_CONSOLE == 0
-#ifdef UART0_PINMUX_110_112
-/* Use SCP debug UART. */
-ALTERNATE(PIN_MASK(3, 0x00014000), 3, MODULE_UART, 0) /* GPIO 110,112 as UART0 */
-#endif /* UART0_PINMUX_110_112 */
-#ifdef UART0_PINMUX_11_12
-/* Use H1(AP->H1) rework UART. */
-ALTERNATE(PIN_MASK(0, 0x00001800), 1, MODULE_UART, 0) /* GPIO 11,12 as UART0 */
-#endif /* UART0_PINMUX_11_12 */
-#endif /* CONFIG_UART_CONSOLE == 0 */
diff --git a/board/kukui_scp/isp_p1_srv.c b/board/kukui_scp/isp_p1_srv.c
deleted file mode 100644
index 5c2ae7c2e9..0000000000
--- a/board/kukui_scp/isp_p1_srv.c
+++ /dev/null
@@ -1,83 +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 "dma.h"
-#include "hooks.h"
-#include "ipi_chip.h"
-#include "isp_p1_srv.h"
-#include "queue.h"
-#include "queue_policies.h"
-#include "registers.h"
-#include "task.h"
-#include "util.h"
-
-#define CPRINTS(format, args...) cprints(CC_IPI, format, ##args)
-
-/* Forwad declaration. */
-static struct consumer const event_isp_consumer;
-static void event_isp_written(struct consumer const *consumer, size_t count);
-
-static struct queue const event_isp_queue = QUEUE_DIRECT(8,
- struct isp_msg, null_producer, event_isp_consumer);
-
-static struct consumer const event_isp_consumer = {
- .queue = &event_isp_queue,
- .ops = &((struct consumer_ops const) {
- .written = event_isp_written,
- }),
-};
-
-/* Stub functions only provided by private overlays. */
-#ifndef HAVE_PRIVATE_MT8183
-void isp_msg_handler(void *data) {}
-#endif
-
-static void event_isp_written(struct consumer const *consumer, size_t count)
-{
- task_wake(TASK_ID_ISP_SERVICE);
-}
-
-static void isp_ipi_msg_handler(int id, void *data, uint32_t len)
-{
- struct isp_msg rsv_msg;
-
- if (!len)
- return;
-
- rsv_msg.id = id;
- memcpy(rsv_msg.msg, data, MIN(len, sizeof(rsv_msg.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_isp_queue, &rsv_msg))
- CPRINTS("Could not send isp %d to the queue", id);
-}
-DECLARE_IPI(IPI_ISP_CMD, isp_ipi_msg_handler, 0);
-DECLARE_IPI(IPI_ISP_FRAME, isp_ipi_msg_handler, 0);
-
-/* This function renames from isp_service_entry. */
-void isp_service_task(void *u)
-{
- struct isp_msg rsv_msg;
- size_t size;
-
- 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_isp_queue, &rsv_msg);
- ipi_enable_irq(SCP_IRQ_IPC0);
-
- if (!size)
- task_wait_event(-1);
- else
- isp_msg_handler(&rsv_msg);
- }
-}
diff --git a/board/kukui_scp/isp_p1_srv.h b/board/kukui_scp/isp_p1_srv.h
deleted file mode 100644
index ba6fa7d110..0000000000
--- a/board/kukui_scp/isp_p1_srv.h
+++ /dev/null
@@ -1,21 +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.
- */
-
-#ifndef __CROS_EC_ISP_P1_SRV_H
-#define __CROS_EC_ISP_P1_SRV_H
-
-#include "ipi_chip.h"
-
-struct isp_msg {
- unsigned char id;
- unsigned char msg[140];
-};
-
-BUILD_ASSERT(member_size(struct isp_msg, msg) <= CONFIG_IPC_SHARED_OBJ_BUF_SIZE);
-
-/* Functions provided by private overlay. */
-void isp_msg_handler(void *data);
-
-#endif /* __CROS_EC_ISP_P1_SRV_H */
diff --git a/board/kukui_scp/isp_p2_srv.c b/board/kukui_scp/isp_p2_srv.c
deleted file mode 100755
index dba330c6a8..0000000000
--- a/board/kukui_scp/isp_p2_srv.c
+++ /dev/null
@@ -1,80 +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 "hooks.h"
-#include "ipi_chip.h"
-#include "isp_p2_srv.h"
-#include "queue.h"
-#include "queue_policies.h"
-#include "registers.h"
-#include "task.h"
-#include "util.h"
-
-#define CPRINTS(format, args...) cprints(CC_IPI, format, ##args)
-
-/* Forwad declaration. */
-static struct consumer const event_dip_consumer;
-static void event_dip_written(struct consumer const *consumer, size_t count);
-
-static struct queue const event_dip_queue = QUEUE_DIRECT(4,
- struct dip_msg_service, null_producer, event_dip_consumer);
-
-static struct consumer const event_dip_consumer = {
- .queue = &event_dip_queue,
- .ops = &((struct consumer_ops const) {
- .written = event_dip_written,
- }),
-};
-
-/* Stub functions only provided by private overlays. */
-#ifndef HAVE_PRIVATE_MT8183
-void dip_msg_handler(void *data) {}
-#endif
-
-static void event_dip_written(struct consumer const *consumer, size_t count)
-{
- task_wake(TASK_ID_DIP_SERVICE);
-}
-
-static void dip_scp_ipi_handler(int id, void *data, uint32_t len)
-{
- struct dip_msg_service rsv_msg;
-
- if (!len)
- return;
- rsv_msg.id = id;
- memcpy(rsv_msg.msg, data, MIN(len, sizeof(rsv_msg.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_dip_queue, &rsv_msg))
- CPRINTS("Could not send dip %d to the queue.", id);
-}
-DECLARE_IPI(IPI_DIP, dip_scp_ipi_handler, 0);
-
-/* This function renames from dip_service_entry. */
-void dip_service_task(void *u)
-{
- struct dip_msg_service rsv_msg;
- size_t size;
-
- 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_dip_queue, &rsv_msg);
- ipi_enable_irq(SCP_IRQ_IPC0);
-
- if (!size)
- task_wait_event(-1);
- else
- dip_msg_handler(&rsv_msg);
- }
-}
diff --git a/board/kukui_scp/isp_p2_srv.h b/board/kukui_scp/isp_p2_srv.h
deleted file mode 100644
index 70fb0673de..0000000000
--- a/board/kukui_scp/isp_p2_srv.h
+++ /dev/null
@@ -1,21 +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.
- */
-
-#ifndef __CROS_EC_ISP_P2_SRV_H
-#define __CROS_EC_ISP_P2_SRV_H
-
-#include "ipi_chip.h"
-
-struct dip_msg_service {
- unsigned char id;
- unsigned char msg[288];
-};
-
-BUILD_ASSERT(member_size(struct dip_msg_service, msg) <= CONFIG_IPC_SHARED_OBJ_BUF_SIZE);
-
-/* Functions provided by private overlay. */
-void dip_msg_handler(void *data);
-
-#endif /* __CROS_EC_ISP_P2_SRV_H */
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);
- }
-}
diff --git a/board/kukui_scp/mdp_ipi_message.h b/board/kukui_scp/mdp_ipi_message.h
deleted file mode 100644
index bcedb58504..0000000000
--- a/board/kukui_scp/mdp_ipi_message.h
+++ /dev/null
@@ -1,19 +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.
- */
-
-#ifndef _MDP_IPI_MESSAGE_H
-#define _MDP_IPI_MESSAGE_H
-
-struct mdp_msg_service {
- int id;
- unsigned char msg[20];
-};
-
-BUILD_ASSERT(member_size(struct mdp_msg_service, msg) <= CONFIG_IPC_SHARED_OBJ_BUF_SIZE);
-
-void mdp_common_init(void);
-void mdp_ipi_task_handler(void *pvParameters);
-
-#endif // _MDP_IPI_MESSAGE_H
diff --git a/board/kukui_scp/update_scp b/board/kukui_scp/update_scp
deleted file mode 100755
index 846095a7f9..0000000000
--- a/board/kukui_scp/update_scp
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-# Copyright 2019 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.
-
-usage() {
- echo "Usage: $0 [IP] [bin/elf]" >&2
- echo >&2
- echo "Deploy kukui_scp image to DUT, and restart the remoteproc driver" >&2
- exit 2
-}
-
-if [[ -z "$1" ]]; then
- usage
-fi
-
-KUKUI_IP="$1"
-INFILE="build/kukui_scp/ec.bin"
-
-case "$2" in
-bin)
- ;;
-elf|"") # Default
- # ec.obj is an elf file that has the right memory layout to be loaded
- # from the AP/kernel.
- INFILE="build/kukui_scp/ec.obj"
- ;;
-*)
- usage
- ;;
-esac
-
-scp "$INFILE" "$KUKUI_IP":/lib/firmware/scp.img
-
-ssh "$KUKUI_IP" sh -x -c "'
- sync;
- echo stop > /sys/class/remoteproc/remoteproc0/state;
- echo start > /sys/class/remoteproc/remoteproc0/state'"
diff --git a/board/kukui_scp/vdec.c b/board/kukui_scp/vdec.c
deleted file mode 100644
index eb4f1f8fa1..0000000000
--- a/board/kukui_scp/vdec.c
+++ /dev/null
@@ -1,89 +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 "hooks.h"
-#include "ipi_chip.h"
-#include "queue.h"
-#include "queue_policies.h"
-#include "registers.h"
-#include "task.h"
-#include "util.h"
-#include "vdec.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_vdec_consumer;
-static void event_vdec_written(struct consumer const *consumer, size_t count);
-
-static struct queue const event_vdec_queue = QUEUE_DIRECT(8,
- struct vdec_msg, null_producer, event_vdec_consumer);
-static struct consumer const event_vdec_consumer = {
- .queue = &event_vdec_queue,
- .ops = &((struct consumer_ops const) {
- .written = event_vdec_written,
- }),
-};
-
-/* Stub functions only provided by private overlays. */
-#ifndef HAVE_PRIVATE_MT8183
-void vdec_h264_service_init(void) {}
-void vdec_h264_msg_handler(void *data) {}
-#endif
-
-static vdec_msg_handler mtk_vdec_msg_handle[VDEC_MAX];
-
-static void event_vdec_written(struct consumer const *consumer, size_t count)
-{
- task_wake(TASK_ID_VDEC_SERVICE);
-}
-
-static void vdec_h264_ipi_handler(int id, void *data, uint32_t len)
-{
- struct vdec_msg rsv_msg;
-
- if (!len)
- return;
-
- rsv_msg.type = VDEC_H264;
- memcpy(rsv_msg.msg, data, MIN(len, sizeof(rsv_msg.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_vdec_queue, &rsv_msg))
- CPRINTS("Could not send vdec %d to the queue.", rsv_msg.type);
-}
-DECLARE_IPI(IPI_VDEC_H264, vdec_h264_ipi_handler, 0);
-
-/* This function renames from vdec_service_entry. */
-void vdec_service_task(void *u)
-{
- struct vdec_msg rsv_msg;
- size_t size;
-
- vdec_h264_service_init();
- mtk_vdec_msg_handle[VDEC_H264] = vdec_h264_msg_handler;
-
- 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_vdec_queue, &rsv_msg);
- ipi_enable_irq(SCP_IRQ_IPC0);
-
- if (!size)
- task_wait_event(-1);
- else if (mtk_vdec_msg_handle[rsv_msg.type])
- vdec_h264_msg_handler(rsv_msg.msg);
- else
- CPRINTS("vdec handler %d not exists.", rsv_msg.type);
- }
-}
diff --git a/board/kukui_scp/vdec.h b/board/kukui_scp/vdec.h
deleted file mode 100644
index 9cfb877e12..0000000000
--- a/board/kukui_scp/vdec.h
+++ /dev/null
@@ -1,33 +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.
- */
-
-#ifndef __CROS_EC_SCP_VDEC_H
-#define __CROS_EC_SCP_VDEC_H
-
-#include "compile_time_macros.h"
-#include "queue.h"
-#include "registers.h"
-
-enum vdec_type {
- VDEC_H264,
- VDEC_VP8,
- VDEC_VP9,
- VDEC_MAX,
-};
-
-typedef void (*vdec_msg_handler)(void *msg);
-
-struct vdec_msg {
- enum vdec_type type;
- unsigned char msg[48];
-};
-
-BUILD_ASSERT(member_size(struct vdec_msg, msg) <= CONFIG_IPC_SHARED_OBJ_BUF_SIZE);
-
-/* Functions provided by private overlay. */
-void vdec_h264_service_init(void);
-void vdec_h264_msg_handler(void *data);
-
-#endif /* __CROS_EC_SCP_VDEC_H */
diff --git a/board/kukui_scp/venc.c b/board/kukui_scp/venc.c
deleted file mode 100644
index c7e19d120c..0000000000
--- a/board/kukui_scp/venc.c
+++ /dev/null
@@ -1,85 +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 "hooks.h"
-#include "ipi_chip.h"
-#include "queue.h"
-#include "queue_policies.h"
-#include "registers.h"
-#include "task.h"
-#include "util.h"
-#include "venc.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_venc_consumer;
-static void event_venc_written(struct consumer const *consumer, size_t count);
-
-static struct queue const event_venc_queue = QUEUE_DIRECT(8,
- struct venc_msg, null_producer, event_venc_consumer);
-static struct consumer const event_venc_consumer = {
- .queue = &event_venc_queue,
- .ops = &((struct consumer_ops const) {
- .written = event_venc_written,
- }),
-};
-
-static venc_msg_handler mtk_venc_msg_handle[VENC_MAX];
-
-/* Stub functions only provided by private overlays. */
-#ifndef HAVE_PRIVATE_MT8183
-void venc_h264_msg_handler(void *data) {}
-#endif
-
-static void event_venc_written(struct consumer const *consumer, size_t count)
-{
- task_wake(TASK_ID_VENC_SERVICE);
-}
-
-static void venc_h264_ipi_handler(int id, void *data, uint32_t len)
-{
- struct venc_msg rsv_msg;
-
- if (!len)
- return;
- rsv_msg.type = VENC_H264;
- memcpy(rsv_msg.msg, data, MIN(len, sizeof(rsv_msg.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_venc_queue, &rsv_msg))
- CPRINTS("Could not send venc %d to the queue.", rsv_msg.type);
-}
-DECLARE_IPI(IPI_VENC_H264, venc_h264_ipi_handler, 0);
-
-/* This function renames from venc_service_entry. */
-void venc_service_task(void *u)
-{
- struct venc_msg rsv_msg;
- size_t size;
-
- mtk_venc_msg_handle[VENC_H264] = venc_h264_msg_handler;
- 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_venc_queue, &rsv_msg);
- ipi_enable_irq(SCP_IRQ_IPC0);
-
- if (!size)
- task_wait_event(-1);
- else if (mtk_venc_msg_handle[rsv_msg.type])
- venc_h264_msg_handler(rsv_msg.msg);
- else
- CPRINTS("venc handler %d not exists.", rsv_msg.type);
- }
-}
diff --git a/board/kukui_scp/venc.h b/board/kukui_scp/venc.h
deleted file mode 100644
index 7046633046..0000000000
--- a/board/kukui_scp/venc.h
+++ /dev/null
@@ -1,30 +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.
- */
-
-#ifndef __CROS_EC_SCP_VENC_H
-#define __CROS_EC_SCP_VENC_H
-
-#include "compile_time_macros.h"
-#include "queue.h"
-#include "registers.h"
-
-enum venc_type {
- VENC_H264,
- VENC_MAX,
-};
-
-typedef void (*venc_msg_handler)(void *msg);
-
-struct venc_msg {
- enum venc_type type;
- unsigned char msg[288];
-};
-
-BUILD_ASSERT(member_size(struct venc_msg, msg) <= CONFIG_IPC_SHARED_OBJ_BUF_SIZE);
-
-/* Functions provided by private overlay. */
-void venc_h264_msg_handler(void *data);
-
-#endif /* __CROS_EC_SCP_VENC_H */