Merge tag 'AU_LINUX_ANDROID_LA.HB.1.1.1.05.01.01.063.356' into HEAD

* commit '6dfa44b044c858c2b5de0f0c3ca9eef28131a0c1': (27 commits)
  Add tcp buffer sizes for LTE_CA
  init.qcom.post_boot.sh: Update scheduler tunables for 8996
  tz app seemp_healthd removed
  init.qcom.post_boot: Enable low power modes for 8952
  init.qcom.usb: Add composition to support DPL with DUN over char bridge
  init.qcom.rc: FST Manager runs as user "wifi"
  init.qcom.post_boot.sh: Enable all the LPMs by default
  qcom: Add default configuration for DCC block on MSM8976
  BTLogKit: Added BTLogKit to Product Packages
  init.qcom.usb: Set default USB request buffer size as 128 KB for MTP
  Adding and starting IOP service for 8996
  base.mk: add FST Manager to the build
  init.qcom.rc: add FST manager service
  Bluetooth: Drop Wcnss_filter to bluetooth only access
  init.qcom.post_boot: Set mincpubw devfreq governor to cpufreq for 8996
  audio_policy: disable software DRC flag
  init.qcom.rc: Seemp health Deamon
  Disable sched_boost on msm8996 at post-boot.
  Mms: Change default config options
  qcom: Add default configuration for DCC block.
  ...

Conflicts:
	rootdir/etc/init.qcom.rc

Change-Id: Ifedca1c92c67b2006f11eaa54d4fb8134fe5952c
This commit is contained in:
Chiou-Hao Hsu 2015-08-03 11:28:17 -07:00
commit 64e54d0eab
16 changed files with 604 additions and 55 deletions

View File

@ -257,6 +257,7 @@ INIT += init.qcom.uicc.sh
INIT += fstab.qcom
INIT += init.qcom.debug.sh
INIT += init.qcom.zram.sh
INIT += init.qcom.sensors.sh
#IPROUTE2
IPROUTE2 := ip
@ -620,6 +621,10 @@ CRDA += init.crda.sh
WLAN := prima_wlan.ko
WLAN += pronto_wlan.ko
#FSTMAN
FSTMAN := fstman
FSTMAN += fstman.ini
PRODUCT_PACKAGES := \
AccountAndSyncSettings \
DeskClock \
@ -658,7 +663,8 @@ ifneq ($(TARGET_USES_AOSP),true)
PRODUCT_PACKAGES += \
BluetoothExt \
BTTestApp \
HiddTestApp
HiddTestApp \
BTLogKit
endif
PRODUCT_PACKAGES += $(ALSA_HARDWARE)
@ -738,6 +744,7 @@ PRODUCT_PACKAGES += $(VT_QTI_PERMISSIONS)
PRODUCT_PACKAGES += $(CRDA)
PRODUCT_PACKAGES += $(WLAN)
PRODUCT_PACKAGES += $(IPACM)
PRODUCT_PACKAGES += $(FSTMAN)
# Live Wallpapers
PRODUCT_PACKAGES += \

View File

