| 175476f9 | 20-Dec-2016 |
Xing Zheng <zhengxing@rock-chips.com> |
FIXUP: rockchip: rk3399: fix the incorrect bit during m0_init
We found that the DUT will be hanged if we don't set the bit_1 of the PMUCRU_GATEDIS_CON0. But, from the TRM, there is weird that the bi
FIXUP: rockchip: rk3399: fix the incorrect bit during m0_init
We found that the DUT will be hanged if we don't set the bit_1 of the PMUCRU_GATEDIS_CON0. But, from the TRM, there is weird that the bit_1 is set the clk_center1_gating_dis, not clk_pmum0_gating_dis. Is the TRM incorrect? We need to check it with the IC team and re-clean the commit message and explain it tomorrow.
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
show more ...
|
| ca9286c6 | 12-Dec-2016 |
Lin Huang <hl@rock-chips.com> |
rockchip: rk3399: improve the m0 enable flow
This patch do following things: 1. Request hresetn_cm0s_pmu_req first then request poresetn_cm0s_pmu_req during M0 enable. 2. Do not diable M0 clock f
rockchip: rk3399: improve the m0 enable flow
This patch do following things: 1. Request hresetn_cm0s_pmu_req first then request poresetn_cm0s_pmu_req during M0 enable. 2. Do not diable M0 clock for ddr dvfs. 3. Correct the clk_pmum0_gating_dis bit, it is BIT0 not BIT1 4. do not set/clear hclk_noc_pmu_en in M0 code, it does not relate to the M0 clock.
Signed-off-by: Lin Huang <hl@rock-chips.com> Signed-off-by: Derek Basehore <dbasehore@chromium.org>
show more ...
|
| a82ec814 | 01-Dec-2016 |
Lin Huang <hl@rock-chips.com> |
rockchip: rk3399: check vop status when we wait dma finish flag
When vop is disabled and we read the vop register the system will hang, so check vop status when we wait for the DMA finish flag to av
rockchip: rk3399: check vop status when we wait dma finish flag
When vop is disabled and we read the vop register the system will hang, so check vop status when we wait for the DMA finish flag to avoid this sitiuation. This is done by checking for standby, DMA stop mode, and disabled window states. Any one of these will prevent the DMA finish flag from triggering.
Signed-off-by: Lin Huang <hl@rock-chips.com> Signed-off-by: Derek Basehore <dbasehore@chromium.org>
show more ...
|
| 95c3f422 | 30-Nov-2016 |
Lin Huang <hl@rock-chips.com> |
rockchip: rk3399: add stopwatch functions to m0
There is system timer in m0, we can use it to implement a set of stopwatch functions for measuring timeouts.
Signed-off-by: Lin Huang <hl@rock-chips.
rockchip: rk3399: add stopwatch functions to m0
There is system timer in m0, we can use it to implement a set of stopwatch functions for measuring timeouts.
Signed-off-by: Lin Huang <hl@rock-chips.com> Signed-off-by: Derek Basehore <dbasehore@chromium.org>
show more ...
|
| 09f41f8e | 15-Dec-2016 |
Lin Huang <hl@rock-chips.com> |
rockchip: rk3399: dram: set all ddr frequency pll_postdiv values to 0
The phy pll needs to get 2X frequency to the DDR, so set the pll_postdiv to 0.
Signed-off-by: Lin Huang <hl@rock-chips.com> Sig
rockchip: rk3399: dram: set all ddr frequency pll_postdiv values to 0
The phy pll needs to get 2X frequency to the DDR, so set the pll_postdiv to 0.
Signed-off-by: Lin Huang <hl@rock-chips.com> Signed-off-by: Derek Basehore <dbasehore@chromium.org>
show more ...
|
| 46b9dbce | 16-Dec-2016 |
Lin Huang <hl@rock-chips.com> |
rockchip: rk3399: enable CA training when do ddr dfs
For ddr dfs stable, We need to enable ddr CA training when do ddr dfs.
Signed-off-by: Lin Huang <hl@rock-chips.com> |
| c6e15d14 | 24-Feb-2017 |
Derek Basehore <dbasehore@chromium.org> |
rockchip: rk3399: fix hang in ddr set rate
This fixes a hang with setting the DRAM rate based on a race condition with the M0 which sets the DRAM rate. The AP can also starve the M0, so this also de
rockchip: rk3399: fix hang in ddr set rate
This fixes a hang with setting the DRAM rate based on a race condition with the M0 which sets the DRAM rate. The AP can also starve the M0, so this also delays the AP reads to the DONE parameter for the M0.
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
show more ...
|
| ad84ad49 | 10-Nov-2016 |
Derek Basehore <dbasehore@chromium.org> |
rockchip: rk3399: Enable per CS training at 666MHz
This enables per CS training at 666MHz and above for ddrfreq per vendor recommendation. Since the threshold was used for latency was the same value
rockchip: rk3399: Enable per CS training at 666MHz
This enables per CS training at 666MHz and above for ddrfreq per vendor recommendation. Since the threshold was used for latency was the same value, this also adds a new value for that.
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
show more ...
|
| 4bd1d3fa | 24-Feb-2017 |
Derek Basehore <dbasehore@chromium.org> |
rockchip: rk3399: add support for ddrfreq suspend/resume
This patch sets the frequency configuration of the next DRAM DFS index to the configuration of the current index. This does not perform a fre
rockchip: rk3399: add support for ddrfreq suspend/resume
This patch sets the frequency configuration of the next DRAM DFS index to the configuration of the current index. This does not perform a frequency transition. It just configures registers so the training on resume for both indices will be correct.
Signed-off-by: Derek Basehore <dbasehore@chromium.org> Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
show more ...
|
| 977001aa | 26-Oct-2016 |
Xing Zheng <zhengxing@rock-chips.com> |
rk3399: dram: use PMU M0 to do ddr frequency scaling
We used dcf do ddr frequency scaling, but we just include a dcf binary, it hard to maintain later, we have M0 compile flow in ATF, and M0 can als
rk3399: dram: use PMU M0 to do ddr frequency scaling
We used dcf do ddr frequency scaling, but we just include a dcf binary, it hard to maintain later, we have M0 compile flow in ATF, and M0 can also work for ddr frequency scaling, so let's use it.
Signed-off-by: Lin Huang <hl@rock-chips.com> Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
show more ...
|
| a9a4d23a | 24-Oct-2016 |
Xing Zheng <zhengxing@rock-chips.com> |
rockchip: update the raw read/write APIs for M0
Since the ATF project, we usually use the mmio_read_32 and mmio_write_32. And the mmio_write_32, the firse parameter is ADDR, the second is VALUE. In
rockchip: update the raw read/write APIs for M0
Since the ATF project, we usually use the mmio_read_32 and mmio_write_32. And the mmio_write_32, the firse parameter is ADDR, the second is VALUE. In order to style consistency:
1/ rename readl/writel to mmio_read_32/mmio_write_32 2/ for keeping the same with mmio_write_32 in the ATF project, swap the order of the parameters for M0 mmio_write_32
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com> Signed-off-by: Lin Huang <hl@rock-chips.com>
show more ...
|
| 9a6376c8 | 21-Oct-2016 |
Derek Basehore <dbasehore@chromium.org> |
rk3399: dram: making phy into dll bypass mode at low frequency
when dram frequency below 260MHz, phy master dll may unlock, so let phy master dll working at dll bypass mode when frequency is below 2
rk3399: dram: making phy into dll bypass mode at low frequency
when dram frequency below 260MHz, phy master dll may unlock, so let phy master dll working at dll bypass mode when frequency is below 260MHz.
Signed-off-by: Lin Huang <hl@rock-chips.com>
show more ...
|
| f91b969c | 21-Oct-2016 |
Derek Basehore <dbasehore@chromium.org> |
rockchip: rk3399: dram: remove dram_init and dts_timing_receive function
we can reuse the dram config from loader, so we can remove dram_init() and dts_timing_receive() funciton in dram.c, add the d
rockchip: rk3399: dram: remove dram_init and dts_timing_receive function
we can reuse the dram config from loader, so we can remove dram_init() and dts_timing_receive() funciton in dram.c, add the dram_set_odt_pd() function to get the odt and auto power down parameter from kernel.
This also removes the dcf_code_init function to allow the system to actually boot.
Signed-off-by: Lin Huang <hl@rock-chips.com> Signed-off-by: Derek Basehore <dbasehore@chromium.org> Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
show more ...
|
| 32f0d3c6 | 26-Jan-2017 |
Douglas Raillard <douglas.raillard@arm.com> |
Replace some memset call by zeromem
Replace all use of memset by zeromem when zeroing moderately-sized structure by applying the following transformation: memset(x, 0, sizeof(x)) => zeromem(x, sizeo
Replace some memset call by zeromem
Replace all use of memset by zeromem when zeroing moderately-sized structure by applying the following transformation: memset(x, 0, sizeof(x)) => zeromem(x, sizeof(x))
As the Trusted Firmware is compiled with -ffreestanding, it forbids the compiler from using __builtin_memset and forces it to generate calls to the slow memset implementation. Zeromem is a near drop in replacement for this use case, with a more efficient implementation on both AArch32 and AArch64.
Change-Id: Ia7f3a90e888b96d056881be09f0b4d65b41aa79e Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
show more ...
|
| 152c8c11 | 05-Dec-2016 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
utils: move BIT(n) macro to utils.h
We are duplicating this macro define, and it is useful enough to be placed in the common place.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> |
| 742df4f6 | 04-Jan-2017 |
Patrick Georgi <pgeorgi@google.com> |
rockchip: Build m0 firmware without standard libraries
Depending on the compiler used, it might try to link in libc even though it's not required. Stop it from doing that.
Signed-off-by: Patrick Ge
rockchip: Build m0 firmware without standard libraries
Depending on the compiler used, it might try to link in libc even though it's not required. Stop it from doing that.
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
show more ...
|
| ede939f2 | 14-Dec-2016 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Fix incorrect copyright notices
Some files have incorrect copyright notices, this patch fixes all files with deviations from the standard notice.
Change-Id: I66b73e78a50a235acb55f1e2ec2052a42c0570d
Fix incorrect copyright notices
Some files have incorrect copyright notices, this patch fixes all files with deviations from the standard notice.
Change-Id: I66b73e78a50a235acb55f1e2ec2052a42c0570d2 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| aa2345e9 | 24-Nov-2016 |
Soren Brinkmann <soren.brinkmann@xilinx.com> |
rk3399: Add CFI debug information to SRAM functions
Commit b91d935feebdf2c3edef19949023645b6cb34b20 ("Add CFI debug frame information for ASM functions") modifies the assembly macros 'func' and 'end
rk3399: Add CFI debug information to SRAM functions
Commit b91d935feebdf2c3edef19949023645b6cb34b20 ("Add CFI debug frame information for ASM functions") modifies the assembly macros 'func' and 'endfunc' to include CFI debug frame information.
The rockchip platform uses a custom version of the 'func' macro with the common 'endfunc' macro. The custom macro wasn't updated in b91d935feebdf2c3edef19949023645b6cb34b20 resulting in the following build error: plat/rockchip/rk3399/drivers/pmu/plat_pmu_macros.S: Assembler messages: plat/rockchip/rk3399/drivers/pmu/plat_pmu_macros.S:155: Error: .cfi_endproc without corresponding .cfi_startproc Makefile:532: recipe for target 'build/rk3399/release/bl31/plat_helpers.o' failed make: *** [build/rk3399/release/bl31/plat_helpers.o] Error 1
Fixing this by updating the sram_func macro in the rk3399 port.
Fixes: b91d935feebdf2c3edef19949023645b6cb34b20 ("Add CFI debug frame information for ASM functions") Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
show more ...
|
| 90d2956a | 08-Nov-2016 |
danh-arm <dan.handley@arm.com> |
Merge pull request #752 from rockchip-linux/rk3399/fixes-s2r-1107
rk3399: fixes and updates for s2r |
| 375d8457 | 08-Nov-2016 |
danh-arm <dan.handley@arm.com> |
Merge pull request #750 from jwerner-chromium/m0_build
RK3399 M0 build system improvements |
| 06077161 | 26-Oct-2016 |
Caesar Wang <wxt@rock-chips.com> |
rockchip: remove no needed code for rk3399
We have do something for clocks gate.
Fox example as the below: susped: clk_gate_con_save(); clk_gate_con_disable();
resume: clk_gate_con_restore(); --
rockchip: remove no needed code for rk3399
We have do something for clocks gate.
Fox example as the below: susped: clk_gate_con_save(); clk_gate_con_disable();
resume: clk_gate_con_restore(); --
SO, add the plls_suspend_prepare() and plls_resume_finish() are not necessary to S2R, that will save S2R time if remove them.
BRANCH=none BUG=chrome-os-partner:58870,chrome-os-partner:55934 TEST=build kevin, two dogfooders with suspend_stress_test passing 3000 cycles and still going on.
Change-Id: Icfbabc0b3ea8d2b5108d4f3de99a803b6d459669 Signed-off-by: Caesar Wang <wxt@rock-chips.com>
show more ...
|
| a14e0916 | 04-Nov-2016 |
Caesar Wang <wxt@rock-chips.com> |
rockchip: disable watchdog during suspend
The CA53 and CM0 WDT clock gating in rk3399 SGRF, and ATF is in charge of it because the kernel can't touch SGRF.
Basically the WDT didn't stop at suspend
rockchip: disable watchdog during suspend
The CA53 and CM0 WDT clock gating in rk3399 SGRF, and ATF is in charge of it because the kernel can't touch SGRF.
Basically the WDT didn't stop at suspend time, it just switched from the 24M to the 32k clock. That meant that the WDT would fire if you slept for long enough. In other word, the watchdog timer over count will increase to 750 (24*1000/32) times. The RK3399 HW watchdog interval is 21 seconds. When machine enters the suspend, the watchdog will reset the system after 35.7 (750/21) hours.
BUG=chrome-os-partner:59257 TEST=daisydog checked and set value, powerd_dbus_suspend to verify.
Change-Id: I88bb2a05b7d67d5ffd292f9d05d033ae9a6a3593 Signed-off-by: Caesar Wang <wxt@rock-chips.com>
show more ...
|
| 71581c9c | 03-Nov-2016 |
Julius Werner <jwerner@chromium.org> |
rockchip: Add proper dependency tracking to M0 Makefile
This patch adds dependency rule generation and inclusion to the M0 Makefile, so that M0 objects will get correctly remade with an incremental
rockchip: Add proper dependency tracking to M0 Makefile
This patch adds dependency rule generation and inclusion to the M0 Makefile, so that M0 objects will get correctly remade with an incremental build if a header file they included changed.
Change-Id: I2067bd9fd4d9dad3e77a09cbf09c7b4db3c1eda5 Signed-off-by: Julius Werner <jwerner@chromium.org>
show more ...
|
| e77ade28 | 01-Nov-2016 |
Julius Werner <jwerner@chromium.org> |
rockchip: Clean up parent directory creation for M0
The dependencies in the M0 Makefile are not correctly laid out, which may lead to errors with make -j if the binary target gets evaluated before t
rockchip: Clean up parent directory creation for M0
The dependencies in the M0 Makefile are not correctly laid out, which may lead to errors with make -j if the binary target gets evaluated before the target that creates the directory. In addition, the M0 Makefile just calls mkdir without using the platform-independent macros from the main ARM TF build system. This patch fixes those issues, removes some unused (and broken) M0 build targets and merges the two M0 output directories into one (since there's no real point splitting it up and it creates more hassle).
Change-Id: Ia5002479cf9c57fea7aefa8ca88e373df3a51f61 Signed-off-by: Julius Werner <jwerner@chromium.org>
show more ...
|
| 4c127e68 | 26-Oct-2016 |
Caesar Wang <wxt@rock-chips.com> |
rockchip: close the PD center logic during suspend
The RK3399 supports close the center logic enter power mode, so we can close PD_CENTER to save more power during suspend. Therefore, we need to sup
rockchip: close the PD center logic during suspend
The RK3399 supports close the center logic enter power mode, so we can close PD_CENTER to save more power during suspend. Therefore, we need to support save/restore the DDR PHY and controller registers during suspend/resume.
Also, need CL (http://crosreview.com/397399) to check disabling center logic.
Change-Id: I288defd8e9caa3846d9fa663a33e4d51df1aaa5d Signed-off-by: Xing Zheng <zhengxing@rock-chips.com> Signed-off-by: Derek Basehore <dbasehore@chromium.org> Signed-off-by: Caesar Wang <wxt@rock-chips.com>
show more ...
|