All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Harvey <tharvey@gateworks.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 2/5] configs: Add imx8mm-common header
Date: Tue, 16 Mar 2021 08:52:53 -0700	[thread overview]
Message-ID: <CAJ+vNU1V9yqgCig2+3sEVLmhEqYp_h1ed8=wuxjij2KP2Bp+Qw@mail.gmail.com> (raw)
In-Reply-To: <20210315174543.104002-3-jagan@amarulasolutions.com>

On Mon, Mar 15, 2021 at 10:46 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> Move the redundant config item like SPL, memory-related
> across all imx8mm config files in the common config header,
> imx8mm-common.h
>
> Verified the built files, seems almost the same as before.
>
> Cc: Tim Harvey <tharvey@gateworks.com>
> Cc: Adam Ford <aford173@gmail.com>
> Cc: Peng Fan <peng.fan@nxp.com>
> Cc: Teresa Remmet <t.remmet@phytec.de>
> Cc: Igor Opaniuk <igor.opaniuk@toradex.com>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
> Changes for v2:
> - add venice changes
>
>  include/configs/imx8mm-common.h  | 48 ++++++++++++++++++++++++++++++++
>  include/configs/imx8mm_beacon.h  | 48 ++++----------------------------
>  include/configs/imx8mm_evk.h     | 45 ++----------------------------
>  include/configs/imx8mm_venice.h  | 46 ++++--------------------------
>  include/configs/phycore_imx8mm.h | 43 ++--------------------------
>  include/configs/verdin-imx8mm.h  | 42 +++-------------------------
>  6 files changed, 68 insertions(+), 204 deletions(-)
>  create mode 100644 include/configs/imx8mm-common.h
>
> diff --git a/include/configs/imx8mm-common.h b/include/configs/imx8mm-common.h
> new file mode 100644
> index 0000000000..f1afa5c5a9
> --- /dev/null
> +++ b/include/configs/imx8mm-common.h
> @@ -0,0 +1,48 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/*
> + * Copyright (c) 2019 NXP
> + * Copyright (c) 2020 Amarula Solutions(India)
> + */
> +
> +#ifndef __IMX8MM_COMMON_H
> +#define __IMX8MM_COMMON_H
> +
> +#include <linux/sizes.h>
> +#include <asm/arch/imx-regs.h>
> +
> +#ifdef CONFIG_SPL_BUILD
> +#define CONFIG_SPL_MAX_SIZE            (148 * 1024)
> +#define CONFIG_SPL_STACK               0x920000
> +#define CONFIG_SPL_BSS_START_ADDR      0x910000
> +#define CONFIG_SPL_BSS_MAX_SIZE                SZ_8K
> +#define CONFIG_SYS_SPL_MALLOC_START    0x42200000
> +#define CONFIG_SYS_SPL_MALLOC_SIZE     SZ_512K

Jagan,

Seems like a good idea, thanks for your work here!

I ran into an issue with imx8mm-venice due to my FIT image being
larger than 512KiB causing me to bump CONFIG_SYS_SPL_MALLOC_SIZE (I
bumped to 1MiB).

I have a pending patch for that [1] which would collide with this and
I wonder what your feelings are about SYS_SPL_MALLOC_SIZE. When I
started work on imx8mm-venice support the SPL did not use a malloc
buffer for loading the FIT image so I never ran into an issue but that
changed with  commit 03f1f78a9b44 ("spl: fit: Prefer a malloc()'d
buffer for loading images")' and after that I was not able to load my
FIT image. I'm honestly not sure how the other imx8mm boards are not
affected unless they just barely fit with a 512K malloc pool.

I'm not sure what the downside would be to doubling it to 1MiB or even
more and I would be boards using FIT with multiple dtb's would go over
512KiB pretty quickly (as opposed to having to undef and re-define it
per board).

Best regards,

Tim
[1] http://patchwork.ozlabs.org/project/uboot/patch/20210308215236.27722-2-tharvey at gateworks.com/

  reply	other threads:[~2021-03-16 15:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15 17:45 [PATCH v2 0/5] board: imx8mm: Add Engicam i.Core MX8M Mini SoM Jagan Teki
2021-03-15 17:45 ` [PATCH v2 1/5] arm64: dts: imx8mm: Add common -u-boot.dtsi Jagan Teki
2021-04-08  2:12   ` Peng Fan
2021-04-08  9:05     ` Stefano Babic
2021-04-08  9:09       ` Jagan Teki
2021-03-15 17:45 ` [PATCH v2 2/5] configs: Add imx8mm-common header Jagan Teki
2021-03-16 15:52   ` Tim Harvey [this message]
2021-03-15 17:45 ` [PATCH v2 3/5] arm64: dts: imx8mm: Add Engicam i.Core MX8M Mini SoM Jagan Teki
2021-03-15 17:45 ` [PATCH v2 4/5] board: imx8mm: Add Engicam i.Core MX8M Mini EDIMM2.2 Starter Kit Jagan Teki
2021-03-15 17:45 ` [PATCH v2 5/5] board: imx8mm: Add Engicam i.Core MX8M Mini C.TOUCH 2.0 Jagan Teki
2021-04-07 11:57 ` [PATCH v2 0/5] board: imx8mm: Add Engicam i.Core MX8M Mini SoM Jagan Teki

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='CAJ+vNU1V9yqgCig2+3sEVLmhEqYp_h1ed8=wuxjij2KP2Bp+Qw@mail.gmail.com' \
    --to=tharvey@gateworks.com \
    --cc=u-boot@lists.denx.de \
    /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 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.