[U-Boot] [PATCH 2/3] video: add support for display controller in MB86R0x SoCs

Matthias Weißer weisserm at arcor.de
Thu Apr 22 15:03:55 CEST 2010


Am 22.04.2010 14:41, schrieb Wolfgang Denk:
> Dear Matthias Weisser,
>
> In message<1271932257-14618-3-git-send-email-weisserm at arcor.de>  you wrote:
>> This patch adds support for the display controller in
>> the MB86R0x SoCs.
>>
>> Signed-off-by: Matthias Weisser<weisserm at arcor.de>
> ...
>> +	pGD->memSize = VIDEO_MEM_SIZE;
>> +	pGD->frameAdrs = PHYS_SDRAM + PHYS_SDRAM_SIZE - VIDEO_MEM_SIZE;
>
> Please pay attention to the global memory map requirements. PRAM might
> go first.
>
>
>> +		writel(dcm1, dspBase[i] + GC_DCM1);
>> +		writel(dcm2, dspBase[i] + GC_DCM2);
>> +		writel(dcm3, dspBase[i] + GC_DCM3);
>> +
>> +		writew(htp, dspBase[i] + GC_HTP);
>> +		writew(hdp, dspBase[i] + GC_HDP);
>> +		writew(hdb, dspBase[i] + GC_HDB);
>> +		writew(hsp, dspBase[i] + GC_HSP);
>> +		writeb(hsw, dspBase[i] + GC_HSW);
>> +
>> +		writeb(vsw, dspBase[i] + GC_VSW);
>> +		writew(vtr, dspBase[i] + GC_VTR);
>> +		writew(vsp, dspBase[i] + GC_VSP);
>> +		writew(vdp, dspBase[i] + GC_VDP);
>> +
>> +		writel(l2m, dspBase[i] + GC_L2M);
>> +		writel(l2em, dspBase[i] + GC_L2EM);
>> +		writel(l2oa0, dspBase[i] + GC_L2OA0);
>> +		writel(l2da0, dspBase[i] + GC_L2DA0);
>> +		writel(l2oa1, dspBase[i] + GC_L2OA1);
>> +		writel(l2da1, dspBase[i] + GC_L2DA1);
>> +		writew(l2dx, dspBase[i] + GC_L2DX);
>> +		writew(l2dy, dspBase[i] + GC_L2DY);
>> +		writew(l2wx, dspBase[i] + GC_L2WX);
>> +		writew(l2wy, dspBase[i] + GC_L2WY);
>> +		writew(l2ww, dspBase[i] + GC_L2WW);
>> +		writew(l2wh, dspBase[i] + GC_L2WH);
>> +
>> +		writel(dcm1 | (1<<  18) | (1<<  31), dspBase[i] + GC_DCM1);
>
> Please use a C struct instead.

This driver is mainly copied from mb862xx (sharing the header as offsets 
are the same) and that was the approach used there. I will add the 
structures and use them.

>> +/*
>> + * Set a RGB color in the LUT
>> + */
>> +void video_set_lut(unsigned int index, unsigned char r,
>> +					unsigned char g, unsigned char b)
>> +{
>> +
>> +}
>
> Code seems to be missing?

The driver doesn't support palletized color format at the moment but 
removing this function leads to a linker error.

Maybe we should add a config option to disable palletized color format 
or add a weak function somewhere. Maybe Anatolij can comment on this 
issue also.

Regards,
Matthias


More information about the U-Boot mailing list