msm: Add preliminary support for MSM8960AB
Update the call sites of cpu_is_msm8960() to include an additional check for the MSM8960AB target where appropriate. Change-Id: I54b1b9dccde2f21ada27bc64df02c2cb313ff1d1 Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
This commit is contained in:
committed by
Stephen Boyd
parent
d71728bd8f
commit
330ebf63fd
@@ -1011,7 +1011,7 @@ static int __init iommu_init(void)
|
||||
ARRAY_SIZE(msm_iommu_gfx2d_devs));
|
||||
}
|
||||
|
||||
if (cpu_is_apq8064()) {
|
||||
if (cpu_is_apq8064() || cpu_is_msm8960ab()) {
|
||||
platform_add_devices(msm_iommu_jpegd_devs,
|
||||
ARRAY_SIZE(msm_iommu_jpegd_devs));
|
||||
platform_add_devices(msm_iommu_8064_devs,
|
||||
@@ -1030,7 +1030,7 @@ static int __init iommu_init(void)
|
||||
ARRAY_SIZE(msm_iommu_gfx2d_ctx_devs));
|
||||
}
|
||||
|
||||
if (cpu_is_apq8064()) {
|
||||
if (cpu_is_apq8064() || cpu_is_msm8960ab()) {
|
||||
platform_add_devices(msm_iommu_jpegd_ctx_devs,
|
||||
ARRAY_SIZE(msm_iommu_jpegd_ctx_devs));
|
||||
platform_add_devices(msm_iommu_8064_ctx_devs,
|
||||
@@ -1069,7 +1069,7 @@ static void __exit iommu_exit(void)
|
||||
platform_device_unregister(msm_iommu_jpegd_devs[i]);
|
||||
}
|
||||
|
||||
if (cpu_is_apq8064()) {
|
||||
if (cpu_is_apq8064() || cpu_is_msm8960ab()) {
|
||||
for (i = 0; i < ARRAY_SIZE(msm_iommu_8064_ctx_devs); i++)
|
||||
platform_device_unregister(msm_iommu_8064_ctx_devs[i]);
|
||||
|
||||
|
||||
@@ -235,7 +235,8 @@ static int __msm_xo_mode_vote(struct msm_xo_voter *xo_voter, unsigned mode)
|
||||
int is_d0 = xo == &msm_xo_sources[MSM_XO_TCXO_D0];
|
||||
int needs_workaround = cpu_is_msm8960() || cpu_is_apq8064() ||
|
||||
cpu_is_msm8930() || cpu_is_msm8930aa() ||
|
||||
cpu_is_msm9615() || cpu_is_msm8627();
|
||||
cpu_is_msm9615() || cpu_is_msm8627() ||
|
||||
cpu_is_msm8960ab();
|
||||
|
||||
if (xo_voter->mode == mode)
|
||||
return 0;
|
||||
|
||||
@@ -143,7 +143,7 @@ static int __cpuinit release_secondary(unsigned int cpu)
|
||||
return krait_release_secondary_sim(0xf9088000, cpu);
|
||||
|
||||
if (cpu_is_msm8960() || cpu_is_msm8930() || cpu_is_msm8930aa() ||
|
||||
cpu_is_apq8064() || cpu_is_msm8627())
|
||||
cpu_is_apq8064() || cpu_is_msm8627() || cpu_is_msm8960ab())
|
||||
return krait_release_secondary(0x02088000, cpu);
|
||||
|
||||
WARN(1, "unknown CPU case in release_secondary\n");
|
||||
|
||||
@@ -1106,7 +1106,7 @@ static struct msm_pm_sleep_ops msm_rpmrs_ops = {
|
||||
static int __init msm_rpmrs_l2_init(void)
|
||||
{
|
||||
if (cpu_is_msm8960() || cpu_is_msm8930() || cpu_is_msm8930aa() ||
|
||||
cpu_is_apq8064() || cpu_is_msm8627()) {
|
||||
cpu_is_apq8064() || cpu_is_msm8627() || cpu_is_msm8960ab()) {
|
||||
|
||||
msm_pm_set_l2_flush_flag(0);
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ int msm_spm_turn_on_cpu_rail(unsigned int cpu)
|
||||
reg = saw_bases[cpu];
|
||||
|
||||
if (cpu_is_msm8960() || cpu_is_msm8930() || cpu_is_msm8930aa() ||
|
||||
cpu_is_apq8064() || cpu_is_msm8627()) {
|
||||
cpu_is_apq8064() || cpu_is_msm8627() || cpu_is_msm8960ab()) {
|
||||
val = 0xA4;
|
||||
reg += 0x14;
|
||||
timeout = 512;
|
||||
|
||||
@@ -569,7 +569,8 @@ static int __init ssr_init_soc_restart_orders(void)
|
||||
}
|
||||
|
||||
if (cpu_is_msm8960() || cpu_is_msm8930() || cpu_is_msm8930aa() ||
|
||||
cpu_is_msm9615() || cpu_is_apq8064() || cpu_is_msm8627()) {
|
||||
cpu_is_msm9615() || cpu_is_apq8064() || cpu_is_msm8627() ||
|
||||
cpu_is_msm8960ab()) {
|
||||
if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE) {
|
||||
restart_orders = restart_orders_8960_sglte;
|
||||
n_restart_orders =
|
||||
|
||||
@@ -965,7 +965,8 @@ int __cpuinit local_timer_setup(struct clock_event_device *evt)
|
||||
return 0;
|
||||
|
||||
if (cpu_is_msm8x60() || cpu_is_msm8960() || cpu_is_apq8064() ||
|
||||
cpu_is_msm8930() || cpu_is_msm8930aa() || cpu_is_msm8627())
|
||||
cpu_is_msm8930() || cpu_is_msm8930aa() || cpu_is_msm8627() ||
|
||||
cpu_is_msm8960ab())
|
||||
__raw_writel(DGT_CLK_CTL_DIV_4, MSM_TMR_BASE + DGT_CLK_CTL);
|
||||
|
||||
if (__get_cpu_var(first_boot)) {
|
||||
@@ -1062,7 +1063,8 @@ static void __init msm_timer_init(void)
|
||||
gpt->flags |= MSM_CLOCK_FLAGS_UNSTABLE_COUNT;
|
||||
dgt->flags |= MSM_CLOCK_FLAGS_UNSTABLE_COUNT;
|
||||
} else if (cpu_is_msm8960() || cpu_is_apq8064() || cpu_is_msm8930() ||
|
||||
cpu_is_msm8930aa() || cpu_is_msm8627()) {
|
||||
cpu_is_msm8930aa() || cpu_is_msm8627() ||
|
||||
cpu_is_msm8960ab()) {
|
||||
global_timer_offset = MSM_TMR0_BASE - MSM_TMR_BASE;
|
||||
dgt->freq = 6750000;
|
||||
__raw_writel(DGT_CLK_CTL_DIV_4, MSM_TMR_BASE + DGT_CLK_CTL);
|
||||
@@ -1072,7 +1074,7 @@ static void __init msm_timer_init(void)
|
||||
gpt_hz = 32765;
|
||||
sclk_hz = 32765;
|
||||
if (!cpu_is_msm8930() && !cpu_is_msm8930aa() &&
|
||||
!cpu_is_msm8627()) {
|
||||
!cpu_is_msm8627() && !cpu_is_msm8960ab()) {
|
||||
gpt->flags |= MSM_CLOCK_FLAGS_UNSTABLE_COUNT;
|
||||
dgt->flags |= MSM_CLOCK_FLAGS_UNSTABLE_COUNT;
|
||||
}
|
||||
@@ -1123,8 +1125,9 @@ static void __init msm_timer_init(void)
|
||||
|
||||
ce->irq = clock->irq;
|
||||
if (cpu_is_msm8x60() || cpu_is_msm8960() || cpu_is_apq8064() ||
|
||||
cpu_is_msm8930() || cpu_is_msm8930aa() ||
|
||||
cpu_is_msm9615() || cpu_is_msm8625() || cpu_is_msm8627()) {
|
||||
cpu_is_msm8930() || cpu_is_msm9615() || cpu_is_msm8625() ||
|
||||
cpu_is_msm8627() || cpu_is_msm8930aa() ||
|
||||
cpu_is_msm8960ab()) {
|
||||
clock->percpu_evt = alloc_percpu(struct clock_event_device *);
|
||||
if (!clock->percpu_evt) {
|
||||
pr_err("msm_timer_init: memory allocation "
|
||||
|
||||
@@ -129,6 +129,7 @@ int chk_config_get_id(void)
|
||||
case MSM_CPU_8X60:
|
||||
return APQ8060_TOOLS_ID;
|
||||
case MSM_CPU_8960:
|
||||
case MSM_CPU_8960AB:
|
||||
return AO8960_TOOLS_ID;
|
||||
case MSM_CPU_8064:
|
||||
return APQ8064_TOOLS_ID;
|
||||
@@ -156,6 +157,7 @@ int chk_apps_only(void)
|
||||
|
||||
switch (socinfo_get_msm_cpu()) {
|
||||
case MSM_CPU_8960:
|
||||
case MSM_CPU_8960AB:
|
||||
case MSM_CPU_8064:
|
||||
case MSM_CPU_8930:
|
||||
case MSM_CPU_8930AA:
|
||||
@@ -178,7 +180,8 @@ int chk_apps_master(void)
|
||||
if (driver->use_device_tree)
|
||||
return 1;
|
||||
else if (cpu_is_msm8960() || cpu_is_msm8930() || cpu_is_msm8930aa() ||
|
||||
cpu_is_msm9615() || cpu_is_apq8064() || cpu_is_msm8627())
|
||||
cpu_is_msm9615() || cpu_is_apq8064() || cpu_is_msm8627() ||
|
||||
cpu_is_msm8960ab())
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
|
||||
@@ -1688,7 +1688,7 @@ static int __init msm8960_audio_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (!cpu_is_msm8960()) {
|
||||
if (!cpu_is_msm8960() && !cpu_is_msm8960ab()) {
|
||||
pr_debug("%s: Not the right machine type\n", __func__);
|
||||
return -ENODEV ;
|
||||
}
|
||||
@@ -1753,7 +1753,7 @@ module_init(msm8960_audio_init);
|
||||
|
||||
static void __exit msm8960_audio_exit(void)
|
||||
{
|
||||
if (!cpu_is_msm8960()) {
|
||||
if (!cpu_is_msm8960() && !cpu_is_msm8960ab()) {
|
||||
pr_debug("%s: Not the right machine type\n", __func__);
|
||||
return ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user