Allow kernel access 0x00200000~0x00208000, because the first usable region
must be PMD aligned. Otherwise rampoops would not work.
Fixes: 9e109a2600 ("ARM: dts: rockchip: reserve 32KB shared memory for rv1126-evb-ddr3-v10-tb")
Change-Id: I170a6d946695dbace8064eafa57986787d8cab86
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
For map memory, we should call vmap other than ioremap when pfn_valid().
Otherwise we would get the following warning:
WARNING: CPU: 3 PID: 35 at arch/arm/mm/ioremap.c:303 __arm_ioremap_pfn_caller+0x7c/0x1b4
Modules linked in:
CPU: 3 PID: 35 Comm: init/3 Not tainted 4.19.111 #348
Hardware name: Generic DT based system
[<b070efe8>] (unwind_backtrace) from [<b070b560>] (show_stack+0x10/0x14)
[<b070b560>] (show_stack) from [<b0c5cd44>] (dump_stack+0x90/0xa4)
[<b0c5cd44>] (dump_stack) from [<b07229b8>] (__warn+0xfc/0x114)
[<b07229b8>] (__warn) from [<b0722ae4>] (warn_slowpath_null+0x40/0x48)
[<b0722ae4>] (warn_slowpath_null) from [<b07145ec>] (__arm_ioremap_pfn_caller+0x7c/0x1b4)
[<b07145ec>] (__arm_ioremap_pfn_caller) from [<b0714770>] (__arm_ioremap_caller+0x4c/0x54)
[<b0714770>] (__arm_ioremap_caller) from [<b0b5a7d0>] (sip_smc_request_share_mem+0x54/0x7c)
Change-Id: I51dd47ed9dc7210fd3192b0c970c31e10d79c0a6
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This patch is used to support vendor storage for SPI NAND
and SLC NAND via mtd interface.
Change-Id: I6f011cb9052a014845629e103976b36adb5fa589
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
Some CPUs can speculate past an ERET instruction and potentially perform
speculative accesses to memory before processing the exception return.
Since the register state is often controlled by a lower privilege level
at the point of an ERET, this could potentially be used as part of a
side-channel attack.
This patch emits an SB sequence after each ERET so that speculation is
held up on exception return.
Change-Id: I8bdcc2d9ff9d4d344c0e7a4aad809fbca52db116
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 679db70801)
drivers/media/platform/rockchip/cif/dev.c:290:93: warning: operator '?:' has lower precedence than '|'; '|' will be evaluated first [-Wbitwise-conditional-parentheses]
(dev->chip_id != CHIP_RK1808_CIF && dev->chip_id != CHIP_RV1126_CIF) | (id == pad - 1) ?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
drivers/media/platform/rockchip/cif/dev.c:290:93: note: place parentheses around the '|' expression to silence this warning
(dev->chip_id != CHIP_RK1808_CIF && dev->chip_id != CHIP_RV1126_CIF) | (id == pad - 1) ?
^
( )
drivers/media/platform/rockchip/cif/dev.c:290:93: note: place parentheses around the '?:' expression to evaluate it first
(dev->chip_id != CHIP_RK1808_CIF && dev->chip_id != CHIP_RV1126_CIF) | (id == pad - 1) ?
^
(
Change-Id: I7ed9acf76afeed128ccfa70f94b81e143c08e327
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
CMA alloc may failure due to page busy caused by isolated failure,
it's helpful to dump page owner stack for debug.
To use this debug, there should enable PAGE_OWNER debug first by
- CONFIG_PAGE_OWNER=y
- add “page_owner=on” to boot cmdline
then it will shows as following:
page allocated via order 0, migratetype Movable, gfp_mask 0x6212ca(GFP_HIGHUSER_MOVABLE|__GFP_NOWARN|__GFP_NORETRY)
get_page_from_freelist+0x1404/0x1920
__alloc_pages_nodemask+0xf4/0xe90
__do_page_cache_readahead+0x104/0x1f0
filemap_fault+0x3d4/0x618
ext4_filemap_fault+0x30/0x50
__do_fault+0x50/0x118
__handle_mm_fault+0x7e4/0xb40
handle_mm_fault+0xcc/0x1a0
do_page_fault+0x1f0/0x4a8
do_translation_fault+0x5c/0x64
do_mem_abort+0x54/0xf8
el0_da+0x1c/0x20
Change-Id: I94b02a7c4ce9174f8151e0979e18adba4011c1d2
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Phy internal registers is read by APB bus. If you get phy registers
and APB data at the same time, you will get wrong data which is the
previous value of register. Therefore, pready_cnt must be set bigger
than rden_cnt.
Change-Id: I2e7e5544077170466bdaabc2f7d61f67a06b3283
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
drivers/net/wireless/rockchip_wlan/rtl8822bs/hal/phydm/phydm_dfs.c:1676:4:
warning: misleading indentation; statement is not part of the previous 'if'
[-Wmisleading-indentation]
dfs->pri_cond4 = 1;
^
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ieee0b2dac1d5fd6342bd7f6fd6a3e67af4c9b26c
security/optee_linuxdriver/core/tee_session.c:57:3: error: 'sprintf' will
always overflow; destination buffer has size 35, but format string expands
to at least 36 [-Werror,-Wfortify-source]
Change-Id: Ie5b2ccfc4fca053b6d88278b1019997ad0dd3ee5
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
after create 1:1 mapping, we can enable iommu at any time, because
whether the iommu is enable or not, the VOP can access the correct
phy addr.
dma_addr----->iommu module---->phy addr
| |
|---------bypass--------|
Change-Id: I50f6a897d90c33e5bd0fba099654ce788d3d647d
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
we reserved the DDR last 32M as uboot logo and kernel logo, here we
create 1:1 mapping for this buffer, this is prepare for uboot logo phy
addr switch to kernel logo vir addr and iommu enable.
Change-Id: I090665f29f7f4f7cf5456b9edbddea60485376cf
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
This allows adding fields to clk_init_data without having to explicitly
set those fields in all the drivers.
Fixes: 2071154513 ("ANDROID: GKI: clk: Initialize in stack clk_init_data to 0 in all drivers")
Change-Id: Idb2d492d2ceba3029d334777c0c784bce4676666
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This allows adding fields to clk_init_data without having to explicitly
set those fields in all the drivers.
Fixes: 2071154513 ("ANDROID: GKI: clk: Initialize in stack clk_init_data to 0 in all drivers")
Change-Id: I4593151b2624d2ccfaf477d36ff1f4d331f2ca91
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This allows adding fields to clk_init_data without having to explicitly
set those fields in all the drivers.
Fixes: 2071154513 ("ANDROID: GKI: clk: Initialize in stack clk_init_data to 0 in all drivers")
Change-Id: If1fb768aadc89025cccc131441c3aa32045ba382
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This allows adding fields to clk_init_data without having to explicitly
set those fields in all the drivers.
Fixes: 2071154513 ("ANDROID: GKI: clk: Initialize in stack clk_init_data to 0 in all drivers")
Change-Id: I6d958aa57097209165cf32a671f9612752eec4f1
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This allows adding fields to clk_init_data without having to explicitly
set those fields in all the drivers.
Fixes: 2071154513 ("ANDROID: GKI: clk: Initialize in stack clk_init_data to 0 in all drivers")
Change-Id: I382ee237c596e79e29bf6c4b13a4dc6c0c94344f
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This allows adding fields to clk_init_data without having to explicitly
set those fields in all the drivers.
Fixes: 2071154513 ("ANDROID: GKI: clk: Initialize in stack clk_init_data to 0 in all drivers")
Change-Id: Ibe59e24929f89e6124ee0c74195515421625f386
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This allows adding fields to clk_init_data without having to explicitly
set those fields in all the drivers.
Fixes: 2071154513 ("ANDROID: GKI: clk: Initialize in stack clk_init_data to 0 in all drivers")
Change-Id: I4fd81155cfbd6c257d3a52eda25714e07a4e6abb
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This allows adding fields to clk_init_data without having to explicitly
set those fields in all the drivers.
Fixes: 2071154513 ("ANDROID: GKI: clk: Initialize in stack clk_init_data to 0 in all drivers")
Change-Id: Ibc59e5fa1e6a9b7aff8612b7501e8f0644cd96ca
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
fix following problem when using pingpong mode
rkcif: Bad frame, pp irq:0x20b frmst:0xda900000 size:1600x600
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: Iaf9222d5465a966047c26b7a7518bbc419cd5748
Remove unnecessary initialization process from core as possible, such
as remove some idle process, shorten delay, remove parsing ext_csd,
remove post-delay for power and so on. All these stuffs are enabled
by CONFIG_ROCKCHIP_THUNDER_BOOT.
Change-Id: I0e2326dd79d938eb82c8cfac9db09e34d6c08987
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
This patch adds the qurik to use busrt transfers only
for pl330 controller, even for request with a length of 1.
Although, the correct way should be: if the peripheral request
length is 1, the peripheral should use SINGLE request, and then
notify the dmac using SINGLE mode by src/dst_maxburst with 1.
For example, on the Rockchip SoCs, all the peripherals can use
SINGLE or BURST request by setting GRF registers. it is possible
that if these peripheral drivers are used only for Rockchip SoCs.
Unfortunately, it's not, such as dw uart, which is used so widely,
and we can't set src/dst_maxburst according to the SoCs' specific
to compatible with all the other SoCs.
So, for convenience, all the peripherals are set as BURST request
by default on the Rockchip SoCs. even for request with a length of 1.
the current pl330 driver will perform SINGLE transfer if the client's
maxburst is 1, which still should be working according to chapter 2.6.6
of datasheet which describe how DMAC performs SINGLE transfers for
a BURST request. unfortunately, it's broken on the Rockchip SoCs,
which support only matching transfers, such as BURST transfer for
BURST request, SINGLE transfer for SINGLE request.
Finaly, we add the quirk to specify pl330 to use burst transfers only.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I91c295a0854515131fb9a76757fbd85e5c7b0c15
logo-memory-region is used for passing framebuffer
from bootloader, which store kernel logo image data.
Change-Id: I24ba97be5abdbb8a8760861f7460120eef9ff744
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
According to the datasheet of pl330:
Example 2-1 Using DMAGO with the debug instruction registers
1. Create a program for the DMA channel
2. Store the program in a region of system memory
3. Poll the DBGSTATUS Register to ensure that the debug is idle
4. Write to the DBGINST0 Register
5. Write to the DBGINST1 Register
6. Write zero to the DBGCMD Register
so, we should make sure the debug is idle before step 4/5/6, not
only step 6. if not, there maybe a risk that fail to write DBGINST0/1.
Change-Id: I22253cc5d7cbd68f1c641fbef38617dc9a053c48
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Build iep2 driver for rv1126_defconfig by default.
Signed-off-by: Alpha Lin <alpha.lin@rock-chips.com>
Change-Id: I048c3de46492134eac06190c8f25e3a5a5c19175
IEP2 is a hardware ip upgrade from IEP, improving deinterlacing
processing perform, but no other post processing functions
for this version.
Change-Id: Id7f58c3f35c0c033aaa4c104a3f98849e1778f94
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Signed-off-by: Alpha Lin <alpha.lin@rock-chips.com>