From: dirk.behme@de.bosch.com (Dirk Behme)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] imx: add polled io uart methods
Date: Thu, 1 Dec 2011 11:32:43 +0100 [thread overview]
Message-ID: <4ED757CB.8030000@de.bosch.com> (raw)
In-Reply-To: <20111019035249.GA20598@lithium.compnerd.org>
On 19.10.2011 05:52, Saleem Abdulrasool wrote:
> On Tue, 18 Oct 2011, Uwe Kleine-K?nig wrote:
>
>> On Sun, Oct 16, 2011 at 08:22:01PM -0700, Saleem Abdulrasool wrote:
>>> These methods are invoked if the iMX uart is used in conjuction with kgdb during
>>> early boot. In order to access the UART without the interrupts, the kernel uses
>>> the basic polling methods for IO with the device. With these methods
>>> implemented, it is now possible to enable kgdb during early boot over serial.
>>>
>>> Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>
>>> ---
>>> drivers/tty/serial/imx.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++
>>> 1 files changed, 77 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
>>> index 7e91b3d..4fcf9ca 100644
>>> --- a/drivers/tty/serial/imx.c
>>> +++ b/drivers/tty/serial/imx.c
>>> @@ -102,6 +102,7 @@
>>> #define UCR2_STPB (1<<6) /* Stop */
>>> #define UCR2_WS (1<<5) /* Word size */
>>> #define UCR2_RTSEN (1<<4) /* Request to send interrupt enable */
>>> +#define UCR2_ATEN (1<<3) /* Aging Timer Enable */
>>> #define UCR2_TXEN (1<<2) /* Transmitter enabled */
>>> #define UCR2_RXEN (1<<1) /* Receiver enabled */
>>> #define UCR2_SRST (1<<0) /* SW reset */
>>> @@ -1075,6 +1076,77 @@ imx_verify_port(struct uart_port *port, struct serial_struct *ser)
>>> return ret;
>>> }
>>>
>>> +
>> needless newline
>
> Removed.
>
>>> +#if defined(CONFIG_CONSOLE_POLL)
>>> +static int imx_poll_get_char(struct uart_port *port)
>>> +{
>>> + volatile unsigned int status;
>> Why is that volatile?
>
> It shouldnt be, removed the volatile attribute. Im not sure why that was there,
> it really doesnt make any sense since there isnt any inline assembler there to
> confuse the compiler.
>
>>> + unsigned int cr1, cr2, cr3;
>>> + unsigned char c;
>>> +
>>> + /* save control registers */
>>> + cr1 = readl(port->membase + UCR1);
>>> + cr2 = readl(port->membase + UCR2);
>>> + cr3 = readl(port->membase + UCR3);
>>> +
>> Best regards
>> Uwe
>
> Thanks for the review. Ive not attached the updated patch since Id like to make
> the changes that Sascha suggested, and I shall post the updated patch
> subsequently.
Any update on this?
Many thanks
Dirk
prev parent reply other threads:[~2011-12-01 10:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-19 1:45 No subject Saleem Abdulrasool
2011-09-19 1:45 ` [PATCH] mxcuart: add polled io methods Saleem Abdulrasool
2011-09-21 3:50 ` Fabio Estevam
2011-10-17 3:22 ` [PATCH] imx: add polled io uart methods Saleem Abdulrasool
2011-10-17 3:22 ` Saleem Abdulrasool
2011-10-17 19:44 ` Fabio Estevam
2011-10-17 20:17 ` Sascha Hauer
2011-12-04 17:01 ` Dirk Behme
2011-10-18 7:27 ` Uwe Kleine-König
2011-10-19 3:52 ` Saleem Abdulrasool
2011-12-01 10:32 ` Dirk Behme [this message]
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=4ED757CB.8030000@de.bosch.com \
--to=dirk.behme@de.bosch.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.