From 6cd8dfd0d0250612c85f7abb3bbc62fdf6943dcb Mon Sep 17 00:00:00 2001 From: Ivaylo Ivanov Date: Sun, 28 Dec 2025 18:23:23 +0200 Subject: [PATCH] board: samsung-j5lte: cast mmio addresses in writel's Fix build errors for j5lte by casting mmio addresses in writel's. While at it, do some quality of life changes, like moving entry addresses out of board/Kconfig into the j5lte defconfig and setting LINUX_KRNL_HEADER_IMG. --- board/Kconfig | 1 - board/samsung/board-j5lte.c | 22 +++++++++++----------- configs/j5lte_defconfig | 6 ++++-- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/board/Kconfig b/board/Kconfig index 9c1fe41..8d32808 100644 --- a/board/Kconfig +++ b/board/Kconfig @@ -229,7 +229,6 @@ menu "Device Specific Addresses" hex "Payload Entry Address" default 0x50000000 if NOTHING_TETRIS default 0x050000000 if SAMSUNG_J4LTE - default 0x090000000 if SAMSUNG_J5LTE default 0x60000000 if VOLLA_ALGIZ default 0x50000000 if XIAOMI_BEGONIA diff --git a/board/samsung/board-j5lte.c b/board/samsung/board-j5lte.c index 3df1245..dc5fa07 100644 --- a/board/samsung/board-j5lte.c +++ b/board/samsung/board-j5lte.c @@ -8,21 +8,21 @@ #include #include -#define PIPE_SSPP_SRC_FORMAT 0x30 -#define PIPE_SSPP_SRC_UNPACK_PATTERN 0x34 -#define PIPE_BASE 0x1A15000 -#define PIPE_SSPP_SRC_YSTRIDE 0x24 +#define PIPE_BASE 0x1a15000 +#define PIPE_SSPP_SRC_FORMAT 0x30 +#define PIPE_SSPP_SRC_UNPACK_PATTERN 0x34 +#define PIPE_SSPP_SRC_YSTRIDE 0x24 -#define MDP_CTL_0_BASE 0x1A02000 -#define MDP_CTL_FLUSH 0x18 +#define MDP_CTL_0_BASE 0x1a02000 +#define MDP_CTL_FLUSH 0x18 int j5lte_init(void) { /* TODO: Doesn't really work :P */ - writel(0x000236FF, PIPE_BASE + PIPE_SSPP_SRC_FORMAT); - writel(0x03020001, PIPE_BASE + PIPE_SSPP_SRC_UNPACK_PATTERN); - writel((720 * 4), MDP_CTL_0_BASE + MDP_CTL_FLUSH); - writel((1 << (0)), PIPE_BASE + PIPE_SSPP_SRC_YSTRIDE); + writel(0x000236FF, (void *) (PIPE_BASE + PIPE_SSPP_SRC_FORMAT)); + writel(0x03020001, (void *) (PIPE_BASE + PIPE_SSPP_SRC_UNPACK_PATTERN)); + writel((720 * 4), (void *) (MDP_CTL_0_BASE + MDP_CTL_FLUSH)); + writel((1 << (0)), (void *) (PIPE_BASE + PIPE_SSPP_SRC_YSTRIDE)); return 0; } @@ -33,7 +33,7 @@ static struct video_info j5lte_fb = { .width = 720, .height = 1280, .stride = 3, - .address = (void *)0x08e000000 + .address = (void *)0x8e000000 }; #endif diff --git a/configs/j5lte_defconfig b/configs/j5lte_defconfig index 4e05c30..7ae96a2 100644 --- a/configs/j5lte_defconfig +++ b/configs/j5lte_defconfig @@ -1,4 +1,6 @@ -CONFIG_CROSS_COMPILE="arm-none-eabi-" CONFIG_TEXT_BASE=0x80008000 +CONFIG_LINUX_KRNL_HEADER_IMG=y +CONFIG_PAYLOAD_ENTRY=0x90000000 +CONFIG_RAMDISK_ENTRY=0x84000000 CONFIG_SAMSUNG_J5LTE=y -CONFIG_QC32_8916=y +CONFIG_QC32_8916=y \ No newline at end of file