diff options
author | Puneet Saxena <puneets@nvidia.com> | 2012-01-20 15:31:55 +0530 |
---|---|---|
committer | Puneet Saxena <puneets@nvidia.com> | 2012-02-07 02:05:29 -0800 |
commit | f116864a29c5b29ed5b63c6aafc93442ba35f483 (patch) | |
tree | eb6d7b7521f88e75f13bb0ef8429a18708228c9b /arch/arm | |
parent | fbe8695649c2302a6513ebb4a24b3ce2d17c9e96 (diff) |
video: tegra: Change the clock settings for LCD driver
As clock source for graphics related clocks is different
for Tegra2 and Tegra3, define it under platform specific
directories.
BUG=chromium-os:23496
TEST=Build ok for Cardhu, Waluigi and Seaboard. Tested on Waluigi.
Original work by -
Mayuresh Kulkarni <mkulkarni@nvidia.com>
Change-Id: I6cee11df5e75eaf3836565c4fa4f3ab3e45d8cac
Signed-off-by: Puneet Saxena <puneets@nvidia.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/14700
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/cpu/armv7/tegra2/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/cpu/armv7/tegra2/display.c | 35 | ||||
-rw-r--r-- | arch/arm/cpu/armv7/tegra3/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/cpu/armv7/tegra3/display.c | 40 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-tegra/display.h | 3 |
5 files changed, 81 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/tegra2/Makefile b/arch/arm/cpu/armv7/tegra2/Makefile index 76457d9cf6b..0c1f989de1d 100644 --- a/arch/arm/cpu/armv7/tegra2/Makefile +++ b/arch/arm/cpu/armv7/tegra2/Makefile @@ -37,6 +37,7 @@ COBJS-y := board.o pinmux.o sys_info.o COBJS-$(CONFIG_TEGRA2_LP0) += warmboot.o COBJS-$(CONFIG_TEGRA2_LP0) += warmboot_avp.o +COBJS-$(CONFIG_VIDEO_TEGRA) += display.o SOBJS := $(SOBJS-y) COBJS := $(COBJS-y) diff --git a/arch/arm/cpu/armv7/tegra2/display.c b/arch/arm/cpu/armv7/tegra2/display.c new file mode 100644 index 00000000000..eb28dd30626 --- /dev/null +++ b/arch/arm/cpu/armv7/tegra2/display.c @@ -0,0 +1,35 @@ +/* + * (C) Copyright 2011 + * NVIDIA Corporation <www.nvidia.com> + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ +#include <common.h> +#include <asm/clocks.h> +#include <asm/arch/clock.h> + +void display_clk_init(void) +{ + /* TODO: Put this into the FDT when we have clock support there */ + clock_start_periph_pll(PERIPH_ID_3D, CLOCK_ID_MEMORY, CLK_300M); + clock_start_periph_pll(PERIPH_ID_2D, CLOCK_ID_MEMORY, CLK_300M); + clock_start_periph_pll(PERIPH_ID_HOST1X, CLOCK_ID_PERIPH, CLK_144M); + clock_start_periph_pll(PERIPH_ID_DISP1, CLOCK_ID_CGENERAL, CLK_600M); + clock_start_periph_pll(PERIPH_ID_PWM, CLOCK_ID_SFROM32KHZ, CLK_32768); +} diff --git a/arch/arm/cpu/armv7/tegra3/Makefile b/arch/arm/cpu/armv7/tegra3/Makefile index 0fe1db2a932..3a4bc802c5c 100644 --- a/arch/arm/cpu/armv7/tegra3/Makefile +++ b/arch/arm/cpu/armv7/tegra3/Makefile @@ -29,6 +29,8 @@ LIB = $(obj)lib$(SOC).o COBJS-y := board.o pinmux.o sys_info.o +COBJS-$(CONFIG_VIDEO_TEGRA) += display.o + COBJS := $(COBJS-y) SRCS := $(COBJS:.o=.c) diff --git a/arch/arm/cpu/armv7/tegra3/display.c b/arch/arm/cpu/armv7/tegra3/display.c new file mode 100644 index 00000000000..8f67af77fc1 --- /dev/null +++ b/arch/arm/cpu/armv7/tegra3/display.c @@ -0,0 +1,40 @@ +/* + * (C) Copyright 2011 + * NVIDIA Corporation <www.nvidia.com> + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ +#include <common.h> +#include <asm/clocks.h> +#include <asm/arch/clock.h> + +void display_clk_init(void) +{ + /* TODO: Put this into the FDT when we have clock support there */ + clock_start_periph_pll(PERIPH_ID_VI, CLOCK_ID_CGENERAL, CLK_228M); + clock_start_periph_pll(PERIPH_ID_3D, CLOCK_ID_CGENERAL, CLK_228M); + clock_start_periph_pll(PERIPH_ID_2D, CLOCK_ID_CGENERAL, CLK_228M); + clock_start_periph_pll(PERIPH_ID_HOST1X, CLOCK_ID_CGENERAL, CLK_114M); + clock_start_periph_pll(PERIPH_ID_3D2, CLOCK_ID_CGENERAL, CLK_228M); + clock_start_periph_pll(PERIPH_ID_EPP, CLOCK_ID_CGENERAL, CLK_228M); + clock_start_periph_pll(PERIPH_ID_VDE, CLOCK_ID_CGENERAL, CLK_228M); + clock_start_periph_pll(PERIPH_ID_MPE, CLOCK_ID_CGENERAL, CLK_228M); + clock_start_periph_pll(PERIPH_ID_DISP1, CLOCK_ID_PERIPH, CLK_408M); + clock_start_periph_pll(PERIPH_ID_PWM, CLOCK_ID_PERIPH, CLK_3_1875M); +} diff --git a/arch/arm/include/asm/arch-tegra/display.h b/arch/arm/include/asm/arch-tegra/display.h index 758dd3b0afe..140f416ac96 100644 --- a/arch/arm/include/asm/arch-tegra/display.h +++ b/arch/arm/include/asm/arch-tegra/display.h @@ -47,4 +47,7 @@ struct fdt_lcd; /* Register a new display based on the given configuration */ void tegra2_display_register(struct fdt_lcd *config); + /* Initialize platform specific display clocks */ +void display_clk_init(void); + #endif /*__ASM_ARCH_TEGRA_DISPLAY_H*/ |