From: Tony Lindgren <tony@atomide.com>
To: Jarkko Nikula <jarkko.nikula@nokia.com>
Cc: linux-omap@vger.kernel.org
Subject: Re: [PATCH] ARM: OMAP: Fixes to omap_mcbsp_request function
Date: Wed, 24 Sep 2008 12:11:09 +0300 [thread overview]
Message-ID: <20080924091109.GJ5222@atomide.com> (raw)
In-Reply-To: <1222091271-22546-1-git-send-email-jarkko.nikula@nokia.com>
* Jarkko Nikula <jarkko.nikula@nokia.com> [080922 16:48]:
> Bootloader may let McBSP logic running so make sure that block is idle
> before requesting IRQs. Also make sure that TX and RX waitqueues are
> initialized before request_irq.
Pushing today and adding to upstream queue for RMK.
Tony
> Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
> ---
> arch/arm/plat-omap/mcbsp.c | 13 +++++++++----
> 1 files changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
> index 7d32437..798c91e 100644
> --- a/arch/arm/plat-omap/mcbsp.c
> +++ b/arch/arm/plat-omap/mcbsp.c
> @@ -234,8 +234,16 @@ int omap_mcbsp_request(unsigned int id)
> mcbsp->free = 0;
> spin_unlock(&mcbsp->lock);
>
> + /*
> + * Make sure that transmitter, receiver and sample-rate generator are
> + * not running before activating IRQs.
> + */
> + OMAP_MCBSP_WRITE(mcbsp->io_base, SPCR1, 0);
> + OMAP_MCBSP_WRITE(mcbsp->io_base, SPCR2, 0);
> +
> if (mcbsp->io_type == OMAP_MCBSP_IRQ_IO) {
> /* We need to get IRQs here */
> + init_completion(&mcbsp->tx_irq_completion);
> err = request_irq(mcbsp->tx_irq, omap_mcbsp_tx_irq_handler,
> 0, "McBSP", (void *)mcbsp);
> if (err != 0) {
> @@ -245,8 +253,7 @@ int omap_mcbsp_request(unsigned int id)
> return err;
> }
>
> - init_completion(&mcbsp->tx_irq_completion);
> -
> + init_completion(&mcbsp->rx_irq_completion);
> err = request_irq(mcbsp->rx_irq, omap_mcbsp_rx_irq_handler,
> 0, "McBSP", (void *)mcbsp);
> if (err != 0) {
> @@ -256,8 +263,6 @@ int omap_mcbsp_request(unsigned int id)
> free_irq(mcbsp->tx_irq, (void *)mcbsp);
> return err;
> }
> -
> - init_completion(&mcbsp->rx_irq_completion);
> }
>
> return 0;
> --
> 1.5.6.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2008-09-24 9:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-19 13:36 [PATCH] ARM: OMAP: Fix possible un-initialized waitqueue in McBSP Jarkko Nikula
2008-09-22 13:30 ` Jarkko Nikula
2008-09-22 13:47 ` [PATCH] ARM: OMAP: Fixes to omap_mcbsp_request function Jarkko Nikula
2008-09-24 9:11 ` Tony Lindgren [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=20080924091109.GJ5222@atomide.com \
--to=tony@atomide.com \
--cc=jarkko.nikula@nokia.com \
--cc=linux-omap@vger.kernel.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