From: Andrew Morton <akpm@linux-foundation.org>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: Ralf Baechle <ralf@linux-mips.org>,
Mark Mason <mason@broadcom.com>,
Andy Whitcroft <apw@shadowen.org>,
Randy Dunlap <rdunlap@xenotime.net>,
Joel Schopp <jschopp@austin.ibm.com>,
linux-mips@linux-mips.org, linux-serial@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sb1250-duart.c: SB1250 DUART serial support
Date: Thu, 12 Jul 2007 11:47:12 -0700 [thread overview]
Message-ID: <20070712114712.de5d6c9d.akpm@linux-foundation.org> (raw)
In-Reply-To: <Pine.LNX.4.64N.0707121745010.3029@blysk.ds.pg.gda.pl>
On Thu, 12 Jul 2007 18:39:00 +0100 (BST)
"Maciej W. Rozycki" <macro@linux-mips.org> wrote:
> This is a driver for the SB1250 DUART, a dual serial port implementation
> included in the Broadcom family of SOCs descending from the SiByte SB1250
> MIPS64 chip multiprocessor. It is a new implementation replacing the
> old-fashioned driver currently present in the linux-mips.org tree. It
> supports all the usual features one would expect from a(n asynchronous)
> serial driver, including modem line control (as far as hardware supports
> it -- there is edge detection logic missing from the DCD and RI lines and
> the driver does not implement polling of these lines at the moment), the
> serial console, BREAK transmission and reception, including the magic
> SysRq. The receive FIFO threshold is not maintained though.
>
> ...
>
> +
> +#if defined(CONFIG_SIBYTE_BCM1x55) || defined(CONFIG_SIBYTE_BCM1x80)
> +#include <asm/sibyte/bcm1480_regs.h>
> +#include <asm/sibyte/bcm1480_int.h>
> +
> +#define SBD_CHANREGS(line) A_BCM1480_DUART_CHANREG((line), 0)
> +#define SBD_CTRLREGS(line) A_BCM1480_DUART_CTRLREG((line), 0)
> +#define SBD_INT(line) (K_BCM1480_INT_UART_0 + (line))
> +
> +#elif defined(CONFIG_SIBYTE_SB1250) || defined(CONFIG_SIBYTE_BCM112X)
> +#include <asm/sibyte/sb1250_regs.h>
> +#include <asm/sibyte/sb1250_int.h>
> +
> +#define SBD_CHANREGS(line) A_DUART_CHANREG((line), 0)
> +#define SBD_CTRLREGS(line) A_DUART_CTRLREG(0)
> +#define SBD_INT(line) (K_INT_UART_0 + (line))
> +
> +#else
> +#error invalid SB1250 UART configuration
> +
> +#endif
If the #error can trigger, the Kconfig is broken, yes? (No action is
required though - it's always good to have checks)
> +#define to_sport(uport) container_of(uport, struct sbd_port, port)
That didn't need to be implemented as a macro.
> +#define __unused __attribute__((__unused__))
Please use the generic implementations here. `grep unused
include/linux/compiler*.h'.
> +/*
> + * In bug 1956, we get glitches that can mess up uart registers. This
> + * "read-mode-reg after any register access" is an accepted workaround.
> + */
<looks in bugzilla.kernel.org>
<wonders how a uart driver can fix an smbfs bug>
Perhaps a reference to where that bug number came from?
> +static void __war_sbd1956(struct sbd_port *sport)
> +{
> + __read_sbdchn(sport, R_DUART_MODE_REG_1);
> + __read_sbdchn(sport, R_DUART_MODE_REG_2);
> +}
>
> ...
>
> +static struct uart_ops sbd_ops = {
I suppose if we made this const, something would blow up.
There is no power management support in this driver.
next prev parent reply other threads:[~2007-07-12 18:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-12 17:39 [PATCH] sb1250-duart.c: SB1250 DUART serial support Maciej W. Rozycki
2007-07-12 17:43 ` Ralf Baechle
2007-07-12 17:50 ` Andy Whitcroft
2007-07-12 18:16 ` Maciej W. Rozycki
2007-07-12 19:15 ` Alistair John Strachan
2007-07-12 19:31 ` Andrew Morton
2007-07-12 18:47 ` Andrew Morton [this message]
2007-07-12 20:14 ` Andrew Sharp
2007-07-13 9:41 ` Maciej W. Rozycki
2007-07-13 14:48 ` Ralf Baechle
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=20070712114712.de5d6c9d.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=apw@shadowen.org \
--cc=jschopp@austin.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux-serial@vger.kernel.org \
--cc=macro@linux-mips.org \
--cc=mason@broadcom.com \
--cc=ralf@linux-mips.org \
--cc=rdunlap@xenotime.net \
/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).