From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Srinivas KANDAGATLA <srinivas.kandagatla@st.com>,
linux-doc@vger.kernel.org, Viresh Kumar <viresh.kumar@linaro.org>,
Will Deacon <will.deacon@arm.com>,
jslaby@suse.cz, Russell King <linux@arm.linux.org.uk>,
Samuel Ortiz <sameo@linux.intel.com>,
Nicolas Pitre <nico@linaro.org>,
Stephen Gallimore <stephen.gallimore@st.com>,
linux-serial@vger.kernel.org, Jason Cooper <jason@lakedaemon.net>,
devicetree-discuss@lists.ozlabs.org,
Rob Herring <rob.herring@calxeda.com>,
Stuart Menefy <stuart.menefy@st.com>,
Stephen Warren <swarren@nvidia.com>,
Dong Aisheng <dong.aisheng@linaro.org>,
linux-arm-kernel@lists.infradead.org, gregkh@linuxfoundation.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC 1/8] serial:st-asc: Add ST ASC driver.
Date: Wed, 8 May 2013 16:39:08 +0200 [thread overview]
Message-ID: <20130508143908.GJ24282@game.jcrosoft.org> (raw)
In-Reply-To: <201305081634.43498.arnd@arndb.de>
On 16:34 Wed 08 May , Arnd Bergmann wrote:
> On Wednesday 08 May 2013, Srinivas KANDAGATLA wrote:
> > From: Srinivas Kandagatla <srinivas.kandagatla@st.com>
>
> > +*st-asc(Serial Port)
> > +
> > +Required properties:
> > +- compatible : Should be "st,asc".
>
> Are there any hardware revision numbers for the asc? If there are potentially
> incompatible or backwards-compatible variants, it would be good to include
> the version in this string.
The st,asc come from st20 or st200 IIRC which was not ARM but a ST arch
and then used on st40 series
an the st,asc for st200 and st40 are not compatible completly
>
> > +- reg, reg-names, interrupts, interrupt-names : Standard way to define device
> > + resources with names. look in
> > + Documentation/devicetree/bindings/resource-names.txt
> > +
> > +Optional properties:
> > +- st,hw-flow-ctrl bool flag to enable hardware flow control.
> > +- st,force-m1 bool flat to force asc to be in Mode-1 recommeded
> > + for high bit rates (above 19.2K)
> > +Example:
> > +serial@fe440000{
> > + compatible = "st,asc";
> > + reg = <0xfe440000 0x2c>;
> > + interrupts = <0 209 0>;
> > +};
>
> I would also recommed adding a way to set the default baud rate through
> a property. Following the example of the 8250 driver, you should probably
> call that "current-speed".
on st it has always be 38k
>
> > diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
> > index 7e7006f..346f325 100644
> > --- a/drivers/tty/serial/Kconfig
> > +++ b/drivers/tty/serial/Kconfig
> > @@ -1484,6 +1484,25 @@ config SERIAL_RP2_NR_UARTS
> > If multiple cards are present, the default limit of 32 ports may
> > need to be increased.
> >
> > +config SERIAL_ST_ASC
> > + tristate "ST ASC serial port support"
> > + depends on PLAT_STIXXXX
> > + default y
> > + select SERIAL_CORE
> > + help
> > + This driver is for the on-chip Asychronous Serial Controller on
> > + STMicroelectronics STixxxx SoCs.
> > + ASC is embedded in ST COMMS IP block. It supports Rx & Tx functionality.
> > + It support all industry standard baud rates.
> > +
> > + If unsure, say N.
>
> I would not make it "default y".
me too
>
> > +config SERIAL_ST_ASC_CONSOLE
> > + bool "Support for console on ST ASC"
> > + depends on SERIAL_ST_ASC
> > + default y
> > + select SERIAL_CORE_CONSOLE
> > +
> > endmenu
>
> This needs to be "depends on SERIAL_ST_ASC=y". You would get a link error
> if you try to make SERIAL_ST_ASC a loadable module and SERIAL_ST_ASC_CONSOLE
> built-in.
>
> > +
> > +static struct asc_port asc_ports[ASC_MAX_PORTS];
> > +static struct uart_driver asc_uart_driver;
> > +
> > +/*---- Forward function declarations---------------------------*/
> > +static irqreturn_t asc_interrupt(int irq, void *ptr);
> > +static void asc_transmit_chars(struct uart_port *);
> > +static int asc_set_baud(struct asc_port *ascport, int baud);
> > +
>
> Please remove all forward declarations, by reordering the functions in
> the way they are called.
>
and drop the dummy functions
>
> > diff --git a/drivers/tty/serial/st-asc.h b/drivers/tty/serial/st-asc.h
> > new file mode 100644
> > index 0000000..e59f818
> > --- /dev/null
> > +++ b/drivers/tty/serial/st-asc.h
> > +#ifndef _ST_ASC_H
> > +#define _ST_ASC_H
> > +
> > +#include <linux/serial_core.h>
> > +#include <linux/clk.h>
> > +
> > +struct asc_port {
> > + struct uart_port port;
> > + struct clk *clk;
> > + unsigned int hw_flow_control:1;
> > + unsigned int check_parity:1;
> > + unsigned int force_m1:1;
> > +};
>
> Since this header file is only used in one place, just merge it into
> the driver itself.
>
> > +#define ASC_MAJOR 204
> > +#define ASC_MINOR_START 40
>
> I don't know what the current policy is on allocating major/minor numbers,
> but I'm sure you cannot just reuse one that is already used.
>
> Documentation/devices.txt lists the ones that are officially assigned.
> Can't you use dynamic allocation here?
>
> Arnd
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss
next prev parent reply other threads:[~2013-05-08 14:45 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1368022187-1633-1-git-send-email-srinivas.kandagatla@st.com>
2013-05-08 14:11 ` [RFC 2/8] ARM:global_timer: Add ARM global timer support Srinivas KANDAGATLA
2013-05-08 14:26 ` Rob Herring
2013-05-08 15:06 ` Stuart MENEFY
2013-05-08 14:38 ` Arnd Bergmann
2013-05-08 14:51 ` Steffen Trumtrar
2013-05-09 14:07 ` Srinivas KANDAGATLA
2013-05-09 14:51 ` Arnd Bergmann
2013-05-09 14:51 ` Srinivas KANDAGATLA
2013-05-08 14:11 ` [RFC 3/8] mfd:syscon: Introduce claim/read/write/release APIs Srinivas KANDAGATLA
2013-05-08 14:50 ` Arnd Bergmann
2013-05-08 15:01 ` Mark Brown
2013-05-08 17:42 ` Srinivas KANDAGATLA
2013-05-09 9:51 ` Mark Brown
2013-05-09 11:58 ` Srinivas KANDAGATLA
2013-05-09 13:26 ` Mark Brown
2013-05-09 14:00 ` Srinivas KANDAGATLA
2013-05-09 14:40 ` Mark Brown
2013-05-09 14:47 ` Srinivas KANDAGATLA
2013-05-10 12:51 ` Srinivas KANDAGATLA
2013-05-08 17:32 ` Srinivas KANDAGATLA
2013-05-08 19:48 ` Arnd Bergmann
2013-05-09 10:17 ` Srinivas KANDAGATLA
2013-05-17 14:36 ` Arnd Bergmann
2013-05-20 12:48 ` Srinivas KANDAGATLA
2013-05-23 21:44 ` Arnd Bergmann
2013-05-24 16:06 ` Srinivas KANDAGATLA
2013-05-08 14:11 ` =?y?q?=5BRFC=205/8=5D=20ARM=3Astih41x=3A=20Add=20STiH415=20SOC=20support?= Srinivas KANDAGATLA
2013-05-08 16:18 ` [RFC 5/8] ARM:stih41x: Add STiH415 SOC support Arnd Bergmann
2013-05-08 16:21 ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-08 16:50 ` Stephen GALLIMORE
2013-05-08 18:55 ` Arnd Bergmann
2013-05-09 11:09 ` Stephen GALLIMORE
2013-05-08 17:03 ` Srinivas KANDAGATLA
2013-05-08 14:11 ` [RFC 6/8] ARM:stih41x: Add STiH416 " Srinivas KANDAGATLA
2013-05-08 14:12 ` [RFC 7/8] ARM:stih41x: Add B2000 board support Srinivas KANDAGATLA
2013-05-08 16:20 ` Arnd Bergmann
2013-05-08 16:24 ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-08 17:04 ` Srinivas KANDAGATLA
2013-05-08 14:12 ` [RFC 8/8] ARM:stih41x: Add B2020 " Srinivas KANDAGATLA
[not found] ` <1368022248-2153-1-git-send-email-srinivas.kandagatla@st.com>
2013-05-08 14:34 ` [RFC 1/8] serial:st-asc: Add ST ASC driver Arnd Bergmann
2013-05-08 14:39 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2013-05-08 18:18 ` Srinivas KANDAGATLA
2013-05-08 19:55 ` Arnd Bergmann
[not found] ` <20130508153459.GA17186@kroah.com>
2013-05-08 15:40 ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-08 15:53 ` Greg KH
2013-05-08 16:03 ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-08 16:15 ` Greg KH
2013-05-08 16:31 ` Arnd Bergmann
2013-05-08 16:36 ` Greg KH
2013-05-10 23:29 ` Russell King - ARM Linux
2013-05-08 16:39 ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-08 16:45 ` Nicolas Pitre
2013-05-08 18:35 ` Arnd Bergmann
2013-05-09 13:36 ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-08 16:10 ` Stephen GALLIMORE
2013-05-10 13:50 ` Stephen GALLIMORE
2013-05-10 14:08 ` Greg KH
2013-05-08 18:02 ` Srinivas KANDAGATLA
2013-05-20 11:49 ` Stephen GALLIMORE
2013-05-22 15:13 ` Arnd Bergmann
2013-05-23 16:26 ` Stephen GALLIMORE
[not found] ` <1368022284-2283-1-git-send-email-srinivas.kandagatla@st.com>
2013-05-08 15:06 ` [RFC 4/8] pinctrl:stixxxx: Add pinctrl and pinconf support Jean-Christophe PLAGNIOL-VILLARD
2013-05-08 16:27 ` Srinivas KANDAGATLA
2013-05-08 16:38 ` Jean-Christophe PLAGNIOL-VILLARD
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=20130508143908.GJ24282@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=arnd@arndb.de \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=dong.aisheng@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=jason@lakedaemon.net \
--cc=jslaby@suse.cz \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=nico@linaro.org \
--cc=rob.herring@calxeda.com \
--cc=sameo@linux.intel.com \
--cc=srinivas.kandagatla@st.com \
--cc=stephen.gallimore@st.com \
--cc=stuart.menefy@st.com \
--cc=swarren@nvidia.com \
--cc=viresh.kumar@linaro.org \
--cc=will.deacon@arm.com \
/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
Powered by JetHome