Skip to contentSkip to conversation

PXA27x LCD and boot logo support

PATCH New Rodolfo Giometti 1 participant 4 messages Feb 15, 2007 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 PXA27x LCD and boot logo support

Boot logo compilation fixup.

-------------- next part --------------

Makefile +1 -1
index 15fd656..2ac8dd5 100644
@@ -115,7 +115,7 @@ ifeq ($(OBJTREE)/include/config.mk,$(wildcard $(OBJTREE)/include/config.mk))
 
 # load ARCH, BOARD, and CPU configuration
 include $(OBJTREE)/include/config.mk
-export	ARCH CPU BOARD VENDOR SOC
+export	ARCH CPU BOARD VENDOR SOC LOGO_BMP
 
 ifndef CROSS_COMPILE
 ifeq ($(HOSTARCH),ppc)
tools/Makefile +3 -3
index 606f024..4a38f94 100644
@@ -40,7 +40,7 @@ endif
 LOGO_H	= $(OBJTREE)/include/bmp_logo.h
 
 ifeq ($(LOGO_BMP),)
-LOGO_BMP= logos/denx.bmp
+LOGO_BMP= denx.bmp
 endif
 
 #-------------------------------------------------------------------------
@@ -203,8 +203,8 @@ $(obj)crc32.c:
 		@rm -f $(obj)crc32.c
 		ln -s $(src)../lib_generic/crc32.c $(obj)crc32.c
 
-$(LOGO_H):	$(obj)bmp_logo $(LOGO_BMP)
-		$(obj)./bmp_logo $(LOGO_BMP) >$@
+$(LOGO_H):	$(obj)bmp_logo logos/$(LOGO_BMP)
+		$(obj)./bmp_logo logos/$(LOGO_BMP) >$@
 
 #########################################################################
 
#1 lore raw

PATCH 2/4 PXA27x LCD and boot logo support

Configuration variable CFG_LOGO_CMAP_MODE for different colormaps support.

-------------- next part --------------

README +4 -0
index a0949f0..2dfb04d 100644
@@ -2186,6 +2186,10 @@ Low Level (hardware related) configuration options:
   CFG_POCMR2_MASK_ATTRIB: (MPC826x only)
 		Overrides the default PCI memory map in cpu/mpc8260/pci.c if set.
 
+- CFG_LOGO_CMAP_MODE
+		Define the current LCD color map mode. Default value is 444 but
+		565 can also be used.
+
 - CONFIG_ETHER_ON_FEC[12]
 		Define to enable FEC[12] on a 8xx series processor.
 
common/lcd.c +36 -5

82 lines not on this page · raw message

tools/bmp_logo.c +37 -19

112 lines not on this page · raw message

#2 lore raw

PATCH 3/4 PXA27x LCD and boot logo support

Support for PXA27x LCD.

-------------- next part --------------

common/lcd.c +7 -7
index b82fbec..62dc354 100644
@@ -42,7 +42,7 @@
 #include <lcd.h>
 #include <watchdog.h>
 
-#if defined(CONFIG_PXA250)
+#if defined(CONFIG_PXA250) || defined(CONFIG_PXA27X)
 #include <asm/byteorder.h>
 #endif
 
@@ -521,7 +521,7 @@ void bitmap_plot (int x, int y)
 	uchar *bmap;
 	uchar *fb;
 	ushort *fb16;
-#if defined(CONFIG_PXA250)
+#if defined(CONFIG_PXA250) || defined(CONFIG_PXA27X)
 	struct pxafb_info *fbi = &panel_info.pxa;
 #elif defined(CONFIG_MPC823)
 	volatile immap_t *immr = (immap_t *) CFG_IMMR;
