linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/85xx: clamp the P1022DS DIU pixel clock to allowed values
@ 2011-06-23 19:48 Timur Tabi
  2011-06-23 19:48 ` [PATCH] powerpc/85xx: enable the framebuffer console for the defconfigs Timur Tabi
  2011-06-27 13:35 ` [PATCH] powerpc/85xx: clamp the P1022DS DIU pixel clock to allowed values Kumar Gala
  0 siblings, 2 replies; 4+ messages in thread
From: Timur Tabi @ 2011-06-23 19:48 UTC (permalink / raw)
  To: kumar.gala, linuxppc-dev

To ensure that the DIU pixel clock will not be set to an invalid value,
clamp the PXCLK divider to the allowed range (2-255).  This also acts as
a limiter for the pixel clock.

Signed-off-by: Timur Tabi <timur@freescale.com>
---
 arch/powerpc/platforms/85xx/p1022_ds.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/85xx/p1022_ds.c b/arch/powerpc/platforms/85xx/p1022_ds.c
index e083e1f..266b3aa 100644
--- a/arch/powerpc/platforms/85xx/p1022_ds.c
+++ b/arch/powerpc/platforms/85xx/p1022_ds.c
@@ -195,8 +195,13 @@ void p1022ds_set_pixel_clock(unsigned int pixclock)
 	do_div(temp, pixclock);
 	freq = temp;
 
-	/* pixclk is the ratio of the platform clock to the pixel clock */
+	/*
+	 * 'pxclk' is the ratio of the platform clock to the pixel clock.
+	 * This number is programmed into the CLKDVDR register, and the valid
+	 * range of values is 2-255.
+	 */
 	pxclk = DIV_ROUND_CLOSEST(fsl_get_sys_freq(), freq);
+	pxclk = clamp_t(u32, pxclk, 2, 255);
 
 	/* Disable the pixel clock, and set it to non-inverted and no delay */
 	clrbits32(&guts->clkdvdr,
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] powerpc/85xx: enable the framebuffer console for the defconfigs
  2011-06-23 19:48 [PATCH] powerpc/85xx: clamp the P1022DS DIU pixel clock to allowed values Timur Tabi
@ 2011-06-23 19:48 ` Timur Tabi
  2011-06-27 13:35   ` Kumar Gala
  2011-06-27 13:35 ` [PATCH] powerpc/85xx: clamp the P1022DS DIU pixel clock to allowed values Kumar Gala
  1 sibling, 1 reply; 4+ messages in thread
From: Timur Tabi @ 2011-06-23 19:48 UTC (permalink / raw)
  To: kumar.gala, linuxppc-dev

Enable framebuffer console support by default in the defconfigs for the
Freescale 85xx-based reference board.  This allows the boot messages to
be shown on the video display on the P1022DS.

Signed-off-by: Timur Tabi <timur@freescale.com>
---
 arch/powerpc/configs/mpc85xx_defconfig     |    4 ++++
 arch/powerpc/configs/mpc85xx_smp_defconfig |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/configs/mpc85xx_defconfig b/arch/powerpc/configs/mpc85xx_defconfig
index 96b89df..b212e3d 100644
--- a/arch/powerpc/configs/mpc85xx_defconfig
+++ b/arch/powerpc/configs/mpc85xx_defconfig
@@ -128,6 +128,10 @@ CONFIG_VIDEO_OUTPUT_CONTROL=y
 CONFIG_FB=y
 CONFIG_FB_FSL_DIU=y
 # CONFIG_VGA_CONSOLE is not set
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
 CONFIG_SOUND=y
 CONFIG_SND=y
 # CONFIG_SND_SUPPORT_OLD_API is not set
diff --git a/arch/powerpc/configs/mpc85xx_smp_defconfig b/arch/powerpc/configs/mpc85xx_smp_defconfig
index de65841..87fbb2e 100644
--- a/arch/powerpc/configs/mpc85xx_smp_defconfig
+++ b/arch/powerpc/configs/mpc85xx_smp_defconfig
@@ -130,6 +130,10 @@ CONFIG_VIDEO_OUTPUT_CONTROL=y
 CONFIG_FB=y
 CONFIG_FB_FSL_DIU=y
 # CONFIG_VGA_CONSOLE is not set
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
 CONFIG_SOUND=y
 CONFIG_SND=y
 # CONFIG_SND_SUPPORT_OLD_API is not set
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc/85xx: enable the framebuffer console for the defconfigs
  2011-06-23 19:48 ` [PATCH] powerpc/85xx: enable the framebuffer console for the defconfigs Timur Tabi
@ 2011-06-27 13:35   ` Kumar Gala
  0 siblings, 0 replies; 4+ messages in thread
From: Kumar Gala @ 2011-06-27 13:35 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev


On Jun 23, 2011, at 2:48 PM, Timur Tabi wrote:

> Enable framebuffer console support by default in the defconfigs for the
> Freescale 85xx-based reference board.  This allows the boot messages to
> be shown on the video display on the P1022DS.
> 
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> arch/powerpc/configs/mpc85xx_defconfig     |    4 ++++
> arch/powerpc/configs/mpc85xx_smp_defconfig |    4 ++++
> 2 files changed, 8 insertions(+), 0 deletions(-)

applied to next

- K

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc/85xx: clamp the P1022DS DIU pixel clock to allowed values
  2011-06-23 19:48 [PATCH] powerpc/85xx: clamp the P1022DS DIU pixel clock to allowed values Timur Tabi
  2011-06-23 19:48 ` [PATCH] powerpc/85xx: enable the framebuffer console for the defconfigs Timur Tabi
@ 2011-06-27 13:35 ` Kumar Gala
  1 sibling, 0 replies; 4+ messages in thread
From: Kumar Gala @ 2011-06-27 13:35 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linuxppc-dev


On Jun 23, 2011, at 2:48 PM, Timur Tabi wrote:

> To ensure that the DIU pixel clock will not be set to an invalid value,
> clamp the PXCLK divider to the allowed range (2-255).  This also acts as
> a limiter for the pixel clock.
> 
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> arch/powerpc/platforms/85xx/p1022_ds.c |    7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)


applied to next

- K

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-06-27 13:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-23 19:48 [PATCH] powerpc/85xx: clamp the P1022DS DIU pixel clock to allowed values Timur Tabi
2011-06-23 19:48 ` [PATCH] powerpc/85xx: enable the framebuffer console for the defconfigs Timur Tabi
2011-06-27 13:35   ` Kumar Gala
2011-06-27 13:35 ` [PATCH] powerpc/85xx: clamp the P1022DS DIU pixel clock to allowed values 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).