From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Johannes Thumshirn <johannes.thumshirn@men.de>
Cc: Jiri Slaby <jslaby@suse.cz>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty: serial: men_z135_uart: Fix driver for changes in hardware
Date: Mon, 8 Sep 2014 16:17:33 -0700 [thread overview]
Message-ID: <20140908231733.GB23907@kroah.com> (raw)
In-Reply-To: <1409229140-14407-1-git-send-email-johannes.thumshirn@men.de>
On Thu, Aug 28, 2014 at 02:32:20PM +0200, Johannes Thumshirn wrote:
> 16z135 IP Core has changed so the driver needs to be updated to respect
> these changes. The following changes have been made:
>
> * Don't invert the 16z135 modem status register when reading.
> * Add module parameter to configure the (baud rate dependent) RX timeout.
> Character timeout in seconds = (timeout_reg * baud_reg * 4)/freq_reg.
> * Enable the handling of UART core's automatic flow control feature.
> When AFE is active disable generation of modem status IRQs.
> * Rework the handling of IRQs to be conform with newer FPGA versions and
> take precautions not to miss an interrupt because of the destructive read
> of the IIR register.
>
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@men.de>
> ---
> drivers/tty/serial/men_z135_uart.c | 87 +++++++++++++++++++++++---------------
> 1 file changed, 53 insertions(+), 34 deletions(-)
>
> diff --git a/drivers/tty/serial/men_z135_uart.c b/drivers/tty/serial/men_z135_uart.c
> index 30e9e60..d31b8a4 100644
> --- a/drivers/tty/serial/men_z135_uart.c
> +++ b/drivers/tty/serial/men_z135_uart.c
> @@ -34,12 +34,11 @@
> #define MEN_Z135_CONF_REG 0x808
> #define MEN_Z135_UART_FREQ 0x80c
> #define MEN_Z135_BAUD_REG 0x810
> -#define MENZ135_TIMEOUT 0x814
> +#define MEN_Z135_TIMEOUT 0x814
>
> #define MEN_Z135_MEM_SIZE 0x818
>
> -#define IS_IRQ(x) ((x) & 1)
> -#define IRQ_ID(x) (((x) >> 1) & 7)
> +#define IRQ_ID(x) ((x) & 0x1f)
>
> #define MEN_Z135_IER_RXCIEN BIT(0) /* RX Space IRQ */
> #define MEN_Z135_IER_TXCIEN BIT(1) /* TX Space IRQ */
> @@ -94,11 +93,11 @@
> #define MEN_Z135_LSR_TEXP BIT(6)
> #define MEN_Z135_LSR_RXFIFOERR BIT(7)
>
> -#define MEN_Z135_IRQ_ID_MST 0
> -#define MEN_Z135_IRQ_ID_TSA 1
> -#define MEN_Z135_IRQ_ID_RDA 2
> -#define MEN_Z135_IRQ_ID_RLS 3
> -#define MEN_Z135_IRQ_ID_CTI 6
> +#define MEN_Z135_IRQ_ID_RLS BIT(0)
> +#define MEN_Z135_IRQ_ID_RDA BIT(1)
> +#define MEN_Z135_IRQ_ID_CTI BIT(2)
> +#define MEN_Z135_IRQ_ID_TSA BIT(3)
> +#define MEN_Z135_IRQ_ID_MST BIT(4)
>
> #define LCR(x) (((x) >> MEN_Z135_LCR_SHIFT) & 0xff)
>
> @@ -118,6 +117,10 @@ static int align;
> module_param(align, int, S_IRUGO);
> MODULE_PARM_DESC(align, "Keep hardware FIFO write pointer aligned, default 0");
>
> +static int rx_timeout;
> +module_param(rx_timeout, uint, S_IRUGO);
> +MODULE_PARM_DESC(rx_timeout, "RX timeout");
Why add a module parameter? Who will know to set this? And to what
value?
And what about this driver working on old hardware, didn't you just
break this?
thanks,
greg k-h
next prev parent reply other threads:[~2014-09-08 23:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-28 12:32 [PATCH] tty: serial: men_z135_uart: Fix driver for changes in hardware Johannes Thumshirn
2014-08-28 12:32 ` Johannes Thumshirn
2014-09-08 23:17 ` Greg Kroah-Hartman [this message]
2014-09-09 5:56 ` Johannes Thumshirn
2014-09-09 5:56 ` Johannes Thumshirn
2014-09-10 0:26 ` Greg Kroah-Hartman
2014-09-10 6:07 ` Johannes Thumshirn
2014-09-10 6:07 ` Johannes Thumshirn
2014-09-10 18:33 ` Greg Kroah-Hartman
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=20140908231733.GB23907@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=johannes.thumshirn@men.de \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.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.