diff options
author | Timur Tabi <timur@freescale.com> | 2011-04-11 23:18:22 +0400 |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2011-04-28 23:31:16 +0400 |
commit | ba8e76bd49a0575a2442025507882b499856af2b (patch) | |
tree | 47b31be667a80b5149065e8d7d1f2d9040a4c628 /include | |
parent | a5dbdc81ea70daa04e49eb0004a0441131a029c6 (diff) | |
download | u-boot-ba8e76bd49a0575a2442025507882b499856af2b.tar.xz |
powerpc: use 'video-mode' environment variable to configure DIU
Use the 'video-mode' environment variable (for Freescale chips that have a
DIU display controller) to designate the full video configuration. Previously,
the DIU driver used the 'monitor' variable, and it was used only to determine
the output video port.
The old definition of the "monitor" environment variable only determines
which video port to use for output. This variable was set to a number (0,
1, or sometimes 2) to specify a DVI, LVDS, or Dual-LVDS port. The
resolution was hard-coded into board-specific code. The Linux command-line
arguments needed to be hard-coded to the proper video definition string.
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/configs/MPC8610HPCD.h | 10 | ||||
-rw-r--r-- | include/configs/P1022DS.h | 8 | ||||
-rw-r--r-- | include/configs/pdm360ng.h | 2 | ||||
-rw-r--r-- | include/fsl_diu_fb.h | 43 |
4 files changed, 15 insertions, 48 deletions
diff --git a/include/configs/MPC8610HPCD.h b/include/configs/MPC8610HPCD.h index efe03132f7..31dbc3b7d9 100644 --- a/include/configs/MPC8610HPCD.h +++ b/include/configs/MPC8610HPCD.h @@ -1,5 +1,5 @@ /* - * Copyright 2007, 2010 Freescale Semiconductor, Inc. + * Copyright 2007-2011 Freescale Semiconductor, Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -23,6 +23,8 @@ /* video */ +#define CONFIG_FSL_DIU_FB + #ifdef CONFIG_FSL_DIU_FB #define CONFIG_SYS_DIU_ADDR (CONFIG_SYS_CCSRBAR + 0x2c000) #define CONFIG_VIDEO @@ -625,8 +627,6 @@ "diuregs=md e002c000 1d\0" \ "dium=mw e002c01c\0" \ "diuerr=md e002c014 1\0" \ - "othbootargs=diufb=15M video=fslfb:1280x1024-32@60,monitor=0 debug\0" \ - "monitor=0-DVI\0" \ "pmregs=md e00e1000 2b\0" \ "lawregs=md e0000c08 4b\0" \ "lbcregs=md e0005000 36\0" \ @@ -646,9 +646,7 @@ "ramdiskfile=8610hpcd/ramdisk.uboot\0" \ "fdtaddr=c00000\0" \ "fdtfile=8610hpcd/mpc8610_hpcd.dtb\0" \ - "bdev=sda3\0" \ - "othbootargs=diufb=15M video=fslfb:1280x1024-32@60,monitor=0\0"\ - "monitor=0-DVI\0" + "bdev=sda3\0" #endif #define CONFIG_NFSBOOTCOMMAND \ diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h index fb2a41ce24..e9622e7c06 100644 --- a/include/configs/P1022DS.h +++ b/include/configs/P1022DS.h @@ -202,6 +202,8 @@ #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " /* Video */ +#define CONFIG_FSL_DIU_FB + #ifdef CONFIG_FSL_DIU_FB #define CONFIG_SYS_DIU_ADDR (CONFIG_SYS_CCSRBAR + 0x10000) #define CONFIG_VIDEO @@ -219,7 +221,7 @@ #undef CONFIG_SYS_FLASH_EMPTY_INFO #endif -#ifndef CONFIG_DIU +#ifndef CONFIG_FSL_DIU_FB #define CONFIG_ATI #endif @@ -507,9 +509,7 @@ "diuregs=md e002c000 1d\0" \ "dium=mw e002c01c\0" \ "diuerr=md e002c014 1\0" \ - "othbootargs=diufb=15M video=fslfb:1280x1024-32@60,monitor=0 tty0\0" \ - "hwconfig=esdhc;audclk:12\0" \ - "monitor=0-DVI\0" + "hwconfig=esdhc;audclk:12\0" #define CONFIG_HDBOOT \ "setenv bootargs root=/dev/$bdev rw " \ diff --git a/include/configs/pdm360ng.h b/include/configs/pdm360ng.h index 37a22a7c4b..831af6a7d2 100644 --- a/include/configs/pdm360ng.h +++ b/include/configs/pdm360ng.h @@ -64,8 +64,6 @@ #define CONFIG_SPLASH_SCREEN #define CONFIG_VIDEO_LOGO #define CONFIG_VIDEO_BMP_RLE8 -#define CONFIG_VIDEO_XRES 800 -#define CONFIG_VIDEO_YRES 480 #endif #define CONFIG_SYS_MPC512X_CLKIN 33333333 /* in Hz */ diff --git a/include/fsl_diu_fb.h b/include/fsl_diu_fb.h index 87443e10c2..4c89f4b8b7 100644 --- a/include/fsl_diu_fb.h +++ b/include/fsl_diu_fb.h @@ -1,6 +1,7 @@ /* - * Copyright 2007 Freescale Semiconductor, Inc. - * York Sun <yorksun@freescale.com> + * Copyright 2007, 2011 Freescale Semiconductor, Inc. + * Authors: York Sun <yorksun@freescale.com> + * Timur Tabi <timur@freescale.com> * * FSL DIU Framebuffer driver * @@ -23,38 +24,8 @@ * MA 02111-1307 USA */ -struct fb_var_screeninfo { - unsigned int xres; /* visible resolution */ - unsigned int yres; +int fsl_diu_init(int xres, u32 pixel_format, int gamma_fix); - 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); +/* Prototypes for external board-specific functions */ +int platform_diu_init(unsigned int xres, unsigned int yres, const char *port); +void diu_set_pixel_clock(unsigned int pixclock); |