@ -64,7 +64,6 @@
#define UPDATE_HW_DISK_ENC_KEY 2
static int loaded_library = 0;
static unsigned char current_passwd[MAX_PASSWORD_LEN];
static int (*qseecom_create_key)(int, void*);
static int (*qseecom_update_key)(int, void*, void*);
static int (*qseecom_wipe_key)(int);
@ -156,25 +155,25 @@ static int load_qseecom_library()
* For NON-ICE targets, it would return 0 on success. On ICE based targets,
* it would return key index in the ICE Key LUT
*/
static int set_key(const char* passwd, const char* enc_mode, int operation)
static int set_key(const char* currentpasswd, const char* passwd, const char* enc_mode, int operation)
{
int err = -1;
if (is_hw_disk_encryption(enc_mode) && load_qseecom_library()) {
unsigned char* tmp_passwd = get_tmp_passwd(passwd);
unsigned char* tmp_currentpasswd = get_tmp_passwd(currentpasswd);
if(tmp_passwd) {
if (operation == UPDATE_HW_DISK_ENC_KEY)
err = qseecom_update_key(map_usage(QSEECOM_DISK_ENCRYPTION), current_passwd, tmp_passwd);
else if (operation == SET_HW_DISK_ENC_KEY)
if (operation == UPDATE_HW_DISK_ENC_KEY) {
if (tmp_currentpasswd)
err = qseecom_update_key(map_usage(QSEECOM_DISK_ENCRYPTION), tmp_currentpasswd, tmp_passwd);
} else if (operation == SET_HW_DISK_ENC_KEY) {
err = qseecom_create_key(map_usage(QSEECOM_DISK_ENCRYPTION), tmp_passwd);
if(err >= 0) {
memset(current_passwd, 0, MAX_PASSWORD_LEN);
memcpy(current_passwd, tmp_passwd, MAX_PASSWORD_LEN);
} else {
}
if(err < 0) {
if(ERR_MAX_PASSWORD_ATTEMPTS == err)
wipe_userdata();
}
free(tmp_passwd);
free(tmp_currentpasswd);
}
}
return err;
@ -182,13 +181,12 @@ static int set_key(const char* passwd, const char* enc_mode, int operation)
int set_hw_device_encryption_key(const char* passwd, const char* enc_mode)
{
return set_key(passwd, enc_mode, SET_HW_DISK_ENC_KEY);
return set_key(NULL, passwd, enc_mode, SET_HW_DISK_ENC_KEY);
}
int update_hw_device_encryption_key(const char* newpw, const char* enc_mode)
int update_hw_device_encryption_key(const char* oldpw, const char* newpw, const char* enc_mode)
{
return set_key(newpw, enc_mode, UPDATE_HW_DISK_ENC_KEY);
return set_key(oldpw, newpw, enc_mode, UPDATE_HW_DISK_ENC_KEY);
}
unsigned int is_hw_disk_encryption(const char* encryption_mode)

View File

@ -34,7 +34,7 @@ extern "C" {
#endif
int set_hw_device_encryption_key(const char*, const char*);
int update_hw_device_encryption_key(const char*, const char*);
int update_hw_device_encryption_key(const char*, const char*, const char*);
int wipe_hw_device_encryption_key(const char*);
unsigned int is_hw_disk_encryption(const char*);
int is_ice_enabled(void);

View File

@ -214,6 +214,7 @@
<string-array name="config_mobile_tcp_buffers">
<item>"lte:2097152,4194304,8388608,262144,524288,1048576"</item>
<item>"lte_ca:2097152,4194304,8388608,262144,524288,1048576"</item>
<item>"umts:4094,87380,1220608,4096,16384,1220608"</item>
<item>"hspa:4094,87380,1220608,4096,16384,1220608"</item>
<item>"hsupa:4094,87380,1220608,4096,16384,1220608"</item>

View File

@ -3,13 +3,14 @@
# as well as the output device selected by default.
# Devices are designated by a string that corresponds to the enum in audio.h
# - defines whether the speaker output path uses DRC
# "TRUE" means DRC is enabled, "FALSE" or omission means DRC isn't used.
# "TRUE" means DRC is enabled, "FALSE" or omission means DRC isn't used or
# hardware based DRC is enabled
global_configuration {
attached_output_devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER
default_output_device AUDIO_DEVICE_OUT_SPEAKER
attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX
speaker_drc_enabled TRUE
speaker_drc_enabled FALSE
}
# audio hardware module section: contains descriptors for all audio hw modules present on the

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2014, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of The Linux Foundation nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
-->
<resources>
<!-- configuration for SMS save location preference -->
<bool name="config_savelocation">true</bool>
</resources>

View File

@ -31,6 +31,10 @@ ifeq ($(call is-board-platform-in-list, msm8994), true)
LOCAL_SRC_FILES += power-8994.c
endif
ifeq ($(call is-board-platform-in-list, msm8996), true)
LOCAL_SRC_FILES += power-8996.c
endif
ifeq ($(TARGET_USES_INTERACTION_BOOST),true)
LOCAL_CFLAGS += -DINTERACTION_BOOST
endif

153
power/power-8996.c Normal file
View File

@ -0,0 +1,153 @@
/*
* Copyright (c) 2015, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of The Linux Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#define LOG_NIDEBUG 0
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <dlfcn.h>
#include <stdlib.h>
#define LOG_TAG "QCOM PowerHAL"
#include <utils/Log.h>
#include <hardware/hardware.h>
#include <hardware/power.h>
#include "utils.h"
#include "metadata-defs.h"
#include "hint-data.h"
#include "performance.h"
#include "power-common.h"
static int display_hint_sent;
static int process_video_encode_hint(void *metadata)
{
char governor[80];
struct video_encode_metadata_t video_encode_metadata;
if (get_scaling_governor(governor, sizeof(governor)) == -1) {
ALOGE("Can't obtain scaling governor.");
return HINT_NONE;
}
/* Initialize encode metadata struct fields */
memset(&video_encode_metadata, 0, sizeof(struct video_encode_metadata_t));
video_encode_metadata.state = -1;
video_encode_metadata.hint_id = DEFAULT_VIDEO_ENCODE_HINT_ID;
if (metadata) {
if (parse_video_encode_metadata((char *)metadata, &video_encode_metadata) ==
-1) {
ALOGE("Error occurred while parsing metadata.");
return HINT_NONE;
}
} else {
return HINT_NONE;
}
if (video_encode_metadata.state == 1) {
if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) &&
(strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) {
/* sched and cpufreq params
* above_hispeed_delay for LVT - 40ms
* go hispeed load for LVT - 95
* hispeed freq for LVT - 729 MHz
* target load for LVT - 90
* above hispeed delay for sLVT - 40ms
* go hispeed load for sLVT - 95
* hispeed freq for sLVT - 729 MHz
* target load for sLVT - 90
*/
int resource_values[] = {0x2704, 0x2B5F, 0x2C07, 0x2F5A, 0x3204, 0x365F, 0x3707, 0x3A5A};
perform_hint_action(video_encode_metadata.hint_id,
resource_values, sizeof(resource_values)/sizeof(resource_values[0]));
return HINT_HANDLED;
}
} else if (video_encode_metadata.state == 0) {
if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) &&
(strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) {
undo_hint_action(video_encode_metadata.hint_id);
return HINT_HANDLED;
}
}
return HINT_NONE;
}
int power_hint_override(struct power_module *module, power_hint_t hint, void *data)
{
int ret_val = HINT_NONE;
switch(hint) {
case POWER_HINT_VIDEO_ENCODE:
ret_val = process_video_encode_hint(data);
break;
default:
break;
}
return ret_val;
}
int set_interactive_override(struct power_module *module, int on)
{
return HINT_HANDLED; /* Don't excecute this code path, not in use */
char governor[80];
if (get_scaling_governor(governor, sizeof(governor)) == -1) {
ALOGE("Can't obtain scaling governor.");
return HINT_NONE;
}
if (!on) {
/* Display off */
if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) &&
(strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) {
int resource_values[] = {}; /* dummy node */
if (!display_hint_sent) {
perform_hint_action(DISPLAY_STATE_HINT_ID,
resource_values, sizeof(resource_values)/sizeof(resource_values[0]));
display_hint_sent = 1;
return HINT_HANDLED;
}
}
} else {
/* Display on */
if ((strncmp(governor, INTERACTIVE_GOVERNOR, strlen(INTERACTIVE_GOVERNOR)) == 0) &&
(strlen(governor) == strlen(INTERACTIVE_GOVERNOR))) {
undo_hint_action(DISPLAY_STATE_HINT_ID);
display_hint_sent = 0;
return HINT_HANDLED;
}
}
return HINT_NONE;
}

