:: Re: [maemo-leste] [PATCH] Nokia RX-…
Página Principal
Delete this message
Reply to this message
Autor: Pali Rohár
Data:  
Para: Simon Glass
CC: Anatolij Gustschin, Tom Rini, U-Boot Mailing List, maemo-leste
Assunto: Re: [maemo-leste] [PATCH] Nokia RX-51: Convert to CONFIG_DM_VIDEO
On Sunday 06 March 2022 11:43:21 Simon Glass wrote:
> On Sun, 6 Mar 2022 at 08:09, Pali Rohár <pali@???> wrote:
> > -/*
> > - * Routine: video_hw_init
> > - * Description: Set up the GraphicDevice depending on sys_boot.
> > - */
> > -void *video_hw_init(void)
> > +static int rx51_video_probe(struct udevice *dev)
> >  {
> > -       /* fill in Graphic Device */
> > -       gdev.frameAdrs = 0x8f9c0000;
> > -       gdev.winSizeX = 800;
> > -       gdev.winSizeY = 480;
> > -       gdev.gdfBytesPP = 2;
> > -       gdev.gdfIndex = GDF_16BIT_565RGB;
> > -       memset((void *)gdev.frameAdrs, 0, 0xbb800);
> > -       return (void *) &gdev;
> > +       struct video_uc_plat *uc_plat = dev_get_uclass_plat(dev);
> > +       struct video_priv *uc_priv = dev_get_uclass_priv(dev);
> > +
> > +       uc_plat->base = 0x8f9c0000;

>
> How is this calculated?


I do not remember. This seems to be fixed address set by the code which
loads U-Boot. I do not have any notes about this stuff.

> > +       uc_plat->size = 800 * 480 * sizeof(u16);

>
> More correctly this should be in the bind() method, but in fact I
> don't think it matters. We can always adjust it later if needed.


Ok. I let it in probe, so all initialization is done at one place. If
something is needed to adjust, it can be done later.