mirror of
https://github.com/ivoszbg/uniLoader.git
synced 2025-08-06 00:20:07 +00:00
Jokes aside, commit adds support for colored indexes based on the loglevel, introduces a better simplefb probing that does not depend on hardcoded config options. Implementing support for fdt should be easier now.
52 lines
1.0 KiB
C
Executable File
52 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
|
|
|
|
int c1s_init(void)
|
|
{
|
|
/* Allow framebuffer to be written to */
|
|
*(int*) (DECON_F_BASE + HW_SW_TRIG_CONTROL) = 0x1281;
|
|
return 0;
|
|
}
|
|
|
|
int c1s_late_init(void)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
#ifdef CONFIG_SIMPLE_FB
|
|
static struct video_info c1s_fb = {
|
|
.format = FB_FORMAT_ARGB8888,
|
|
.width = CONFIG_FRAMEBUFFER_WIDTH,
|
|
.height = CONFIG_FRAMEBUFFER_HEIGHT,
|
|
.stride = CONFIG_FRAMEBUFFER_STRIDE,
|
|
.address = (void *)CONFIG_FRAMEBUFFER_BASE
|
|
};
|
|
#endif
|
|
|
|
int c1s_drv(void)
|
|
{
|
|
#ifdef CONFIG_SIMPLE_FB
|
|
REGISTER_DRIVER("simplefb", simplefb_probe, &c1s_fb);
|
|
#endif
|
|
return 0;
|
|
}
|
|
|
|
struct board_data board_ops = {
|
|
.name = "samsung-c1s",
|
|
.ops = {
|
|
.early_init = c1s_init,
|
|
.drivers_init = c1s_drv,
|
|
.late_init = c1s_late_init,
|
|
},
|
|
.quirks = 0
|
|
};
|