mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/3] fix command loadb
@ 2010-06-24  9:49 Eric Bénard
  2010-06-24  9:49 ` [PATCH 2/3] unbreak imx-ipu-fb Eric Bénard
  2010-06-24  9:53 ` [PATCH 1/3] fix command loadb Eric Bénard
  0 siblings, 2 replies; 8+ messages in thread
From: Eric Bénard @ 2010-06-24  9:49 UTC (permalink / raw)
  To: barebox

which was broken after commit c3789cd49b43ec1c414ba1b0e9f48e8ccc19f8e1

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 commands/loadb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/commands/loadb.c b/commands/loadb.c
index 6740ef4..437b60f 100644
--- a/commands/loadb.c
+++ b/commands/loadb.c
@@ -724,7 +724,7 @@ static int do_load_serial_bin(struct command *cmdtp, int argc, char *argv[])
 		printf("%s:No console device with STDIN and STDOUT\n", argv[0]);
 		return -ENODEV;
 	}
-	current_baudrate = simple_strtoul(cdev->baudrate_string, NULL, 10);
+	current_baudrate = (int)simple_strtoul(dev_get_param(cdev->dev, "baudrate"), NULL, 10);
 
 	/* Load Defaults */
 	if (load_baudrate == 0)
-- 
1.6.3.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 2/3] unbreak imx-ipu-fb
  2010-06-24  9:49 [PATCH 1/3] fix command loadb Eric Bénard
@ 2010-06-24  9:49 ` Eric Bénard
  2010-06-24  9:49   ` [PATCH 3/3] eukrea_cpuimx35: better handling of backlight Eric Bénard
  2010-06-24 10:34   ` [PATCH 2/3] unbreak imx-ipu-fb Sascha Hauer
  2010-06-24  9:53 ` [PATCH 1/3] fix command loadb Eric Bénard
  1 sibling, 2 replies; 8+ messages in thread
From: Eric Bénard @ 2010-06-24  9:49 UTC (permalink / raw)
  To: barebox

commit c3789cd49b43ec1c414ba1b0e9f48e8ccc19f8e1 set fb0.enable to 0
as a default. Re-enabling the display doesn't work after this.
Removing sdc_enable_channel from imxfb_probe fix this problem.

This patch also remove verbose log from ipu_fb_disable.

Patch tested on i.MX35.

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 drivers/video/imx-ipu-fb.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/video/imx-ipu-fb.c b/drivers/video/imx-ipu-fb.c
index 0bd86b2..6d1eb5e 100644
--- a/drivers/video/imx-ipu-fb.c
+++ b/drivers/video/imx-ipu-fb.c
@@ -835,8 +835,6 @@ static void ipu_fb_disable(struct fb_info *info)
 	struct ipu_fb_info *fbi = info->priv;
 	u32 reg;
 
-	printf("%s\n", __func__);
-
 	reg = reg_read(fbi, SDC_COM_CONF);
 	reg &= ~SDC_COM_BG_EN;
 	reg_write(fbi, reg, SDC_COM_CONF);
@@ -883,8 +881,6 @@ static int imxfb_probe(struct device_d *dev)
 			return -ENOMEM;
 	}
 
-	sdc_enable_channel(fbi, info->screen_base);
-
 	ret = register_framebuffer(&fbi->info);
 	if (ret < 0) {
 		dev_err(dev, "failed to register framebuffer\n");
-- 
1.6.3.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 3/3] eukrea_cpuimx35: better handling of backlight
  2010-06-24  9:49 ` [PATCH 2/3] unbreak imx-ipu-fb Eric Bénard
@ 2010-06-24  9:49   ` Eric Bénard
  2010-06-24 10:48     ` Sascha Hauer
  2010-06-24 10:34   ` [PATCH 2/3] unbreak imx-ipu-fb Sascha Hauer
  1 sibling, 1 reply; 8+ messages in thread
From: Eric Bénard @ 2010-06-24  9:49 UTC (permalink / raw)
  To: barebox

start with backlight disabled and enable it if the logo is
displayed.

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 board/eukrea_cpuimx35/env/bin/init      |    2 ++
 board/eukrea_cpuimx35/eukrea_cpuimx35.c |   11 +++++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/board/eukrea_cpuimx35/env/bin/init b/board/eukrea_cpuimx35/env/bin/init
