Re: [PATCHv3 4/5] mtd: mxc_nand fixups

From: Ivo Clarysse
Date: Fri Jun 25 2010 - 10:50:56 EST


On Thu, Jun 24, 2010 at 12:16 PM, John Ogness <john.ogness@xxxxxxxxxxxxx> wrote:
> On 2010-06-24, Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> wrote:
>> Ok, if it's the only way out to have 5 cpu_is_* blocks, then lets go
>> for it.
>
> Here is a new patch that puts the behavior behind a "nfc_avoid_masking"
> macro. The macro is only used 3 times.
[...]

Tested on an MX21ADS board, and it still works.

> This patch is based on linux-next 20100618.
>
> Signed-off-by: John Ogness <john.ogness@xxxxxxxxxxxxx>
> ---
>  drivers/mtd/nand/mxc_nand.c |   81 +++++++++++++++++++++++++---------
>  1 file changed, 61 insertions(+), 20 deletions(-)
>
> Index: linux-next-20100618/drivers/mtd/nand/mxc_nand.c
> ===================================================================
> --- linux-next-20100618.orig/drivers/mtd/nand/mxc_nand.c
> +++ linux-next-20100618/drivers/mtd/nand/mxc_nand.c
[...]
> @@ -100,6 +109,18 @@
>
>  #define NFC_RSLTSPARE_AREA_MASK  0xff
>
> +#define nfc_interrupt_set(_regs) \
> +               (readw(_regs + NFC_CONFIG2) & NFC_INT)
> +#define nfc_clear_interrupt(_regs) \
> +               writew(readw(_regs + NFC_CONFIG2) & ~NFC_INT, \
> +                      _regs + NFC_CONFIG2)

Naming is not very consistent; I'd suggest nfc_set_interrupt /
nfc_clear_interrupt

> +#define nfc_mask_irq(_regs) \
> +               writew(readw(_regs + NFC_CONFIG1) | NFC_INT_MSK, \
> +                      _regs + NFC_CONFIG1)
> +#define nfc_unmask_irq(_regs) \
> +               writew(readw(_regs + NFC_CONFIG1) & ~NFC_INT_MSK, \
> +                      _regs + NFC_CONFIG1)
> +
[...]
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/