diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ram/k3-ddrss/k3-ddrss.c | 11 | ||||
-rw-r--r-- | drivers/video/Kconfig | 12 | ||||
-rw-r--r-- | drivers/video/video-uclass.c | 23 |
3 files changed, 39 insertions, 7 deletions
diff --git a/drivers/ram/k3-ddrss/k3-ddrss.c b/drivers/ram/k3-ddrss/k3-ddrss.c index 7e445d2b73..b54557f02c 100644 --- a/drivers/ram/k3-ddrss/k3-ddrss.c +++ b/drivers/ram/k3-ddrss/k3-ddrss.c @@ -138,6 +138,7 @@ struct k3_ddrss_desc { u32 ddr_freq1; u32 ddr_freq2; u32 ddr_fhs_cnt; + u32 dram_class; struct udevice *vtt_supply; u32 instance; lpddr4_obj *driverdt; @@ -243,14 +244,11 @@ static void k3_lpddr4_freq_update(struct k3_ddrss_desc *ddrss) static void k3_lpddr4_ack_freq_upd_req(const lpddr4_privatedata *pd) { - u32 dram_class; struct k3_ddrss_desc *ddrss = (struct k3_ddrss_desc *)pd->ddr_instance; debug("--->>> LPDDR4 Initialization is in progress ... <<<---\n"); - dram_class = k3_lpddr4_read_ddr_type(pd); - - switch (dram_class) { + switch (ddrss->dram_class) { case DENALI_CTL_0_DRAM_CLASS_DDR4: break; case DENALI_CTL_0_DRAM_CLASS_LPDDR4: @@ -263,13 +261,12 @@ static void k3_lpddr4_ack_freq_upd_req(const lpddr4_privatedata *pd) static int k3_ddrss_init_freq(struct k3_ddrss_desc *ddrss) { - u32 dram_class; int ret; lpddr4_privatedata *pd = &ddrss->pd; - dram_class = k3_lpddr4_read_ddr_type(pd); + ddrss->dram_class = k3_lpddr4_read_ddr_type(pd); - switch (dram_class) { + switch (ddrss->dram_class) { case DENALI_CTL_0_DRAM_CLASS_DDR4: /* Set to ddr_freq1 from DT for DDR4 */ ret = clk_set_rate(&ddrss->ddr_clk, ddrss->ddr_freq1); diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index b8147f280c..b41dc60cec 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -871,6 +871,12 @@ config IHS_VIDEO_OUT out On-screen Display (OSD) used on gdsys FPGAs to control dynamic textual overlays of the display outputs. +config VIDEO_REMOVE + bool "Remove video driver" + help + Use this option to specify if user wants to call remove method of + video driver in u-boot proper stage. + config SPLASH_SCREEN bool "Show a splash-screen image" help @@ -1094,6 +1100,12 @@ config SPL_SYS_WHITE_ON_BLACK This can be better in low-light situations or to reduce eye strain in some cases. +config SPL_VIDEO_REMOVE + bool "Remove video driver after SPL stage" + help + if this option is enabled video driver will be removed at the end of + SPL stage, beforeloading the next stage. + if SPL_SPLASH_SCREEN config SPL_SPLASH_SCREEN_ALIGN diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 95e874b770..949595f1bc 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -6,12 +6,14 @@ #define LOG_CATEGORY UCLASS_VIDEO #include <common.h> +#include <bloblist.h> #include <console.h> #include <cpu_func.h> #include <dm.h> #include <log.h> #include <malloc.h> #include <mapmem.h> +#include <spl.h> #include <stdio_dev.h> #include <video.h> #include <video_console.h> @@ -139,6 +141,16 @@ int video_reserve(ulong *addrp) debug("Video frame buffers from %lx to %lx\n", gd->video_bottom, gd->video_top); + if (spl_phase() == PHASE_SPL && CONFIG_IS_ENABLED(BLOBLIST)) { + struct video_handoff *ho; + + ho = bloblist_add(BLOBLISTT_U_BOOT_VIDEO, sizeof(*ho), 0); + if (!ho) + return log_msg_ret("blf", -ENOENT); + ho->fb = *addrp; + ho->size = size; + } + return 0; } @@ -194,6 +206,17 @@ int video_fill_part(struct udevice *dev, int xstart, int ystart, int xend, return 0; } +int video_reserve_from_bloblist(struct video_handoff *ho) +{ + gd->video_bottom = ho->fb; + gd->fb_base = ho->fb; + gd->video_top = ho->fb + ho->size; + debug("Reserving %luk for video using blob at: %08x\n", + ((unsigned long)ho->size) >> 10, (u32)ho->fb); + + return 0; +} + int video_fill(struct udevice *dev, u32 colour) { struct video_priv *priv = dev_get_uclass_priv(dev); |