提交 27dba4bc 编写于 作者: T Tony Lindgren

Merge branch 'for_2.6.33rc_c' of git://git.pwsan.com/linux-2.6 into omap-fixes-for-linus

...@@ -599,7 +599,7 @@ static struct clk i2c_ick = { ...@@ -599,7 +599,7 @@ static struct clk i2c_ick = {
static struct omap_clk omap_clks[] = { static struct omap_clk omap_clks[] = {
/* non-ULPD clocks */ /* non-ULPD clocks */
CLK(NULL, "ck_ref", &ck_ref, CK_16XX | CK_1510 | CK_310 | CK_7XX), CLK(NULL, "ck_ref", &ck_ref, CK_16XX | CK_1510 | CK_310 | CK_7XX),
CLK(NULL, "ck_dpll1", &ck_dpll1, CK_16XX | CK_1510 | CK_310), CLK(NULL, "ck_dpll1", &ck_dpll1, CK_16XX | CK_1510 | CK_310 | CK_7XX),
/* CK_GEN1 clocks */ /* CK_GEN1 clocks */
CLK(NULL, "ck_dpll1out", &ck_dpll1out.clk, CK_16XX), CLK(NULL, "ck_dpll1out", &ck_dpll1out.clk, CK_16XX),
CLK(NULL, "ck_sossi", &sossi_ck, CK_16XX), CLK(NULL, "ck_sossi", &sossi_ck, CK_16XX),
...@@ -627,7 +627,7 @@ static struct omap_clk omap_clks[] = { ...@@ -627,7 +627,7 @@ static struct omap_clk omap_clks[] = {
CLK(NULL, "tc2_ck", &tc2_ck, CK_16XX), CLK(NULL, "tc2_ck", &tc2_ck, CK_16XX),
CLK(NULL, "dma_ck", &dma_ck, CK_16XX | CK_1510 | CK_310), CLK(NULL, "dma_ck", &dma_ck, CK_16XX | CK_1510 | CK_310),
CLK(NULL, "dma_lcdfree_ck", &dma_lcdfree_ck, CK_16XX), CLK(NULL, "dma_lcdfree_ck", &dma_lcdfree_ck, CK_16XX),
CLK(NULL, "api_ck", &api_ck.clk, CK_16XX | CK_1510 | CK_310), CLK(NULL, "api_ck", &api_ck.clk, CK_16XX | CK_1510 | CK_310 | CK_7XX),
CLK(NULL, "lb_ck", &lb_ck.clk, CK_1510 | CK_310), CLK(NULL, "lb_ck", &lb_ck.clk, CK_1510 | CK_310),
CLK(NULL, "rhea1_ck", &rhea1_ck, CK_16XX), CLK(NULL, "rhea1_ck", &rhea1_ck, CK_16XX),
CLK(NULL, "rhea2_ck", &rhea2_ck, CK_16XX), CLK(NULL, "rhea2_ck", &rhea2_ck, CK_16XX),
...@@ -678,7 +678,7 @@ static struct omap_clk omap_clks[] = { ...@@ -678,7 +678,7 @@ static struct omap_clk omap_clks[] = {
* init * init
*/ */
static struct clk_functions omap1_clk_functions __initdata = { static struct clk_functions omap1_clk_functions = {
.clk_enable = omap1_clk_enable, .clk_enable = omap1_clk_enable,
.clk_disable = omap1_clk_disable, .clk_disable = omap1_clk_disable,
.clk_round_rate = omap1_clk_round_rate, .clk_round_rate = omap1_clk_round_rate,
......
...@@ -449,40 +449,78 @@ int omap2_select_table_rate(struct clk *clk, unsigned long rate) ...@@ -449,40 +449,78 @@ int omap2_select_table_rate(struct clk *clk, unsigned long rate)
#ifdef CONFIG_CPU_FREQ #ifdef CONFIG_CPU_FREQ
/* /*
* Walk PRCM rate table and fillout cpufreq freq_table * Walk PRCM rate table and fillout cpufreq freq_table
* XXX This should be replaced by an OPP layer in the near future
*/ */
static struct cpufreq_frequency_table freq_table[ARRAY_SIZE(rate_table)]; static struct cpufreq_frequency_table *freq_table;
void omap2_clk_init_cpufreq_table(struct cpufreq_frequency_table **table) void omap2_clk_init_cpufreq_table(struct cpufreq_frequency_table **table)
{ {
struct prcm_config *prcm; const struct prcm_config *prcm;
long sys_ck_rate;
int i = 0; int i = 0;
int tbl_sz = 0;
sys_ck_rate = clk_get_rate(sclk);
for (prcm = rate_table; prcm->mpu_speed; prcm++) { for (prcm = rate_table; prcm->mpu_speed; prcm++) {
if (!(prcm->flags & cpu_mask)) if (!(prcm->flags & cpu_mask))
continue; continue;
if (prcm->xtal_speed != sys_ck.rate) if (prcm->xtal_speed != sys_ck_rate)
continue; continue;
/* don't put bypass rates in table */ /* don't put bypass rates in table */
if (prcm->dpll_speed == prcm->xtal_speed) if (prcm->dpll_speed == prcm->xtal_speed)
continue; continue;
freq_table[i].index = i; tbl_sz++;
freq_table[i].frequency = prcm->mpu_speed / 1000;
i++;
} }
if (i == 0) { /*
printk(KERN_WARNING "%s: failed to initialize frequency " * XXX Ensure that we're doing what CPUFreq expects for this error
"table\n", __func__); * case and the following one
*/
if (tbl_sz == 0) {
pr_warning("%s: no matching entries in rate_table\n",
__func__);
return;
}
/* Include the CPUFREQ_TABLE_END terminator entry */
tbl_sz++;
freq_table = kzalloc(sizeof(struct cpufreq_frequency_table) * tbl_sz,
GFP_ATOMIC);
if (!freq_table) {
pr_err("%s: could not kzalloc frequency table\n", __func__);
return; return;
} }
for (prcm = rate_table; prcm->mpu_speed; prcm++) {
if (!(prcm->flags & cpu_mask))
continue;
if (prcm->xtal_speed != sys_ck_rate)
continue;
/* don't put bypass rates in table */
if (prcm->dpll_speed == prcm->xtal_speed)
continue;
freq_table[i].index = i;
freq_table[i].frequency = prcm->mpu_speed / 1000;
i++;
}
freq_table[i].index = i; freq_table[i].index = i;
freq_table[i].frequency = CPUFREQ_TABLE_END; freq_table[i].frequency = CPUFREQ_TABLE_END;
*table = &freq_table[0]; *table = &freq_table[0];
} }
void omap2_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table)
{
kfree(freq_table);
}
#endif #endif
struct clk_functions omap2_clk_functions = { struct clk_functions omap2_clk_functions = {
...@@ -494,6 +532,7 @@ struct clk_functions omap2_clk_functions = { ...@@ -494,6 +532,7 @@ struct clk_functions omap2_clk_functions = {
.clk_disable_unused = omap2_clk_disable_unused, .clk_disable_unused = omap2_clk_disable_unused,
#ifdef CONFIG_CPU_FREQ #ifdef CONFIG_CPU_FREQ
.clk_init_cpufreq_table = omap2_clk_init_cpufreq_table, .clk_init_cpufreq_table = omap2_clk_init_cpufreq_table,
.clk_exit_cpufreq_table = omap2_clk_exit_cpufreq_table,
#endif #endif
}; };
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include <asm/div64.h> #include <asm/div64.h>
#include <asm/clkdev.h> #include <asm/clkdev.h>
#include <plat/sdrc.h>
#include "clock.h" #include "clock.h"
#include "clock34xx.h" #include "clock34xx.h"
#include "sdrc.h" #include "sdrc.h"
......
...@@ -776,6 +776,8 @@ static struct clk dpll4_m5_ck = { ...@@ -776,6 +776,8 @@ static struct clk dpll4_m5_ck = {
.clksel_mask = OMAP3430_CLKSEL_CAM_MASK, .clksel_mask = OMAP3430_CLKSEL_CAM_MASK,
.clksel = div16_dpll4_clksel, .clksel = div16_dpll4_clksel,
.clkdm_name = "dpll4_clkdm", .clkdm_name = "dpll4_clkdm",
.set_rate = &omap2_clksel_set_rate,
.round_rate = &omap2_clksel_round_rate,
.recalc = &omap2_clksel_recalc, .recalc = &omap2_clksel_recalc,
}; };
...@@ -1500,6 +1502,7 @@ static struct clk uart2_fck = { ...@@ -1500,6 +1502,7 @@ static struct clk uart2_fck = {
.parent = &core_48m_fck, .parent = &core_48m_fck,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP3430_EN_UART2_SHIFT, .enable_bit = OMAP3430_EN_UART2_SHIFT,
.clkdm_name = "core_l4_clkdm",
.recalc = &followparent_recalc, .recalc = &followparent_recalc,
}; };
...@@ -1509,6 +1512,7 @@ static struct clk uart1_fck = { ...@@ -1509,6 +1512,7 @@ static struct clk uart1_fck = {
.parent = &core_48m_fck, .parent = &core_48m_fck,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP3430_EN_UART1_SHIFT, .enable_bit = OMAP3430_EN_UART1_SHIFT,
.clkdm_name = "core_l4_clkdm",
.recalc = &followparent_recalc, .recalc = &followparent_recalc,
}; };
...@@ -2745,7 +2749,7 @@ static struct clk mcbsp4_ick = { ...@@ -2745,7 +2749,7 @@ static struct clk mcbsp4_ick = {
}; };
static const struct clksel mcbsp_234_clksel[] = { static const struct clksel mcbsp_234_clksel[] = {
{ .parent = &core_96m_fck, .rates = common_mcbsp_96m_rates }, { .parent = &per_96m_fck, .rates = common_mcbsp_96m_rates },
{ .parent = &mcbsp_clks, .rates = common_mcbsp_mcbsp_rates }, { .parent = &mcbsp_clks, .rates = common_mcbsp_mcbsp_rates },
{ .parent = NULL } { .parent = NULL }
}; };
......
...@@ -559,7 +559,7 @@ int omap2_clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk) ...@@ -559,7 +559,7 @@ int omap2_clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk)
* downstream clocks for debugging purposes? * downstream clocks for debugging purposes?
*/ */
if (!clkdm || !clk) if (!clkdm || !clk || !clkdm->clktrctrl_mask)
return -EINVAL; return -EINVAL;
if (atomic_inc_return(&clkdm->usecount) > 1) if (atomic_inc_return(&clkdm->usecount) > 1)
...@@ -610,7 +610,7 @@ int omap2_clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk) ...@@ -610,7 +610,7 @@ int omap2_clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk)
* downstream clocks for debugging purposes? * downstream clocks for debugging purposes?
*/ */
if (!clkdm || !clk) if (!clkdm || !clk || !clkdm->clktrctrl_mask)
return -EINVAL; return -EINVAL;
#ifdef DEBUG #ifdef DEBUG
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include <plat/sdrc.h> #include <plat/sdrc.h>
#include <plat/gpmc.h> #include <plat/gpmc.h>
#include <plat/serial.h> #include <plat/serial.h>
#include <plat/mux.h>
#include <plat/vram.h> #include <plat/vram.h>
#include "clock.h" #include "clock.h"
...@@ -73,21 +72,21 @@ static struct map_desc omap24xx_io_desc[] __initdata = { ...@@ -73,21 +72,21 @@ static struct map_desc omap24xx_io_desc[] __initdata = {
#ifdef CONFIG_ARCH_OMAP2420 #ifdef CONFIG_ARCH_OMAP2420
static struct map_desc omap242x_io_desc[] __initdata = { static struct map_desc omap242x_io_desc[] __initdata = {
{ {
.virtual = DSP_MEM_24XX_VIRT, .virtual = DSP_MEM_2420_VIRT,
.pfn = __phys_to_pfn(DSP_MEM_24XX_PHYS), .pfn = __phys_to_pfn(DSP_MEM_2420_PHYS),
.length = DSP_MEM_24XX_SIZE, .length = DSP_MEM_2420_SIZE,
.type = MT_DEVICE .type = MT_DEVICE
}, },
{ {
.virtual = DSP_IPI_24XX_VIRT, .virtual = DSP_IPI_2420_VIRT,
.pfn = __phys_to_pfn(DSP_IPI_24XX_PHYS), .pfn = __phys_to_pfn(DSP_IPI_2420_PHYS),
.length = DSP_IPI_24XX_SIZE, .length = DSP_IPI_2420_SIZE,
.type = MT_DEVICE .type = MT_DEVICE
}, },
{ {
.virtual = DSP_MMU_24XX_VIRT, .virtual = DSP_MMU_2420_VIRT,
.pfn = __phys_to_pfn(DSP_MMU_24XX_PHYS), .pfn = __phys_to_pfn(DSP_MMU_2420_PHYS),
.length = DSP_MMU_24XX_SIZE, .length = DSP_MMU_2420_SIZE,
.type = MT_DEVICE .type = MT_DEVICE
}, },
}; };
......
...@@ -9,45 +9,47 @@ ...@@ -9,45 +9,47 @@
* The OMAP2 processor can be run at several discrete 'PRCM configurations'. * The OMAP2 processor can be run at several discrete 'PRCM configurations'.
* These configurations are characterized by voltage and speed for clocks. * These configurations are characterized by voltage and speed for clocks.
* The device is only validated for certain combinations. One way to express * The device is only validated for certain combinations. One way to express
* these combinations is via the 'ratio's' which the clocks operate with * these combinations is via the 'ratios' which the clocks operate with
* respect to each other. These ratio sets are for a given voltage/DPLL * respect to each other. These ratio sets are for a given voltage/DPLL
* setting. All configurations can be described by a DPLL setting and a ratio * setting. All configurations can be described by a DPLL setting and a ratio.
* There are 3 ratio sets for the 2430 and X ratio sets for 2420.
*
* 2430 differs from 2420 in that there are no more phase synchronizers used.
* They both have a slightly different clock domain setup. 2420(iva1,dsp) vs
* 2430 (iva2.1, NOdsp, mdm)
* *
* XXX Missing voltage data. * XXX Missing voltage data.
* XXX Missing 19.2MHz sys_clk rate sets (needed for N800/N810)
* *
* THe format described in this file is deprecated. Once a reasonable * THe format described in this file is deprecated. Once a reasonable
* OPP API exists, the data in this file should be converted to use it. * OPP API exists, the data in this file should be converted to use it.
* *
* This is technically part of the OMAP2xxx clock code. * This is technically part of the OMAP2xxx clock code.
*
* Considerable work is still needed to fully support dynamic frequency
* changes on OMAP2xxx-series chips. Readers interested in such a
* project are encouraged to review the Maemo Diablo RX-34 and RX-44
* kernel source at:
* http://repository.maemo.org/pool/diablo/free/k/kernel-source-diablo/
*/ */
#include "opp2xxx.h" #include "opp2xxx.h"
#include "sdrc.h" #include "sdrc.h"
#include "clock.h" #include "clock.h"
/*------------------------------------------------------------------------- /*
* Key dividers which make up a PRCM set. Ratio's for a PRCM are mandated. * Key dividers which make up a PRCM set. Ratios for a PRCM are mandated.
* xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU, * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU,
* CM_CLKSEL_DSP, CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL, * CM_CLKSEL_DSP, CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL,
* CM_CLKSEL2_PLL, CM_CLKSEL_MDM * CM_CLKSEL2_PLL, CM_CLKSEL_MDM
* *
* Filling in table based on H4 boards and 2430-SDPs variants available. * Filling in table based on H4 boards available. There are quite a
* There are quite a few more rates combinations which could be defined. * few more rate combinations which could be defined.
* *
* When multiple values are defined the start up will try and choose the * When multiple values are defined the start up will try and choose
* fastest one. If a 'fast' value is defined, then automatically, the /2 * the fastest one. If a 'fast' value is defined, then automatically,
* one should be included as it can be used. Generally having more that * the /2 one should be included as it can be used. Generally having
* one fast set does not make sense, as static timings need to be changed * more than one fast set does not make sense, as static timings need
* to change the set. The exception is the bypass setting which is * to be changed to change the set. The exception is the bypass
* availble for low power bypass. * setting which is available for low power bypass.
* *
* Note: This table needs to be sorted, fastest to slowest. * Note: This table needs to be sorted, fastest to slowest.
*-------------------------------------------------------------------------*/ **/
const struct prcm_config omap2420_rate_table[] = { const struct prcm_config omap2420_rate_table[] = {
/* PRCM I - FAST */ /* PRCM I - FAST */
{S12M, S660M, S330M, RI_CM_CLKSEL_MPU_VAL, /* 330MHz ARM */ {S12M, S660M, S330M, RI_CM_CLKSEL_MPU_VAL, /* 330MHz ARM */
......
/* /*
* opp2420_data.c - old-style "OPP" table for OMAP2420 * opp2430_data.c - old-style "OPP" table for OMAP2430
* *
* Copyright (C) 2005-2009 Texas Instruments, Inc. * Copyright (C) 2005-2009 Texas Instruments, Inc.
* Copyright (C) 2004-2009 Nokia Corporation * Copyright (C) 2004-2009 Nokia Corporation
...@@ -9,16 +9,16 @@ ...@@ -9,16 +9,16 @@
* The OMAP2 processor can be run at several discrete 'PRCM configurations'. * The OMAP2 processor can be run at several discrete 'PRCM configurations'.
* These configurations are characterized by voltage and speed for clocks. * These configurations are characterized by voltage and speed for clocks.
* The device is only validated for certain combinations. One way to express * The device is only validated for certain combinations. One way to express
* these combinations is via the 'ratio's' which the clocks operate with * these combinations is via the 'ratios' which the clocks operate with
* respect to each other. These ratio sets are for a given voltage/DPLL * respect to each other. These ratio sets are for a given voltage/DPLL
* setting. All configurations can be described by a DPLL setting and a ratio * setting. All configurations can be described by a DPLL setting and a ratio.
* There are 3 ratio sets for the 2430 and X ratio sets for 2420.
* *
* 2430 differs from 2420 in that there are no more phase synchronizers used. * 2430 differs from 2420 in that there are no more phase synchronizers used.
* They both have a slightly different clock domain setup. 2420(iva1,dsp) vs * They both have a slightly different clock domain setup. 2420(iva1,dsp) vs
* 2430 (iva2.1, NOdsp, mdm) * 2430 (iva2.1, NOdsp, mdm)
* *
* XXX Missing voltage data. * XXX Missing voltage data.
* XXX Missing 19.2MHz sys_clk rate sets.
* *
* THe format described in this file is deprecated. Once a reasonable * THe format described in this file is deprecated. Once a reasonable
* OPP API exists, the data in this file should be converted to use it. * OPP API exists, the data in this file should be converted to use it.
...@@ -30,24 +30,24 @@ ...@@ -30,24 +30,24 @@
#include "sdrc.h" #include "sdrc.h"
#include "clock.h" #include "clock.h"
/*------------------------------------------------------------------------- /*
* Key dividers which make up a PRCM set. Ratio's for a PRCM are mandated. * Key dividers which make up a PRCM set. Ratios for a PRCM are mandated.
* xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU, * xtal_speed, dpll_speed, mpu_speed, CM_CLKSEL_MPU,
* CM_CLKSEL_DSP, CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL, * CM_CLKSEL_DSP, CM_CLKSEL_GFX, CM_CLKSEL1_CORE, CM_CLKSEL1_PLL,
* CM_CLKSEL2_PLL, CM_CLKSEL_MDM * CM_CLKSEL2_PLL, CM_CLKSEL_MDM
* *
* Filling in table based on H4 boards and 2430-SDPs variants available. * Filling in table based on 2430-SDPs variants available. There are
* There are quite a few more rates combinations which could be defined. * quite a few more rate combinations which could be defined.
* *
* When multiple values are defined the start up will try and choose the * When multiple values are defined the start up will try and choose
* fastest one. If a 'fast' value is defined, then automatically, the /2 * the fastest one. If a 'fast' value is defined, then automatically,
* one should be included as it can be used. Generally having more that * the /2 one should be included as it can be used. Generally having
* one fast set does not make sense, as static timings need to be changed * more than one fast set does not make sense, as static timings need
* to change the set. The exception is the bypass setting which is * to be changed to change the set. The exception is the bypass
* availble for low power bypass. * setting which is available for low power bypass.
* *
* Note: This table needs to be sorted, fastest to slowest. * Note: This table needs to be sorted, fastest to slowest.
*-------------------------------------------------------------------------*/ */
const struct prcm_config omap2430_rate_table[] = { const struct prcm_config omap2430_rate_table[] = {
/* PRCM #4 - ratio2 (ES2.1) - FAST */ /* PRCM #4 - ratio2 (ES2.1) - FAST */
{S13M, S798M, S399M, R2_CM_CLKSEL_MPU_VAL, /* 399MHz ARM */ {S13M, S798M, S399M, R2_CM_CLKSEL_MPU_VAL, /* 399MHz ARM */
......
...@@ -36,10 +36,6 @@ static struct clk_functions *arch_clock; ...@@ -36,10 +36,6 @@ static struct clk_functions *arch_clock;
* Standard clock functions defined in include/linux/clk.h * Standard clock functions defined in include/linux/clk.h
*-------------------------------------------------------------------------*/ *-------------------------------------------------------------------------*/
/* This functions is moved to arch/arm/common/clkdev.c. For OMAP4 since
* clock framework is not up , it is defined here to avoid rework in
* every driver. Also dummy prcm reset function is added */
int clk_enable(struct clk *clk) int clk_enable(struct clk *clk)
{ {
unsigned long flags; unsigned long flags;
...@@ -305,7 +301,6 @@ void clk_enable_init_clocks(void) ...@@ -305,7 +301,6 @@ void clk_enable_init_clocks(void)
clk_enable(clkp); clk_enable(clkp);
} }
} }
EXPORT_SYMBOL(clk_enable_init_clocks);
/* /*
* Low level helpers * Low level helpers
...@@ -334,7 +329,16 @@ void clk_init_cpufreq_table(struct cpufreq_frequency_table **table) ...@@ -334,7 +329,16 @@ void clk_init_cpufreq_table(struct cpufreq_frequency_table **table)
arch_clock->clk_init_cpufreq_table(table); arch_clock->clk_init_cpufreq_table(table);
spin_unlock_irqrestore(&clockfw_lock, flags); spin_unlock_irqrestore(&clockfw_lock, flags);
} }
EXPORT_SYMBOL(clk_init_cpufreq_table);
void clk_exit_cpufreq_table(struct cpufreq_frequency_table **table)
{
unsigned long flags;
spin_lock_irqsave(&clockfw_lock, flags);
if (arch_clock->clk_exit_cpufreq_table)
arch_clock->clk_exit_cpufreq_table(table);
spin_unlock_irqrestore(&clockfw_lock, flags);
}
#endif #endif
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
......
...@@ -134,6 +134,7 @@ static int __init omap_cpu_init(struct cpufreq_policy *policy) ...@@ -134,6 +134,7 @@ static int __init omap_cpu_init(struct cpufreq_policy *policy)
static int omap_cpu_exit(struct cpufreq_policy *policy) static int omap_cpu_exit(struct cpufreq_policy *policy)
{ {
clk_exit_cpufreq_table(&freq_table);
clk_put(mpu_clk); clk_put(mpu_clk);
return 0; return 0;
} }
......
...@@ -119,6 +119,7 @@ struct clk_functions { ...@@ -119,6 +119,7 @@ struct clk_functions {
void (*clk_disable_unused)(struct clk *clk); void (*clk_disable_unused)(struct clk *clk);
#ifdef CONFIG_CPU_FREQ #ifdef CONFIG_CPU_FREQ
void (*clk_init_cpufreq_table)(struct cpufreq_frequency_table **); void (*clk_init_cpufreq_table)(struct cpufreq_frequency_table **);
void (*clk_exit_cpufreq_table)(struct cpufreq_frequency_table **);
#endif #endif
}; };
...@@ -135,6 +136,7 @@ extern unsigned long followparent_recalc(struct clk *clk); ...@@ -135,6 +136,7 @@ extern unsigned long followparent_recalc(struct clk *clk);
extern void clk_enable_init_clocks(void); extern void clk_enable_init_clocks(void);
#ifdef CONFIG_CPU_FREQ #ifdef CONFIG_CPU_FREQ
extern void clk_init_cpufreq_table(struct cpufreq_frequency_table **table); extern void clk_init_cpufreq_table(struct cpufreq_frequency_table **table);
extern void clk_exit_cpufreq_table(struct cpufreq_frequency_table **table);
#endif #endif
extern const struct clkops clkops_null; extern const struct clkops clkops_null;
......
...@@ -122,16 +122,21 @@ ...@@ -122,16 +122,21 @@
#define OMAP243X_SMS_VIRT (OMAP243X_SMS_PHYS + OMAP2_L3_IO_OFFSET) #define OMAP243X_SMS_VIRT (OMAP243X_SMS_PHYS + OMAP2_L3_IO_OFFSET)
#define OMAP243X_SMS_SIZE SZ_1M #define OMAP243X_SMS_SIZE SZ_1M
/* DSP */ /* 2420 IVA */
#define DSP_MEM_24XX_PHYS OMAP2420_DSP_MEM_BASE /* 0x58000000 */ #define DSP_MEM_2420_PHYS OMAP2420_DSP_MEM_BASE
#define DSP_MEM_24XX_VIRT 0xe0000000 /* 0x58000000 --> 0xfc100000 */
#define DSP_MEM_24XX_SIZE 0x28000 #define DSP_MEM_2420_VIRT 0xfc100000
#define DSP_IPI_24XX_PHYS OMAP2420_DSP_IPI_BASE /* 0x59000000 */ #define DSP_MEM_2420_SIZE 0x28000
#define DSP_IPI_24XX_VIRT 0xe1000000 #define DSP_IPI_2420_PHYS OMAP2420_DSP_IPI_BASE
#define DSP_IPI_24XX_SIZE SZ_4K /* 0x59000000 --> 0xfc128000 */
#define DSP_MMU_24XX_PHYS OMAP2420_DSP_MMU_BASE /* 0x5a000000 */ #define DSP_IPI_2420_VIRT 0xfc128000
#define DSP_MMU_24XX_VIRT 0xe2000000 #define DSP_IPI_2420_SIZE SZ_4K
#define DSP_MMU_24XX_SIZE SZ_4K #define DSP_MMU_2420_PHYS OMAP2420_DSP_MMU_BASE
/* 0x5a000000 --> 0xfc129000 */
#define DSP_MMU_2420_VIRT 0xfc129000
#define DSP_MMU_2420_SIZE SZ_4K
/* 2430 IVA2.1 - currently unmapped */
/* /*
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------
...@@ -182,16 +187,7 @@ ...@@ -182,16 +187,7 @@
#define OMAP343X_SDRC_VIRT (OMAP343X_SDRC_PHYS + OMAP2_L3_IO_OFFSET) #define OMAP343X_SDRC_VIRT (OMAP343X_SDRC_PHYS + OMAP2_L3_IO_OFFSET)
#define OMAP343X_SDRC_SIZE SZ_1M #define OMAP343X_SDRC_SIZE SZ_1M
/* DSP */ /* 3430 IVA - currently unmapped */
#define DSP_MEM_34XX_PHYS OMAP34XX_DSP_MEM_BASE /* 0x58000000 */
#define DSP_MEM_34XX_VIRT 0xe0000000
#define DSP_MEM_34XX_SIZE 0x28000
#define DSP_IPI_34XX_PHYS OMAP34XX_DSP_IPI_BASE /* 0x59000000 */
#define DSP_IPI_34XX_VIRT 0xe1000000
#define DSP_IPI_34XX_SIZE SZ_4K
#define DSP_MMU_34XX_PHYS OMAP34XX_DSP_MMU_BASE /* 0x5a000000 */
#define DSP_MMU_34XX_VIRT 0xe2000000
#define DSP_MMU_34XX_SIZE SZ_4K
/* /*
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------
......
...@@ -66,12 +66,12 @@ void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type) ...@@ -66,12 +66,12 @@ void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type)
return XLATE(p, L4_24XX_PHYS, L4_24XX_VIRT); return XLATE(p, L4_24XX_PHYS, L4_24XX_VIRT);
} }
if (cpu_is_omap2420()) { if (cpu_is_omap2420()) {
if (BETWEEN(p, DSP_MEM_24XX_PHYS, DSP_MEM_24XX_SIZE)) if (BETWEEN(p, DSP_MEM_2420_PHYS, DSP_MEM_2420_SIZE))
return XLATE(p, DSP_MEM_24XX_PHYS, DSP_MEM_24XX_VIRT); return XLATE(p, DSP_MEM_2420_PHYS, DSP_MEM_2420_VIRT);
if (BETWEEN(p, DSP_IPI_24XX_PHYS, DSP_IPI_24XX_SIZE)) if (BETWEEN(p, DSP_IPI_2420_PHYS, DSP_IPI_2420_SIZE))
return XLATE(p, DSP_IPI_24XX_PHYS, DSP_IPI_24XX_SIZE); return XLATE(p, DSP_IPI_2420_PHYS, DSP_IPI_2420_SIZE);
if (BETWEEN(p, DSP_MMU_24XX_PHYS, DSP_MMU_24XX_SIZE)) if (BETWEEN(p, DSP_MMU_2420_PHYS, DSP_MMU_2420_SIZE))
return XLATE(p, DSP_MMU_24XX_PHYS, DSP_MMU_24XX_VIRT); return XLATE(p, DSP_MMU_2420_PHYS, DSP_MMU_2420_VIRT);
} }
if (cpu_is_omap2430()) { if (cpu_is_omap2430()) {
if (BETWEEN(p, L4_WK_243X_PHYS, L4_WK_243X_SIZE)) if (BETWEEN(p, L4_WK_243X_PHYS, L4_WK_243X_SIZE))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册