Support OF_PLATDATA in TPL, enable RK3368 DRAM init and add RK3368-uQ7
Get series with b4
b4 am 5107450.vxCQXNLo7s@diegoVersions newest first
- v1 Latest0 of 52 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 52 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [U-Boot] [PATCH 00/52] Support OF_PLATDATA in TPL, enable RK3368 DRAM init and add RK3368-uQ7
Hi Łukasz,
Am Montag, 24. Juli 2017, 11:23:05 CEST schrieb Łukasz Majewski:
Quoted 55 lines · Heiko Stübner
Quoted 40 lines
Am Montag, 24. Juli 2017, 16:38:52 CEST schrieb Andy Yan:
Quoted 39 lines
Hi Philipp:
Quoted 36 lines · Dr. Philipp Tomsich
Quoted 35 lines · Andy Yan
Hi:
Quoted 16 lines · Philipp Tomsich
Here's a series that has a lot going on, but I didn't want to split it to allow everyone to understand the motivation between some of the changes to the SPL/TPL framework. The short summary of this is "enablement for DRAM init on the RK3368 with everything else that's necessary to do it using
OF_PLATDATAin TPL".Enabling the RK3368 created a few more challenges that I'd expected:
- I needed different stack locations, text addresses and sizes forTPL and SPL
- the TPL stage was to use
OF_PLATDATAand SPL was to use fullOF_CONTROL
- with the RK3368 TPL stage, there was a need to extend the back-to-bootromQuoted 8 lines
support for Rockchip to AArch64
- I wanted to start folding some of the Rockchip specific SPL support
(i.e. back-to-bootrom) back into the general SPL framework to allow
using it as a general boot methodI have a confusion here: according to the README.TPL, TPL is Third Program Loader, which loaded by the SPL. So I think it should run after the SPL. But from RK3188 and RK3368 TPL implementation , they all run before SPL.Maybe it is my misunderstanding, hope to get some guidance.:-)>
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
I think you are right and most Rockchip boards have been using this the wrong way around.
Actually at first I also had the ordering of SPL -> TPL -> uboot for rk3188
but after discussions with Simon and Tom Rini, the opinion was that TPL stands for "tiny" program loader and should run before the full SPL.Has something changed since:
http://www.denx.de/wiki/pub/U-Boot/MiniSummitELCE2013/tpl-presentation.pdf
I've always thought that we do have SPL -> TPL -> u-boot -> Linux
Quoted 7 lines
If there was a change, then:
1. The TPL name is a bit misleading (considering the above presentation/status)
2. IMHO the code running before SPL (to do some _real_ early init) should be named more descriptive like PreSPL.
I've gone back and looked up the previous discussion. It was part of a thread where we only included Tom later on to clarify spl/tpl usage, so there is no list-reference, but I guess I can just quote the part:
----------------- 8< -------------------
Am Donnerstag, 26. Januar 2017, 12:57:40 CEST schrieben Tom Rini:
Quoted 35 lines · Simon Glass
Quoted 34 lines
+Tom for question below.
Hi Heiko,
Quoted 15 lines · Heiko Stübner
Hi,
Am Samstag, 17. Dezember 2016, 09:57:51 schrieb Simon Glass:
Quoted 3 lines
I cannot see the .S code in that tree. If it is a few instructions then it is fine. But if it is a lot of code I question why it cannot be written mostly in C?
The .S was just my question to Kever how he envisioned this "preloader" being implemented. Right now all my parts are fully C-based.
Quoted 4 lines
Using TPL seems OK to me. But from my understanding TPL runs before SPL. So the sequence should be: TPL -> SPL -> U-Boot. This makes some sense because SPL is a more full-featured loader, and TPL is just a mini-loader to get the SPL running.
Quoted 4 lines
hmm, I think SPL -> TPL -> U-Boot would be the correct order :-) Based on the TPL being the "tertiary program loader" where the SPL only is the "secondary program loader" and based on the slides from 2013 in [0].>
That seems wrong to me. A secondary load loads the primary loader, which surely means that the tertiary should load the secondary, i.e.
I think it should be:
2 loads 1 (SPL loads U-Boot)
3 loads 2 which loads 1 (TPL loads SPL which loads U-Boot)The alternative is:
2 loads 3 which loads 1
Quoted 7 lines
Quoted 4 lines
which seems really odd.
Note that PowerPC appears to use TPL->SPL->U-Boot when I last looked at it. Of course I could be wrong.
Yes, naming is hard. TPL (which is maybe better thought of as Tiny not Tertiary) loads SPL loads U-Boot.
----------------- 8< -------------------
Heiko