All of lore.kernel.org
 help / color / mirror / Atom feed
* Zynq UltraScale MPSoC, DMA driver
@ 2021-06-07 16:27 Jorge Ramirez-Ortiz, Foundries
  2021-06-07 18:41 ` Jorge Ramirez-Ortiz, Foundries
  0 siblings, 1 reply; 6+ messages in thread
From: Jorge Ramirez-Ortiz, Foundries @ 2021-06-07 16:27 UTC (permalink / raw)
  To: michal.simek; +Cc: u-boot

hi Michal

um, when we exchanged emails about enabling ECC support for MPSoC, I
left with the understanding that there already was a DMA driver
available in u-boot that I could use to initialize the memory.

do you have something in the works or will I have to write such a
driver? compatible would be 'xlnx,zynqmp-dma-1.0'

TIA
Jorge

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

* Re: Zynq UltraScale MPSoC, DMA driver
  2021-06-07 16:27 Zynq UltraScale MPSoC, DMA driver Jorge Ramirez-Ortiz, Foundries
@ 2021-06-07 18:41 ` Jorge Ramirez-Ortiz, Foundries
  2021-06-08 11:04   ` Michal Simek
  0 siblings, 1 reply; 6+ messages in thread
From: Jorge Ramirez-Ortiz, Foundries @ 2021-06-07 18:41 UTC (permalink / raw)
  To: Jorge Ramirez-Ortiz, Foundries; +Cc: michal.simek, u-boot

On 07/06/21, Jorge Ramirez-Ortiz, Foundries wrote:
> hi Michal
> 
> um, when we exchanged emails about enabling ECC support for MPSoC, I
> left with the understanding that there already was a DMA driver
> available in u-boot that I could use to initialize the memory.
> 
> do you have something in the works or will I have to write such a
> driver? compatible would be 'xlnx,zynqmp-dma-1.0'

alternatively, would it be acceptable - upstream - If I just init ECC
as done by FSBL (ie, without a proper DMA driver, just accessing the
controller)?


> 
> TIA
> Jorge

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

* Re: Zynq UltraScale MPSoC, DMA driver
  2021-06-07 18:41 ` Jorge Ramirez-Ortiz, Foundries
@ 2021-06-08 11:04   ` Michal Simek
  2021-06-08 12:30     ` Jorge Ramirez-Ortiz, Foundries
  0 siblings, 1 reply; 6+ messages in thread
From: Michal Simek @ 2021-06-08 11:04 UTC (permalink / raw)
  To: Jorge Ramirez-Ortiz, Foundries; +Cc: michal.simek, u-boot

Hi,

On 6/7/21 8:41 PM, Jorge Ramirez-Ortiz, Foundries wrote:
> On 07/06/21, Jorge Ramirez-Ortiz, Foundries wrote:
>> hi Michal
>>
>> um, when we exchanged emails about enabling ECC support for MPSoC, I
>> left with the understanding that there already was a DMA driver
>> available in u-boot that I could use to initialize the memory.
>>
>> do you have something in the works or will I have to write such a
>> driver? compatible would be 'xlnx,zynqmp-dma-1.0'
> 
> alternatively, would it be acceptable - upstream - If I just init ECC
> as done by FSBL (ie, without a proper DMA driver, just accessing the
> controller)?

There are 2 things here.
The first thing that would be the best to do it proper framework which
is likely dma where dma_memset should be likely added.
The second that this code should land in SPL which can't be big that's
why this feature should be very small.

Based on above I think that would be good to have long term both of them
in the tree. It means feel free to send short version and let's look at
it and dma one should be hopefully pretty much using the same code via
dma framework.

Thanks,
Michal


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

* Re: Zynq UltraScale MPSoC, DMA driver
  2021-06-08 11:04   ` Michal Simek
@ 2021-06-08 12:30     ` Jorge Ramirez-Ortiz, Foundries
  2021-06-08 12:33       ` Jorge Ramirez-Ortiz, Foundries
  2021-06-09  9:55       ` Michal Simek
  0 siblings, 2 replies; 6+ messages in thread
From: Jorge Ramirez-Ortiz, Foundries @ 2021-06-08 12:30 UTC (permalink / raw)
  To: Michal Simek; +Cc: Jorge Ramirez-Ortiz, Foundries, u-boot

