public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Dmitry <dbaryshkov@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, haavard.skinnemoen@atmel.com,
	lethal@linux-sh.org, philipp.zabel@gmail.com, pavel@ucw.cz,
	tony@atomide.com, paul@pwsan.com
Subject: Re: [PATCH 5/6] Clocklib: Use correct clock for IrDA on pxa
Date: Wed, 9 Apr 2008 20:05:04 +0100	[thread overview]
Message-ID: <20080409190504.GA13891@flint.arm.linux.org.uk> (raw)
In-Reply-To: <bc64b4640804090015m7dd640d5j31c54b99007f09a7@mail.gmail.com>

On Wed, Apr 09, 2008 at 11:15:51AM +0400, Dmitry wrote:
> 2008/4/8, Russell King <rmk+lkml@arm.linux.org.uk>:
> > On Tue, Apr 08, 2008 at 01:47:35PM +0400, Dmitry wrote:
> >  > Yes, it works currently. But there are a few problems: we declare
> >  > STUART's UARTCLK with dev=NULL (all other UARTCLKs are declared with
> >  > proper devices).  Therefore,  I consider it as a hack and would like
> >  > to remove it.
> >
> > I don't consider it a hack at all - it's a work around for the fact
> >  that the PXA FIR driver shares the UART, but the FIR driver doesn't
> >  bind to the UART itself.
> 
> Would you then accept the patch that still contains UARTCLK bound to
> pxa uart device, and IrDA requesting clock STUARTCLK?

See below - fixing the underlying issue makes this problem vanish.

> >  The _real_ issue is with IrDA itself, and is larger than just the
> >  clock library.  Any serial port which supports IrDA, even on x86,
> >  has to be shared between the serial driver and the IrDA driver -
> >  there's no way for them to quietly co-exist and "just work" as
> >  requested.
> 
> Yes. I wonder how this is solved in other platforms.

As I've suggested, it isn't.  On x86, for instance, you have to use
setserial to deconfigure the serial port from the serial driver (by
setserial /dev/ttyS1 uart none) and then load the IrDA driver.

Unfortunately, there's currently no way to properly hand off a real
serial device to the IrDA layer when the UART is connected to an IrDA
interface.

TBH, I'm not sure what the status of the kernel-side IrDA drivers are -
maybe this is an issue which Samuel Ortiz could tackle if he has time.
That would solve this issue on both 8250-based ports as well as SA11x0
and PXA platforms.

Basically what I'm thinking is a serial_core function which could be
called to say "I'm an IrDA driver, and I think I should be using the
serial port located <here>, please give me control of it" and it'd
pass over the various parameters including the struct device for it.
Or something like that.

> See my proposition above. I highly dislike the UARTCLK w/o device declared.
> Once it has already lead me to (small) problems due to messed other
> UARTCLKs  declarations on pxa25x.

If we get the underlying issue fixed, that issue magically goes away.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

  reply	other threads:[~2008-04-09 19:06 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-03 13:21 [PATCH 0/6] Clocklib: generic clocks framework Dmitry Baryshkov
2008-04-03 13:23 ` [PATCH 1/6] Clocklib: add generic framework for managing clocks Dmitry Baryshkov
2008-04-07 22:55   ` Andrew Morton
2008-04-03 13:23 ` [PATCH 2/6] Clocklib: debugfs support Dmitry Baryshkov
2008-04-07 22:59   ` Andrew Morton
2008-04-08  1:04     ` Greg KH
2008-04-03 13:23 ` [PATCH 3/6] Clocklib: support sa1100 sub-arch Dmitry Baryshkov
2008-04-03 13:23 ` [PATCH 4/6] Clocklib: support ARM pxa sub-arch Dmitry Baryshkov
2008-04-03 13:24 ` [PATCH 5/6] Clocklib: Use correct clock for IrDA on pxa Dmitry Baryshkov
2008-04-07 23:00   ` Andrew Morton
2008-04-07 23:04     ` Russell King
2008-04-08  9:47       ` Dmitry
2008-04-08 19:33         ` Russell King
2008-04-09  7:15           ` Dmitry
2008-04-09 19:05             ` Russell King [this message]
2008-04-09 19:09               ` Alan Cox
2008-04-09 19:20                 ` Russell King
2008-04-09 19:39                   ` Dmitry
2008-04-09 20:52                   ` Alan Cox
2008-04-09 21:37                     ` Russell King
2008-04-03 13:24 ` [PATCH 6/6] Clocklib: use correct name for 3,6MHz clock Dmitry Baryshkov
2008-04-07 23:01   ` Andrew Morton
2008-04-07 23:06     ` Russell King
2008-04-08  9:52     ` Dmitry
2008-04-08 19:35       ` Russell King
2008-04-08 19:58         ` Dmitry
2008-04-08 20:07           ` Russell King
2008-04-09  7:19             ` Dmitry
2008-04-11 10:25             ` Dmitry Baryshkov
  -- strict thread matches above, loose matches on Subject: below --
2008-03-31  8:39 [PATCH 0/6] Clocklib: generic clocks framework Dmitry Baryshkov
2008-03-31  8:44 ` [PATCH 5/6] Clocklib: Use correct clock for IrDA on pxa Dmitry Baryshkov

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=20080409190504.GA13891@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=dbaryshkov@gmail.com \
    --cc=haavard.skinnemoen@atmel.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paul@pwsan.com \
    --cc=pavel@ucw.cz \
    --cc=philipp.zabel@gmail.com \
    --cc=tony@atomide.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