diff --git a/arch/arm/mach-msm/acpuclock-8064.c b/arch/arm/mach-msm/acpuclock-8064.c index 4e4fabd4a63f..91b33aaedc94 100644 --- a/arch/arm/mach-msm/acpuclock-8064.c +++ b/arch/arm/mach-msm/acpuclock-8064.c @@ -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, }; diff --git a/arch/arm/mach-msm/acpuclock-8627.c b/arch/arm/mach-msm/acpuclock-8627.c index 9e6662d33029..07a7f8f15b8d 100644 --- a/arch/arm/mach-msm/acpuclock-8627.c +++ b/arch/arm/mach-msm/acpuclock-8627.c @@ -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, }; diff --git a/arch/arm/mach-msm/acpuclock-8930.c b/arch/arm/mach-msm/acpuclock-8930.c index b8ca8651c72d..77876eee563a 100644 --- a/arch/arm/mach-msm/acpuclock-8930.c +++ b/arch/arm/mach-msm/acpuclock-8930.c @@ -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, }; diff --git a/arch/arm/mach-msm/acpuclock-8930aa.c b/arch/arm/mach-msm/acpuclock-8930aa.c index d589f1a5c1b2..dbc3e32f67bf 100644 --- a/arch/arm/mach-msm/acpuclock-8930aa.c +++ b/arch/arm/mach-msm/acpuclock-8930aa.c @@ -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, }; diff --git a/arch/arm/mach-msm/acpuclock-8960.c b/arch/arm/mach-msm/acpuclock-8960.c index bde7e056fe20..631bd7e1d94f 100644 --- a/arch/arm/mach-msm/acpuclock-8960.c +++ b/arch/arm/mach-msm/acpuclock-8960.c @@ -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, }; diff --git a/arch/arm/mach-msm/acpuclock-8960ab.c b/arch/arm/mach-msm/acpuclock-8960ab.c index 3c063d11e11e..5558623c4b25 100644 --- a/arch/arm/mach-msm/acpuclock-8960ab.c +++ b/arch/arm/mach-msm/acpuclock-8960ab.c @@ -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) diff --git a/arch/arm/mach-msm/acpuclock-8974.c b/arch/arm/mach-msm/acpuclock-8974.c index ab388de4290e..f9a6f8b9586c 100644 --- a/arch/arm/mach-msm/acpuclock-8974.c +++ b/arch/arm/mach-msm/acpuclock-8974.c @@ -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, }; diff --git a/arch/arm/mach-msm/acpuclock-krait.c b/arch/arm/mach-msm/acpuclock-krait.c index 5c6320882f13..563caeee8df7 100644 --- a/arch/arm/mach-msm/acpuclock-krait.c +++ b/arch/arm/mach-msm/acpuclock-krait.c @@ -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); diff --git a/arch/arm/mach-msm/acpuclock-krait.h b/arch/arm/mach-msm/acpuclock-krait.h index 1d0be98092e8..1b891b1e3a8e 100644 --- a/arch/arm/mach-msm/acpuclock-krait.h +++ b/arch/arm/mach-msm/acpuclock-krait.h @@ -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; };