Merge "msm: Change the permission of 3d barrier sysfs entry" into msm-3.0
diff --git a/arch/arm/configs/fsm9xxx-perf_defconfig b/arch/arm/configs/fsm9xxx-perf_defconfig
index d5a0b3f..50145f9 100644
--- a/arch/arm/configs/fsm9xxx-perf_defconfig
+++ b/arch/arm/configs/fsm9xxx-perf_defconfig
@@ -132,6 +132,7 @@
CONFIG_GPIO_SYSFS=y
CONFIG_POWER_SUPPLY=y
CONFIG_SENSORS_MSM_ADC=y
+CONFIG_PMIC8058=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_PM8058_XO=y
# CONFIG_USB_SUPPORT is not set
@@ -149,6 +150,7 @@
CONFIG_ANDROID_RAM_CONSOLE=y
CONFIG_ANDROID_TIMED_GPIO=y
CONFIG_ANDROID_LOW_MEMORY_KILLER=y
+CONFIG_MSM_SSBI=y
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT3_FS=y
diff --git a/arch/arm/configs/fsm9xxx_defconfig b/arch/arm/configs/fsm9xxx_defconfig
index dddbdfe..4019a4f 100644
--- a/arch/arm/configs/fsm9xxx_defconfig
+++ b/arch/arm/configs/fsm9xxx_defconfig
@@ -130,6 +130,7 @@
CONFIG_GPIO_SYSFS=y
CONFIG_POWER_SUPPLY=y
CONFIG_SENSORS_MSM_ADC=y
+CONFIG_PMIC8058=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_PM8058_XO=y
# CONFIG_USB_SUPPORT is not set
@@ -147,6 +148,7 @@
CONFIG_ANDROID_RAM_CONSOLE=y
CONFIG_ANDROID_TIMED_GPIO=y
CONFIG_ANDROID_LOW_MEMORY_KILLER=y
+CONFIG_MSM_SSBI=y
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT3_FS=y
diff --git a/arch/arm/configs/msm7627-perf_defconfig b/arch/arm/configs/msm7627-perf_defconfig
index b05d52a..1cc4b97 100644
--- a/arch/arm/configs/msm7627-perf_defconfig
+++ b/arch/arm/configs/msm7627-perf_defconfig
@@ -194,6 +194,7 @@
# CONFIG_SERIO is not set
# CONFIG_LEGACY_PTYS is not set
CONFIG_SERIAL_MSM_HS=y
+CONFIG_DIAG_CHAR=y
# CONFIG_HW_RANDOM is not set
CONFIG_I2C=y
CONFIG_I2C_CHARDEV=y
@@ -247,6 +248,9 @@
CONFIG_USB_EHSET_TEST_FIXTURE=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_MSM_72K=y
+CONFIG_USB_G_ANDROID=y
+CONFIG_RMNET_SMD_CTL_CHANNEL="DATA12_CNTL"
+CONFIG_RMNET_SMD_DATA_CHANNEL="DATA12"
CONFIG_MMC=y
CONFIG_MMC_PERF_PROFILING=y
CONFIG_MMC_UNSAFE_RESUME=y
diff --git a/arch/arm/configs/msm7627_defconfig b/arch/arm/configs/msm7627_defconfig
index 15aec4b..6f0cb31 100644
--- a/arch/arm/configs/msm7627_defconfig
+++ b/arch/arm/configs/msm7627_defconfig
@@ -194,6 +194,7 @@
# CONFIG_SERIO is not set
# CONFIG_LEGACY_PTYS is not set
CONFIG_SERIAL_MSM_HS=y
+CONFIG_DIAG_CHAR=y
# CONFIG_HW_RANDOM is not set
CONFIG_DCC_TTY=y
CONFIG_I2C=y
@@ -245,6 +246,9 @@
CONFIG_USB_EHSET_TEST_FIXTURE=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_MSM_72K=y
+CONFIG_USB_G_ANDROID=y
+CONFIG_RMNET_SMD_CTL_CHANNEL="DATA12_CNTL"
+CONFIG_RMNET_SMD_DATA_CHANNEL="DATA12"
CONFIG_MMC=y
CONFIG_MMC_PERF_PROFILING=y
CONFIG_MMC_UNSAFE_RESUME=y
diff --git a/arch/arm/configs/msm7630-perf_defconfig b/arch/arm/configs/msm7630-perf_defconfig
index 143fe2b..cc86af8 100644
--- a/arch/arm/configs/msm7630-perf_defconfig
+++ b/arch/arm/configs/msm7630-perf_defconfig
@@ -244,6 +244,7 @@
CONFIG_SENSORS_MSM_ADC=y
CONFIG_THERMAL=y
CONFIG_THERMAL_MSM_POPMEM=y
+CONFIG_PMIC8058=y
CONFIG_MARIMBA_CORE=y
CONFIG_MARIMBA_CODEC=y
CONFIG_TIMPANI_CODEC=y
@@ -335,6 +336,7 @@
CONFIG_ANDROID_RAM_CONSOLE=y
CONFIG_ANDROID_TIMED_GPIO=y
CONFIG_ANDROID_LOW_MEMORY_KILLER=y
+CONFIG_MSM_SSBI=y
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT3_FS=y
diff --git a/arch/arm/configs/msm7630_defconfig b/arch/arm/configs/msm7630_defconfig
index ad49cdd..9645211 100644
--- a/arch/arm/configs/msm7630_defconfig
+++ b/arch/arm/configs/msm7630_defconfig
@@ -243,6 +243,7 @@
CONFIG_SENSORS_MSM_ADC=y
CONFIG_THERMAL=y
CONFIG_THERMAL_MSM_POPMEM=y
+CONFIG_PMIC8058=y
CONFIG_MARIMBA_CORE=y
CONFIG_MARIMBA_CODEC=y
CONFIG_TIMPANI_CODEC=y
@@ -319,6 +320,7 @@
CONFIG_ANDROID_RAM_CONSOLE=y
CONFIG_ANDROID_TIMED_GPIO=y
CONFIG_ANDROID_LOW_MEMORY_KILLER=y
+CONFIG_MSM_SSBI=y
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT3_FS=y
diff --git a/arch/arm/configs/msm8660-perf_defconfig b/arch/arm/configs/msm8660-perf_defconfig
index 0f03453..3315171 100644
--- a/arch/arm/configs/msm8660-perf_defconfig
+++ b/arch/arm/configs/msm8660-perf_defconfig
@@ -300,6 +300,7 @@
CONFIG_THERMAL_PM8901=y
CONFIG_THERMAL_PM8058=y
CONFIG_THERMAL_TSENS=y
+CONFIG_PMIC8058=y
CONFIG_MARIMBA_CORE=y
CONFIG_TIMPANI_CODEC=y
CONFIG_MEDIA_SUPPORT=y
@@ -391,6 +392,7 @@
CONFIG_ANDROID_RAM_CONSOLE_ERROR_CORRECTION=y
CONFIG_ANDROID_TIMED_GPIO=y
CONFIG_ANDROID_LOW_MEMORY_KILLER=y
+CONFIG_MSM_SSBI=y
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT3_FS=y
diff --git a/arch/arm/configs/msm8660_defconfig b/arch/arm/configs/msm8660_defconfig
index 4b2b909..698855a 100644
--- a/arch/arm/configs/msm8660_defconfig
+++ b/arch/arm/configs/msm8660_defconfig
@@ -291,6 +291,7 @@
CONFIG_THERMAL_PM8901=y
CONFIG_THERMAL_PM8058=y
CONFIG_THERMAL_TSENS=y
+CONFIG_PMIC8058=y
CONFIG_MARIMBA_CORE=y
CONFIG_TIMPANI_CODEC=y
CONFIG_MEDIA_SUPPORT=y
@@ -380,6 +381,7 @@
CONFIG_ANDROID_RAM_CONSOLE_ERROR_CORRECTION=y
CONFIG_ANDROID_TIMED_GPIO=y
CONFIG_ANDROID_LOW_MEMORY_KILLER=y
+CONFIG_MSM_SSBI=y
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT3_FS=y
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig
index e355515..5bd19e5 100644
--- a/arch/arm/mach-msm/Kconfig
+++ b/arch/arm/mach-msm/Kconfig
@@ -945,7 +945,7 @@
via muxing than BAM could without muxing.
config MSM_N_WAY_SMD
- depends on (MSM_SMD && (ARCH_MSM_SCORPION || ARCH_MSM8960 || ARCH_MSM7X27 || ARCH_MSM7X25 || ARCH_MSM9615))
+ depends on (MSM_SMD && !(ARCH_MSM7X01A))
default y
bool "MSM N-WAY SMD support"
help
@@ -953,7 +953,7 @@
normal APPS-MODEM SMD communication.
config MSM_N_WAY_SMSM
- depends on (MSM_SMD && (ARCH_MSM_SCORPION || ARCH_MSM8960 || ARCH_MSM7X27 || ARCH_MSM7X25 || ARCH_MSM9615))
+ depends on (MSM_SMD && !(ARCH_MSM7X01A))
default y
bool "MSM N-WAY SMSM support"
help
@@ -1534,7 +1534,7 @@
config MSM_IOMMU
bool "MSM IOMMU Support"
- depends on ARCH_MSM8X60 || ARCH_MSM8960
+ depends on ARCH_MSM8X60 || ARCH_MSM8960 || ARCH_APQ8064
select IOMMU_API
default n
help
diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile
index 0d36b0a..025f1c7 100644
--- a/arch/arm/mach-msm/Makefile
+++ b/arch/arm/mach-msm/Makefile
@@ -75,6 +75,7 @@
obj-$(CONFIG_MSM_SMD) += smd.o smd_debug.o remote_spinlock.o
obj-y += socinfo.o
ifndef CONFIG_ARCH_MSM9615
+ifndef CONFIG_ARCH_APQ8064
ifndef CONFIG_ARCH_MSM8960
ifndef CONFIG_ARCH_MSM8X60
obj-$(CONFIG_MSM_SMD) += pmic.o
@@ -82,6 +83,7 @@
endif
endif
endif
+endif
ifndef CONFIG_ARCH_MSM8960
ifndef CONFIG_ARCH_MSM8X60
ifndef CONFIG_ARCH_APQ8064
@@ -202,6 +204,7 @@
obj-$(CONFIG_MACH_MSM7X27A_RUMI3) += board-msm7x27a.o
obj-$(CONFIG_MACH_MSM7X27A_SURF) += board-msm7x27a.o
obj-$(CONFIG_MACH_MSM7X27A_FFA) += board-msm7x27a.o
+obj-$(CONFIG_MACH_MSM7627A_QRD1) += board-qrd7627a.o
obj-$(CONFIG_ARCH_MSM7X30) += board-msm7x30.o devices-msm7x30.o memory_topology.o
obj-$(CONFIG_ARCH_MSM7X30) += clock-local.o clock-7x30.o acpuclock-7x30.o
obj-$(CONFIG_MACH_MSM7X25_SURF) += board-msm7x27.o devices-msm7x25.o
diff --git a/arch/arm/mach-msm/acpuclock-8960.c b/arch/arm/mach-msm/acpuclock-8960.c
index 90a7504..d827dd1 100644
--- a/arch/arm/mach-msm/acpuclock-8960.c
+++ b/arch/arm/mach-msm/acpuclock-8960.c
@@ -66,7 +66,7 @@
#define STBY_KHZ 1
#define HFPLL_NOMINAL_VDD 1050000
-#define HFPLL_LOW_VDD 1050000
+#define HFPLL_LOW_VDD 945000
#define HFPLL_LOW_VDD_PLL_L_MAX 0x28
#define SECCLKAGD BIT(4)
@@ -278,20 +278,19 @@
[11] = { { 918000, HFPLL, 1, 0, 0x22 }, 1150000, 1150000, 3 },
};
-/* TODO: Update core voltages when data is available. */
static struct acpu_level acpu_freq_tbl_8960[] = {
- { 0, {STBY_KHZ, QSB, 0, 0, 0x00 }, L2(0), 1050000 },
- { 1, { 384000, PLL_8, 0, 2, 0x00 }, L2(1), 1050000 },
- { 1, { 432000, HFPLL, 2, 0, 0x20 }, L2(6), 1050000 },
- { 1, { 486000, HFPLL, 2, 0, 0x24 }, L2(6), 1050000 },
- { 1, { 540000, HFPLL, 2, 0, 0x28 }, L2(6), 1050000 },
- { 1, { 594000, HFPLL, 1, 0, 0x16 }, L2(6), 1050000 },
- { 1, { 648000, HFPLL, 1, 0, 0x18 }, L2(6), 1050000 },
- { 1, { 702000, HFPLL, 1, 0, 0x1A }, L2(6), 1050000 },
- { 1, { 756000, HFPLL, 1, 0, 0x1C }, L2(11), 1150000 },
- { 1, { 810000, HFPLL, 1, 0, 0x1E }, L2(11), 1150000 },
- { 1, { 864000, HFPLL, 1, 0, 0x20 }, L2(11), 1150000 },
- { 1, { 918000, HFPLL, 1, 0, 0x22 }, L2(11), 1150000 },
+ { 0, {STBY_KHZ, QSB, 0, 0, 0x00 }, L2(0), 950000 },
+ { 1, { 384000, PLL_8, 0, 2, 0x00 }, L2(1), 950000 },
+ { 1, { 432000, HFPLL, 2, 0, 0x20 }, L2(6), 950000 },
+ { 1, { 486000, HFPLL, 2, 0, 0x24 }, L2(6), 962500 },
+ { 1, { 540000, HFPLL, 2, 0, 0x28 }, L2(6), 962500 },
+ { 1, { 594000, HFPLL, 1, 0, 0x16 }, L2(6), 987500 },
+ { 1, { 648000, HFPLL, 1, 0, 0x18 }, L2(6), 1000000 },
+ { 1, { 702000, HFPLL, 1, 0, 0x1A }, L2(6), 1025000 },
+ { 1, { 756000, HFPLL, 1, 0, 0x1C }, L2(11), 1050000 },
+ { 1, { 810000, HFPLL, 1, 0, 0x1E }, L2(11), 1087500 },
+ { 1, { 864000, HFPLL, 1, 0, 0x20 }, L2(11), 1125000 },
+ { 1, { 918000, HFPLL, 1, 0, 0x22 }, L2(11), 1137500 },
{ 0, { 0 } }
};
diff --git a/arch/arm/mach-msm/board-9615-regulator.c b/arch/arm/mach-msm/board-9615-regulator.c
index 2cef2bb..d7d630d 100644
--- a/arch/arm/mach-msm/board-9615-regulator.c
+++ b/arch/arm/mach-msm/board-9615-regulator.c
@@ -12,6 +12,7 @@
*/
#include <linux/regulator/pm8018-regulator.h>
+#include <mach/rpm-regulator.h>
#include "board-9615.h"
@@ -155,34 +156,130 @@
.pin_ctrl = _pin_ctrl, \
}
+#define RPM_INIT(_id, _min_uV, _max_uV, _modes, _ops, _apply_uV, _default_uV, \
+ _peak_uA, _avg_uA, _pull_down, _pin_ctrl, _freq, _pin_fn, \
+ _force_mode, _power_mode, _state, _sleep_selectable, \
+ _always_on, _supply_regulator, _system_uA) \
+ { \
+ .init_data = { \
+ .constraints = { \
+ .valid_modes_mask = _modes, \
+ .valid_ops_mask = _ops, \
+ .min_uV = _min_uV, \
+ .max_uV = _max_uV, \
+ .input_uV = _min_uV, \
+ .apply_uV = _apply_uV, \
+ .always_on = _always_on, \
+ }, \
+ .num_consumer_supplies = \
+ ARRAY_SIZE(vreg_consumers_##_id), \
+ .consumer_supplies = vreg_consumers_##_id, \
+ .supply_regulator = _supply_regulator, \
+ }, \
+ .id = RPM_VREG_ID_PM8018_##_id, \
+ .default_uV = _default_uV, \
+ .peak_uA = _peak_uA, \
+ .avg_uA = _avg_uA, \
+ .pull_down_enable = _pull_down, \
+ .pin_ctrl = _pin_ctrl, \
+ .freq = RPM_VREG_FREQ_##_freq, \
+ .pin_fn = _pin_fn, \
+ .force_mode = _force_mode, \
+ .power_mode = _power_mode, \
+ .state = _state, \
+ .sleep_selectable = _sleep_selectable, \
+ .system_uA = _system_uA, \
+ }
+
+#define RPM_LDO(_id, _always_on, _pd, _sleep_selectable, _min_uV, _max_uV, \
+ _supply_regulator, _system_uA, _init_peak_uA) \
+ RPM_INIT(_id, _min_uV, _max_uV, REGULATOR_MODE_NORMAL \
+ | REGULATOR_MODE_IDLE, REGULATOR_CHANGE_VOLTAGE \
+ | REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_MODE \
+ | REGULATOR_CHANGE_DRMS, 0, _max_uV, _init_peak_uA, 0, _pd, \
+ RPM_VREG_PIN_CTRL_NONE, NONE, RPM_VREG_PIN_FN_9615_NONE, \
+ RPM_VREG_FORCE_MODE_9615_NONE, RPM_VREG_POWER_MODE_9615_PWM, \
+ RPM_VREG_STATE_OFF, _sleep_selectable, _always_on, \
+ _supply_regulator, _system_uA)
+
+#define RPM_SMPS(_id, _always_on, _pd, _sleep_selectable, _min_uV, _max_uV, \
+ _supply_regulator, _system_uA, _freq) \
+ RPM_INIT(_id, _min_uV, _max_uV, REGULATOR_MODE_NORMAL \
+ | REGULATOR_MODE_IDLE, REGULATOR_CHANGE_VOLTAGE \
+ | REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_MODE \
+ | REGULATOR_CHANGE_DRMS, 0, _max_uV, _system_uA, 0, _pd, \
+ RPM_VREG_PIN_CTRL_NONE, _freq, RPM_VREG_PIN_FN_9615_NONE, \
+ RPM_VREG_FORCE_MODE_9615_NONE, RPM_VREG_POWER_MODE_9615_PWM, \
+ RPM_VREG_STATE_OFF, _sleep_selectable, _always_on, \
+ _supply_regulator, _system_uA)
+
+#define RPM_VS(_id, _always_on, _pd, _sleep_selectable, _supply_regulator) \
+ RPM_INIT(_id, 0, 0, 0, REGULATOR_CHANGE_STATUS, 0, 0, 1000, 1000, _pd, \
+ RPM_VREG_PIN_CTRL_NONE, NONE, RPM_VREG_PIN_FN_9615_NONE, \
+ RPM_VREG_FORCE_MODE_9615_NONE, RPM_VREG_POWER_MODE_9615_PWM, \
+ RPM_VREG_STATE_OFF, _sleep_selectable, _always_on, \
+ _supply_regulator, 0)
+
+/* Pin control initialization */
+#define RPM_PC_INIT(_id, _always_on, _pin_fn, _pin_ctrl, _supply_regulator) \
+ { \
+ .init_data = { \
+ .constraints = { \
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS, \
+ .always_on = _always_on, \
+ }, \
+ .num_consumer_supplies = \
+ ARRAY_SIZE(vreg_consumers_##_id##_PC), \
+ .consumer_supplies = vreg_consumers_##_id##_PC, \
+ .supply_regulator = _supply_regulator, \
+ }, \
+ .id = RPM_VREG_ID_PM8018_##_id##_PC, \
+ .pin_fn = RPM_VREG_PIN_FN_9615_##_pin_fn, \
+ .pin_ctrl = _pin_ctrl, \
+ }
+
+
/* PM8018 regulator constraints */
struct pm8018_regulator_platform_data
msm_pm8018_regulator_pdata[] __devinitdata = {
- /* ID a_on pd min_uV max_uV en_t supply sys_uA */
- PM8018_VREG_INIT_SMPS(S1, 1, 1, 1150000, 1150000, 500, NULL, 100000),
- PM8018_VREG_INIT_SMPS(S2, 0, 1, 1225000, 1300000, 500, NULL, 0),
- PM8018_VREG_INIT_SMPS(S3, 1, 1, 1800000, 1800000, 500, NULL, 100000),
- PM8018_VREG_INIT_SMPS(S4, 0, 1, 2100000, 2200000, 500, NULL, 0),
- PM8018_VREG_INIT_SMPS(S5, 1, 1, 1350000, 1350000, 500, NULL, 100000),
+};
- PM8018_VREG_INIT_LDO(L2, 1, 1, 1800000, 1800000, 200, NULL, 10000),
- PM8018_VREG_INIT_LDO(L3, 0, 1, 1800000, 1800000, 200, NULL, 0),
- PM8018_VREG_INIT_LDO(L4, 0, 1, 3075000, 3075000, 200, NULL, 0),
- PM8018_VREG_INIT_LDO(L5, 0, 1, 2850000, 2850000, 200, NULL, 0),
- PM8018_VREG_INIT_LDO(L6, 0, 1, 1800000, 2850000, 200, NULL, 0),
- PM8018_VREG_INIT_LDO(L7, 0, 1, 1850000, 1900000, 200, "8018_s4", 0),
- PM8018_VREG_INIT_LDO(L8, 0, 1, 1200000, 1200000, 200, "8018_s3", 0),
- PM8018_VREG_INIT_LDO(L9, 1, 1, 1150000, 1150000, 200, "8018_s5",
- 10000),
- PM8018_VREG_INIT_LDO(L10, 0, 1, 1050000, 1050000, 200, "8018_s5", 0),
- PM8018_VREG_INIT_LDO(L11, 0, 1, 1050000, 1050000, 200, "8018_s5", 0),
- PM8018_VREG_INIT_LDO(L12, 0, 1, 1050000, 1050000, 200, "8018_s5", 0),
- PM8018_VREG_INIT_LDO(L13, 0, 1, 2950000, 2950000, 200, NULL, 0),
- PM8018_VREG_INIT_LDO(L14, 0, 1, 2850000, 2850000, 200, NULL, 0),
+static struct rpm_regulator_init_data
+msm_rpm_regulator_init_data[] __devinitdata = {
+ /* ID a_on pd ss min_uV max_uV supply sys_uA freq */
+ RPM_SMPS(S1, 1, 1, 1, 1150000, 1150000, NULL, 100000, 1p60),
+ RPM_SMPS(S2, 0, 1, 0, 1225000, 1300000, NULL, 0, 1p60),
+ RPM_SMPS(S3, 1, 1, 0, 1800000, 1800000, NULL, 100000, 1p60),
+ RPM_SMPS(S4, 0, 1, 0, 2100000, 2200000, NULL, 0, 1p60),
+ RPM_SMPS(S5, 1, 1, 0, 1350000, 1350000, NULL, 100000, 1p60),
- /* ID a_on pd en_t supply */
- PM8018_VREG_INIT_VS(LVS1, 0, 1, 0, "8018_s3"),
+ /* ID a_on pd ss min_uV max_uV supply sys_uA init_ip */
+ RPM_LDO(L2, 1, 1, 0, 1800000, 1800000, NULL, 0, 10000),
+ RPM_LDO(L3, 0, 1, 0, 1800000, 1800000, NULL, 0, 0),
+ RPM_LDO(L4, 0, 1, 0, 3075000, 3075000, NULL, 0, 0),
+ RPM_LDO(L5, 0, 1, 0, 2850000, 2850000, NULL, 0, 0),
+ RPM_LDO(L6, 0, 1, 0, 1800000, 2850000, NULL, 0, 0),
+ RPM_LDO(L7, 0, 1, 0, 1850000, 1900000, "8018_s4", 0, 0),
+ RPM_LDO(L8, 0, 1, 0, 1200000, 1200000, "8018_s3", 0, 0),
+ RPM_LDO(L9, 1, 1, 1, 1150000, 1150000, "8018_s5", 10000, 10000),
+ RPM_LDO(L10, 0, 1, 0, 1050000, 1050000, "8018_s5", 0, 0),
+ RPM_LDO(L11, 0, 1, 0, 1050000, 1050000, "8018_s5", 0, 0),
+ RPM_LDO(L12, 0, 1, 0, 1050000, 1050000, "8018_s5", 0, 0),
+ RPM_LDO(L13, 0, 1, 0, 2950000, 2950000, NULL, 0, 0),
+ RPM_LDO(L14, 0, 1, 0, 2850000, 2850000, NULL, 0, 0),
+
+ /* ID a_on pd ss supply */
+ RPM_VS(LVS1, 0, 1, 0, "8018_s3"),
};
int msm_pm8018_regulator_pdata_len __devinitdata =
ARRAY_SIZE(msm_pm8018_regulator_pdata);
+
+struct rpm_regulator_platform_data
+msm_rpm_regulator_9615_pdata __devinitdata = {
+ .init_data = msm_rpm_regulator_init_data,
+ .num_regulators = ARRAY_SIZE(msm_rpm_regulator_init_data),
+ .version = RPM_VREG_VERSION_9615,
+ .vreg_id_vdd_mem = RPM_VREG_ID_PM8018_L9,
+ .vreg_id_vdd_dig = RPM_VREG_ID_PM8018_S1,
+};
diff --git a/arch/arm/mach-msm/board-9615.c b/arch/arm/mach-msm/board-9615.c
index c009bdf..4a34512 100644
--- a/arch/arm/mach-msm/board-9615.c
+++ b/arch/arm/mach-msm/board-9615.c
@@ -39,6 +39,16 @@
&msm9615_device_tsens,
&msm_device_nand,
&msm_rpm_device,
+
+#if defined(CONFIG_CRYPTO_DEV_QCRYPTO) || \
+ defined(CONFIG_CRYPTO_DEV_QCRYPTO_MODULE)
+ &qcrypto_device,
+#endif
+
+#if defined(CONFIG_CRYPTO_DEV_QCEDEV) || \
+ defined(CONFIG_CRYPTO_DEV_QCEDEV_MODULE)
+ &qcedev_device,
+#endif
};
static struct pm8xxx_irq_platform_data pm8xxx_irq_pdata __devinitdata = {
@@ -87,6 +97,14 @@
},
};
+static struct platform_device msm9615_device_rpm_regulator __devinitdata = {
+ .name = "rpm-regulator",
+ .id = -1,
+ .dev = {
+ .platform_data = &msm_rpm_regulator_9615_pdata,
+ },
+};
+
static struct gpiomux_setting ps_hold = {
.func = GPIOMUX_FUNC_1,
.drv = GPIOMUX_DRV_8MA,
@@ -196,6 +214,117 @@
},
};
+#if defined(CONFIG_CRYPTO_DEV_QCRYPTO) || \
+ defined(CONFIG_CRYPTO_DEV_QCRYPTO_MODULE) || \
+ defined(CONFIG_CRYPTO_DEV_QCEDEV) || \
+ defined(CONFIG_CRYPTO_DEV_QCEDEV_MODULE)
+
+#define QCE_SIZE 0x10000
+#define QCE_0_BASE 0x18500000
+
+#define QCE_HW_KEY_SUPPORT 0
+#define QCE_SHA_HMAC_SUPPORT 1
+#define QCE_SHARE_CE_RESOURCE 1
+#define QCE_CE_SHARED 0
+
+static struct resource qcrypto_resources[] = {
+ [0] = {
+ .start = QCE_0_BASE,
+ .end = QCE_0_BASE + QCE_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .name = "crypto_channels",
+ .start = DMOV_CE_IN_CHAN,
+ .end = DMOV_CE_OUT_CHAN,
+ .flags = IORESOURCE_DMA,
+ },
+ [2] = {
+ .name = "crypto_crci_in",
+ .start = DMOV_CE_IN_CRCI,
+ .end = DMOV_CE_IN_CRCI,
+ .flags = IORESOURCE_DMA,
+ },
+ [3] = {
+ .name = "crypto_crci_out",
+ .start = DMOV_CE_OUT_CRCI,
+ .end = DMOV_CE_OUT_CRCI,
+ .flags = IORESOURCE_DMA,
+ },
+};
+
+static struct resource qcedev_resources[] = {
+ [0] = {
+ .start = QCE_0_BASE,
+ .end = QCE_0_BASE + QCE_SIZE - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .name = "crypto_channels",
+ .start = DMOV_CE_IN_CHAN,
+ .end = DMOV_CE_OUT_CHAN,
+ .flags = IORESOURCE_DMA,
+ },
+ [2] = {
+ .name = "crypto_crci_in",
+ .start = DMOV_CE_IN_CRCI,
+ .end = DMOV_CE_IN_CRCI,
+ .flags = IORESOURCE_DMA,
+ },
+ [3] = {
+ .name = "crypto_crci_out",
+ .start = DMOV_CE_OUT_CRCI,
+ .end = DMOV_CE_OUT_CRCI,
+ .flags = IORESOURCE_DMA,
+ },
+};
+
+#endif
+
+#if defined(CONFIG_CRYPTO_DEV_QCRYPTO) || \
+ defined(CONFIG_CRYPTO_DEV_QCRYPTO_MODULE)
+
+static struct msm_ce_hw_support qcrypto_ce_hw_suppport = {
+ .ce_shared = QCE_CE_SHARED,
+ .shared_ce_resource = QCE_SHARE_CE_RESOURCE,
+ .hw_key_support = QCE_HW_KEY_SUPPORT,
+ .sha_hmac = QCE_SHA_HMAC_SUPPORT,
+};
+
+static struct platform_device qcrypto_device = {
+ .name = "qcrypto",
+ .id = 0,
+ .num_resources = ARRAY_SIZE(qcrypto_resources),
+ .resource = qcrypto_resources,
+ .dev = {
+ .coherent_dma_mask = DMA_BIT_MASK(32),
+ .platform_data = &qcrypto_ce_hw_suppport,
+ },
+};
+#endif
+
+#if defined(CONFIG_CRYPTO_DEV_QCEDEV) || \
+ defined(CONFIG_CRYPTO_DEV_QCEDEV_MODULE)
+
+static struct msm_ce_hw_support qcedev_ce_hw_suppport = {
+ .ce_shared = QCE_CE_SHARED,
+ .shared_ce_resource = QCE_SHARE_CE_RESOURCE,
+ .hw_key_support = QCE_HW_KEY_SUPPORT,
+ .sha_hmac = QCE_SHA_HMAC_SUPPORT,
+};
+
+static struct platform_device qcedev_device = {
+ .name = "qce",
+ .id = 0,
+ .num_resources = ARRAY_SIZE(qcedev_resources),
+ .resource = qcedev_resources,
+ .dev = {
+ .coherent_dma_mask = DMA_BIT_MASK(32),
+ .platform_data = &qcedev_ce_hw_suppport,
+ },
+};
+#endif
+
#if (defined(CONFIG_MMC_MSM_SDC1_SUPPORT)\
|| defined(CONFIG_MMC_MSM_SDC2_SUPPORT))
@@ -501,6 +630,7 @@
gpiomux_init();
msm9615_i2c_init();
regulator_suppress_info_printing();
+ platform_device_register(&msm9615_device_rpm_regulator);
msm9615_device_qup_spi_gsbi3.dev.platform_data =
&msm9615_qup_spi_gsbi3_pdata;
msm9615_device_ssbi_pmic1.dev.platform_data =
diff --git a/arch/arm/mach-msm/board-9615.h b/arch/arm/mach-msm/board-9615.h
index d8e74fe..0d9fae7 100644
--- a/arch/arm/mach-msm/board-9615.h
+++ b/arch/arm/mach-msm/board-9615.h
@@ -29,4 +29,7 @@
extern int msm_pm8018_regulator_pdata_len __devinitdata;
+extern struct rpm_regulator_platform_data
+msm_rpm_regulator_9615_pdata __devinitdata;
+
#endif
diff --git a/arch/arm/mach-msm/board-apq8064.c b/arch/arm/mach-msm/board-apq8064.c
index 907fa72..d37fb7b 100644
--- a/arch/arm/mach-msm/board-apq8064.c
+++ b/arch/arm/mach-msm/board-apq8064.c
@@ -271,8 +271,10 @@
apq8064_add_sdcc(3, apq8064_sdc3_pdata);
}
+#define MSM_SHARED_RAM_PHYS 0x80000000
static void __init apq8064_map_io(void)
{
+ msm_shared_ram_phys = MSM_SHARED_RAM_PHYS;
msm_map_apq8064_io();
if (socinfo_init() < 0)
pr_err("socinfo_init() failed!\n");
@@ -307,6 +309,7 @@
&apq8064_slim_ctrl,
&apq8064_device_ssbi_pmic1,
&apq8064_device_ssbi_pmic2,
+ &msm_device_smd_apq8064,
};
static struct platform_device *sim_devices[] __initdata = {
diff --git a/arch/arm/mach-msm/board-fsm9xxx.c b/arch/arm/mach-msm/board-fsm9xxx.c
index 5244434..eb936e4 100644
--- a/arch/arm/mach-msm/board-fsm9xxx.c
+++ b/arch/arm/mach-msm/board-fsm9xxx.c
@@ -16,6 +16,7 @@
#include <linux/platform_device.h>
#include <linux/delay.h>
#include <linux/io.h>
+#include <linux/msm_ssbi.h>
#include <linux/mfd/pmic8058.h>
#include <linux/regulator/pmic8058-regulator.h>
#include <linux/i2c.h>
@@ -247,6 +248,7 @@
.name = "pm8058-regulator", \
.id = _id, \
.platform_data = &pm8058_vreg_init[_id], \
+ .pdata_size = sizeof(pm8058_vreg_init[_id]), \
}
#ifdef CONFIG_SENSORS_MSM_ADC
@@ -463,18 +465,21 @@
static struct pm8058_platform_data pm8058_fsm9xxx_data = {
.irq_base = PMIC8058_IRQ_BASE,
+ .irq = MSM_GPIO_TO_INT(47),
.num_subdevs = ARRAY_SIZE(pm8058_subdevs),
.sub_devices = pm8058_subdevs,
};
-static struct i2c_board_info pm8058_boardinfo[] __initdata = {
- {
- I2C_BOARD_INFO("pm8058-core", 0x55),
- .irq = MSM_GPIO_TO_INT(47),
- .platform_data = &pm8058_fsm9xxx_data,
+#ifdef CONFIG_MSM_SSBI
+static struct msm_ssbi_platform_data fsm9xxx_ssbi_pm8058_pdata = {
+ .controller_type = FSM_SBI_CTRL_SSBI,
+ .slave = {
+ .name = "pm8058-core",
+ .platform_data = &pm8058_fsm9xxx_data,
},
};
+#endif
static int __init buses_init(void)
{
@@ -483,9 +488,6 @@
pr_err("%s: gpio_tlmm_config (gpio=%d) failed\n",
__func__, PMIC_GPIO_INT);
- i2c_register_board_info(0 /* I2C_SSBI ID */, pm8058_boardinfo,
- ARRAY_SIZE(pm8058_boardinfo));
-
return 0;
}
@@ -602,10 +604,6 @@
*/
#ifdef CONFIG_I2C_SSBI
-static struct msm_i2c_ssbi_platform_data msm_i2c_ssbi1_pdata = {
- .controller_type = FSM_SBI_CTRL_SSBI,
-};
-
static struct msm_i2c_ssbi_platform_data msm_i2c_ssbi2_pdata = {
.controller_type = FSM_SBI_CTRL_SSBI,
};
@@ -613,7 +611,9 @@
static struct msm_i2c_ssbi_platform_data msm_i2c_ssbi3_pdata = {
.controller_type = FSM_SBI_CTRL_SSBI,
};
+#endif
+#if defined(CONFIG_I2C_SSBI) || defined(CONFIG_MSM_SSBI)
/* Intialize GPIO configuration for SSBI */
static struct msm_gpio ssbi_gpio_config_data[] = {
{ GPIO_CFG(140, 1, GPIO_CFG_OUTPUT, GPIO_CFG_PULL_DOWN, GPIO_CFG_4MA),
@@ -811,8 +811,10 @@
&msm_device_smd,
&msm_device_dmov,
&msm_device_nand,
+#ifdef CONFIG_MSM_SSBI
+ &msm_device_ssbi_pmic1,
+#endif
#ifdef CONFIG_I2C_SSBI
- &msm_device_ssbi1,
&msm_device_ssbi2,
&msm_device_ssbi3,
#endif
@@ -873,6 +875,14 @@
regulator_has_full_constraints();
+#if defined(CONFIG_I2C_SSBI) || defined(CONFIG_MSM_SSBI)
+ fsm9xxx_init_ssbi_gpio();
+#endif
+#ifdef CONFIG_MSM_SSBI
+ msm_device_ssbi_pmic1.dev.platform_data =
+ &fsm9xxx_ssbi_pm8058_pdata;
+#endif
+
platform_add_devices(devices, ARRAY_SIZE(devices));
#ifdef CONFIG_MSM_SPM
@@ -887,8 +897,6 @@
fsm9xxx_init_uart1();
#endif
#ifdef CONFIG_I2C_SSBI
- fsm9xxx_init_ssbi_gpio();
- msm_device_ssbi1.dev.platform_data = &msm_i2c_ssbi1_pdata;
msm_device_ssbi2.dev.platform_data = &msm_i2c_ssbi2_pdata;
msm_device_ssbi3.dev.platform_data = &msm_i2c_ssbi3_pdata;
#endif
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
index ee9df6f..fa53e3d 100644
--- a/arch/arm/mach-msm/board-msm7x30.c
+++ b/arch/arm/mach-msm/board-msm7x30.c
@@ -21,6 +21,7 @@
#ifdef CONFIG_SPI_QSD
#include <linux/spi/spi.h>
#endif
+#include <linux/msm_ssbi.h>
#include <linux/mfd/pmic8058.h>
#include <linux/mfd/marimba.h>
#include <linux/i2c.h>
@@ -816,19 +817,22 @@
static struct pm8058_platform_data pm8058_7x30_data = {
.irq_base = PMIC8058_IRQ_BASE,
+ .irq = MSM_GPIO_TO_INT(PMIC_GPIO_INT),
.num_subdevs = ARRAY_SIZE(pm8058_subdevs),
.sub_devices = pm8058_subdevs,
.irq_trigger_flags = IRQF_TRIGGER_LOW,
};
-static struct i2c_board_info pm8058_boardinfo[] __initdata = {
- {
- I2C_BOARD_INFO("pm8058-core", 0x55),
- .irq = MSM_GPIO_TO_INT(PMIC_GPIO_INT),
- .platform_data = &pm8058_7x30_data,
+#ifdef CONFIG_MSM_SSBI
+static struct msm_ssbi_platform_data msm7x30_ssbi_pm8058_pdata = {
+ .controller_type = MSM_SBI_CTRL_SSBI2,
+ .slave = {
+ .name = "pm8058-core",
+ .platform_data = &pm8058_7x30_data,
},
};
+#endif
static struct i2c_board_info cy8info[] __initdata = {
{
@@ -1607,9 +1611,6 @@
= sizeof(surf_keypad_data);
}
- i2c_register_board_info(6 /* I2C_SSBI ID */, pm8058_boardinfo,
- ARRAY_SIZE(pm8058_boardinfo));
-
return 0;
}
@@ -5306,8 +5307,11 @@
&android_usb_device,
#endif
&qsd_device_spi,
+
+#ifdef CONFIG_MSM_SSBI
+ &msm_device_ssbi_pmic1,
+#endif
#ifdef CONFIG_I2C_SSBI
- &msm_device_ssbi6,
&msm_device_ssbi7,
#endif
&android_pmem_device,
@@ -5513,11 +5517,6 @@
}
#ifdef CONFIG_I2C_SSBI
-static struct msm_i2c_ssbi_platform_data msm_i2c_ssbi6_pdata = {
- .rsl_id = "D:PMIC_SSBI",
- .controller_type = MSM_SBI_CTRL_SSBI2,
-};
-
static struct msm_i2c_ssbi_platform_data msm_i2c_ssbi7_pdata = {
.rsl_id = "D:CODEC_SSBI",
.controller_type = MSM_SBI_CTRL_SSBI,
@@ -6977,6 +6976,11 @@
msm_adc_pdata.num_adc = ARRAY_SIZE(msm_adc_surf_device_names);
}
+#ifdef CONFIG_MSM_SSBI
+ msm_device_ssbi_pmic1.dev.platform_data =
+ &msm7x30_ssbi_pm8058_pdata;
+#endif
+
platform_add_devices(msm_footswitch_devices,
msm_num_footswitch_devices);
platform_add_devices(devices, ARRAY_SIZE(devices));
@@ -7034,7 +7038,6 @@
bt_power_init();
#ifdef CONFIG_I2C_SSBI
- msm_device_ssbi6.dev.platform_data = &msm_i2c_ssbi6_pdata;
msm_device_ssbi7.dev.platform_data = &msm_i2c_ssbi7_pdata;
#endif
if (machine_is_msm7x30_fluid())
diff --git a/arch/arm/mach-msm/board-msm8960-regulator.c b/arch/arm/mach-msm/board-msm8960-regulator.c
index e85202d..e3f0e31 100644
--- a/arch/arm/mach-msm/board-msm8960-regulator.c
+++ b/arch/arm/mach-msm/board-msm8960-regulator.c
@@ -444,9 +444,9 @@
/* SAW regulator constraints */
struct regulator_init_data msm_saw_regulator_pdata_s5 =
/* ID vreg_name min_uV max_uV */
- SAW_VREG_INIT(S5, "8921_s5", 1050000, 1150000);
+ SAW_VREG_INIT(S5, "8921_s5", 950000, 1150000);
struct regulator_init_data msm_saw_regulator_pdata_s6 =
- SAW_VREG_INIT(S6, "8921_s6", 1050000, 1150000);
+ SAW_VREG_INIT(S6, "8921_s6", 950000, 1150000);
/* PM8921 regulator constraints */
struct pm8921_regulator_platform_data
diff --git a/arch/arm/mach-msm/board-msm8960.c b/arch/arm/mach-msm/board-msm8960.c
index bbaf09c..058bc47 100644
--- a/arch/arm/mach-msm/board-msm8960.c
+++ b/arch/arm/mach-msm/board-msm8960.c
@@ -3755,6 +3755,7 @@
static struct pm8xxx_rtc_platform_data pm8xxx_rtc_pdata __devinitdata = {
.rtc_write_enable = false,
+ .rtc_alarm_powerup = false,
};
static struct pm8xxx_pwrkey_platform_data pm8xxx_pwrkey_pdata = {
diff --git a/arch/arm/mach-msm/board-msm8x60.c b/arch/arm/mach-msm/board-msm8x60.c
index 160a966..dab800f 100644
--- a/arch/arm/mach-msm/board-msm8x60.c
+++ b/arch/arm/mach-msm/board-msm8x60.c
@@ -16,6 +16,7 @@
#include <linux/gpio.h>
#include <linux/irq.h>
#include <linux/io.h>
+#include <linux/msm_ssbi.h>
#include <linux/mfd/pmic8058.h>
#include <linux/input/pmic8058-keypad.h>
@@ -2477,11 +2478,6 @@
#ifdef CONFIG_I2C_SSBI
/* PMIC SSBI */
-static struct msm_i2c_ssbi_platform_data msm_ssbi1_pdata = {
- .controller_type = MSM_SBI_CTRL_PMIC_ARBITER,
-};
-
-/* PMIC SSBI */
static struct msm_i2c_ssbi_platform_data msm_ssbi2_pdata = {
.controller_type = MSM_SBI_CTRL_PMIC_ARBITER,
};
@@ -4131,7 +4127,6 @@
&msm_gsbi12_qup_i2c_device,
#endif
#ifdef CONFIG_I2C_SSBI
- &msm_device_ssbi1,
&msm_device_ssbi2,
&msm_device_ssbi3,
#endif
@@ -4976,8 +4971,10 @@
#ifdef CONFIG_SERIAL_MSM_HS
&msm_device_uart_dm1,
#endif
+#ifdef CONFIG_MSM_SSBI
+ &msm_device_ssbi_pmic1,
+#endif
#ifdef CONFIG_I2C_SSBI
- &msm_device_ssbi1,
&msm_device_ssbi2,
&msm_device_ssbi3,
#endif
@@ -6324,20 +6321,23 @@
static struct pm8058_platform_data pm8058_platform_data = {
.irq_base = PM8058_IRQ_BASE,
+ .irq = MSM_GPIO_TO_INT(PM8058_GPIO_INT),
.num_subdevs = ARRAY_SIZE(pm8058_subdevs),
.sub_devices = pm8058_subdevs,
.irq_trigger_flags = IRQF_TRIGGER_LOW,
};
-static struct i2c_board_info pm8058_boardinfo[] __initdata = {
- {
- I2C_BOARD_INFO("pm8058-core", 0x55),
- .irq = MSM_GPIO_TO_INT(PM8058_GPIO_INT),
- .platform_data = &pm8058_platform_data,
+#ifdef CONFIG_MSM_SSBI
+static struct msm_ssbi_platform_data msm8x60_ssbi_pm8058_pdata __devinitdata = {
+ .controller_type = MSM_SBI_CTRL_PMIC_ARBITER,
+ .slave = {
+ .name = "pm8058-core",
+ .platform_data = &pm8058_platform_data,
},
};
-#endif /* CONFIG_PMIC8058 */
+#endif
+#endif /* CONFIG_PMIC8058 */
#if defined(CONFIG_TOUCHDISC_VTD518_SHINETSU) || \
defined(CONFIG_TOUCHDISC_VTD518_SHINETSU_MODULE)
@@ -7121,14 +7121,6 @@
};
static struct i2c_registry msm8x60_i2c_devices[] __initdata = {
-#ifdef CONFIG_PMIC8058
- {
- I2C_SURF | I2C_FFA | I2C_FLUID | I2C_DRAGON,
- MSM_SSBI1_I2C_BUS_ID,
- pm8058_boardinfo,
- ARRAY_SIZE(pm8058_boardinfo),
- },
-#endif
#ifdef CONFIG_PMIC8901
{
I2C_SURF | I2C_FFA | I2C_FLUID | I2C_DRAGON,
@@ -7399,11 +7391,15 @@
msm_gsbi1_qup_spi_device.dev.platform_data = &msm_gsbi1_qup_spi_pdata;
#endif
#ifdef CONFIG_I2C_SSBI
- msm_device_ssbi1.dev.platform_data = &msm_ssbi1_pdata;
msm_device_ssbi2.dev.platform_data = &msm_ssbi2_pdata;
msm_device_ssbi3.dev.platform_data = &msm_ssbi3_pdata;
#endif
+#ifdef CONFIG_MSM_SSBI
+ msm_device_ssbi_pmic1.dev.platform_data =
+ &msm8x60_ssbi_pm8058_pdata;
+#endif
+
if (machine_is_msm8x60_fluid()) {
#if (defined(CONFIG_USB_EHCI_MSM_72K) && \
(defined(CONFIG_SMB137B_CHARGER) || \
diff --git a/arch/arm/mach-msm/board-qrd7627a.c b/arch/arm/mach-msm/board-qrd7627a.c
index b09352c..4552f80 100644
--- a/arch/arm/mach-msm/board-qrd7627a.c
+++ b/arch/arm/mach-msm/board-qrd7627a.c
@@ -13,7 +13,7 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/gpio_event.h>
-#include <linux/usb/android_composite.h>
+#include <linux/usb/android.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/gpio.h>
@@ -957,100 +957,8 @@
#endif
-static char *usb_functions_default[] = {
- "diag",
- "modem",
- "nmea",
- "rmnet",
- "usb_mass_storage",
-};
-
-static char *usb_functions_default_adb[] = {
- "diag",
- "adb",
- "modem",
- "nmea",
- "rmnet",
- "usb_mass_storage",
-};
-
-static char *usb_functions_rndis[] = {
- "rndis",
-};
-
-static char *usb_functions_rndis_adb[] = {
- "rndis",
- "adb",
-};
-
-static char *usb_functions_all[] = {
-#ifdef CONFIG_USB_ANDROID_RNDIS
- "rndis",
-#endif
-#ifdef CONFIG_USB_ANDROID_DIAG
- "diag",
-#endif
- "adb",
-#ifdef CONFIG_USB_F_SERIAL
- "modem",
- "nmea",
-#endif
-#ifdef CONFIG_USB_ANDROID_RMNET
- "rmnet",
-#endif
- "usb_mass_storage",
-};
-
-static struct android_usb_product usb_products[] = {
- {
- .product_id = 0x9026,
- .num_functions = ARRAY_SIZE(usb_functions_default),
- .functions = usb_functions_default,
- },
- {
- .product_id = 0x9025,
- .num_functions = ARRAY_SIZE(usb_functions_default_adb),
- .functions = usb_functions_default_adb,
- },
- {
- .product_id = 0xf00e,
- .num_functions = ARRAY_SIZE(usb_functions_rndis),
- .functions = usb_functions_rndis,
- },
- {
- .product_id = 0x9024,
- .num_functions = ARRAY_SIZE(usb_functions_rndis_adb),
- .functions = usb_functions_rndis_adb,
- },
-};
-
-static struct usb_mass_storage_platform_data mass_storage_pdata = {
- .nluns = 1,
- .vendor = "Qualcomm Incorporated",
- .product = "Mass storage",
- .release = 0x0100,
-
-};
-
-static struct platform_device usb_mass_storage_device = {
- .name = "usb_mass_storage",
- .id = -1,
- .dev = {
- .platform_data = &mass_storage_pdata,
- },
-};
-
static struct android_usb_platform_data android_usb_pdata = {
- .vendor_id = 0x05C6,
- .product_id = 0x9026,
- .version = 0x0100,
- .product_name = "Qualcomm HSUSB Device",
- .manufacturer_name = "Qualcomm Incorporated",
- .num_products = ARRAY_SIZE(usb_products),
- .products = usb_products,
- .num_functions = ARRAY_SIZE(usb_functions_all),
- .functions = usb_functions_all,
- .serial_number = "1234567890ABCDEF",
+ .update_pid_and_serial_num = usb_diag_update_pid_and_serial_num,
};
static struct platform_device android_usb_device = {
@@ -1061,38 +969,6 @@
},
};
-static struct usb_ether_platform_data rndis_pdata = {
- .vendorID = 0x05C6,
- .vendorDescr = "Qualcomm Incorporated",
-};
-
-static struct platform_device rndis_device = {
- .name = "rndis",
- .id = -1,
- .dev = {
- .platform_data = &rndis_pdata,
- },
-};
-
-static int __init board_serialno_setup(char *serialno)
-{
- int i;
- char *src = serialno;
-
- /* create a fake MAC address from our serial number.
- * first byte is 0x02 to signify locally administered.
- */
- rndis_pdata.ethaddr[0] = 0x02;
- for (i = 0; *src; i++) {
- /* XOR the USB serial across the remaining bytes */
- rndis_pdata.ethaddr[i % (ETH_ALEN - 1) + 1] ^= *src++;
- }
-
- android_usb_pdata.serial_number = serialno;
- return 1;
-}
-__setup("androidboot.serialno=", board_serialno_setup);
-
#ifdef CONFIG_USB_EHCI_MSM_72K
static void msm_hsusb_vbus_power(unsigned phy_info, int on)
{
@@ -1824,10 +1700,6 @@
&android_usb_device,
&android_pmem_device,
&android_pmem_adsp_device,
- &usb_mass_storage_device,
- &rndis_device,
- &usb_diag_device,
- &usb_gadget_fserial_device,
&android_pmem_audio_device,
&msm_device_snd,
&msm_device_adspdec,
diff --git a/arch/arm/mach-msm/clock-9615.c b/arch/arm/mach-msm/clock-9615.c
index a5db9b2..9b9ac4a 100644
--- a/arch/arm/mach-msm/clock-9615.c
+++ b/arch/arm/mach-msm/clock-9615.c
@@ -1576,6 +1576,15 @@
CLK_LOOKUP("ebi1_msmbus_clk", ebi1_msmbus_clk.c, NULL),
CLK_LOOKUP("mem_clk", ebi1_adm_clk.c, "msm_dmov"),
+ CLK_LOOKUP("iface_clk", ce1_p_clk.c, "qce.0"),
+ CLK_LOOKUP("iface_clk", ce1_p_clk.c, "qcrypto.0"),
+ CLK_LOOKUP("core_clk", ce1_core_clk.c, "qce.0"),
+ CLK_LOOKUP("core_clk", ce1_core_clk.c, "qcrypto.0"),
+
+ /* TODO: Make this real when RPM's ready. */
+ CLK_DUMMY("ebi1_msmbus_clk", ebi1_msmbus_clk.c, NULL, OFF),
+ CLK_DUMMY("mem_clk", ebi1_adm_clk.c, "msm_dmov", OFF),
+
};
static void set_fsm_mode(void __iomem *mode_reg)
diff --git a/arch/arm/mach-msm/cpufreq.c b/arch/arm/mach-msm/cpufreq.c
index 637832d..649aeab 100644
--- a/arch/arm/mach-msm/cpufreq.c
+++ b/arch/arm/mach-msm/cpufreq.c
@@ -278,6 +278,11 @@
static SYSDEV_CLASS_ATTR(mfreq, 0200, NULL, store_mfreq);
+static struct freq_attr *msm_freq_attr[] = {
+ &cpufreq_freq_attr_scaling_available_freqs,
+ NULL,
+};
+
static struct cpufreq_driver msm_cpufreq_driver = {
/* lps calculations are handled here. */
.flags = CPUFREQ_STICKY | CPUFREQ_CONST_LOOPS,
@@ -285,6 +290,7 @@
.verify = msm_cpufreq_verify,
.target = msm_cpufreq_target,
.name = "msm",
+ .attr = msm_freq_attr,
};
static struct notifier_block msm_cpufreq_pm_notifier = {
diff --git a/arch/arm/mach-msm/devices-8064.c b/arch/arm/mach-msm/devices-8064.c
index 02b7569..99e8d23 100644
--- a/arch/arm/mach-msm/devices-8064.c
+++ b/arch/arm/mach-msm/devices-8064.c
@@ -549,6 +549,11 @@
.dev.platform_data = &msm_sps_pdata,
};
+struct platform_device msm_device_smd_apq8064 = {
+ .name = "msm_smd",
+ .id = -1,
+};
+
static struct clk_lookup msm_clocks_8064_dummy[] = {
CLK_DUMMY("pll2", PLL2, NULL, 0),
CLK_DUMMY("pll8", PLL8, NULL, 0),
diff --git a/arch/arm/mach-msm/devices-fsm9xxx.c b/arch/arm/mach-msm/devices-fsm9xxx.c
index 86f2e18..426be10 100644
--- a/arch/arm/mach-msm/devices-fsm9xxx.c
+++ b/arch/arm/mach-msm/devices-fsm9xxx.c
@@ -74,27 +74,26 @@
* SSBIs
*/
-#ifdef CONFIG_I2C_SSBI
-
-#define MSM_SSBI1_PHYS 0x94080000
-#define MSM_SSBI1_SIZE SZ_4K
-
-static struct resource msm_ssbi1_resources[] = {
+#ifdef CONFIG_MSM_SSBI
+#define MSM_SSBI1_PHYS 0x94080000
+#define MSM_SSBI_PMIC1_PHYS MSM_SSBI1_PHYS
+static struct resource msm_ssbi_pmic1_resources[] = {
{
- .name = "ssbi_base",
- .start = MSM_SSBI1_PHYS,
- .end = MSM_SSBI1_PHYS + MSM_SSBI1_SIZE - 1,
- .flags = IORESOURCE_MEM,
+ .start = MSM_SSBI_PMIC1_PHYS,
+ .end = MSM_SSBI_PMIC1_PHYS + SZ_4K - 1,
+ .flags = IORESOURCE_MEM,
},
};
-struct platform_device msm_device_ssbi1 = {
- .name = "i2c_ssbi",
- .id = 0,
- .num_resources = ARRAY_SIZE(msm_ssbi1_resources),
- .resource = msm_ssbi1_resources,
+struct platform_device msm_device_ssbi_pmic1 = {
+ .name = "msm_ssbi",
+ .id = 0,
+ .resource = msm_ssbi_pmic1_resources,
+ .num_resources = ARRAY_SIZE(msm_ssbi_pmic1_resources),
};
+#endif
+#ifdef CONFIG_I2C_SSBI
#define MSM_SSBI2_PHYS 0x94090000
#define MSM_SSBI2_SIZE SZ_4K
diff --git a/arch/arm/mach-msm/devices-iommu.c b/arch/arm/mach-msm/devices-iommu.c
index a945349..73c96fb 100644
--- a/arch/arm/mach-msm/devices-iommu.c
+++ b/arch/arm/mach-msm/devices-iommu.c
@@ -15,6 +15,9 @@
#include <linux/bootmem.h>
#include <mach/irqs.h>
#include <mach/iommu.h>
+#include <mach/socinfo.h>
+#include <mach/irqs-8960.h>
+#include <mach/irqs-8064.h>
static struct resource msm_iommu_jpegd_resources[] = {
{
@@ -226,6 +229,27 @@
},
};
+static struct resource msm_iommu_gfx3d1_resources[] = {
+ {
+ .start = 0x07D00000,
+ .end = 0x07D00000 + SZ_1M - 1,
+ .name = "physbase",
+ .flags = IORESOURCE_MEM,
+ },
+ {
+ .name = "nonsecure_irq",
+ .start = SMMU_GFX3D1_CB_SC_NON_SECURE_IRQ,
+ .end = SMMU_GFX3D1_CB_SC_NON_SECURE_IRQ,
+ .flags = IORESOURCE_IRQ,
+ },
+ {
+ .name = "secure_irq",
+ .start = SMMU_GFX3D1_CB_SC_SECURE_IRQ,
+ .end = SMMU_GFX3D1_CB_SC_SECURE_IRQ,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
static struct resource msm_iommu_gfx2d0_resources[] = {
{
.start = 0x07D00000,
@@ -268,6 +292,27 @@
},
};
+static struct resource msm_iommu_vcap_resources[] = {
+ {
+ .start = 0x07200000,
+ .end = 0x07200000 + SZ_1M - 1,
+ .name = "physbase",
+ .flags = IORESOURCE_MEM,
+ },
+ {
+ .name = "nonsecure_irq",
+ .start = SMMU_VCAP_CB_SC_NON_SECURE_IRQ,
+ .end = SMMU_VCAP_CB_SC_NON_SECURE_IRQ,
+ .flags = IORESOURCE_IRQ,
+ },
+ {
+ .name = "secure_irq",
+ .start = SMMU_VCAP_CB_SC_SECURE_IRQ,
+ .end = SMMU_VCAP_CB_SC_SECURE_IRQ,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
static struct platform_device msm_root_iommu_dev = {
.name = "msm_iommu",
.id = -1,
@@ -323,6 +368,11 @@
.ncb = 3,
};
+static struct msm_iommu_dev gfx3d1_iommu = {
+ .name = "gfx3d1",
+ .ncb = 3,
+};
+
static struct msm_iommu_dev gfx2d0_iommu = {
.name = "gfx2d0",
.ncb = 2,
@@ -333,6 +383,11 @@
.ncb = 2,
};
+static struct msm_iommu_dev vcap_iommu = {
+ .name = "vcap",
+ .ncb = 2,
+};
+
static struct platform_device msm_device_iommu_jpegd = {
.name = "msm_iommu",
.id = 0,
@@ -433,6 +488,16 @@
.resource = msm_iommu_gfx3d_resources,
};
+static struct platform_device msm_device_iommu_gfx3d1 = {
+ .name = "msm_iommu",
+ .id = 10,
+ .dev = {
+ .parent = &msm_root_iommu_dev.dev,
+ },
+ .num_resources = ARRAY_SIZE(msm_iommu_gfx3d1_resources),
+ .resource = msm_iommu_gfx3d1_resources,
+};
+
static struct platform_device msm_device_iommu_gfx2d0 = {
.name = "msm_iommu",
.id = 10,
@@ -443,7 +508,7 @@
.resource = msm_iommu_gfx2d0_resources,
};
-struct platform_device msm_device_iommu_gfx2d1 = {
+static struct platform_device msm_device_iommu_gfx2d1 = {
.name = "msm_iommu",
.id = 11,
.dev = {
@@ -453,6 +518,16 @@
.resource = msm_iommu_gfx2d1_resources,
};
+static struct platform_device msm_device_iommu_vcap = {
+ .name = "msm_iommu",
+ .id = 11,
+ .dev = {
+ .parent = &msm_root_iommu_dev.dev,
+ },
+ .num_resources = ARRAY_SIZE(msm_iommu_vcap_resources),
+ .resource = msm_iommu_vcap_resources,
+};
+
static struct msm_iommu_ctx_dev jpegd_src_ctx = {
.name = "jpegd_src",
.num = 0,
@@ -568,6 +643,19 @@
31, -1}
};
+static struct msm_iommu_ctx_dev gfx3d1_user_ctx = {
+ .name = "gfx3d1_user",
+ .num = 0,
+ .mids = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, -1}
+};
+
+static struct msm_iommu_ctx_dev gfx3d1_priv_ctx = {
+ .name = "gfx3d1_priv",
+ .num = 1,
+ .mids = {16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, -1}
+};
+
static struct msm_iommu_ctx_dev gfx2d0_2d0_ctx = {
.name = "gfx2d0_2d0",
.num = 0,
@@ -580,6 +668,18 @@
.mids = {0, 1, 2, 3, 4, 5, 6, 7, -1}
};
+static struct msm_iommu_ctx_dev vcap_vc_ctx = {
+ .name = "vcap_vc",
+ .num = 0,
+ .mids = {0, -1}
+};
+
+static struct msm_iommu_ctx_dev vcap_vp_ctx = {
+ .name = "vcap_vp",
+ .num = 1,
+ .mids = {1, -1}
+};
+
static struct platform_device msm_device_jpegd_src_ctx = {
.name = "msm_iommu_ctx",
.id = 0,
@@ -732,6 +832,22 @@
},
};
+static struct platform_device msm_device_gfx3d1_user_ctx = {
+ .name = "msm_iommu_ctx",
+ .id = 19,
+ .dev = {
+ .parent = &msm_device_iommu_gfx3d1.dev,
+ },
+};
+
+static struct platform_device msm_device_gfx3d1_priv_ctx = {
+ .name = "msm_iommu_ctx",
+ .id = 20,
+ .dev = {
+ .parent = &msm_device_iommu_gfx3d1.dev,
+ },
+};
+
static struct platform_device msm_device_gfx2d0_2d0_ctx = {
.name = "msm_iommu_ctx",
.id = 19,
@@ -748,7 +864,23 @@
},
};
-static struct platform_device *msm_iommu_devs[] = {
+static struct platform_device msm_device_vcap_vc_ctx = {
+ .name = "msm_iommu_ctx",
+ .id = 21,
+ .dev = {
+ .parent = &msm_device_iommu_vcap.dev,
+ },
+};
+
+static struct platform_device msm_device_vcap_vp_ctx = {
+ .name = "msm_iommu_ctx",
+ .id = 22,
+ .dev = {
+ .parent = &msm_device_iommu_vcap.dev,
+ },
+};
+
+static struct platform_device *msm_iommu_common_devs[] = {
&msm_device_iommu_jpegd,
&msm_device_iommu_vpe,
&msm_device_iommu_mdp0,
@@ -759,11 +891,19 @@
&msm_device_iommu_vcodec_a,
&msm_device_iommu_vcodec_b,
&msm_device_iommu_gfx3d,
+};
+
+static struct platform_device *msm_iommu_gfx2d_devs[] = {
&msm_device_iommu_gfx2d0,
&msm_device_iommu_gfx2d1,
};
-static struct msm_iommu_dev *msm_iommu_data[] = {
+static struct platform_device *msm_iommu_8064_devs[] = {
+ &msm_device_iommu_gfx3d1,
+ &msm_device_iommu_vcap,
+};
+
+static struct msm_iommu_dev *msm_iommu_common_data[] = {
&jpegd_iommu,
&vpe_iommu,
&mdp0_iommu,
@@ -774,11 +914,19 @@
&vcodec_a_iommu,
&vcodec_b_iommu,
&gfx3d_iommu,
+};
+
+static struct msm_iommu_dev *msm_iommu_gfx2d_data[] = {
&gfx2d0_iommu,
&gfx2d1_iommu,
};
-static struct platform_device *msm_iommu_ctx_devs[] = {
+static struct msm_iommu_dev *msm_iommu_8064_data[] = {
+ &gfx3d1_iommu,
+ &vcap_iommu,
+};
+
+static struct platform_device *msm_iommu_common_ctx_devs[] = {
&msm_device_jpegd_src_ctx,
&msm_device_jpegd_dst_ctx,
&msm_device_vpe_src_ctx,
@@ -798,11 +946,21 @@
&msm_device_vcodec_b_mm2_ctx,
&msm_device_gfx3d_user_ctx,
&msm_device_gfx3d_priv_ctx,
+};
+
+static struct platform_device *msm_iommu_gfx2d_ctx_devs[] = {
&msm_device_gfx2d0_2d0_ctx,
&msm_device_gfx2d1_2d1_ctx,
};
-static struct msm_iommu_ctx_dev *msm_iommu_ctx_data[] = {
+static struct platform_device *msm_iommu_8064_ctx_devs[] = {
+ &msm_device_gfx3d1_user_ctx,
+ &msm_device_gfx3d1_priv_ctx,
+ &msm_device_vcap_vc_ctx,
+ &msm_device_vcap_vp_ctx,
+};
+
+static struct msm_iommu_ctx_dev *msm_iommu_common_ctx_data[] = {
&jpegd_src_ctx,
&jpegd_dst_ctx,
&vpe_src_ctx,
@@ -822,31 +980,35 @@
&vcodec_b_mm2_ctx,
&gfx3d_user_ctx,
&gfx3d_priv_ctx,
+};
+
+static struct msm_iommu_ctx_dev *msm_iommu_gfx2d_ctx_data[] = {
&gfx2d0_2d0_ctx,
&gfx2d1_2d1_ctx,
};
-static int __init msm8x60_iommu_init(void)
+static struct msm_iommu_ctx_dev *msm_iommu_8064_ctx_data[] = {
+ &gfx3d1_user_ctx,
+ &gfx3d1_priv_ctx,
+ &vcap_vc_ctx,
+ &vcap_vp_ctx,
+};
+
+static int iommu_init_devs(struct platform_device *devs[],
+ struct msm_iommu_dev *data[], int size)
{
int ret, i;
- ret = platform_device_register(&msm_root_iommu_dev);
- if (ret != 0) {
- pr_err("Failed to register root IOMMU device!\n");
- goto failure;
- }
-
- for (i = 0; i < ARRAY_SIZE(msm_iommu_devs); i++) {
- ret = platform_device_add_data(msm_iommu_devs[i],
- msm_iommu_data[i],
- sizeof(struct msm_iommu_dev));
+ for (i = 0; i < size; i++) {
+ ret = platform_device_add_data(devs[i],
+ data[i], sizeof(struct msm_iommu_dev));
if (ret != 0) {
pr_err("platform_device_add_data failed, "
"i = %d\n", i);
goto failure_unwind;
}
- ret = platform_device_register(msm_iommu_devs[i]);
+ ret = platform_device_register(devs[i]);
if (ret != 0) {
pr_err("platform_device_register iommu failed, "
@@ -854,53 +1016,139 @@
goto failure_unwind;
}
}
+ return 0;
- for (i = 0; i < ARRAY_SIZE(msm_iommu_ctx_devs); i++) {
- ret = platform_device_add_data(msm_iommu_ctx_devs[i],
- msm_iommu_ctx_data[i],
- sizeof(*msm_iommu_ctx_devs[i]));
+failure_unwind:
+ while (--i >= 0)
+ platform_device_unregister(devs[i]);
+
+ return ret;
+}
+
+
+static int iommu_init_ctx_devs(struct platform_device *ctx_devs[],
+ struct msm_iommu_ctx_dev *ctx_data[], int size)
+{
+ int ret, i;
+
+ for (i = 0; i < size; i++) {
+ ret = platform_device_add_data(ctx_devs[i],
+ ctx_data[i], sizeof(struct msm_iommu_ctx_dev));
if (ret != 0) {
pr_err("platform_device_add_data iommu failed, "
"i = %d\n", i);
- goto failure_unwind2;
+ goto failure_unwind;
}
- ret = platform_device_register(msm_iommu_ctx_devs[i]);
+ ret = platform_device_register(ctx_devs[i]);
if (ret != 0) {
pr_err("platform_device_register ctx failed, "
"i = %d\n", i);
- goto failure_unwind2;
+ goto failure_unwind;
}
}
return 0;
-failure_unwind2:
- while (--i >= 0)
- platform_device_unregister(msm_iommu_ctx_devs[i]);
failure_unwind:
while (--i >= 0)
- platform_device_unregister(msm_iommu_devs[i]);
+ platform_device_unregister(ctx_devs[i]);
+ return ret;
+}
+
+static int __init iommu_init(void)
+{
+ int ret;
+
+ ret = platform_device_register(&msm_root_iommu_dev);
+ if (ret != 0) {
+ pr_err("Failed to register root IOMMU device!\n");
+ goto failure;
+ }
+
+ /* Initialize common devs */
+ ret = iommu_init_devs(msm_iommu_common_devs,
+ msm_iommu_common_data,
+ ARRAY_SIZE(msm_iommu_common_devs));
+ if (ret != 0)
+ goto failure2;
+
+ /* Initialize soc-specific devs */
+ if (cpu_is_apq8064()) {
+ ret = iommu_init_devs(msm_iommu_8064_devs,
+ msm_iommu_8064_data,
+ ARRAY_SIZE(msm_iommu_8064_devs));
+ } else {
+ ret = iommu_init_devs(msm_iommu_gfx2d_devs,
+ msm_iommu_gfx2d_data,
+ ARRAY_SIZE(msm_iommu_gfx2d_devs));
+ }
+ if (ret != 0)
+ goto failure2;
+
+ /* Initialize common ctx_devs */
+ ret = iommu_init_ctx_devs(msm_iommu_common_ctx_devs,
+ msm_iommu_common_ctx_data,
+ ARRAY_SIZE(msm_iommu_common_ctx_devs));
+ if (ret != 0)
+ goto failure2;
+
+ /* Initialize soc-specific ctx_devs */
+ if (cpu_is_apq8064()) {
+ ret = iommu_init_ctx_devs(msm_iommu_8064_ctx_devs,
+ msm_iommu_8064_ctx_data,
+ ARRAY_SIZE(msm_iommu_8064_ctx_devs));
+ } else {
+ ret = iommu_init_ctx_devs(msm_iommu_gfx2d_ctx_devs,
+ msm_iommu_gfx2d_ctx_data,
+ ARRAY_SIZE(msm_iommu_gfx2d_ctx_devs));
+ }
+ if (ret != 0)
+ goto failure2;
+
+ return 0;
+
+failure2:
platform_device_unregister(&msm_root_iommu_dev);
failure:
return ret;
}
-static void __exit msm8x60_iommu_exit(void)
+static void __exit iommu_exit(void)
{
int i;
- for (i = 0; i < ARRAY_SIZE(msm_iommu_ctx_devs); i++)
- platform_device_unregister(msm_iommu_ctx_devs[i]);
+ /* Common ctx_devs */
+ for (i = 0; i < ARRAY_SIZE(msm_iommu_common_ctx_devs); i++)
+ platform_device_unregister(msm_iommu_common_ctx_devs[i]);
- for (i = 0; i < ARRAY_SIZE(msm_iommu_devs); ++i)
- platform_device_unregister(msm_iommu_devs[i]);
+ /* soc-specific ctx_devs. */
+ if (cpu_is_apq8064()) {
+ for (i = 0; i < ARRAY_SIZE(msm_iommu_8064_ctx_devs); i++)
+ platform_device_unregister(msm_iommu_8064_ctx_devs[i]);
+ } else {
+ for (i = 0; i < ARRAY_SIZE(msm_iommu_gfx2d_ctx_devs); i++)
+ platform_device_unregister(msm_iommu_gfx2d_ctx_devs[i]);
+ }
+
+ /* Common devs. */
+ for (i = 0; i < ARRAY_SIZE(msm_iommu_common_devs); ++i)
+ platform_device_unregister(msm_iommu_common_devs[i]);
+
+ /* soc-specific devs. */
+ if (cpu_is_apq8064()) {
+ for (i = 0; i < ARRAY_SIZE(msm_iommu_8064_devs); i++)
+ platform_device_unregister(msm_iommu_8064_devs[i]);
+ } else {
+ for (i = 0; i < ARRAY_SIZE(msm_iommu_gfx2d_devs); i++)
+ platform_device_unregister(msm_iommu_gfx2d_devs[i]);
+ }
platform_device_unregister(&msm_root_iommu_dev);
}
-subsys_initcall(msm8x60_iommu_init);
-module_exit(msm8x60_iommu_exit);
+subsys_initcall(iommu_init);
+module_exit(iommu_exit);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Stepan Moskovchenko <stepanm@codeaurora.org>");
diff --git a/arch/arm/mach-msm/devices-msm7x30.c b/arch/arm/mach-msm/devices-msm7x30.c
index 0da9de3..d7832a3 100644
--- a/arch/arm/mach-msm/devices-msm7x30.c
+++ b/arch/arm/mach-msm/devices-msm7x30.c
@@ -309,24 +309,25 @@
.resource = resources_qup,
};
-#ifdef CONFIG_I2C_SSBI
-#define MSM_SSBI6_PHYS 0xAD900000
-static struct resource msm_ssbi6_resources[] = {
+#ifdef CONFIG_MSM_SSBI
+#define MSM_SSBI_PMIC1_PHYS 0xAD900000
+static struct resource msm_ssbi_pmic1_resources[] = {
{
- .name = "ssbi_base",
- .start = MSM_SSBI6_PHYS,
- .end = MSM_SSBI6_PHYS + SZ_4K - 1,
- .flags = IORESOURCE_MEM,
+ .start = MSM_SSBI_PMIC1_PHYS,
+ .end = MSM_SSBI_PMIC1_PHYS + SZ_4K - 1,
+ .flags = IORESOURCE_MEM,
},
};
-struct platform_device msm_device_ssbi6 = {
- .name = "i2c_ssbi",
- .id = 6,
- .num_resources = ARRAY_SIZE(msm_ssbi6_resources),
- .resource = msm_ssbi6_resources,
+struct platform_device msm_device_ssbi_pmic1 = {
+ .name = "msm_ssbi",
+ .id = 0,
+ .resource = msm_ssbi_pmic1_resources,
+ .num_resources = ARRAY_SIZE(msm_ssbi_pmic1_resources),
};
+#endif
+#ifdef CONFIG_I2C_SSBI
#define MSM_SSBI7_PHYS 0xAC800000
static struct resource msm_ssbi7_resources[] = {
{
diff --git a/arch/arm/mach-msm/devices-msm8x60.c b/arch/arm/mach-msm/devices-msm8x60.c
index 2b15967..2582024 100644
--- a/arch/arm/mach-msm/devices-msm8x60.c
+++ b/arch/arm/mach-msm/devices-msm8x60.c
@@ -878,25 +878,25 @@
.resource = gsbi12_qup_i2c_resources,
};
-#ifdef CONFIG_I2C_SSBI
-/* 8058 PMIC SSBI on /dev/i2c-6 */
-#define MSM_SSBI1_PMIC1C_PHYS 0x00500000
-static struct resource msm_ssbi1_resources[] = {
+#ifdef CONFIG_MSM_SSBI
+#define MSM_SSBI_PMIC1_PHYS 0x00500000
+static struct resource resources_ssbi_pmic1_resource[] = {
{
- .name = "ssbi_base",
- .start = MSM_SSBI1_PMIC1C_PHYS,
- .end = MSM_SSBI1_PMIC1C_PHYS + SZ_4K - 1,
- .flags = IORESOURCE_MEM,
+ .start = MSM_SSBI_PMIC1_PHYS,
+ .end = MSM_SSBI_PMIC1_PHYS + SZ_4K - 1,
+ .flags = IORESOURCE_MEM,
},
};
-struct platform_device msm_device_ssbi1 = {
- .name = "i2c_ssbi",
- .id = MSM_SSBI1_I2C_BUS_ID,
- .num_resources = ARRAY_SIZE(msm_ssbi1_resources),
- .resource = msm_ssbi1_resources,
+struct platform_device msm_device_ssbi_pmic1 = {
+ .name = "msm_ssbi",
+ .id = 0,
+ .resource = resources_ssbi_pmic1_resource,
+ .num_resources = ARRAY_SIZE(resources_ssbi_pmic1_resource),
};
+#endif
+#ifdef CONFIG_I2C_SSBI
/* 8901 PMIC SSBI on /dev/i2c-7 */
#define MSM_SSBI2_PMIC2B_PHYS 0x00C00000
static struct resource msm_ssbi2_resources[] = {
diff --git a/arch/arm/mach-msm/devices.h b/arch/arm/mach-msm/devices.h
index d5cad07..4a82b33 100644
--- a/arch/arm/mach-msm/devices.h
+++ b/arch/arm/mach-msm/devices.h
@@ -112,6 +112,7 @@
extern struct platform_device msm_device_sps_apq8064;
extern struct platform_device msm_device_bam_dmux;
extern struct platform_device msm_device_smd;
+extern struct platform_device msm_device_smd_apq8064;
extern struct platform_device msm_device_dmov;
extern struct platform_device msm8960_device_dmov;
extern struct platform_device apq8064_device_dmov;
@@ -127,6 +128,7 @@
extern struct platform_device msm_device_tsif[2];
+extern struct platform_device msm_device_ssbi_pmic1;
extern struct platform_device msm_device_ssbi1;
extern struct platform_device msm_device_ssbi2;
extern struct platform_device msm_device_ssbi3;
diff --git a/arch/arm/mach-msm/include/mach/irqs-8064.h b/arch/arm/mach-msm/include/mach/irqs-8064.h
index 97657ea..8597111 100644
--- a/arch/arm/mach-msm/include/mach/irqs-8064.h
+++ b/arch/arm/mach-msm/include/mach/irqs-8064.h
@@ -280,7 +280,7 @@
#define CS3_BAM_XPU_IRQ (GIC_SPI_START + 234)
#define CE3_IRQ (GIC_SPI_START + 235)
#define SMMU_VCAP_CB_SC_SECURE_IRQ (GIC_SPI_START + 236)
-#define SMMU_VCAM_CP_SC_NON_SECURE_IRQ (GIC_SPI_START + 237)
+#define SMMU_VCAP_CB_SC_NON_SECURE_IRQ (GIC_SPI_START + 237)
#define PCIE20_INT_MSI (GIC_SPI_START + 238)
#define PCIE20_INTA (GIC_SPI_START + 239)
#define PCIE20_INTB (GIC_SPI_START + 240)
@@ -299,13 +299,14 @@
#define INT_ADM_AARM ADM_0_SCSS_0_IRQ
/* smd/smsm interrupts */
-#define INT_A9_M2A_0 MSS_TO_APPS_IRQ_0
-#define INT_A9_M2A_5 MSS_TO_APPS_IRQ_1
-#define INT_ADSP_A11 LPASS_SCSS_GP_HIGH_IRQ
-#define INT_ADSP_A11_SMSM LPASS_SCSS_GP_MEDIUM_IRQ
-#define INT_DSPS_A11 SPS_MTI_31
-#define INT_WCNSS_A11 RIVA_APSS_SPARE_IRQ
-#define INT_WCNSS_A11_SMSM RIVA_APPS_WLAN_SMSM_IRQ
+#define INT_A9_M2A_0 (GIC_SPI_START + 37) /*GSS_TO_APPS_IRQ_0*/
+#define INT_A9_M2A_5 (GIC_SPI_START + 38) /*GSS_TO_APPS_IRQ_1*/
+#define INT_ADSP_A11 LPASS_SCSS_GP_HIGH_IRQ
+#define INT_ADSP_A11_SMSM LPASS_SCSS_GP_MEDIUM_IRQ
+#define INT_DSPS_A11 SPS_MTI_31
+#define INT_DSPS_A11_SMSM SPS_MTI_30
+#define INT_WCNSS_A11 RIVA_APSS_SPARE_IRQ
+#define INT_WCNSS_A11_SMSM RIVA_APPS_WLAN_SMSM_IRQ
#endif
diff --git a/arch/arm/mach-msm/include/mach/irqs-8960.h b/arch/arm/mach-msm/include/mach/irqs-8960.h
index 6d121f9..dae0f47 100644
--- a/arch/arm/mach-msm/include/mach/irqs-8960.h
+++ b/arch/arm/mach-msm/include/mach/irqs-8960.h
@@ -273,14 +273,14 @@
#define INT_ADM_AARM ADM_0_SCSS_0_IRQ
/* smd/smsm interrupts */
-#define INT_A9_M2A_0 MSS_TO_APPS_IRQ_0
-#define INT_A9_M2A_5 MSS_TO_APPS_IRQ_1
-#define INT_ADSP_A11 LPASS_SCSS_GP_HIGH_IRQ
-#define INT_ADSP_A11_SMSM LPASS_SCSS_GP_MEDIUM_IRQ
-#define INT_DSPS_A11 SPS_MTI_31
-#define INT_DSPS_A11_SMSM SPS_MTI_30
-#define INT_WCNSS_A11 RIVA_APSS_SPARE_IRQ
-#define INT_WCNSS_A11_SMSM RIVA_APPS_WLAN_SMSM_IRQ
+#define INT_A9_M2A_0 (GIC_SPI_START + 37) /*MSS_TO_APPS_IRQ_0*/
+#define INT_A9_M2A_5 (GIC_SPI_START + 38) /*MSS_TO_APPS_IRQ_1*/
+#define INT_ADSP_A11 LPASS_SCSS_GP_HIGH_IRQ
+#define INT_ADSP_A11_SMSM LPASS_SCSS_GP_MEDIUM_IRQ
+#define INT_DSPS_A11 SPS_MTI_31
+#define INT_DSPS_A11_SMSM SPS_MTI_30
+#define INT_WCNSS_A11 RIVA_APSS_SPARE_IRQ
+#define INT_WCNSS_A11_SMSM RIVA_APPS_WLAN_SMSM_IRQ
#endif
diff --git a/arch/arm/mach-msm/include/mach/msm_bus_board.h b/arch/arm/mach-msm/include/mach/msm_bus_board.h
index add2836..644e1b1 100644
--- a/arch/arm/mach-msm/include/mach/msm_bus_board.h
+++ b/arch/arm/mach-msm/include/mach/msm_bus_board.h
@@ -35,6 +35,7 @@
const unsigned int nmasters;
const unsigned int nslaves;
const unsigned int ntieredslaves;
+ bool il_flag;
};
enum msm_bus_bw_tier_type {
@@ -59,6 +60,7 @@
*fabreg, int fabid);
int msm_bus_board_get_iid(int id);
void msm_bus_rpm_set_mt_mask(void);
+int msm_bus_board_rpm_get_il_ids(uint16_t *id);
/*
* These macros specify the convention followed for allocating
diff --git a/arch/arm/mach-msm/msm_bus/msm_bus_board_8660.c b/arch/arm/mach-msm/msm_bus/msm_bus_board_8660.c
index ddf56c8..13b59ed 100644
--- a/arch/arm/mach-msm/msm_bus/msm_bus_board_8660.c
+++ b/arch/arm/mach-msm/msm_bus/msm_bus_board_8660.c
@@ -906,3 +906,7 @@
SLAVE_ID_KEY]);
}
+int msm_bus_board_rpm_get_il_ids(uint16_t id[])
+{
+ return -ENXIO;
+}
diff --git a/arch/arm/mach-msm/msm_bus/msm_bus_board_8960.c b/arch/arm/mach-msm/msm_bus/msm_bus_board_8960.c
index 1819d95..8ab1899 100644
--- a/arch/arm/mach-msm/msm_bus/msm_bus_board_8960.c
+++ b/arch/arm/mach-msm/msm_bus/msm_bus_board_8960.c
@@ -939,3 +939,9 @@
SLAVE_ID_KEY]);
}
+int msm_bus_board_rpm_get_il_ids(uint16_t id[])
+{
+ id[0] = MSM_RPM_STATUS_ID_EBI1_CH0_RANGE;
+ id[1] = MSM_RPM_STATUS_ID_EBI1_CH1_RANGE;
+ return 0;
+}
diff --git a/arch/arm/mach-msm/msm_bus/msm_bus_core.h b/arch/arm/mach-msm/msm_bus/msm_bus_core.h
index cc1eb78..56a5b8da 100644
--- a/arch/arm/mach-msm/msm_bus/msm_bus_core.h
+++ b/arch/arm/mach-msm/msm_bus/msm_bus_core.h
@@ -170,6 +170,7 @@
long int add_bw);
void msm_bus_rpm_fill_cdata_buffer(int *curr, char *buf, const int max_size,
void *cdata, int nmasters, int nslaves, int ntslaves);
+bool msm_bus_rpm_is_mem_interleaved(void);
#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_MSM_BUS_SCALING)
void msm_bus_dbg_client_data(struct msm_bus_scale_pdata *pdata, int index,
diff --git a/arch/arm/mach-msm/msm_bus/msm_bus_fabric.c b/arch/arm/mach-msm/msm_bus/msm_bus_fabric.c
index d8323e3..fe6dbed 100644
--- a/arch/arm/mach-msm/msm_bus/msm_bus_fabric.c
+++ b/arch/arm/mach-msm/msm_bus/msm_bus_fabric.c
@@ -650,6 +650,7 @@
pdata = (struct msm_bus_fabric_registration *)pdev->dev.platform_data;
fabric->fabdev.name = pdata->name;
fabric->fabdev.algo = &msm_bus_algo;
+ pdata->il_flag = msm_bus_rpm_is_mem_interleaved();
fabric->ahb = pdata->ahb;
fabric->pdata = pdata;
msm_bus_board_assign_iids(fabric->pdata, fabric->fabdev.id);
diff --git a/arch/arm/mach-msm/msm_bus/msm_bus_rpm.c b/arch/arm/mach-msm/msm_bus/msm_bus_rpm.c
index ec0db42..332d3c1 100644
--- a/arch/arm/mach-msm/msm_bus/msm_bus_rpm.c
+++ b/arch/arm/mach-msm/msm_bus/msm_bus_rpm.c
@@ -22,6 +22,10 @@
#include "msm_bus_core.h"
#include "../rpm_resources.h"
+#define INTERLEAVED_BW(fab_pdata, bw, ports) \
+ ((fab_pdata->il_flag) ? ((bw) / (ports)) : (bw))
+#define INTERLEAVED_VAL(fab_pdata, n) \
+ ((fab_pdata->il_flag) ? (n) : 1)
void msm_bus_rpm_set_mt_mask()
{
@@ -35,6 +39,47 @@
#endif
}
+bool msm_bus_rpm_is_mem_interleaved(void)
+{
+ int status = 0;
+ struct msm_rpm_iv_pair il[2];
+ uint16_t id[2];
+
+ il[0].value = 0;
+ il[1].value = 0;
+ status = msm_bus_board_rpm_get_il_ids(id);
+ if (status) {
+ MSM_BUS_DBG("Dynamic check not supported, "
+ "default: Interleaved memory\n");
+ goto inter;
+ }
+
+ il[0].id = id[0];
+ il[1].id = id[1];
+ status = msm_rpm_get_status(il, ARRAY_SIZE(il));
+ if (status) {
+ MSM_BUS_ERR("Status read for interleaving returned: %d\n"
+ "Using interleaved memory by default\n",
+ status);
+ goto inter;
+ }
+
+ /*
+ * If the start address of EBI1-CH0 is the same as
+ * the start address of EBI1-CH1, the memory is interleaved.
+ * The start addresses are stored in the 16 MSBs of the status
+ * register
+ */
+ if ((il[0].value & 0xFFFF0000) != (il[1].value & 0xFFFF0000)) {
+ MSM_BUS_DBG("Non-interleaved memory\n");
+ return false;
+ }
+
+inter:
+ MSM_BUS_DBG("Interleaved memory\n");
+ return true;
+}
+
#ifndef CONFIG_MSM_BUS_RPM_MULTI_TIER_ENABLED
struct commit_data {
uint16_t *bwsum;
@@ -198,13 +243,14 @@
void *sel_cdata, int *master_tiers,
long int add_bw)
{
- int index, i, j;
+ int index, i, j, tiers, ports;
struct commit_data *sel_cd = (struct commit_data *)sel_cdata;
- add_bw /= info->node_info->num_mports;
- for (i = 0; i < hop->node_info->num_tiers; i++) {
- for (j = 0; j < info->node_info->num_mports; j++) {
-
+ add_bw = INTERLEAVED_BW(fab_pdata, add_bw, info->node_info->num_mports);
+ ports = INTERLEAVED_VAL(fab_pdata, info->node_info->num_mports);
+ tiers = INTERLEAVED_VAL(fab_pdata, hop->node_info->num_tiers);
+ for (i = 0; i < tiers; i++) {
+ for (j = 0; j < ports; j++) {
uint16_t hop_tier;
/*
* For interleaved gateway ports and slave ports,
@@ -246,8 +292,9 @@
&& hop->node_info->num_sports > 1)
tieredbw += add_bw;
else
- tieredbw += add_bw/
- hop->node_info->num_sports;
+ tieredbw += INTERLEAVED_BW(fab_pdata,
+ add_bw, hop->node_info->
+ num_sports);
/* If bw is 0, update tier to default */
if (!tieredbw)
@@ -265,7 +312,8 @@
}
/* Update bwsum for slaves on fabric */
- for (i = 0; i < hop->node_info->num_sports; i++) {
+ ports = INTERLEAVED_VAL(fab_pdata, hop->node_info->num_sports);
+ for (i = 0; i < ports; i++) {
sel_cd->bwsum[hop->node_info->slavep[i]]
= (uint16_t)msm_bus_create_bw_tier_pair_bytes(0,
(*hop->link_info.sel_bw/hop->node_info->num_sports));
@@ -627,13 +675,14 @@
void *sel_cdata, int *master_tiers,
long int add_bw)
{
- int index, i, j;
+ int index, i, j, tiers, ports;
struct commit_data *sel_cd = (struct commit_data *)sel_cdata;
- add_bw /= info->node_info->num_mports;
- for (i = 0; i < hop->node_info->num_tiers; i++) {
- for (j = 0; j < info->node_info->num_mports; j++) {
-
+ add_bw = INTERLEAVED_BW(fab_pdata, add_bw, info->node_info->num_mports);
+ ports = INTERLEAVED_VAL(fab_pdata, info->node_info->num_mports);
+ tiers = INTERLEAVED_VAL(fab_pdata, hop->node_info->num_tiers);
+ for (i = 0; i < tiers; i++) {
+ for (j = 0; j < ports; j++) {
uint16_t hop_tier;
/*
* For interleaved gateway ports and slave ports,
@@ -668,8 +717,9 @@
&& hop->node_info->num_sports > 1)
tieredbw += add_bw;
else
- tieredbw += add_bw/
- hop->node_info->num_sports;
+ tieredbw += INTERLEAVED_BW(fab_pdata,
+ add_bw, hop->node_info->
+ num_sports);
/* Update Arb for fab,get HW Mport from enum */
sel_cd->arb[tier][index] =
@@ -683,7 +733,9 @@
}
/* Update bwsum for slaves on fabric */
- for (i = 0; i < hop->node_info->num_sports; i++) {
+
+ ports = INTERLEAVED_VAL(fab_pdata, hop->node_info->num_sports);
+ for (i = 0; i < ports; i++) {
sel_cd->bwsum[hop->node_info->slavep[i]]
= msm_bus_pack_bwsum_bytes((*hop->link_info.
sel_bw/hop->node_info->num_sports));
diff --git a/arch/arm/mach-msm/peripheral-loader.c b/arch/arm/mach-msm/peripheral-loader.c
index c8f0798..dc3b26f 100644
--- a/arch/arm/mach-msm/peripheral-loader.c
+++ b/arch/arm/mach-msm/peripheral-loader.c
@@ -20,6 +20,8 @@
#include <linux/mutex.h>
#include <linux/memblock.h>
+#include <mach/socinfo.h>
+
#include <asm/uaccess.h>
#include <asm/setup.h>
@@ -232,6 +234,10 @@
struct pil_device *pil_d;
void *retval;
+ /* PIL is not yet supported on 8064. */
+ if (cpu_is_apq8064())
+ return NULL;
+
pil = retval = find_peripheral(name);
if (!pil)
return ERR_PTR(-ENODEV);
diff --git a/arch/arm/mach-msm/smd.c b/arch/arm/mach-msm/smd.c
index 7dec32a..94dd8b8 100644
--- a/arch/arm/mach-msm/smd.c
+++ b/arch/arm/mach-msm/smd.c
@@ -43,15 +43,17 @@
#if defined(CONFIG_ARCH_QSD8X50) || defined(CONFIG_ARCH_MSM8X60) \
|| defined(CONFIG_ARCH_MSM8960) || defined(CONFIG_ARCH_FSM9XXX) \
- || defined(CONFIG_ARCH_MSM9615)
+ || defined(CONFIG_ARCH_MSM9615) || defined(CONFIG_ARCH_APQ8064)
#define CONFIG_QDSP6 1
#endif
-#if defined(CONFIG_ARCH_MSM8X60) || defined(CONFIG_ARCH_MSM8960)
+#if defined(CONFIG_ARCH_MSM8X60) || defined(CONFIG_ARCH_MSM8960) \
+ || defined(CONFIG_ARCH_APQ8064)
#define CONFIG_DSPS 1
#endif
-#if defined(CONFIG_ARCH_MSM8960)
+#if defined(CONFIG_ARCH_MSM8960) \
+ || defined(CONFIG_ARCH_APQ8064)
#define CONFIG_WCNSS 1
#define CONFIG_DSPS_SMSM 1
#endif
@@ -200,6 +202,23 @@
#define MSM_TRIG_A2DSPS_SMSM_INT
#define MSM_TRIG_A2WCNSS_SMD_INT
#define MSM_TRIG_A2WCNSS_SMSM_INT
+#elif defined(CONFIG_ARCH_APQ8064)
+#define MSM_TRIG_A2M_SMD_INT \
+ (smd_write_intr(1 << 3, MSM_APCS_GCC_BASE + 0x8))
+#define MSM_TRIG_A2Q6_SMD_INT \
+ (smd_write_intr(1 << 15, MSM_APCS_GCC_BASE + 0x8))
+#define MSM_TRIG_A2M_SMSM_INT \
+ (smd_write_intr(1 << 4, MSM_APCS_GCC_BASE + 0x8))
+#define MSM_TRIG_A2Q6_SMSM_INT \
+ (smd_write_intr(1 << 14, MSM_APCS_GCC_BASE + 0x8))
+#define MSM_TRIG_A2DSPS_SMD_INT \
+ (smd_write_intr(1, MSM_SIC_NON_SECURE_BASE + 0x4080))
+#define MSM_TRIG_A2DSPS_SMSM_INT \
+ (smd_write_intr(1, MSM_SIC_NON_SECURE_BASE + 0x4094))
+#define MSM_TRIG_A2WCNSS_SMD_INT \
+ (smd_write_intr(1 << 25, MSM_APCS_GCC_BASE + 0x8))
+#define MSM_TRIG_A2WCNSS_SMSM_INT \
+ (smd_write_intr(1 << 23, MSM_APCS_GCC_BASE + 0x8))
#elif defined(CONFIG_ARCH_FSM9XXX)
#define MSM_TRIG_A2Q6_SMD_INT \
(smd_write_intr(1 << 10, MSM_GCC_BASE + 0x8))
diff --git a/drivers/bluetooth/hci_smd.c b/drivers/bluetooth/hci_smd.c
index 8f8ba03..31634ff 100644
--- a/drivers/bluetooth/hci_smd.c
+++ b/drivers/bluetooth/hci_smd.c
@@ -162,6 +162,11 @@
rc = hci_recv_frame(skb);
if (rc < 0) {
BT_ERR("Error in passing the packet to HCI Layer");
+ /*
+ * skb is getting freed in hci_recv_frame, making it
+ * to null to avoid multiple access
+ */
+ skb = NULL;
goto out_data;
}
@@ -230,6 +235,11 @@
rc = hci_recv_frame(skb);
if (rc < 0) {
BT_ERR("Error in passing the packet to HCI Layer");
+ /*
+ * skb is getting freed in hci_recv_frame, making it
+ * to null to avoid multiple access
+ */
+ skb = NULL;
goto out_event;
}
diff --git a/drivers/char/diag/diagchar_core.c b/drivers/char/diag/diagchar_core.c
index 6fa043c..eabdb4f 100644
--- a/drivers/char/diag/diagchar_core.c
+++ b/drivers/char/diag/diagchar_core.c
@@ -253,7 +253,18 @@
return -ENOMEM;
}
-void diag_fill_reg_table(int j, struct bindpkt_params *params,
+void diag_clear_reg(int proc_num)
+{
+ int i;
+
+ for (i = 0; i < diag_max_registration; i++) {
+ if (driver->table[i].client_id == proc_num) {
+ driver->table[i].process_id = 0;
+ }
+ }
+}
+
+void diag_add_reg(int j, struct bindpkt_params *params,
int *success, int *count_entries)
{
*success = 1;
@@ -284,7 +295,7 @@
mutex_lock(&driver->diagchar_mutex);
for (i = 0; i < diag_max_registration; i++) {
if (driver->table[i].process_id == 0) {
- diag_fill_reg_table(i, pkt_params->params,
+ diag_add_reg(i, pkt_params->params,
&success, &count_entries);
if (pkt_params->count > count_entries) {
pkt_params->params++;
@@ -315,7 +326,7 @@
driver->table = temp_buf;
}
for (j = i; j < diag_max_registration; j++) {
- diag_fill_reg_table(j, pkt_params->params,
+ diag_add_reg(j, pkt_params->params,
&success, &count_entries);
if (pkt_params->count > count_entries) {
pkt_params->params++;
diff --git a/drivers/char/diag/diagfwd.c b/drivers/char/diag/diagfwd.c
index e49d57c..226e5b5 100644
--- a/drivers/char/diag/diagfwd.c
+++ b/drivers/char/diag/diagfwd.c
@@ -1129,7 +1129,11 @@
static void diag_smd_notify(void *ctxt, unsigned event)
{
- queue_work(driver->diag_wq, &(driver->diag_read_smd_work));
+ if (event == SMD_EVENT_CLOSE) {
+ pr_info("diag: clean modem registration\n");
+ diag_clear_reg(MODEM_PROC);
+ } else
+ queue_work(driver->diag_wq, &(driver->diag_read_smd_work));
}
#if defined(CONFIG_MSM_N_WAY_SMD)
diff --git a/drivers/char/diag/diagfwd.h b/drivers/char/diag/diagfwd.h
index cc24cbc..0a271dd 100644
--- a/drivers/char/diag/diagfwd.h
+++ b/drivers/char/diag/diagfwd.h
@@ -27,6 +27,7 @@
int diag_device_write(void *, int, struct diag_request *);
int mask_request_validate(unsigned char mask_buf[]);
int chk_config_get_id(void);
+void diag_clear_reg(int);
/* State for diag forwarding */
#ifdef CONFIG_DIAG_OVER_USB
int diagfwd_connect(void);
diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index 8850516..8088e44 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -309,20 +309,21 @@
config CRYPTO_DEV_QCE
tristate "Qualcomm Crypto Engine (QCE) module"
- select CRYPTO_DEV_QCE40 if ARCH_MSM8960
+ select CRYPTO_DEV_QCE40 if ARCH_MSM8960 || ARCH_MSM9615
default n
help
- This driver supports Qualcomm Crypto Engine in MSM7x30 MSM8660
- MSM8x55 and MSM8960
+ This driver supports Qualcomm Crypto Engine in MSM7x30, MSM8660
+ MSM8x55, MSM8960 and MSM9615
To compile this driver as a module, choose M here: the
For MSM7x30 MSM8660 and MSM8x55 the module is called qce
- For MSM8960 the module is called qce40
+ For MSM8960 and MSM9615 the module is called qce40
config CRYPTO_DEV_QCEDEV
tristate "QCEDEV Interface to CE module"
default n
help
- This driver supports Qualcomm QCEDEV Crypto in MSM7x30 MSM8660, MSM8960.
+ This driver supports Qualcomm QCEDEV Crypto in MSM7x30, MSM8660,
+ MSM8960 and MSM9615.
This exposes the interface to the QCE hardware accelerator via IOCTLs
To compile this driver as a module, choose M here: the
module will be called qcedev.
diff --git a/drivers/crypto/msm/qce40.c b/drivers/crypto/msm/qce40.c
index 90a7889..4ef2e08 100644
--- a/drivers/crypto/msm/qce40.c
+++ b/drivers/crypto/msm/qce40.c
@@ -29,6 +29,7 @@
#include <crypto/sha.h>
#include <mach/dma.h>
#include <mach/clk.h>
+#include <mach/socinfo.h>
#include "qce.h"
#include "qce40.h"
@@ -149,6 +150,12 @@
pce_dev->ce_dm.ce_block_size = 16;
}
}
+ /*
+ * This is a temporary change - until Data Mover changes its
+ * configuration from 16 byte crci to 64 byte crci.
+ */
+ if (cpu_is_msm9615())
+ pce_dev->ce_dm.ce_block_size = 16;
dev_info(pce_dev->pdev,
"IO base 0x%x\n, ce_in channel %d , "
@@ -161,6 +168,23 @@
return 0;
};
+#ifdef CONFIG_ARCH_MSM9615
+static void config_ce_engine(struct qce_device *pce_dev)
+{
+ unsigned int val = 0;
+
+ val = (1 << CRYPTO_MASK_DOUT_INTR) | (1 << CRYPTO_MASK_DIN_INTR) |
+ (1 << CRYPTO_MASK_OP_DONE_INTR) |
+ (1 << CRYPTO_MASK_ERR_INTR);
+
+ writel_relaxed(val, pce_dev->iobase + CRYPTO_CONFIG_REG);
+}
+#else
+static void config_ce_engine(struct qce_device *pce_dev)
+{
+
+}
+#endif
static void _check_probe_done_call_back(struct msm_dmov_cmd *cmd_ptr,
unsigned int result, struct msm_dmov_errdata *err)
@@ -185,6 +209,22 @@
clk_reset(pce_dev->ce_core_clk, CLK_RESET_ASSERT);
clk_reset(pce_dev->ce_core_clk, CLK_RESET_DEASSERT);
+ /*
+ * Ensure previous instruction (any writes to CLK registers)
+ * to toggle the CLK reset lines was completed before configuring
+ * ce engine. The ce engine configuration settings should not be lost
+ * becasue of clk reset.
+ */
+ mb();
+
+ /* Configure the CE Engine */
+ config_ce_engine(pce_dev);
+
+ /*
+ * Ensure ce configuration is completed.
+ */
+ mb();
+
pce_dev->ce_dm.chan_ce_in_cmd->complete_func =
_check_probe_done_call_back;
pce_dev->ce_dm.chan_ce_in_cmd->cmdptr =
@@ -2529,4 +2569,4 @@
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Mona Hossain <mhossain@codeaurora.org>");
MODULE_DESCRIPTION("Crypto Engine driver");
-MODULE_VERSION("2.11");
+MODULE_VERSION("2.12");
diff --git a/drivers/crypto/msm/qcedev.c b/drivers/crypto/msm/qcedev.c
index dcc98a0..9d315d2 100644
--- a/drivers/crypto/msm/qcedev.c
+++ b/drivers/crypto/msm/qcedev.c
@@ -1229,6 +1229,7 @@
return qcedev_hmac_final(areq, handle);
}
+#ifdef CONFIG_ANDROID_PMEM
static int qcedev_pmem_ablk_cipher_max_xfer(struct qcedev_async_req *areq,
struct qcedev_handle *handle)
{
@@ -1438,6 +1439,18 @@
return err;
}
+#else
+static int qcedev_pmem_ablk_cipher_max_xfer(struct qcedev_async_req *areq,
+ struct qcedev_handle *handle)
+{
+ return -EPERM;
+}
+static int qcedev_pmem_ablk_cipher(struct qcedev_async_req *qcedev_areq,
+ struct qcedev_handle *handle)
+{
+ return -EPERM;
+}
+#endif/*CONFIG_ANDROID_PMEM*/
static int qcedev_vbuf_ablk_cipher_max_xfer(struct qcedev_async_req *areq,
int *di, struct qcedev_handle *handle,
@@ -1837,7 +1850,7 @@
podev))
return -EINVAL;
- if (qcedev_areq.cipher_op_req.use_pmem == QCEDEV_USE_PMEM)
+ if ((qcedev_areq.cipher_op_req.use_pmem) && (QCEDEV_USE_PMEM))
err = qcedev_pmem_ablk_cipher(&qcedev_areq, handle);
else
err = qcedev_vbuf_ablk_cipher(&qcedev_areq, handle);
@@ -2156,7 +2169,7 @@
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Mona Hossain <mhossain@codeaurora.org>");
MODULE_DESCRIPTION("Qualcomm DEV Crypto driver");
-MODULE_VERSION("1.23");
+MODULE_VERSION("1.24");
module_init(qcedev_init);
module_exit(qcedev_exit);
diff --git a/drivers/input/touchscreen/atmel_maxtouch.c b/drivers/input/touchscreen/atmel_maxtouch.c
index c454f72..d2bd4df 100644
--- a/drivers/input/touchscreen/atmel_maxtouch.c
+++ b/drivers/input/touchscreen/atmel_maxtouch.c
@@ -1373,12 +1373,11 @@
kfree(message);
fail_worker:
- enable_irq(mxt->irq);
/* Make sure we just didn't miss a interrupt. */
if (mxt->read_chg() == 0){
- disable_irq(mxt->irq);
schedule_delayed_work(&mxt->dwork, 0);
- }
+ } else
+ enable_irq(mxt->irq);
}
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index fc9d579..e5bd99b 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -1217,7 +1217,7 @@
}
}
- msleep(100);
+ msleep(130);
return 0;
diff --git a/drivers/media/radio/radio-iris.c b/drivers/media/radio/radio-iris.c
index 8dbdc01..2a192db 100644
--- a/drivers/media/radio/radio-iris.c
+++ b/drivers/media/radio/radio-iris.c
@@ -733,7 +733,7 @@
__u8 sig_threshold = param;
- opcode = hci_opcode_pack(HCI_OGF_FM_COMMON_CTRL_CMD_REQ,
+ opcode = hci_opcode_pack(HCI_OGF_FM_RECV_CTRL_CMD_REQ,
HCI_OCF_FM_SET_SIGNAL_THRESHOLD);
return radio_hci_send_cmd(hdev, opcode, sizeof(sig_threshold),
&sig_threshold);
@@ -744,7 +744,7 @@
{
__u16 opcode = 0;
- opcode = hci_opcode_pack(HCI_OGF_FM_COMMON_CTRL_CMD_REQ,
+ opcode = hci_opcode_pack(HCI_OGF_FM_RECV_CTRL_CMD_REQ,
HCI_OCF_FM_GET_SIGNAL_THRESHOLD);
return radio_hci_send_cmd(hdev, opcode, 0, NULL);
}
@@ -754,7 +754,7 @@
{
__u16 opcode = 0;
- opcode = hci_opcode_pack(HCI_OGF_FM_COMMON_CTRL_CMD_REQ,
+ opcode = hci_opcode_pack(HCI_OGF_FM_RECV_CTRL_CMD_REQ,
HCI_OCF_FM_GET_PROGRAM_SERVICE_REQ);
return radio_hci_send_cmd(hdev, opcode, 0, NULL);
}
@@ -764,7 +764,7 @@
{
__u16 opcode = 0;
- opcode = hci_opcode_pack(HCI_OGF_FM_COMMON_CTRL_CMD_REQ,
+ opcode = hci_opcode_pack(HCI_OGF_FM_RECV_CTRL_CMD_REQ,
HCI_OCF_FM_GET_RADIO_TEXT_REQ);
return radio_hci_send_cmd(hdev, opcode, 0, NULL);
}
@@ -774,7 +774,7 @@
{
__u16 opcode = 0;
- opcode = hci_opcode_pack(HCI_OGF_FM_COMMON_CTRL_CMD_REQ,
+ opcode = hci_opcode_pack(HCI_OGF_FM_RECV_CTRL_CMD_REQ,
HCI_OCF_FM_GET_AF_LIST_REQ);
return radio_hci_send_cmd(hdev, opcode, 0, NULL);
}
@@ -987,7 +987,7 @@
{
__u16 opcode = 0;
- opcode = hci_opcode_pack(HCI_OGF_FM_COMMON_CTRL_CMD_REQ,
+ opcode = hci_opcode_pack(HCI_OGF_FM_DIAGNOSTIC_CMD_REQ,
HCI_OCF_FM_STATION_DBG_PARAM);
return radio_hci_send_cmd(hdev, opcode, 0, NULL);
}
diff --git a/drivers/media/radio/radio-tavarua.c b/drivers/media/radio/radio-tavarua.c
index 10c5fbf..36bad1b 100644
--- a/drivers/media/radio/radio-tavarua.c
+++ b/drivers/media/radio/radio-tavarua.c
@@ -72,7 +72,7 @@
struct tavarua_device {
struct video_device *videodev;
/* driver management */
- int users;
+ atomic_t users;
/* top level driver data */
struct marimba *marimba;
struct device *dev;
@@ -1690,14 +1690,12 @@
char buffer[] = {0x00, 0x48, 0x8A, 0x8E, 0x97, 0xB7};
int bahama_present = -ENODEV;
- mutex_lock(&radio->lock);
- if (radio->users) {
- mutex_unlock(&radio->lock);
+ if (!atomic_dec_and_test(&radio->users)) {
+ pr_err("%s: Device already in use."
+ "Try again later", __func__);
+ atomic_inc(&radio->users);
return -EBUSY;
- } else {
- radio->users++;
}
- mutex_unlock(&radio->lock);
/* initial gpio pin config & Power up */
retval = radio->pdata->fm_setup(radio->pdata);
@@ -1877,7 +1875,7 @@
radio->pdata->fm_shutdown(radio->pdata);
open_err_setup:
radio->handle_irq = 1;
- radio->users = 0;
+ atomic_inc(&radio->users);
return retval;
}
@@ -1917,8 +1915,11 @@
{ 0x00, 0x80 }
};
- if (!radio)
+ if (!radio) {
+ pr_err("%s: Radio device not available...", __func__);
return -ENODEV;
+ }
+
FMDBG("In %s", __func__);
/* disable radio ctrl */
@@ -2021,7 +2022,7 @@
if (radio->pdata->config_i2s_gpio != NULL)
radio->pdata->config_i2s_gpio(FM_I2S_OFF);
radio->handle_irq = 1;
- radio->users = 0;
+ atomic_inc(&radio->users);
radio->marimba->mod_id = SLAVE_ID_BAHAMA;
return 0;
}
@@ -3535,9 +3536,7 @@
int users = 0;
printk(KERN_INFO DRIVER_NAME "%s: radio suspend\n\n", __func__);
if (radio) {
- mutex_lock(&radio->lock);
- users = radio->users;
- mutex_unlock(&radio->lock);
+ users = atomic_read(&radio->users);
if (users) {
retval = tavarua_disable_interrupts(radio);
if (retval < 0) {
@@ -3568,9 +3567,7 @@
int users = 0;
printk(KERN_INFO DRIVER_NAME "%s: radio resume\n\n", __func__);
if (radio) {
- mutex_lock(&radio->lock);
- users = radio->users;
- mutex_unlock(&radio->lock);
+ users = atomic_read(&radio->users);
if (users) {
retval = tavarua_setup_interrupts(radio,
@@ -3719,8 +3716,8 @@
goto err_bufs;
}
}
- /* init xfr status */
- radio->users = 0;
+ /* initializing the device count */
+ atomic_set(&radio->users, 1);
radio->xfr_in_progress = 0;
radio->xfr_bytes_left = 0;
for (i = 0; i < TAVARUA_XFR_MAX; i++)
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index d291baa..a4feb838 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -155,8 +155,7 @@
config PMIC8058
tristate "PMIC8058 Power Management chip"
- depends on I2C_SSBI && (ARCH_MSM7X30 || ARCH_MSM8X60 || ARCH_FSM9XXX)
- default y if I2C_SSBI && (ARCH_MSM7X30 || ARCH_MSM8X60 || ARCH_FSM9XXX)
+ depends on MSM_SSBI
select MFD_CORE
select MSM_SHOW_RESUME_IRQ
help
diff --git a/drivers/mfd/pm8821-core.c b/drivers/mfd/pm8821-core.c
index 2da7055..ed29785 100644
--- a/drivers/mfd/pm8821-core.c
+++ b/drivers/mfd/pm8821-core.c
@@ -137,7 +137,7 @@
.name = "pm8xxx-debug",
.id = 1,
.platform_data = "pm8821-dbg",
- .data_size = sizeof("pm8821-dbg"),
+ .pdata_size = sizeof("pm8821-dbg"),
};
@@ -165,7 +165,7 @@
pdata->mpp_pdata->core_data.nmpps = PM8821_NR_MPPS;
pdata->mpp_pdata->core_data.base_addr = REG_MPP_BASE;
mpp_cell.platform_data = pdata->mpp_pdata;
- mpp_cell.data_size = sizeof(struct pm8xxx_mpp_platform_data);
+ mpp_cell.pdata_size = sizeof(struct pm8xxx_mpp_platform_data);
ret = mfd_add_devices(pmic->dev, 0, &mpp_cell, 1, NULL,
irq_base);
if (ret) {
diff --git a/drivers/mfd/pmic8058.c b/drivers/mfd/pmic8058.c
index 7f433db..85c8a9d 100644
--- a/drivers/mfd/pmic8058.c
+++ b/drivers/mfd/pmic8058.c
@@ -20,6 +20,7 @@
#include <linux/slab.h>
#include <linux/ratelimit.h>
#include <linux/kthread.h>
+#include <linux/msm_ssbi.h>
#include <linux/mfd/core.h>
#include <linux/mfd/pmic8058.h>
#include <linux/platform_device.h>
@@ -28,6 +29,7 @@
#include <linux/debugfs.h>
#include <linux/irq.h>
#include <linux/syscore_ops.h>
+#include <linux/gpio.h>
/* PMIC8058 Revision */
#define SSBI_REG_REV 0x002 /* PMIC4 revision */
@@ -143,8 +145,7 @@
struct pm8058_chip {
struct pm8058_platform_data pdata;
-
- struct i2c_client *dev;
+ struct device *dev;
u8 irqs_allowed[MAX_PM_BLOCKS];
u8 blocks_allowed[MAX_PM_MASTERS];
@@ -185,33 +186,15 @@
}
static inline int
-ssbi_write(struct i2c_client *client, u16 addr, const u8 *buf, size_t len)
+ssbi_read(struct device *dev, u16 addr, u8 *buf, size_t len)
{
- int rc;
- struct i2c_msg msg = {
- .addr = addr,
- .flags = 0x0,
- .buf = (u8 *)buf,
- .len = len,
- };
-
- rc = i2c_transfer(client->adapter, &msg, 1);
- return (rc == 1) ? 0 : rc;
+ return msm_ssbi_read(dev->parent, addr, buf, len);
}
static inline int
-ssbi_read(struct i2c_client *client, u16 addr, u8 *buf, size_t len)
+ssbi_write(struct device *dev, u16 addr, u8 *buf, size_t len)
{
- int rc;
- struct i2c_msg msg = {
- .addr = addr,
- .flags = I2C_M_RD,
- .buf = buf,
- .len = len,
- };
-
- rc = i2c_transfer(client->adapter, &msg, 1);
- return (rc == 1) ? 0 : rc;
+ return msm_ssbi_write(dev->parent, addr, buf, len);
}
static int pm8058_masked_write(u16 addr, u8 val, u8 mask)
@@ -1318,7 +1301,7 @@
}
if (!chip->count_wakeable)
- disable_irq(chip->dev->irq);
+ disable_irq(chip->pdata.irq);
return 0;
}
@@ -1368,7 +1351,7 @@
}
if (!chip->count_wakeable)
- enable_irq(chip->dev->irq);
+ enable_irq(chip->pdata.irq);
}
static struct syscore_ops pm8058_pm = {
@@ -1376,14 +1359,13 @@
.resume = pm8058_resume,
};
-static int pm8058_probe(struct i2c_client *client,
- const struct i2c_device_id *id)
+static int __devinit pm8058_probe(struct platform_device *pdev)
{
int i, rc;
- struct pm8058_platform_data *pdata = client->dev.platform_data;
+ struct pm8058_platform_data *pdata = pdev->dev.platform_data;
struct pm8058_chip *chip;
- if (pdata == NULL || !client->irq) {
+ if (pdata == NULL || !gpio_is_valid(pdata->irq)) {
pr_err("%s: No platform_data or IRQ.\n", __func__);
return -ENODEV;
}
@@ -1393,18 +1375,13 @@
return -ENODEV;
}
- if (i2c_check_functionality(client->adapter, I2C_FUNC_I2C) == 0) {
- pr_err("%s: i2c_check_functionality failed.\n", __func__);
- return -ENODEV;
- }
-
chip = kzalloc(sizeof *chip, GFP_KERNEL);
if (chip == NULL) {
pr_err("%s: kzalloc() failed.\n", __func__);
return -ENOMEM;
}
- chip->dev = client;
+ chip->dev = &pdev->dev;
/* Read PMIC chip revision */
rc = ssbi_read(chip->dev, SSBI_REG_REV, &chip->revision, 1);
@@ -1417,14 +1394,14 @@
sizeof(chip->pdata));
mutex_init(&chip->pm_lock);
- irq_set_handler_data(chip->dev->irq, (void *)chip);
- irq_set_irq_wake(chip->dev->irq, 1);
+ irq_set_handler_data(pdata->irq, (void *)chip);
+ irq_set_irq_wake(pdata->irq, 1);
chip->pm_max_irq = 0;
chip->pm_max_blocks = 0;
chip->pm_max_masters = 0;
- i2c_set_clientdata(client, chip);
+ platform_set_drvdata(pdev, chip);
pmic_chip = chip;
@@ -1437,12 +1414,12 @@
irq_set_nested_thread(i, 1);
}
- rc = mfd_add_devices(&chip->dev->dev, 0, pdata->sub_devices,
+ rc = mfd_add_devices(chip->dev, 0, pdata->sub_devices,
pdata->num_subdevs, NULL, 0);
/* Add charger sub device with the chip parameter as driver data */
if (pdata->charger_sub_device) {
- rc = mfd_add_devices(&chip->dev->dev, 0,
+ rc = mfd_add_devices(chip->dev, 0,
pdata->charger_sub_device,
1, NULL, 0);
}
@@ -1457,12 +1434,12 @@
}
}
- rc = request_threaded_irq(chip->dev->irq, NULL, pm8058_isr_thread,
+ rc = request_threaded_irq(pdata->irq, NULL, pm8058_isr_thread,
IRQF_ONESHOT | IRQF_DISABLED | pdata->irq_trigger_flags,
"pm8058-irq", chip);
if (rc < 0)
pr_err("%s: could not request irq %d: %d\n", __func__,
- chip->dev->irq, rc);
+ pdata->irq, rc);
rc = pmic8058_dbg_probe(chip);
if (rc < 0)
@@ -1478,15 +1455,15 @@
return 0;
}
-static int __devexit pm8058_remove(struct i2c_client *client)
+static int __devexit pm8058_remove(struct platform_device *pdev)
{
struct pm8058_chip *chip;
- chip = i2c_get_clientdata(client);
+ chip = platform_get_drvdata(pdev);
if (chip) {
if (chip->pm_max_irq) {
- irq_set_irq_wake(chip->dev->irq, 0);
- free_irq(chip->dev->irq, chip);
+ irq_set_irq_wake(chip->pdata.irq, 0);
+ free_irq(chip->pdata.irq, chip);
}
mutex_destroy(&chip->pm_lock);
chip->dev = NULL;
@@ -1499,33 +1476,25 @@
return 0;
}
-static const struct i2c_device_id pm8058_ids[] = {
- { "pm8058-core", 0 },
- { },
-};
-MODULE_DEVICE_TABLE(i2c, pm8058_ids);
-
-static struct i2c_driver pm8058_driver = {
- .driver.name = "pm8058-core",
- .id_table = pm8058_ids,
+static struct platform_driver pm8058_driver = {
.probe = pm8058_probe,
.remove = __devexit_p(pm8058_remove),
+ .driver = {
+ .name = "pm8058-core",
+ .owner = THIS_MODULE,
+ },
};
static int __init pm8058_init(void)
{
- int rc = i2c_add_driver(&pm8058_driver);
- pr_notice("%s: i2c_add_driver: rc = %d\n", __func__, rc);
-
- return rc;
+ return platform_driver_register(&pm8058_driver);
}
+arch_initcall(pm8058_init);
static void __exit pm8058_exit(void)
{
- i2c_del_driver(&pm8058_driver);
+ platform_driver_unregister(&pm8058_driver);
}
-
-arch_initcall(pm8058_init);
module_exit(pm8058_exit);
MODULE_LICENSE("GPL v2");
diff --git a/drivers/platform/msm/ssbi.c b/drivers/platform/msm/ssbi.c
index b4fd02e..8a6dbf7 100644
--- a/drivers/platform/msm/ssbi.c
+++ b/drivers/platform/msm/ssbi.c
@@ -62,6 +62,15 @@
#define SSBI_TIMEOUT_US 100
+/* SSBI_FSM Read and Write commands for the FSM9xxx SSBI implementation */
+#define SSBI_FSM_CMD_REG_ADDR_SHFT (0x08)
+
+#define SSBI_FSM_CMD_READ(AD) \
+ (SSBI_CMD_RDWRN | (((AD) & 0xFFFF) << SSBI_FSM_CMD_REG_ADDR_SHFT))
+
+#define SSBI_FSM_CMD_WRITE(AD, DT) \
+ ((((AD) & 0xFFFF) << SSBI_FSM_CMD_REG_ADDR_SHFT) | ((DT) & 0xFF))
+
struct msm_ssbi {
struct device *dev;
struct device *slave;
@@ -113,6 +122,11 @@
ssbi_writel(ssbi, mode2, SSBI2_MODE2);
}
+ if (ssbi->controller_type == FSM_SBI_CTRL_SSBI)
+ cmd = SSBI_FSM_CMD_READ(addr);
+ else
+ cmd = SSBI_CMD_RDWRN | ((addr & 0xff) << 16);
+
while (len) {
ret = ssbi_wait_mask(ssbi, SSBI_STATUS_READY, 0);
if (ret)
@@ -146,7 +160,13 @@
if (ret)
goto err;
- ssbi_writel(ssbi, ((addr & 0xff) << 16) | *buf, SSBI2_CMD);
+ if (ssbi->controller_type == FSM_SBI_CTRL_SSBI)
+ ssbi_writel(ssbi, SSBI_FSM_CMD_WRITE(addr, *buf),
+ SSBI2_CMD);
+ else
+ ssbi_writel(ssbi, ((addr & 0xff) << 16) | *buf,
+ SSBI2_CMD);
+
ret = ssbi_wait_mask(ssbi, 0, SSBI_STATUS_MCHN_BUSY);
if (ret)
goto err;
diff --git a/drivers/regulator/pm8058-xo.c b/drivers/regulator/pm8058-xo.c
index ac65395..581e228 100644
--- a/drivers/regulator/pm8058-xo.c
+++ b/drivers/regulator/pm8058-xo.c
@@ -154,7 +154,7 @@
return -EINVAL;
if (pdev->id >= 0 && pdev->id < PM8058_XO_ID_MAX) {
- chip = platform_get_drvdata(pdev);
+ chip = dev_get_drvdata(pdev->dev.parent);
rdesc = &pm8058_xo_buffer_desc[pdev->id];
xo = &pm8058_xo_buffer[pdev->id];
xo->pdata = pdev->dev.platform_data;
@@ -163,6 +163,7 @@
if (rc)
goto bail;
+ platform_set_drvdata(pdev, chip);
xo->rdev = regulator_register(rdesc, &pdev->dev,
&xo->pdata->init_data, xo);
if (IS_ERR(xo->rdev)) {
diff --git a/drivers/regulator/pmic8058-regulator.c b/drivers/regulator/pmic8058-regulator.c
index 98ba163..c11f32b 100644
--- a/drivers/regulator/pmic8058-regulator.c
+++ b/drivers/regulator/pmic8058-regulator.c
@@ -1690,7 +1690,7 @@
return -EINVAL;
if (pdev->id >= 0 && pdev->id < PM8058_VREG_MAX) {
- chip = platform_get_drvdata(pdev);
+ chip = dev_get_drvdata(pdev->dev.parent);
rdesc = &pm8058_vreg_descrip[pdev->id];
vreg = &pm8058_vreg[pdev->id];
vreg->pdata = pdev->dev.platform_data;
@@ -1705,6 +1705,7 @@
vreg->pdata->init_data.constraints.valid_modes_mask
&= ~(REGULATOR_MODE_NORMAL | REGULATOR_MODE_IDLE);
+ platform_set_drvdata(pdev, chip);
vreg->rdev = regulator_register(rdesc, &pdev->dev,
&vreg->pdata->init_data, vreg);
if (IS_ERR(vreg->rdev)) {
diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c
index 0bdb89e..e53374e 100644
--- a/drivers/rtc/rtc-pm8xxx.c
+++ b/drivers/rtc/rtc-pm8xxx.c
@@ -30,6 +30,8 @@
/* RTC_CTRL register bit fields */
#define PM8xxx_RTC_ENABLE BIT(7)
#define PM8xxx_RTC_ALARM_ENABLE BIT(1)
+#define PM8xxx_RTC_ABORT_ENABLE BIT(0)
+
#define PM8xxx_RTC_ALARM_CLEAR BIT(0)
#define NUM_8_BIT_RTC_REGS 0x4
@@ -461,6 +463,14 @@
}
}
+ /* Enable abort enable feature */
+ ctrl_reg |= PM8xxx_RTC_ABORT_ENABLE;
+ rc = pm8xxx_write_wrapper(rtc_dd, &ctrl_reg, rtc_dd->rtc_base, 1);
+ if (rc < 0) {
+ dev_err(&pdev->dev, "PM8xxx write failed!\n");
+ goto fail_rtc_enable;
+ }
+
rtc_dd->ctrl_reg = ctrl_reg;
if (rtc_write_enable == true)
pm8xxx_rtc_ops.set_time = pm8xxx_rtc_set_time;
@@ -539,9 +549,48 @@
return 0;
}
+static void pm8xxx_rtc_shutdown(struct platform_device *pdev)
+{
+ u8 value[4] = {0, 0, 0, 0};
+ u8 reg;
+ int rc;
+ unsigned long irq_flags;
+ bool rtc_alarm_powerup = false;
+ struct pm8xxx_rtc *rtc_dd = platform_get_drvdata(pdev);
+ struct pm8xxx_rtc_platform_data *pdata = pdev->dev.platform_data;
+
+ if (pdata != NULL)
+ rtc_alarm_powerup = pdata->rtc_alarm_powerup;
+
+ if (!rtc_alarm_powerup) {
+
+ spin_lock_irqsave(&rtc_dd->ctrl_reg_lock, irq_flags);
+ dev_dbg(&pdev->dev, "Disabling alarm interrupts\n");
+
+ /* Disable RTC alarms */
+ reg = rtc_dd->ctrl_reg;
+ reg &= ~PM8xxx_RTC_ALARM_ENABLE;
+ rc = pm8xxx_write_wrapper(rtc_dd, ®, rtc_dd->rtc_base, 1);
+ if (rc < 0) {
+ dev_err(rtc_dd->rtc_dev, "PM8xxx write failed\n");
+ goto fail_alarm_disable;
+ }
+
+ /* Clear Alarm register */
+ rc = pm8xxx_write_wrapper(rtc_dd, value,
+ rtc_dd->alarm_rw_base, NUM_8_BIT_RTC_REGS);
+ if (rc < 0)
+ dev_err(rtc_dd->rtc_dev, "PM8xxx write failed\n");
+
+fail_alarm_disable:
+ spin_unlock_irqrestore(&rtc_dd->ctrl_reg_lock, irq_flags);
+ }
+}
+
static struct platform_driver pm8xxx_rtc_driver = {
.probe = pm8xxx_rtc_probe,
.remove = __devexit_p(pm8xxx_rtc_remove),
+ .shutdown = pm8xxx_rtc_shutdown,
.driver = {
.name = PM8XXX_RTC_DEV_NAME,
.owner = THIS_MODULE,
diff --git a/drivers/usb/gadget/android.c b/drivers/usb/gadget/android.c
index 20b73a1..5e38238 100644
--- a/drivers/usb/gadget/android.c
+++ b/drivers/usb/gadget/android.c
@@ -1105,8 +1105,10 @@
cdev->desc.bDeviceClass = device_desc.bDeviceClass;
cdev->desc.bDeviceSubClass = device_desc.bDeviceSubClass;
cdev->desc.bDeviceProtocol = device_desc.bDeviceProtocol;
- usb_add_config(cdev, &android_config_driver,
- android_bind_config);
+ if (usb_add_config(cdev, &android_config_driver,
+ android_bind_config))
+ return size;
+
usb_gadget_connect(cdev->gadget);
dev->enabled = true;
} else if (!enabled && dev->enabled) {
diff --git a/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_interrupt_handler.c b/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_interrupt_handler.c
index 87ed889..c2ab8ad 100644
--- a/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_interrupt_handler.c
+++ b/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_interrupt_handler.c
@@ -1133,11 +1133,25 @@
vidc_sm_get_metadata_status(&ddl->shared_mem
[ddl->command_channel],
&decoder->meta_data_exists);
- if (decoder->output_order == VCD_DEC_ORDER_DISPLAY)
+ if (decoder->output_order == VCD_DEC_ORDER_DISPLAY) {
vidc_sm_get_frame_tags(&ddl->shared_mem
[ddl->command_channel],
&dec_disp_info->tag_top,
&dec_disp_info->tag_bottom);
+ if (dec_disp_info->display_correct ==
+ VIDC_1080P_DECODE_NOT_CORRECT ||
+ dec_disp_info->display_correct ==
+ VIDC_1080P_DECODE_APPROX_CORRECT)
+ output_vcd_frm->flags |=
+ VCD_FRAME_FLAG_DATACORRUPT;
+ } else {
+ if (dec_disp_info->decode_correct ==
+ VIDC_1080P_DECODE_NOT_CORRECT ||
+ dec_disp_info->decode_correct ==
+ VIDC_1080P_DECODE_APPROX_CORRECT)
+ output_vcd_frm->flags |=
+ VCD_FRAME_FLAG_DATACORRUPT;
+ }
output_vcd_frm->ip_frm_tag = dec_disp_info->tag_top;
vidc_sm_get_picture_times(&ddl->shared_mem
[ddl->command_channel],
diff --git a/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_shared_mem.c b/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_shared_mem.c
index e9d4353..8160895 100644
--- a/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_shared_mem.c
+++ b/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_shared_mem.c
@@ -200,6 +200,10 @@
#define VIDC_SM_CHROMA_ADDR_CHANGE_BMASK 0x00000001
#define VIDC_SM_CHROMA_ADDR_CHANGE_SHFT 0
+#define VIDC_SM_SEI_ENABLE_ADDR 0x0180
+#define VIDC_SM_SEI_ENABLE_RECOVERY_POINT_SEI_BMSK 0x00000001
+#define VIDC_SM_SEI_ENABLE_RECOVERY_POINT_SEI_SHFT 0
+
#define DDL_MEM_WRITE_32(base, offset, val) ddl_mem_write_32(\
(u32 *) ((u8 *) (base)->align_virtual_addr + (offset)), (val))
#define DDL_MEM_READ_32(base, offset) ddl_mem_read_32(\
@@ -703,3 +707,14 @@
}
DDL_MEM_WRITE_32(shared_mem, 0x15c, profile_enforce);
}
+void vidc_sm_set_decoder_sei_enable(struct ddl_buf_addr *shared_mem,
+ u32 sei_enable)
+{
+ DDL_MEM_WRITE_32(shared_mem, VIDC_SM_SEI_ENABLE_ADDR, sei_enable);
+}
+
+void vidc_sm_get_decoder_sei_enable(struct ddl_buf_addr *shared_mem,
+ u32 *sei_enable)
+{
+ *sei_enable = DDL_MEM_READ_32(shared_mem, VIDC_SM_SEI_ENABLE_ADDR);
+}
diff --git a/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_shared_mem.h b/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_shared_mem.h
index c6eed86..8a4b598 100644
--- a/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_shared_mem.h
+++ b/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_shared_mem.h
@@ -47,6 +47,7 @@
#define VIDC_SM_LEVEL_VC1_ADV_3 (3)
#define VIDC_SM_LEVEL_VC1_ADV_4 (4)
+#define VIDC_SM_RECOVERY_POINT_SEI (1)
enum VIDC_SM_frame_skip {
VIDC_SM_FRAME_SKIP_DISABLE = 0,
VIDC_SM_FRAME_SKIP_ENABLE_LEVEL = 1,
@@ -163,4 +164,8 @@
u32 addr_change);
void vidc_sm_set_mpeg4_profile_override(struct ddl_buf_addr *shared_mem,
enum vidc_sm_mpeg4_profileinfo profile_info);
+void vidc_sm_set_decoder_sei_enable(struct ddl_buf_addr *shared_mem,
+ u32 sei_enable);
+void vidc_sm_get_decoder_sei_enable(struct ddl_buf_addr *shared_mem,
+ u32 *sei_enable);
#endif
diff --git a/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_vidc.c b/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_vidc.c
index 8ba90a9..8b293b6 100644
--- a/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_vidc.c
+++ b/drivers/video/msm/vidc/1080p/ddl/vcd_ddl_vidc.c
@@ -246,6 +246,10 @@
vidc_sm_set_mpeg4_profile_override(
&ddl->shared_mem[ddl->command_channel],
VIDC_SM_PROFILE_INFO_ASP);
+ if (VCD_CODEC_H264 == decoder->codec.codec)
+ vidc_sm_set_decoder_sei_enable(
+ &ddl->shared_mem[ddl->command_channel],
+ VIDC_SM_RECOVERY_POINT_SEI);
ddl_context->vidc_decode_seq_start[ddl->command_channel](
&seq_start_param);
}
diff --git a/drivers/video/msm/vidc/1080p/ddl/vidc.c b/drivers/video/msm/vidc/1080p/ddl/vidc.c
index ae918f0..5b4cdee 100644
--- a/drivers/video/msm/vidc/1080p/ddl/vidc.c
+++ b/drivers/video/msm/vidc/1080p/ddl/vidc.c
@@ -36,6 +36,8 @@
#define VIDC_1080P_SI_RG7_DISPLAY_CROP_MASK 0x00000040
#define VIDC_1080P_SI_RG7_DISPLAY_CROP_SHIFT 6
+#define VIDC_1080P_SI_RG7_DISPLAY_CORRECT_MASK 0x00000180
+#define VIDC_1080P_SI_RG7_DISPLAY_CORRECT_SHIFT 7
#define VIDC_1080P_SI_RG8_DECODE_FRAMETYPE_MASK 0x00000007
#define VIDC_1080P_SI_RG10_NUM_DPB_BMSK 0x00003fff
@@ -54,6 +56,8 @@
#define VIDC_1080P_SI_RG11_DECODE_CROPP_MASK 0x00000100
#define VIDC_1080P_SI_RG11_DECODE_CROPP_SHIFT 8
+#define VIDC_1080P_SI_RG11_DECODE_CORRECT_MASK 0x00000600
+#define VIDC_1080P_SI_RG11_DECODE_CORRECT_SHIFT 9
#define VIDC_1080P_BASE_OFFSET_SHIFT 11
@@ -501,6 +505,9 @@
dec_disp_info->disp_crop_exists = VIDC_GETFIELD(display_result,
VIDC_1080P_SI_RG7_DISPLAY_CROP_MASK,
VIDC_1080P_SI_RG7_DISPLAY_CROP_SHIFT);
+ dec_disp_info->display_correct = VIDC_GETFIELD(display_result,
+ VIDC_1080P_SI_RG7_DISPLAY_CORRECT_MASK,
+ VIDC_1080P_SI_RG7_DISPLAY_CORRECT_SHIFT);
}
void vidc_1080p_get_decode_frame(
@@ -535,6 +542,9 @@
dec_disp_info->dec_crop_exists = VIDC_GETFIELD(decode_result,
VIDC_1080P_SI_RG11_DECODE_CROPP_MASK,
VIDC_1080P_SI_RG11_DECODE_CROPP_SHIFT);
+ dec_disp_info->decode_correct = VIDC_GETFIELD(decode_result,
+ VIDC_1080P_SI_RG11_DECODE_CORRECT_MASK,
+ VIDC_1080P_SI_RG11_DECODE_CORRECT_SHIFT);
}
void vidc_1080p_decode_seq_start_ch0(
diff --git a/drivers/video/msm/vidc/1080p/ddl/vidc.h b/drivers/video/msm/vidc/1080p/ddl/vidc.h
index f871509..415030a 100644
--- a/drivers/video/msm/vidc/1080p/ddl/vidc.h
+++ b/drivers/video/msm/vidc/1080p/ddl/vidc.h
@@ -270,6 +270,12 @@
VIDC_1080P_DECODE_FRAMETYPE_OTHERS = 4,
VIDC_1080P_DECODE_FRAMETYPE_32BIT = 0x7FFFFFFF
};
+enum vidc_1080P_decode_frame_correct_type {
+ VIDC_1080P_DECODE_NOT_CORRECT = 0,
+ VIDC_1080P_DECODE_CORRECT = 1,
+ VIDC_1080P_DECODE_APPROX_CORRECT = 2,
+ VIDC_1080P_DECODE_CORRECTTYPE_32BIT = 0x7FFFFFFF
+};
enum vidc_1080p_encode_frame{
VIDC_1080P_ENCODE_FRAMETYPE_NOT_CODED = 0,
VIDC_1080P_ENCODE_FRAMETYPE_I = 1,
@@ -417,6 +423,8 @@
enum vidc_1080p_display_status decode_status;
enum vidc_1080p_display_coding display_coding;
enum vidc_1080p_display_coding decode_coding;
+ enum vidc_1080P_decode_frame_correct_type display_correct;
+ enum vidc_1080P_decode_frame_correct_type decode_correct;
enum vidc_1080p_decode_frame input_frame;
};
void vidc_1080p_do_sw_reset(enum vidc_1080p_reset init_flag);
diff --git a/drivers/video/msm/vidc/common/vcd/vcd_api.h b/drivers/video/msm/vidc/common/vcd/vcd_api.h
index 5735ce2..dec0326 100644
--- a/drivers/video/msm/vidc/common/vcd/vcd_api.h
+++ b/drivers/video/msm/vidc/common/vcd/vcd_api.h
@@ -17,6 +17,7 @@
#define VCD_FRAME_FLAG_EOS 0x00000001
#define VCD_FRAME_FLAG_DECODEONLY 0x00000004
+#define VCD_FRAME_FLAG_DATACORRUPT 0x00000008
#define VCD_FRAME_FLAG_ENDOFFRAME 0x00000010
#define VCD_FRAME_FLAG_SYNCFRAME 0x00000020
#define VCD_FRAME_FLAG_EXTRADATA 0x00000040
diff --git a/include/linux/mfd/pm8xxx/rtc.h b/include/linux/mfd/pm8xxx/rtc.h
index 14f1983..bb3f98a 100644
--- a/include/linux/mfd/pm8xxx/rtc.h
+++ b/include/linux/mfd/pm8xxx/rtc.h
@@ -20,6 +20,7 @@
*/
struct pm8xxx_rtc_platform_data {
bool rtc_write_enable;
+ bool rtc_alarm_powerup;
};
#endif /* __RTC_PM8XXX_H__ */
diff --git a/include/linux/mfd/pmic8058.h b/include/linux/mfd/pmic8058.h
index 8370f18..4d9f257 100644
--- a/include/linux/mfd/pmic8058.h
+++ b/include/linux/mfd/pmic8058.h
@@ -80,6 +80,7 @@
struct pm8058_platform_data {
/* This table is only needed for misc interrupts. */
int irq_base;
+ int irq;
int (*init)(struct pm8058_chip *pm_chip);
int num_subdevs;
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index c96213d..de6f8e1 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1229,7 +1229,6 @@
my @setup_docs = ();
my $setup_docs = 0;
- my $in_code_block = 0;
my $exec_file = "";
my $shorttext = BEFORE_SHORTTEXT;
@@ -1375,6 +1374,7 @@
if ($line =~ /^diff --git.*?(\S+)$/) {
$realfile = $1;
$realfile =~ s@^([^/]*)/@@;
+ $exec_file = $realfile;
} elsif ($line =~ /^\+\+\+\s+(\S+)/) {
$realfile = $1;
@@ -1389,16 +1389,14 @@
if ($realfile =~ m@^include/asm/@) {
ERROR("do not modify files in include/asm, change architecture specific files in include/asm-<architecture>\n" . "$here$rawline\n");
}
- $in_code_block = 1;
+ $exec_file = "";
next;
}
elsif ($rawline =~ /^diff.+a\/(.+)\sb\/.+$/) {
$exec_file = $1;
- $in_code_block = 0;
}
#Check state to make sure we aren't in code block.
- elsif (!$in_code_block &&
- ($exec_file =~ /^.+\.[chS]$/ or
+ elsif (($exec_file =~ /^.+\.[chS]$/ or
$exec_file =~ /^.+\.txt$/ or
$exec_file =~ /^.+\.ihex$/ or
$exec_file =~ /^.+\.hex$/ or