Skip to content

Commit

Permalink
Merge commit 'M76XXTSNCJNLYA6170' into 7x27_common-2.6.35
Browse files Browse the repository at this point in the history
Conflicts:
	drivers/usb/gadget/composite.c
  • Loading branch information
Jinkyu Choi committed May 31, 2011
2 parents 52fd01e + a2af123 commit 516f059
Show file tree
Hide file tree
Showing 90 changed files with 1,775 additions and 719 deletions.
10 changes: 9 additions & 1 deletion arch/arm/mach-msm/acpuclock-7x30.c
@@ -1,7 +1,7 @@
/*
*
* Copyright (C) 2007 Google, Inc.
* Copyright (c) 2007-2010, Code Aurora Forum. All rights reserved.
* Copyright (c) 2007-2011, Code Aurora Forum. All rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
Expand Down Expand Up @@ -159,6 +159,9 @@ static void acpuclk_config_pll2(struct pll *pll)
{
uint32_t config = readl(PLL2_CONFIG_ADDR);

/* Make sure write to disable PLL_2 has completed
* before reconfiguring that PLL. */
mb();
writel(pll->l, PLL2_L_VAL_ADDR);
writel(pll->m, PLL2_M_VAL_ADDR);
writel(pll->n, PLL2_N_VAL_ADDR);
Expand All @@ -167,6 +170,8 @@ static void acpuclk_config_pll2(struct pll *pll)
else
config &= ~BIT(15);
writel(config, PLL2_CONFIG_ADDR);
/* Make sure PLL is programmed before returning. */
mb();
}

/* Set clock source and divider given a clock speed */
Expand All @@ -191,6 +196,9 @@ static void acpuclk_set_src(const struct clkctl_acpu_speed *s)

/* Program clock source selection. */
writel(reg_clksel, SCSS_CLK_SEL_ADDR);

/* Make sure switch to new source is complete. */
dsb();
}

int acpuclk_set_rate(int cpu, unsigned long rate, enum setrate_reason reason)
Expand Down
13 changes: 8 additions & 5 deletions arch/arm/mach-msm/acpuclock-8x60.c
Expand Up @@ -33,10 +33,10 @@
#include <mach/msm_bus.h>
#include <mach/msm_bus_board.h>
#include <mach/socinfo.h>
#include <mach/rpm-regulator.h>

#include "acpuclock.h"
#include "clock-8x60.h"
#include "rpm-regulator.h"
#include "avs.h"

#define dprintk(msg...) \
Expand Down Expand Up @@ -308,12 +308,14 @@ static void scpll_enable(int sc_pll, uint32_t l_val)

/* Power-up SCPLL into standby mode. */
writel(SCPLL_STANDBY, sc_pll_base[sc_pll] + SCPLL_CTL_OFFSET);
dsb();
udelay(10);

/* Shot-switch to target frequency. */
regval = (l_val << 3) | SHOT_SWITCH;
writel(regval, sc_pll_base[sc_pll] + SCPLL_FSM_CTL_EXT_OFFSET);
writel(SCPLL_NORMAL, sc_pll_base[sc_pll] + SCPLL_CTL_OFFSET);
dsb();
udelay(20);
}

Expand Down Expand Up @@ -372,11 +374,11 @@ static void set_l2_speed(struct clkctl_l2_speed *tgt_s)
else {
if (tgt_s->src_sel == 1) {
scpll_enable(L2, tgt_s->l_val);
mb();
dsb();
select_core_source(L2, tgt_s->src_sel);
} else {
select_core_source(L2, tgt_s->src_sel);
mb();
dsb();
scpll_disable(L2);
}
}
Expand Down Expand Up @@ -482,12 +484,12 @@ static void switch_sc_speed(int cpu, struct clkctl_acpu_speed *tgt_s)
select_core_source(cpu, tgt_s->core_src_sel);
} else if (strt_s->pll != ACPU_SCPLL && tgt_s->pll == ACPU_SCPLL) {
scpll_enable(cpu, tgt_s->l_val);
mb();
dsb();
select_core_source(cpu, tgt_s->core_src_sel);
} else if (strt_s->pll == ACPU_SCPLL && tgt_s->pll != ACPU_SCPLL) {
select_clk_source_div(cpu, tgt_s);
select_core_source(cpu, tgt_s->core_src_sel);
mb();
dsb();
scpll_disable(cpu);
} else
scpll_change_freq(cpu, tgt_s->l_val);
Expand Down Expand Up @@ -606,6 +608,7 @@ static void __init scpll_init(int sc_pll)

