From: "Sascha Hauer" <s.hauer@pengutronix.de>
To: "Luca Lauro via B4 Relay" <devnull+famlauro93l.gmail.com@kernel.org>
Cc: "open list:BAREBOX" <barebox@lists.infradead.org>,
"Luca Lauro" <famlauro93l@gmail.com>
Subject: Re: [PATCH 02/19] ARM: mvebu: add lowlevel support for Netgear RN102
Date: Mon, 27 Jul 2026 13:30:56 +0000 [thread overview]
Message-ID: <E1woLQ1-00000007IaB-0w2q@pty.whiteo.stw.pengutronix.de> (raw)
In-Reply-To: <20260723-rn102-rn104-series-v1-2-7698d25df866@gmail.com>
On 2026-07-23 15:57, Luca Lauro via B4 Relay wrote:
> From: Luca Lauro <famlauro93l@gmail.com>
>
> ---
> arch/arm/boards/netgear-rn102/lowlevel.c | 49 ++++++++++++++++++++++++++++++++
> 1 file changed, 49 insertions(+)
>
> diff --git a/arch/arm/boards/netgear-rn102/lowlevel.c b/arch/arm/boards/netgear-rn102/lowlevel.c
> new file mode 100644
> index 0000000000..11130eabbc
> --- /dev/null
> +++ b/arch/arm/boards/netgear-rn102/lowlevel.c
> @@ -0,0 +1,49 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +
> +#include <common.h>
> +#include <asm/barebox-arm.h>
> +#include <mach/mvebu/lowlevel.h>
> +#include <mach/mvebu/barebox-arm-head.h>
> +#include <mach/mvebu/armada-370-xp-regs.h>
> +
> +extern char __dtb_armada_370_rn102_bb_start[];
> +
> +#define INTERNAL_REG_BASE_ADDR 0x20080
> +
> +static __always_inline void mvebu_remap_registers(void)
> +{
> + void __iomem *base = mvebu_get_initial_int_reg_base();
> +
> + writel(MVEBU_REMAP_INT_REG_BASE, base + INTERNAL_REG_BASE_ADDR);
> +}
> +
> +static unsigned long armada_370_xp_memory_find(void)
> +{
> + unsigned long mem_size = 0;
> +
> + for (int cs = 0; cs < 4; cs++) {
> + u32 ctrl = readl(ARMADA_370_XP_SDRAM_BASE + DDR_SIZE_CSn(cs));
> +
> + /* Skip non-enabled CS */
> + if ((ctrl & DDR_SIZE_ENABLED) != DDR_SIZE_ENABLED)
> + continue;
> +
> + mem_size += (ctrl | ~DDR_SIZE_MASK) + 1;
> + }
> +
> + return mem_size;
> +}
> +
> +ENTRY_FUNCTION_MVEBU(start_netgear_rn102, r0, r1, r2)
> +{
> + void *fdt;
> +
> + arm_cpu_lowlevel_init();
> +
> + fdt = __dtb_armada_370_rn102_bb_start +
> + get_runtime_offset();
> +
> + mvebu_remap_registers();
> + barebox_arm_entry(0, armada_370_xp_memory_find(), fdt);
> + // armada_370_xp_barebox_entry(fdt);
Why can't you use armada_370_xp_barebox_entry()? I assume that wrongly
detects the amount of memory. If that's the case the preferred way would
be to fix the SDRAM detection code. If that's not feasible, please leave
an explanation in the code why it doesn't work and drop the commented
out call.
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2026-07-27 13:32 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-23 13:57 [PATCH 00/19] ARM: mvebu: add Netgear RN102/RN104 support and related drivers Luca Lauro via B4 Relay
2026-07-23 13:57 ` [PATCH 01/19] ARM: mvebu: add board support for Netgear RN102 Luca Lauro via B4 Relay
2026-07-27 13:27 ` Sascha Hauer
2026-07-23 13:57 ` [PATCH 02/19] ARM: mvebu: add lowlevel " Luca Lauro via B4 Relay
2026-07-27 13:30 ` Sascha Hauer [this message]
2026-07-23 13:57 ` [PATCH 03/19] ARM: dts: add barebox device tree " Luca Lauro via B4 Relay
2026-07-27 13:32 ` Sascha Hauer
2026-07-23 13:57 ` [PATCH 04/19] ARM: dts: update RN102 Linux DTS Luca Lauro via B4 Relay
2026-07-27 13:40 ` Sascha Hauer
2026-07-27 13:41 ` Sascha Hauer
2026-07-23 13:57 ` [PATCH 05/19] ARM: mvebu: add Kconfig entry for Netgear RN102 Luca Lauro via B4 Relay
2026-07-23 13:57 ` [PATCH 06/19] ARM: mvebu: add RN102 image support Luca Lauro via B4 Relay
2026-07-23 13:57 ` [PATCH 07/19] ARM: mvebu: enable RN102 in mvebu_defconfig Luca Lauro via B4 Relay
2026-07-23 13:57 ` [PATCH 08/19] ARM: mvebu: rn104: placeholder bay management Luca Lauro via B4 Relay
2026-07-23 13:57 ` [PATCH 09/19] ARM: mvebu: add lowlevel support for Netgear RN104 Luca Lauro via B4 Relay
2026-07-23 13:57 ` [PATCH 10/19] ARM: dts: update RN104 Linux DTS Luca Lauro via B4 Relay
2026-07-23 13:57 ` [PATCH 11/19] ARM: mvebu: adapt RN104 image support Luca Lauro via B4 Relay
2026-07-23 13:57 ` [PATCH 12/19] ARM: mvebu: rename PUTC_LL to MVEBU_PUTC_LL Luca Lauro via B4 Relay
2026-07-27 13:46 ` Sascha Hauer
2026-07-23 13:57 ` [PATCH 13/19] drivers: fan: add fan framework and API Luca Lauro via B4 Relay
2026-07-23 13:57 ` [PATCH 14/19] commands: add fan control command Luca Lauro via B4 Relay
2026-07-23 13:57 ` [PATCH 15/19] commands: integrate fan command into Kconfig and Makefile Luca Lauro via B4 Relay
2026-07-23 13:57 ` [PATCH 16/19] usb: ehci: add Marvell EHCI host controller driver Luca Lauro via B4 Relay
2026-07-27 14:09 ` Sascha Hauer
2026-07-23 13:57 ` [PATCH 17/19] usb: ehci: minor fixes for Marvell compatibility Luca Lauro via B4 Relay
2026-07-27 14:12 ` Sascha Hauer
2026-07-23 13:57 ` [PATCH 18/19] ata: ahci: fixes and updates for Marvell SATA controller Luca Lauro via B4 Relay
2026-07-27 14:15 ` Sascha Hauer
2026-07-23 13:57 ` [PATCH 19/19] drivers: integrate USB/AHCI changes Luca Lauro via B4 Relay
2026-07-27 14:16 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1woLQ1-00000007IaB-0w2q@pty.whiteo.stw.pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=devnull+famlauro93l.gmail.com@kernel.org \
--cc=famlauro93l@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox