Skip to contentSkip to conversation

arm, am33xx, video: add video support for am33xx based boards

PATCH New Heiko Schocher 3 participants 20 messages Aug 3, 2013 – Aug 10, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover arm, am33xx, video: add video support for am33xx based boards

This patchset prepare video support for am33xx based boards. This driver is used on the siemens boards rut, dxr2 and pxm2, posted without video support here:

http://patchwork.ozlabs.org/patch/263211/

Heiko Schocher (7):
arm, am335x: add some missing registers and defines for lcd and epwm
support
video, da8xx: move da8xx-fb.h to drivers/video
arm, am33xx: add clk_get prototype
video, da8xx-fb: changes for am335x usage
video, da8xx-fb: show fb addr in bdinfo
tools, bmp_logo: fix index from uint16_t to int to allow bigger logos
video: add an option to skip cfb console init

 arch/arm/include/asm/arch-am33xx/cpu.h             |  35 ++-
 arch/arm/include/asm/arch-am33xx/hardware.h        |   1 +
 arch/arm/include/asm/arch-am33xx/hardware_am33xx.h |   7 +
 board/davinci/ea20/ea20.c                          |  28 +-
 drivers/video/cfb_console.c                        |  18 ++
 drivers/video/da8xx-fb.c                           | 338 +++++++++++++++++----
 .../asm/arch-davinci => drivers/video}/da8xx-fb.h  |   7 +-
 tools/bmp_logo.c                                   |   2 +-
 8 Dateien ge?ndert, 373 Zeilen hinzugef?gt(+), 63 Zeilen entfernt(-)
 rename {arch/arm/include/asm/arch-davinci => drivers/video}/da8xx-fb.h (94%)
Cc Stefano Babic <[email protected]>
Cc Anatolij Gustschin <[email protected]>
Cc Tom Rini <[email protected]>
Signature · 1 line
1.7.11.7
#1 lore raw

PATCH 1/7 arm, am335x: add some missing registers and defines for lcd and epwm support

- add missing register defines in struct cm_perpl
epwmss0clkctrl
epwmss2clkctrl
lcdcclkstctrl
- add missing register defines in struct cm_dpll
clklcdcpixelclk
- add struct pwmss_regs
- add struct pwmss_ecap_regs
- add LCD Controller base LCD_CNTL_BASE
- add PWM0 controller base PWMSS0_BASE

---
 arch/arm/include/asm/arch-am33xx/cpu.h             | 35 +++++++++++++++++++++-
 arch/arm/include/asm/arch-am33xx/hardware_am33xx.h |  7 +++++

2 Dateien ge?ndert, 41 Zeilen hinzugef?gt(+), 1 Zeile entfernt(-)