index 49e54c5..4610213 100644
--- a/board/eukrea_cpuimx35/env/bin/init
+++ b/board/eukrea_cpuimx35/env/bin/init
@@ -14,9 +14,11 @@ fi
 
 if [ -f /env/logo.bmp ]; then
 	bmp /env/logo.bmp
+	gpio_direction_output 1 1
 elif [ -f /env/logo.bmp.lzo ]; then
 	unlzo /env/logo.bmp.lzo /logo.bmp
 	bmp /logo.bmp
+	gpio_direction_output 1 1
 fi
 
 if [ -z $eth0.ethaddr ]; then
diff --git a/board/eukrea_cpuimx35/eukrea_cpuimx35.c b/board/eukrea_cpuimx35/eukrea_cpuimx35.c
index 7f1c782..f358f51 100644
--- a/board/eukrea_cpuimx35/eukrea_cpuimx35.c
+++ b/board/eukrea_cpuimx35/eukrea_cpuimx35.c
@@ -166,8 +166,10 @@ device_initcall(eukrea_cpuimx35_devices_init);
 
 static int eukrea_cpuimx35_enable_display(void)
 {
-	gpio_direction_output(1, 1);
-	gpio_direction_output(0, 0);
+	/* default : backlight OFF */
+	gpio_direction_output(1, 0);
+	gpio_direction_output(4, 1);
+
 	return 0;
 }
 
@@ -205,14 +207,19 @@ static struct pad_desc eukrea_cpuimx35_pads[] = {
 	MX35_PAD_TXD1__UART1_TXD_MUX,
 	MX35_PAD_RTS1__UART1_RTS,
 	MX35_PAD_CTS1__UART1_CTS,
+
+	MX35_PAD_CONTRAST__GPIO1_1,
+	MX35_PAD_D3_CLS__GPIO1_4,
 };
 
+
 static int eukrea_cpuimx35_console_init(void)
 {
 	mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx35_pads,
 		ARRAY_SIZE(eukrea_cpuimx35_pads));
 
 	register_device(&eukrea_cpuimx35_serial_device);
+
 	return 0;
 }
 
-- 
1.6.3.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] fix command loadb
  2010-06-24  9:49 [PATCH 1/3] fix command loadb Eric Bénard
  2010-06-24  9:49 ` [PATCH 2/3] unbreak imx-ipu-fb Eric Bénard
@ 2010-06-24  9:53 ` Eric Bénard
  2010-06-24 10:38   ` Sascha Hauer
  1 sibling, 1 reply; 8+ messages in thread
From: Eric Bénard @ 2010-06-24  9:53 UTC (permalink / raw)
  To: barebox

Le 24/06/2010 11:49, Eric Bénard a écrit :
> which was broken after commit c3789cd49b43ec1c414ba1b0e9f48e8ccc19f8e1
>
this patch is only compile tested so the fix may be wrong.

Eric

> Signed-off-by: Eric Bénard<eric@eukrea.com>
> ---
>   commands/loadb.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/commands/loadb.c b/commands/loadb.c
> index 6740ef4..437b60f 100644
> --- a/commands/loadb.c
> +++ b/commands/loadb.c
> @@ -724,7 +724,7 @@ static int do_load_serial_bin(struct command *cmdtp, int argc, char *argv[])
>   		printf("%s:No console device with STDIN and STDOUT\n", argv[0]);
>   		return -ENODEV;
>   	}
> -	current_baudrate = simple_strtoul(cdev->baudrate_string, NULL, 10);
> +	current_baudrate = (int)simple_strtoul(dev_get_param(cdev->dev, "baudrate"), NULL, 10);
>
>   	/* Load Defaults */
>   	if (load_baudrate == 0)


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] unbreak imx-ipu-fb
  2010-06-24  9:49 ` [PATCH 2/3] unbreak imx-ipu-fb Eric Bénard
  2010-06-24  9:49   ` [PATCH 3/3] eukrea_cpuimx35: better handling of backlight Eric Bénard
@ 2010-06-24 10:34   ` Sascha Hauer
  1 sibling, 0 replies; 8+ messages in thread
From: Sascha Hauer @ 2010-06-24 10:34 UTC (permalink / raw)
  To: Eric Bénard; +Cc: barebox