View File

@ -217,3 +217,11 @@ LOCAL_MODULE_TAGS := optional eng
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/init.qcom.uicc.sh
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.sensors.sh
LOCAL_MODULE_TAGS := optional eng
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/init.qcom.sensors.sh
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
include $(BUILD_PREBUILT)

View File

@ -1,5 +1,5 @@
#!/system/bin/sh
# Copyright (c) 2014, The Linux Foundation. All rights reserved.
# Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@ -82,8 +82,196 @@ enable_stm_events()
echo 1 > /sys/kernel/debug/tracing/events/thermal/thermal_post_frequency_mit/enable
}
# Function MSM8996 DCC configuration
enable_msm8996_dcc_config()
{
DCC_PATH="/sys/bus/platform/devices/4b3000.dcc"
if [ ! -d $DCC_PATH ]; then
echo "DCC don't exist on this build."
return
fi
echo 0 > $DCC_PATH/enable
echo cap > $DCC_PATH/func_type
echo sram > $DCC_PATH/data_sink
echo 1 > $DCC_PATH/config_reset
#SPM Registers
# CPU0
echo 0x998000C > $DCC_PATH/config
echo 0x9980030 > $DCC_PATH/config
echo 0x998003C > $DCC_PATH/config
# CPU1
echo 0x999000C > $DCC_PATH/config
echo 0x9990030 > $DCC_PATH/config
echo 0x999003C > $DCC_PATH/config
# CPU2
echo 0x99B000C > $DCC_PATH/config
echo 0x99B0030 > $DCC_PATH/config
echo 0x99B003C > $DCC_PATH/config
# CPU3
echo 0x99C000C > $DCC_PATH/config
echo 0x99C0030 > $DCC_PATH/config
echo 0x99C003C > $DCC_PATH/config
# PWRL2
echo 0x99A000C > $DCC_PATH/config
echo 0x99A0030 > $DCC_PATH/config
echo 0x99A003C > $DCC_PATH/config
# PERFL2
echo 0x99D000C > $DCC_PATH/config
echo 0x99D0030 > $DCC_PATH/config
echo 0x99D003C > $DCC_PATH/config
# L3
echo 0x9A0000C > $DCC_PATH/config
echo 0x9A00030 > $DCC_PATH/config
echo 0x9A0003C > $DCC_PATH/config
# CBF
echo 0x9A1000C > $DCC_PATH/config
echo 0x9A10030 > $DCC_PATH/config
echo 0x9A1003C > $DCC_PATH/config
# PWR L2 HW-FLUSH
echo 0x99A1060 > $DCC_PATH/config
# PERF L2 HW-FLUSH
echo 0x99D1060 > $DCC_PATH/config
# APCS_APC0_SLEEP_EN_VOTE
echo 0x99A2030 > $DCC_PATH/config
# APCS_APCC_SW_EN_VOTE
echo 0x99E0020 > $DCC_PATH/config
echo 1 > $DCC_PATH/enable
}
# Function MSM8976 DCC configuration
enable_msm8976_dcc_config()
{
DCC_PATH="/sys/bus/platform/devices/b3000.dcc"
if [ ! -d $DCC_PATH ]; then
echo "DCC don't exist on this build."
return
fi
echo 0 > $DCC_PATH/enable
echo cap > $DCC_PATH/func_type
echo sram > $DCC_PATH/data_sink
echo 1 > $DCC_PATH/config_reset
#BIMC_S_DDR0
echo 0x00448500 41 > $DCC_PATH/config
echo 0x0044D070 2 > $DCC_PATH/config
#BIMC_S_DDR1
echo 0x00450500 41 > $DCC_PATH/config
echo 0x00455070 2 > $DCC_PATH/config
#BMIC_M_XXX_MPORT
echo 0x00408400 30 > $DCC_PATH/config
echo 0x0040C400 30 > $DCC_PATH/config
echo 0x00410400 30 > $DCC_PATH/config
echo 0x00414400 30 > $DCC_PATH/config
echo 0x00418400 30 > $DCC_PATH/config
#APCS_ALIAS_APSS_GLB
echo 0x0B011014 2 > $DCC_PATH/config
echo 0x0B011210 1 > $DCC_PATH/config
echo 0x0B011218 1 > $DCC_PATH/config
#APCLUS1_L2_SAW2
echo 0x0B01200C 1 > $DCC_PATH/config
echo 0x0B012030 1 > $DCC_PATH/config
#APCS_ALIAS4_APSS_ACS
echo 0x0B088004 2 > $DCC_PATH/config
echo 0x0B088064 1 > $DCC_PATH/config
echo 0x0B088090 1 > $DCC_PATH/config
#APCS_ALIAS4_SAW2
echo 0x0B08900C 1 > $DCC_PATH/config
echo 0x0B089030 1 > $DCC_PATH/config
#APCS_ALIAS5_APSS_ACS
echo 0x0B098004 2 > $DCC_PATH/config
echo 0x0B098064 1 > $DCC_PATH/config
echo 0x0B098090 1 > $DCC_PATH/config
#APCS_ALIAS5_SAW2
echo 0x0B09900C 1 > $DCC_PATH/config
echo 0x0B099030 1 > $DCC_PATH/config
#APCS_ALIAS6_APSS_ACS
echo 0x0B0A8004 2 > $DCC_PATH/config
echo 0x0B0A8064 1 > $DCC_PATH/config
echo 0x0B0A8090 1 > $DCC_PATH/config
#APCS_ALIAS6_SAW2
echo 0x0B0A900C 1 > $DCC_PATH/config
echo 0x0B0A9030 1 > $DCC_PATH/config
#APCS_ALIAS7_APSS_ACS
echo 0x0B0B8004 2 > $DCC_PATH/config
echo 0x0B0B8064 1 > $DCC_PATH/config
echo 0x0B0B8090 1 > $DCC_PATH/config
#APCS_ALIAS7_SAW2
echo 0x0B0B900C 1 > $DCC_PATH/config
echo 0x0B0B9030 1 > $DCC_PATH/config
#APCS_ALIAS0_APSS_GLB
echo 0x0B111014 2 > $DCC_PATH/config
echo 0x0B111210 1 > $DCC_PATH/config
echo 0x0B111218 1 > $DCC_PATH/config
#APCLUS0_L2_SAW2
echo 0x0B11200C 1 > $DCC_PATH/config
echo 0x0B112030 1 > $DCC_PATH/config
#APCS_ALIAS0_APSS_ACS
echo 0x0B188004 2 > $DCC_PATH/config
echo 0x0B188064 1 > $DCC_PATH/config
#APCS_ALIAS0_SAW2
echo 0x0B18900C 1 > $DCC_PATH/config
echo 0x0B189030 1 > $DCC_PATH/config
#APCS_ALIAS1_APSS_ACS
echo 0x0B198004 2 > $DCC_PATH/config
echo 0x0B198064 1 > $DCC_PATH/config
#APCS_ALIAS1_SAW2
echo 0x0B19900C 1 > $DCC_PATH/config
echo 0x0B199030 1 > $DCC_PATH/config
#APCS_ALIAS2_APSS_ACS
echo 0x0B1A8004 2 > $DCC_PATH/config
echo 0x0B1A8064 1 > $DCC_PATH/config
#APCS_ALIAS2_SAW2
echo 0x0B1A900C 1 > $DCC_PATH/config
echo 0x0B1A9030 1 > $DCC_PATH/config
#APCS_ALIAS3_APSS_ACS
echo 0x0B1B8004 2 > $DCC_PATH/config
echo 0x0B1B8064 1 > $DCC_PATH/config
#APCS_ALIAS3_SAW2
echo 0x0B1B900C 1 > $DCC_PATH/config
echo 0x0B1B9030 1 > $DCC_PATH/config
#APCS_COMMON_APSS_SHARED
echo 0x0B1D1058 2 > $DCC_PATH/config
echo 0x0B1D200C 1 > $DCC_PATH/config
echo 0x0B1D2030 1 > $DCC_PATH/config
echo 1 > $DCC_PATH/enable
}
# Function DCC configuration
enable_dcc_config()
{
target=`getprop ro.board.platform`
if [ -f /sys/devices/soc0/soc_id ]; then
soc_id=`cat /sys/devices/soc0/soc_id`
else
soc_id=`cat /sys/devices/system/soc/soc0/id`
fi
case "$target" in
"msm8996")
echo "Enabling DCC config for 8996."
enable_msm8996_dcc_config
;;
"msm8952")
case "$soc_id" in
"266" | "274" | "277" | "278")
echo "Enabling DCC config for 8976."
enable_msm8976_dcc_config
;;
esac
;;
esac
}
coresight_config=`getprop ro.dbg.coresight.config`
enable_dcc_config
case "$coresight_config" in
"stm_events")
echo "Enabling STM events."

