[U-Boot] [PATCH] at91: Add esd gmbh OTC570 board support

Daniel Gorsulowski Daniel.Gorsulowski at esd.eu
Mon Jan 25 10:50:00 CET 2010


Hello Tom,

thanks for reviewing...

Tom wrote:
> Daniel Gorsulowski wrote:
>> This patch adds support for esd gmbh OTC570 board.
>> The OTC570 is based on an Atmel AT91SAM9263 SoC.
>>
>> Signed-off-by: Daniel Gorsulowski <Daniel.Gorsulowski at esd.eu>
> 
> For u-boot-video.
> Maybe some u-boot commands that could be common.
> 
<snip>
>> +
>> +/*
>> + * 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;
>> +}
>> +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>
>> index 5b8c3c3..c91e19d 100644
>> --- a/tools/Makefile
>> +++ b/tools/Makefile
>> @@ -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 ?
> 
Yes, this bmp is common for all esd boards that have a LCD and provide a bootup
logo
>>  ifeq ($(VENDOR),ronetix)
>>  LOGO_BMP= logos/ronetix.bmp
>>  endif
>> diff --git a/tools/logos/esd.bmp b/tools/logos/esd.bmp
<snip>

All other other suggestions I applyed in v2.

Regards,
Daniel


More information about the U-Boot mailing list