From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bo Shen Date: Fri, 09 Nov 2012 11:46:32 +0800 Subject: [U-Boot] [PATCH v4] video: atmel: implement lcd_setcolreg funtion In-Reply-To: <201211081408.34347.marex@denx.de> References: <1352196829-27879-2-git-send-email-andreas.devel@googlemail.com> <1352365815-24421-1-git-send-email-voice.shen@atmel.com> <201211081408.34347.marex@denx.de> Message-ID: <509C7C98.90904@atmel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Marek Vasut, On 11/8/2012 21:08, Marek Vasut wrote: > Dear Bo Shen, > > [...] >> +/* >> + * the CLUT register map as following >> + * RCLUT(24 ~ 16), GCLUT(15 ~ 8), BCLUT(7 ~ 0) >> + */ >> +void lcd_setcolreg(ushort regno, ushort red, ushort green, ushort blue) >> +{ >> + lcdc_writel((red << 16) & 0xff0000 | (green << 8) & 0xff00 | >> + blue & 0xff, panel_info.mmio + ATMEL_LCDC_LUT(regno)); >> +} >> + > > Why don't you #define these values instead? Ok, I will change to use #define. Thanks, Best Regards, Bo Shen