[RFC/NOT FOR MERGING 2/3] serial: omap: remove hwmod dependency
balbi at ti.com
Fri Feb 15 11:03:28 EST 2013
On Fri, Feb 15, 2013 at 07:40:04AM -0800, Kevin Hilman wrote:
> Felipe Balbi <balbi at ti.com> writes:
> > Currently the omap-serial driver will not
> > work properly if booted via DT with CPUIDLE
> > enabled because it depends on function pointers
> > provided by hwmod to change its own SYSCONFIG
> > register.
> > Remove that relyance on hwmod by moving SYSCONFIG
> > handling to driver itself. Note that this also
> > fixes a possible corner case bug where we could
> > be putting UART in Force Idle mode if we called
> > omap_serial_enable_wakeup(up, false) after setting
> > NOIDLE to the idle mode. This is because hwmod
> > has no protection against that situation.
> > NYET-Signed-off-by: Felipe Balbi <balbi at ti.com>
> Here's another approach to getting rid of the sysconfig twiddling in the
> driver. I wrote this some time ago at my former company ;) but don't
> think I ever got around to posting it.
> It doesn't solve the whole problem (e.g. doesn't address the
> context_loss or enable_wakeup func pointers), but at least gets rid of
> the need for any SYSCONFIG access in the driver for the idle modes.
wakeup is still done by setting smart_idle_wakeup right, at least to
some IPs. Following omap_serial_enable_wakeup() calls, I can see that it
turns out to fiddle with sysconfig ;-)
> @@ -229,8 +209,6 @@ static void serial_omap_stop_tx(struct uart_port *port)
> serial_out(up, UART_IER, up->ier);
> - serial_omap_set_forceidle(up);
> @@ -298,7 +276,6 @@ static void serial_omap_start_tx(struct uart_port *port)
> - serial_omap_set_noidle(up);
this is no different then the patches Santosh has sent just a few
minutes ago, what gives ? It's exactly the same patch...
Anyway, I have exposed a problem with this aproach.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: Digital signature
More information about the linux-arm-kernel