summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoj Chourasia <mchourasia@nvidia.com>2011-11-24 21:08:22 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:50:22 -0800
commitdb543c71362406d616fad89f11dff88e80ea71dd (patch)
tree99ba893b6fbc431eecd34e4026c74da4c1dc17ab
parent4f89825ef7413b378d07033fce78b7761c428097 (diff)
tegra: NOR: Allow mapping NOR aperture and clocks.
Renamed client driver for nor clock from "nor" to "tegra-nor". Add NOR flash aperature as valid address range in ioremap. Reviewed-on: http://git-master/r/44746 (cherry picked from commit 151b678580c43fa53bacd22f7f3d847d3eac3f6d) Change-Id: I61bcb316f3e9f757f24260bc24e2c4378f8e3326 Signed-off-by: Manoj Chourasia <mchourasia@nvidia.com> Reviewed-on: http://git-master/r/66706 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Rebase-Id: R2e2a9a1ee7162a8073758150e56d5c1f8aa1f2fd
-rw-r--r--arch/arm/mach-tegra/io.c8
-rw-r--r--arch/arm/mach-tegra/tegra2_clocks.c2
-rw-r--r--arch/arm/mach-tegra/tegra3_clocks.c2
3 files changed, 8 insertions, 4 deletions
diff --git a/arch/arm/mach-tegra/io.c b/arch/arm/mach-tegra/io.c
index 9c1fc5aa1674..a6dd33bca170 100644
--- a/arch/arm/mach-tegra/io.c
+++ b/arch/arm/mach-tegra/io.c
@@ -93,9 +93,13 @@ void __iomem *tegra_ioremap(unsigned long p, size_t size, unsigned int type)
* __arm_ioremap fails to set the domain of ioremapped memory
* correctly, only use it on physical memory.
*/
- if (v == NULL && p >= TEGRA_DRAM_BASE &&
- p <= (TEGRA_DRAM_BASE + TEGRA_DRAM_SIZE))
+ if (v == NULL) {
+ if ((p >= TEGRA_DRAM_BASE &&
+ (p + size) <= (TEGRA_DRAM_BASE + TEGRA_DRAM_SIZE)) ||
+ (p >= TEGRA_NOR_FLASH_BASE &&
+ (p + size) <= (TEGRA_NOR_FLASH_BASE + TEGRA_NOR_FLASH_SIZE)))
v = __arm_ioremap(p, size, type);
+ }
/*
* If the physical address was not physical memory or statically
diff --git a/arch/arm/mach-tegra/tegra2_clocks.c b/arch/arm/mach-tegra/tegra2_clocks.c
index 7686b3c367c8..bcf40979ddbd 100644
--- a/arch/arm/mach-tegra/tegra2_clocks.c
+++ b/arch/arm/mach-tegra/tegra2_clocks.c
@@ -2402,7 +2402,7 @@ struct clk tegra_list_periph_clks[] = {
/* FIXME: what is la? */
PERIPH_CLK("la", "la", NULL, 76, 0x1f8, 0x31E, 26000000, mux_pllp_pllc_pllm_clkm, MUX | DIV_U71),
PERIPH_CLK("owr", "tegra_w1", NULL, 71, 0x1cc, 0x31E, 26000000, mux_pllp_pllc_pllm_clkm, MUX | DIV_U71 | PERIPH_ON_APB),
- PERIPH_CLK("nor", "nor", NULL, 42, 0x1d0, 0x31E, 92000000, mux_pllp_pllc_pllm_clkm, MUX | DIV_U71), /* requires min voltage */
+ PERIPH_CLK("nor", "tegra-nor", NULL, 42, 0x1d0, 0x31E, 92000000, mux_pllp_pllc_pllm_clkm, MUX | DIV_U71), /* requires min voltage */
PERIPH_CLK("mipi", "mipi", NULL, 50, 0x174, 0x31E, 60000000, mux_pllp_pllc_pllm_clkm, MUX | DIV_U71 | PERIPH_ON_APB), /* scales with voltage */
PERIPH_CLK("i2c1", "tegra-i2c.0", NULL, 12, 0x124, 0x31E, 26000000, mux_pllp_pllc_pllm_clkm, MUX | DIV_U16 | PERIPH_ON_APB),
PERIPH_CLK("i2c2", "tegra-i2c.1", NULL, 54, 0x198, 0x31E, 26000000, mux_pllp_pllc_pllm_clkm, MUX | DIV_U16 | PERIPH_ON_APB),
diff --git a/arch/arm/mach-tegra/tegra3_clocks.c b/arch/arm/mach-tegra/tegra3_clocks.c
index f0086e0ebd22..52caf04b38af 100644
--- a/arch/arm/mach-tegra/tegra3_clocks.c
+++ b/arch/arm/mach-tegra/tegra3_clocks.c
@@ -4015,7 +4015,7 @@ struct clk tegra_list_clks[] = {
PERIPH_CLK("csite", "csite", NULL, 73, 0x1d4, 144000000, mux_pllp_pllc_pllm_clkm, MUX | DIV_U71), /* max rate ??? */
PERIPH_CLK("la", "la", NULL, 76, 0x1f8, 26000000, mux_pllp_pllc_pllm_clkm, MUX | DIV_U71),
PERIPH_CLK("owr", "tegra_w1", NULL, 71, 0x1cc, 26000000, mux_pllp_pllc_pllm_clkm, MUX | DIV_U71 | PERIPH_ON_APB),
- PERIPH_CLK("nor", "nor", NULL, 42, 0x1d0, 127000000, mux_pllp_pllc_pllm_clkm, MUX | DIV_U71), /* requires min voltage */
+ PERIPH_CLK("nor", "tegra-nor", NULL, 42, 0x1d0, 127000000, mux_pllp_pllc_pllm_clkm, MUX | DIV_U71), /* requires min voltage */
PERIPH_CLK("mipi", "mipi", NULL, 50, 0x174, 60000000, mux_pllp_pllc_pllm_clkm, MUX | DIV_U71 | PERIPH_ON_APB), /* scales with voltage */
PERIPH_CLK("i2c1", "tegra-i2c.0", NULL, 12, 0x124, 26000000, mux_pllp_clkm, MUX | DIV_U16 | PERIPH_ON_APB),
PERIPH_CLK("i2c2", "tegra-i2c.1", NULL, 54, 0x198, 26000000, mux_pllp_clkm, MUX | DIV_U16 | PERIPH_ON_APB),