Revert "msm: acpuclock-krait: Fix PTE efuse address for acpuclock-8974."

This reverts commit 3f7590f2a66ecfdc902e8ca37785dba462ad995f.

Signed-off-by: Neha Pandey <nehap@codeaurora.org>
This commit is contained in:
Neha Pandey 2012-11-27 12:18:24 -08:00 committed by Stephen Boyd
parent 4ad0bdf4ed
commit 53f8651b0f
9 changed files with 22 additions and 19 deletions

View file

@ -219,7 +219,7 @@ static struct acpuclk_krait_params acpuclk_8064_params __initdata = {
.l2_freq_tbl = l2_freq_tbl,
.l2_freq_tbl_size = sizeof(l2_freq_tbl),
.bus_scale = &bus_scale_data,
.pte_efuse_phys = 0x007000C0,
.qfprom_phys_base = 0x00700000,
.stby_khz = 384000,
};

View file

@ -138,7 +138,7 @@ static struct acpuclk_krait_params acpuclk_8627_params __initdata = {
.l2_freq_tbl = l2_freq_tbl,
.l2_freq_tbl_size = sizeof(l2_freq_tbl),
.bus_scale = &bus_scale_data,
.pte_efuse_phys = 0x007000C0,
.qfprom_phys_base = 0x00700000,
.stby_khz = 384000,
};

View file

@ -221,7 +221,7 @@ static struct acpuclk_krait_params acpuclk_8930_params __initdata = {
.l2_freq_tbl = l2_freq_tbl,
.l2_freq_tbl_size = sizeof(l2_freq_tbl),
.bus_scale = &bus_scale_data,
.pte_efuse_phys = 0x007000C0,
.qfprom_phys_base = 0x00700000,
.stby_khz = 384000,
};

View file

@ -200,7 +200,7 @@ static struct acpuclk_krait_params acpuclk_8930aa_params __initdata = {
.l2_freq_tbl = l2_freq_tbl,
.l2_freq_tbl_size = sizeof(l2_freq_tbl),
.bus_scale = &bus_scale_data,
.pte_efuse_phys = 0x007000C0,
.qfprom_phys_base = 0x00700000,
.stby_khz = 384000,
};

View file

@ -204,7 +204,7 @@ static struct acpuclk_krait_params acpuclk_8960_params __initdata = {
.l2_freq_tbl = l2_freq_tbl,
.l2_freq_tbl_size = sizeof(l2_freq_tbl),
.bus_scale = &bus_scale_data,
.pte_efuse_phys = 0x007000C0,
.qfprom_phys_base = 0x00700000,
.stby_khz = 384000,
};

View file

@ -146,7 +146,7 @@ static struct acpuclk_krait_params acpuclk_8960ab_params __initdata = {
.l2_freq_tbl = l2_freq_tbl,
.l2_freq_tbl_size = sizeof(l2_freq_tbl),
.bus_scale = &bus_scale_data,
.pte_efuse_phys = 0x007000C0,
.qfprom_phys_base = 0x00700000,
};
static int __init acpuclk_8960ab_probe(struct platform_device *pdev)

View file

@ -179,7 +179,7 @@ static struct acpuclk_krait_params acpuclk_8974_params __initdata = {
.l2_freq_tbl = l2_freq_tbl,
.l2_freq_tbl_size = sizeof(l2_freq_tbl),
.bus_scale = &bus_scale_data,
.pte_efuse_phys = 0xFC4B80B0,
.qfprom_phys_base = 0xFC4A8000,
.stby_khz = 300000,
};

View file

@ -44,6 +44,9 @@
#define SEC_SRC_SEL_L2PLL 1
#define SEC_SRC_SEL_AUX 2
/* PTE EFUSE register offset. */
#define PTE_EFUSE 0xC0
static DEFINE_MUTEX(driver_lock);
static DEFINE_SPINLOCK(l2_lock);
@ -928,20 +931,20 @@ static void krait_apply_vmin(struct acpu_level *tbl)
tbl->vdd_core = 1150000;
}
static int __init select_freq_plan(u32 pte_efuse_phys)
static int __init select_freq_plan(u32 qfprom_phys)
{
void __iomem *pte_efuse;
u32 pte_efuse_val, pvs, tbl_idx;
void __iomem *qfprom_base;
u32 pte_efuse, pvs, tbl_idx;
char *pvs_names[] = { "Slow", "Nominal", "Fast", "Faster", "Unknown" };
pte_efuse = ioremap(pte_efuse_phys, 4);
qfprom_base = ioremap(qfprom_phys, SZ_256);
/* Select frequency tables. */
if (pte_efuse) {
pte_efuse_val = readl_relaxed(pte_efuse);
pvs = (pte_efuse_val >> 10) & 0x7;
iounmap(pte_efuse);
if (qfprom_base) {
pte_efuse = readl_relaxed(qfprom_base + PTE_EFUSE);
pvs = (pte_efuse >> 10) & 0x7;
iounmap(qfprom_base);
if (pvs == 0x7)
pvs = (pte_efuse_val >> 13) & 0x7;
pvs = (pte_efuse >> 13) & 0x7;
switch (pvs) {
case 0x0:
@ -1002,7 +1005,7 @@ static void __init drv_data_init(struct device *dev,
GFP_KERNEL);
BUG_ON(!drv.bus_scale->usecase);
tbl_idx = select_freq_plan(params->pte_efuse_phys);
tbl_idx = select_freq_plan(params->qfprom_phys_base);
drv.acpu_freq_tbl = kmemdup(params->pvs_tables[tbl_idx].table,
params->pvs_tables[tbl_idx].size,
GFP_KERNEL);

View file

@ -236,7 +236,7 @@ struct pvs_table {
* @pvs_tables: CPU frequency tables.
* @l2_freq_tbl: L2 frequency table.
* @l2_freq_tbl_size: Size of @l2_freq_tbl.
* @pte_efuse_phys: Physical address of PTE EFUSE.
* @qfprom_phys_base: Physical base address of QFPROM.
* @bus_scale: MSM bus driver parameters.
* @stby_khz: KHz value corresponding to an always-on clock source.
*/
@ -247,7 +247,7 @@ struct acpuclk_krait_params {
struct pvs_table *pvs_tables;
struct l2_level *l2_freq_tbl;
size_t l2_freq_tbl_size;
phys_addr_t pte_efuse_phys;
phys_addr_t qfprom_phys_base;
struct msm_bus_scale_pdata *bus_scale;
unsigned long stby_khz;
};