public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/01] arch/arm/plat-omap/mcbsp.c
@ 2007-09-26  3:25 Luís Cargnini
  2007-10-22  0:00 ` Tony Lindgren
  0 siblings, 1 reply; 3+ messages in thread
From: Luís Cargnini @ 2007-09-26  3:25 UTC (permalink / raw)
  To: OMAP

this patch modify the McBSP interrupt handling behavior turning the irq of
McBSP ports shared and it is working, I'm deveolping a device driver and
percepted that this is a change necessary for new device drivers could been
implemented to tak advantage of McBSP and could use it, example is ADC
communications throw McBSP interface for example, this modification do not
harm the kernel and add more felxibility and functionality to the kernel.

-- linux-omap-2.6/arch/arm/plat-omap/mcbsp.c   2007-03-12
16:44:03.501890844-0300
+++ linux-omap-2.6-instramed/arch/arm/plat-omap/mcbsp.c 2007-09-25 23:58:
39.324154145 -0300

 static irqreturn_t omap_mcbsp_tx_irq_handler(int irq, void *dev_id)
@@ -304,7 +320,7 @@ int omap_mcbsp_request(unsigned int id)

        if (mcbsp[id].io_type == OMAP_MCBSP_IRQ_IO) {
                /* We need to get IRQs here */
-               err = request_irq(mcbsp[id].tx_irq,
omap_mcbsp_tx_irq_handler, 0,
+               err = request_irq(mcbsp[id].tx_irq,
omap_mcbsp_tx_irq_handler, IRQF_SHARED,
                                  "McBSP",
                                  (void *) (&mcbsp[id]));
                if (err != 0) {
@@ -315,8 +331,7 @@ int omap_mcbsp_request(unsigned int id)

                init_completion(&(mcbsp[id].tx_irq_completion));

-
-               err = request_irq(mcbsp[id].rx_irq,
omap_mcbsp_rx_irq_handler, 0,
+               err = request_irq(mcbsp[id].rx_irq,
omap_mcbsp_rx_irq_handler, IRQF_SHARED,
                                  "McBSP",
                                  (void *) (&mcbsp[id]));
                if (err != 0) {


-- 
------------------------------------------------------------------------------
Thanks && Regards
Msc. Bsc. Luís Vitório Cargnini
IEEE Member
Electrical Engineer Faculty @ PUCRS
Ipiranga Avenue, 6681 – Building 30
P.O. Box: 90619-900 – Porto Alegre/RS
Phone: +55 51 3320 3500  extension: 7696
---------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 01/01] arch/arm/plat-omap/mcbsp.c
  2007-09-26  3:25 [PATCH 01/01] arch/arm/plat-omap/mcbsp.c Luís Cargnini
@ 2007-10-22  0:00 ` Tony Lindgren
       [not found]   ` <ae36f8040710212048v42f3fb96pc8b0e2db9496f93a@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Tony Lindgren @ 2007-10-22  0:00 UTC (permalink / raw)
  To: Luís Cargnini; +Cc: OMAP

* Luís Cargnini <lvcargnini@gmail.com> [070925 20:26]:
> this patch modify the McBSP interrupt handling behavior turning the irq of
> McBSP ports shared and it is working, I'm deveolping a device driver and
> percepted that this is a change necessary for new device drivers could been
> implemented to tak advantage of McBSP and could use it, example is ADC
> communications throw McBSP interface for example, this modification do not
> harm the kernel and add more felxibility and functionality to the kernel.
> 
> -- linux-omap-2.6/arch/arm/plat-omap/mcbsp.c   2007-03-12
> 16:44:03.501890844-0300
> +++ linux-omap-2.6-instramed/arch/arm/plat-omap/mcbsp.c 2007-09-25 23:58:
> 39.324154145 -0300
> 
>  static irqreturn_t omap_mcbsp_tx_irq_handler(int irq, void *dev_id)
> @@ -304,7 +320,7 @@ int omap_mcbsp_request(unsigned int id)
> 
>         if (mcbsp[id].io_type == OMAP_MCBSP_IRQ_IO) {
>                 /* We need to get IRQs here */
> -               err = request_irq(mcbsp[id].tx_irq,
> omap_mcbsp_tx_irq_handler, 0,
> +               err = request_irq(mcbsp[id].tx_irq,
> omap_mcbsp_tx_irq_handler, IRQF_SHARED,
>                                   "McBSP",
>                                   (void *) (&mcbsp[id]));
>                 if (err != 0) {
> @@ -315,8 +331,7 @@ int omap_mcbsp_request(unsigned int id)
> 
>                 init_completion(&(mcbsp[id].tx_irq_completion));
> 
> -
> -               err = request_irq(mcbsp[id].rx_irq,
> omap_mcbsp_rx_irq_handler, 0,
> +               err = request_irq(mcbsp[id].rx_irq,
> omap_mcbsp_rx_irq_handler, IRQF_SHARED,
>                                   "McBSP",
>                                   (void *) (&mcbsp[id]));
>                 if (err != 0) {

Let's consider this once there's something else actually something using
the interrupt.

Tony

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 01/01] arch/arm/plat-omap/mcbsp.c
       [not found]               ` <20071022205648.GA17300@atomide.com>
