au1x00 LCD support
PATCH 1/1 au1x00 LCD support
Hello,
here a patch to add LCD support to au1x00 CPUs.
Ciao,
Rodolfo
Signature · 5 lines
GNU/Linux Solutions e-mail: giometti at enneenne.com Linux Device Driver giometti at gnudd.com Embedded Systems giometti at linux.it UNIX programming phone: +39 349 2432127 -------------- next part --------------
common/lcd.c +16 -6
@@ -42,7 +42,7 @@ #endif#include <lcd.h> #include <watchdog.h> -#if defined(CONFIG_PXA250 ) +#if defined(CONFIG_PXA250 ) || defined(CONFIG_AU1X00 )#include <asm/byteorder.h> #endif
@@ -62,7 +62,7 @@ #include <video_font.h> /* Get font dat/************************************************************************/ #ifdef CONFIG_LCD_LOGO # include <bmp_logo.h> /* Get logo data, width and height */ -# if (CONSOLE_COLOR_WHITE >=BMP_LOGO_OFFSET ) +# if (LCD_BPP <LCD_COLOR16 ) && (CONSOLE_COLOR_WHITE >=BMP_LOGO_OFFSET )# error Default Color Map overlaps with Logo Color Map# endif #endif
@@ -512,16 +512,19 @@ static int lcd_getbgcolor (void)#ifdef CONFIG_LCD_LOGO void bitmap_plot (int x,int y) { -ushort *cmap;ushort i, j;uchar *bmap;uchar *fb;ushort *fb16;#if defined(CONFIG_PXA250 ) +ushort *cmap;struct pxafb_info *fbi = &panel_info.pxa;#elif defined(CONFIG_MPC823 ) +ushort *cmap;volatile immap_t *immr = (immap_t *)CFG_IMMR ;volatile cpm8xx_t *cp = &(immr->im_cpm); +#elif defined(CONFIG_AU1X00 ) +uint *cmap;#endif debug ("Logo: width %d height %d colors %d cmap %d\n",
@@ -537,6 +540,8 @@ #if defined(CONFIG_PXA250) cmap = (ushort *)fbi->palette;#elif defined(CONFIG_MPC823 ) cmap = (ushort *)&(cp->lcd_cmap[BMP_LOGO_OFFSET *sizeof (ushort)]); +#elif defined(CONFIG_AU1X00 ) + cmap = (u_int *)panel_info.palette+BMP_LOGO_OFFSET *sizeof (uint);#endif WATCHDOG_RESET ();
@@ -582,7 +587,6 @@ #if (CONFIG_COMMANDS & CFG_CMD_BMP) || d*/ int lcd_display_bitmap (ulong bmp_image,int x,int y) { -ushort *cmap;ushort i, j;uchar *fb;bmp_image_t *bmp=(bmp_image_t *)bmp_image;
@@ -593,9 +597,13 @@ int lcd_display_bitmap(ulong bmp_image,unsigned long compression;#if defined(CONFIG_PXA250 )struct pxafb_info *fbi = &panel_info.pxa; +ushort *cmap;#elif defined(CONFIG_MPC823 )volatile immap_t *immr = (immap_t *)CFG_IMMR ;volatile cpm8xx_t *cp = &(immr->im_cpm); +ushort *cmap; +#elif defined(CONFIG_AU1X00 ) +u_int *cmap;#endif if (!((bmp->header.signature[0]=='B') &&
@@ -632,6 +640,8 @@ #if defined(CONFIG_PXA250) cmap = (ushort *)fbi->palette;#elif defined(CONFIG_MPC823 ) cmap = (ushort *)&(cp->lcd_cmap[255 *sizeof (ushort)]); +#elif defined(CONFIG_AU1X00 ) + cmap = (u_int *)panel_info.palette;#else # error "Don't know location of color map"#endif
@@ -648,7 +658,7 @@ #ifdef CFG_INVERT_COLORS#else *cmap = colreg;#endif -#if defined(CONFIG_PXA250 ) +#if defined(CONFIG_PXA250 ) || defined(CONFIG_AU1X00 ) cmap++;#elif defined(CONFIG_MPC823 ) cmap--;
@@ -668,7 +678,7 @@ #endiffor (i =0 ; i < height; ++i) {WATCHDOG_RESET (); for (j = 0; j < width ; j++) -#if defined(CONFIG_PXA250 ) +#if defined(CONFIG_PXA250 ) || defined(CONFIG_AU1X00 ) *(fb++)=*(bmap++);#elif defined(CONFIG_MPC823 ) *(fb++)=255 -*(bmap++);
cpu/mips/Makefile +1 -1
@@ -27,7 +27,7 @@ LIB = lib$(CPU).a START = start.o OBJS = asc_serial.o au1x00_serial.o au1x00_eth.o au1x00_usb_ohci.o \ - cpu.o interrupts.o incaip_clock.o + au1x00_fb.o cpu.o interrupts.o incaip_clock.o SOBJS = incaip_wdt.o cache.o all: .depend $(START) $(LIB)
cpu/mips/au1x00_fb.c new file +274 -0
274 lines not on this page · raw message
include/asm-mips/au1x00.h +155 -0
179 lines not on this page · raw message
include/asm-mips/global_data.h +1 -0
@@ -45,6 +45,7 @@ typedef struct global_data {unsigned long reloc_off;/* Relocation Offset */ unsigned long env_addr;/* Address of Environment struct */ unsigned long env_valid;/* Checksum of Environment valid? */ +unsigned long fb_base;/* base address of frame buffer */ void **jt;/* jump table */ } gd_t;
include/lcd.h +44 -4
72 lines not on this page · raw message
lib_mips/board.c +6 -0
@@ -213,6 +213,12 @@ #endif addr &= ~(4096 -1 );debug ("Top of RAM usable for U-Boot at: %08lx\n" , addr); +#if defined(CONFIG_LCD ) +/* Reserve memory for LCD display (always full pages) */ + addr =lcd_setmem (addr); + gd->fb_base = addr; +#endif +/* Reserve memory for U-Boot code, data & bss * round down to next 16 kB limit */
PATCH 1/1 au1x00 LCD support
Quoted 3 lines · Rodolfo Giometti
Hello,
here a patch to add LCD support to au1x00 CPUs.
Sorry, I just noticed that I should remove some debugging code...
diff --git a/cpu/mips/au1x00_fb.c b/cpu/mips/au1x00_fb.c
index b007683..483df45 100644
--- a/cpu/mips/au1x00_fb.c
+++ b/cpu/mips/au1x00_fb.c
@@ -178,18 +178,6 @@ #endif
debug("LCD_PWMDIV: %x\n", au_readl(LCD_PWMDIV));
debug("LCD_PWMHI: %x\n", au_readl(LCD_PWMHI));
- printf("LCD_CONTROL: %x\n", au_readl(LCD_CONTROL));
- printf("LCD_INTSTATUS: %x\n", au_readl(LCD_INTSTATUS));
- printf("LCD_INTENABLE: %x\n", au_readl(LCD_INTENABLE));
- printf("LCD_HORZTIMING: %x\n", au_readl(LCD_HORZTIMING));
- printf("LCD_VERTTIMING: %x\n", au_readl(LCD_VERTTIMING));
- printf("LCD_CLKCONTROL: %x\n", au_readl(LCD_CLKCONTROL));
- printf("LCD_DMAADDR0: %x\n", au_readl(LCD_DMAADDR0));
- printf("LCD_DMAADDR1: %x\n", au_readl(LCD_DMAADDR1));
- printf("LCD_WORDS: %x\n", au_readl(LCD_WORDS));
- printf("LCD_PWMDIV: %x\n", au_readl(LCD_PWMDIV));
- printf("LCD_PWMHI: %x\n", au_readl(LCD_PWMHI));
-
return 0;
}Ciao,
Rodolfo
Signature · 4 lines
GNU/Linux Solutions e-mail: giometti at enneenne.com Linux Device Driver giometti at gnudd.com Embedded Systems giometti at linux.it UNIX programming phone: +39 349 2432127
PATCH 1/1 au1x00 LCD support
Quoted 10 lines · In message <[email protected]> you wrote:
Sorry, I just noticed that I should remove some debugging code...
diff --git a/cpu/mips/au1x00_fb.c b/cpu/mips/au1x00_fb.c index b007683..483df45 100644 --- a/cpu/mips/au1x00_fb.c +++ b/cpu/mips/au1x00_fb.c @@ -178,18 +178,6 @@ #endif debug("LCD_PWMDIV: %x\n", au_readl(LCD_PWMDIV)); debug("LCD_PWMHI: %x\n", au_readl(LCD_PWMHI));
So what's that? DO you think I will manually unindent your posting? I won't. Please repost your original patch after cleaning it up.
Thanks.
Wolfgang Denk
Signature · 4 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de We are Microsoft. Unix is irrelevant. Openness is futile. Prepare to be assimilated.
PATCH 1/1 au1x00 LCD support
Quoted 3 lines · Wolfgang Denk
So what's that? DO you think I will manually unindent your posting? I won't. Please repost your original patch after cleaning it up.
CHANGELOG:
LCD support for au1x00 CPUs.
NOTE:
Tested on a AU1100 based board.
Ciao,
Rodolfo
Signature · 5 lines
GNU/Linux Solutions e-mail: giometti at enneenne.com Linux Device Driver giometti at gnudd.com Embedded Systems giometti at linux.it UNIX programming phone: +39 349 2432127 -------------- next part --------------
common/lcd.c +16 -6
@@ -42,7 +42,7 @@ #endif#include <lcd.h> #include <watchdog.h> -#if defined(CONFIG_PXA250 ) +#if defined(CONFIG_PXA250 ) || defined(CONFIG_AU1X00 )#include <asm/byteorder.h> #endif
@@ -62,7 +62,7 @@ #include <video_font.h> /* Get font dat/************************************************************************/ #ifdef CONFIG_LCD_LOGO # include <bmp_logo.h> /* Get logo data, width and height */ -# if (CONSOLE_COLOR_WHITE >=BMP_LOGO_OFFSET ) +# if (LCD_BPP <LCD_COLOR16 ) && (CONSOLE_COLOR_WHITE >=BMP_LOGO_OFFSET )# error Default Color Map overlaps with Logo Color Map# endif #endif
@@ -512,16 +512,19 @@ static int lcd_getbgcolor (void)#ifdef CONFIG_LCD_LOGO void bitmap_plot (int x,int y) { -ushort *cmap;ushort i, j;uchar *bmap;uchar *fb;ushort *fb16;#if defined(CONFIG_PXA250 ) +ushort *cmap;struct pxafb_info *fbi = &panel_info.pxa;#elif defined(CONFIG_MPC823 ) +ushort *cmap;volatile immap_t *immr = (immap_t *)CFG_IMMR ;volatile cpm8xx_t *cp = &(immr->im_cpm); +#elif defined(CONFIG_AU1X00 ) +uint *cmap;#endif debug ("Logo: width %d height %d colors %d cmap %d\n",
@@ -537,6 +540,8 @@ #if defined(CONFIG_PXA250) cmap = (ushort *)fbi->palette;#elif defined(CONFIG_MPC823 ) cmap = (ushort *)&(cp->lcd_cmap[BMP_LOGO_OFFSET *sizeof (ushort)]); +#elif defined(CONFIG_AU1X00 ) + cmap = (u_int *)panel_info.palette+BMP_LOGO_OFFSET *sizeof (uint);#endif WATCHDOG_RESET ();
@@ -582,7 +587,6 @@ #if (CONFIG_COMMANDS & CFG_CMD_BMP) || d*/ int lcd_display_bitmap (ulong bmp_image,int x,int y) { -ushort *cmap;ushort i, j;uchar *fb;bmp_image_t *bmp=(bmp_image_t *)bmp_image;
@@ -593,9 +597,13 @@ int lcd_display_bitmap(ulong bmp_image,unsigned long compression;#if defined(CONFIG_PXA250 )struct pxafb_info *fbi = &panel_info.pxa; +ushort *cmap;#elif defined(CONFIG_MPC823 )volatile immap_t *immr = (immap_t *)CFG_IMMR ;volatile cpm8xx_t *cp = &(immr->im_cpm); +ushort *cmap; +#elif defined(CONFIG_AU1X00 ) +u_int *cmap;#endif if (!((bmp->header.signature[0]=='B') &&
@@ -632,6 +640,8 @@ #if defined(CONFIG_PXA250) cmap = (ushort *)fbi->palette;#elif defined(CONFIG_MPC823 ) cmap = (ushort *)&(cp->lcd_cmap[255 *sizeof (ushort)]); +#elif defined(CONFIG_AU1X00 ) + cmap = (u_int *)panel_info.palette;#else # error "Don't know location of color map"#endif
@@ -648,7 +658,7 @@ #ifdef CFG_INVERT_COLORS#else *cmap = colreg;#endif -#if defined(CONFIG_PXA250 ) +#if defined(CONFIG_PXA250 ) || defined(CONFIG_AU1X00 ) cmap++;#elif defined(CONFIG_MPC823 ) cmap--;
@@ -668,7 +678,7 @@ #endiffor (i =0 ; i < height; ++i) {WATCHDOG_RESET (); for (j = 0; j < width ; j++) -#if defined(CONFIG_PXA250 ) +#if defined(CONFIG_PXA250 ) || defined(CONFIG_AU1X00 ) *(fb++)=*(bmap++);#elif defined(CONFIG_MPC823 ) *(fb++)=255 -*(bmap++);
cpu/mips/Makefile +1 -1
@@ -27,7 +27,7 @@ LIB = lib$(CPU).a START = start.o OBJS = asc_serial.o au1x00_serial.o au1x00_eth.o au1x00_usb_ohci.o \ - cpu.o interrupts.o incaip_clock.o + au1x00_fb.o cpu.o interrupts.o incaip_clock.o SOBJS = incaip_wdt.o cache.o all: .depend $(START) $(LIB)
cpu/mips/au1x00_fb.c new file +262 -0
262 lines not on this page · raw message
include/asm-mips/au1x00.h +155 -0
179 lines not on this page · raw message
include/asm-mips/global_data.h +1 -0
@@ -45,6 +45,7 @@ typedef struct global_data {unsigned long reloc_off;/* Relocation Offset */ unsigned long env_addr;/* Address of Environment struct */ unsigned long env_valid;/* Checksum of Environment valid? */ +unsigned long fb_base;/* base address of frame buffer */ void **jt;/* jump table */ } gd_t;
include/lcd.h +44 -4
72 lines not on this page · raw message
lib_mips/board.c +6 -0
@@ -213,6 +213,12 @@ #endif addr &= ~(4096 -1 );debug ("Top of RAM usable for U-Boot at: %08lx\n" , addr); +#if defined(CONFIG_LCD ) +/* Reserve memory for LCD display (always full pages) */ + addr =lcd_setmem (addr); + gd->fb_base = addr; +#endif +/* Reserve memory for U-Boot code, data & bss * round down to next 16 kB limit */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.denx.de/pipermail/u-boot/attachments/20060713/9fda831f/attachment.pgp