Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: John Crispin <blogic@openwrt.org>
Cc: linux-mips@linux-mips.org, Thomas Langer <thomas.langer@lantiq.com>
Subject: Re: [PATCH V2 4/6] MIPS: lantiq: add basic support for FALC-ON
Date: Thu, 17 Nov 2011 17:01:21 +0000	[thread overview]
Message-ID: <20111117170121.GG26457@linux-mips.org> (raw)
In-Reply-To: <1321453698-2598-4-git-send-email-blogic@openwrt.org>

On Wed, Nov 16, 2011 at 03:28:16PM +0100, John Crispin wrote:

> +/* global register ranges */
> +extern __iomem void *ltq_ebu_membase;
> +extern __iomem void *ltq_sys1_membase;

extern void __iomem *ltq_ebu_membase;
extern void __iomem *ltq_sys1_membase;

> +#define ltq_ebu_w32(x, y)	ltq_w32((x), ltq_ebu_membase + (y))
> +#define ltq_ebu_r32(x)		ltq_r32(ltq_ebu_membase + (x))
> +#define ltq_ebu_w32_mask(clear, set, reg)   \
> +	ltq_ebu_w32((ltq_ebu_r32(reg) & ~(clear)) | (set), reg)
> +
> +#define ltq_sys1_w32(x, y)	ltq_w32((x), ltq_sys1_membase + (y))
> +#define ltq_sys1_r32(x)		ltq_r32(ltq_sys1_membase + (x))
> +#define ltq_sys1_w32_mask(clear, set, reg)   \
> +	ltq_sys1_w32((ltq_sys1_r32(reg) & ~(clear)) | (set), reg)
> +
> +/* gpio_request wrapper to help configure the pin */
> +extern int  ltq_gpio_request(unsigned int pin, unsigned int mux,
> +				unsigned int dir, const char *name);
> +extern int ltq_gpio_mux_set(unsigned int pin, unsigned int mux);
> +
> +/* to keep the irq code generic we need to define these to 0 as falcon
> +   has no EIU/EBU */
> +#define LTQ_EIU_BASE_ADDR	0
> +#define LTQ_EBU_PCC_ISTAT	0
> +
> +#define ltq_is_ar9()	0
> +#define ltq_is_vr9()	0

These days it is prefered to use inline functions rather than function-like
macro definitions such as these here.

Really, use inline functions unless you have a good reason not to.

  Ralf

  reply	other threads:[~2011-11-17 17:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-16 14:28 [PATCH V2 1/6] MIPS: lantiq: reorganize xway code John Crispin
2011-11-16 14:28 ` [PATCH V2 2/6] MIPS: lantiq: change ltq_request_gpio() call signature John Crispin
2011-11-17 16:46   ` Ralf Baechle
2011-11-16 14:28 ` [PATCH V2 3/6] MIPS: lantiq: make irq.c support the FALC-ON John Crispin
2011-11-17 16:52   ` Ralf Baechle
2011-11-16 14:28 ` [PATCH V2 4/6] MIPS: lantiq: add basic support for FALC-ON John Crispin
2011-11-17 17:01   ` Ralf Baechle [this message]
2011-11-16 14:28 ` [PATCH V2 5/6] MIPS: lantiq: add support for FALC-ON GPIOs John Crispin
2011-11-16 14:28 ` [PATCH V2 6/6] MIPS: lantiq: add support for the EASY98000 evaluation board John Crispin
2011-11-17 16:28 ` [PATCH V2 1/6] MIPS: lantiq: reorganize xway code Ralf Baechle
  -- strict thread matches above, loose matches on Subject: below --
2011-11-21 13:35 John Crispin
2011-11-21 13:35 ` [PATCH V2 4/6] MIPS: lantiq: add basic support for FALC-ON John Crispin
2011-11-21 15:30   ` thomas.langer
2011-11-21 15:30     ` thomas.langer
2011-11-21 16:50     ` John Crispin

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=20111117170121.GG26457@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=blogic@openwrt.org \
    --cc=linux-mips@linux-mips.org \
    --cc=thomas.langer@lantiq.com \
    /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