From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mtd: nand: mxs: fix cache alignment for cache lines >32
Date: Tue, 2 Aug 2016 10:17:52 +0200 [thread overview]
Message-ID: <bf6ec65a-6d56-27d4-4692-13bb63a9bdd2@denx.de> (raw)
In-Reply-To: <20160802065518.24140-1-stefan@agner.ch>
Hi Stefan,
On 02/08/2016 08:55, Stefan Agner wrote:
> From: Stefan Agner <stefan.agner@toradex.com>
>
> Currently the command buffer gets allocated with a size of 32 bytes.
> This causes warning messages on systems with cache lines bigger than
> 32 bytes:
> CACHE: Misaligned operation at range [9df17a00, 9df17a20]
>
I've never seen this on NAND....
> Define command buffer to be at least 32 bytes, but more if cache
> line is bigger.
>
> Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
> ---
> This appeared after Simon enable the message in check_cache_range
> by default...
ok, this explains why !
>
> drivers/mtd/nand/mxs_nand.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/mtd/nand/mxs_nand.c b/drivers/mtd/nand/mxs_nand.c
> index 94fc5c1..4bf564e 100644
> --- a/drivers/mtd/nand/mxs_nand.c
> +++ b/drivers/mtd/nand/mxs_nand.c
> @@ -37,7 +37,12 @@
> #endif
> #define MXS_NAND_METADATA_SIZE 10
> #define MXS_NAND_BITS_PER_ECC_LEVEL 13
> +
> +#if !defined(CONFIG_SYS_CACHELINE_SIZE) || CONFIG_SYS_CACHELINE_SIZE < 32
> #define MXS_NAND_COMMAND_BUFFER_SIZE 32
> +#else
> +#define MXS_NAND_COMMAND_BUFFER_SIZE CONFIG_SYS_CACHELINE_SIZE
> +#endif
>
> #define MXS_NAND_BCH_TIMEOUT 10000
>
>
Reviewed-by: Stefano Babic <sbabic@denx.de>
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
next prev parent reply other threads:[~2016-08-02 8:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-02 6:55 [U-Boot] [PATCH] mtd: nand: mxs: fix cache alignment for cache lines >32 Stefan Agner
2016-08-02 8:17 ` Stefano Babic [this message]
2016-08-03 7:57 ` Stefano Babic
2016-08-03 13:51 ` Fabio Estevam
2016-08-03 16:13 ` Stefan Agner
2016-08-03 17:39 ` Fabio Estevam
2016-08-03 18:09 ` Tom Rini
2016-08-03 18:29 ` Fabio Estevam
2016-08-03 18:35 ` Simon Glass
2016-08-03 18:44 ` Fabio Estevam
2016-08-03 19:08 ` Simon Glass
2016-08-03 19:43 ` Stefan Agner
2016-08-03 19:18 ` Stefan Agner
2016-08-03 20:05 ` Hannes Schmelzer
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=bf6ec65a-6d56-27d4-4692-13bb63a9bdd2@denx.de \
--to=sbabic@denx.de \
--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.