Both the watchdog and various parts of the kernel related to the battery produce excess amounts of uninteresting output, particularly while there is a USB cable plugged in, such as when using USB networking. We remove some of this spurious output to make things more manageable.
Signed-off-by: Bob Ham <bob....@collabora.com> --- .../linux/linux-samsung-i9300/battery-quiet.patch | 151 +++++++++++++++++++++ .../linux/linux-samsung-i9300/watchdog-quiet.patch | 33 +++++ .../linux/linux-samsung-i9300_git.bb | 2 + 3 files changed, 186 insertions(+) create mode 100644 meta-samsung/recipes-kernel/linux/linux-samsung-i9300/battery-quiet.patch create mode 100644 meta-samsung/recipes-kernel/linux/linux-samsung-i9300/watchdog-quiet.patch diff --git a/meta-samsung/recipes-kernel/linux/linux-samsung-i9300/battery-quiet.patch b/meta-samsung/recipes-kernel/linux/linux-samsung-i9300/battery-quiet.patch new file mode 100644 index 0000000..3d101c5 --- /dev/null +++ b/meta-samsung/recipes-kernel/linux/linux-samsung-i9300/battery-quiet.patch @@ -0,0 +1,151 @@ +Quieten kernel output from battery events. When connected over USB, +the kernel log becomes saturated with excessive output so we remove +lots of print statements to make it more manageable. + +Bob Ham <bob....@collabora.com> +Index: git/drivers/battery/max77693_charger.c +=================================================================== +--- git.orig/drivers/battery/max77693_charger.c ++++ git/drivers/battery/max77693_charger.c +@@ -1544,7 +1544,6 @@ static irqreturn_t max77693_charger_irq( + u8 dtls_00, thm_dtls, chgin_dtls; + u8 dtls_01, chg_dtls, bat_dtls; + u8 mu_st2, vbvolt; +- pr_info("%s: irq(%d)\n", __func__, irq); + + mutex_lock(&chg_data->irq_lock); + +@@ -1594,10 +1593,6 @@ static irqreturn_t max77693_charger_irq( + MAX77693_MUIC_REG_STATUS2, &mu_st2); + vbvolt = ((mu_st2 & MAX77693_VBVOLT) >> + MAX77693_VBVOLT_SHIFT); +- pr_info("%s: INT_OK(0x%x), THM(0x%x), CHGIN(0x%x), CHG(0x%x), BAT(0x%x), " +- "ST2(0x%x)\n", __func__, +- int_ok, thm_dtls, chgin_dtls, +- chg_dtls, bat_dtls, mu_st2); + + #if defined(USE_CHGIN_INTR) + if (((chgin_dtls == 0x0) || (chgin_dtls == 0x1)) && +Index: git/drivers/mfd/max77693-irq.c +=================================================================== +--- git.orig/drivers/mfd/max77693-irq.c ++++ git/drivers/mfd/max77693-irq.c +@@ -183,13 +183,11 @@ clear_retry: + ret); + return IRQ_NONE; + } +- pr_info("%s: interrupt source(0x%02x)\n", __func__, irq_src); + + if (irq_src & MAX77693_IRQSRC_CHG) { + /* CHG_INT */ + ret = max77693_read_reg(max77693->i2c, MAX77693_CHG_REG_CHG_INT, + &irq_reg[CHG_INT]); +- pr_info("%s: charger interrupt(0x%02x)\n", __func__, irq_reg[CHG_INT]); + } + + if (irq_src & MAX77693_IRQSRC_TOP) { +Index: git/drivers/battery/max17047_fuelgauge.c +=================================================================== +--- git.orig/drivers/battery/max17047_fuelgauge.c ++++ git/drivers/battery/max17047_fuelgauge.c +@@ -290,7 +290,6 @@ static int max17047_get_soc(struct i2c_c + soc = fg_data->soc = + ((rawsoc < empty) ? 0 : (min((rawsoc * 100 / fullsoc), 100))); + +- pr_info("%s: SOC(%d, %d / %d)\n", __func__, soc, rawsoc, fullsoc); + return soc; + } + +@@ -641,7 +640,6 @@ static int max17047_set_property(struct + case POWER_SUPPLY_PROP_STATUS: + if (val->intval != POWER_SUPPLY_STATUS_FULL) + return -EINVAL; +- pr_info("%s: charger full state!\n", __func__); + /* adjust full soc */ + max17047_adjust_fullsoc(fg_data->client); + break; +Index: git/drivers/battery/samsung_battery.c +=================================================================== +--- git.orig/drivers/battery/samsung_battery.c ++++ git/drivers/battery/samsung_battery.c +@@ -710,9 +710,6 @@ static void battery_monitor_interval(str + + /* apply monitor interval weight */ + if (info->monitor_weight != 100) { +- pr_info("%s: apply weight(%d), %d -> %d\n", __func__, +- info->monitor_weight, info->monitor_interval, +- (info->monitor_interval * info->monitor_weight / 100)); + info->monitor_interval *= info->monitor_weight; + info->monitor_interval /= 100; + } +@@ -1376,7 +1373,6 @@ static void battery_interval_calulation( + + /* 5 times after boot, apply no interval (1 sec) */ + if (info->monitor_count < 5) { +- pr_info("%s: now in booting, set 1s\n", __func__); + info->monitor_mode = MONITOR_EMER_LV1; /* dummy value */ + return; + } +@@ -1406,8 +1402,6 @@ static void battery_interval_calulation( + ABS(info->battery_v_diff), info->monitor_weight); + } else if ((ABS(info->battery_v_diff)) < 50000) { + info->monitor_weight += 20; +- pr_info("%s: v diff(%d), weight(%d)\n", __func__, +- ABS(info->battery_v_diff), info->monitor_weight); + } + + /* +@@ -1459,9 +1453,6 @@ static void battery_interval_calulation( + + /* prevent too low or too high weight, 10 ~ 150% */ + info->monitor_weight = MIN(MAX(info->monitor_weight, 10), 150); +- +- if (info->monitor_weight != 100) +- pr_info("%s: weight(%d)\n", __func__, info->monitor_weight); + } + + static void battery_monitor_work(struct work_struct *work) +@@ -1690,43 +1681,6 @@ monitor_finish: + + power_supply_changed(&info->psy_bat); + +- pr_info("[%d] bat: s(%d, %d), v(%d, %d), " +- "t(%d.%d), " +- "cs(%d, %d), cb(%d), cr(%d, %d)", +- ++info->monitor_count, +- info->battery_soc, +- info->battery_r_s_delta, +- info->battery_vcell / 1000, +- info->battery_v_diff / 1000, +- info->battery_temper / 10, info->battery_temper % 10, +- info->charge_real_state, +- info->charge_virt_state, +- info->cable_type, +- info->charge_current, +- info->input_current); +- +- if (info->battery_present == 0) +- pr_cont(", b(%d)", info->battery_present); +- if (info->battery_health != POWER_SUPPLY_HEALTH_GOOD) +- pr_cont(", h(%d)", info->battery_health); +- if (info->abstimer_state == 1) +- pr_cont(", a(%d)", info->abstimer_state); +- if (info->abstimer_active) +- pr_cont(", aa(%d)", info->abstimer_active); +- if (info->full_charged_state != STATUS_NOT_FULL) +- pr_cont(", f(%d)", info->full_charged_state); +- if (info->recharge_phase == 1) +- pr_cont(", r(%d)", info->recharge_phase); +- if (info->charge_start_time != 0) +- pr_cont(", t(%d)", ((int)info->current_time.tv_sec - +- info->charge_start_time)); +- if (info->event_state != EVENT_STATE_CLEAR) +- pr_cont(", e(%d, 0x%04x)", info->event_state, info->event_type); +- if (info->siop_state) +- pr_cont(", op(%d, %d)", info->siop_state, info->siop_lv); +- +- pr_cont("\n"); +- + /* check current_avg */ + if (info->charge_current_avg < 0) + pr_info("%s: charging but discharging, power off\n", __func__); diff --git a/meta-samsung/recipes-kernel/linux/linux-samsung-i9300/watchdog-quiet.patch b/meta-samsung/recipes-kernel/linux/linux-samsung-i9300/watchdog-quiet.patch new file mode 100644 index 0000000..358a637 --- /dev/null +++ b/meta-samsung/recipes-kernel/linux/linux-samsung-i9300/watchdog-quiet.patch @@ -0,0 +1,33 @@ +Quieten kernel output from watchdog events. As with the battery, the +watchdog produces excessive output so we remove lots of print +statements. + +Bob Ham <bob....@collabora.com> +Index: git/arch/arm/mach-exynos/sec_watchdog.c +=================================================================== +--- git.orig/arch/arm/mach-exynos/sec_watchdog.c ++++ git/arch/arm/mach-exynos/sec_watchdog.c +@@ -69,7 +69,6 @@ static spinlock_t wdt_lock; + #if defined(PET_BY_WORKQUEUE) + static void watchdog_workfunc(struct work_struct *work) + { +- pr_info("%s kicking...%x\n", __func__, readl(S3C2410_WTCNT)); + writel(watchdog_reset * TPS, S3C2410_WTCNT); + queue_delayed_work_on(0, watchdog_wq, &watchdog_work, + watchdog_pet * HZ); +@@ -77,7 +76,6 @@ static void watchdog_workfunc(struct wor + #elif defined(PET_BY_DIRECT_TIMER) + static void pet_watchdog_timer_fn(unsigned long data) + { +- pr_info("%s kicking...%x\n", __func__, readl(S3C2410_WTCNT)); + writel(watchdog_reset * TPS, S3C2410_WTCNT); + pet_watchdog_timer.expires += watchdog_pet * HZ; + add_timer_on(&pet_watchdog_timer, 0); +@@ -85,7 +83,6 @@ static void pet_watchdog_timer_fn(unsign + #else + static enum hrtimer_restart watchdog_timerfunc(struct hrtimer *timer) + { +- pr_info("%s kicking...%x\n", __func__, readl(S3C2410_WTCNT)); + writel(watchdog_reset * TPS, S3C2410_WTCNT); + hrtimer_start(&watchdog_timer, + ktime_set(watchdog_pet, 0), HRTIMER_MODE_REL); diff --git a/meta-samsung/recipes-kernel/linux/linux-samsung-i9300_git.bb b/meta-samsung/recipes-kernel/linux/linux-samsung-i9300_git.bb index 99b840a..90b768f 100644 --- a/meta-samsung/recipes-kernel/linux/linux-samsung-i9300_git.bb +++ b/meta-samsung/recipes-kernel/linux/linux-samsung-i9300_git.bb @@ -12,6 +12,8 @@ inherit kernel_android SRC_URI = " \ git://github.com/CyanogenMod/android_kernel_samsung_smdk4412.git;protocol=git;branch=cm-13.0 \ + file://battery-quiet.patch \ + file://watchdog-quiet.patch \ " S = "${WORKDIR}/git" -- 2.1.4 _______________________________________________ Shr-devel mailing list Shr-devel@lists.shr-project.org http://lists.shr-project.org/mailman/listinfo/shr-devel