From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jens Gehrlein Date: Mon, 23 Mar 2009 16:01:58 +0100 Subject: [U-Boot] video: mx3fb: board specific settings? Message-ID: <49C7A466.5060605@tqs.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, currently drivers/video/mx3fb.c contains some defines, which are usually board specific: #define XRES 240 #define YRES 320 #define PANEL_TYPE IPU_PANEL_TFT #define PIXEL_CLK 185925 #define PIXEL_FMT IPU_PIX_FMT_RGB666 #define H_START_WIDTH 9 /* left_margin */ #define H_SYNC_WIDTH 1 /* hsync_len */ #define H_END_WIDTH (16 + 1) /* right_margin + hsync_len */ #define V_START_WIDTH 7 /* upper_margin */ #define V_SYNC_WIDTH 1 /* vsync_len */ #define V_END_WIDTH (9 + 1) /* lower_margin + vsync_len */ #define SIG_POL (DI_D3_DRDY_SHARP_POL | DI_D3_CLK_POL) #define IF_CONF 0 #define IF_CLK_DIV 0x175 What could be done to remove these defines? 1. #ifdefery -> seems to be the worst solution 2. a structure, filled by board code 3. any other ideas? What has to be done else? For instance, parts of lcd_enable() seem to be board specific, too (pin muxing, display brightness, ...). Thanks. Kind regards, Jens