View File

@ -335,6 +335,25 @@ case "$target" in
;;
esac
case "$target" in
"msm8952")
if [ -f /sys/devices/soc0/soc_id ]; then
soc_id=`cat /sys/devices/soc0/soc_id`
else
soc_id=`cat /sys/devices/system/soc/soc0/id`
fi
case "$soc_id" in
"264" | "289")
# Enable low power modes
echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled
;;
esac
;;
esac
case "$target" in
"msm8916")
if [ -f /sys/devices/soc0/soc_id ]; then
@ -973,43 +992,37 @@ case "$target" in
echo "0:1344000 2:1344000" > /sys/module/cpu_boost/parameters/input_boost_freq
echo 40 > /sys/module/cpu_boost/parameters/input_boost_ms
# Setting b.L scheduler parameters
echo 0 > /proc/sys/kernel/sched_boost
echo 1 > /proc/sys/kernel/sched_migration_fixup
echo 30 > /proc/sys/kernel/sched_small_task
echo 20 > /proc/sys/kernel/sched_mostly_idle_load
echo 3 > /proc/sys/kernel/sched_mostly_idle_nr_run
echo 95 > /proc/sys/kernel/sched_upmigrate
echo 90 > /proc/sys/kernel/sched_downmigrate
echo 400000 > /proc/sys/kernel/sched_freq_inc_notify
echo 400000 > /proc/sys/kernel/sched_freq_dec_notify
echo 3 > /proc/sys/kernel/sched_spill_nr_run
# Enable bus-dcvs
for devfreq_gov in /sys/class/devfreq/*qcom,cpubw*/governor
do
echo "bw_hwmon" > $devfreq_gov
done
for devfreq_gov in /sys/class/devfreq/*qcom,mincpubw*/governor
do
echo "cpufreq" > $devfreq_gov
done
soc_revision=`cat /sys/devices/soc0/revision`
if [ "$soc_revision" == "2.1" ]; then
# Disable C4, D3, D4 and M3 LPMs
echo 0 > /sys/module/lpm_levels/system/pwr/cpu0/fpc/idle_enabled
echo 0 > /sys/module/lpm_levels/system/pwr/cpu1/fpc/idle_enabled
echo 0 > /sys/module/lpm_levels/system/perf/cpu2/fpc/idle_enabled
echo 0 > /sys/module/lpm_levels/system/perf/cpu3/fpc/idle_enabled
# Enable C4.D4.E4.M3 LPM modes
# Disable D3 state
echo 0 > /sys/module/lpm_levels/system/pwr/pwr-l2-gdhs/idle_enabled
echo 0 > /sys/module/lpm_levels/system/pwr/pwr-l2-fpc/idle_enabled
echo 0 > /sys/module/lpm_levels/system/perf/perf-l2-gdhs/idle_enabled
echo 0 > /sys/module/lpm_levels/system/perf/perf-l2-fpc/idle_enabled
echo 0 > /sys/module/lpm_levels/system/system-fpc/idle_enabled
# Enable C4 LPM mode
echo 1 > /sys/module/lpm_levels/system/pwr/cpu0/fpc/idle_enabled
echo 1 > /sys/module/lpm_levels/system/pwr/cpu1/fpc/idle_enabled
echo 1 > /sys/module/lpm_levels/system/perf/cpu2/fpc/idle_enabled
echo 1 > /sys/module/lpm_levels/system/perf/cpu3/fpc/idle_enabled
echo N > /sys/module/lpm_levels/parameters/sleep_disabled
else
#Disable suspend for v1.0 and v2.0
echo pwr_dbg > /sys/power/wake_lock
fi
# Starting io prefetcher service
start iop
;;
esac