On Thu, Jun 24, 2010 at 11:49:56AM +0200, Eric Bénard wrote:
> commit c3789cd49b43ec1c414ba1b0e9f48e8ccc19f8e1 set fb0.enable to 0
> as a default. Re-enabling the display doesn't work after this.
> Removing sdc_enable_channel from imxfb_probe fix this problem.
> 
> This patch also remove verbose log from ipu_fb_disable.

I already stumbled upon this. I prefer the following patch which fixes
the enabling/disabling of the framebuffer.

Sascha

    imx ipu fb: remove checking of IPU_CHA_BUF0_RDY
    
    This check prevents the driver from successfully enabling/disabling
    the controller more than once, because the second time we get
    here the check fails and the drivers bails out. We do not need this
    check at all, so remove it.
    
    Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

diff --git a/drivers/video/imx-ipu-fb.c b/drivers/video/imx-ipu-fb.c
index 0bd86b2..d9b94e4 100644
--- a/drivers/video/imx-ipu-fb.c
+++ b/drivers/video/imx-ipu-fb.c
@@ -664,12 +664,6 @@ static int ipu_enable_channel(struct ipu_fb_info *fbi, enum ipu_channel channel)
 static int ipu_update_channel_buffer(struct ipu_fb_info *fbi,
 		enum ipu_channel channel, void *buf)
 {
-	u32 reg;
-
-	reg = reg_read(fbi, IPU_CHA_BUF0_RDY);
-	if (reg & (1UL << channel))
-		return -EACCES;
-
 	/* 44.3.3.1.9 - Row Number 1 (WORD1, offset 0) */
 	reg_write(fbi, dma_param_addr(channel) + 0x0008UL, IPU_IMA_ADDR);
 	reg_write(fbi, (u32)buf, IPU_IMA_DATA);

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] fix command loadb
  2010-06-24  9:53 ` [PATCH 1/3] fix command loadb Eric Bénard
@ 2010-06-24 10:38   ` Sascha Hauer
  0 siblings, 0 replies; 8+ messages in thread
From: Sascha Hauer @ 2010-06-24 10:38 UTC (permalink / raw)
  To: Eric Bénard; +Cc: barebox

On Thu, Jun 24, 2010 at 11:53:40AM +0200, Eric Bénard wrote:
> Le 24/06/2010 11:49, Eric Bénard a écrit :
>> which was broken after commit c3789cd49b43ec1c414ba1b0e9f48e8ccc19f8e1
>>
> this patch is only compile tested so the fix may be wrong.

Looks sane. Applied.

Sascha

