Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9df64c18 authored by Liangliang Lu's avatar Liangliang Lu Committed by Ram Prakash Gupta
Browse files

mmc: mmc-debugfs: Add debug fs entry for mmc driver



This change adds support to allow user space query if low level eMMC
driver has encountered any error or not, this state can be read/cleared
via debugfs.

mmc: mmc-debugfs: add error statistics

This change adds support to allow user-space to query the number of
occurrence of the different type of errors that low-level mmc driver
has encountered. These stats can be read/cleared via debugfs.

mmc: debugfs: add debugfs entry to force raise host errors

The SDHC spec allows to force raise errors that is useful for
debugging error handler routines. Add debugfs entry force_error
to trigger host errors from userspace. Check SDHCI_SET_INT_ERROR
register for error bitmask info.

Usage: echo 0x1 > /sys/kernel/debug/mmcX/force_error
X - denotes the slot id

mmc: debugfs: fix unclocked register access by force_error

When echo values to debugfs entry force_error, unclocked
register access error would be detected. This change fixes
it by making sure the host is powered up and host clock is
ticking before access force event register for error
interrupt status.

mmc: core: Add a new debugfs entry.

Added a new debugfs entry to support for crashing
the system upon an error.
The default value of this debugfs entry is 'N'.
This  need to set true('Y'), to bugon upon an error.

Path to this debugfs entry to echo 'Y'/'N' is
/sys/kernel/debug/mmc0/crash_on_err for eMMC and
/sys/kernle/debug/mmc1/crash_on_err for SD card.

Change-Id: Ie7c79fb235b4882d73bb10193930418bd614ceaa
Signed-off-by: default avatarVenkat Gopalakrishnan <venkatg@codeaurora.org>
[subhashj@codeaurora.org: fixed trivial merge conflicts]
Signed-off-by: default avatarSubhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: default avatarCan Guo <cang@codeaurora.org>
Signed-off-by: default avatarLiangliang Lu <luliang@codeaurora.org>
Signed-off-by: default avatarSayali Lokhande <sayalil@codeaurora.org>
Signed-off-by: default avatarVeerabhadrarao Badiganti <vbadigan@codeaurora.org>
Signed-off-by: default avatarPradeep P V K <ppvk@codeaurora.org>
Signed-off-by: default avatarRam Prakash Gupta <rampraka@codeaurora.org>
parent 1aacdcf9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment