amazon-austin: new device (MR 3251)

Based on hexdump0815 and GjergjiFloychi's work.

[ci:skip-build] Already built successfuly on CI in MR
This commit is contained in:
Richard Qian 2022-06-22 23:51:48 -05:00 committed by Newbyte
parent d9326d5ac9
commit 02aaa6eae6
No known key found for this signature in database
GPG key ID: 5873C171C9429CFA
18 changed files with 11186 additions and 0 deletions

View file

@ -0,0 +1,30 @@
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-amazon-austin
pkgdesc="Amazon Fire 7 (2017)"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="
linux-amazon-austin
mesa-dri-gallium
mkbootimg
postmarketos-base
msm-fb-refresher
"
makedepends="devicepkg-dev"
source="deviceinfo"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
sha512sums="
7996497bcd36f7c49ffc83392bc7528f9c8e911356e8eb890d537be2fd3bbef13a678b53b8f57a955503b128a0182db3ed5c95182c616a317d2e43ad6e603640 deviceinfo
"

View file

@ -0,0 +1,31 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.
deviceinfo_format_version="0"
deviceinfo_name="Amazon Fire 7 (2017)"
deviceinfo_manufacturer="Amazon"
deviceinfo_codename="amazon-austin"
deviceinfo_year="2017"
deviceinfo_arch="armv7"
# Device related
deviceinfo_chassis="tablet"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="600"
deviceinfo_screen_height="1024"
# Bootloader related
deviceinfo_flash_method="fastboot"
deviceinfo_kernel_cmdline="bootopt=64S3,32N2,32N2 loglevel=4 rootwait ro fsck.repair=yes net.ifnames=0 ipv6.disable=1"
deviceinfo_generate_bootimg="true"
deviceinfo_bootimg_qcdt="false"
deviceinfo_bootimg_mtk_mkimage="false"
deviceinfo_bootimg_dtb_second="false"
deviceinfo_flash_offset_base="0x80000000"
deviceinfo_flash_offset_kernel="0x00008000"
deviceinfo_flash_offset_ramdisk="0x04000000"
deviceinfo_flash_offset_second="0x00f00000"
deviceinfo_flash_offset_tags="0x00000100"
deviceinfo_flash_pagesize="2048"

View file

