Leopold has quit [Remote host closed the connection]
<rfs613>
marex: for the rzn1 work, are you okay with leaving ddr_async.c under boards/ for the time being?
Leopold has joined #u-boot
<marex>
rfs613: I would really much rather see it in drivers/soc/ if possible
<rfs613>
marex: to put it there, I would need to add more kconfig symbols and whatnot, I'm a bit concerned about how long it will take to reach agreement on all that
<rfs613>
eg. should be it drivers/soc/renesas or schneider or rzn1 or...
<marex>
rfs613: drivers/soc/renesas/rzn1
<marex>
rfs613: that seems like the best option
<rfs613>
marex: okay. And the other topic is the free() of dynamica memory in mkimage. I did take a look at doing that properly, but it gets ugly very fast.
<marex>
rfs613: how big are the data ? can you allocate them on stack instead ?
<rfs613>
marex: not that big, but they are needed across multiple calls. Originally I had the as static globals, but you objected to that ;-0
<rfs613>
s/the/them/
mmu_man has quit [Ping timeout: 265 seconds]
<marex>
rfs613: isnt there some sort of structure to hold pointer to them that is passed around ?
<rfs613>
marex: the structure that gets passed around has a spot for the image header (which we use), but nothing for configuration file.
<rfs613>
many exisitng tools/*_image.c also use a config file, some are dynamically allocated (and they leak), some are static.
<marex>
rfs613: just a moment
runcom has joined #u-boot
runcom has quit [Read error: Connection reset by peer]
runcom has joined #u-boot
runcom has quit [Ping timeout: 240 seconds]
ldevulder has quit [Ping timeout: 264 seconds]
<marex>
rfs613: OK, I am here
<rfs613>
marex: me too (although my DSL has been quite unstable lately)
<rfs613>
(it seems I might have to upgrade to fiber as the local telco's don't want to fix their copper anymore)
<marex>
rfs613: OK, I am looking at the remaining stuff
<marex>
rfs613: so we have uh 5/10 which is the cadence driver, but that's trivial fixes ?
<marex>
rfs613: then 7/10 which is also trivial fix
<rfs613>
marex: yes I did the trivial fixes, and only replied to the two threads which we are discussing here also.
<marex>
rfs613: board/schneider/rzn1-snarc/ddr_async.c could be moved to drivers/soc/renesas/rzn1/ easily, no ?
<marex>
just add Makefile + Kconfig, you want to include this if ARCH_RZN1 is selected in any case, so no need for Kconfig syms
<marex>
the Kconfig file might not even be needed, or would just contain some 'source' statement
<rfs613>
marex: I was just trying that in fact, but it's not calling the probe() function in ddr_async anymore, causing dram_init() to fail. Debugging that now.
<marex>
hold on
<rfs613>
oh i forgot to add it to recurse into the drivers/soc/rzn1 makefile, whops
<marex>
rfs613: valgrind will complain about it for example
<rfs613>
marex: I had it as static global originally
<marex>
rfs613: so will lsan
<marex>
rfs613: yeah, I hoped there would be a better way than that, I was wrong, sorry
<rfs613>
marex: indeed valgrind complains. It likewise complains for severla other image formats which also have leaks.
<rfs613>
if we want to fix those, we will need to add a callback to perform image-specific deallocation. I have done that, I can post it for RFC, but if you go down to implement those functions for existing image formats, it quickly becomes quite messy.
<marex>
rfs613: separate patchset please, lets wrap this one up first
<rfs613>
marex: yes for sure!
Laurence_b has joined #u-boot
<marex>
rfs613: sorry for the abysmal delays
___nick___ has quit [Ping timeout: 240 seconds]
vagrantc has joined #u-boot
<rfs613>
marex: oops, i just posted an updated series, but forgot to increase from v5 to v6
<rfs613>
shall I post it again?
Laurence_b has quit [Quit: Client closed]
<rfs613>
(what i posted contains all the changes, i just forgot to set the right subject line)