Call cpr3_panic_notifier_init() when cpr3_parse_common_ctrl_data()
is called for CPRh controllers. This allows dumping registers during
a kernel panic when CPRh controller devices specify panic register
configuration.
CRs-Fixed: 1033060
Change-Id: I437fe28725d5c1ed06fe8b9735b04bbd84e92db1
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
Add panic handler to dump a few critical CPR registers when device
crashes due to kernel panic errors.
CRs-Fixed: 1004533
Change-Id: Id01b4f959c134af48c509ade61c7ec46401b4e70
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
SMEM_SMEM_STATIC_LOG_EVENTS is currently unused as its usecase has
been deprecated for a long time. Reallocate the ID to
SMEM_CHARGER_BATTERY_INFO.
CRs-Fixed: 1032131
Change-Id: I35a8307001ac14e3ade733d5f41d6231fe63ebd0
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
The GMEM GX clamp should be set to the active state before
turning off the gdsc_gpu_gx.
CRs-Fixed: 1027772
Change-Id: I5bb97734a2402e763836250c3ce6f7fc308c20a6
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Add support to enable/disable the alpha pll using hwfsm
Also add support for initial configuration (needs to be split)
Change-Id: Ifc2fe0539b943e850681143da76da27274203ed2
Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Add support for configuring rates of, enabling, and disabling
Alpha PLLs. This is sufficient for the types of PLLs found in
the global and multimedia clock controllers.
Change-Id: I0d26e8f6d225cc3669f3a9e3c37b45e49e139879
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Add all RPM clock data for msm8996 family of devices
ToDo: Adapt to changes needed for RPM over GLINK against
RPM over SMD that the driver currently supports
Change-Id: Ib095af601a4f03d866cf94c8e277d04630abb42b
Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
This adds initial support for clocks controlled by the Resource
Power Manager (RPM) processor on some Qualcomm SoCs, which use
the qcom_rpm driver to communicate with RPM.
Such platforms are apq8064 and msm8960.
Change-Id: I1a73355bc9117c34589a25cf58446cad13ceb6e3
(cherry picked from commit 06d998a24c68be94685af38e8becfda3c8bf757b)
Git-commit: 06d998a24c68be94685af38e8becfda3c8bf757b
Git-repo: https://git.linaro.org/landing-teams/working/qualcomm/kernel.git
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
This adds initial support for clocks controlled by the Resource
Power Manager (RPM) processor on some Qualcomm SoCs, which use
the qcom_smd_rpm driver to communicate with RPM.
Such platforms are msm8916, apq8084 and msm8974.
The RPM is a dedicated hardware engine for managing the shared
SoC resources in order to keep the lowest power profile. It
communicates with other hardware subsystems via shared memory
and accepts clock requests, aggregates the requests and turns
the clocks on/off or scales them on demand.
This driver is based on the codeaurora.org driver:
https://www.codeaurora.org/cgit/quic/la/kernel/msm-3.10/tree/drivers/clk/qcom/clock-rpm.c
Change-Id: I8d2882de9410a992a8045caedc7ab71e3c3e45b2
(cherry picked from commit 69edeaf51c07c24e06b433762b3ada7b3d786315)
Git-commit: 69edeaf51c07c24e06b433762b3ada7b3d786315
Git-repo: https://git.linaro.org/landing-teams/working/qualcomm/kernel.git
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Add a driver for the A53 subsystem PLL, so that we can provide higher
frequency clocks for use by the system.
Change-Id: I69b4c363c8b656bcd9481b6310a972b8140311a9
(cherry picked from commit 60e4f862c16dfc995a71ec0f50524e020dbfde2f)
Git-commit: 60e4f862c16dfc995a71ec0f50524e020dbfde2f
Git-repo: https://git.linaro.org/landing-teams/working/qualcomm/kernel.git
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
The Krait CPU clocks are made up of a primary mux and secondary
mux for each CPU and the L2, controlled via cp15 accessors. For
Kraits within KPSSv1 each secondary mux accepts a different aux
source, but on KPSSv2 each secondary mux accepts the same aux
source.
Change-Id: I871de8d291f5c1b848b215766c61b8bd0ed98f77
Cc: <devicetree@vger.kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Taniya Das <tdas@codeaurora.org>
TZ hdcp2p2 app interface has changed to include device,
session commands and version control. Update hdcp driver
to align.
CRs-Fixed: 1027108
Change-Id: I4acdad2f243ea32f6ce10b6c0064ef2a5262fab2
Signed-off-by: Shivaprasad Hongal <shongal@codeaurora.org>
Update using the default value of 1024 for decimation ratio
on VADC channels for msmcobalt. A smaller value may reduce
the time it takes for measurement but may include noise.
Change-Id: Id8952c4565dd95b154165c9f8e307e74bdbd443e
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Fix edge ctrl mask interface for DSB subunit to accept DSB event ranges
in both hexadecimal and decimal format.
Change-Id: Ibe650067fc30a65defa2c0e76ef5526235980f72
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
Add APSS CTIs on msmcobalt. These devices can be used to configure CTIs
for LMH and OLC blocks.
Change-Id: I76de8cd4c1d26015b26524e445d6a5ba00ce2a43
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
On an ARM64 arch this register is used by ETR to find correct location
of buffer in memory.
Change-Id: Ie0aa7932e46f63969ba85cb0dc4855b3b267f2d6
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
Add stricky enable flag to avoid reading TMC buffer before enabling TMC
at least once.
Change-Id: Iccb6338ef4fce25830f27541f5f22cfcad7264ae
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
'read_count' is used to reference count simultaneous TMC read requests.
This count should reset to zero in case tmc_read_preapare fails.
Change-Id: Iaded781ee76ec3b079ac9cd9d551bdfb42834fd9
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
The aggre NoC clocks are controlled by RPM and until now,
HLOS has only had to enable/disable the resource when
required. Due to a new requirement, enable support to
scale these resources as well.
Change-Id: I3b141d62f6c3b479d8d61ae7829e9f5ca72a3886
CRs-Fixed: 1030966
Signed-off-by: Deepak Katragadda <dkatraga@codeaurora.org>
Timeout error is observed while waiting for
ADM_CMD_SET_PP_PARAMS_V5 command's response.
Fix the condition logic in wait_event_timeout()
to match the value set in adm_callback() when
response to ADM_CMD_SET_PP_PARAMS_V5 is received.
CRs-Fixed: 1030674
Change-Id: I711c860dc3de479eec0d22369d19615aef572ea1
Signed-off-by: Karthik Reddy Katta <a_katta@codeaurora.org>
On some devices TMC registers are not preserved across reset. Add
support to save TMC registers to read TMC buffer after a crash.
Change-Id: I5fb7e870ddece35159d1fe465d4b70d2a4c1ec35
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
Set the stream open flag immediately after the
stream is opened to ensure correct closure of
the stream if there is an error condition.
Change-Id: I61faf6ddf99ab504e492a4e37d577b67acf99f09
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
Enable use of noirq (i.e pull mode and push mode)
playback and capture.
CRs-Fixed: 992798
Change-Id: I98e68c2a485783be3c2b3eaa62577759d7e21d82
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
Add capture support to MultiMedia3 frontend.
CRs-Fixed: 992798
Change-Id: Ie21a1c4a73c354a6dc1e733e6d2ac653f85f7647
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
This patch adds stuff about new reclaim field in proc.txt
Change-Id: I1718fad12ec078e204e7a59769ce70fad7708756
Acked-by: Rob Landley <rob@landley.net>
Signed-off-by: Minchan Kim <minchan@kernel.org>
Patch-mainline: linux-mm @ 9 May 2013 16:21:29
[vinmenon@codeaurora.org: trivial merge conflict fixes]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Add new pcm device node to use in the ultra low latency
path in noirq mode.
Change-Id: I8a7bd938fc8eeeec5cd943e7445784559f13e05e
CRs-Fixed: 992798
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
Implement platform drivers to support shared memory based
pcm playback and capture.
Change-Id: I882c67ae1c3d950b98bd002ac384cc3a7e77874a
CRs-Fixed: 992798
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
Since a CPU may go offline after cpu_active_mask is used
to query active CPUs, set_cpus_allowed_ptr might inadverntently
pass an invalid cpu number to move_queued_task.
Fix this by ensuring that the cpumask op that uses cpu_active_mask
checks the return value.
CRs-Fixed: 1029014
Change-Id: Id43a629b40b72cc47773e4027d30953b3a94058d
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
IPA RM dependencies are added both by kernel drivers and by
userspace application (IPACM), depending on the use case.
On rare condition, a race is possible between adding the dependency
and deleting it, which results in a bad state of the dependency graph.
This change makes sure that dependency is deleted only if it was added
by the same entity.
CRs-Fixed: 1027773
Change-Id: I9253469887b8913f6f2c513a6c7043ed60400b8a
Acked-by Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
cpufreq_table_validate_and_show() is created as a standard way to
initialize frequency for a policy and assign freq_table. Use this new
API to assign freq_table.
CRs-Fixed: 1024229
Change-Id: Iac3a9394790e140492c5c0c0ad6d068840bfffa4
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
This patch adds address range reclaim of a process.
The requirement is following as,
Like webkit1, it uses a address space for handling multi tabs.
IOW, it uses *one* process model so all tabs shares address space
of the process. In such scenario, per-process reclaim is rather
coarse-grained so this patch supports more fine-grained reclaim
for being able to reclaim target address range of the process.
For reclaim target range, you should use following format.
echo [addr] [size-byte] > /proc/pid/reclaim
The addr should be page-aligned.
So now reclaim konb's interface is following as.
echo file > /proc/pid/reclaim
reclaim file-backed pages only
echo anon > /proc/pid/reclaim
reclaim anonymous pages only
echo all > /proc/pid/reclaim
reclaim all pages
echo 0x100000 8K > /proc/pid/reclaim
reclaim pages in (0x100000 - 0x102000)
Change-Id: I111131d31be1cfcfa246617b634a9a8bc4078098
Signed-off-by: Minchan Kim <minchan@kernel.org>
Patch-mainline: linux-mm @ 9 May 2013 08:39:01
[vinmenon@codeaurora.org: trivial merge conflict fixes]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Some pages could be shared by several processes. (ex, libc)
In case of that, it's too bad to reclaim them from the beginnig.
This patch causes VM to keep them on memory until last task
try to reclaim them so shared pages will be reclaimed only if
all of task has gone swapping out.
This feature doesn't handle non-linear mapping on ramfs because
it's very time-consuming and doesn't make sure of reclaiming and
not common.
Change-Id: I7e5f34f2e947f5db6d405867fe2ad34863ca40f7
Signed-off-by: Sangseok Lee <sangseok.lee@lge.com>
Signed-off-by: Minchan Kim <minchan@kernel.org>
Patch-mainline: linux-mm @ 9 May 2013 16:21:27
[vinmenon@codeaurora.org: trivial merge conflict fixes + changes
to make the patch work with 3.18 kernel]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Shrink_page_list expects all pages come from a same zone
but it's too limited to use.
This patch removes the dependency so next patch can use
shrink_page_list with pages from multiple zones.
Change-Id: I34469b7f0a79f2b79e30e40033ba8b3e1dd5f2d0
Signed-off-by: Minchan Kim <minchan@kernel.org>
Patch-mainline: linux-mm @ 9 May 2013 16:21:25
[vinmenon@codeaurora.org: trivial merge conflict fixes]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
These day, there are many platforms avaiable in the embedded market
and they are smarter than kernel which has very limited information
about working set so they want to involve memory management more heavily
like android's lowmemory killer and ashmem or recent many lowmemory
notifier.
One of the simple imagine scenario about userspace's intelligence is that
platform can manage tasks as forground and backgroud so it would be
better to reclaim background's task pages for end-user's *responsibility*
although it has frequent referenced pages.
This patch adds new knob "reclaim under proc/<pid>/" so task manager
can reclaim any target process anytime, anywhere. It could give another
method to platform for using memory efficiently.
It can avoid process killing for getting free memory, which was really
terrible experience because I lost my best score of game I had ever
after I switch the phone call while I enjoyed the game.
Reclaim file-backed pages only.
echo file > /proc/PID/reclaim
Reclaim anonymous pages only.
echo anon > /proc/PID/reclaim
Reclaim all pages
echo all > /proc/PID/reclaim
Change-Id: Iabdb7bc2ef3dc4d94e3ea005fbe18f4cd06739ab
Signed-off-by: Minchan Kim <minchan@kernel.org>
Patch-mainline: linux-mm @ 9 May 2013 16:21:24
[vinmenon@codeaurora.org: trivial merge conflict fixes,
and minor tweak of the commit msg]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Now, local variable references in shrink_page_list is
PAGEREF_RECLAIM_CLEAN as default. It is for preventing to reclaim
dirty pages when CMA try to migrate pages.
Strictly speaking, we don't need it because CMA already didn't allow
to write out by .may_writepage = 0 in reclaim_clean_pages_from_list.
Morever, it has a problem to prevent anonymous pages's swap out when
we use force_reclaim = true in shrink_page_list(ex, per process reclaim
can do it)
So this patch makes references's default value to PAGEREF_RECLAIM
and declare .may_writepage = 0 of scan_control in CMA part to make
code more clear.
Change-Id: I5edc3c955d106ecebc4949ce27daf5b7b7a18089
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Mel Gorman <mgorman@suse.de>
Reported-by: Minkyung Kim <minkyung88@lge.com>
Signed-off-by: Minchan Kim <minchan@kernel.org>
Patch-mainline: linux-mm @ 9 May 2013 16:21:23
[vinmenon@codeaurora.org: trivial merge conflict fixes]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Add support to populate device tree nodes for the new
32-bit platforms under under mach-qcom.
Change-Id: I5fd747de84917c16f28f3f72d7b34b5db157637c
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
arch_trigger_all_cpu_backtrace() takes a boolean on arm
platforms. So, the trigger_all_cpu_backtrace() in nmi.h
results in compilation error. Fix it.
Change-Id: I9a1045333115ab1726f85e360ef0e302486341c4
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
Use the correct type qualifier to print size_t
and ssize_t. This will fix the compilation errors when
compiling for ARM. While at it, fix the compilation errors
in pfk_kc.c for sched functions by including sched.h.
Change-Id: I4fac4530dd4b31baf62ef3719535fd662dc2ae37
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
Add data for dev_freq SPDM support in order to increase BIMC
vote based on bus rejection rate.
CRs-Fixed: 1025515
Change-Id: I93fe93524cca07f9d9efb9f2cd220fb0bfcf8778
Signed-off-by: David Dai <daidavid1@codeaurora.org>
Update the mask to use default settings to enable fast
average for channel configuration. Setting this allows
low latency for multiple averaged conversions. Also
update the field mask for hardware settling delay.
Change-Id: If50943f86a6d3f54039a0b4ed4f8a71c8aaaa1fa
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Reducing logs in error case by
making pr_err as pr_err_limited.
Change-Id: I2ff998fcec7ace9a94ca67a797f008389dc510f2
Signed-off-by: Abhishek Kondaveeti <akondave@codeaurora.org>
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Unaligned register access will reslut in device
crash. Avoid them by checking the register address
before accessing them.
Change-Id: Ib58efa2a68115ec9929b9270c123c904737196ee
Signed-off-by: Abhishek Kondaveeti <akondave@codeaurora.org>
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
This change fixed the framedrop reporting that causes the CTS
test failure. The failure is due to the wrong frame id is used to
report the framedrop. This change will change the framedrop
report logic so that the correct frame id is used.
Change-Id: I5b219ed570b81a7fd6a97be46977cafd3e452492
Signed-off-by: Jing Zhou <jzhou70@codeaurora.org>
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Parallel charging increases charging capacity and efficiency by
distributing the current between two charging chips.
PMI8998 feeds the parallel charger via its MID input, and handles
input current limiting in its front-porch FET. As master charger,
PMI8998 is responsible for enabling/disabling the parallel
charger, and the FCC distribution.
To enable parallel charging in software, the following conditions
must be met:
- Strong USBIN input
- Battery present
- In fast or taper charging state
- Attached UFP source
While the enabling/disabling is always under the control of software
the disabling can also be done by hardware in case of fault.
Battery current is usually fixed to the battery rating. The FCC
distribution is simple, a split of 50/50 by default, which can
be changed in runtime.
When taper irq kicks in, the algorithm reduces parallel FCC by 25%.
This puts the charging back in constant current phase until the
next one happens where again the algorithm reduces the FCC by
25%. This continues until the parallel FCC drops to 500mA. At that
time parallel charging is disabled and master continues charging
the rest of constant voltage phase.
CRs-Fixed: 1023703 1030934
Change-Id: Ied7c31d5913df94a288d36ecf06d081d32e07396
Signed-off-by: Harry Yang <harryy@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Add support to map/unmap TMC flush and reset CTIs as part of TMC
enable/disable.
Change-Id: I5aae2ce3d2e0dec252139db571d4598d49f3a371
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
ETM driver sets the address comparator in TRCACVR0 and TRCACVR1.
Enable default inclusive range selected by these registers.
Change-Id: I08d798d6fb24571856929f84db572bbd3651cd6c
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>
Change to make sure that CTIs get probed before CoreSight sources and
sinks.
Change-Id: I7e83fe663c32a6d75470bb0cb546b42c9fe04ab1
Signed-off-by: Shashank Mittal <mittals@codeaurora.org>