at91: Add esd gmbh OTC570 board support
PATCH 1/1 at91: Add esd gmbh OTC570 board support
This patch adds support for esd gmbh OTC570 board. The OTC570 is based on an Atmel AT91SAM9263 SoC.
--- MAINTAINERS | 1 + MAKEALL | 1 + Makefile | 3 + board/esd/otc570/Makefile | 55 ++++++ board/esd/otc570/config.mk | 1 + board/esd/otc570/otc570.c | 429 ++++++++++++++++++++++++++++++++++++++++++ board/esd/otc570/partition.c | 37 ++++ include/configs/otc570.h | 247 ++++++++++++++++++++++++ tools/Makefile | 3 + tools/logos/esd.bmp | Bin 0 -> 35078 bytes 10 files changed, 777 insertions(+), 0 deletions(-) create mode 100644 board/esd/otc570/Makefile create mode 100644 board/esd/otc570/config.mk create mode 100644 board/esd/otc570/otc570.c create mode 100644 board/esd/otc570/partition.c create mode 100644 include/configs/otc570.h create mode 100644 tools/logos/esd.bmp
MAINTAINERS +1 -0
@@ -574,6 +574,7 @@ Peter Figuli <[email protected]> Daniel Gorsulowski <[email protected]> meesc ARM926EJS (AT91SAM9263 SoC) + otc570 ARM926EJS (AT91SAM9263 SoC) Sedji Gaouaou<[email protected]> at91sam9g10ek ARM926EJS (AT91SAM9G10 SoC)
MAKEALL +1 -0
@@ -654,6 +654,7 @@ LIST_at91=" \ meesc \ mp2usb \ m501sk \ + otc570 \ pm9261 \ pm9263 \ SBC35_A9G20 \
Makefile +3 -0
@@ -2862,6 +2862,9 @@ at91sam9g45ekes_config : unconfig fi; @$(MKCONFIG) -a at91sam9m10g45ek arm arm926ejs at91sam9m10g45ek atmel at91 +otc570_config : unconfig + @$(MKCONFIG) $(@:_config=) arm arm926ejs otc570 esd at91 + pm9263_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm926ejs pm9263 ronetix at91
board/esd/otc570/Makefile new file +55 -0
55 lines not on this page · raw message
board/esd/otc570/config.mk new file +1 -0
@@ -0,0 +1 @@ +TEXT_BASE = 0x23f00000
board/esd/otc570/otc570.c new file +429 -0
429 lines not on this page · raw message
board/esd/otc570/partition.c new file +37 -0
@@ -0,0 +1,37 @@ +/* +* (C) Copyright 2008 +* Ulf Samuelsson <[email protected]> +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +* +*/ +#include <common.h> +#include <config.h> +#include <asm/hardware.h> +#include <dataflash.h> + +AT91S_DATAFLASH_INFO dataflash_info[CONFIG_SYS_MAX_DATAFLASH_BANKS ]; + +struct dataflash_addr cs[CONFIG_SYS_MAX_DATAFLASH_BANKS ] = { + {CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS0 ,0 },/* Logical adress, CS */ +}; + +/* define the area offsets */ +dataflash_protect_t area_list[NB_DATAFLASH_AREA ] = { + {0x00000000 ,0x000041FF ,FLAG_PROTECT_SET ,0 ,"Bootstrap" }, + {0x00004200 ,0x000083FF ,FLAG_PROTECT_CLEAR ,0 ,"Environment" }, + {0x00008400 ,0x00041FFF ,FLAG_PROTECT_SET ,0 ,"U-Boot" }, +};
include/configs/otc570.h new file +247 -0
247 lines not on this page · raw message
tools/Makefile +3 -0
@@ -102,6 +102,9 @@ endif ifeq ($(VENDOR),atmel) LOGO_BMP= logos/atmel.bmp endif +ifeq ($(VENDOR),esd) +LOGO_BMP= logos/esd.bmp +endif ifeq ($(VENDOR),ronetix) LOGO_BMP= logos/ronetix.bmp endif
tools/logos/esd.bmp new file binary +0 -0
zcmeHQy>BDO6<^6@L|+U_;sGaGS5Q1L(1(GG1W9K|q-MoCRtC~s>DHx7mu}qzNSV at Y zngA(Nx(!kVH!66Z at zZke(#E+#S0&>+}WA;X5M at A=FRMUEZ_g>cYls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^&#(4 at Mh z*FO}pYHJG0t21j7pg-GSouP?8_w;O~z*holG?29znpAt<^%$De@w}BMZl8g{)tEJ@ xIFSAfgdhw2x8w>~hh3M?M4KBnHX7JyV55PJ2L3-ZkpAveD0Nv{h`0Li{{S%4%!vR1
literal 0
HcmV?d00001
Signature · 1 line
1.6.1
PATCH 1/1 at91: Add esd gmbh OTC570 board support
Quoted 4 lines · Daniel Gorsulowski
This patch adds support for esd gmbh OTC570 board. The OTC570 is based on an Atmel AT91SAM9263 SoC.
Signed-off-by Daniel Gorsulowski <[email protected]>
For u-boot-video.
Maybe some u-boot commands that could be common.
Quoted 4 lines
--- MAINTAINERS | 1 + MAKEALL | 1 + Makefile | 3 +
<snip>
Quoted 6 lines
board/esd/otc570/otc570.c new file +0
-0
board/esd/otc570/otc570.c line 9
Quoted 9 lines
board/esd/otc570/otc570.c new file +9
-0@@ -0,0 +1,429 @@ +/* +* (C) Copyright 2007-2008 +* Stelian Pop <[email protected]> +* Lead Tech Design <www.leadtechdesign.com> +* +* (C) Copyright 2010 +* Daniel Gorsulowski <[email protected]> +* esd electronic system design gmbh <www.esd.eu> +*
New copyrights before old
Swap places
Quoted 3 lines
board/esd/otc570/otc570.c new file +3
-0+* See file CREDITS for list of people who contributed to this +* project. +*
<snip>
Quoted 18 lines
board/esd/otc570/otc570.c new file +18
-0+ +#ifdef CONFIG_CMD_NAND +static void otc570_nand_hw_init (void ) +{ +unsigned long csa; + +/* Enable CS3 */ + csa =at91_sys_read (AT91_MATRIX_EBI0CSA ); +at91_sys_write (AT91_MATRIX_EBI0CSA , + csa |AT91_MATRIX_EBI0_CS3A_SMC_SMARTMEDIA ); + +/* Configure SMC CS3 for NAND/SmartMedia */ +at91_sys_write (AT91_SMC_SETUP (3 ), +AT91_SMC_NWESETUP_ (1 ) |AT91_SMC_NCS_WRSETUP_ (0 ) | +AT91_SMC_NRDSETUP_ (1 ) |AT91_SMC_NCS_RDSETUP_ (0 )); +at91_sys_write (AT91_SMC_PULSE (3 ), +AT91_SMC_NWEPULSE_ (3 ) |AT91_SMC_NCS_WRPULSE_ (3 ) | +AT91_SMC_NRDPULSE_ (3 ) |AT91_SMC_NCS_RDPULSE_ (3 ));
board/esd/otc570/otc570.c line 98
Quoted 10 lines
board/esd/otc570/otc570.c new file +10
-0+at91_sys_write (AT91_SMC_CYCLE (3 ), +AT91_SMC_NWECYCLE_ (5 ) |AT91_SMC_NRDCYCLE_ (5 )); + at91_sys_write(AT91_SMC_MODE(3), + AT91_SMC_READMODE | AT91_SMC_WRITEMODE | + AT91_SMC_EXNWMODE_DISABLE | +#ifdef CONFIG_SYS_NAND_DBW_16 + AT91_SMC_DBW_16 | +#else /* CONFIG_SYS_NAND_DBW_8 */ + AT91_SMC_DBW_8 | +#endif
I do not see where CONFIG_SYS_NAND_DBW_16 is ever set to 1 I see meesc has similar logic.
It looks like this #if-def can be removed.
Do this or add comment explaining.
board/esd/otc570/otc570.c line 108
Quoted 10 lines
board/esd/otc570/otc570.c new file +10
-0+ AT91_SMC_TDF_(2)); + +/* Configure RDY/BSY */ +at91_set_gpio_input (CONFIG_SYS_NAND_READY_PIN ,1 ); + +/* Enable NandFlash */ + at91_set_gpio_output(CONFIG_SYS_NAND_ENABLE_PIN, 1); +} +#endif /* CONFIG_CMD_NAND */ +
<snip>
Convert the element initialization to be
.vl_col = 640
.vl_row = 480
etc..
Quoted 20 lines
board/esd/otc570/otc570.c new file +20
-0+#ifdef CONFIG_LCD +/* Number of columns and rows, pixel clock in Hz and hsync/vsync polarity */ +vidinfo_t panel_info = { + vl_col:640 , + vl_row:480 , + vl_clk:25175000 , + vl_sync:ATMEL_LCDC_INVLINE_INVERTED | +ATMEL_LCDC_INVFRAME_INVERTED , + + vl_bpix:3 ,/* Bits per pixel, 0 = 1bit, 3 = 8bit */ + vl_tft:1 ,/* 0 = passive, 1 = TFT */ + vl_vsync_len:1 ,/* Length of vertical sync in number of lines */ + vl_upper_margin:35 ,/* Idle lines at the beginning of the frame */ + vl_lower_margin:5 ,/* Idle lines at the end of the frame */ + vl_hsync_len:5 ,/* Width of the LCDHSYNC pulse */ + vl_left_margin:112 ,/* Idle cycles at the beginning of the line */ + vl_right_margin:1 ,/* Idle cycles at the end of the line */ + + mmio:AT91SAM9263_LCDC_BASE ,/* Memory mapped registers */ +};
<snip>
Quoted 21 lines
board/esd/otc570/otc570.c new file +21
-0+static void otc570_lcd_hw_init (void ) +{ +at91_set_A_periph (AT91_PIN_PC0 ,0 );/* LCDVSYNC */ +at91_set_A_periph (AT91_PIN_PC1 ,0 );/* LCDHSYNC */ +at91_set_A_periph (AT91_PIN_PC2 ,0 );/* LCDDOTCK */ +at91_set_A_periph (AT91_PIN_PC3 ,0 );/* LCDDEN */ +at91_set_B_periph (AT91_PIN_PB9 ,0 );/* LCDCC */ +at91_set_A_periph (AT91_PIN_PC6 ,0 );/* LCDD2 */ +at91_set_A_periph (AT91_PIN_PC7 ,0 );/* LCDD3 */ +at91_set_A_periph (AT91_PIN_PC8 ,0 );/* LCDD4 */ +at91_set_A_periph (AT91_PIN_PC9 ,0 );/* LCDD5 */ +at91_set_A_periph (AT91_PIN_PC10 ,0 );/* LCDD6 */ +at91_set_A_periph (AT91_PIN_PC11 ,0 );/* LCDD7 */ +at91_set_A_periph (AT91_PIN_PC14 ,0 );/* LCDD10 */ +at91_set_A_periph (AT91_PIN_PC15 ,0 );/* LCDD11 */ +at91_set_A_periph (AT91_PIN_PC16 ,0 );/* LCDD12 */ +at91_set_B_periph (AT91_PIN_PC12 ,0 );/* LCDD13 */ +at91_set_A_periph (AT91_PIN_PC18 ,0 );/* LCDD14 */ +at91_set_A_periph (AT91_PIN_PC19 ,0 );/* LCDD15 */ +at91_set_A_periph (AT91_PIN_PC22 ,0 );/* LCDD18 */ +at91_set_A_periph (AT91_PIN_PC23 ,0 );/* LCDD19 */
board/esd/otc570/otc570.c line 209
Quoted 10 lines
board/esd/otc570/otc570.c new file +10
-0+at91_set_A_periph (AT91_PIN_PC24 ,0 );/* LCDD20 */ +at91_set_B_periph (AT91_PIN_PC17 ,0 );/* LCDD21 */ +at91_set_A_periph (AT91_PIN_PC26 ,0 );/* LCDD22 */ +at91_set_A_periph (AT91_PIN_PC27 ,0 );/* LCDD23 */ +at91_set_gpio_output (AT91_PIN_PA30 ,1 );/* PCI */ + +at91_sys_write (AT91_PMC_PCER ,1 <<AT91SAM9263_ID_LCDC ); + +#ifndef CONFIG_FB_TO_SDRAM + gd->fb_base =AT91SAM9263_SRAM0_BASE ;
Should there be an #else ?
Quoted 3 lines
board/esd/otc570/otc570.c new file +3
-0+#endif +} +
<snip>
Quoted 6 lines
board/esd/otc570/otc570.c new file +6
-0+#ifdef CONFIG_MISC_INIT_R +int misc_init_r (void ) +{ +char str[64 ]; + +at91_set_gpio_output (AT91_PIN_PA29 ,1 );
board/esd/otc570/otc570.c line 311
Quoted 10 lines
board/esd/otc570/otc570.c new file +10
-0+at91_set_A_periph (AT91_PIN_PA26 ,1 );/* TXD0 */ +at91_set_A_periph (AT91_PIN_PA27 ,0 );/* RXD0 */ +at91_sys_write (AT91_PMC_PCER ,1 <<AT91SAM9263_ID_US0 ); +/* Set USART_MODE = 1 (RS485) */ +at91_sys_write ((0xFFF8C004 -AT91_BASE_SYS ),1 ); + +puts ("USART0: " ); + +if (getenv_r ("usart0" , str,sizeof (str)) ==-1 ) { +puts ("No entry - assuming 1-wire\n" );
Why are you mixing puts and printf ?
Quoted 6 lines
board/esd/otc570/otc570.c new file +6
-0+/* CTS pin, works as mode select pin (0 = 1-wire; 1 = RS485) */ +at91_set_gpio_output (AT91_PIN_PA29 ,0 ); + }else { +if (strcmp (str,"1-wire" ) ==0 ) { +printf ("%s\n" , str); +at91_set_gpio_output (AT91_PIN_PA29 ,0 );
board/esd/otc570/otc570.c line 327
Quoted 10 lines
board/esd/otc570/otc570.c new file +10
-0+ }else if (strcmp (str,"rs485" ) ==0 ) { +printf ("%s\n" , str); +at91_set_gpio_output (AT91_PIN_PA29 ,1 ); + }else { +puts ("Wrong entry - assuming 1-wire " ); +puts ("(valid values are '1-wire' or 'rs485')\n" ); +at91_set_gpio_output (AT91_PIN_PA29 ,0 ); + } + } +printf ("Display memory address: 0x%08lX\n" , gd->fb_base);
Above #ifndef may not set fb_base
Quoted 5 lines
board/esd/otc570/otc570.c new file +5
-0+ + return 0; +} +#endif /* CONFIG_MISC_INIT_R */ +
<snip>
Quoted 48 lines
board/esd/otc570/otc570.c new file +48
-0+ +/* +* U-Boot commands +*/ + +/* Set brightness */ +int do_blbright (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) +{ +unsigned long value =0xff ; + +if (argc >1 ) { + value =simple_strtoul (argv[1 ],NULL ,0 ); +if ((value >=0 ) && (value <=255 )) { +printf ("Writing value %02lX ..." , value); +__raw_writel (value, (panel_info.mmio + +ATMEL_LCDC_CONTRAST_VAL )); +puts ("done\n" ); + }else { +puts ("Invalid value! " ); +puts ("Valid values are 0 ... 255 or 0x0 ... 0xFF\n" ); +return -1 ; + } + }else { +puts ("No value given! " ); +puts ("Valid values are 0 ... 255 or 0x0 ... 0xFF\n" ); +return -1 ; + } +return 0 ; +} +U_BOOT_CMD ( + blbright,2 ,1 , do_blbright, +"sets display brightness" , +"\n" +); + +/* Switch backlight power */ +int do_blpower (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) +{ +int i =0 ; +if (argc >1 ) { + i = argv[1 ][0 ] =='0' ; +if (i) { +puts ("Switching backlight off... " ); +lcd_disable (); + }else { +puts ("Switching backlight on... " ); +lcd_enable (); + }
board/esd/otc570/otc570.c line 429
Quoted 10 lines
board/esd/otc570/otc570.c new file +10
-0+puts ("done\n" ); + }else +puts ("No value given!\n" ); +return 0 ; +} +U_BOOT_CMD ( + blpower,2 ,1 , do_blpower, +"switches display-backlight on or off" , +"\n" +);
These video commands look common enough that maybe they should go into common/* Is there anything that already does this?
<snip>
Quoted 6 lines
include/configs/otc570.h new file +0
-0
include/configs/otc570.h line 9
Quoted 9 lines
include/configs/otc570.h new file +9
-0@@ -0,0 +1,247 @@ +/* +* (C) Copyright 2007-2008 +* Stelian Pop <[email protected]> +* Lead Tech Design <www.leadtechdesign.com> +* +* (C) Copyright 2009 +* Daniel Gorsulowski <[email protected]> +* esd electronic system design gmbh <www.esd.eu> +*
New copyrights before old
swap.
Quoted 16 lines
include/configs/otc570.h new file +16
-0+* Configuation settings for the esd OTC570 board. +* +* See file CREDITS for list of people who contributed to this +* project. +* +* This program is free software; you can redistribute it and/or +* modify it under the terms of the GNU General Public License as +* published by the Free Software Foundation; either version 2 of +* the License, or (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License
include/configs/otc570.h line 35
Quoted 10 lines
include/configs/otc570.h new file +10
-0+* along with this program; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, +* MA 02111-1307 USA +*/ + +#ifndef __CONFIG_H +#define __CONFIG_H + +/* Common stuff */ +#define CONFIG_SYS_HZ 1000/* decrementer freq */
board and cpu defines first
Move CONFIG_SYS_HZ lower
Quoted 5 lines
include/configs/otc570.h new file +5
-0+#define CONFIG_OTC570 1/* Board is esd OTC570 */ +#define CONFIG_ARM926EJS 1/* This is an ARM926EJS Core */ +#define CONFIG_AT91SAM9263 1/* It's an AT91SAM9263 SoC */ +#define CONFIG_DISPLAY_BOARDINFO 1 +#define CONFIG_DISPLAY_CPUINFO 1/* display cpu info and speed */
<snip>
tools/Makefile endif · line 107
Quoted 10 lines
index 5b8c3c3..c91e19d 100644
tools/Makefile +3
-0@@ -102,6 +102,9 @@ endif ifeq ($(VENDOR),atmel) LOGO_BMP= logos/atmel.bmp endif +ifeq ($(VENDOR),esd) +LOGO_BMP= logos/esd.bmp +endif
There are a number of esd board.
Is this bmp ok for all of them ?
tools/logos/esd.bmp
Quoted 4 lines
tools/Makefile +0
-0ifeq ($(VENDOR),ronetix) LOGO_BMP= logos/ronetix.bmp endiftools/logos/esd.bmp +0
-0
This looks ok
Quoted 1 line
new file mode 100644
PATCH 1/1 at91: Add esd gmbh OTC570 board support
Hello Tom,
thanks for reviewing...
Quoted 9 lines · Tom
Quoted 4 lines · Daniel Gorsulowski
This patch adds support for esd gmbh OTC570 board. The OTC570 is based on an Atmel AT91SAM9263 SoC.
Signed-off-by Daniel Gorsulowski <[email protected]>For u-boot-video.
Maybe some u-boot commands that could be common.
<snip>
Quoted 53 lines
Quoted 53 lines
board/esd/otc570/otc570.c new file +53
-0+ +/* +* U-Boot commands +*/ + +/* Set brightness */ +int do_blbright (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) +{ +unsigned long value =0xff ; + +if (argc >1 ) { + value =simple_strtoul (argv[1 ],NULL ,0 ); +if ((value >=0 ) && (value <=255 )) { +printf ("Writing value %02lX ..." , value); +__raw_writel (value, (panel_info.mmio + +ATMEL_LCDC_CONTRAST_VAL )); +puts ("done\n" ); + }else { +puts ("Invalid value! " ); +puts ("Valid values are 0 ... 255 or 0x0 ... 0xFF\n" ); +return -1 ; + } + }else { +puts ("No value given! " ); +puts ("Valid values are 0 ... 255 or 0x0 ... 0xFF\n" ); +return -1 ; + } +return 0 ; +} +U_BOOT_CMD ( + blbright,2 ,1 , do_blbright, +"sets display brightness" , +"\n" +); + +/* Switch backlight power */ +int do_blpower (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) +{ +int i =0 ; +if (argc >1 ) { + i = argv[1 ][0 ] =='0' ; +if (i) { +puts ("Switching backlight off... " ); +lcd_disable (); + }else { +puts ("Switching backlight on... " ); +lcd_enable (); + } +puts ("done\n" ); + }else +puts ("No value given!\n" ); +return 0 ; +}
Quoted 9 lines
board/esd/otc570/otc570.c line 429
Quoted 5 lines
board/esd/otc570/otc570.c new file +5
-0+U_BOOT_CMD ( + blpower,2 ,1 , do_blpower, +"switches display-backlight on or off" , +"\n" +);These video commands look common enough that maybe they should go into common/* Is there anything that already does this?
I'll think about, how to make these commands common. Until then I can live without them, so I'll remove them for now.
<snip>
Quoted 5 lines
Quoted 5 lines
index 5b8c3c3..c91e19d 100644
tools/Makefile +0
-0@@ -102,6 +102,9 @@ endif ifeq ($(VENDOR),atmel)
Quoted 9 lines
tools/Makefile endif · line 107
Quoted 5 lines
tools/Makefile +3
-0LOGO_BMP= logos/atmel.bmp endif +ifeq ($(VENDOR),esd) +LOGO_BMP= logos/esd.bmp +endifThere are a number of esd board.
Is this bmp ok for all of them ?
Yes, this bmp is common for all esd boards that have a LCD and provide a bootup logo
Quoted 4 lines
tools/logos/esd.bmp
Quoted 4 lines
tools/Makefile +0
-0ifeq ($(VENDOR),ronetix) LOGO_BMP= logos/ronetix.bmp endiftools/logos/esd.bmp +0
-0
<snip>
All other other suggestions I applyed in v2.
Regards,
Daniel
PATCH 1/1 at91: Add esd gmbh OTC570 board support
Hi Daniel,
Quoted 77 lines
Hello Tom,
thanks for reviewing...
Quoted 9 lines · Tom
Quoted 4 lines · Daniel Gorsulowski
This patch adds support for esd gmbh OTC570 board. The OTC570 is based on an Atmel AT91SAM9263 SoC.
Signed-off-by Daniel Gorsulowski <[email protected]>For u-boot-video.
Maybe some u-boot commands that could be common.<snip>
Quoted 53 lines
Quoted 53 lines
board/esd/otc570/otc570.c new file +53
-0+ +/* +* U-Boot commands +*/ + +/* Set brightness */ +int do_blbright (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) +{ +unsigned long value =0xff ; + +if (argc >1 ) { + value =simple_strtoul (argv[1 ],NULL ,0 ); +if ((value >=0 ) && (value <=255 )) { +printf ("Writing value %02lX ..." , value); +__raw_writel (value, (panel_info.mmio + +ATMEL_LCDC_CONTRAST_VAL )); +puts ("done\n" ); + }else { +puts ("Invalid value! " ); +puts ("Valid values are 0 ... 255 or 0x0 ... 0xFF\n" ); +return -1 ; + } + }else { +puts ("No value given! " ); +puts ("Valid values are 0 ... 255 or 0x0 ... 0xFF\n" ); +return -1 ; + } +return 0 ; +} +U_BOOT_CMD ( + blbright,2 ,1 , do_blbright, +"sets display brightness" , +"\n" +); + +/* Switch backlight power */ +int do_blpower (cmd_tbl_t *cmdtp,int flag,int argc,char *argv[]) +{ +int i =0 ; +if (argc >1 ) { + i = argv[1 ][0 ] =='0' ; +if (i) { +puts ("Switching backlight off... " ); +lcd_disable (); + }else { +puts ("Switching backlight on... " ); +lcd_enable (); + } +puts ("done\n" ); + }else +puts ("No value given!\n" ); +return 0 ; +}Quoted 9 lines
board/esd/otc570/otc570.c line 429
Quoted 5 lines
board/esd/otc570/otc570.c new file +5
-0+U_BOOT_CMD ( + blpower,2 ,1 , do_blpower, +"switches display-backlight on or off" , +"\n" +);These video commands look common enough that maybe they should go into common/* Is there anything that already does this?
Quoted 2 lines
I'll think about, how to make these commands common. Until then I can live without them, so I'll remove them for now.
Indeed - if you (case insensitive) grep for "brightness", you will find lots of implementations to set a display brightness. Maybe we should setup common code and defer the implementation into a weak function? It seems that we have a good chance to merge lots of code here.
Cheers
Detlev
Signature · 8 lines
[Linux] USB consoles was a bad hack written on a drunken dare. I'm still
constantly amazed that the thing even works at all, let alone the fact that
people are actually using it :)
-- Greg KH <[email protected]>
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de