arch/arm/include/asm/arch-am33xx/cpu.h +34 -1
index ce24080..daaf13c 100644
@@ -219,7 +219,8 @@ struct cm_perpll {
 	unsigned int dcan1clkctrl;	/* offset 0xC4 */
 	unsigned int resv6[2];
 	unsigned int emiffwclkctrl;	/* offset 0xD0 */
-	unsigned int resv7[2];
+	unsigned int epwmss0clkctrl;	/* offset 0xD4 */
+	unsigned int epwmss2clkctrl;	/* offset 0xD8 */
 	unsigned int l3instrclkctrl;	/* offset 0xDC */
 	unsigned int l3clkctrl;		/* Offset 0xE0 */
 	unsigned int resv8[4];
@@ -230,12 +231,15 @@ struct cm_perpll {
 	unsigned int l4hsclkctrl;	/* offset 0x120 */
 	unsigned int resv10[8];
 	unsigned int cpswclkstctrl;	/* offset 0x144 */
+	unsigned int lcdcclkstctrl;	/* offset 0x148 */
 };
 
 /* Encapsulating Display pll registers */
 struct cm_dpll {
 	unsigned int resv1[2];
 	unsigned int clktimer2clk;	/* offset 0x08 */
+	unsigned int resv2[10];
+	unsigned int clklcdcpixelclk;	/* offset 0x34 */
 };
 
 /* Control Module RTC registers */
@@ -377,6 +381,35 @@ struct ctrl_dev {
 #define RGMII_INT_DELAY		(RGMII1_IDMODE | RGMII2_IDMODE)
 #define RMII_CHIPCKL_ENABLE     (RMII1_IO_CLK_EN | RMII2_IO_CLK_EN)
 
+/* PWMSS */
+struct pwmss_regs {
+	unsigned int idver;
+	unsigned int sysconfig;
+	unsigned int clkconfig;
+	unsigned int clkstatus;
+};
+#define ECAP_CLK_EN		BIT(0)
+#define ECAP_CLK_STOP_REQ	BIT(1)
+
+struct pwmss_ecap_regs {
+	unsigned int tsctr;
+	unsigned int ctrphs;
+	unsigned int cap1;
+	unsigned int cap2;
+	unsigned int cap3;
+	unsigned int cap4;
+	unsigned int reserved[4];
+	unsigned short ecctl1;
+	unsigned short ecctl2;
+};
+
+/* Capture Control register 2 */
+#define ECTRL2_SYNCOSEL_MASK	(0x03 << 6)
+#define ECTRL2_MDSL_ECAP	BIT(9)
+#define ECTRL2_CTRSTP_FREERUN	BIT(4)
+#define ECTRL2_PLSL_LOW		BIT(10)
+#define ECTRL2_SYNC_EN		BIT(5)
+
 #endif /* __ASSEMBLY__ */
 #endif /* __KERNEL_STRICT_NAMES */
 
arch/arm/include/asm/arch-am33xx/hardware_am33xx.h +7 -0
index 432f0c7..293ede2 100644
@@ -43,4 +43,11 @@
 /* RTC base address */
 #define RTC_BASE			0x44E3E000
 
+/* LCD Controller */
+#define	LCD_CNTL_BASE			0x4830E000
+
+/* PWMSS */
+#define PWMSS0_BASE			0x48300000
+#define AM33XX_ECAP0_BASE		0x48300100
+
 #endif /* __AM33XX_HARDWARE_AM33XX_H */
Signature · 1 line
1.7.11.7
#2 lore raw

PATCH 1/7 arm, am335x: add some missing registers and defines for lcd and epwm support

On Sat, Aug 03, 2013 at 07:22:47AM +0200, Heiko Schocher wrote:

[snip]

arch/arm/include/asm/arch-am33xx/cpu.h struct ctrl_dev { · line 401

Quoted 8 lines
arch/arm/include/asm/arch-am33xx/cpu.h +8 -0
+struct pwmss_ecap_regs {
+	unsigned int tsctr;
+	unsigned int ctrphs;
+	unsigned int cap1;
+	unsigned int cap2;
+	unsigned int cap3;
+	unsigned int cap4;
+	unsigned int reserved[4];

We use 'resv' in the rest of the am33xx headers, please do 'resv1[4]' instead for consistency.

arch/arm/include/asm/arch-am33xx/hardware_am33xx.h line 47

Quoted 10 lines
arch/arm/include/asm/arch-am33xx/hardware_am33xx.h +2 -0
index 432f0c7..293ede2 100644
@@ -43,4 +43,11 @@
 /* RTC base address */
 #define RTC_BASE			0x44E3E000
 
+/* LCD Controller */
+#define	LCD_CNTL_BASE			0x4830E000

#define<space> not <tab>. Thanks.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130806/5e080010/attachment.pgp>
#3 lore raw

PATCH 2/7 video, da8xx: move da8xx-fb.h to drivers/video

In reply to Heiko Schocher

the da8xx-fb driver works also on am335x boards. So move the da8xx-fb.h file from arch/arm/include/asm/arch-davinci to drivers/video, so this driver can used from am335x based boards. Also add WVGA panel_type.

Cc Stefano Babic <[email protected]>
Cc Anatolij Gustschin <[email protected]>
Cc Tom Rini <[email protected]>
---
 board/davinci/ea20/ea20.c                                       | 2 +-
 drivers/video/da8xx-fb.c                                        | 2 +-
 {arch/arm/include/asm/arch-davinci => drivers/video}/da8xx-fb.h | 3 ++-
 3 Dateien ge?ndert, 4 Zeilen hinzugef?gt(+), 3 Zeilen entfernt(-)
 rename {arch/arm/include/asm/arch-davinci => drivers/video}/da8xx-fb.h (99%)
board/davinci/ea20/ea20.c +1 -1
index c786997..89ee079 100644
@@ -24,7 +24,7 @@
 #include <asm/io.h>
 #include <asm/arch/davinci_misc.h>
 #include <asm/gpio.h>
-#include <asm/arch/da8xx-fb.h>
+#include "../../../drivers/video/da8xx-fb.h"
 
 DECLARE_GLOBAL_DATA_PTR;
 
drivers/video/da8xx-fb.c +1 -1
index 373991d..dd7ce36 100644
@@ -24,7 +24,7 @@
 #include <asm/arch/hardware.h>
 
 #include "videomodes.h"
-#include <asm/arch/da8xx-fb.h>
+#include "da8xx-fb.h"
 
 #define DRIVER_NAME "da8xx_lcdc"
 
drivers/video/da8xx-fb.h renamed from arch/arm/include/asm/arch-davinci/da8xx-fb.h +2 -1
similarity index 99%
rename from arch/arm/include/asm/arch-davinci/da8xx-fb.h
rename to drivers/video/da8xx-fb.h
index c115034..f48fdfd 100644
@@ -17,7 +17,8 @@
 #define DA8XX_FB_H
 
 enum panel_type {
-	QVGA = 0
+	QVGA = 0,
+	WVGA
 };
 
 enum panel_shade {
Signature · 1 line
1.7.11.7
#4 lore raw

PATCH 2/7 video, da8xx: move da8xx-fb.h to drivers/video

Quoted 9 lines · Heiko Schocher

the da8xx-fb driver works also on am335x boards. So move the da8xx-fb.h file from arch/arm/include/asm/arch-davinci to drivers/video, so this driver can used from am335x based boards. Also add WVGA panel_type.

Cc Stefano Babic <[email protected]>
Cc Anatolij Gustschin <[email protected]>
Cc Tom Rini <[email protected]>
Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130806/ae03dbb0/attachment.pgp>
#5 lore raw

PATCH 2/7 video, da8xx: move da8xx-fb.h to drivers/video

In reply to Heiko Schocher
Quoted 9 lines · On Sat, 3 Aug 2013 07:22:48 +0200 Heiko Schocher <[email protected]> wrote:

the da8xx-fb driver works also on am335x boards. So move the da8xx-fb.h file from arch/arm/include/asm/arch-davinci to drivers/video, so this driver can used from am335x based boards. Also add WVGA panel_type.

Cc Stefano Babic <[email protected]>
Cc Anatolij Gustschin <[email protected]>
Cc Tom Rini <[email protected]>
Quoted 6 lines
---
 board/davinci/ea20/ea20.c                                       | 2 +-
 drivers/video/da8xx-fb.c                                        | 2 +-
 {arch/arm/include/asm/arch-davinci => drivers/video}/da8xx-fb.h | 3 ++-
 3 Dateien ge?ndert, 4 Zeilen hinzugef?gt(+), 3 Zeilen entfernt(-)
 rename {arch/arm/include/asm/arch-davinci => drivers/video}/da8xx-fb.h (99%)

Applied to u-boot-video/master, thanks!

Anatolij

#6 lore raw

PATCH 3/7 arm, am33xx: add clk_get prototype

In reply to Heiko Schocher

the clk_get() function is needed for the da8xx-fb video driver, which is used on the am3xx based siemens boards.

---
 arch/arm/include/asm/arch-am33xx/hardware.h | 1 +

1 Datei ge?ndert, 1 Zeile hinzugef?gt(+)

arch/arm/include/asm/arch-am33xx/hardware.h +1 -0
index 02f5f8a..2dfcc2e 100644
@@ -78,4 +78,5 @@
 #define USB0_OTG_BASE			0x47401000
 #define USB1_OTG_BASE			0x47401800
 
+int clk_get(int clk);
 #endif /* __AM33XX_HARDWARE_H */
Signature · 1 line
1.7.11.7
#7 lore raw

PATCH 3/7 arm, am33xx: add clk_get prototype

Quoted 5 lines · Heiko Schocher

the clk_get() function is needed for the da8xx-fb video driver, which is used on the am3xx based siemens boards.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130806/88430b1e/attachment.pgp>
#8 lore raw

PATCH 3/7 arm, am33xx: add clk_get prototype

In reply to Heiko Schocher
Quoted 8 lines · On Sat, 3 Aug 2013 07:22:49 +0200 Heiko Schocher <[email protected]> wrote:

the clk_get() function is needed for the da8xx-fb video driver, which is used on the am3xx based siemens boards.

---
 arch/arm/include/asm/arch-am33xx/hardware.h | 1 +

1 Datei ge?ndert, 1 Zeile hinzugef?gt(+)

Applied to u-boot-video/master, thanks!

Anatolij

#9 lore raw

PATCH 4/7 video, da8xx-fb: changes for am335x usage

In reply to Heiko Schocher

to use this driver also on am335x based boards, the following changes are made:

- struct lcd_ctrl_config lcd_cfg is now configurable through board code

- controller base is configurable through define DA8XX_LCD_CNTL_BASE. To be compatible with older da8xx based boards: If this define is missing, the DAVINCI_LCD_CNTL_BASE is used

- Determine LCD IP Version, and make the driver working on lcd revision register values:
Version 1:
0x4C100102
Version 2:
0x4F200800
0x4F201000

Cc Stefano Babic <[email protected]>
Cc Anatolij Gustschin <[email protected]>
Cc Tom Rini <[email protected]>
---
 board/davinci/ea20/ea20.c |  26 +++-
 drivers/video/da8xx-fb.c  | 335 ++++++++++++++++++++++++++++++++++++++--------
 drivers/video/da8xx-fb.h  |   4 +-

3 Dateien ge?ndert, 307 Zeilen hinzugef?gt(+), 58 Zeilen entfernt(-)

board/davinci/ea20/ea20.c +25 -1
index 89ee079..c4444c7 100644
@@ -43,6 +43,30 @@ static const struct da8xx_panel lcd_panel = {
 	.invert_pxl_clk = 0,
 };
 
+static const struct display_panel disp_panel = {
+	QVGA,
+	16,
+	16,
+	COLOR_ACTIVE,
+};
+
+static const struct lcd_ctrl_config lcd_cfg = {
+	&disp_panel,
+	.ac_bias		= 255,
+	.ac_bias_intrpt		= 0,
+	.dma_burst_sz		= 16,
+	.bpp			= 16,
+	.fdd			= 255,
+	.tft_alt_mode		= 0,
+	.stn_565_mode		= 0,
+	.mono_8bit_mode		= 0,
+	.invert_line_clock	= 1,
+	.invert_frm_clock	= 1,
+	.sync_edge		= 0,
+	.sync_ctrl		= 1,
+	.raster_order		= 0,
+};
+
 /* SPI0 pin muxer settings */
 static const struct pinmux_config spi1_pins[] = {
 	{ pinmux(5), 1, 1 },
@@ -259,7 +283,7 @@ int board_init(void)
 	/* address of boot parameters */
 	gd->bd->bi_boot_params = LINUX_BOOT_PARAM_ADDR;
 
-	da8xx_video_init(&lcd_panel, 16);
+	da8xx_video_init(&lcd_panel, &lcd_cfg, 16);
 
 	return 0;
 }
drivers/video/da8xx-fb.c +279 -56

586 lines not on this page · raw message

drivers/video/da8xx-fb.h +3 -1
index f48fdfd..6447a40 100644
@@ -109,6 +109,8 @@ struct lcd_sync_arg {
 	int pulse_width;
 };
 
-void da8xx_video_init(const struct da8xx_panel *panel, int bits_pixel);
+void da8xx_video_init(const struct da8xx_panel *panel,
+		      const struct lcd_ctrl_config *lcd_cfg,
+		      int bits_pixel);
 
 #endif  /* ifndef DA8XX_FB_H */
Signature · 1 line
1.7.11.7
#10 lore raw

PATCH 4/7 video, da8xx-fb: changes for am335x usage

Quoted 19 lines · Heiko Schocher

to use this driver also on am335x based boards, the following changes are made:

- struct lcd_ctrl_config lcd_cfg is now configurable through board code

- controller base is configurable through define DA8XX_LCD_CNTL_BASE. To be compatible with older da8xx based boards: If this define is missing, the DAVINCI_LCD_CNTL_BASE is used

- Determine LCD IP Version, and make the driver working on lcd revision register values:
Version 1:
0x4C100102
Version 2:
0x4F200800
0x4F201000

Quoted 4 lines
Cc Stefano Babic <[email protected]>
Cc Anatolij Gustschin <[email protected]>
Cc Tom Rini <[email protected]>
Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130806/df3b275b/attachment.pgp>
#11 lore raw

PATCH 4/7 video, da8xx-fb: changes for am335x usage

In reply to Heiko Schocher
Quoted 23 lines · On Sat, 3 Aug 2013 07:22:50 +0200 Heiko Schocher <[email protected]> wrote:

to use this driver also on am335x based boards, the following changes are made:

- struct lcd_ctrl_config lcd_cfg is now configurable through board code

- controller base is configurable through define DA8XX_LCD_CNTL_BASE. To be compatible with older da8xx based boards: If this define is missing, the DAVINCI_LCD_CNTL_BASE is used

- Determine LCD IP Version, and make the driver working on lcd revision register values:
Version 1:
0x4C100102
Version 2:
0x4F200800
0x4F201000

Cc Stefano Babic <[email protected]>
Cc Anatolij Gustschin <[email protected]>
Cc Tom Rini <[email protected]>
Quoted 5 lines
---
 board/davinci/ea20/ea20.c |  26 +++-
 drivers/video/da8xx-fb.c  | 335 ++++++++++++++++++++++++++++++++++++++--------
 drivers/video/da8xx-fb.h  |   4 +-

3 Dateien ge?ndert, 307 Zeilen hinzugef?gt(+), 58 Zeilen entfernt(-)

Applied to u-boot-video/master, thanks!

Anatolij

#12 lore raw

PATCH 5/7 video, da8xx-fb: show fb addr in bdinfo

In reply to Heiko Schocher

without this patch the bdinfo command shows:
U-Boot# bd
arch_number = 0x000010DC
[...]
sp start = 0x8EF32F20
FB base = 0x00000000

with this patch it shows the address where the framebuffer for this video driver start:

arch_number = 0x000010DC
[...]
sp start = 0x8EF32F20
FB base = 0x8EF3C788

Cc Anatolij Gustschin <[email protected]>
Cc Tom Rini <[email protected]>
---
 drivers/video/da8xx-fb.c | 1 +

1 Datei ge?ndert, 1 Zeile hinzugef?gt(+)

drivers/video/da8xx-fb.c +1 -0
index b0bde2d..3a5f325 100644
@@ -959,6 +959,7 @@ void *video_hw_init(void)
 		printf("GLCD: malloc for frame buffer failed\n");
 		goto err_release_fb;
 	}
+	gd->fb_base = (int)par->vram_virt;
 
 	gpanel.frameAdrs = (unsigned int)par->vram_virt;
 	da8xx_fb_info->screen_base = (char *) par->vram_virt;
Signature · 1 line
1.7.11.7
#13 lore raw

PATCH 5/7 video, da8xx-fb: show fb addr in bdinfo

Quoted 10 lines · Heiko Schocher

without this patch the bdinfo command shows:
U-Boot# bd
arch_number = 0x000010DC
[...]
sp start = 0x8EF32F20
FB base = 0x00000000

with this patch it shows the address where the framebuffer for this video driver start:

Quoted 8 lines

arch_number = 0x000010DC
[...]
sp start = 0x8EF32F20
FB base = 0x8EF3C788

Cc Anatolij Gustschin <[email protected]>
Cc Tom Rini <[email protected]>
Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130806/29b8108a/attachment.pgp>
#14 lore raw

PATCH 5/7 video, da8xx-fb: show fb addr in bdinfo

In reply to Heiko Schocher
Quoted 15 lines · On Sat, 3 Aug 2013 07:22:51 +0200 Heiko Schocher <[email protected]> wrote:

without this patch the bdinfo command shows:
U-Boot# bd
arch_number = 0x000010DC
[...]
sp start = 0x8EF32F20
FB base = 0x00000000

with this patch it shows the address where the framebuffer for this video driver start:

arch_number = 0x000010DC
[...]
sp start = 0x8EF32F20
FB base = 0x8EF3C788

Quoted 6 lines
Cc Anatolij Gustschin <[email protected]>
Cc Tom Rini <[email protected]>
---
 drivers/video/da8xx-fb.c | 1 +

1 Datei ge?ndert, 1 Zeile hinzugef?gt(+)

Applied to u-boot-video/master, thanks!

Anatolij

#15 lore raw

PATCH 6/7 tools, bmp_logo: fix index from uint16_t to int to allow bigger logos

In reply to Heiko Schocher

when generating the bmp_logo_bitmap, the index is casted as an uint16_t. So bigger logos as 65535 bytes are converted wrong Fix this.

Cc Anatolij Gustschin <[email protected]>
---
 tools/bmp_logo.c | 2 +-

1 Datei ge?ndert, 1 Zeile hinzugef?gt(+), 1 Zeile entfernt(-)

tools/bmp_logo.c +1 -1
index b2ad3d5..2247adc 100644
@@ -179,7 +179,7 @@ int main (int argc, char *argv[])
 	printf("unsigned char bmp_logo_bitmap[] = {\n");
 	for (i=(b->height-1)*b->width; i>=0; i-=b->width) {
 		for (x = 0; x < b->width; x++) {
-			b->data[(uint16_t) i + x] = (uint8_t) fgetc (fp) \
+			b->data[i + x] = (uint8_t) fgetc(fp)
 						+ DEFAULT_CMAP_SIZE;
 		}
 	}
Signature · 1 line
1.7.11.7
#16 lore raw

PATCH 6/7 tools, bmp_logo: fix index from uint16_t to int to allow bigger logos

Quoted 9 lines · On Sat, 3 Aug 2013 07:22:52 +0200 Heiko Schocher <[email protected]> wrote:

when generating the bmp_logo_bitmap, the index is casted as an uint16_t. So bigger logos as 65535 bytes are converted wrong Fix this.

Cc Anatolij Gustschin <[email protected]>
---
 tools/bmp_logo.c | 2 +-

1 Datei ge?ndert, 1 Zeile hinzugef?gt(+), 1 Zeile entfernt(-)

Applied to u-boot-video/master, thanks!

Anatolij

#17 lore raw

PATCH 7/7 video: add an option to skip cfb console init

In reply to Heiko Schocher

This patch add an option to skip cfb console init for boards who want to show a logo, but not use the cfb console. This is needed for the siemens boards, which have a bmp bootlogo, but do not need the cfb console.

Cc Anatolij Gustschin <[email protected]>
---
 drivers/video/cfb_console.c | 18 ++++++++++++++++++

1 Datei ge?ndert, 18 Zeilen hinzugef?gt(+)

drivers/video/cfb_console.c +18 -0
index 96ef8f9..822ed28 100644
@@ -431,6 +431,19 @@ static const int video_font_draw_table32[16][4] = {
 	{0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff}
 };
 
+/*
+ * Implement a weak default function for boards that optionally
+ * need to skip the cfb initialization.
+ */
+int __board_cfb_skip(void)
+{
+	/* As default, don't skip cfb init */
+	return 0;
+}
+
+int board_cfb_skip(void)
+	__attribute__ ((weak, alias("__board_cfb_skip")));
+
 static void video_drawchars(int xx, int yy, unsigned char *s, int count)
 {
 	u8 *cdat, *dest, *dest0;
@@ -1996,6 +2009,8 @@ static void *video_logo(void)
 		return video_fb_address + video_logo_height * VIDEO_LINE_LEN;
 	}
 #endif
+	if (board_cfb_skip())
+		return 0;
 
 	sprintf(info, " %s", version_string);
 
@@ -2205,6 +2220,9 @@ int drv_video_init(void)
 	/* Init video chip - returns with framebuffer cleared */
 	skip_dev_init = (video_init() == -1);
 
+	if (board_cfb_skip())
+		return 0;
+
 #if !defined(CONFIG_VGA_AS_SINGLE_DEVICE)
 	debug("KBD: Keyboard init ...\n");
 	skip_dev_init |= (VIDEO_KBD_INIT_FCT == -1);
Signature · 1 line
1.7.11.7
#18 lore raw

PATCH 7/7 video: add an option to skip cfb console init

Quoted 21 lines · Heiko Schocher

This patch add an option to skip cfb console init for boards who want to show a logo, but not use the cfb console. This is needed for the siemens boards, which have a bmp bootlogo, but do not need the cfb console.

Cc Anatolij Gustschin <[email protected]>
---
 drivers/video/cfb_console.c | 18 ++++++++++++++++++

1 Datei ge??ndert, 18 Zeilen hinzugef??gt(+)

drivers/video/cfb_console.c +2 -0
index 96ef8f9..822ed28 100644
@@ -431,6 +431,19 @@ static const int video_font_draw_table32[16][4] = {
 	{0x00ffffff, 0x00ffffff, 0x00ffffff, 0x00ffffff}
 };
 
+/*
+ * Implement a weak default function for boards that optionally

drivers/video/cfb_console.c static const int video_font_draw_table32[16][4] = { · line 445

Quoted 10 lines
drivers/video/cfb_console.c +10 -0
+ * need to skip the cfb initialization.
+ */
+int __board_cfb_skip(void)
+{
+	/* As default, don't skip cfb init */
+	return 0;
+}
+
+int board_cfb_skip(void)
+	__attribute__ ((weak, alias("__board_cfb_skip")));

Add <linux/compiler.h> and use '__weak int board_cfb_skip(void)'.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130806/180dd933/attachment.pgp>
#19 lore raw

PATCH 7/7 video: add an option to skip cfb console init

In reply to Heiko Schocher
Quoted 10 lines · On Sat, 3 Aug 2013 07:22:53 +0200 Heiko Schocher <[email protected]> wrote:

This patch add an option to skip cfb console init for boards who want to show a logo, but not use the cfb console. This is needed for the siemens boards, which have a bmp bootlogo, but do not need the cfb console.

Cc Anatolij Gustschin <[email protected]>
---
 drivers/video/cfb_console.c | 18 ++++++++++++++++++

1 Datei ge?ndert, 18 Zeilen hinzugef?gt(+)

Applied to u-boot-video/master after changing to use __weak, thanks!

Anatolij