msm: Change semantics of cpu_is_msm8930()

Per revised design decisions, cpu_is_msm8930() shall only
return true on 8930, and not on the 8627 variant. Modify
the cpu_is_xxx functions to reflect this change, and update
call sites accordingly.

Change-Id: I50b943f80c731717e6cd5d7fffb13aeec0f85a40
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
This commit is contained in:
Stepan Moskovchenko 2012-07-05 20:33:55 -07:00 committed by Stephen Boyd
parent 988d0913f4
commit d2c24f8eca
12 changed files with 27 additions and 22 deletions

View file

@ -6115,7 +6115,7 @@ static void __init reg_init(void)
if (cpu_is_apq8064())
rmwreg(0x019FECFF, MAXI_EN5_REG, 0x01FFEFFF);
if (cpu_is_msm8930())
if (cpu_is_msm8930() || cpu_is_msm8627())
rmwreg(0x000004FF, MAXI_EN5_REG, 0x00000FFF);
if (cpu_is_msm8627())
rmwreg(0x000003C7, SAXI_EN_REG, 0x00003FFF);
@ -6151,7 +6151,7 @@ static void __init reg_init(void)
rmwreg(0x80FF0000, DSI2_PIXEL_CC_REG, 0xE0FF0010);
rmwreg(0x80FF0000, JPEGD_CC_REG, 0xE0FF0010);
}
if (cpu_is_msm8960() || cpu_is_msm8930())
if (cpu_is_msm8960() || cpu_is_msm8930() || cpu_is_msm8627())
rmwreg(0x80FF0000, TV_CC_REG, 0xE1FFC010);
if (cpu_is_msm8960()) {
@ -6243,7 +6243,7 @@ static void __init reg_init(void)
* Program PLL15 to 900MHz with ref clk = 27MHz and
* only enable PLL main output.
*/
if (cpu_is_msm8930()) {
if (cpu_is_msm8930() || cpu_is_msm8627()) {
pll15_config.l = 0x21 | BVAL(31, 7, 0x600);
pll15_config.m = 0x1;
pll15_config.n = 0x3;
@ -6287,7 +6287,7 @@ static void __init msm8960_clock_pre_init(void)
* Change the freq tables and voltage requirements for
* clocks which differ between 8960 and 8930.
*/
if (cpu_is_msm8930()) {
if (cpu_is_msm8930() || cpu_is_msm8627()) {
gfx3d_clk.freq_tbl = clk_tbl_gfx3d_8930;
memcpy(gfx3d_clk.c.fmax, fmax_gfx3d_8930,
@ -6332,7 +6332,7 @@ static void __init msm8960_clock_post_init(void)
clk_set_rate(&usb_hs4_xcvr_clk.c, 60000000);
}
clk_set_rate(&usb_fs1_src_clk.c, 60000000);
if (cpu_is_msm8960() || cpu_is_msm8930())
if (cpu_is_msm8960() || cpu_is_msm8930() || cpu_is_msm8627())
clk_set_rate(&usb_fs2_src_clk.c, 60000000);
clk_set_rate(&usb_hsic_xcvr_fs_clk.c, 60000000);
clk_set_rate(&usb_hsic_hsic_src_clk.c, 480000000);

View file

@ -256,8 +256,7 @@ static inline int cpu_is_apq8064(void)
static inline int cpu_is_msm8930(void)
{
#ifdef CONFIG_ARCH_MSM8930
return (read_msm_cpu_type() == MSM_CPU_8930) ||
(read_msm_cpu_type() == MSM_CPU_8627);
return read_msm_cpu_type() == MSM_CPU_8930;
#else
return 0;
#endif

View file

@ -281,7 +281,8 @@ static int __init modem_8960_init(void)
{
int ret;
if (!cpu_is_msm8960() && !cpu_is_msm8930() && !cpu_is_msm9615())
if (!cpu_is_msm8960() && !cpu_is_msm8930() && !cpu_is_msm9615() &&
!cpu_is_msm8627())
return -ENODEV;
ret = smsm_state_cb_register(SMSM_MODEM_STATE, SMSM_RESET,

View file

@ -234,7 +234,8 @@ static int __msm_xo_mode_vote(struct msm_xo_voter *xo_voter, unsigned mode)
struct msm_xo *xo = xo_voter->xo;
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_msm9615();
cpu_is_msm8930() || cpu_is_msm9615() ||
cpu_is_msm8627();
if (xo_voter->mode == mode)
return 0;

View file

@ -142,7 +142,8 @@ static int __cpuinit release_secondary(unsigned int cpu)
if (machine_is_msm8974_sim())
return krait_release_secondary_sim(0xf9088000, cpu);
if (cpu_is_msm8960() || cpu_is_msm8930() || cpu_is_apq8064())
if (cpu_is_msm8960() || cpu_is_msm8930() || cpu_is_apq8064() ||
cpu_is_msm8627())
return krait_release_secondary(0x02088000, cpu);
WARN(1, "unknown CPU case in release_secondary\n");

View file

@ -1105,7 +1105,8 @@ 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_apq8064()) {
if (cpu_is_msm8960() || cpu_is_msm8930() || cpu_is_apq8064() ||
cpu_is_msm8627()) {
msm_pm_set_l2_flush_flag(0);

View file

@ -136,7 +136,8 @@ int msm_spm_turn_on_cpu_rail(unsigned int cpu)
reg = saw_bases[cpu];
if (cpu_is_msm8960() || cpu_is_msm8930() || cpu_is_apq8064()) {
if (cpu_is_msm8960() || cpu_is_msm8930() || cpu_is_apq8064() ||
cpu_is_msm8627()) {
val = 0xA4;
reg += 0x14;
timeout = 512;

View file

@ -569,7 +569,7 @@ static int __init ssr_init_soc_restart_orders(void)
}
if (cpu_is_msm8960() || cpu_is_msm8930() || cpu_is_msm9615() ||
cpu_is_apq8064()) {
cpu_is_apq8064() || cpu_is_msm8627()) {
if (socinfo_get_platform_subtype() == PLATFORM_SUBTYPE_SGLTE) {
restart_orders = restart_orders_8960_sglte;
n_restart_orders =

View file

@ -965,7 +965,7 @@ 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_msm8930() || cpu_is_msm8627())
__raw_writel(DGT_CLK_CTL_DIV_4, MSM_TMR_BASE + DGT_CLK_CTL);
if (__get_cpu_var(first_boot)) {
@ -1061,7 +1061,8 @@ static void __init msm_timer_init(void)
sclk_hz = 32765;
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()) {
} else if (cpu_is_msm8960() || cpu_is_apq8064() || cpu_is_msm8930() ||
cpu_is_msm8627()) {
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);
@ -1070,7 +1071,7 @@ static void __init msm_timer_init(void)
gpt->freq = 32765;
gpt_hz = 32765;
sclk_hz = 32765;
if (!cpu_is_msm8930()) {
if (!cpu_is_msm8930() && !cpu_is_msm8627()) {
gpt->flags |= MSM_CLOCK_FLAGS_UNSTABLE_COUNT;
dgt->flags |= MSM_CLOCK_FLAGS_UNSTABLE_COUNT;
}
@ -1122,7 +1123,7 @@ 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_msm9615() ||
cpu_is_msm8625()) {
cpu_is_msm8625() || cpu_is_msm8627()) {
clock->percpu_evt = alloc_percpu(struct clock_event_device *);
if (!clock->percpu_evt) {
pr_err("msm_timer_init: memory allocation "

View file

@ -570,7 +570,7 @@ a3xx_getchipid(struct kgsl_device *device)
patchid = 1;
else
patchid = 0;
} else if (cpu_is_msm8930()) {
} else if (cpu_is_msm8930() || cpu_is_msm8627()) {
/* A305 */
majorid = 0;
@ -636,7 +636,7 @@ a2xx_getchipid(struct kgsl_device *device)
static unsigned int
adreno_getchipid(struct kgsl_device *device)
{
if (cpu_is_apq8064() || cpu_is_msm8930())
if (cpu_is_apq8064() || cpu_is_msm8930() || cpu_is_msm8627())
return a3xx_getchipid(device);
else
return a2xx_getchipid(device);

View file

@ -181,7 +181,7 @@ static int tz_init(struct kgsl_device *device, struct kgsl_pwrscale *pwrscale)
/* Trustzone is only valid for some SOCs */
if (!(cpu_is_msm8x60() || cpu_is_msm8960() || cpu_is_apq8064() ||
cpu_is_msm8930()))
cpu_is_msm8930() || cpu_is_msm8627()))
return -EINVAL;
priv = pwrscale->priv = kzalloc(sizeof(struct tz_priv), GFP_KERNEL);

View file

@ -1222,7 +1222,7 @@ static int __init msm8930_audio_init(void)
{
int ret;
if (!cpu_is_msm8930()) {
if (!cpu_is_msm8930() && !cpu_is_msm8627()) {
pr_err("%s: Not the right machine type\n", __func__);
return -ENODEV ;
}
@ -1260,7 +1260,7 @@ module_init(msm8930_audio_init);
static void __exit msm8930_audio_exit(void)
{
if (!cpu_is_msm8930()) {
if (!cpu_is_msm8930() && !cpu_is_msm8627()) {
pr_err("%s: Not the right machine type\n", __func__);
return ;
}