[PATCH v2 0/7] Add Cortina Access basic DM drivers
Alex Nemirovsky
Alex.Nemirovsky at cortina-access.com
Fri Jan 24 18:55:29 CET 2020
Looking inside
grep -h CA board/cortina/common/armv8/lowlevel_init.S
#if defined(CONFIG_SOC_CA7774)
#if defined(CONFIG_SOC_CA8277B)
as we understand it, the alternative would lead to maintaining duplicate but slightly different code for each ARM based SoC in
arch/arm/mach-ca7774
arch/arm/mach-ca8277B
arch/arm/mach-ca7742
arch/arm/mach-ca8279
arch/arm/mach-caXnnn
correct? or should we simply create a arch/arm/mach-caxxxx, arch/mips/mach-caxxxx, arch/xtensa/mach-axxxx, arch/riscv/mach-caxxxx, etc to maintain similar
changes to each arch related custom code which varies slightly for each SoC variation within each architecture?
What’s best to avoid maintaining duplicate code across SoC variations within the same ISA family?
On Jan 24, 2020, at 9:37 AM, Tom Rini <trini at konsulko.com<mailto:trini at konsulko.com>> wrote:
On Fri, Jan 24, 2020 at 05:22:50PM +0000, Alex Nemirovsky wrote:
We have many common features across ISAs and common ARM, MIPS, other ISA modification across SoCs. Looking at how this was addressed
by other silicon vendors who support multiple ISAs, lead to this path. i.e. TI, freescale, and others.
./board/BuR/common
./board/xilinx/common
./board/atmel/common
./board/ti/common
./board/seco/common
./board/gdsys/common
./board/avionic-design/common
./board/LaCie/common
./board/cortina/common
./board/xes/common
./board/varisys/common
./board/engicam/common
./board/siemens/common
./board/mscc/common
./board/toradex/common
./board/compulab/common
./board/alliedtelesis/common
./board/freescale/common
./board/keymile/common
./board/samsung/common
./board/google/common
./board/ge/common
Yes. And in I believe all of the above cases there is also a relevant
arch/*/mach-* directory. This can be a hard distinction to make
sometimes, especially at first, but board/VENDOR/common is for the parts
that are common but outside of a specific SoC. What you're putting in
there that is common between your MIPS and ARM platforms for example.
To use board/ti/common as an example there are platforms under
arch/arm/mach-omap2/{am33xx,omap5} and arch/arm/mach-k3/ that all share
that code.
To use one of your examples, lowlevel_init.S is something that is for
the SoC and would be shared by some other vendor that uses your
platform, right? It's leveraging features of the SoC itself rather than
the PCB design of the board.
Does that help? Thanks!
--
Tom
More information about the U-Boot
mailing list