Migrate to use new properties.
Fixes: af02b05e59 ("mmc: add thunder boot support")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I26e1c5b65a994522fdfd5cbc54ed17909bbaa95f
RK808\RK818 have November 31st,Other chips fixed the problem.
Fixes: f076ef44a4 ("rtc: rk808: Compensate for Rockchip calendar
deviation on November 31st")
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I8977a14abcc3973728b5941951d17d493b3955d4
modify the rk808 max steps for increase voltage of Buck1/2,
equal 25mv.
Change-Id: Ic6c016e99ce67f5773d5f5df0b65fa1de10f557a
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
fix up the RK816 setting voltage drop make the system crash.
Before adjusting voltage, increase clk_cpu div and reduce CPU frequency
Only support for RK312x chips.
Change-Id: Id327da9590f7d9d383450e79acd1b309e05cd024
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
This submit supports to compile vendor storage into a module.
Change-Id: Id88bbee6ff44a75b2aa163a669098d410afaa921
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
The sequence of operations is as follows:
1. disable the sleep pin function
2. modify the sleep pin polarity
3. delay 3 32k clock cycle
4. select the sleep pin function
Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: If6df2b2f190951abe9bb31fbd18d9af47e145038
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
set 3.4v interrupt signal assert when suspend, set 3.0v shutdown
signal assert when resume.
Change-Id: Id15b721bbdc9665a18cf9946b92c435a23f1666c
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
RK816 has 1 pin to be used as GPIO or TS function.
When used as GPIO function, the pin can be output or input.
Change-Id: I8607595826ac3125dfa2a4c7c483be6b084204c2
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
This setting will be added by ddr binary when necessary to
handle the high temperature-voltage issue on BUCK3.
Change-Id: Ief7d4954e459317ae571400496c4c5ef74f664af
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Show the reason of this power on and last shutdown.
Change-Id: Id540433065859a0c3f4817ed66e295b7c6dfccb5
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
The registers relative with fuel gauge must be volatile.
Change-Id: I8e942e8f15f66dabf24ede48b81857947575fa23
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
If the system needs hold register values when system will reboot.
need to set only resetting pmic register for 817&809 forcedly.
When system restart, there are two rst actions of PMIC sleep if
board hardware support:
- 0b'00: reset the PMIC itself completely.
- 0b'01: reset the 'RST' related register only.
In the case of 0b'00, PMIC reset itself which triggers SoC NPOR-reset
at the same time, so the command: reboot load/bootload/recovery, etc
is not effect any more.
We add a cmd list to check if this reboot cmd is what we expect for 0b'01.
Change-Id: Ib4b850c86ec3079cd7e374bc96460ee1532854a2
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
remove the rk8xx-pwrkey.c file, it's function is same as rk805-pwerkey.c.
Change-Id: Ie8a0559c3a105ec9806f170d0c4d32c2691558c6
Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
This format is a definition from rockchip rk61x/rk62x
lvds, and has no application scenarios so far.
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: Ifb139eaf35d5e83fa96579b1dfcf3762556a77a1
Fix the follow compile error:
In file included from drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:10:
drivers/gpu/drm/rockchip/rockchip_drm_vop.h:196:22: error: field has
incomplete type 'enum drm_plane_type'
enum drm_plane_type type;
^
drivers/gpu/drm/rockchip/rockchip_drm_vop.h:196:7: note: forward
declaration of 'enum drm_plane_type'
enum drm_plane_type type;
This is due to the remove of drmP.h:
commit 4e98f871bc ("drm: delete drmP.h + drm_os_linux.h")
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: Ic7d1d58d5d4c9c032067c7686c76cef41a92a5d2
Remove gpiochip related codes from pinctrl driver, but populate gpio
platform devices from device tree data.
Change-Id: I347acaac2998a972e4c3be5c8827f77f468a7ad2
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
This gpio driver codes mostly are copied from pinctrl-rockchip.c with
module fixes. Also it supports the old dt nodes.
Change-Id: I7f26b5fe0827c16e2146a40e035a81de74284191
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Add a Kconfig flag to differentiate between a GKI and an Non GKI build.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ib0c57f7579f2cec06288ac9e063548c6395bf44c
arch cris & metag have been removed from supported archs.
The dts hard link files should also be removed, or the ctags
tool will give warning.
execute"ctags -R" or "gtags", output:
ctags: Warning: cannot open source file
"scripts/dtc/include-prefixes/cris" : No such file or directory
ctags: Warning: cannot open source file
"scripts/dtc/include-prefixes/metag" : No such file or directory
This patch was override by commit 9820464afd ("UPSTREAM:
devicetree: Move include prefixes from arch to separate
directory"), so apply it again.
Change-Id: I002617cde3f879bc8364f55502839b3c3cd2dd92
Signed-off-by: Liu Changcheng <changcheng.liu@intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
(cherry picked from commit 8d14f31ec9)
* android12-5.10: (966 commits)
ANDROID: Support disabling symbol trimming
ANDROID: Incremental fs: Fix pseudo-file attributes
ANDROID: sched: Fix missing RQCF_UPDATED in migrate_tasks
FROMLIST: mm, thp: Relax the VM_DENYWRITE constraint on file-backed THPs
ANDROID: GKI: Update the generic symbol list
ANDROID: ABI: Add symbols for crypto
ANDROID: ABI: Update the ABI XML
Revert "ANDROID: GKI: Change UCLAMP_BUCKETS_COUNT to 20"
ANDROID: vendor_hooks: Add hook for binder
UPSTREAM: crypto: arm/blake2s - fix for big endian
UPSTREAM: crypto: arm/blake2b - drop unnecessary return statement
FROMGIT: kasan, arm64: tests supports for HW_TAGS async mode
FROMGIT: arm64: mte: Report async tag faults before suspend
FROMGIT: arm64: mte: Enable async tag check fault
FROMGIT: arm64: mte: Conditionally compile mte_enable_kernel_*()
ANDROID: ABI: Update the ABI xml
ANDROID: ABI: Update the generic symbol list
ANDROID: selinux: add vendor hook in selinux
FROMGIT: arm64: mte: Enable TCO in functions that can read beyond buffer limits
ANDROID: sched: Add vendor hooks for update_load_avg
...
Change-Id: I74731b47c1f6cd67cea9622113833b3f8c994544
Allow disabling symbol trimming on the command line when running
build.sh. This allows us to make GKI builds without trimming and without
modifying the build config. The main use case is when we want to update
the symbol list in a mixed build system.
Bug: 186549137
Signed-off-by: Will McVicker <willmcvicker@google.com>
Change-Id: I16d1c348270b4dbb378f009857286acd7b6d8aa3
Prior change
ANDROID: Incremental fs: stat should return actual used blocks
adds blocks to getattr. Unfortunately the code always looks for the
backing file, and pseudo files don't have backing files, so getattr
fails for pseudo files.
Bug: 186567511
Test: incfs_test passes, can do incremental installs on test device
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: Ia3df87f3683e095d05c822b69747515963c95f1c
(cherry picked from commit 9d00e67d8b)
Currently, the sched code checks if the rq clock has been
updated after its lock has been held when CONFIG_SCHED_DEBUG
is enabled. It tracks this by clearing the RQCF_UPDATED bit
when a lock is acquired and setting it upon a subsequent
update_rq_clock() call. It warns if rq clock is read without
RQCF_UPDATED flag indicating the code path missed updating
the clock.
When migrate_tasks() is called during a pause_cpus() event,
the local variable orf is updated with the contents of *rf,
prior to the call to update_rq_clock(). As a result, when
migrate_tasks() restores *rf from the local variable the
RQCF_UPDATED flag is lost. This clearing out of the
RQCF_UPDATED flag leads to a warning when the next task
is being pushed out.
For example in migrate_tasks()
orf = rf; // save flags, RQCF_UPDATE cleared
update_rq_clock() // set RQCF_UPDATE
for()
...
__migrate_task(dead_rq, new_cpu)
...
--> if migration, restore dead_rq's flags with orf.
--> We loose RQCF_UPDATE
rq_relock(dead_rq, orf)
This leaves the current cpu's rq clock_update_flags with the
RQCF_UPDATED flag cleared, an error condition with
CONFIG_SCHED_DEBUG enabled.
Fix the issue for by ensuring that the local variable orf
has the RQCF_UPDATED flag set, allowing the current
CPU's rq to have the flag set and leaving it in a good state
for future usage.
pause_cpus() is currently Android specific. As cpu_pause does
not rely on stop_machine_cpuslocked() like the regular
hotunplug path does, there's a risk for another CPU to
read the rq_clock, after we cleared RQCF_UPDATE, when using
pause_cpus(). This change will have little or no impact outside
of Android currently. If pause_cpus() or drain_rq_cpu_stop()
are merged upstream this change should be merged as well.
Bug: 186222712
Change-Id: Id241122e1449cdd4dcd15f94eb68735b40e3d6f5
Signed-off-by: Stephen Dickey <dickey@codeaurora.org>
Transparent huge pages are supported for read-only non-shmem files,
but are only used for vmas with VM_DENYWRITE. This condition ensures that
file THPs are protected from writes while an application is running
(ETXTBSY). Any existing file THPs are then dropped from the page cache
when a file is opened for write in do_dentry_open(). Since sys_mmap
ignores MAP_DENYWRITE, this constrains the use of file THPs to vmas
produced by execve().
Systems that make heavy use of shared libraries (e.g. Android) are unable
to apply VM_DENYWRITE through the dynamic linker, preventing them from
benefiting from the resultant reduced contention on the TLB.
This patch reduces the constraint on file THPs allowing use with any
executable mapping from a file not opened for write (see
inode_is_open_for_write()). It also introduces additional conditions to
ensure that files opened for write will never be backed by file THPs.
Restricting the use of THPs to executable mappings eliminates the risk that
a read-only file later opened for write would encounter significant
latencies due to page cache truncation.
The ld linker flag '-z max-page-size=(hugepage size)' can be used to
produce executables with the necessary layout. The dynamic linker must
map these file's segments at a hugepage size aligned vma for the mapping to
be backed with THPs.
Comparison of the performance characteristics of 4KB and 2MB-backed
libraries follows; the Android dex2oat tool was used to AOT compile an
example application on a single ARM core.
4KB Pages:
==========
count event_name # count / runtime
598,995,035,942 cpu-cycles # 1.800861 GHz
81,195,620,851 raw-stall-frontend # 244.112 M/sec
347,754,466,597 iTLB-loads # 1.046 G/sec
2,970,248,900 iTLB-load-misses # 0.854122% miss rate
Total test time: 332.854998 seconds.
2MB Pages:
==========
count event_name # count / runtime
592,872,663,047 cpu-cycles # 1.800358 GHz
76,485,624,143 raw-stall-frontend # 232.261 M/sec
350,478,413,710 iTLB-loads # 1.064 G/sec
803,233,322 iTLB-load-misses # 0.229182% miss rate
Total test time: 329.826087 seconds
A check of /proc/$(pidof dex2oat64)/smaps shows THPs in use:
/apex/com.android.art/lib64/libart.so
FilePmdMapped: 4096 kB
/apex/com.android.art/lib64/libart-compiler.so
FilePmdMapped: 2048 kB
Bug: 158135888
Link: https://lore.kernel.org/patchwork/patch/1408266/
Reviewed-by: William Kucharski <william.kucharski@oracle.com>
Acked-by: Hugh Dickins <hughd@google.com>
Acked-by: Song Liu <song@kernel.org>
Signed-off-by: Collin Fijalkovich <cfijalkovich@google.com>
Change-Id: I75c693a4b4e7526d374ef2c010bde3094233eef2
This reverts commit 327402e1e9.
Reason for revert: This patch causes us to hit the SCHED_WARN_ON in
uclamp_rq_dec_id. Revert until this is fixed appropriately.
Bug: 186415778
Change-Id: I5be50723b4058008ed24daa7ca303792ba81b567
Signed-off-by: J. Avila <elavila@google.com>
The new ARM BLAKE2s code doesn't work correctly (fails the self-tests)
in big endian kernel builds because it doesn't swap the endianness of
the message words when loading them. Fix this.
Fixes: 5172d322d3 ("crypto: arm/blake2s - add ARM scalar optimized BLAKE2s")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit d2f2516a38)
Bug: 178411248
Change-Id: Iff419963407eeb0435b9550ef126db4bf137a8a1
Signed-off-by: Eric Biggers <ebiggers@google.com>
Neither crypto_unregister_shashes() nor the module_exit function return
a value, so the explicit 'return' is unnecessary.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 6131e97077)
Bug: 178411248
Change-Id: I2b15c03f1d0379effdf3a2f1d16e79a5ada84362
Signed-off-by: Eric Biggers <ebiggers@google.com>
This change adds KASAN-KUnit tests support for the async HW_TAGS mode.
In async mode, tag fault aren't being generated synchronously when a
bad access happens, but are instead explicitly checked for by the kernel.
As each KASAN-KUnit test expect a fault to happen before the test is over,
check for faults as a part of the test handler.
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://lore.kernel.org/r/20210315132019.33202-10-vincenzo.frascino@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Bug: 170327579
Bug: 172318110
(cherry picked from commit e80a76aa1a
git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/
for-next/mte-async-kernel-mode)
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: I45a6bc351bce937797b1b08e9220a137225f9d55
When MTE async mode is enabled TFSR_EL1 contains the accumulative
asynchronous tag check faults for EL1 and EL0.
During the suspend/resume operations the firmware might perform some
operations that could change the state of the register resulting in
a spurious tag check fault report.
Report asynchronous tag faults before suspend and clear the TFSR_EL1
register after resume to prevent this to happen.
Cc: Will Deacon <will@kernel.org>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://lore.kernel.org/r/20210315132019.33202-9-vincenzo.frascino@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Bug: 170327579
Bug: 172318110
(cherry picked from commit eab0e6e17d
git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/
for-next/mte-async-kernel-mode)
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: I16efc3a886e57ac2f0a4f8a1bc70afcf17a86f26
MTE provides a mode that asynchronously updates the TFSR_EL1 register
when a tag check exception is detected.
To take advantage of this mode the kernel has to verify the status of
the register at:
1. Context switching
2. Return to user/EL0 (Not required in entry from EL0 since the kernel
did not run)
3. Kernel entry from EL1
4. Kernel exit to EL1
If the register is non-zero a trace is reported.
Add the required features for EL1 detection and reporting.
Note: ITFSB bit is set in the SCTLR_EL1 register hence it guaranties that
the indirect writes to TFSR_EL1 are synchronized at exception entry to
EL1. On the context switch path the synchronization is guarantied by the
dsb() in __switch_to().
The dsb(nsh) in mte_check_tfsr_exit() is provisional pending
confirmation by the architects.
Cc: Will Deacon <will@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Andrey Konovalov <andreyknvl@google.com>
Tested-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://lore.kernel.org/r/20210315132019.33202-8-vincenzo.frascino@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Bug: 170327579
Bug: 172318110
(cherry picked from commit 65812c6921
git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/
for-next/mte-async-kernel-mode)
Signed-off-by: Alexander Potapenko <glider@google.com>
Change-Id: Ia3e8df665b1fd88a50c649a6eda6ee790e28a7d4