Skip to contentSkip to conversation

fsl: refactor MPC8610 and MPC5121 DIU code to use existing bitmap and logo features

PATCH New Timur Tabi 2 participants 2 messages Sep 1, 2010 – Sep 21, 2010 PowerPC

lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

PATCH v3 1/1 fsl: refactor MPC8610 and MPC5121 DIU code to use existing bitmap and logo features

The Freescale MPC8610 and MPC5121 DIU code had re-implement two features that already existed in U-Boot: bitmap drawing and top-of-screen logo (CONFIG_VIDEO_LOGO). So delete the 8610-specific code and use the built-in features instead.

---

This patch depends on the patch, "logos: add Freescale logo"

This patch supersedes these two patches:

[v2] mpc8610: refactor DIU initialization code to use existing bitmap and logo features
mpc8610: refactor DIU initialization code to use existing bitmap function

 arch/powerpc/cpu/mpc512x/Makefile             |    1 -
 arch/powerpc/cpu/mpc512x/diu.c                |   68 +--
 board/freescale/common/Makefile               |    2 +-
 board/freescale/common/fsl_diu_fb.c           |  132 +----
 board/freescale/common/fsl_diu_fb.h           |   12 +-
 board/freescale/common/fsl_logo_bmp.c         |  878 -------------------------
 board/freescale/mpc5121ads/mpc5121ads.c       |    5 -
 board/freescale/mpc8610hpcd/mpc8610hpcd.c     |    6 +-
 board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c |   78 +--
 include/configs/MPC8610HPCD.h                 |    5 +-
 include/configs/mpc5121ads.h                  |    6 +-
 11 files changed, 37 insertions(+), 1156 deletions(-)
 delete mode 100644 board/freescale/common/fsl_logo_bmp.c
arch/powerpc/cpu/mpc512x/Makefile +0 -1
index 28926e0..d1b6946 100644
@@ -39,7 +39,6 @@ COBJS-y += serial.o
 COBJS-y += speed.o
 COBJS-$(CONFIG_FSL_DIU_FB) += diu.o
 COBJS-$(CONFIG_FSL_DIU_FB) += ../../../../board/freescale/common/fsl_diu_fb.o
-COBJS-$(CONFIG_FSL_DIU_FB) += ../../../../board/freescale/common/fsl_logo_bmp.o
 COBJS-$(CONFIG_CMD_IDE) += ide.o
 COBJS-$(CONFIG_IIM) += iim.o
 COBJS-$(CONFIG_PCI) += pci.o
arch/powerpc/cpu/mpc512x/diu.c +3 -65

104 lines not on this page · raw message

board/freescale/common/Makefile +1 -1
index f93045f..dca3ac0 100644
@@ -31,7 +31,7 @@ LIB	= $(obj)lib$(VENDOR).a
 
 COBJS-$(CONFIG_FSL_CADMUS)	+= cadmus.o
 COBJS-$(CONFIG_FSL_VIA)		+= cds_via.o
-COBJS-$(CONFIG_FSL_DIU_FB)	+= fsl_diu_fb.o fsl_logo_bmp.o
+COBJS-$(CONFIG_FSL_DIU_FB)	+= fsl_diu_fb.o
 COBJS-$(CONFIG_FSL_PIXIS)	+= pixis.o
 COBJS-$(CONFIG_FSL_NGPIXIS)	+= ngpixis.o
 COBJS-$(CONFIG_PQ_MDS_PIB)	+= pq-mds-pib.o
board/freescale/common/fsl_diu_fb.c +2 -130

159 lines not on this page · raw message

board/freescale/common/fsl_diu_fb.h +1 -11
index 6deba32..3a5fc9f 100644
@@ -52,18 +52,8 @@ struct fb_info {
 
 	char *screen_base;
 	unsigned long screen_size;
-	int logo_height;
-	unsigned int logo_size;
 };
 
 
 extern char *fsl_fb_open(struct fb_info **info);
-extern int fsl_diu_init(int xres,
-			unsigned int pixel_format,
-			int gamma_fix,
-			unsigned char *splash_bmp);
-extern void fsl_diu_clear_screen(void);
-extern int fsl_diu_display_bmp(unsigned char *bmp,
-			       int xoffset,
-			       int yoffset,
-			       int transpar);
+int fsl_diu_init(int xres, unsigned int pixel_format, int gamma_fix);
board/freescale/common/fsl_logo_bmp.c deleted +0 -878

878 lines not on this page · raw message

board/freescale/mpc5121ads/mpc5121ads.c +0 -5
index 2e13ea8..a84644d 100644
@@ -260,11 +260,6 @@ int misc_init_r(void)
 	i2c_read(0x38, 0x0A, 1, &tmp_val, sizeof(tmp_val));
 	debug("DVI Encoder Read: 0x%02lx\n", tmp_val);
 