@ -0,0 +1,86 @@
# Reference: <https://postmarketos.org/vendorkernel>
# This port is heavily inspired by https://github.com/GjergjiFloychi/amazon-austin-pmaports
# Kernel config based on: https://github.com/NixOS/mobile-nixos/blob/master/devices/amazon-austin/kernel/config.armv7
pkgname=linux-amazon-austin
pkgver=3.10.54
pkgrel=0
pkgdesc="Amazon Fire 7 (2017) kernel fork"
arch="armv7"
_carch="arm"
_flavor="amazon-austin"
url="https://kernel.org"
license="GPL-2.0-only"
options="!strip !check !tracedeps pmb:cross-native"
makedepends="bash bc bison devicepkg-dev flex openssl-dev perl gcc4 linux-headers xz"
# Compiler: GCC 4 (doesn't compile with versions above GCC 4)
if [ "${CC:0:5}" != "gcc4-" ]; then
CC="gcc4-$CC"
HOSTCC="gcc4-gcc"
CROSS_COMPILE="gcc4-$CROSS_COMPILE"
fi
# Source from amazon stock kernel
_repository="linux-amazon-mediatek-mt8127-kernel-source"
_commit="Fire_7_7th_Gen-5.3.7.3-20210714"
_config="config-$_flavor.$arch"
source="
$pkgname-$_commit.tar.gz::https://github.com/hexdump0815/$_repository/archive/$_commit.tar.gz
$_config
gcc4-compile-fixes.patch
fix-host-card-inserted.patch
silence-hotplug-logspam.patch
silence-power-logspam.patch
silence-battery-logspam.patch
silence-mtkfb-logspam.patch
silence-usb-logspam.patch
silence-time-logspam.patch
silence-i2c-logspam.patch
silence-cmb-logspam.patch
silence-tz-logspam.patch
silence-thermal-logspam.patch
silence-uart-logspam.patch
silence-vsync-logspam.patch
"
builddir="$srcdir/$_repository-$_commit"
prepare() {
default_prepare
. downstreamkernel_prepare
}
build() {
unset LDFLAGS
make ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
}
package() {
downstreamkernel_package "$builddir" "$pkgdir" "$_carch" "$_flavor"
# in case there will be modules at any time, make sure they get installed as well
unset LDFLAGS
make O="$_outdir" ARCH="$_carch" CC="${CC:-gcc}" \
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS" \
INSTALL_MOD_PATH="$pkgdir" INSTALL_MOD_STRIP=1 modules_install
}
sha512sums="
2017b730bb7e9470084ff812dc3d35cd50040c4a69a9b443b2105393cdc6ce6bb03fc5c80ed8d2a04020103e89675162629fc81d2601ce40a291001bd4bfaea5 linux-amazon-austin-Fire_7_7th_Gen-5.3.7.3-20210714.tar.gz
ce3842273ab183f8135d3128a4a53a3ea6677f6379c6243e5e33a266c6c05916b13e754d931166481bffe6841136f99aefaeebf931878fb38eb70e0fa3d402f5 config-amazon-austin.armv7
0ae455bd3d91ef03644f742916340951617e438e09e6552438daf71e3d5eaf498b022c01535160de92ef2fa3b4100f5a2bdb475179ac9705352a0a337b26e8b8 gcc4-compile-fixes.patch
bfd9134f02059fdc948890a0f923f9c681e209b9ada6025eaa61e04348f69c9e155a094c929e5d6842c09d5782cbb98de3d004fee0ce40767ff954f4499e60fa fix-host-card-inserted.patch
50760092b5125466b2280aead0baa12644f064cedc4821fbab6068c97900799922b3d67e6b75968639a1d5bc2cd6af94e90645c594f42c6ac28473c1ea20d9f4 silence-hotplug-logspam.patch
fc3529031cda24670d668fc8ad0e1cbd745db6a65b28df506169e49b6918de0fa81b6921a1f51271eb826a58d4e2c6c3292d46908913b3c8e70f790f3a82da76 silence-power-logspam.patch
ef9358ccf23b1a397d07ae0e26fa155aa421870e20c998452855ccec4b1cda1e22b5e95cdcbcd754d0217f1fcfe7bb505f5dda1853dee15548ff948c1b7338c9 silence-battery-logspam.patch
fde906379c3ab5e7b1e9f6036c77877a07342e0b9f508d6dd2e084862b8fc95122180fac82f9dbd85f4e2a401ce4d440aae0f3b6743deff332926f0bd2898554 silence-mtkfb-logspam.patch
35889da4c5bef7defd7dcab9497bcc98b0e5998de61a1f98e2d4ac5bd8aec47266fb6979e1cddcc9a94b20b43a6cc893dd14dfbc48d7212c2fc8425f16c376be silence-usb-logspam.patch
b3b037b2145c079c95c06781604fa2a874a2c547137f96704d861f5f591069afb6e02869b7fedaca73aff5e7fb6b2449b2a6434aedc80ff36670acd2bc51155d silence-time-logspam.patch
9eb4e60f988a289385a4ee0eb94573dd0cbd249c8236eb695b6637322a1a3826dc90728c5f939d51c3320ec3fb2b1eea252c28e34cdfd307db8807dc9f9080a3 silence-i2c-logspam.patch
56f77c21867325e461d9d8db2400d3a521d682ee10f7d58bef1cc4d50e3648db68be7e40ff9ba67d75ef9832e8914867540381fb38e2108ac5906964536980f8 silence-cmb-logspam.patch
bac2c215a7a5329e7e0cc6cddc901d7144050a66e1204b4de2bec732a33b2c18bb45732e7b41f62ef5dfc0a6db3518d3870c17e59c13edaf64a5b64b9cbda821 silence-tz-logspam.patch
d67f2b902c8ce1797ccdce053c95a97adbdc20c49a88d8f257ab4bdd7a643242fffcbba31aad5d3cb91580c3c3351a4fe159041304fe531e857ebfb84aedc962 silence-thermal-logspam.patch
8447d2509916babb105a91d1f5f04bef12498135de71141f2229ce83cd93c6875b8f6f8ae03ff11d34d7eca6d05464159aa661650fee605c9789125bb755a531 silence-uart-logspam.patch
3868047c589f0c3efc2b94aece0c46a55d0798650ad1bf8bc4f2328c4a5daaf071d699048edf6a6e0735407d84eb48688c7ade18b439cff1f09ac33087e7170a silence-vsync-logspam.patch
"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,31 @@
diff --git a/drivers/misc/mediatek/mmc-host/mt8127/sd.c b/drivers/misc/mediatek/mmc-host/mt8127/sd.c
index b78d8f83..d6f0130d 100644
--- a/drivers/misc/mediatek/mmc-host/mt8127/sd.c
+++ b/drivers/misc/mediatek/mmc-host/mt8127/sd.c
@@ -216,7 +216,7 @@ MSDC_DEV_ATTR(cmdtimeout_count, "%d", host->cmdtimeout_count, u32);
MSDC_DEV_ATTR(reqtimeout_count, "%d", host->reqtimeout_count, u32);
MSDC_DEV_ATTR(pc_count, "%d", host->pc_count, u32);
MSDC_DEV_ATTR(pc_suspend, "%d", host->pc_suspend, u32);
-MSDC_DEV_ATTR(inserted, "%d", host->inserted, u32);
+MSDC_DEV_ATTR(inserted, "%d", host->card_inserted, u32);
static struct device_attribute *msdc_attrs[] = {
&dev_attr_crc_count,
@@ -271,7 +271,7 @@ static void msdc_metrics_work(struct work_struct *work)
MSDC_LOG_COUNTER_TO_VITALS(reqto, host->reqtimeout_count);
MSDC_LOG_COUNTER_TO_VITALS(pc_count, host->pc_count);
MSDC_LOG_COUNTER_TO_VITALS(pc_suspend, host->pc_suspend);
- MSDC_LOG_COUNTER_TO_VITALS(inserted, host->inserted);
+ MSDC_LOG_COUNTER_TO_VITALS(inserted, host->card_inserted);
}
#endif
@@ -1908,7 +1908,7 @@ static void msdc_tasklet_card(unsigned long arg)
}
if ((host->hw->host_function == MSDC_SD) && inserted) {
- host->inserted++;
+ host->card_inserted++;
#ifdef CONFIG_AMAZON_METRICS_LOG
mod_delayed_work(system_wq, &host->metrics_work, METRICS_DELAY);
#endif

View file

@ -0,0 +1,26 @@
diff --git a/arch/arm/mach-mt8127/ford/touchpanel/tpd_debug.c b/arch/arm/mach-mt8127/ford/touchpanel/tpd_debug.c
index aa1515d9..3df17b83 100644
--- a/arch/arm/mach-mt8127/ford/touchpanel/tpd_debug.c
+++ b/arch/arm/mach-mt8127/ford/touchpanel/tpd_debug.c
@@ -4,7 +4,7 @@
#include <linux/miscdevice.h>
#include <linux/i2c.h>
#include <linux/delay.h>
-#include <tpd.h>
+#include "tpd.h"
#ifdef TPD_DEBUG_CODE
int tpd_fail_count = 0;
diff --git a/drivers/thermal/virtual_sensor_cpufreq_cooling.c b/drivers/thermal/virtual_sensor_cpufreq_cooling.c
index 99c4cae1..705993b1 100644
--- a/drivers/thermal/virtual_sensor_cpufreq_cooling.c
+++ b/drivers/thermal/virtual_sensor_cpufreq_cooling.c
@@ -29,7 +29,7 @@
#include <linux/thermal.h>
#include <linux/cpumask.h>
#include <linux/cpu_cooling.h>
-#include <thermal_core.h>
+#include "thermal_core.h"
#define MAX_STATE 4 /* 0-4 total 5 */

View file

@ -0,0 +1,56 @@
diff --git a/include/mach/charging.h b/include/mach/charging.h
index a6c2a4cb..49379bba 100644
--- a/include/mach/charging.h
+++ b/include/mach/charging.h
@@ -43,12 +43,13 @@
#define BAT_LOG_CRTI 1
#define BAT_LOG_FULL 2
-#define battery_xlog_printk(num, fmt, args...) \
- do { \
- if (Enable_BATDRV_LOG >= (int)num) { \
- pr_notice(fmt, ##args); \
- } \
- } while (0)
+//#define battery_xlog_printk(num, fmt, args...) \
+// do { \
+// if (Enable_BATDRV_LOG >= (int)num) { \
+// pr_notice(fmt, ##args); \
+// } \
+// } while (0)
+#define battery_xlog_printk(num, fmt, args...) do {} while (0)
/* ============================================================ */
diff --git a/drivers/power/mediatek/battery_common.c b/drivers/power/mediatek/battery_common.c
index 92228b5d..6c3d42cd 100755
--- a/drivers/power/mediatek/battery_common.c
+++ b/drivers/power/mediatek/battery_common.c
@@ -2789,10 +2789,10 @@ void mt_battery_GetBatteryData(void)
if (g_battery_soc_ready == KAL_FALSE)
g_battery_soc_ready = KAL_TRUE;
- pr_notice("AvgVbat=(%d),bat_vol=(%d),AvgI=(%d),I=(%d),VChr=(%d),AvgT=(%d),T=(%d),pre_SOC=(%d),SOC=(%d),ZCV=(%d)\n",
- BMT_status.bat_vol, bat_vol, BMT_status.ICharging, ICharging,
- BMT_status.charger_vol, BMT_status.temperature, temperature,
- previous_SOC, BMT_status.SOC, BMT_status.ZCV);
+// pr_notice("AvgVbat=(%d),bat_vol=(%d),AvgI=(%d),I=(%d),VChr=(%d),AvgT=(%d),T=(%d),pre_SOC=(%d),SOC=(%d),ZCV=(%d)\n",
+// BMT_status.bat_vol, bat_vol, BMT_status.ICharging, ICharging,
+// BMT_status.charger_vol, BMT_status.temperature, temperature,
+// previous_SOC, BMT_status.SOC, BMT_status.ZCV);
}
diff --git a/drivers/power/mediatek/linear_charging.c b/drivers/power/mediatek/linear_charging.c
index c3bf6a0c..2dd6e5ba 100644
--- a/drivers/power/mediatek/linear_charging.c
+++ b/drivers/power/mediatek/linear_charging.c
@@ -310,7 +310,7 @@ static void mtk_ta_vchr_select(int i,int ta_v_chr_candidate[], int ta_charging_c
current_vchr = battery_meter_get_charger_voltage();
if(ta_current_level != 5000 && current_vchr >= 4900) { /* pattern error before, so reset vchr to 5V */
- battery_xlog_printk(BAT_LOG_CRTI, "mtk_ta_vchr_select() : curr_VChr=%d, ta_current_level=%d\n",current_vchr,ta_current_level);
+// battery_xlog_printk(BAT_LOG_CRTI, "mtk_ta_vchr_select() : curr_VChr=%d, ta_current_level=%d\n",current_vchr,ta_current_level);
mtk_ta_reset_vchr();
}

View file

@ -0,0 +1,36 @@
diff --git a/drivers/misc/mediatek/connectivity/combo/common/platform/alps/mtk_wcn_cmb_stub_alps.c b/drivers/misc/mediatek/connectivity/combo/common/platform/alps/mtk_wcn_cmb_stub_alps.c
index 1bba50c6..85fea736 100644
--- a/drivers/misc/mediatek/connectivity/combo/common/platform/alps/mtk_wcn_cmb_stub_alps.c
+++ b/drivers/misc/mediatek/connectivity/combo/common/platform/alps/mtk_wcn_cmb_stub_alps.c
@@ -15,9 +15,9 @@
* M A C R O S
********************************************************************************
*/
-#define CMB_STUB_LOG_INFO(fmt, arg...) pr_warn(fmt, ##arg)
-#define CMB_STUB_LOG_WARN(fmt, arg...) pr_err(fmt, ##arg)
-#define CMB_STUB_LOG_DBG(fmt, arg...) pr_warn(fmt, ##arg)
+#define CMB_STUB_LOG_INFO(fmt, arg...) pr_info(fmt, ##arg)
+#define CMB_STUB_LOG_WARN(fmt, arg...) pr_warn(fmt, ##arg)
+#define CMB_STUB_LOG_DBG(fmt, arg...) pr_debug(fmt, ##arg)
/*******************************************************************************
diff --git a/drivers/misc/mediatek/connectivity/common_detect/mtk_wcn_stub_alps.c b/drivers/misc/mediatek/connectivity/common_detect/mtk_wcn_stub_alps.c
index c2d20e1a..dcf43e74 100644
--- a/drivers/misc/mediatek/connectivity/common_detect/mtk_wcn_stub_alps.c
+++ b/drivers/misc/mediatek/connectivity/common_detect/mtk_wcn_stub_alps.c
@@ -305,10 +305,10 @@ signed long mtk_wcn_cmb_stub_query_ctrl()
{
temp = (*cmb_stub_thermal_ctrl_cb)();
}
- else
- {
- CMB_STUB_LOG_DBG("[cmb_stub] thermal_ctrl_cb null\n");
- }
+// else
+// {
+// CMB_STUB_LOG_DBG("[cmb_stub] thermal_ctrl_cb null\n");
+// }
return temp;
}

View file

@ -0,0 +1,177 @@
diff --git a/arch/arm/mach-mt8127/include/mach/hotplug.h b/arch/arm/mach-mt8127/include/mach/hotplug.h
index fa139f2a..413b7dbc 100644
--- a/arch/arm/mach-mt8127/include/mach/hotplug.h
+++ b/arch/arm/mach-mt8127/include/mach/hotplug.h
@@ -11,7 +11,8 @@
#define HOTPLUG_LOG_WITH_XLOG 1
#define HOTPLUG_LOG_WITH_PRINTK 2
-#define HOTPLUG_LOG_PRINT HOTPLUG_LOG_WITH_PRINTK
+// #define HOTPLUG_LOG_PRINT HOTPLUG_LOG_WITH_PRINTK
+#define HOTPLUG_LOG_PRINT HOTPLUG_LOG_NONE
#if (HOTPLUG_LOG_PRINT == HOTPLUG_LOG_NONE)
#define HOTPLUG_INFO(fmt, args...)
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 5c5842d6..62de84f3 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -220,7 +220,7 @@ void __cpuinit __cpu_die(unsigned int cpu)
pr_err("CPU%u: cpu didn't die\n", cpu);
return;
}
- printk(KERN_NOTICE "CPU%u: shutdown\n", cpu);
+// printk(KERN_NOTICE "CPU%u: shutdown\n", cpu);
/*
* platform_cpu_kill() is generally expected to do the powering off
@@ -356,7 +356,7 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
cpu_init();
aee_rr_rec_hoplug(cpu, 5, 0);
- printk("CPU%u: Booted secondary processor\n", cpu);
+// printk("CPU%u: Booted secondary processor\n", cpu);
preempt_disable();
aee_rr_rec_hoplug(cpu, 6, 0);
diff --git a/arch/arm/mach-mt8127/ca7_timer.c b/arch/arm/mach-mt8127/ca7_timer.c
index c752bb1d..0ca334e4 100644
--- a/arch/arm/mach-mt8127/ca7_timer.c
+++ b/arch/arm/mach-mt8127/ca7_timer.c
@@ -289,7 +289,7 @@ static int __cpuinit generic_timer_setup(struct clock_event_device *clk)
{
struct clock_event_device **this_cpu_clk;
- pr_info("[ca7_timer]%s entry\n", __func__);
+// pr_info("[ca7_timer]%s entry\n", __func__);
generic_timer_calibrate_rate();
write_cntp_ctl(0x0);
diff --git a/arch/arm/mach-mt8127/mt-smp.c b/arch/arm/mach-mt8127/mt-smp.c
index 4df773d2..1fbd14c9 100644
--- a/arch/arm/mach-mt8127/mt-smp.c
+++ b/arch/arm/mach-mt8127/mt-smp.c
@@ -127,7 +127,7 @@ void __cpuinit mt_platform_secondary_init(unsigned int cpu)
{
struct wd_api *wd_api = NULL;
- printk(KERN_INFO "Slave cpu init\n");
+// printk(KERN_INFO "Slave cpu init\n");
HOTPLUG_INFO("platform_secondary_init, cpu: %d\n", cpu);
mt_gic_secondary_init();
@@ -170,7 +170,7 @@ static void __cpuinit mt_wakeup_cpu(int cpu)
}
else
{
- printk("mt_wakeup_cpu: not first boot!(%d)\n", cpu);
+// printk("mt_wakeup_cpu: not first boot!(%d)\n", cpu);
mt65xx_reg_sync_writel(virt_to_phys(mt_secondary_startup), BOOT_ADDR);
#if defined(CONFIG_TRUSTONIC_TEE_SUPPORT) || defined(CONFIG_MTK_IN_HOUSE_TEE_SUPPORT)
@@ -189,7 +189,7 @@ int __cpuinit mt_boot_secondary(unsigned int cpu, struct task_struct *idle)
{
unsigned long timeout;
- printk(KERN_CRIT "Boot slave CPU\n");
+// printk(KERN_INFO "Boot slave CPU\n");
atomic_inc(&hotplug_cpu_count);
@@ -224,7 +224,7 @@ int __cpuinit mt_boot_secondary(unsigned int cpu, struct task_struct *idle)
#if !defined (CONFIG_TRUSTONIC_TEE_SUPPORT)
mt_wakeup_cpu(cpu);
#else //#if !defined (CONFIG_TRUSTONIC_TEE_SUPPORT)
- printk("mt_wakeup_cpu: not first boot!(%d)\n", cpu);
+// printk("mt_wakeup_cpu: not first boot!(%d)\n", cpu);
//mt65xx_reg_sync_writel(virt_to_phys(mt_secondary_startup), BOOT_ADDR);
// fixme, to replace SMC with parameter of ns_slave_boot_addr
mt_secure_call(MC_FC_SET_RESET_VECTOR, virt_to_phys(mt_secondary_startup), cpu, 0);
diff --git a/arch/arm/mach-mt8127/mt_dbg.c b/arch/arm/mach-mt8127/mt_dbg.c
index 3391891a..14ad42e1 100644
--- a/arch/arm/mach-mt8127/mt_dbg.c
+++ b/arch/arm/mach-mt8127/mt_dbg.c
@@ -71,7 +71,7 @@ regs_hotplug_callback(struct notifier_block *nfb, unsigned long action, void *hc
// printk(KERN_ALERT "In hotplug callback\n");
int i;
unsigned int cpu = (unsigned int) hcpu;
- printk("regs_hotplug_callback cpu = %d\n", cpu);
+// printk("regs_hotplug_callback cpu = %d\n", cpu);
switch (action) {
case CPU_ONLINE:
case CPU_ONLINE_FROZEN:
diff --git a/drivers/misc/mediatek/wdk/wd_api.c b/drivers/misc/mediatek/wdk/wd_api.c
index c382f7a7..b94fcf7a 100644
--- a/drivers/misc/mediatek/wdk/wd_api.c
+++ b/drivers/misc/mediatek/wdk/wd_api.c
@@ -88,7 +88,7 @@ static int wd_cpu_hot_plug_on_notify(int cpu)
int res = 0;
wk_cpu_update_bit_flag(cpu, 1);
mtk_wdt_restart(WD_TYPE_NOLOCK); /* for KICK external wdt */
- printk("WD wd_cpu_hot_plug_on_notify kick ext wd\n");
+// printk("WD wd_cpu_hot_plug_on_notify kick ext wd\n");
return res;
}
diff --git a/drivers/misc/mediatek/wdk/wd_common_drv.c b/drivers/misc/mediatek/wdk/wd_common_drv.c
index aecc3081..36ba4773 100644
--- a/drivers/misc/mediatek/wdk/wd_common_drv.c
+++ b/drivers/misc/mediatek/wdk/wd_common_drv.c
@@ -230,7 +230,7 @@ void kicker_cpu_bind(int cpu)
//kthread_bind(wk_tsk[cpu], cpu);
WARN_ON_ONCE(set_cpus_allowed_ptr(wk_tsk[cpu], cpumask_of(cpu)) < 0);
- printk("[wdk]bind kicker thread[%d] to cpu[%d]\n",wk_tsk[cpu]->pid,cpu);
+// printk("[wdk]bind kicker thread[%d] to cpu[%d]\n",wk_tsk[cpu]->pid,cpu);
wake_up_process(wk_tsk[cpu]);
}
}
@@ -570,7 +570,7 @@ static int __cpuinit wk_cpu_callback(struct notifier_block *nfb, unsigned long a
mpcore_wdt_restart(WD_TYPE_NORMAL);
#endif
- printk("[WDK]cpu %d plug on kick wdt\n", hotcpu);
+// printk("[WDK]cpu %d plug on kick wdt\n", hotcpu);
break;
#ifdef CONFIG_HOTPLUG_CPU
#ifdef CONFIG_LOCAL_WDT
@@ -584,14 +584,14 @@ static int __cpuinit wk_cpu_callback(struct notifier_block *nfb, unsigned long a
mtk_wdt_restart(WD_TYPE_NORMAL); /* for KICK external wdt */
#ifdef CONFIG_LOCAL_WDT
- printk("[WDK]cpu %d plug off kick local wdt\n", hotcpu);
+// printk("[WDK]cpu %d plug off kick local wdt\n", hotcpu);
/* kick local wdt */
/* mpcore_wdt_restart(WD_TYPE_NORMAL); */
/* disable local watchdog */
mpcore_wk_wdt_stop();
#endif
wk_cpu_update_bit_flag(hotcpu, 0);
- printk("[WDK]cpu %d plug off, kick wdt\n", hotcpu);
+// printk("[WDK]cpu %d plug off, kick wdt\n", hotcpu);
break;
#endif /* CONFIG_HOTPLUG_CPU */
}
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index fb958294..43e3e69d 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4197,12 +4197,12 @@ recheck:
return -EINVAL;
}
- if(rt_policy(policy)){
- if (!check_mt_allow_rt((struct sched_param *)param)){
- printk("[RT_MONITOR]WARNNING [%d:%s] SET NOT ALLOW RT Prio [%d] for proc [%d:%s]\n", current->pid, current->comm, param->sched_priority, p->pid, p->comm);
- //dump_stack();
- }
- }
+// if(rt_policy(policy)){
+// if (!check_mt_allow_rt((struct sched_param *)param)){
+// printk("[RT_MONITOR]WARNNING [%d:%s] SET NOT ALLOW RT Prio [%d] for proc [%d:%s]\n", current->pid, current->comm, param->sched_priority, p->pid, p->comm);
+// //dump_stack();
+// }
+// }
/*
* Valid priorities for SCHED_FIFO and SCHED_RR are

View file

@ -0,0 +1,26 @@
diff --git a/drivers/misc/mediatek/i2c/mt8127/i2c.c b/drivers/misc/mediatek/i2c/mt8127/i2c.c
index 328e6867..4934a19e 100644
--- a/drivers/misc/mediatek/i2c/mt8127/i2c.c
+++ b/drivers/misc/mediatek/i2c/mt8127/i2c.c
@@ -54,6 +54,7 @@ static mt_i2c *g_i2c[2];
#endif
/***********************************i2c debug********************************************************/
//#define I2C_DEBUG_FS
+#undef I2C_DEBUG_FS
#ifdef I2C_DEBUG_FS
#define PORT_COUNT 7
#define MESSAGE_COUNT 16
@@ -367,10 +368,12 @@ static S32 _i2c_deal_result(mt_i2c *i2c)
I2CERR("I2C_HS_NACKERR\n");
if (i2c->irq_stat & I2C_ACKERR)
I2CERR("I2C_ACKERR\n");
+ #ifdef I2C_DEBUG_FS
if (i2c->filter_msg==FALSE) //TEST
{
_i2c_dump_info(i2c);
- }
+ }
+ #endif
spin_lock(&i2c->lock);
/*Reset i2c port*/

