davinci: add CDCE949 support on DM6467 EVM
authorNageswari Srinivasan <nageswari@ti.com>
Wed, 6 Jan 2010 11:49:49 +0000 (17:19 +0530)
committerKevin Hilman <khilman@deeprootsystems.com>
Thu, 4 Feb 2010 21:29:59 +0000 (13:29 -0800)
This patch adds the CDCE949 reference oscillator to
the davinci clock list.

On the DM6467T EVM, the CDCE949 is responsible for
generating the pixel clock for display. On the DM6467
EVM, this pixel clock was being obtained from an
internal source. This is not possible on the DM6467T
EVM because of the presence of a 33MHz oscillator.

The TSIF module also requires the CDCE949 to generate
the data clocks.

The actual clock definitions will be added by patches
adding support for DM6467T VPIF and TSIF. This patch
mearly lays the foundation for that work.

Signed-off-by: Nageswari Srinivasan <nageswari@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
arch/arm/mach-davinci/Makefile
arch/arm/mach-davinci/board-dm646x-evm.c

index d0fed3a67100757dd782627a5b5765ab8c269cd5..6aac880eb79422dc13c5cee16b47f91fd7902bb1 100644 (file)
@@ -26,7 +26,7 @@ obj-$(CONFIG_MACH_SFFSDR)             += board-sffsdr.o
 obj-$(CONFIG_MACH_NEUROS_OSD2)         += board-neuros-osd2.o
 obj-$(CONFIG_MACH_DAVINCI_DM355_EVM)   += board-dm355-evm.o
 obj-$(CONFIG_MACH_DM355_LEOPARD)       += board-dm355-leopard.o
-obj-$(CONFIG_MACH_DAVINCI_DM6467_EVM)  += board-dm646x-evm.o
+obj-$(CONFIG_MACH_DAVINCI_DM6467_EVM)  += board-dm646x-evm.o cdce949.o
 obj-$(CONFIG_MACH_DAVINCI_DM365_EVM)   += board-dm365-evm.o
 obj-$(CONFIG_MACH_DAVINCI_DA830_EVM)   += board-da830-evm.o
 obj-$(CONFIG_MACH_DAVINCI_DA850_EVM)   += board-da850-evm.o
index 542bfdbbea0f287dee9291edaaae9d2c5fc259b8..815067b2413e6eb12c77fa6a1de113278a39ed3d 100644 (file)
@@ -40,6 +40,8 @@
 #include <mach/serial.h>
 #include <mach/i2c.h>
 #include <mach/nand.h>
+#include <mach/clock.h>
+#include <mach/cdce949.h>
 
 #include "clock.h"
 
@@ -389,6 +391,9 @@ static struct i2c_board_info __initdata i2c_info[] =  {
        {
                I2C_BOARD_INFO("cpld_video", 0x3b),
        },
+       {
+               I2C_BOARD_INFO("cdce949", 0x6c),
+       },
 };
 
 static struct davinci_i2c_platform_data i2c_pdata = {
@@ -681,9 +686,35 @@ static void __init evm_init_i2c(void)
        evm_init_video();
 }
 
+#define CDCE949_XIN_RATE       27000000
+
+/* CDCE949 support - "lpsc" field is overridden to work as clock number */
+static struct clk cdce_clk_in = {
+       .name   = "cdce_xin",
+       .rate   = CDCE949_XIN_RATE,
+};
+
+static struct davinci_clk cdce_clks[] = {
+       CLK(NULL, "xin", &cdce_clk_in),
+       CLK(NULL, NULL, NULL),
+};
+
+static void __init cdce_clk_init(void)
+{
+       struct davinci_clk *c;
+       struct clk *clk;
+
+       for (c = cdce_clks; c->lk.clk; c++) {
+               clk = c->lk.clk;
+               clkdev_add(&c->lk);
+               clk_register(clk);
+       }
+}
+
 static void __init davinci_map_io(void)
 {
        dm646x_init();
+       cdce_clk_init();
 }
 
 static struct davinci_uart_config uart_config __initdata = {