From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/6] davinci_emac: fix for running with dcache enabled
Date: Mon, 10 Oct 2011 14:35:01 +0200 [thread overview]
Message-ID: <4E92E675.1090900@denx.de> (raw)
In-Reply-To: <1317857806-16549-5-git-send-email-yanok@emcraft.com>
On 10/06/2011 01:36 AM, Ilya Yanok wrote:
> DaVinci EMAC is present on TI AM35xx SoCs (ARMv7) which run with D-Cache
> enabled by default. So we have to take care and flush/invalidate the
> cache before/after the DMA operations.
>
> Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Hi Ilya,
> ---
> drivers/net/davinci_emac.c | 47 ++++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 47 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
> index 222a0d0..b787213 100644
> --- a/drivers/net/davinci_emac.c
> +++ b/drivers/net/davinci_emac.c
> @@ -96,6 +96,40 @@ static volatile u_int8_t active_phy_addr = 0xff;
>
> phy_t phy;
>
> +#ifdef DAVINCI_EMAC_DCACHE
> +static inline void davinci_flush(void *addr, int size)
> +{
> + flush_dcache_range((unsigned long)addr,
> + (unsigned long)addr + size);
> +}
There is no check with the cache linesize. I get this error:
ERROR: v7_dcache_inval_range - stop address is not aligned - 0x5c0200a0
Should we not be sure that size is rounded up to align with the cache
line size ?
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
next prev parent reply other threads:[~2011-10-10 12:35 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-05 23:36 [U-Boot] [RFC PATCH 0/0] Support for DaVinci EMAC on TI AM35xx Ilya Yanok
2011-10-05 23:36 ` [U-Boot] [PATCH 1/6] davinci_emac: move arch-independent defines to separate header Ilya Yanok
2011-10-06 21:02 ` Wolfgang Denk
2011-10-10 21:23 ` Ilya Yanok
2011-10-05 23:36 ` [U-Boot] [PATCH 2/6] davinci_emac: use internal addresses in buffer descriptors Ilya Yanok
2011-10-06 21:02 ` Wolfgang Denk
2011-10-05 23:36 ` [U-Boot] [PATCH 3/6] davinci_emac: conditionally compile specific PHY support Ilya Yanok
2011-10-05 23:36 ` [U-Boot] [PATCH 4/6] davinci_emac: fix for running with dcache enabled Ilya Yanok
2011-10-07 17:34 ` Mike Frysinger
2011-10-09 10:41 ` Ilya Yanok
2011-10-09 13:21 ` Laurence Withers
2011-10-09 15:56 ` Mike Frysinger
2011-10-13 22:18 ` Ilya Yanok
2011-10-10 12:35 ` Stefano Babic [this message]
2011-10-10 13:03 ` Ilya Yanok
2011-10-10 13:17 ` Stefano Babic
2011-10-10 13:39 ` Wolfgang Denk
2011-10-10 15:24 ` Mike Frysinger
2011-10-10 17:44 ` Wolfgang Denk
2011-10-10 17:55 ` Mike Frysinger
2011-10-10 17:58 ` Anton Staaf
2011-10-10 18:31 ` Wolfgang Denk
2011-10-10 18:45 ` Anton Staaf
2011-10-10 23:29 ` Anton Staaf
2011-10-13 20:03 ` Wolfgang Denk
2011-10-13 20:19 ` Anton Staaf
2011-10-13 20:31 ` Wolfgang Denk
2011-10-13 20:40 ` Anton Staaf
2011-10-13 20:47 ` Wolfgang Denk
2011-10-13 20:36 ` Mike Frysinger
2011-10-13 20:44 ` Anton Staaf
2011-10-13 22:22 ` Ilya Yanok
2011-10-05 23:36 ` [U-Boot] [PATCH 5/6] davinci_emac: hardcode 100Mbps for AM35xx and RMII Ilya Yanok
2011-10-05 23:36 ` [U-Boot] [PATCH 6/6] AM35xx: add EMAC defines Ilya Yanok
2011-10-06 21:01 ` Wolfgang Denk
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=4E92E675.1090900@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.