fix command loadb
Subsystems (2)
PATCH 1/3 fix command loadb
which was broken after commit c3789cd49b43ec1c414ba1b0e9f48e8ccc19f8e1
--- commands/loadb.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
commands/loadb.c +1 -1
@@ -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 )
Signature · 7 lines
1.6.3.3 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/3 unbreak imx-ipu-fb
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.
--- drivers/video/imx-ipu-fb.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-)
drivers/video/imx-ipu-fb.c +0 -4
@@ -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" );
Signature · 7 lines
1.6.3.3 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 3/3 eukrea_cpuimx35: better handling of backlight
start with backlight disabled and enable it if the logo is displayed.
--- board/eukrea_cpuimx35/env/bin/init | 2 ++ board/eukrea_cpuimx35/eukrea_cpuimx35.c | 11 +++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-)
board/eukrea_cpuimx35/env/bin/init +2 -0
@@ -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
board/eukrea_cpuimx35/eukrea_cpuimx35.c +9 -2
@@ -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 ; }
Signature · 7 lines
1.6.3.3 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
maintainerRe: [PATCH 3/3] eukrea_cpuimx35: better handling of backlight
Hi Eric,
Quoted 2 lines · Eric Bénard
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
Quoted 64 lines
Signed-off-by Eric Bénard <[email protected]>--- board/eukrea_cpuimx35/env/bin/init | 2 ++ board/eukrea_cpuimx35/eukrea_cpuimx35.c | 11 +++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-)board/eukrea_cpuimx35/env/bin/init +2
-0@@ -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 ]; thenboard/eukrea_cpuimx35/eukrea_cpuimx35.c +9
-2@@ -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 ; }Signature · 1 line
1.6.3.3
Signature · 9 lines
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 [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 3/3] eukrea_cpuimx35: better handling of backlight
Hi Sascha,
Quoted 9 lines · Sascha Hauer
Quoted 2 lines · Eric Bénard
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
maintainerRe: [PATCH 2/3] unbreak imx-ipu-fb
In reply to Eric BénardQuoted 5 lines · Eric Bénard
commit
c3789cd49b43ec1c414ba1b0e9f48e8ccc19f8e1set fb0.enable to 0 as a default. Re-enabling the display doesn't work after this. Removingsdc_enable_channelfromimxfb_probefix 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.
drivers/video/imx-ipu-fb.c +0 -6
@@ -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 );
Signature · 9 lines
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 [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 2 lines · Eric Bénard
which was broken after commit
c3789cd49b43ec1c414ba1b0e9f48e8ccc19f8e1
this patch is only compile tested so the fix may be wrong.
Eric
Quoted 10 lines
Signed-off-by Eric Bénard<[email protected]>--- commands/loadb.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)commands/loadb.c +0
-0
commands/loadb.c static int do_load_serial_bin(struct command *cmdtp, int argc, char *argv[]) · line 730
Quoted 8 lines
commands/loadb.c +1
-1@@ -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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
maintainerQuoted 4 lines · Eric Bénard
Quoted 2 lines · Eric Bénard
which was broken after commit
c3789cd49b43ec1c414ba1b0e9f48e8ccc19f8e1this patch is only compile tested so the fix may be wrong.
Looks sane. Applied.
Sascha
Quoted 27 lines
Eric
Quoted 10 lines
Signed-off-by Eric Bénard<[email protected]>--- commands/loadb.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)commands/loadb.c +0
-0commands/loadb.c static int do_load_serial_bin(struct command *cmdtp, int argc, char *argv[]) · line 730
Quoted 8 lines
commands/loadb.c +1
-1@@ -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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
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 [email protected] http://lists.infradead.org/mailman/listinfo/barebox