>
> Eric
>
>> Signed-off-by: Eric Bénard<eric@eukrea.com>
>> ---
>>   commands/loadb.c |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/commands/loadb.c b/commands/loadb.c
>> index 6740ef4..437b60f 100644
>> --- a/commands/loadb.c
>> +++ b/commands/loadb.c
>> @@ -724,7 +724,7 @@ static int do_load_serial_bin(struct command *cmdtp, int argc, char *argv[])
>>   		printf("%s:No console device with STDIN and STDOUT\n", argv[0]);
>>   		return -ENODEV;
>>   	}
>> -	current_baudrate = simple_strtoul(cdev->baudrate_string, NULL, 10);
>> +	current_baudrate = (int)simple_strtoul(dev_get_param(cdev->dev, "baudrate"), NULL, 10);
>>
>>   	/* Load Defaults */
>>   	if (load_baudrate == 0)
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] eukrea_cpuimx35: better handling of backlight
  2010-06-24  9:49   ` [PATCH 3/3] eukrea_cpuimx35: better handling of backlight Eric Bénard
@ 2010-06-24 10:48     ` Sascha Hauer
  2010-06-24 11:48       ` Eric Bénard
  0 siblings, 1 reply; 8+ messages in thread
From: Sascha Hauer @ 2010-06-24 10:48 UTC (permalink / raw)
  To: Eric Bénard; +Cc: barebox

Hi Eric,

On Thu, Jun 24, 2010 at 11:49:57AM +0200, Eric Bénard wrote:
> start with backlight disabled and enable it if the logo is
> displayed.

I just posted a patch which starts up the imxfb driver disabled and
another patch which adds a board specific enable/disable hook. Would
this be a solution for you? The only thing missing then is a patch
which initializes the ipu fb driver with the display disabled.

Sascha

> 
> Signed-off-by: Eric Bénard <eric@eukrea.com>
> ---
>  board/eukrea_cpuimx35/env/bin/init      |    2 ++
>  board/eukrea_cpuimx35/eukrea_cpuimx35.c |   11 +++++++++--
>  2 files changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/board/eukrea_cpuimx35/env/bin/init b/board/eukrea_cpuimx35/env/bin/init
> index 49e54c5..4610213 100644
> --- a/board/eukrea_cpuimx35/env/bin/init
> +++ b/board/eukrea_cpuimx35/env/bin/init
> @@ -14,9 +14,11 @@ fi
>  
>  if [ -f /env/logo.bmp ]; then
>  	bmp /env/logo.bmp
> +	gpio_direction_output 1 1
>  elif [ -f /env/logo.bmp.lzo ]; then
>  	unlzo /env/logo.bmp.lzo /logo.bmp
>  	bmp /logo.bmp
> +	gpio_direction_output 1 1
>  fi
>  
>  if [ -z $eth0.ethaddr ]; then
> diff --git a/board/eukrea_cpuimx35/eukrea_cpuimx35.c b/board/eukrea_cpuimx35/eukrea_cpuimx35.c
> index 7f1c782..f358f51 100644
> --- a/board/eukrea_cpuimx35/eukrea_cpuimx35.c
> +++ b/board/eukrea_cpuimx35/eukrea_cpuimx35.c
> @@ -166,8 +166,10 @@ device_initcall(eukrea_cpuimx35_devices_init);
>  
>  static int eukrea_cpuimx35_enable_display(void)
>  {
> -	gpio_direction_output(1, 1);
> -	gpio_direction_output(0, 0);
> +	/* default : backlight OFF */
> +	gpio_direction_output(1, 0);
> +	gpio_direction_output(4, 1);
> +
>  	return 0;
>  }
>  
> @@ -205,14 +207,19 @@ static struct pad_desc eukrea_cpuimx35_pads[] = {
>  	MX35_PAD_TXD1__UART1_TXD_MUX,
>  	MX35_PAD_RTS1__UART1_RTS,
>  	MX35_PAD_CTS1__UART1_CTS,
> +
> +	MX35_PAD_CONTRAST__GPIO1_1,
> +	MX35_PAD_D3_CLS__GPIO1_4,
>  };
>  
> +
>  static int eukrea_cpuimx35_console_init(void)
>  {
>  	mxc_iomux_v3_setup_multiple_pads(eukrea_cpuimx35_pads,
>  		ARRAY_SIZE(eukrea_cpuimx35_pads));
>  
>  	register_device(&eukrea_cpuimx35_serial_device);
> +
>  	return 0;
>  }
>  
> -- 
> 1.6.3.3
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] eukrea_cpuimx35: better handling of backlight
  2010-06-24 10:48     ` Sascha Hauer
@ 2010-06-24 11:48       ` Eric Bénard
  0 siblings, 0 replies; 8+ messages in thread
From: Eric Bénard @ 2010-06-24 11:48 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hi Sascha,

Le 24/06/2010 12:48, Sascha Hauer a écrit :
> On Thu, Jun 24, 2010 at 11:49:57AM +0200, Eric Bénard wrote:
>> start with backlight disabled and enable it if the logo is
>> displayed.
>
> I just posted a patch which starts up the imxfb driver disabled and
> another patch which adds a board specific enable/disable hook. Would
> this be a solution for you? The only thing missing then is a patch
> which initializes the ipu fb driver with the display disabled.
>
yes I saw your patch after sending this one and it's clearly the right 
way to do this.
I'll update ipu_fb to add the enable/disable hook.

Thanks,
Eric


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-06-24 11:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-24  9:49 [PATCH 1/3] fix command loadb Eric Bénard
2010-06-24  9:49 ` [PATCH 2/3] unbreak imx-ipu-fb Eric Bénard
2010-06-24  9:49   ` [PATCH 3/3] eukrea_cpuimx35: better handling of backlight Eric Bénard
2010-06-24 10:48     ` Sascha Hauer
2010-06-24 11:48       ` Eric Bénard
2010-06-24 10:34   ` [PATCH 2/3] unbreak imx-ipu-fb Sascha Hauer
2010-06-24  9:53 ` [PATCH 1/3] fix command loadb Eric Bénard
2010-06-24 10:38   ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox