All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] arc: Move dram_init out of arch code, into board code
@ 2017-06-05 17:49 Alexandru Gagniuc
  2017-06-05 19:22 ` Alexey Brodkin
  0 siblings, 1 reply; 5+ messages in thread
From: Alexandru Gagniuc @ 2017-06-05 17:49 UTC (permalink / raw)
  To: u-boot

The following commit
f1683aa board_f: Rename initdram() to dram_init()
wrongly assumed that the lack of DRAM init is the property of the
architecture. In fact, it is only the AXS10x boards that do not need a
special raminit. Those assumptions are not true on the ARC SoC we're
looking at.

Move dram_init() to the board code to prevent a duplicate symbol.

Signed-off-by: Alexandru Gagniuc <alex.g@adaptrum.com>
---
 arch/arc/lib/cpu.c             | 6 ------
 board/synopsys/axs10x/axs10x.c | 6 ++++++
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arc/lib/cpu.c b/arch/arc/lib/cpu.c
index cb80893..d1f10ab 100644
--- a/arch/arc/lib/cpu.c
+++ b/arch/arc/lib/cpu.c
@@ -28,9 +28,3 @@ int arch_early_init_r(void)
 	gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE;
 	return 0;
 }
-
-/* This is a dummy function on arc */
-int dram_init(void)
-{
-	return 0;
-}
diff --git a/board/synopsys/axs10x/axs10x.c b/board/synopsys/axs10x/axs10x.c
index e6b69da..bd69502 100644
--- a/board/synopsys/axs10x/axs10x.c
+++ b/board/synopsys/axs10x/axs10x.c
@@ -91,3 +91,9 @@ void smp_kick_all_cpus(void)
 	writel(cmd, (void __iomem *)AXC003_CREG_CPU_START);
 }
 #endif
+
+/* This is a dummy function on AXS10x */
+int dram_init(void)
+{
+	return 0;
+}
-- 
2.9.3

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

* [U-Boot] [PATCH] arc: Move dram_init out of arch code, into board code
  2017-06-05 17:49 [U-Boot] [PATCH] arc: Move dram_init out of arch code, into board code Alexandru Gagniuc
@ 2017-06-05 19:22 ` Alexey Brodkin
  2017-06-05 20:00   ` Alexandru Gagniuc
  0 siblings, 1 reply; 5+ messages in thread
From: Alexey Brodkin @ 2017-06-05 19:22 UTC (permalink / raw)
  To: u-boot

Hi Alexandru,

On Mon, 2017-06-05 at 10:49 -0700, Alexandru Gagniuc wrote:
> The following commit
> f1683aa board_f: Rename initdram() to dram_init()
> wrongly assumed that the lack of DRAM init is the property of the
> architecture. In fact, it is only the AXS10x boards that do not need a
> special raminit. Those assumptions are not true on the ARC SoC we're
> looking at.

Actually there're more boards with ARC cores.
In particular nSIM for ARC700  and ARC HS38, as well as Abilis TB100.
So it might make sense to declare generic dram_init() in arch/arc/lib/cpu.c
as a weak function and add your own implementations as needed.

BTW since commit 80e4bbfcd92d "travisci: Add support for ARC"
you may push your changes to any github repo and have TravisCI building
for all ARC boards. This way you may at least test if stuff gets built
for all boards.

-Alexey

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

* [U-Boot] [PATCH] arc: Move dram_init out of arch code, into board code
  2017-06-05 19:22 ` Alexey Brodkin
@ 2017-06-05 20:00   ` Alexandru Gagniuc
  2017-06-15 19:21     ` Alexey Brodkin
  0 siblings, 1 reply; 5+ messages in thread
From: Alexandru Gagniuc @ 2017-06-05 20:00 UTC (permalink / raw)
  To: u-boot

On 06/05/2017 12:22 PM, Alexey Brodkin wrote:
> Hi Alexandru,
>
> On Mon, 2017-06-05 at 10:49 -0700, Alexandru Gagniuc wrote:
>> The following commit
>> f1683aa board_f: Rename initdram() to dram_init()
>> wrongly assumed that the lack of DRAM init is the property of the
>> architecture. In fact, it is only the AXS10x boards that do not need a
>> special raminit. Those assumptions are not true on the ARC SoC we're
>> looking at.
>
> Actually there're more boards with ARC cores.
> In particular nSIM for ARC700  and ARC HS38, as well as Abilis TB100.

Oops. Missed those. I'll have an updated patch later in the week.


> So it might make sense to declare generic dram_init() in arch/arc/lib/cpu.c
> as a weak function and add your own implementations as needed.

I disagree. The few saved lines of code to properly link the correct 
function are not worth the lost days when figuring out why my xyz() 
function is not doing the right thing.


> BTW since commit 80e4bbfcd92d "travisci: Add support for ARC"

I'll give that a try, thanks!

Alex

> -Alexey
>

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

* [U-Boot] [PATCH] arc: Move dram_init out of arch code, into board code
  2017-06-05 20:00   ` Alexandru Gagniuc
@ 2017-06-15 19:21     ` Alexey Brodkin
  2017-06-15 20:39       ` Alex
  0 siblings, 1 reply; 5+ messages in thread
From: Alexey Brodkin @ 2017-06-15 19:21 UTC (permalink / raw)
  To: u-boot

Hi Alexandru,

On Mon, 2017-06-05 at 13:00 -0700, Alexandru Gagniuc wrote:
> On 06/05/2017 12:22 PM, Alexey Brodkin wrote:
> > 
> > Hi Alexandru,
> > 
> > On Mon, 2017-06-05 at 10:49 -0700, Alexandru Gagniuc wrote:
> > > 
> > > The following commit
> > > f1683aa board_f: Rename initdram() to dram_init()
> > > wrongly assumed that the lack of DRAM init is the property of the
> > > architecture. In fact, it is only the AXS10x boards that do not need a
> > > special raminit. Those assumptions are not true on the ARC SoC we're
> > > looking at.
> > 
> > Actually there're more boards with ARC cores.
> > In particular nSIM for ARC700  and ARC HS38, as well as Abilis TB100.
> 
> Oops. Missed those. I'll have an updated patch later in the week.
> 
> 
> > 
> > So it might make sense to declare generic dram_init() in arch/arc/lib/cpu.c
> > as a weak function and add your own implementations as needed.
> 
> I disagree. The few saved lines of code to properly link the correct 
> function are not worth the lost days when figuring out why my xyz() 
> function is not doing the right thing.
> 
> 
> > 
> > BTW since commit 80e4bbfcd92d "travisci: Add support for ARC"
> 
> I'll give that a try, thanks!

Any progress with that one?
Or I'm missing your respin(s)?

-Alexey

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

* [U-Boot] [PATCH] arc: Move dram_init out of arch code, into board code
  2017-06-15 19:21     ` Alexey Brodkin
@ 2017-06-15 20:39       ` Alex
  0 siblings, 0 replies; 5+ messages in thread
From: Alex @ 2017-06-15 20:39 UTC (permalink / raw)
  To: u-boot

Hi Alexey,

On 06/15/2017 12:21 PM, Alexey Brodkin wrote:
> Any progress with that one?
> Or I'm missing your respin(s)?

You're not missing them. I got caught up with other things bringing up 
this SOC. I'm looking at enabling SPL and having a working boot path. I 
want to have a working solution instead of pushing out small patches and 
realizing later that I might have to revert some.

I'm currently waiting on the hardware team to enable all the requisite 
logic blocks. I'll make sure you'll be among the first to get the updates.

Alex

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

end of thread, other threads:[~2017-06-15 20:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-05 17:49 [U-Boot] [PATCH] arc: Move dram_init out of arch code, into board code Alexandru Gagniuc
2017-06-05 19:22 ` Alexey Brodkin
2017-06-05 20:00   ` Alexandru Gagniuc
2017-06-15 19:21     ` Alexey Brodkin
2017-06-15 20:39       ` Alex

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.