View File

@ -30,6 +30,7 @@ import init.target.rc
on early-init
mount debugfs debugfs /sys/kernel/debug
chmod 0755 /sys/kernel/debug
on init
# Set permissions for persist partition
@ -183,6 +184,12 @@ on boot
chown radio radio /data/misc/radio/copy_complete
chmod 0660 /data/misc/radio/copy_complete
# Socket location for RIDL
mkdir /dev/socket/RIDL 2770 system system
# bond0 used by FST Manager
chown wifi wifi /sys/class/net/bond0/bonding/queue_id
# msm specific files that need to be created on /data
on post-fs-data
# Create directory for TZ Apps
@ -281,6 +288,22 @@ on post-fs-data
#Create a folder for SRS to be able to create a usercfg file
mkdir /data/data/media 0770 media media
# RIDL data
mkdir /data/misc/SelfHost/ 0710 system shell
mkdir /data/misc/SelfHost/QCLogs/ 2750 system shell
mkdir /data/misc/SelfHost/QCLogs/temp/ 0700 system shell
mkdir /data/misc/SelfHost/storage/ 0700 system shell
mkdir /data/misc/SelfHost/Running/ 2750 system shell
#Create IOP deamon related dirs
mkdir /data/misc/iop 0770 root system
service iop /system/bin/iop
class main
user root
group root
disabled
service qcomsysd /system/bin/qcom-system-daemon
class main
user root
@ -399,8 +422,20 @@ on property:wc_transport.start_hci=false
service start_hci_filter /system/bin/wcnss_filter
class late_start
user root
group bluetooth diag
user bluetooth
group bluetooth qcom_diag
disabled
on property:wc_transport.start_root=true
start hci_filter_root
on property:wc_transport.start_root=false
stop hci_filter_root
service hci_filter_root /system/bin/wcnss_filter
class late_start
user bluetooth
group bluetooth qcom_diag system
disabled
service config_bluetooth /system/bin/sh /system/etc/init.qcom.bt.sh "onboot"
@ -577,11 +612,30 @@ service wpa_supplicant /system/bin/wpa_supplicant \
disabled
oneshot
# FST Manager can be started by property_set("ctl.start", "fstman:<hostap ctrl iface>");
service fstman /system/bin/fstman -B -ddd -n -c /data/misc/wifi/fstman.ini
user wifi
group wifi net_admin net_raw
class main
disabled
oneshot
on property:netd.fstman.start=true
start fstman
on property:netd.fstman.start=false
stop fstman
service dhcpcd_wlan0 /system/bin/dhcpcd -ABKLG
class late_start
disabled
oneshot
service dhcpcd_bond0 /system/bin/dhcpcd -ABKLG
class late_start
disabled
oneshot
service dhcpcd_p2p /system/bin/dhcpcd -ABKLG
class late_start
disabled
@ -592,6 +646,11 @@ service iprenew_wlan0 /system/bin/dhcpcd -n
disabled
oneshot
service iprenew_bond0 /system/bin/dhcpcd -n
class late_start
disabled
oneshot
service iprenew_p2p /system/bin/dhcpcd -n
class late_start
disabled
@ -687,6 +746,11 @@ service qcom-sh /system/bin/sh /init.qcom.sh
user root
oneshot
service sensor-sh /system/bin/sh /init.qcom.sensors.sh
class core
user root
oneshot
service qcom-post-boot /system/bin/sh /system/etc/init.qcom.post_boot.sh
class late_start
user root
@ -889,6 +953,14 @@ on property:sys.wfdservice=enable
on property:sys.wfdservice=disable
stop wfdservice
service RIDL /system/vendor/bin/RIDLClient.exe
class late_start
oneshot
user system
group system inet log sdcard_r sdcard_rw
# removed for security team - misc bluetooth radio gps wifi diag media_rw
# limited to 12 groups. Unused: audio usb qcom_diag net_bt_admin net_bt_stac net_raw net_admin
# Coresight early boot service
service cs-early-boot /system/bin/sh /persist/coresight/qdss.agent.sh early-boot /system/etc/init.qcom.debug.sh
class core
@ -914,3 +986,9 @@ service qseeproxydaemon /system/vendor/bin/qseeproxydaemon
class late_start
user system
group system
# Seemp health service
#service seemp_healthd /system/vendor/bin/seemp_healthd
# class late_start
# user system
# group system