/* Power-up SCPLL into standby mode. */
writel(SCPLL_STANDBY, sc_pll_base[sc_pll] + SCPLL_CTL_OFFSET);
dsb();
udelay(10);

/* Calibrate the SCPLL to the maximum range supported by the h/w. We
Expand Down
5 changes: 4 additions & 1 deletion arch/arm/mach-msm/acpuclock.c
Expand Up @@ -3,7 +3,7 @@
* MSM architecture clock driver
*
* Copyright (C) 2007 Google, Inc.
* Copyright (c) 2007-2010, Code Aurora Forum. All rights reserved.
* Copyright (c) 2007-2011, Code Aurora Forum. All rights reserved.
* Author: San Mehat <san@android.com>
*
* This software is licensed under the terms of the GNU General Public
Expand Down Expand Up @@ -347,6 +347,7 @@ static int pc_pll_request(unsigned id, unsigned on)
pll_control->pll[PLL_BASE + id].votes |= 2;
if (!pll_control->pll[PLL_BASE + id].on) {
writel(6, PLLn_MODE(id));
dsb();
udelay(50);
writel(7, PLLn_MODE(id));
pll_control->pll[PLL_BASE + id].on = 1;
Expand Down Expand Up @@ -407,6 +408,7 @@ static int acpuclk_set_vdd_level(int vdd)
current_vdd, vdd);

writel((1 << 7) | (vdd << 3), A11S_VDD_SVS_PLEVEL_ADDR);
dsb();
udelay(drv_state.vdd_switch_time_us);
if ((readl(A11S_VDD_SVS_PLEVEL_ADDR) & 0x7) != vdd) {
pr_err("VDD set failed\n");
Expand Down Expand Up @@ -593,6 +595,7 @@ int acpuclk_set_rate(int cpu, unsigned long rate, enum setrate_reason reason)
drv_state.current_speed = cur_s;
/* Re-adjust lpj for the new clock speed. */
loops_per_jiffy = cur_s->lpj;
dsb();
udelay(drv_state.acpu_switch_time_us);
}

Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-msm/board-halibut.c
Expand Up @@ -391,6 +391,7 @@ static struct platform_device *devices[] __initdata = {
&msm_device_uart3,
#endif
&msm_device_smd,
&msm_device_dmov,
&msm_device_nand,
&msm_device_hsusb,
&usb_mass_storage_device,
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-msm/board-mahimahi.c
Expand Up @@ -824,6 +824,7 @@ static struct platform_device *devices[] __initdata = {
#if !defined(CONFIG_MSM_SERIAL_DEBUGGER)
&msm_device_uart1,
#endif
&msm_device_dmov,
&bcm_bt_lpm_device,
&msm_device_uart_dm1,
&ram_console_device,
Expand Down
22 changes: 13 additions & 9 deletions arch/arm/mach-msm/board-msm8x60.c
Expand Up @@ -86,6 +86,7 @@
#include <linux/regulator/consumer.h>
#include <linux/regulator/machine.h>
#include <mach/sdio_al.h>
#include <mach/rpm-regulator.h>

#include "devices.h"
#include "devices-msm8x60.h"
Expand All @@ -97,7 +98,6 @@
#include "rpm_log.h"
#include "timer.h"
#include "saw-regulator.h"
#include "rpm-regulator.h"
#include "gpiomux.h"
#include "gpiomux-8x60.h"
#include "rpm_stats.h"
Expand Down Expand Up @@ -800,7 +800,7 @@ static struct msm_cpuidle_state msm_cstates[] __initdata = {
{1, 1, "C1", "STANDALONE_POWER_COLLAPSE",
MSM_PM_SLEEP_MODE_POWER_COLLAPSE_STANDALONE},
};
#ifdef CONFIG_USB_PEHCI_HCD
#if defined(CONFIG_USB_PEHCI_HCD) || defined(CONFIG_USB_PEHCI_HCD_MODULE)

#define ISP1763_INT_GPIO 117
#define ISP1763_RST_GPIO 152
Expand Down Expand Up @@ -3021,7 +3021,8 @@ static struct rpm_vreg_pdata rpm_vreg_init_pdata[RPM_VREG_ID_MAX] = {
RPM_VREG_INIT_LDO(PM8058_L5, 0, 1, 0, 2850000, 2850000, LDO300HMIN, 0),
RPM_VREG_INIT_LDO(PM8058_L6, 0, 1, 0, 3000000, 3600000, LDO50HMIN, 0),
RPM_VREG_INIT_LDO(PM8058_L7, 0, 1, 0, 1800000, 1800000, LDO50HMIN, 0),
RPM_VREG_INIT_LDO(PM8058_L8, 0, 1, 0, 2900000, 3050000, LDO300HMIN, 0),
RPM_VREG_INIT_LDO_PF(PM8058_L8, 0, 1, 0, 2900000, 3050000, LDO300HMIN,
RPM_VREG_PIN_CTRL_NONE, RPM_VREG_PIN_FN_SLEEP_B),
RPM_VREG_INIT_LDO(PM8058_L9, 0, 1, 0, 1800000, 1800000, LDO300HMIN, 0),
RPM_VREG_INIT_LDO(PM8058_L10, 0, 1, 0, 2600000, 2600000, LDO300HMIN, 0),
RPM_VREG_INIT_LDO(PM8058_L11, 0, 1, 0, 1500000, 1500000, LDO150HMIN, 0),
Expand All @@ -3033,7 +3034,8 @@ static struct rpm_vreg_pdata rpm_vreg_init_pdata[RPM_VREG_ID_MAX] = {
RPM_VREG_INIT_LDO(PM8058_L17, 0, 1, 0, 2600000, 2600000, LDO150HMIN, 0),
RPM_VREG_INIT_LDO(PM8058_L18, 0, 1, 1, 2200000, 2200000, LDO150HMIN, 0),
RPM_VREG_INIT_LDO(PM8058_L19, 0, 1, 0, 2500000, 2500000, LDO150HMIN, 0),
RPM_VREG_INIT_LDO(PM8058_L20, 0, 1, 0, 1800000, 1800000, LDO150HMIN, 0),
RPM_VREG_INIT_LDO_PF(PM8058_L20, 0, 1, 0, 1800000, 1800000, LDO150HMIN,
RPM_VREG_PIN_CTRL_NONE, RPM_VREG_PIN_FN_SLEEP_B),
RPM_VREG_INIT_LDO_PF(PM8058_L21, 1, 1, 0, 1200000, 1200000, LDO150HMIN,
RPM_VREG_PIN_CTRL_NONE, RPM_VREG_PIN_FN_SLEEP_B),
RPM_VREG_INIT_LDO(PM8058_L22, 0, 1, 0, 1200000, 1200000, LDO300HMIN, 0),
Expand All @@ -3045,7 +3047,7 @@ static struct rpm_vreg_pdata rpm_vreg_init_pdata[RPM_VREG_ID_MAX] = {
RPM_VREG_FREQ_1p60),
RPM_VREG_INIT_SMPS(PM8058_S1, 0, 1, 1, 500000, 1250000, SMPS_HMIN, 0,
RPM_VREG_FREQ_1p60),
RPM_VREG_INIT_SMPS(PM8058_S2, 0, 1, 0, 1200000, 1400000, SMPS_HMIN,
RPM_VREG_INIT_SMPS(PM8058_S2, 0, 1, 1, 1200000, 1400000, SMPS_HMIN,
RPM_VREG_PIN_CTRL_A0, RPM_VREG_FREQ_1p60),
RPM_VREG_INIT_SMPS(PM8058_S3, 1, 1, 0, 1800000, 1800000, SMPS_HMIN, 0,
RPM_VREG_FREQ_1p60),
Expand Down Expand Up @@ -3463,6 +3465,8 @@ static struct platform_device *charm_devices[] __initdata = {
static struct platform_device *surf_devices[] __initdata = {
&msm_device_smd,
&msm_device_uart_dm12,
&msm_device_dmov_adm0,
&msm_device_dmov_adm1,
#ifdef CONFIG_I2C_QUP
&msm_gsbi3_qup_i2c_device,
&msm_gsbi4_qup_i2c_device,
Expand All @@ -3484,7 +3488,7 @@ static struct platform_device *surf_devices[] __initdata = {
&msm_device_ssbi2,
&msm_device_ssbi3,
#endif
#ifdef CONFIG_USB_PEHCI_HCD
#if defined(CONFIG_USB_PEHCI_HCD) || defined(CONFIG_USB_PEHCI_HCD_MODULE)
&isp1763_device,
#endif

Expand Down Expand Up @@ -5791,7 +5795,7 @@ static void register_i2c_devices(void)

static void __init msm8x60_init_uart12dm(void)
{
#ifndef CONFIG_USB_PEHCI_HCD
#if !defined(CONFIG_USB_PEHCI_HCD) && !defined(CONFIG_USB_PEHCI_HCD_MODULE)
/* 0x1D000000 now belongs to EBI2:CS3 i.e. USB ISP Controller */
void *fpga_mem = ioremap_nocache(0x1D000000, SZ_4K);
/* Advanced mode */
Expand Down Expand Up @@ -5949,7 +5953,7 @@ static void __init msm8x60_init_ebi2(void)
* The lowest 4 bits are the read delay, the next
* 4 are the write delay. */
writel(0x031F1C99, ebi2_cfg_ptr + 0x10);
#ifdef CONFIG_USB_PEHCI_HCD
#if defined(CONFIG_USB_PEHCI_HCD) || defined(CONFIG_USB_PEHCI_HCD_MODULE)
/*
* RECOVERY=5, HOLD_WR=1
* INIT_LATENCY_WR=1, INIT_LATENCY_RD=1
Expand Down Expand Up @@ -8312,7 +8316,7 @@ static void __init msm8x60_init(struct msm_board_data *board_data)
platform_add_devices(rumi_sim_devices,
ARRAY_SIZE(rumi_sim_devices));
}
#ifdef CONFIG_USB_PEHCI_HCD
#if defined(CONFIG_USB_PEHCI_HCD) || defined(CONFIG_USB_PEHCI_HCD_MODULE)
if (machine_is_msm8x60_surf() || machine_is_msm8x60_ffa())
msm8x60_cfg_isp1763();
#endif
Expand Down
4 changes: 3 additions & 1 deletion arch/arm/mach-msm/board-qrdc.c
Expand Up @@ -66,6 +66,7 @@
#include <mach/msm_bus_board.h>
#include <mach/tpm_st_i2c.h>
#include <mach/socinfo.h>
#include <mach/rpm-regulator.h>
#ifdef CONFIG_USB_ANDROID
#include <linux/usb/android_composite.h>
#endif
Expand All @@ -81,7 +82,6 @@
#include "rpm_log.h"
#include "timer.h"
#include "saw-regulator.h"
#include "rpm-regulator.h"
#include "gpiomux.h"
#include "gpiomux-8x60.h"

Expand Down Expand Up @@ -1561,6 +1561,8 @@ static struct platform_device *qrdc_devices[] __initdata = {
&msm_device_smd,
&smsc911x_device,
&msm_device_uart_dm3,
&msm_device_dmov_adm0,
&msm_device_dmov_adm1,
#ifdef CONFIG_I2C_QUP
&msm_gsbi3_qup_i2c_device,
&msm_gsbi4_qup_i2c_device,
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-msm/board-sapphire.c
Expand Up @@ -907,6 +907,7 @@ static struct platform_device sapphire_camera = {

static struct platform_device *devices[] __initdata = {
&msm_device_smd,
&msm_device_dmov,
&msm_device_nand,
&msm_device_i2c,
&msm_device_uart1,
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-msm/board-swordfish.c
Expand Up @@ -278,6 +278,7 @@ static struct platform_device *devices[] __initdata = {
&msm_device_uart3,
#endif
&msm_device_smd,
&msm_device_dmov,
&msm_device_nand,
&msm_device_hsusb,
&usb_mass_storage_device,
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-msm/board-trout.c
Expand Up @@ -623,6 +623,7 @@ static struct platform_device trout_snd = {

static struct platform_device *devices[] __initdata = {
&msm_device_smd,
&msm_device_dmov,
&msm_device_nand,
&msm_device_i2c,
&msm_device_uart1,
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-msm/clock-7x30.c
Expand Up @@ -981,6 +981,8 @@ int soc_clk_set_flags(unsigned id, unsigned clk_flags)
ret = -EINVAL;

writel(regval, CAM_VFE_NS_REG);
/* Make sure write is issued before returning. */
dsb();
break;
default:
ret = -EPERM;
Expand Down

0 comments on commit 516f059

Please sign in to comment.