* [PATCH] [POWERPC] 86xx: mpc8610_hpcd: fix second serial port
@ 2008-05-12 12:35 Anton Vorontsov
2008-05-12 15:39 ` Kumar Gala
0 siblings, 1 reply; 2+ messages in thread
From: Anton Vorontsov @ 2008-05-12 12:35 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, Timur Tabi
DIU platform code should not just write to the PIXIS' BRDCFG0 register,
it should set and clear its own bits only, otherwise it will break
firmware setup (in fact it breaks second uart).
Also get rid of magic numbers in the related code.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
index 71dbd9d..4c61a10 100644
--- a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
+++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
@@ -285,11 +285,21 @@ void mpc8610hpcd_set_gamma_table(int monitor_port, char *gamma_table_base)
}
}
+#define PX_BRDCFG0_DVISEL (1 << 3)
+#define PX_BRDCFG0_DLINK (1 << 4)
+#define PX_BRDCFG0_DIU_MASK (PX_BRDCFG0_DVISEL | PX_BRDCFG0_DLINK)
+
void mpc8610hpcd_set_monitor_port(int monitor_port)
{
- static const u8 bdcfg[] = {0xBD, 0xB5, 0xA5};
+ static const u8 bdcfg[] = {
+ PX_BRDCFG0_DVISEL | PX_BRDCFG0_DLINK,
+ PX_BRDCFG0_DLINK,
+ 0,
+ };
+
if (monitor_port < 3)
- *pixis_bdcfg0 = bdcfg[monitor_port];
+ clrsetbits_8(pixis_bdcfg0, PX_BRDCFG0_DIU_MASK,
+ bdcfg[monitor_port]);
}
void mpc8610hpcd_set_pixel_clock(unsigned int pixclock)
--
1.5.5.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] [POWERPC] 86xx: mpc8610_hpcd: fix second serial port
2008-05-12 12:35 [PATCH] [POWERPC] 86xx: mpc8610_hpcd: fix second serial port Anton Vorontsov
@ 2008-05-12 15:39 ` Kumar Gala
0 siblings, 0 replies; 2+ messages in thread
From: Kumar Gala @ 2008-05-12 15:39 UTC (permalink / raw)
To: Anton Vorontsov; +Cc: linuxppc-dev, Timur Tabi
On May 12, 2008, at 7:35 AM, Anton Vorontsov wrote:
> DIU platform code should not just write to the PIXIS' BRDCFG0
> register,
> it should set and clear its own bits only, otherwise it will break
> firmware setup (in fact it breaks second uart).
>
> Also get rid of magic numbers in the related code.
>
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
> arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 14 ++++++++++++--
> 1 files changed, 12 insertions(+), 2 deletions(-)
applied.
- k
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-12 15:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-12 12:35 [PATCH] [POWERPC] 86xx: mpc8610_hpcd: fix second serial port Anton Vorontsov
2008-05-12 15:39 ` Kumar Gala
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).