View File

@ -0,0 +1,46 @@
#!/system/bin/sh
# Copyright (c) 2015, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#
# Function to start sensors for SSC enabled platforms
#
start_sensors()
{
if [ -c /dev/msm_dsps -o -c /dev/sensors ]; then
chmod -h 775 /persist/sensors
chmod -h 664 /persist/sensors/sensors_settings
chown -h system.root /persist/sensors/sensors_settings
mkdir -p /data/misc/sensors
chmod -h 775 /data/misc/sensors
start sensors
fi
}
start_sensors

View File

@ -32,22 +32,6 @@ if [ -f /sys/devices/soc0/soc_id ]; then
else
platformid=`cat /sys/devices/system/soc/soc0/id`
fi
#
# Function to start sensors for DSPS enabled platforms
#
start_sensors()
{
if [ -c /dev/msm_dsps -o -c /dev/sensors ]; then
chmod -h 775 /persist/sensors
chmod -h 664 /persist/sensors/sensors_settings
chown -h system.root /persist/sensors/sensors_settings
mkdir -p /data/misc/sensors
chmod -h 775 /data/misc/sensors
start sensors
fi
}
start_battery_monitor()
{
@ -128,7 +112,6 @@ case "$baseband" in
;;
esac
start_sensors
start_copying_prebuilt_qcril_db
case "$target" in

View File

@ -1221,6 +1221,39 @@ on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_ipa,mass_storage,dpl
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,dpl,adb
stop adbd
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 05C6
write /sys/class/android_usb/android0/idProduct 90AD
write /sys/class/android_usb/android0/f_diag/clients diag
write /sys/class/android_usb/android0/f_serial/transports cdev,tty
# DPL is implemented using QDSS
write /sys/class/android_usb/android0/f_qdss/debug_intf 0
write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa
write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage,qdss
write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=diag,serial_cdev,serial_tty,rmnet_ipa,mass_storage,dpl
stop adbd
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 05C6
write /sys/class/android_usb/android0/idProduct 90B0
write /sys/class/android_usb/android0/f_diag/clients diag
write /sys/class/android_usb/android0/f_serial/transports cdev,tty
# DPL is implemented using QDSS
write /sys/class/android_usb/android0/f_qdss/debug_intf 0
write /sys/class/android_usb/android0/f_qdss/transports qti,bam2bam_ipa
write /sys/class/android_usb/android0/f_qdss/transport_names qdss_bam
write /sys/class/android_usb/android0/f_rmnet/transports qti,bam2bam_ipa
write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage,qdss
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=ncm
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 0525

View File

@ -187,6 +187,8 @@ case "$target" in
;;
"msm8994" | "msm8992" | "msm8996")
echo BAM2BAM_IPA > /sys/class/android_usb/android0/f_rndis_qc/rndis_transports
echo 131072 > /sys/module/g_android/parameters/mtp_tx_req_len
echo 131072 > /sys/module/g_android/parameters/mtp_rx_req_len
;;
esac