@@ -538,7 +538,7 @@ void bitmap_plot (int x, int y)
 
 	if (NBITS(panel_info.vl_bpix) < 12) {
 		/* Leave room for default color map */
-#if defined(CONFIG_PXA250)
+#if defined(CONFIG_PXA250) || defined(CONFIG_PXA27X)
 		cmap = (ushort *)fbi->palette;
 #elif defined(CONFIG_MPC823)
 		cmap = (ushort *)&(cp->lcd_cmap[BMP_LOGO_OFFSET*sizeof(ushort)]);
@@ -619,7 +619,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
 	unsigned long pwidth = panel_info.vl_col;
 	unsigned colors,bpix;
 	unsigned long compression;
-#if defined(CONFIG_PXA250)
+#if defined(CONFIG_PXA250) || defined(CONFIG_PXA27X)
 	struct pxafb_info *fbi = &panel_info.pxa;
 #elif defined(CONFIG_MPC823)
 	volatile immap_t *immr = (immap_t *) CFG_IMMR;
@@ -656,7 +656,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
 		(int)width, (int)height, (int)colors);
 
 	if (bpix==8) {
-#if defined(CONFIG_PXA250)
+#if defined(CONFIG_PXA250) || defined(CONFIG_PXA27X)
 		cmap = (ushort *)fbi->palette;
 #elif defined(CONFIG_MPC823)
 		cmap = (ushort *)&(cp->lcd_cmap[255*sizeof(ushort)]);
@@ -678,7 +678,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
 #else
 			*cmap = colreg;
 #endif
-#if defined(CONFIG_PXA250)
+#if defined(CONFIG_PXA250) || defined(CONFIG_PXA27X)
 			cmap++;
 #elif defined(CONFIG_MPC823)
 			cmap--;
@@ -717,7 +717,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
 	for (i = 0; i < height; ++i) {
 		WATCHDOG_RESET();
 		for (j = 0; j < width ; j++)
-#if defined(CONFIG_PXA250)
+#if defined(CONFIG_PXA250) || defined(CONFIG_PXA27X)
 			*(fb++)=*(bmap++);
 #elif defined(CONFIG_MPC823) || defined(CONFIG_MCC200)
 			*(fb++)=255-*(bmap++);
include/lcd.h +1 -1
index b688583..e0dd19e 100644
@@ -77,7 +77,7 @@ typedef struct vidinfo {
 
 extern vidinfo_t panel_info;
 
-#elif defined CONFIG_PXA250
+#elif defined CONFIG_PXA250 || defined CONFIG_PXA27X
 /*
  * PXA LCD DMA descriptor
  */
#3 lore raw

PATCH 4/4 PXA27x LCD and boot logo support

Support for 16bpp LCDs.

-------------- next part --------------

cpu/pxa/pxafb.c +3 -3
index b2caa73..cd529e3 100644
@@ -148,7 +148,7 @@ vidinfo_t panel_info = {
 
 /*----------------------------------------------------------------------*/
 
-#if LCD_BPP == LCD_COLOR8
+#if LCD_BPP == LCD_COLOR8 || LCD_BPP == LCD_COLOR16
 void lcd_setcolreg (ushort regno, ushort red, ushort green, ushort blue);
 #endif
 #if LCD_BPP == LCD_MONOCHROME
@@ -200,7 +200,7 @@ lcd_getcolreg (ushort regno, ushort *red, ushort *green, ushort *blue)
 #endif /* NOT_USED_SO_FAR */
 
 /*----------------------------------------------------------------------*/
-#if LCD_BPP == LCD_COLOR8
+#if LCD_BPP == LCD_COLOR8 || LCD_BPP == LCD_COLOR16
 void
 lcd_setcolreg (ushort regno, ushort red, ushort green, ushort blue)
 {
@@ -225,7 +225,7 @@ lcd_setcolreg (ushort regno, ushort red, ushort green, ushort blue)
 		red, green, blue,
 		palette[regno]);
 }
-#endif /* LCD_COLOR8 */
+#endif /* LCD_COLOR8 || LCD_BPP == LCD_COLOR16 */
 
 /*----------------------------------------------------------------------*/
 #if LCD_BPP == LCD_MONOCHROME