From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/6] tty: serial: Add 8250-core based omap driver
Date: Thu, 10 Jul 2014 00:09:48 -0700 [thread overview]
Message-ID: <20140710070948.GH28884@atomide.com> (raw)
In-Reply-To: <1404928177-26554-7-git-send-email-bigeasy@linutronix.de>
* Sebastian Andrzej Siewior <bigeasy@linutronix.de> [140709 10:52]:
>
> v1?v2:
> - added runtime PM. Could somebody could plese double check
> this? I seems to be enabled and nothing explodes. However
> serial_omap_get_context_loss_count() & enable_wakeup() are
> NULL pointer (in the omap-serial driver). So I am not sure how
> this supposed to work :)
> - added omap_8250_set_termios()
You can test this pretty easily on beagleboard xm for example
using v3.16-r4:
1. Compile the kernel using omap2plus_defconfig and enable your
driver. USB EHCI needs to be disabled and OTG port should
not have a USB cable connected.
2. Boot with init=/bin/sh to keep user space timers to minimum
at least until you have verified to hit off-idle
3. Enable UART timeouts with something like this. You may need
to update it for ttyS, I just changed ttyO to ttyS here:
#!/bin/bash
uarts=$(find /sys/class/tty/ttyS*/device/power/ -type d)
for uart in $uarts; do
echo 3000 > $uart/autosuspend_delay_ms
done
uarts=$(find /sys/class/tty/ttyS*/power/ -type d)
for uart in $uarts; do
echo enabled > $uart/wakeup
echo auto > $uart/control
done
echo 1 > /sys/kernel/debug/pm_debug/enable_off_mode
4. Wait for UART to time out and verify you hit off-idle by
looking at the debugfs entry:
# cat /sys/kernel/debug/pm_debug/count
...
core_pwrdm (ON),OFF:6,RET:0,INA:0,ON:7,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:0,RET-MEMBANK2-OFF:0
...
I just tried testing this, but did not get far on my omap3 evm:
[ 5.445953] Unhandled fault: external abort on non-linefetch (0x1028) at 0xfb020000
[ 5.453674] Internal error: : 1028 [#1] SMP ARM
[ 5.458221] Modules linked in:
[ 5.461334] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.16.0-rc4-00006-gaab2c6a #98
[ 5.469024] task: ce058b00 ti: ce05a000 task.ti: ce05a000
[ 5.474456] PC is at mem32_serial_in+0xc/0x1c
[ 5.478851] LR is at serial8250_do_startup+0xc8/0x89c
[ 5.483917] pc : [<c0346f90>] lr : [<c034ab2c>] psr: 60000113
[ 5.483917] sp : ce05bd10 ip : c0a0aba8 fp : ce275400
[ 5.495452] r10: 00000000 r9 : cda7a680 r8 : ce27568c
[ 5.500701] r7 : ce275400 r6 : 00000000 r5 : ce280408 r4 : c10b6234
[ 5.507263] r3 : fb020000 r2 : 00000002 r1 : fb020000 r0 : c10b6234
[ 5.513854] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
[ 5.521179] Control: 10c5387d Table: 80004019 DAC: 00000015
[ 5.526977] Process swapper/0 (pid: 1, stack limit = 0xce05a248)
[ 5.532989] Stack: (0xce05bd10 to 0xce05c000)
...
[ 5.734771] [<c0346f90>] (mem32_serial_in) from [<c034ab2c>] (serial8250_do_startup+0xc8/0x89c)
[ 5.743530] [<c034ab2c>] (serial8250_do_startup) from [<c03461f8>] (uart_startup.part.3+0x7c/0x1dc)
[ 5.752624] [<c03461f8>] (uart_startup.part.3) from [<c0346d68>] (uart_open+0xe4/0x124)
[ 5.760681] [<c0346d68>] (uart_open) from [<c032c19c>] (tty_open+0x130/0x58c)
[ 5.767852] [<c032c19c>] (tty_open) from [<c01216f4>] (chrdev_open+0x9c/0x174)
[ 5.775115] [<c01216f4>] (chrdev_open) from [<c011b8d4>] (do_dentry_open+0x1d0/0x310)
[ 5.783020] [<c011b8d4>] (do_dentry_open) from [<c011bd98>] (finish_open+0x34/0x4c)
[ 5.790710] [<c011bd98>] (finish_open) from [<c012a8f8>] (do_last.isra.27+0x5a4/0xb98)
[ 5.798675] [<c012a8f8>] (do_last.isra.27) from [<c012afa0>] (path_openat+0xb4/0x5e4)
[ 5.806549] [<c012afa0>] (path_openat) from [<c012b7dc>] (do_filp_open+0x2c/0x80)
[ 5.814086] [<c012b7dc>] (do_filp_open) from [<c011cd14>] (do_sys_open+0x100/0x1d0)
[ 5.821777] [<c011cd14>] (do_sys_open) from [<c07b7ce0>] (kernel_init_freeable+0x124/0x1c8)
[ 5.830200] [<c07b7ce0>] (kernel_init_freeable) from [<c054eb90>] (kernel_init+0x8/0xe4)
[ 5.838348] [<c054eb90>] (kernel_init) from [<c000e868>] (ret_from_fork+0x14/0x2c)
Sounds like the clocks are not enabled properly?
Regards,
Tony
next prev parent reply other threads:[~2014-07-10 7:09 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-09 17:49 No subject Sebastian Andrzej Siewior
2014-07-09 17:49 ` [PATCH 1/6] tty: serial: 8250 core: provide a function to export uart_8250_port Sebastian Andrzej Siewior
2014-07-10 14:30 ` Olivier Galibert
2014-07-16 8:22 ` Sebastian Andrzej Siewior
2014-07-09 17:49 ` [PATCH 2/6] tty: serial: 8250 core: allow to overwrite & export serial8250_startup() Sebastian Andrzej Siewior
2014-07-10 14:54 ` One Thousand Gnomes
2014-07-10 14:55 ` Sebastian Andrzej Siewior
2014-07-09 17:49 ` [PATCH 3/6] tty: serial: 8250 core: add runtime pm Sebastian Andrzej Siewior
2014-07-10 6:28 ` Tony Lindgren
2014-07-16 8:26 ` Sebastian Andrzej Siewior
2014-07-21 13:34 ` Mika Westerberg
2014-07-09 17:49 ` [PATCH 4/6] tty: serial: 8250-core: reorder serial8250_stop_rx() & serial8250_start_tx() Sebastian Andrzej Siewior
2014-07-09 17:49 ` [PATCH 5/6] tty: serial: 8250-core: add rs485 support Sebastian Andrzej Siewior
2014-07-09 19:01 ` Lennart Sorensen
2014-07-10 15:55 ` Sebastian Andrzej Siewior
2014-07-10 14:52 ` One Thousand Gnomes
2014-07-09 17:49 ` [PATCH 6/6] tty: serial: Add 8250-core based omap driver Sebastian Andrzej Siewior
2014-07-10 7:09 ` Tony Lindgren [this message]
2014-07-10 15:47 ` Sebastian Andrzej Siewior
2014-07-10 16:03 ` Carlos Hernandez
2014-07-10 16:14 ` menon.nishanth at gmail.com
2014-07-11 6:41 ` Tony Lindgren
2014-07-16 12:11 ` Sebastian Andrzej Siewior
2014-07-16 12:32 ` Tony Lindgren
2014-07-16 13:00 ` Sekhar Nori
2014-08-08 11:05 ` Heikki Krogerus
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=20140710070948.GH28884@atomide.com \
--to=tony@atomide.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).