public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH 20/26] Add ATMEL LCD driver
Date: Fri, 9 May 2008 12:57:07 +0200	[thread overview]
Message-ID: <20080509105707.GH19728@game.jcrosoft.org> (raw)
In-Reply-To: <1210279954-28692-21-git-send-email-stelian@popies.net>

> +
> +/* configurable parameters */
> +#define ATMEL_LCDC_CVAL_DEFAULT		0xc8
> +#define ATMEL_LCDC_DMA_BURST_LEN	8
> +
> +#if defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91CAP9)
> +#define ATMEL_LCDC_FIFO_SIZE		2048
> +#else
> +#define ATMEL_LCDC_FIFO_SIZE		512
> +#endif
> +
> +#define lcdc_readl(mmio, reg)		__raw_readl((mmio)+(reg))
> +#define lcdc_writel(mmio, reg, val)	__raw_writel((val), (mmio)+(reg))
> +
> +void lcd_setcolreg (ushort regno, ushort red, ushort green, ushort blue)
                     ^
Please choose one coding style please
> +{
> +#if defined(CONFIG_ATMEL_LCD_BGR555)
> +	lcdc_writel(panel_info.mmio, ATMEL_LCDC_LUT(regno),
> +		    (red >> 3) | ((green & 0xf8) << 2) | ((blue & 0xf8) << 7));
> +#else
> +	lcdc_writel(panel_info.mmio, ATMEL_LCDC_LUT(regno),
> +		    (blue >> 3) | ((green & 0xfc) << 3) | ((red & 0xf8) << 8));
> +#endif
> +}
> +
> +void lcd_ctrl_init(void *lcdbase)
> +{
> +	unsigned long value;
> +
> +
> +	/* Set framebuffer DMA base address and pixel offset */
> +	lcdc_writel(panel_info.mmio, ATMEL_LCDC_DMABADDR1, (u_long)lcdbase);
> +
> +	lcdc_writel(panel_info.mmio, ATMEL_LCDC_DMACON, ATMEL_LCDC_DMAEN);
> +	lcdc_writel(panel_info.mmio, ATMEL_LCDC_PWRCON,
> +		    (1 << ATMEL_LCDC_GUARDT_OFFSET) | ATMEL_LCDC_PWR);
> +}
> +
> +ulong calc_fbsize (void)
                    ^
Please choose one coding style please
> +{
> +	return ((panel_info.vl_col * panel_info.vl_row *
> +		NBITS(panel_info.vl_bpix)) / 8) + PAGE_SIZE;
> +}

Best Regards,
J.

  reply	other threads:[~2008-05-09 10:57 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-08 20:52 [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 01/26] Fix @ -> <at> substitution Stelian Pop
2008-05-09 22:30   ` Wolfgang Denk
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 02/26] Update origin and copyright information in arch-at91sam9 header files Stelian Pop
2008-05-08 21:26   ` Jean-Christophe PLAGNIOL-VILLARD
2008-05-09  8:57     ` Stelian Pop
2008-05-09 10:12       ` Jean-Christophe PLAGNIOL-VILLARD
2008-05-09 22:26   ` Wolfgang Denk
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 03/26] Add copyright information in Atmel boards partition.c Stelian Pop
2008-05-09 22:24   ` Wolfgang Denk
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 04/26] Add proper copyright notices in Atmel boards Makefiles Stelian Pop
2008-05-09 22:25   ` Wolfgang Denk
2008-05-13 15:17     ` Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 05/26] Use a common u-boot.lds file across all AT91CAP9/AT91SAM9 platforms Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 06/26] AT91CAP9ADK: Handle 8 or 16 bit NAND Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 07/26] AT91CAP9ADK: Normalize SPI timings Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 08/26] AT91CAP9ADK: Normalize BOOTARGS Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 09/26] AT91CAP9ADK: Fix dataflash offsets in CONFIG_BOOTCOMMAND Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 10/26] AT91SAM9260EK: Handle 8 or 16 bit NAND Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 11/26] AT91SAM9260EK: Normalize SPI timings Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 12/26] AT91SAM9260EK: Normalize BOOTARGS Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 13/26] AT91SAM9260EK: Fix dataflash offsets in CONFIG_BOOTCOMMAND Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 14/26] AT91SAM9261EK support Stelian Pop
2008-05-09 10:41   ` Jean-Christophe PLAGNIOL-VILLARD
2008-05-09 21:46     ` Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 15/26] AT91SAM9263EK support [part 1 of 2] Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 16/26] AT91SAM9263EK support [part 2 " Stelian Pop
2008-05-09 10:45   ` Jean-Christophe PLAGNIOL-VILLARD
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 17/26] AT91SAM9RLEK support Stelian Pop
2008-05-09 10:51   ` Jean-Christophe PLAGNIOL-VILLARD
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 18/26] Make nand_init() return the detected NAND size Stelian Pop
2008-05-22 15:50   ` Scott Wood
2008-05-22 16:17     ` Jean-Christophe PLAGNIOL-VILLARD
2008-05-22 16:57       ` Scott Wood
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 19/26] Remember the detected NAND size for later display Stelian Pop
2008-05-09 15:00   ` Scott Wood
2008-05-09 21:58     ` Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 20/26] Add ATMEL LCD driver Stelian Pop
2008-05-09 10:57   ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2008-05-09 21:57     ` Stelian Pop
2008-05-12 16:30       ` Scott Wood
2008-05-13 15:28         ` Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 21/26] AT91CAP9ADK: hook up the " Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 22/26] AT91SAM9261EK: " Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 23/26] AT91SAM9263EK: " Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 24/26] AT91SAM9RLEK: " Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 25/26] Use custom logo for Atmel boards Stelian Pop
2008-05-08 20:52 ` [U-Boot-Users] [PATCH 26/26] Support AT91CAP9 revC CPUs Stelian Pop
2008-05-08 21:29 ` [U-Boot-Users] [PATCH v2 ARM/AT91 0/26] AT91SAM/CAP patches for U-Boot 1.3.4 Jean-Christophe PLAGNIOL-VILLARD
2008-05-09  8:54   ` Stelian Pop
2008-05-09 12:11 ` Jean-Christophe PLAGNIOL-VILLARD
2008-05-10 10:21   ` Jean-Christophe PLAGNIOL-VILLARD
2008-05-13 15:32     ` Stelian Pop
2008-05-24 11:20       ` Jean-Christophe PLAGNIOL-VILLARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080509105707.GH19728@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox