All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sébastien Szymanski" <sebastien.szymanski@armadeus.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM: mx6ul: Apply ERR011115 errata workaround
Date: Fri, 20 Jul 2018 16:29:25 +0200	[thread overview]
Message-ID: <f5e5e0cf-2955-4a08-e2e5-7c41bd7e199f@armadeus.com> (raw)
In-Reply-To: <20180719113727.16805-1-m.niestroj@grinn-global.com>

Hi,

On 07/19/2018 01:37 PM, Marcin Niestroj wrote:
> ERR011115 in IMX6UL errata says to use OCRAM memory above
> 0x908000 (instead of 0x907000) for silicon revision 1.2 shipped
> prior date code 1740.
> 
> As we cannot check affected targets in runtime, apply that
> workaround by default for all IMX6UL platforms. Leave possibility
> to disable that workaround for non-affected targets, so more OCRAM
> area can be used by SPL (e.g. for featureful SPL images).
> 
> Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
> ---
>  arch/arm/mach-imx/mx6/Kconfig |  9 +++++++++
>  include/configs/imx6_spl.h    | 11 +++++++++--
>  2 files changed, 18 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig
> index 521fad74b5..61708a0526 100644
> --- a/arch/arm/mach-imx/mx6/Kconfig
> +++ b/arch/arm/mach-imx/mx6/Kconfig
> @@ -58,6 +58,15 @@ config MX6UL
>  	select SYSCOUNTER_TIMER
>  	bool
>  
> +config MX6UL_ERR011115
> +	bool "Workaround for ERR011115 in IMX6UL Errata"
> +	depends on MX6UL
> +	default MX6UL
> +	help
> +	  Say N here if you are sure that your platform is not affected
> +	  with ERR011115. Doing so might be useful in case of featureful
> +	  (big) SPL images.
> +
>  config MX6UL_LITESOM
>  	bool
>  	select MX6UL
> diff --git a/include/configs/imx6_spl.h b/include/configs/imx6_spl.h
> index 720ff045a7..42d12c7503 100644
> --- a/include/configs/imx6_spl.h
> +++ b/include/configs/imx6_spl.h
> @@ -19,16 +19,23 @@
>   *    which consists of a 4K header in front of us that contains the IVT, DCD
>   *    and some padding thus 'our' max size is really 0x00908000 - 0x00918000
>   *    or 64KB
> + *  - Use 0x00909000 as start of OCRAM Free Area as a workaround for
> + *    ERR011115 in IMX6UL Errata
>   */
> +#ifdef CONFIG_MX6UL_ERR011115
> +#define CONFIG_SPL_TEXT_BASE		0x00909000
> +#else
>  #define CONFIG_SPL_TEXT_BASE		0x00908000
> -#define CONFIG_SPL_MAX_SIZE		0x10000
> +#endif
> +
> +#define CONFIG_SPL_MAX_SIZE		(0x00918000 - CONFIG_SPL_TEXT_BASE)
>  #define CONFIG_SPL_STACK		0x0091FFB8
>  /*
>   * Pad SPL to 68KB (4KB header + 64KB max size). This allows to write the
>   * SPL/U-Boot combination generated with u-boot-with-spl.imx directly to a
>   * boot media (given that boot media specific offset is configured properly).
>   */
> -#define CONFIG_SPL_PAD_TO		0x11000
> +#define CONFIG_SPL_PAD_TO		(CONFIG_SPL_MAX_SIZE + 0x1000)

I got the following error when building the u-boot-with-spl.imx file:

/home/sszy/development/armadeus-git-opos6ul/buildroot/output/host/usr/bin/arm-linux-gnueabihf-objcopy:
--pad-to: bad number: (CONFIG_SPL_MAX_SIZE + 0x1000)

Anyway, this is wrong and will break the u-boot-with-spl.imx for MMC/SD
boot device.

The default offset for the U-Boot image on MMC/SD boot device is 69KB
(see SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR) so I think CONFIG_SPL_PAD_TO
should always be 0x11000 (== 68KB).

Regards,

>  
>  /* MMC support */
>  #if defined(CONFIG_SPL_MMC_SUPPORT)
> 


-- 
Sébastien Szymanski
Software engineer, Armadeus Systems
Tel: +33 (0)9 72 29 41 44
Fax: +33 (0)9 72 28 79 26

  parent reply	other threads:[~2018-07-20 14:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-19 11:37 [U-Boot] [PATCH] ARM: mx6ul: Apply ERR011115 errata workaround Marcin Niestroj
2018-07-19 18:27 ` Fabio Estevam
2018-07-20 14:29 ` Sébastien Szymanski [this message]
2018-07-20 15:46   ` Marcin Niestroj
2018-07-23  8:09 ` Stefano Babic
2018-07-24 13:20   ` Marcin Niestroj

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=f5e5e0cf-2955-4a08-e2e5-7c41bd7e199f@armadeus.com \
    --to=sebastien.szymanski@armadeus.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.