
On Mon, 22 Dec 2014 14:50:09 +0100 Hans de Goede hdegoede@redhat.com wrote:
Hi,
On 22-12-14 09:32, Michal Suchanek wrote:
On 20 December 2014 at 19:27, Hans de Goede hdegoede@redhat.com wrote:
Hi All,
There are 3 topics which I would like to cover in this mail:
- Switching over to upstream u-boot for the linux-sunxi project
- How to build upstream u-boot for use with linux-sunxi sunxi-3.4 kernels
- Adding more boards to upstream u-boot
- Switching over to upstream u-boot for the linux-sunxi project
================================================================
Upstream u-boot has had sunxi support for a while now, and has slowly been gaining a lot of features over the linux-sunxi/u-boot-sunxi version at: https://github.com/linux-sunxi/u-boot-sunxi/
Some of the new features supported upstream are booting from usb, booting from sata (ahci) and full sun6i (A31) support including SPL support. Also upstream u-boot supports using hdmi out + an usb keyboard as u-boot console, so that one does not need to solder a serial console to things like hdmi tv-dongles.
Upstream u-boot also has full sun8i (A23) support in the pipeline including SPL support.
Since we have sun8i memory support is there corresponding meminfo which can dump the timing?
No, just like with previous boards all boards seem to use the same timing (tpr) values so I've simply hardcoded them. The only 2 things which can be configured in the sun8i dram code or the dram-clk and the zq value, both of which (so far) have been filled in in the fex files, so there is no reason to read it back, moreover reading it back is impossible in the case of the zq value, as that does not end up 1:1 in a register.
It still makes a lot of sense having a tool, which recovers as much of the 'dram_para' struct as possible. At least this can provide a way to verify the correctness of the sun8i dram code in u-boot, if compared with the same results obtained on a system with the allwinner boot0 bootloader. And also compared with the settings from FEX.
Hans, do you remember your recent screw-up with the axp152 regulators? http://lists.denx.de/pipermail/u-boot/2014-October/191528.html You noticed the problem only several months after introducing this regression. This could be discovered because you were playing with the sunxi-3.4 kernel, and thankfully it was able to report the voltage, originally set by the bootloader. Had you thought about a way to test your axp152 tweaks at the time when you had initially implemented them, this regression could have been avoided altogether.
Exactly the same applies here. The sun8i dram code contains some weird dram parameters scrambling before they are written to the registers among other things. How can we be sure that you have really correctly transplanted all of the boot0 logic into your C code without any typo or missing anything in the process? Especially considering that you are not disclosing any details about the way you have done this, or the exact boot0 binary that was used to borrow this logic from.
Reading back from the hardware registers via /dev/mem and comparing this data with the expected values could definitely help. And no, it's not something that some other person could maybe do in some distant future. This is a necessary action to ensure the sun8i dram code quality, which is better to be done right now.