From: Tony Lindgren <tony@atomide.com>
To: Govindraj <govindraj.ti@gmail.com>
Cc: Tero Kristo <t-kristo@ti.com>, linux-omap@vger.kernel.org
Subject: Re: [PATCHv3 5/6] OMAP3: Serial: Made serial to work properly with PRCM chain handler
Date: Thu, 23 Jun 2011 04:12:29 -0700 [thread overview]
Message-ID: <20110623111229.GB23145@atomide.com> (raw)
In-Reply-To: <BANLkTin1u_tKN8mwM0xYhq=qjWkRfx8X2Q@mail.gmail.com>
* Govindraj <govindraj.ti@gmail.com> [110623 03:30]:
> On Thu, Jun 23, 2011 at 3:30 PM, Tony Lindgren <tony@atomide.com> wrote:
> > * Tero Kristo <t-kristo@ti.com> [110623 02:06]:
> >> On Thu, 2011-06-23 at 10:21 +0200, Tony Lindgren wrote:
> >> > * Tero Kristo <t-kristo@ti.com> [110622 09:38]:
> >> > > @@ -550,6 +550,8 @@ static void omap_uart_idle_init(struct omap_uart_state *uart)
> >> > > ret = request_threaded_irq(uart->irq, NULL, omap_uart_interrupt,
> >> > > IRQF_SHARED, "serial idle", (void *)uart);
> >> > > WARN_ON(ret);
> >> > > + ret = omap_prcm_register_pad_irq(uart->padconf, uart->irq);
> >> > > + WARN_ON(ret);
> >> > > }
> >> >
> >> > Argh, looks like we still have direct mux register tinkering in serial.c:
> >> >
> >> > $ grep "padconf = 0x" serial.c
> >> > padconf = 0x182;
> >> > padconf = 0x17a;
> >> > padconf = 0x19e;
> >> > padconf = 0x0d2;
> >> >
> >> > By deducting 0x30 from the values above, these map into the following mux defines:
> >> >
> >> > $ grep RX_OFFSET mux34xx.h
> >> > #define OMAP3_CONTROL_PADCONF_UART2_RX_OFFSET 0x14a
> >> > #define OMAP3_CONTROL_PADCONF_UART1_RX_OFFSET 0x152
> >> > #define OMAP3_CONTROL_PADCONF_UART3_RX_IRRX_OFFSET 0x16e
> >> >
> >> > So you can make things more generic by getting rid of those and using
> >> > struct omap_mux_partition instead for omap_prcm_register_pad_irq.
> >> > The pins used are set already in serial.c with omap_hwmod_mux_init.
> >> >
> >> > Otherwise we have to patch the hardcoded padconf values for every new omap.
> >> > And looks like we're already missing them for 44xx in serial.c.
> >> >
> >> > Then access to the padconf registers should be done with
> >> > omap_mux_read/write instead. If you need to do something more complex
> >> > with them maybe consider adding some new functions to mux.c as needed.
> >> >
> >>
> >> Padconf stuff is not that much related to this patch set yet (I am not
> >> touching the serial padconf code), but I can probably take a look at
> >> this also later on, unless you want this fixed with this set already?
> >
> > Yes please, maybe make it a separate patch before your series to
> > prepare things?
> >
> > Otherwise we will have to change the omap_prcm_register_pad_irq
> > later on in each driver using it.
> >
>
> Agree,
> I am planning of use this call from omap-serial driver. :)
>
> How about using omap_hwmod_mux_get_wake_status proposed earlier?
>
> https://patchwork.kernel.org/patch/773932/
Hmm, usually there's only one wake-up enabled pin though. Do we
ever have more than one per device? If not, there's no need to
iterate over the list every time.
> How about register with omap_hwmod data and irq_number from driver
> after requesting irq ?
>
> I suppose even using omap_hwmod data from driver file not allowed.
> or use pdev ?
Eventually the configured pins come from device tree and then hwmod
code can set up things automagically for the device. I think drivers
should just use device_set_wakeup_enable to set it and then the wake-up
capability should change automatically somehow.. Or maybe I did not
quite understand what you're after.
Tony
--
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
next prev parent reply other threads:[~2011-06-23 11:12 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-22 16:42 [PATCHv3 0/6] PRCM chain handler Tero Kristo
2011-06-22 16:42 ` [PATCHv3 1/6] omap: prcm: switch to a chained IRQ handler mechanism Tero Kristo
2011-06-22 23:53 ` Kevin Hilman
2011-06-23 7:24 ` Tero Kristo
2011-06-23 8:19 ` Tony Lindgren
2011-06-23 9:08 ` Tero Kristo
2011-06-23 9:51 ` Tony Lindgren
2011-06-24 16:00 ` Kevin Hilman
2011-06-24 21:02 ` Kevin Hilman
2011-06-22 16:42 ` [PATCHv3 2/6] PRCM: Add support for PAD wakeup interrupts Tero Kristo
2011-06-23 10:23 ` Govindraj
2011-06-24 21:34 ` Kevin Hilman
2011-06-24 21:21 ` Kevin Hilman
2011-06-22 16:42 ` [PATCHv3 3/6] OMAP: PRCM: Added an api to get id for a PRCM event Tero Kristo
2011-06-24 21:58 ` Kevin Hilman
2011-06-22 16:42 ` [PATCHv3 4/6] OMAP3: PM: Use PRCM chain handler Tero Kristo
2011-06-24 21:57 ` Kevin Hilman
2011-06-22 16:42 ` [PATCHv3 5/6] OMAP3: Serial: Made serial to work properly with " Tero Kristo
2011-06-22 17:09 ` Tero Kristo
2011-06-23 10:30 ` Govindraj
2011-06-23 8:21 ` Tony Lindgren
2011-06-23 9:11 ` Tero Kristo
2011-06-23 10:00 ` Tony Lindgren
2011-06-23 10:35 ` Govindraj
2011-06-23 11:12 ` Tony Lindgren [this message]
2011-06-24 15:15 ` Kevin Hilman
2011-06-24 22:00 ` Kevin Hilman
2011-06-22 16:42 ` [PATCHv3 6/6] OMAP3: Serial tty: Added resume_idle calls to critical points Tero Kristo
2011-06-27 15:02 ` [PATCHv3 0/6] PRCM chain handler Tero Kristo
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=20110623111229.GB23145@atomide.com \
--to=tony@atomide.com \
--cc=govindraj.ti@gmail.com \
--cc=linux-omap@vger.kernel.org \
--cc=t-kristo@ti.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