From: Sascha Hauer <s.hauer@pengutronix.de>
To: Shawn Guo <shawn.guo@linaro.org>
Cc: linux-serial@vger.kernel.org,
devicetree-discuss@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org, patches@linaro.org,
Alan Cox <alan@linux.intel.com>
Subject: Re: [PATCH v3 1/2] serial/imx: get rid of the uses of cpu_is_mx1()
Date: Wed, 6 Jul 2011 18:37:40 +0200 [thread overview]
Message-ID: <20110706163740.GW6069@pengutronix.de> (raw)
In-Reply-To: <1309969814-13195-2-git-send-email-shawn.guo@linaro.org>
On Thu, Jul 07, 2011 at 12:30:13AM +0800, Shawn Guo wrote:
> The patch removes all the uses of cpu_is_mx1(). Instead, it uses
> the .id_table of platform_driver to distinguish the uart device type,
> IMX1_UART and IMX21_UART. The IMX21_UART type runs on all i.mx
> except i.mx1.
>
> A couple of !cpu_is_mx1() logic gets turned into IS_IMX21_UART,
> as the codes wrapped there are really IMX21 type uart specific.
>
> It also removes macro MX1_UCR3_REF25 and MX1_UCR3_REF30 which are
> not used anywhere.
Two typos and one minor nitpick, otherwise I'm fine with it. Should go
via the i.MX tree rather than the serial tree. Alan?
>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> Cc: Sascha Hauer <s.hauer@pengutronix.de>
> Cc: Alan Cox <alan@linux.intel.com>
> Acked-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> arch/arm/mach-imx/clock-imx1.c | 6 +-
> arch/arm/mach-imx/clock-imx21.c | 8 ++--
> arch/arm/mach-imx/clock-imx25.c | 11 ++--
> arch/arm/mach-imx/clock-imx27.c | 13 +++--
> arch/arm/mach-imx/clock-imx31.c | 11 ++--
> arch/arm/mach-imx/clock-imx35.c | 7 ++-
> arch/arm/mach-mx5/clock-mx51-mx53.c | 18 ++++---
> arch/arm/plat-mxc/devices/platform-imx-uart.c | 7 ++-
> drivers/tty/serial/imx.c | 66 ++++++++++++++++++++-----
> 9 files changed, 97 insertions(+), 50 deletions(-)
>
> diff --git a/arch/arm/mach-imx/clock-imx25.c b/arch/arm/mach-imx/clock-imx25.c
> index a65838f..42ef76a 100644
> --- a/arch/arm/mach-imx/clock-imx25.c
> +++ b/arch/arm/mach-imx/clock-imx25.c
> @@ -272,11 +272,12 @@ DEFINE_CLOCK(can2_clk, 1, CCM_CGCR1, 3, get_rate_ipg, NULL, NULL);
> },
>
> diff --git a/arch/arm/plat-mxc/devices/platform-imx-uart.c b/arch/arm/plat-mxc/devices/platform-imx-uart.c
> index cfce8c9..a425a5a 100644
> --- a/arch/arm/plat-mxc/devices/platform-imx-uart.c
> +++ b/arch/arm/plat-mxc/devices/platform-imx-uart.c
> @@ -152,7 +152,7 @@ struct platform_device *__init imx_add_imx_uart_3irq(
> },
> };
>
> - return imx_add_platform_device("imx-uart", data->id, res,
> + return imx_add_platform_device("imx1-uart", data->id, res,
> ARRAY_SIZE(res), pdata, sizeof(*pdata));
> }
>
> @@ -172,6 +172,7 @@ struct platform_device *__init imx_add_imx_uart_1irq(
> },
> };
>
> - return imx_add_platform_device("imx-uart", data->id, res, ARRAY_SIZE(res),
> - pdata, sizeof(*pdata));
> + /* i.mx21 type uart runs on all i.mx expcept i.mx1 */
s/expcept/except/
> #define UCR3_AIRINTEN (1<<5) /* Async IR wake interrupt enable */
> #define UCR3_AWAKEN (1<<4) /* Async wake interrupt enable */
> -#define MX1_UCR3_REF25 (1<<3) /* Ref freq 25 MHz, only on mx1 */
> -#define MX1_UCR3_REF30 (1<<2) /* Ref Freq 30 MHz, only on mx1 */
> -#define MX2_UCR3_RXDMUXSEL (1<<2) /* RXD Muxed Input Select, on mx2/mx3 */
> +#define IMX21_UCR3_RXDMUXSEL (1<<2) /* RXD Muxed Input Select */
> #define UCR3_INVT (1<<1) /* Inverted Infrared transmission */
> #define UCR3_BPEN (1<<0) /* Preset registers enable */
> #define UCR4_CTSTL_SHF 10 /* CTS trigger level shift */
> @@ -181,6 +179,18 @@
>
> #define UART_NR 8
>
> +/* i.mx21 type uart runs on all i.mx expcept i.mx1 */
ditto
>
> +#define UTS (sport->devdata->uts_reg)
> +#define IS_IMX1_UART() (sport->devdata->devtype == IMX1_UART)
> +#define IS_IMX21_UART() (sport->devdata->devtype == IMX21_UART)
Can we make this a static inline function?
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2011-07-06 16:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-06 16:30 [PATCH v3 0/2] Add device tree probe support for tty/serial/imx Shawn Guo
2011-07-06 16:30 ` [PATCH v3 1/2] serial/imx: get rid of the uses of cpu_is_mx1() Shawn Guo
2011-07-06 16:37 ` Sascha Hauer [this message]
2011-07-06 16:50 ` Shawn Guo
2011-07-06 16:30 ` [PATCH v3 2/2] serial/imx: add device tree probe support Shawn Guo
-- strict thread matches above, loose matches on Subject: below --
2011-07-06 17:20 [PATCH RESEND v3 0/2] Add device tree probe support for tty/serial/imx Shawn Guo
2011-07-06 17:20 ` [PATCH v3 1/2] serial/imx: get rid of the uses of cpu_is_mx1() Shawn Guo
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=20110706163740.GW6069@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=alan@linux.intel.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--cc=patches@linaro.org \
--cc=shawn.guo@linaro.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).