On 08/06/21, Michal Simek wrote:
> Hi,
> 
> On 6/7/21 8:41 PM, Jorge Ramirez-Ortiz, Foundries wrote:
> > On 07/06/21, Jorge Ramirez-Ortiz, Foundries wrote:
> >> hi Michal
> >>
> >> um, when we exchanged emails about enabling ECC support for MPSoC, I
> >> left with the understanding that there already was a DMA driver
> >> available in u-boot that I could use to initialize the memory.
> >>
> >> do you have something in the works or will I have to write such a
> >> driver? compatible would be 'xlnx,zynqmp-dma-1.0'
> > 
> > alternatively, would it be acceptable - upstream - If I just init ECC
> > as done by FSBL (ie, without a proper DMA driver, just accessing the
> > controller)?
> 
> There are 2 things here.
> The first thing that would be the best to do it proper framework which
> is likely dma where dma_memset should be likely added.
> The second that this code should land in SPL which can't be big that's
> why this feature should be very small.

the way I am doing it ATM is just a verbatim of XFsbl_EccInit (grabs a
channel and inits all memory to DEADBEEF). About 100 LOC total.

I belive the FSBL copyright notice allows for that (below excerpt).

[..] Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so,  [..]

but yes this just works as expected.

a bit trickier is where to init from - for the particular product
I am working on I can hardcode the addresses and sizes and init right
after board_init_f in spl.c...havent had the time to think about
something portable yet - if you have a suggestion I could send both
patches (one for the spl_ecc_init(addr, len) function and another one
calling it)

thanks for your inputs

> 
> Based on above I think that would be good to have long term both of them
> in the tree. It means feel free to send short version and let's look at
> it and dma one should be hopefully pretty much using the same code via
> dma framework.
> 
> Thanks,
> Michal
> 

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

* Re: Zynq UltraScale MPSoC, DMA driver
  2021-06-08 12:30     ` Jorge Ramirez-Ortiz, Foundries
@ 2021-06-08 12:33       ` Jorge Ramirez-Ortiz, Foundries
  2021-06-09  9:55       ` Michal Simek
  1 sibling, 0 replies; 6+ messages in thread
From: Jorge Ramirez-Ortiz, Foundries @ 2021-06-08 12:33 UTC (permalink / raw)
  To: Jorge Ramirez-Ortiz, Foundries; +Cc: Michal Simek, u-boot

On 08/06/21, Jorge Ramirez-Ortiz, Foundries wrote:
> On 08/06/21, Michal Simek wrote:
> > Hi,
> > 
> > On 6/7/21 8:41 PM, Jorge Ramirez-Ortiz, Foundries wrote:
> > > On 07/06/21, Jorge Ramirez-Ortiz, Foundries wrote:
> > >> hi Michal
> > >>
> > >> um, when we exchanged emails about enabling ECC support for MPSoC, I
> > >> left with the understanding that there already was a DMA driver
> > >> available in u-boot that I could use to initialize the memory.
> > >>
> > >> do you have something in the works or will I have to write such a
> > >> driver? compatible would be 'xlnx,zynqmp-dma-1.0'
> > > 
> > > alternatively, would it be acceptable - upstream - If I just init ECC
> > > as done by FSBL (ie, without a proper DMA driver, just accessing the
> > > controller)?
> > 
> > There are 2 things here.
> > The first thing that would be the best to do it proper framework which
> > is likely dma where dma_memset should be likely added.
> > The second that this code should land in SPL which can't be big that's
> > why this feature should be very small.
> 
> the way I am doing it ATM is just a verbatim of XFsbl_EccInit (grabs a
> channel and inits all memory to DEADBEEF). About 100 LOC total.

1:1 when ported to SPL (except the coding standards)
https://github.com/Xilinx/embeddedsw/blob/master/lib/sw_apps/zynqmp_fsbl/src/xfsbl_initialization.c#L1574

> 
> I belive the FSBL copyright notice allows for that (below excerpt).
> 
> [..] Permission is hereby granted, free of charge, to any person obtaining a copy
>  of this software and associated documentation files (the "Software"), to deal
>  in the Software without restriction, including without limitation the rights
>  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
>  copies of the Software, and to permit persons to whom the Software is
>  furnished to do so,  [..]
> 
> but yes this just works as expected.
> 
> a bit trickier is where to init from - for the particular product
> I am working on I can hardcode the addresses and sizes and init right
> after board_init_f in spl.c...havent had the time to think about
> something portable yet - if you have a suggestion I could send both
> patches (one for the spl_ecc_init(addr, len) function and another one
> calling it)
> 
> thanks for your inputs
> 
> > 
> > Based on above I think that would be good to have long term both of them
> > in the tree. It means feel free to send short version and let's look at
> > it and dma one should be hopefully pretty much using the same code via
> > dma framework.
> > 
> > Thanks,
> > Michal
> > 

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

* Re: Zynq UltraScale MPSoC, DMA driver
  2021-06-08 12:30     ` Jorge Ramirez-Ortiz, Foundries
  2021-06-08 12:33       ` Jorge Ramirez-Ortiz, Foundries
@ 2021-06-09  9:55       ` Michal Simek
  1 sibling, 0 replies; 6+ messages in thread
