linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: charu@ti.com (Varadarajan, Charulatha)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 2/5] OMAP: mailbox: fix rx interrupt disable in omap4
Date: Wed, 24 Nov 2010 10:46:04 +0530	[thread overview]
Message-ID: <AANLkTimNW8ixBPyuwckZYnijXmT+t-XSY37xMUVvubLB@mail.gmail.com> (raw)
In-Reply-To: <1290547617-16640-3-git-send-email-h-kanigeri2@ti.com>

On Wed, Nov 24, 2010 at 02:56, Hari Kanigeri <h-kanigeri2@ti.com> wrote:

Should the subject be like this?
OMAP4: mailbox: fix rx interrupt disable

> disablign rx interrupt on omap4 is different than its pre-decessors.

Typo ->disablign

> The bit in OMAP4_MAILBOX_IRQENABLE_CLR should be set to disable the
> interrupts instead of clearing the bit.
>
> Defined rev field in mailbox structure to differentiate the mailbox
> versions.
>
> Signed-off-by: Hari Kanigeri <h-kanigeri2@ti.com>
> ---
> ?arch/arm/mach-omap2/mailbox.c ? ? ? ? ? ? | ? ?7 ++++++-
> ?arch/arm/plat-omap/include/plat/mailbox.h | ? ?4 ++++
> ?arch/arm/plat-omap/mailbox.c ? ? ? ? ? ? ?| ? ?4 ++++
> ?3 files changed, 14 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
> index 42dbfa4..c32058d 100644
> --- a/arch/arm/mach-omap2/mailbox.c
> +++ b/arch/arm/mach-omap2/mailbox.c
> @@ -195,7 +195,12 @@ static void omap2_mbox_disable_irq(struct omap_mbox *mbox,
> ? ? ? ?struct omap_mbox2_priv *p = (struct omap_mbox2_priv *)mbox->priv;
> ? ? ? ?u32 l, bit = (irq == IRQ_TX) ? p->notfull_bit : p->newmsg_bit;
> ? ? ? ?l = mbox_read_reg(p->irqdisable);
> - ? ? ? l &= ~bit;
> +
> + ? ? ? if (mbox->rev == OMAP_MBOX_IP_VERSION_2)
> + ? ? ? ? ? ? ? l |= bit;
> + ? ? ? else
> + ? ? ? ? ? ? ? l &= ~bit;
> +
> ? ? ? ?mbox_write_reg(l, p->irqdisable);
> ?}
>
> diff --git a/arch/arm/plat-omap/include/plat/mailbox.h b/arch/arm/plat-omap/include/plat/mailbox.h
> index 13f2ef3..1655c61 100644
> --- a/arch/arm/plat-omap/include/plat/mailbox.h
> +++ b/arch/arm/plat-omap/include/plat/mailbox.h
> @@ -20,6 +20,9 @@ typedef int __bitwise omap_mbox_type_t;
> ?#define OMAP_MBOX_TYPE1 ((__force omap_mbox_type_t) 1)
> ?#define OMAP_MBOX_TYPE2 ((__force omap_mbox_type_t) 2)
>
> +#define OMAP_MBOX_IP_LEGACY ? ? ? ? ? ? ? ? ? ?0x1
> +#define OMAP_MBOX_IP_VERSION_2 ? ? ? ? ? ? ? ? 0x2
> +
> ?struct omap_mbox_ops {
> ? ? ? ?omap_mbox_type_t ? ? ? ?type;
> ? ? ? ?int ? ? ? ? ? ? (*startup)(struct omap_mbox *mbox);
> @@ -58,6 +61,7 @@ struct omap_mbox {
> ? ? ? ?struct omap_mbox_ops ? ?*ops;
> ? ? ? ?struct device ? ? ? ? ? *dev;
> ? ? ? ?void ? ? ? ? ? ? ? ? ? ?*priv;
> + ? ? ? int ? ? ? ? ? ? ? ? ? ? rev;
> ?};
>
> ?int omap_mbox_msg_send(struct omap_mbox *, mbox_msg_t msg);
> diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
> index 48e161c..a1c6bd9 100644
> --- a/arch/arm/plat-omap/mailbox.c
> +++ b/arch/arm/plat-omap/mailbox.c
> @@ -358,6 +358,10 @@ int omap_mbox_register(struct device *parent, struct omap_mbox **list)
> ? ? ? ? ? ? ? ? ? ? ? ?ret = PTR_ERR(mbox->dev);
> ? ? ? ? ? ? ? ? ? ? ? ?goto err_out;
> ? ? ? ? ? ? ? ?}
> + ? ? ? ? ? ? ? if (cpu_is_omap44xx())

Do not use cpu_is* checks in plat-omap/*

> + ? ? ? ? ? ? ? ? ? ? ? mbox->rev = OMAP_MBOX_IP_VERSION_2;
> + ? ? ? ? ? ? ? else
> + ? ? ? ? ? ? ? ? ? ? ? mbox->rev = OMAP_MBOX_IP_LEGACY;
> ? ? ? ?}
> ? ? ? ?return 0;
>
> --
> 1.7.0
>

  reply	other threads:[~2010-11-24  5:16 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-23 21:26 [PATCH v4 0/5] OMAP: mailbox: fixes and enhancements Hari Kanigeri
2010-11-23 21:26 ` [PATCH v4 1/5] OMAP: mailbox: change full flag per mailbox queue instead of global Hari Kanigeri
2010-11-24  5:21   ` Varadarajan, Charulatha
2010-11-24 12:47     ` Kanigeri, Hari
2010-11-24 13:04       ` Varadarajan, Charulatha
2010-11-23 21:26 ` [PATCH v4 2/5] OMAP: mailbox: fix rx interrupt disable in omap4 Hari Kanigeri
2010-11-24  5:16   ` Varadarajan, Charulatha [this message]
2010-11-24  8:22     ` Felipe Balbi
2010-11-24  8:50       ` Varadarajan, Charulatha
2010-11-24  8:53         ` Felipe Balbi
2010-11-24 13:01         ` Kanigeri, Hari
2010-11-25  7:04           ` Varadarajan, Charulatha
2010-11-25 14:03             ` Hari Kanigeri
2010-11-23 21:26 ` [PATCH v4 3/5] OMAP: mailbox: fix checkpatch warnings Hari Kanigeri
2010-11-23 21:26 ` [PATCH v4 4/5] OMAP: mailbox: send message in process context Hari Kanigeri
2010-11-24  5:26   ` Varadarajan, Charulatha
2010-11-24 13:14     ` Kanigeri, Hari
2010-11-23 21:26 ` [PATCH v4 5/5] OMAP: mailbox: add notification support for multiple readers Hari Kanigeri
2010-11-24  5:29   ` Varadarajan, Charulatha
2010-11-24 13:09     ` Kanigeri, Hari
2010-11-24 13:12       ` Varadarajan, Charulatha
2010-11-24 13:22         ` Kanigeri, Hari

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=AANLkTimNW8ixBPyuwckZYnijXmT+t-XSY37xMUVvubLB@mail.gmail.com \
    --to=charu@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).