@ 2007-10-23  3:17                 ` Luís Cargnini
  0 siblings, 0 replies; 3+ messages in thread
From: Luís Cargnini @ 2007-10-23  3:17 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: OMAP

[-- Attachment #1: Type: text/plain, Size: 1637 bytes --]

Dear tony just one question,if I want to implement my own DMA handlers (they
need interrupt handlers), in this case we need to share the irqs ?
The methods os McBSP for DMA are as described in the source:
/*
 * Simple DMA based buffer rx/tx routines.
 * Nothing fancy, just a single buffer tx/rx through DMA.
 * The DMA resources are released once the transfer is done.
 * For anything fancier, you should use your own customized DMA
 * routines and callbacks.
 */
lines 690 to 696 of mcbsp.c

or maybe export the omap_mcbsp_tx_dma_callback and
omap_mcbsp_rx_dma_callback, to link the dma from mcbsp to my functions to
threat dma events, and more the dma implemented in mcbsp of platform only
send and receive a single u8 each time, and each time it alloc and dealloc
the dma channel (how big is this time penalty).
I'm discussing this with you and the entire list because I suppose this is
relevant and someone could know something else.



On 10/22/07, Tony Lindgren <tony@atomide.com> wrote:
>
> * Luís Cargnini <lvcargnini@gmail.com> [071022 13:20]:
> > please can you give me an example of how to use the mcbsp xmit and recev
> dma
> > functions of omap ?
>
> Just grep for them in the linux-omap tree, there should be few examples.
>
> Tony
>



-- 
------------------------------------------------------------------------------
Thanks && Regards
Msc. Bsc. Luís Vitório Cargnini
IEEE Member
Electrical Engineer Faculty @ PUCRS
Ipiranga Avenue, 6681 – Building 30
P.O. Box: 90619-900 – Porto Alegre/RS
Phone: +55 51 3320 3500  extension: 7696
---------------------------------------------------------------------------------

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-23  3:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-26  3:25 [PATCH 01/01] arch/arm/plat-omap/mcbsp.c Luís Cargnini
2007-10-22  0:00 ` Tony Lindgren
     [not found]   ` <ae36f8040710212048v42f3fb96pc8b0e2db9496f93a@mail.gmail.com>
     [not found]     ` <20071022035841.GH6984@atomide.com>
     [not found]       ` <ae36f8040710220957m721ab992g898da6f2d12eac8@mail.gmail.com>
     [not found]         ` <20071022172101.GD15946@atomide.com>
     [not found]           ` <ae36f8040710221108h20b9ba91ked981b475a6f1199@mail.gmail.com>
     [not found]             ` <ae36f8040710221319o4ae1e14cn8a5040be4555235c@mail.gmail.com>
     [not found]               ` <20071022205648.GA17300@atomide.com>
2007-10-23  3:17                 ` Luís Cargnini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox