All of lore.kernel.org
 help / color / mirror / Atom feed
From: Raphael Assenat <raph@8d.com>
To: Mike Rapoport <mike@compulab.co.il>
Cc: tglx@linutronix.de, linux-mtd@lists.infradead.org
Subject: Re: [PATCH] [MTD] CM-x270 NAND flash support
Date: Fri, 21 Jul 2006 15:33:32 -0400	[thread overview]
Message-ID: <44C12C0C.9080505@8d.com> (raw)
In-Reply-To: <44BC7AF4.7010304@compulab.co.il>

Mike Rapoport wrote:
> +
> +/* This macro needed to ensure in-order operation of GPIO and local
> + * bus. Without both asm command and dummy uncached read there're
> + * states when NAND access is broken. I've looked for such macro(s) in
> + * include/asm-arm but found nothing approptiate.
> + * dmac_clean_range is close, but is makes cache invalidation
> + * unnecessary here and it cannot be used in module
> + */
> +#define DRAIN_WB() \
> +	do { \
> +		unsigned char dummy; \
> +		asm volatile ("mcr p15, 0, r0, c7, c10, 4":::"r0"); \
> +		dummy=*((unsigned char*)UNCACHED_ADDR); \
> +	} while(0)
I think you should add the volatile keyword to the typecast:

dummy=*((volatile unsigned char*)UNCACHED_ADDR);

In the cm-x255 nand flash driver, I had problems without it (read errors, ecc errors, 
etc). Maybe the compiler is optimising this read away thinking it does nothing useful?

Regards,
Raphael Assenat

      reply	other threads:[~2006-07-21 19:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-18  6:08 [PATCH] [MTD] CM-x270 NAND flash support Mike Rapoport
2006-07-21 19:33 ` Raphael Assenat [this message]

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=44C12C0C.9080505@8d.com \
    --to=raph@8d.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=mike@compulab.co.il \
    --cc=tglx@linutronix.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.