summaryrefslogtreecommitdiff
path: root/board/kukui_scp
diff options
context:
space:
mode:
Diffstat (limited to 'board/kukui_scp')
-rw-r--r--board/kukui_scp/board.c2
-rw-r--r--board/kukui_scp/board.h56
-rw-r--r--board/kukui_scp/build.mk2
-rw-r--r--board/kukui_scp/ec.tasklist2
-rw-r--r--board/kukui_scp/fd.c13
-rw-r--r--board/kukui_scp/fd.h2
-rw-r--r--board/kukui_scp/gpio.inc2
-rw-r--r--board/kukui_scp/isp_p1_srv.c12
-rw-r--r--board/kukui_scp/isp_p1_srv.h5
-rw-r--r--board/kukui_scp/isp_p2_srv.c12
-rw-r--r--board/kukui_scp/isp_p2_srv.h5
-rw-r--r--board/kukui_scp/mdp_ipi_message.c16
-rw-r--r--board/kukui_scp/mdp_ipi_message.h7
-rwxr-xr-xboard/kukui_scp/update_scp2
-rw-r--r--board/kukui_scp/vdec.c16
-rw-r--r--board/kukui_scp/vdec.h5
-rw-r--r--board/kukui_scp/venc.c12
-rw-r--r--board/kukui_scp/venc.h5
18 files changed, 111 insertions, 65 deletions
diff --git a/board/kukui_scp/board.c b/board/kukui_scp/board.c
index d86e7e5fc6..7eab3c59a6 100644
--- a/board/kukui_scp/board.c
+++ b/board/kukui_scp/board.c
@@ -1,4 +1,4 @@
-/* Copyright 2018 The Chromium OS Authors. All rights reserved.
+/* Copyright 2018 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
diff --git a/board/kukui_scp/board.h b/board/kukui_scp/board.h
index 0c42c0cf2a..64104060ab 100644
--- a/board/kukui_scp/board.h
+++ b/board/kukui_scp/board.h
@@ -1,4 +1,4 @@
-/* Copyright 2018 The Chromium OS Authors. All rights reserved.
+/* Copyright 2018 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -16,8 +16,8 @@
#define CONFIG_FLASH_SIZE_BYTES 0x58000 /* Image file size: 256KB */
#endif
-#undef CONFIG_LID_SWITCH
-#undef CONFIG_FW_INCLUDE_RO
+#undef CONFIG_LID_SWITCH
+#undef CONFIG_FW_INCLUDE_RO
#define CONFIG_MKBP_EVENT
/* Sent MKBP event via IPI. */
#define CONFIG_MKBP_USE_CUSTOM
@@ -27,10 +27,12 @@
#define CONFIG_HOSTCMD_ALIGNED
/*
+ * mt8183:
+ *
* RW only, no flash
* +-------------------- 0x0
* | ROM vectortable, .text, .rodata, .data LMA
- * +-------------------- 0x10000
+ * +-------------------- 0x58000
* | RAM .bss, .data
* +-------------------- 0x7BDB0
* | IPI shared buffer with AP (288 + 8) * 2
@@ -40,11 +42,23 @@
* | 8KB D-CACHE
* +-------------------- 0x80000
*/
-#ifdef CHIP_VARIANT_MT8186
-#define ICACHE_BASE 0x3E000
-#else
-#define ICACHE_BASE 0x7C000
-#endif
+
+/*
+ * mt8186:
+ *
+ * RW only, no flash
+ * +-------------------- 0x0
+ * | ROM vectortable, .text, .rodata, .data LMA
+ * +-------------------- 0x2C000
+ * | RAM .bss, .data
+ * +-------------------- 0x3BDB0
+ * | IPI shared buffer with AP (288 + 8) * 2 => 0x250
+ * +-------------------- 0x3C000
+ * | 8KB I-CACHE
+ * +-------------------- 0x3E000
+ * | 8KB D-CACHE
+ * +-------------------- 0x40000
+ */
#define CONFIG_ROM_BASE 0x0
@@ -54,6 +68,12 @@
#define CONFIG_RAM_BASE 0x58000
#endif
+#ifdef CHIP_VARIANT_MT8186
+#define ICACHE_BASE 0x3C000
+#else
+#define ICACHE_BASE 0x7C000
+#endif
+
#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
@@ -64,12 +84,19 @@
#define CONFIG_DRAM_BASE 0x10000000
/* Shared memory address in AP physical address space. */
#define CONFIG_DRAM_BASE_LOAD 0x50000000
+
+#ifdef CHIP_VARIANT_MT8186
+#define CONFIG_DRAM_SIZE 0x010a0000 /* 16 MB */
+#define CACHE_TRANS_AP_SIZE 0x010a0000
+#else
#define CONFIG_DRAM_SIZE 0x01400000 /* 20 MB */
+#define CACHE_TRANS_AP_SIZE 0x00400000
+#endif
/* IPI configs */
#define CONFIG_IPC_SHARED_OBJ_BUF_SIZE 288
-#define CONFIG_IPC_SHARED_OBJ_ADDR \
- (ICACHE_BASE - \
+#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
@@ -95,11 +122,10 @@
#define IPI_NS_SERVICE 0xFF
-
#undef CONFIG_UART_TX_BUF_SIZE
#define CONFIG_UART_TX_BUF_SIZE 8192
-#undef CONFIG_UART_CONSOLE
+#undef CONFIG_UART_CONSOLE
/*
* CONFIG_UART_CONSOLE
* 0 - SCP UART0
@@ -112,8 +138,8 @@
#define CONFIG_UART_CONSOLE 0
#endif
/* We let AP setup the correct pinmux. */
-#undef UART0_PINMUX_11_12
-#undef UART0_PINMUX_110_112
+#undef UART0_PINMUX_11_12
+#undef UART0_PINMUX_110_112
/* Track AP power state */
#define CONFIG_POWER_TRACK_HOST_SLEEP_STATE
diff --git a/board/kukui_scp/build.mk b/board/kukui_scp/build.mk
index 0fdaa1c820..f04d506057 100644
--- a/board/kukui_scp/build.mk
+++ b/board/kukui_scp/build.mk
@@ -1,5 +1,5 @@
# -*- makefile -*-
-# Copyright 2018 The Chromium OS Authors. All rights reserved.
+# Copyright 2018 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
diff --git a/board/kukui_scp/ec.tasklist b/board/kukui_scp/ec.tasklist
index 935d409b00..82bb6db382 100644
--- a/board/kukui_scp/ec.tasklist
+++ b/board/kukui_scp/ec.tasklist
@@ -1,4 +1,4 @@
-/* Copyright 2018 The Chromium OS Authors. All rights reserved.
+/* Copyright 2018 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
diff --git a/board/kukui_scp/fd.c b/board/kukui_scp/fd.c
index 237f15ca94..be0bdeab57 100644
--- a/board/kukui_scp/fd.c
+++ b/board/kukui_scp/fd.c
@@ -1,4 +1,4 @@
-/* Copyright 2018 The Chromium OS Authors. All rights reserved.
+/* Copyright 2018 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -20,12 +20,11 @@
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 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) {
+ .ops = &((struct consumer_ops const){
.written = event_fd_written,
}),
};
@@ -33,7 +32,9 @@ static struct consumer const event_fd_consumer = {
/* 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) {}
+void fd_ipi_msg_handler(void *data)
+{
+}
#endif
static void event_fd_written(struct consumer const *consumer, size_t count)
diff --git a/board/kukui_scp/fd.h b/board/kukui_scp/fd.h
index 3f70387400..cea5817942 100644
--- a/board/kukui_scp/fd.h
+++ b/board/kukui_scp/fd.h
@@ -1,4 +1,4 @@
-/* Copyright 2018 The Chromium OS Authors. All rights reserved.
+/* Copyright 2018 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
diff --git a/board/kukui_scp/gpio.inc b/board/kukui_scp/gpio.inc
index b186904aad..6cc2e0495e 100644
--- a/board/kukui_scp/gpio.inc
+++ b/board/kukui_scp/gpio.inc
@@ -1,6 +1,6 @@
/* -*- mode:c -*-
*
- * Copyright 2018 The Chromium OS Authors. All rights reserved.
+ * Copyright 2018 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
diff --git a/board/kukui_scp/isp_p1_srv.c b/board/kukui_scp/isp_p1_srv.c
index 5c2ae7c2e9..40dd37ff90 100644
--- a/board/kukui_scp/isp_p1_srv.c
+++ b/board/kukui_scp/isp_p1_srv.c
@@ -1,4 +1,4 @@
-/* Copyright 2018 The Chromium OS Authors. All rights reserved.
+/* Copyright 2018 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -20,19 +20,21 @@
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 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) {
+ .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) {}
+void isp_msg_handler(void *data)
+{
+}
#endif
static void event_isp_written(struct consumer const *consumer, size_t count)
diff --git a/board/kukui_scp/isp_p1_srv.h b/board/kukui_scp/isp_p1_srv.h
index ba6fa7d110..e0abe9e4c8 100644
--- a/board/kukui_scp/isp_p1_srv.h
+++ b/board/kukui_scp/isp_p1_srv.h
@@ -1,4 +1,4 @@
-/* Copyright 2018 The Chromium OS Authors. All rights reserved.
+/* Copyright 2018 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -13,7 +13,8 @@ struct isp_msg {
unsigned char msg[140];
};
-BUILD_ASSERT(member_size(struct isp_msg, msg) <= CONFIG_IPC_SHARED_OBJ_BUF_SIZE);
+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);
diff --git a/board/kukui_scp/isp_p2_srv.c b/board/kukui_scp/isp_p2_srv.c
index dba330c6a8..f38d4401ff 100644
--- a/board/kukui_scp/isp_p2_srv.c
+++ b/board/kukui_scp/isp_p2_srv.c
@@ -1,4 +1,4 @@
-/* Copyright 2018 The Chromium OS Authors. All rights reserved.
+/* Copyright 2018 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -19,19 +19,21 @@
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 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) {
+ .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) {}
+void dip_msg_handler(void *data)
+{
+}
#endif
static void event_dip_written(struct consumer const *consumer, size_t count)
diff --git a/board/kukui_scp/isp_p2_srv.h b/board/kukui_scp/isp_p2_srv.h
index 70fb0673de..3c1ba50f1c 100644
--- a/board/kukui_scp/isp_p2_srv.h
+++ b/board/kukui_scp/isp_p2_srv.h
@@ -1,4 +1,4 @@
-/* Copyright 2018 The Chromium OS Authors. All rights reserved.
+/* Copyright 2018 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -13,7 +13,8 @@ struct dip_msg_service {
unsigned char msg[288];
};
-BUILD_ASSERT(member_size(struct dip_msg_service, msg) <= CONFIG_IPC_SHARED_OBJ_BUF_SIZE);
+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);
diff --git a/board/kukui_scp/mdp_ipi_message.c b/board/kukui_scp/mdp_ipi_message.c
index eca40b741b..f0bf7f2f92 100644
--- a/board/kukui_scp/mdp_ipi_message.c
+++ b/board/kukui_scp/mdp_ipi_message.c
@@ -1,4 +1,4 @@
-/* Copyright 2018 The Chromium OS Authors. All rights reserved.
+/* Copyright 2018 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -18,19 +18,23 @@
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 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) {
+ .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) {}
+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)
diff --git a/board/kukui_scp/mdp_ipi_message.h b/board/kukui_scp/mdp_ipi_message.h
index bcedb58504..0e46b947b2 100644
--- a/board/kukui_scp/mdp_ipi_message.h
+++ b/board/kukui_scp/mdp_ipi_message.h
@@ -1,4 +1,4 @@
-/* Copyright 2018 The Chromium OS Authors. All rights reserved.
+/* Copyright 2018 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -11,9 +11,10 @@ struct mdp_msg_service {
unsigned char msg[20];
};
-BUILD_ASSERT(member_size(struct mdp_msg_service, msg) <= CONFIG_IPC_SHARED_OBJ_BUF_SIZE);
+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
+#endif // _MDP_IPI_MESSAGE_H
diff --git a/board/kukui_scp/update_scp b/board/kukui_scp/update_scp
index 448a8f74db..67aaacdcdc 100755
--- a/board/kukui_scp/update_scp
+++ b/board/kukui_scp/update_scp
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2022 The Chromium OS Authors. All rights reserved.
+# Copyright 2022 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
diff --git a/board/kukui_scp/vdec.c b/board/kukui_scp/vdec.c
index eb4f1f8fa1..317d83d0d5 100644
--- a/board/kukui_scp/vdec.c
+++ b/board/kukui_scp/vdec.c
@@ -1,4 +1,4 @@
-/* Copyright 2018 The Chromium OS Authors. All rights reserved.
+/* Copyright 2018 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -20,19 +20,23 @@
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 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) {
+ .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) {}
+void vdec_h264_service_init(void)
+{
+}
+void vdec_h264_msg_handler(void *data)
+{
+}
#endif
static vdec_msg_handler mtk_vdec_msg_handle[VDEC_MAX];
diff --git a/board/kukui_scp/vdec.h b/board/kukui_scp/vdec.h
index 9cfb877e12..9284c28a40 100644
--- a/board/kukui_scp/vdec.h
+++ b/board/kukui_scp/vdec.h
@@ -1,4 +1,4 @@
-/* Copyright 2018 The Chromium OS Authors. All rights reserved.
+/* Copyright 2018 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -24,7 +24,8 @@ struct vdec_msg {
unsigned char msg[48];
};
-BUILD_ASSERT(member_size(struct vdec_msg, msg) <= CONFIG_IPC_SHARED_OBJ_BUF_SIZE);
+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);
diff --git a/board/kukui_scp/venc.c b/board/kukui_scp/venc.c
index c7e19d120c..1f07a6eea0 100644
--- a/board/kukui_scp/venc.c
+++ b/board/kukui_scp/venc.c
@@ -1,4 +1,4 @@
-/* Copyright 2018 The Chromium OS Authors. All rights reserved.
+/* Copyright 2018 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -20,11 +20,11 @@
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 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) {
+ .ops = &((struct consumer_ops const){
.written = event_venc_written,
}),
};
@@ -33,7 +33,9 @@ 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) {}
+void venc_h264_msg_handler(void *data)
+{
+}
#endif
static void event_venc_written(struct consumer const *consumer, size_t count)
diff --git a/board/kukui_scp/venc.h b/board/kukui_scp/venc.h
index 7046633046..1fc8421795 100644
--- a/board/kukui_scp/venc.h
+++ b/board/kukui_scp/venc.h
@@ -1,4 +1,4 @@
-/* Copyright 2018 The Chromium OS Authors. All rights reserved.
+/* Copyright 2018 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -22,7 +22,8 @@ struct venc_msg {
unsigned char msg[288];
};
-BUILD_ASSERT(member_size(struct venc_msg, msg) <= CONFIG_IPC_SHARED_OBJ_BUF_SIZE);
+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);