Question

I have been given all the register values like SRAM Window 0 Control Register,PCI Express Configuration Address Register and numerous other register values for Armada 370 SoC.
Now for board bringup I have to set all these register values in U-boot and Linux kernel.
Is there a way to do this easily?
For example, if I want to set the PCI Express Configuration Address Register, how do I start?
Any direction to good resource will be helpful. Thanks.

Was it helpful?

Solution

1) In u-boot, look at /board subdirectory: there is your board-specific files should be located. There is several Marvell platforms presented, but no armada 370, so looks like you should add it by yourself. Maybe, you already have proper distribution? Examining existing code, I guess you should use GT_REG_WRITE macro (defined in /board/Marvell/common/core.h). But it can differ for armada 370.

2) In linux kernel, there is a place for board specific code too: look in /arch subdirectory. Armada 370 is based on ARM, so it should be placed into /arch/arm. There is a block of common code for all of ARM platforms, and specific subdirectories named "mach-" and "plat-". Your code should be arranged like there. In "mach-" subdirectories look for "board-" files, they are contain code executed at linux kernel start.

OTHER TIPS

You should have a look into arch/arm/mach-mvebu ! (I am refering to the 3.16 kernel).

Free-Electrons have also worked a lot on this SoC Family. You can have a look to their git here: https://github.com/MISL-EBU-System-SW/mainline-public/commits/3.16/cpuidle-v3

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top