From: Michal Simek @ 2021-06-09  9:55 UTC (permalink / raw)
  To: Jorge Ramirez-Ortiz, Foundries, Michal Simek; +Cc: u-boot



On 6/8/21 2:30 PM, Jorge Ramirez-Ortiz, Foundries wrote:
> On 08/06/21, Michal Simek wrote:
>> Hi,
>>
>> On 6/7/21 8:41 PM, Jorge Ramirez-Ortiz, Foundries wrote:
>>> On 07/06/21, Jorge Ramirez-Ortiz, Foundries wrote:
>>>> hi Michal
>>>>
>>>> um, when we exchanged emails about enabling ECC support for MPSoC, I
>>>> left with the understanding that there already was a DMA driver
>>>> available in u-boot that I could use to initialize the memory.
>>>>
>>>> do you have something in the works or will I have to write such a
>>>> driver? compatible would be 'xlnx,zynqmp-dma-1.0'
>>>
>>> alternatively, would it be acceptable - upstream - If I just init ECC
>>> as done by FSBL (ie, without a proper DMA driver, just accessing the
>>> controller)?
>>
>> There are 2 things here.
>> The first thing that would be the best to do it proper framework which
>> is likely dma where dma_memset should be likely added.
>> The second that this code should land in SPL which can't be big that's
>> why this feature should be very small.
> 
> the way I am doing it ATM is just a verbatim of XFsbl_EccInit (grabs a
> channel and inits all memory to DEADBEEF). About 100 LOC total.
> 
> I belive the FSBL copyright notice allows for that (below excerpt).
> 
> [..] Permission is hereby granted, free of charge, to any person obtaining a copy
>  of this software and associated documentation files (the "Software"), to deal
>  in the Software without restriction, including without limitation the rights
>  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
>  copies of the Software, and to permit persons to whom the Software is
>  furnished to do so,  [..]
> 
> but yes this just works as expected.

You should talk to lawyer about it and I can't give you any
recommendation about it.

> 
> a bit trickier is where to init from - for the particular product
> I am working on I can hardcode the addresses and sizes and init right
> after board_init_f in spl.c...havent had the time to think about
> something portable yet - if you have a suggestion I could send both
> patches (one for the spl_ecc_init(addr, len) function and another one
> calling it)

SPL dtb doesn't have memory node which is a surprise. But I expect ECC
is working on the memory which is written first. I am OK with adding
memory base/size for ECC to Kconfig till someone has time to take a look
at memory controller registers to find out which one has size in it that
can be read and use.

Thanks,
Michal

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

end of thread, other threads:[~2021-06-09  9:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-07 16:27 Zynq UltraScale MPSoC, DMA driver Jorge Ramirez-Ortiz, Foundries
2021-06-07 18:41 ` Jorge Ramirez-Ortiz, Foundries
2021-06-08 11:04   ` Michal Simek
2021-06-08 12:30     ` Jorge Ramirez-Ortiz, Foundries
2021-06-08 12:33       ` Jorge Ramirez-Ortiz, Foundries
2021-06-09  9:55       ` Michal Simek

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.