View file

@ -0,0 +1,13 @@
diff --git a/drivers/misc/mediatek/video/mt8127/mtkfb.c b/drivers/misc/mediatek/video/mt8127/mtkfb.c
index 50bfbcd0..238f09d2 100644
--- a/drivers/misc/mediatek/video/mt8127/mtkfb.c
+++ b/drivers/misc/mediatek/video/mt8127/mtkfb.c
@@ -63,6 +63,8 @@
//#undef pr_info
//#define pr_info printk
+#undef pr_info
+#define pr_info(fmt, args...) do {} while (0)
unsigned int EnableVSyncLog = 0;

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,27 @@
diff --git a/drivers/thermal/virtual_sensor_thermal.c b/drivers/thermal/virtual_sensor_thermal.c
index d3f7265a..1fb47593 100644
--- a/drivers/thermal/virtual_sensor_thermal.c
+++ b/drivers/thermal/virtual_sensor_thermal.c
@@ -186,14 +186,14 @@ static int virtual_sensor_thermal_get_temp(struct thermal_zone_device *thermal,
log_to_metrics(ANDROID_LOG_INFO, "ThermalEvent", buf);
}
#endif
- if (0 == sec_counter)
- pr_warning("%s %s t=%ld a=%d o=%d w=%d\n",
- __func__,
- tdev->name,
- temp,
- alpha,
- offset,
- weight);
+// if (0 == sec_counter)
+// pr_warning("%s %s t=%ld a=%d o=%d w=%d\n",
+// __func__,
+// tdev->name,
+// temp,
+// alpha,
+// offset,
+// weight);
if (!tdev->off_temp)
tdev->off_temp = temp - offset;

