From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Wed, 29 Aug 2012 09:40:22 +0200 Subject: [U-Boot] [PATCH v2 8/9] OMAP3: video: add macros to set display parameters In-Reply-To: <503D464E.1010509@ti.com> References: <1346140007-9563-1-git-send-email-sbabic@denx.de> <1346156513-6953-1-git-send-email-sbabic@denx.de> <1346156513-6953-9-git-send-email-sbabic@denx.de> <503D4494.6090107@myspectrum.nl> <503D464E.1010509@ti.com> Message-ID: <503DC766.7010806@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 On 29/08/2012 00:29, Tom Rini wrote: > On 08/28/2012 03:22 PM, Jeroen Hofstee wrote: >> On 08/28/2012 02:21 PM, Stefano Babic wrote: >>> Add a common macros to set the registers for horizontal >>> and vertical timing. >>> >>> Signed-off-by: Stefano Babic >>> --- >>> >>> arch/arm/include/asm/arch-omap3/dss.h | 4 ++++ >>> 1 file changed, 4 insertions(+) >>> >>> diff --git a/arch/arm/include/asm/arch-omap3/dss.h >>> b/arch/arm/include/asm/arch-omap3/dss.h >>> index 8913a71..df5b978 100644 >>> --- a/arch/arm/include/asm/arch-omap3/dss.h >>> +++ b/arch/arm/include/asm/arch-omap3/dss.h >>> @@ -181,6 +181,10 @@ struct panel_config { >>> void *frame_buffer; >>> }; >>> +#define PANEL_TIMING_H(bp, fp, sw) (((bp - 1) << 20) | \ >>> + ((fp - 1) << 8) | (sw - 1)) >>> +#define PANEL_TIMING_V(bp, fp, sw) ((bp << 20) | (fp << 8) | (sw - 1)) >>> + >>> /* Generic DSS Functions */ >>> void omap3_dss_venc_config(const struct venc_regs *venc_cfg, >>> u32 height, u32 width); >> >> To make it a bit more clear what is set, perhaps we can define >> the fields themselves, this would save some /* hfp */ etc. >> >> e.g. >> >> diff --git a/arch/arm/include/asm/arch-omap3/dss.h >> b/arch/arm/include/asm/arch-omap3/dss.h >> index a830c43..b6ad72d 100644 >> --- a/arch/arm/include/asm/arch-omap3/dss.h >> +++ b/arch/arm/include/asm/arch-omap3/dss.h >> @@ -182,6 +182,13 @@ struct panel_config { >> void *frame_buffer; >> }; >> >> +#define DSS_HPB(bp) (((bp) - 1) << 20) >> +#define DSS_HFB(fp) (((fp) - 1) << 8) >> +#define DSS_HSW(sw) ((sw) - 1) >> +#define DSS_VPB(bp) ((bp) << 20) >> +#define DSS_VFB(fp) ((fp) << 8) >> +#define DSS_VSW(sw) ((sw) - 1) >> + >> /* Generic DSS Functions */ >> void omap3_dss_venc_config(const struct venc_regs *venc_cfg, >> u32 height, u32 width); >> > > Looks helpful to me, please make it so, thanks! > Done in V3 ! Stefano -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================