From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Wed, 31 Jul 2013 01:31:48 +0200 Subject: [U-Boot] [PATCH 03/11] video: Add System-Mode configuration hook into mxsfb In-Reply-To: References: <1375220281-11132-1-git-send-email-marex@denx.de> <201307310045.38591.marex@denx.de> Message-ID: <201307310131.48380.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Otavio Salvador, > On Tue, Jul 30, 2013 at 7:45 PM, Marek Vasut wrote: > > Dear Otavio Salvador, > > > >> On Tue, Jul 30, 2013 at 6:37 PM, Marek Vasut wrote: > >> > Add hook that allow configuring SmartLCD attached the MXS LCDIF > >> > controller operating in System-Mode. This hook can be overriden > >> > by a platform-specific SmartLCD programming routine, which writes > >> > the SmartLCD specific values into it's registers. > >> > > >> > Also, this patch makes sure the SYNC signals are off for the > >> > SmartLCD case. > >> > > >> > Signed-off-by: Marek Vasut > >> > Cc: Anatolij Gustschin > >> > Cc: Fabio Estevam > >> > Cc: Otavio Salvador > >> > Cc: Stefano Babic > >> > --- > >> > > >> > drivers/video/mxsfb.c | 16 ++++++++++++++++ > >> > 1 file changed, 16 insertions(+) > >> > > >> > diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c > >> > index dbc63a6..78709dd 100644 > >> > --- a/drivers/video/mxsfb.c > >> > +++ b/drivers/video/mxsfb.c > >> > @@ -34,6 +34,17 @@ > >> > > >> > static GraphicDevice panel; > >> > > >> > +/** > >> > + * mxsfb_system_setup() - Fine-tune LCDIF configuration > >> > + * > >> > + * This function is used to adjust the LCDIF configuration. This is > >> > usually + * needed when driving the controller in System-Mode to > >> > operate an 8080 or + * 6800 connected SmartLCD. > >> > + */ > >> > +__weak void mxsfb_system_setup(void) > >> > +{ > >> > +} > >> > + > >> > > >> > /* > >> > > >> > * DENX M28EVK: > >> > * setenv videomode > >> > > >> > @@ -88,6 +99,9 @@ static void mxs_lcd_init(GraphicDevice *panel, > >> > > >> > writel(valid_data << LCDIF_CTRL1_BYTE_PACKING_FORMAT_OFFSET, > >> > > >> > ®s->hw_lcdif_ctrl1); > >> > > >> > + > >> > + mxsfb_system_setup(); > >> > + > >> > > >> > writel((mode->yres << LCDIF_TRANSFER_COUNT_V_COUNT_OFFSET) | > >> > mode->xres, > >> > > >> > ®s->hw_lcdif_transfer_count); > >> > > >> > @@ -115,8 +129,10 @@ static void mxs_lcd_init(GraphicDevice *panel, > >> > > >> > /* Flush FIFO first */ > >> > writel(LCDIF_CTRL1_FIFO_CLEAR, ®s->hw_lcdif_ctrl1_set); > >> > > >> > +#ifndef CONFIG_VIDEO_MXS_MODE_SYSTEM > >> > >> Mode system or System mode? > > > > This is a name of configuration macro, CONFIG_VIDEO_MXS_MODE_SYSTEM . > > Otherwise I do not understand what you are asking about. > > I got this but accordingly to your commitlog it should be > CONFIG_VIDEO_MXS_SYSTEM_MODE to match the description. Any reason to > not use this name? Sorry, is this name of the macro mentioned in the commit log anywhere? I don't see it there. I believe grepping for CONFIG_VIDEO_MXS_MODE will make it easier in the future -- if we were to support more modes -- to find all occurances of such conditionals. Best regards, Marek Vasut