View file

@ -0,0 +1,20 @@
diff --git a/include/linux/time_log.h b/include/linux/time_log.h
index 1770e9bc..471f4889 100644
--- a/include/linux/time_log.h
+++ b/include/linux/time_log.h
@@ -2,7 +2,7 @@
#include <linux/types.h>
extern bool printk_disable_uart;
-#if 1
+#if 0
#define TIME_LOG_START() \
{ \
unsigned long long _start_time = 0; \
@@ -28,4 +28,4 @@ extern bool printk_disable_uart;
#else
#define TIME_LOG_START() do{} while(0)
#define TIME_LOG_END(X...) do{} while(0)
-#endif
\ No newline at end of file
+#endif

View file

@ -0,0 +1,22 @@
diff --git a/drivers/misc/mediatek/trustzone/tz_secure_clock.c b/drivers/misc/mediatek/trustzone/tz_secure_clock.c
index 19311916..4094b26d 100644
--- a/drivers/misc/mediatek/trustzone/tz_secure_clock.c
+++ b/drivers/misc/mediatek/trustzone/tz_secure_clock.c
@@ -184,7 +184,7 @@ if (err) {
}
rtc_tm_to_time(&tm, &time_count);
-#if 1
+#if 0
pr_notice("securetime increase result: %d %d %d %d %d %d %d\n", tm.tm_yday, tm.tm_year, tm.tm_mon
, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec);
#endif
@@ -194,7 +194,7 @@ ret = KREE_TeeServiceCall(session, TZCMD_SECURETIME_INC_CURRENT_COUNTER, paramTy
if (ret != TZ_RESULT_SUCCESS)
pr_err("ServiceCall error %d\n", ret);
-#if 1
+#if 0
pr_notice("securetime increase result: %d %d %d %d %d %d %d\n", ((struct TM_GB *) shm_p)->tm_yday
, ((struct TM_GB *) shm_p)->tm_year, ((struct TM_GB *) shm_p)->tm_mon, ((struct TM_GB *) shm_p)->tm_mday
, ((struct TM_GB *) shm_p)->tm_hour, ((struct TM_GB *) shm_p)->tm_min, ((struct TM_GB *) shm_p)->tm_sec);

View file

@ -0,0 +1,26 @@
diff --git a/drivers/misc/mediatek/uart/mt8127/platform_uart.c b/drivers/misc/mediatek/uart/mt8127/platform_uart.c
index 35f126d8..ba601f67 100644
--- a/drivers/misc/mediatek/uart/mt8127/platform_uart.c
+++ b/drivers/misc/mediatek/uart/mt8127/platform_uart.c
@@ -1749,7 +1749,7 @@ void mtk_uart_enable_sleep(struct mtk_uart *uart)
{
u32 base = uart->base;
reg_sync_writel(0x1, UART_SLEEP_EN);
- printk("SLEEP_EN = 0x%x\n",UART_READ32(UART_SLEEP_EN));
+// printk("SLEEP_EN = 0x%x\n",UART_READ32(UART_SLEEP_EN));
}
/*---------------------------------------------------------------------------*/
void mtk_uart_init_debug_spinlock(void)
diff --git a/drivers/misc/mediatek/uart/uart.c b/drivers/misc/mediatek/uart/uart.c
index 8bcec9e1..b49df4d2 100644
--- a/drivers/misc/mediatek/uart/uart.c
+++ b/drivers/misc/mediatek/uart/uart.c
@@ -1837,7 +1837,7 @@ static void mtk_uart_set_termios(struct uart_port *port,
printk(KERN_NOTICE "MTK Software Flow Control\n");
mode = UART_FC_SW;
} else if (termios->c_iflag & (IXON | IXOFF | IXANY)) {
- printk(KERN_NOTICE "Linux default SW Flow Control\n");
+// printk(KERN_NOTICE "Linux default SW Flow Control\n");
mode = UART_FC_NONE;
} else {
printk(KERN_NOTICE "No Flow Control\n");

View file

@ -0,0 +1,87 @@
diff --git a/drivers/misc/mediatek/usb20/mt8127/usb20.c b/drivers/misc/mediatek/usb20/mt8127/usb20.c
index 79ecf1df..71008702 100644
--- a/drivers/misc/mediatek/usb20/mt8127/usb20.c
+++ b/drivers/misc/mediatek/usb20/mt8127/usb20.c
@@ -40,6 +40,8 @@
#include <linux/metricslog.h>
#endif
+#define DBG(fmt, args...) do {} while (0)
+
extern struct musb *mtk_musb;
static DEFINE_SEMAPHORE(power_clock_lock);
//static bool platform_init_first = true; //Mark by ALPS01262215
@@ -283,7 +285,7 @@ void mt_usb_connect(void)
void mt_usb_disconnect(void)
{
- printk("[MUSB] USB is ready for disconnect\n");
+// printk("[MUSB] USB is ready for disconnect\n");
if (!mtk_musb || !mtk_musb->is_ready || mtk_musb->is_host || !mtk_musb->power)
return;
diff --git a/drivers/misc/mediatek/usb20/mt8127/usb20_host.c b/drivers/misc/mediatek/usb20/mt8127/usb20_host.c
index 668b410a..a2e90005 100644
--- a/drivers/misc/mediatek/usb20/mt8127/usb20_host.c
+++ b/drivers/misc/mediatek/usb20/mt8127/usb20_host.c
@@ -38,6 +38,8 @@
#include <linux/metricslog.h>
#endif
+#define DBG(fmt, args...) do {} while (0)
+
extern struct musb *mtk_musb;
static struct musb_fifo_cfg fifo_cfg_host[] = {
diff --git a/drivers/misc/mediatek/usb20/mt8127/usb20_otg_if.c b/drivers/misc/mediatek/usb20/mt8127/usb20_otg_if.c
index e8d4c269..8d154d93 100644
--- a/drivers/misc/mediatek/usb20/mt8127/usb20_otg_if.c
+++ b/drivers/misc/mediatek/usb20/mt8127/usb20_otg_if.c
@@ -50,6 +50,8 @@
#include <linux/musb/musb_core.h>
+#define DBG(fmt, args...) do {} while (0)
+
#define DRIVER_AUTHOR "Mediatek"
#define DRIVER_DESC "driver for OTG USB-IF test"
#define MUSB_OTG_CSR0 0x102
diff --git a/drivers/misc/mediatek/usb20/musb_core.c b/drivers/misc/mediatek/usb20/musb_core.c
index 13b65ffe..a9a95dbd 100644
--- a/drivers/misc/mediatek/usb20/musb_core.c
+++ b/drivers/misc/mediatek/usb20/musb_core.c
@@ -111,6 +111,8 @@
#include <linux/musb/mtk_musb.h>
#endif
+#define DBG(fmt, args...) do {} while (0)
+
int musb_host_dynamic_fifo = 1;
int musb_host_dynamic_fifo_usage_msk;
module_param(musb_host_dynamic_fifo, int, 0644);
diff --git a/drivers/misc/mediatek/usb20/musb_gadget.c b/drivers/misc/mediatek/usb20/musb_gadget.c
index c4d0c594..62ccf3fe 100644
--- a/drivers/misc/mediatek/usb20/musb_gadget.c
+++ b/drivers/misc/mediatek/usb20/musb_gadget.c
@@ -50,6 +50,8 @@
#include <linux/musb/musb_core.h>
+#define DBG(fmt, args...) do {} while (0)
+
#define FIFO_START_ADDR 512
//#define RX_DMA_MODE1 1
diff --git a/drivers/misc/mediatek/usb20/musb_host.c b/drivers/misc/mediatek/usb20/musb_host.c
index 7c97b9a0..d121bb95 100644
--- a/drivers/misc/mediatek/usb20/musb_host.c
+++ b/drivers/misc/mediatek/usb20/musb_host.c
@@ -48,6 +48,8 @@
#include <linux/musb/musb_core.h>
#include <linux/musb/musb_host.h>
+#define DBG(fmt, args...) do {} while (0)
+
/* MUSB HOST status 22-mar-2006
*

View file

@ -0,0 +1,13 @@
diff --git a/drivers/misc/mediatek/video/mt8127/mt8127/dpi_drv.c b/drivers/misc/mediatek/video/mt8127/mt8127/dpi_drv.c
index 2a663ddf..e77e6477 100644
--- a/drivers/misc/mediatek/video/mt8127/mt8127/dpi_drv.c
+++ b/drivers/misc/mediatek/video/mt8127/mt8127/dpi_drv.c
@@ -218,7 +218,7 @@ static irqreturn_t _DPI_InterruptHandler(int irq, void *dev_id)
dpi_vsync_irq_count++;
if(dpi_vsync_irq_count > 120)
{
- printk("dpi vsync\n");
+// printk("dpi vsync\n");
dpi_vsync_irq_count = 0;
}
if(dpiIntCallback)