-#ifdef CONFIG_FSL_DIU_FB
-# if	!(defined(CONFIG_VIDEO) || defined(CONFIG_CFB_CONSOLE))
-	mpc5121_diu_init();
-# endif
-#endif
 	return 0;
 }
 
board/freescale/mpc8610hpcd/mpc8610hpcd.c +1 -5
index 6578f58..f67f3e3 100644
@@ -36,7 +36,7 @@
 
 void sdram_init(void);
 phys_size_t fixed_sdram(void);
-void mpc8610hpcd_diu_init(void);
+int mpc8610hpcd_diu_init(void);
 
 
 /* called before any console output */
@@ -84,10 +84,6 @@ int misc_init_r(void)
 	i2c_read(0x38, 0x0A, 1, &tmp_val, sizeof(tmp_val));
 	debug("DVI Encoder Read: 0x%02lx\n",tmp_val);
 
-#ifdef CONFIG_FSL_DIU_FB
-	mpc8610hpcd_diu_init();
-#endif
-
 	return 0;
 }
 
board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c +21 -57

115 lines not on this page · raw message

include/configs/MPC8610HPCD.h +4 -1
index 4d9606e..58d3d99 100644
@@ -24,9 +24,12 @@
 /* video */
 #undef CONFIG_VIDEO
 
-#if defined(CONFIG_VIDEO)
+#ifdef CONFIG_VIDEO
+#define CONFIG_CMD_BMP
 #define CONFIG_CFB_CONSOLE
 #define CONFIG_VGA_AS_SINGLE_DEVICE
+#define CONFIG_VIDEO_LOGO
+#define CONFIG_VIDEO_BMP_LOGO
 #endif
 
 #ifdef RUN_DIAG
include/configs/mpc5121ads.h +4 -2
index 5281042..272502a 100644
@@ -47,14 +47,16 @@
 #define CONFIG_E300		1	/* E300 Family */
 #define CONFIG_MPC512X		1	/* MPC512X family */
 #define CONFIG_FSL_DIU_FB	1	/* FSL DIU */
-#undef CONFIG_FSL_DIU_LOGO_BMP		/* Don't include FSL DIU binary bmp */
 
 /* video */
 #undef CONFIG_VIDEO
 
-#if defined(CONFIG_VIDEO)
+#ifdef CONFIG_VIDEO
+#define CONFIG_CMD_BMP
 #define CONFIG_CFB_CONSOLE
 #define CONFIG_VGA_AS_SINGLE_DEVICE
+#define CONFIG_VIDEO_LOGO
+#define CONFIG_VIDEO_BMP_LOGO
 #endif
 
 /* CONFIG_PCI is defined at config time */
Signature · 1 line
1.7.2.1
#1 lore raw

PATCH v3 1/1 fsl: refactor MPC8610 and MPC5121 DIU code to use existing bitmap and logo features

Hi Timur,

Quoted 14 lines · On Tue, 31 Aug 2010 19:56:43 -0500 Timur Tabi <[email protected]> wrote:

The Freescale MPC8610 and MPC5121 DIU code had re-implement two features that already existed in U-Boot: bitmap drawing and top-of-screen logo (CONFIG_VIDEO_LOGO). So delete the 8610-specific code and use the built-in features instead.

---

This patch depends on the patch, "logos: add Freescale logo"

This patch supersedes these two patches:

[v2] mpc8610: refactor DIU initialization code to use existing bitmap and logo features
mpc8610: refactor DIU initialization code to use existing bitmap function

Quoted 13 lines
 arch/powerpc/cpu/mpc512x/Makefile             |    1 -
 arch/powerpc/cpu/mpc512x/diu.c                |   68 +--
 board/freescale/common/Makefile               |    2 +-
 board/freescale/common/fsl_diu_fb.c           |  132 +----
 board/freescale/common/fsl_diu_fb.h           |   12 +-
 board/freescale/common/fsl_logo_bmp.c         |  878 -------------------------
 board/freescale/mpc5121ads/mpc5121ads.c       |    5 -
 board/freescale/mpc8610hpcd/mpc8610hpcd.c     |    6 +-
 board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c |   78 +--
 include/configs/MPC8610HPCD.h                 |    5 +-
 include/configs/mpc5121ads.h                  |    6 +-
 11 files changed, 37 insertions(+), 1156 deletions(-)
 delete mode 100644 board/freescale/common/fsl_logo_bmp.c

Applied to u-boot-video/next. Thanks!

Best regards,
Anatolij