uniLoader/board/samsung/board-c1s.c
Igor Belwon 2d34fc0f91 [FIX] board: samsung: Fix compile issues due to missing headers
The board files for all boards except for dreamlte and j4lte
are missing drivers/framework.h and lib/simplefb.h headers.
This causes build failures on all targets except for dreamlte
and j4lte.

This commit includes said headers.

Signed-off-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
2024-10-12 19:49:36 +03:00

58 lines
1.0 KiB
C
Executable File

/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) BotchedRPR <thenxguy0@gmail.com>
* Copyright (c) 2024, Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
*/
#include <board.h>
#include <drivers/framework.h>
#include <lib/simplefb.h>
#define DECON_F_BASE 0x19050000
#define HW_SW_TRIG_CONTROL 0x70
void init_board_funcs(void *board)
{
/*
* Parsing the struct directly without restructing is
* broken as of Sep 29 2024
*/
struct {
const char *name;
int ops[BOARD_OP_EXIT];
} *board_restruct = board;
board_restruct->name = "C1S";
}
// Early initialization
int board_init(void)
{
/* Allow framebuffer to be written to */
*(int*) (DECON_F_BASE + HW_SW_TRIG_CONTROL) = 0x1281;
return 0;
}
// Late initialization
int board_late_init(void)
{
return 0;
}
int board_driver_setup(void)
{
struct {
int width;
int height;
int stride;
void *address;
} simplefb_data = {
.width = 1080,
.height = 2400,
.stride = 4,
.address = (void *)0xf1000000
};
REGISTER_DRIVER("simplefb", simplefb_probe, &simplefb_data);
return 0;
}