From: "Grant Likely" <grant.likely@secretlab.ca>
To: "John Rigby" <jrigby@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 5/7] Separate MPC52xx PSC FIFO registers from rest of PSC
Date: Tue, 8 Jan 2008 10:26:24 -0700 [thread overview]
Message-ID: <fa686aa40801080926j20394811u3349462455d0ce24@mail.gmail.com> (raw)
In-Reply-To: <1199808093-15929-6-git-send-email-jrigby@freescale.com>
On 1/8/08, John Rigby <jrigby@freescale.com> wrote:
> This is in preparation for the addition of MPC512x
> PSC support. The main difference in the 512x is
> in the fifo registers.
>
> Signed-off-by: John Rigby <jrigby@freescale.com>
Looks good, I'll pick this one up.
Acked-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> drivers/serial/mpc52xx_uart.c | 10 ++++++----
> include/asm-powerpc/mpc52xx_psc.h | 3 +++
> include/asm-ppc/mpc52xx_psc.h | 3 +++
> 3 files changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
> index ec36ad7..25a91c9 100644
> --- a/drivers/serial/mpc52xx_uart.c
> +++ b/drivers/serial/mpc52xx_uart.c
> @@ -111,6 +111,7 @@ static void mpc52xx_uart_of_enumerate(void);
> #endif
>
> #define PSC(port) ((struct mpc52xx_psc __iomem *)((port)->membase))
> +#define FIFO(port) ((struct mpc52xx_psc_fifo __iomem *)(PSC(port)+1))
>
>
> /* Forward declaration of the interruption handling routine */
> @@ -222,6 +223,7 @@ static int
> mpc52xx_uart_startup(struct uart_port *port)
> {
> struct mpc52xx_psc __iomem *psc = PSC(port);
> + struct mpc52xx_psc_fifo __iomem *fifo = FIFO(port);
> int ret;
>
> /* Request IRQ */
> @@ -238,10 +240,10 @@ mpc52xx_uart_startup(struct uart_port *port)
>
> out_be16(&psc->mpc52xx_psc_clock_select, 0xdd00); /* /16 prescaler on */
>
> - out_8(&psc->rfcntl, 0x00);
> - out_be16(&psc->rfalarm, 0x1ff);
> - out_8(&psc->tfcntl, 0x07);
> - out_be16(&psc->tfalarm, 0x80);
> + out_8(&fifo->rfcntl, 0x00);
> + out_be16(&fifo->rfalarm, 0x1ff);
> + out_8(&fifo->tfcntl, 0x07);
> + out_be16(&fifo->tfalarm, 0x80);
>
> port->read_status_mask |= MPC52xx_PSC_IMR_RXRDY | MPC52xx_PSC_IMR_TXRDY;
> out_be16(&psc->mpc52xx_psc_imr,port->read_status_mask);
> diff --git a/include/asm-powerpc/mpc52xx_psc.h b/include/asm-powerpc/mpc52xx_psc.h
> index 26690d2..bea42b9 100644
> --- a/include/asm-powerpc/mpc52xx_psc.h
> +++ b/include/asm-powerpc/mpc52xx_psc.h
> @@ -153,6 +153,9 @@ struct mpc52xx_psc {
> u8 reserved16[3];
> u8 irfdr; /* PSC + 0x54 */
> u8 reserved17[3];
> +};
> +
> +struct mpc52xx_psc_fifo {
> u16 rfnum; /* PSC + 0x58 */
> u16 reserved18;
> u16 tfnum; /* PSC + 0x5c */
> diff --git a/include/asm-ppc/mpc52xx_psc.h b/include/asm-ppc/mpc52xx_psc.h
> index c82b8d4..39fcd02 100644
> --- a/include/asm-ppc/mpc52xx_psc.h
> +++ b/include/asm-ppc/mpc52xx_psc.h
> @@ -159,6 +159,9 @@ struct mpc52xx_psc {
> u8 reserved16[3];
> u8 irfdr; /* PSC + 0x54 */
> u8 reserved17[3];
> +};
> +
> +struct mpc52xx_psc_fifo {
> u16 rfnum; /* PSC + 0x58 */
> u16 reserved18;
> u16 tfnum; /* PSC + 0x5c */
> --
> 1.5.3.5.726.g41a7a
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
next prev parent reply other threads:[~2008-01-08 17:26 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-08 16:01 [PATCH 0/7] mpc5121 support John Rigby
2008-01-08 16:01 ` [PATCH 1/7] mpc5121: Add IPIC config option John Rigby
2008-01-08 16:01 ` [PATCH 2/7] Add mpc512x ipic support John Rigby
2008-01-08 16:01 ` [PATCH 3/7] Basic Freescale MPC512x support John Rigby
2008-01-08 16:01 ` [PATCH 4/7] Device tree for MPC5121 ADS John Rigby
2008-01-08 16:01 ` [PATCH 5/7] Separate MPC52xx PSC FIFO registers from rest of PSC John Rigby
2008-01-08 16:01 ` [PATCH 6/7] Add mpc512x_find_ips_freq John Rigby
2008-01-08 16:01 ` [PATCH 7/7] Add MPC512x PSC serial driver John Rigby
2008-01-08 17:32 ` Grant Likely
2008-01-08 17:47 ` John Rigby
2008-01-08 20:16 ` Grant Likely
2008-01-09 3:16 ` Stephen Rothwell
2008-01-09 6:06 ` Stephen Rothwell
2008-01-08 17:27 ` [PATCH 6/7] Add mpc512x_find_ips_freq Grant Likely
2008-01-08 18:15 ` Arnd Bergmann
2008-01-08 17:26 ` Grant Likely [this message]
2008-01-08 17:25 ` [PATCH 4/7] Device tree for MPC5121 ADS Grant Likely
2008-01-08 19:22 ` Scott Wood
2008-01-10 2:18 ` David Gibson
2008-01-08 17:19 ` [PATCH 3/7] Basic Freescale MPC512x support Grant Likely
2008-01-08 17:55 ` Scott Wood
2008-01-08 17:56 ` Grant Likely
2008-01-08 19:25 ` Scott Wood
2008-01-08 20:37 ` Generic desktop/server/laptop lable is confusing [Was Re: [PATCH 3/7] Basic Freescale MPC512x support] John Rigby
2008-01-08 21:40 ` Grant Likely
2008-01-08 21:46 ` Scott Wood
2008-01-08 17:40 ` [PATCH 3/7] Basic Freescale MPC512x support Olof Johansson
2008-01-08 17:44 ` Jon Loeliger
2008-01-08 18:01 ` John Rigby
2008-01-08 18:13 ` Arnd Bergmann
2008-01-08 18:16 ` John Rigby
2008-01-08 18:07 ` Arnd Bergmann
2008-01-08 18:25 ` John Rigby
2008-01-09 2:36 ` Stephen Rothwell
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=fa686aa40801080926j20394811u3349462455d0ce24@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=jrigby@freescale.com \
--cc=linuxppc-dev@ozlabs.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).