]> git.kernelconcepts.de Git - karo-tx-redboot.git/blobdiff - packages/hal/arm/mx25/karo/v1_0/src/tx25_splash.c
RedBoot Release TX53-v3 2012-02-08
[karo-tx-redboot.git] / packages / hal / arm / mx25 / karo / v1_0 / src / tx25_splash.c
index 34d372fbb238c9535c6b8bf29d65862f93d0eb44..c320ad2c5f44342204d1299cc4c22451079c555e 100644 (file)
@@ -54,7 +54,7 @@
 #endif
 #include CYGBLD_HAL_PLATFORM_H
 #include <cyg/hal/plf_mmap.h>
-#include <cyg/hal/karo_tx25.h>         // Platform specific hardware definitions
+#include CYGBLD_HAL_PLF_DEFS_H         // Platform specific hardware definitions
 
 #define LCDC_BASE                      0x53fbc000
 
@@ -168,7 +168,8 @@ typedef struct lcd_display_metrics {
        unsigned long left;
        unsigned long right;
        /* control signal polarities */
-       bool pixclk_pol;
+       bool pix_pol;
+       bool clk_pol;   
        bool hsync_pol;
        bool vsync_pol;
 } LCDDIM;
@@ -284,7 +285,8 @@ static bool bootsplash_setup(LCDDIM *ldim, unsigned long img_len)
 
        ok = get_var("lcd_buffer_addr", &ldim->frame_buffer, CONFIG_INT);
        ok &= get_var("lcd_clk_period", &ldim->pixclk, CONFIG_INT);
-       ok &= get_var("lcd_clk_polarity", &ldim->pixclk_pol, CONFIG_BOOL);
+       ok &= get_var("lcd_clk_polarity", &ldim->clk_pol, CONFIG_BOOL);
+       ok &= get_var("lcd_pix_polarity", &ldim->pix_pol, CONFIG_BOOL);
 
        ok &= get_var("lcd_panel_width", &ldim->width, CONFIG_INT);
        ok &= get_var("lcd_panel_height", &ldim->height, CONFIG_INT);
@@ -395,7 +397,8 @@ static bool bootsplash_display(LCDDIM *ldim)
        pcr |= PCR_TFT | PCR_COLOR | PCR_SCLK_SEL |
                (ldim->vsync_pol * PCR_FLMPOL) |
                (ldim->hsync_pol * PCR_LPPOL) |
-               (ldim->pixclk_pol * PCR_PIXPOL);
+               (ldim->pix_pol * PCR_PIXPOL) |
+               (ldim->clk_pol * PCR_CLKPOL);
 
        switch (ldim->bpp) {
        case 18:
@@ -678,6 +681,13 @@ RedBoot_config_option("Pixel clock period (in ps)",
                                        33333
        );
 
+RedBoot_config_option("Pixel polarity active low",
+                                       lcd_pix_polarity,
+                                       "bootsplash_enable", true,
+                                       CONFIG_BOOL,
+                                       false
+       );
+
 RedBoot_config_option("Pixel clock polarity active low",
                                        lcd_clk_polarity,
                                        "bootsplash_enable", true,