From patchwork Tue Aug 28 22:22:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeroen Hofstee X-Patchwork-Id: 180579 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id C7F6B2C00A6 for ; Wed, 29 Aug 2012 08:22:27 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6FC1A28083; Wed, 29 Aug 2012 00:22:23 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IMpTy37fQA48; Wed, 29 Aug 2012 00:22:23 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 711782807E; Wed, 29 Aug 2012 00:22:22 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 25DF92807E for ; Wed, 29 Aug 2012 00:22:16 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YzcRyx5ioolz for ; Wed, 29 Aug 2012 00:22:15 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail.virtualhost.nl (mail.virtualhost.nl [89.200.201.133]) by theia.denx.de (Postfix) with ESMTP id 754F22807D for ; Wed, 29 Aug 2012 00:22:13 +0200 (CEST) Received: (qmail 17225 invoked by uid 1141); 29 Aug 2012 00:22:10 +0200 Received: from ip120-12-208-87.adsl2.static.versatel.nl (HELO [10.0.0.107]) (87.208.12.120) (smtp-auth username dasuboot@myspectrum.nl, mechanism plain) by mail.virtualhost.nl (qpsmtpd/0.84) with (CAMELLIA256-SHA encrypted) ESMTPSA; Wed, 29 Aug 2012 00:22:10 +0200 Message-ID: <503D4494.6090107@myspectrum.nl> Date: Wed, 29 Aug 2012 00:22:12 +0200 From: Jeroen Hofstee User-Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: Stefano Babic 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> In-Reply-To: <1346156513-6953-9-git-send-email-sbabic@denx.de> Cc: Tom Rini , U-Boot Mailing List , Heiko Schocher Subject: Re: [U-Boot] [PATCH v2 8/9] OMAP3: video: add macros to set display parameters X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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);