From 9e70d1378c7f41d1aa9ffc5429d810330c194949 Mon Sep 17 00:00:00 2001 From: Anatolij Gustschin Date: Fri, 24 Sep 2010 01:06:37 +0200 Subject: fsl_diu_fb: further refactoring of FSL DIU code Move common code to the fsl_diu_fb.c file and remove obsolete code from board files (aria, mpc8610hpcd and pdm360ng). Move fsl_diu_fb.h file to the include directory. Signed-off-by: Anatolij Gustschin --- include/fsl_diu_fb.h | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 include/fsl_diu_fb.h (limited to 'include') diff --git a/include/fsl_diu_fb.h b/include/fsl_diu_fb.h new file mode 100644 index 0000000000..87443e10c2 --- /dev/null +++ b/include/fsl_diu_fb.h @@ -0,0 +1,60 @@ +/* + * Copyright 2007 Freescale Semiconductor, Inc. + * York Sun + * + * FSL DIU Framebuffer driver + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +struct fb_var_screeninfo { + unsigned int xres; /* visible resolution */ + unsigned int yres; + + unsigned int bits_per_pixel; /* guess what */ + + /* Timing: All values in pixclocks, except pixclock (of course) */ + unsigned int pixclock; /* pixel clock in ps (pico seconds) */ + unsigned int left_margin; /* time from sync to picture */ + unsigned int right_margin; /* time from picture to sync */ + unsigned int upper_margin; /* time from sync to picture */ + unsigned int lower_margin; + unsigned int hsync_len; /* length of horizontal sync */ + unsigned int vsync_len; /* length of vertical sync */ + unsigned int sync; /* see FB_SYNC_* */ + unsigned int vmode; /* see FB_VMODE_* */ + unsigned int rotate; /* angle we rotate counter clockwise */ +}; + +struct fb_info { + struct fb_var_screeninfo var; /* Current var */ + unsigned long smem_start; /* Start of frame buffer mem */ + /* (physical address) */ + unsigned int smem_len; /* Length of frame buffer mem */ + unsigned int type; /* see FB_TYPE_* */ + unsigned int line_length; /* length of a line in bytes */ + + char *screen_base; + unsigned long screen_size; +}; + + +extern char *fsl_fb_open(struct fb_info **info); +int fsl_diu_init(int xres, unsigned int pixel_format, int gamma_fix); +int platform_diu_init(unsigned int *xres, unsigned int *yres); -- cgit From d5e01e49f85daf7ad0a504288ccff534f44098a0 Mon Sep 17 00:00:00 2001 From: Timur Tabi Date: Fri, 24 Sep 2010 01:25:53 +0200 Subject: p1022ds: add video support Add support for the DIU controller. If CONFIG_VIDEO is defined, then the console will appear on a DVI monitor instead of the serial port. Signed-off-by: Timur Tabi Signed-off-by: Anatolij Gustschin --- include/configs/P1022DS.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h index dcaca2b617..8e0117f6a1 100644 --- a/include/configs/P1022DS.h +++ b/include/configs/P1022DS.h @@ -177,14 +177,17 @@ #define CONFIG_SYS_HUSH_PARSER #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " -#define CONFIG_FSL_DIU_FB -#define CONFIG_SYS_DIU_ADDR (CONFIG_SYS_CCSRBAR + 0x10000) - /* Video */ -/* #define CONFIG_VIDEO */ -#ifdef CONFIG_VIDEO +#undef CONFIG_FSL_DIU_FB + +#ifdef CONFIG_FSL_DIU_FB +#define CONFIG_SYS_DIU_ADDR (CONFIG_SYS_CCSRBAR + 0x10000) +#define CONFIG_VIDEO +#define CONFIG_CMD_BMP #define CONFIG_CFB_CONSOLE #define CONFIG_VGA_AS_SINGLE_DEVICE +#define CONFIG_VIDEO_LOGO +#define CONFIG_VIDEO_BMP_LOGO #endif /* -- cgit From 55b05237b972e5bed8b9d29804bbfcbc9c5d4a55 Mon Sep 17 00:00:00 2001 From: Timur Tabi Date: Thu, 16 Sep 2010 16:35:44 -0500 Subject: p1022ds: use weak CFI flash accessors when DIU is enabled On the Freescale P1022, the DIU and the LBC share address pins, which means that when the DIU is active (e.g. the console is on the DVI display), NOR flash cannot be accessed. So we use the weak accessor function feature of the CFI flash code to temporarily switch the pin mux from DIU to LBC whenever we want to read or write flash. This has a significant performance penalty, but it's the only way to make it work. This change allows the 'saveenv' command to work when the video display is enabled. Erasing flash and writing to flash (with the 'cp' command) works, but reading from flash (with the 'md' and 'cp' commands) does not. Also, while flash is being written, the video display will be blank. Signed-off-by: Timur Tabi Signed-off-by: Anatolij Gustschin --- include/configs/P1022DS.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h index 8e0117f6a1..2306e7f90c 100644 --- a/include/configs/P1022DS.h +++ b/include/configs/P1022DS.h @@ -188,6 +188,12 @@ #define CONFIG_VGA_AS_SINGLE_DEVICE #define CONFIG_VIDEO_LOGO #define CONFIG_VIDEO_BMP_LOGO +#define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS +/* + * With CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS, flash I/O is really slow, so + * disable empty flash sector detection, which is I/O-intensive. + */ +#undef CONFIG_SYS_FLASH_EMPTY_INFO #endif /* -- cgit From cdfcedbf250ba2ec01b2555cffde83e9947e9fbf Mon Sep 17 00:00:00 2001 From: Alexander Stein Date: Tue, 20 Jul 2010 08:55:40 +0200 Subject: atmel_lcd: Allow contrast polarity to be either positive or negative Signed-off-by: Alexander Stein --- include/lcd.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/lcd.h b/include/lcd.h index cd9d49d3ae..0e098d925e 100644 --- a/include/lcd.h +++ b/include/lcd.h @@ -167,6 +167,7 @@ typedef struct vidinfo { u_long vl_sync; /* Horizontal / vertical sync */ u_long vl_bpix; /* Bits per pixel, 0 = 1, 1 = 2, 2 = 4, 3 = 8, 4 = 16 */ u_long vl_tft; /* 0 = passive, 1 = TFT */ + u_long vl_cont_pol_low; /* contrast polarity is low */ /* Horizontal control register. */ u_long vl_hsync_len; /* Length of horizontal sync */ -- cgit