[U-Boot] persistent logo on LCD on imx6ull

Michael Nazzareno Trimarchi michael at amarulasolutions.com
Wed Jul 4 17:03:43 UTC 2018


Hi


On Wed, Jul 4, 2018 at 6:45 PM, Otavio Salvador
<otavio.salvador at ossystems.com.br> wrote:
> On Tue, Jul 3, 2018 at 6:20 AM, Michael Nazzareno Trimarchi
> <michael at amarulasolutions.com> wrote:
>> Ok I have fixed it :)
>
> Mind to share how?

commit 9c066153a6876b1ae57117d99ad228a07873eb75
Author: Michael Trimarchi <michael at amarulasolutions.com>
Date:   Wed Jul 4 15:50:41 2018 +0200

    spl: Make the spl_nand_load_image static

    Change-Id: I1c2f71e75fc052c54fc94b13d0942cb9e75ff1c6
    Signed-off-by: Michael Trimarchi <michael at amarulasolutions.com>

diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c
index b96fce2..527cfc0 100644
--- a/common/spl/spl_nand.c
+++ b/common/spl/spl_nand.c
@@ -12,7 +12,7 @@
 #include <fdt.h>

 #if defined(CONFIG_SPL_NAND_RAW_ONLY)
-int spl_nand_load_image(struct spl_image_info *spl_image,
+static int spl_nand_load_image(struct spl_image_info *spl_image,
                        struct spl_boot_device *bootdev)
 {
        nand_init();
michael at panicking ~/work/amarula/w_and_h/dist/u-boot $ git show HEAD^^^
commit 110e91ee5a837684d99778d72a3c9aec5953baf6
Author: Michael Trimarchi <michael at amarulasolutions.com>
Date:   Wed Jul 4 13:03:23 2018 +0200

    video: mxsfb: Allocate a memory align to the page

    We want to allocate memory align at page size because we then
    need to reserve it to linux and simple frame buffer. The
    lcd should not be powerdown if simple frame buffer configuration
    is active

    Change-Id: I1d139364d91686b12cd607821dcc1b84b0dc0b69
    Signed-off-by: Michael Trimarchi <michael at amarulasolutions.com>

diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 4011066..0aaf9f0 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -2107,6 +2107,12 @@ static int cfg_video_init(void)
        video_console_address = video_fb_address;
 #endif

+       env_set_hex("video_address", (unsigned long)VIDEO_FB_ADRS);
+       env_set_hex("video_memory_size", (unsigned long)
roundup(VIDEO_SIZE, PAGE_SIZE));
+       env_set_hex("video_stride", (unsigned long) VIDEO_LINE_LEN);
+       env_set_hex("video_width", (unsigned long) VIDEO_COLS);
+       env_set_hex("video_height", (unsigned long) VIDEO_ROWS);
+
        /* Initialize the console */
        console_col = 0;
        console_row = 0;
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 4e3e3d7..254f230 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <malloc.h>
 #include <video_fb.h>
+#include <lcd.h>

 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
@@ -145,6 +146,7 @@ static void mxs_lcd_init(GraphicDevice *panel,
        writel(LCDIF_CTRL_RUN, &regs->hw_lcdif_ctrl_set);
 }

+#ifndef CONFIG_VIDEO_DT_SIMPLEFB
 void lcdif_power_down(void)
 {
        struct mxs_lcdif_regs *regs = (struct mxs_lcdif_regs *)MXS_LCDIF_BASE;
@@ -164,6 +166,9 @@ void lcdif_power_down(void)
        }
        mxs_reset_block((struct mxs_register_32 *)&regs->hw_lcdif_ctrl_reg);
 }
+#else
+void lcdif_power_down(void) {};
+#endif

 void *video_hw_init(void)
 {
@@ -214,8 +219,8 @@ void *video_hw_init(void)
        panel.memSize = mode.xres * mode.yres * panel.gdfBytesPP;

        /* Allocate framebuffer */
-       fb = memalign(ARCH_DMA_MINALIGN,
-                     roundup(panel.memSize, ARCH_DMA_MINALIGN));
+       fb = memalign(PAGE_SIZE,
+                     roundup(panel.memSize, PAGE_SIZE));
        if (!fb) {
                printf("MXSFB: Error allocating framebuffer!\n");
                return NULL;
(END)
 {
        struct mxs_lcdif_regs *regs = (struct mxs_lcdif_regs *)MXS_LCDIF_BASE;
@@ -164,6 +166,9 @@ void lcdif_power_down(void)
        }
        mxs_reset_block((struct mxs_register_32 *)&regs->hw_lcdif_ctrl_reg);
 }
+#else
+void lcdif_power_down(void) {};
+#endif

 void *video_hw_init(void)
 {
@@ -214,8 +219,8 @@ void *video_hw_init(void)
        panel.memSize = mode.xres * mode.yres * panel.gdfBytesPP;

        /* Allocate framebuffer */
-       fb = memalign(ARCH_DMA_MINALIGN,
-                     roundup(panel.memSize, ARCH_DMA_MINALIGN));
+       fb = memalign(PAGE_SIZE,
+                     roundup(panel.memSize, PAGE_SIZE));
        if (!fb) {
                printf("MXSFB: Error allocating framebuffer!\n");
                return NULL;

The I need to trick the dts ;)

This should be more then enough ;).

Michael

>
> --
> Otavio Salvador                             O.S. Systems
> http://www.ossystems.com.br        http://code.ossystems.com.br
> Mobile: +55 (53) 9 9981-7854          Mobile: +1 (347) 903-9750



-- 
| Michael Nazzareno Trimarchi                     Amarula Solutions BV |
| COO  -  Founder                                      Cruquiuskade 47 |
| +31(0)851119172                                 Amsterdam 1018 AM NL |
|                  [`as] http://www.amarulasolutions.com               |


More information about the U-Boot mailing list