All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] a question about the source of uboot(for armv8).
@ 2017-02-15 11:57 =?gb18030?B?y67W0NPQwOE=?=
  2017-07-21  9:56 ` Jean-Jacques Hiblot
  0 siblings, 1 reply; 2+ messages in thread
From: =?gb18030?B?y67W0NPQwOE=?= @ 2017-02-15 11:57 UTC (permalink / raw)
  To: u-boot

Hi Haikun Wang,

I have a question about the source of uboot.

http://lists.denx.de/pipermail/u-boot/2015-June/217446.html
>u32 __iomem *dcfg_ccsr = (u32 __iomem *)DCFG_BASE;
>val = in_le32(dcfg_ccsr + DCFG_RCWSR13 / 4);

 

The question is this,

why does DCFG_RCWSR13 device by 4.

 

(1)dcfg_ccsr is the base address of Dcfg_ccsr

(2)DCFG_RCWSR13 is the offset of Dcfg_rcwsr13

So I think the next is right

>val = in_le32(dcfg_ccsr + DCFG_RCWSR13);




Pardon me my clumsiness.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot] a question about the source of uboot(for armv8).
  2017-02-15 11:57 [U-Boot] a question about the source of uboot(for armv8) =?gb18030?B?y67W0NPQwOE=?=
@ 2017-07-21  9:56 ` Jean-Jacques Hiblot
  0 siblings, 0 replies; 2+ messages in thread
From: Jean-Jacques Hiblot @ 2017-07-21  9:56 UTC (permalink / raw)
  To: u-boot



On 15/02/2017 12:57, 水中有泪 wrote:
> Hi Haikun Wang,
>
> I have a question about the source of uboot.
>
> http://lists.denx.de/pipermail/u-boot/2015-June/217446.html
>> u32 __iomem *dcfg_ccsr = (u32 __iomem *)DCFG_BASE;
>> val = in_le32(dcfg_ccsr + DCFG_RCWSR13 / 4);
>   
>
> The question is this,
>
> why does DCFG_RCWSR13 device by 4.
because dcfg_ccsr is defined as u32* (pointer to a 32 bits integer).
If dcfg_ccsr had been declared as a u8* or a void*, then the division by 
4 would have not been needed.
JJ
>
>   
>
> (1)dcfg_ccsr is the base address of Dcfg_ccsr
>
> (2)DCFG_RCWSR13 is the offset of Dcfg_rcwsr13
>
> So I think the next is right
>
>> val = in_le32(dcfg_ccsr + DCFG_RCWSR13);
>
>
>
> Pardon me my clumsiness.
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-21  9:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-15 11:57 [U-Boot] a question about the source of uboot(for armv8) =?gb18030?B?y67W0NPQwOE=?=
2017-07-21  9:56 ` Jean-Jacques Hiblot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.