public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/6] davinci_emac: fix for running with dcache enabled
Date: Sun, 9 Oct 2011 11:56:46 -0400	[thread overview]
Message-ID: <201110091156.47437.vapier@gentoo.org> (raw)
In-Reply-To: <4E917A6B.1010200@emcraft.com>

On Sunday 09 October 2011 06:41:47 Ilya Yanok wrote:
> On 07.10.2011 21:34, Mike Frysinger wrote:
> >> +#ifdef DAVINCI_EMAC_DCACHE
> >> +static inline void davinci_flush(void *addr, int size)
> >> +{
> >> +	flush_dcache_range((unsigned long)addr,
> >> +			(unsigned long)addr + size);
> >> +}
> >> +
> >> +static inline void davinci_invalidate(void *addr, int size)
> >> +{
> >> +	invalidate_dcache_range((unsigned long)addr,
> >> +			(unsigned long)addr + size);
> >> +}
> >> +#else
> >> +#define davinci_flush(addr, size)	do {} while (0)
> >> +#define davinci_invalidate(addr, size)	do {} while (0)
> >> +#endif
> > 
> > does it really make sense to have this be conditional ?
> 
> arm926ejs doesn't have {invalidate,flush}_dcache_range(), so we have to
> add this not to break the driver on DaVinci boards (maybe we need to add
> empty cache functions on arm926ejs instead?)

if the prototype is in include/common.h, then code may assume it exists.  if 
it doesn't exist for a particular cpu, then that cpu is broken and common code 
(which is what drivers/ is) should not be adding hacks to workaround broken 
cpus.  please add stubs to the cpu you're referring to and drop the 
DAVINCI_EMAC_DCACHE define.  or let whoever cares about that cpu add the 
defines, but still drop DAVINCI_EMAC_DCACHE.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111009/a7bd825d/attachment.pgp 

  parent reply	other threads:[~2011-10-09 15:56 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 [this message]
2011-10-13 22:18         ` Ilya Yanok
2011-10-10 12:35   ` Stefano Babic
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=201110091156.47437.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox