
Hi Masahiro,
On 12 June 2014 05:10, Masahiro Yamada yamada.m@jp.panasonic.com wrote:
Hi.
In U-Boot, the directory structure under arch/ is like this arch/${ARCH}/cpu/${CPU}/${SOC}
Exception: - ${CPU} is missing for some architectures such as blackfin, sandbox, etc. - There are many boards without ${SOC}
My question is, ${SOC} should always depend on ${CPU} ?
I think it is reasonable to migrate to the structure like this:
arch/${ARCH}/cpu/${CPU} /mach-${foo} /mach-${bar}
I think arch/${ARCH}/cpu/${CPU}/${SOC} structure have given us a lot of pain.
The problems I want to solve are:
[1] Do not split the similar SoC family to various directories
at91 SoC directory exists under arm920t, arm926ejs, armv7 directory.
./arch/arm/cpu/arm920t/at91 ./arch/arm/cpu/arm926ejs/at91 ./arch/arm/cpu/armv7/at91
It looks reasonable to collect at91 sources into a single place, arch/arm/mach-at91
This does make it clear that the chips are in a single family. We can have different files for the chip-specific stuff such as low-level code. But this approach makes it easier to use common code I think.
[2] Collect C/ASM sources and headers into a single place
Now SoC-specific sources are under ./arch/${ARCH}/cpu/${CPU}/${SOC}/
But headers are ./arch/${ARCH}/include/asm/arch-${SOC}/
In the new structure, ./arch/arm/mach-${SOC}/ : C/ASM files ./arch/arm/mach-${SOC}/include/ : Header files
This seems better to me.
[3] Do not create a symbolic link to header dicrectory
mkconfig creates a symbolic link to arch/asm/include/asm/arch-${SOC}
I dislike creating a symbolic link by configuration and remove it by mrproper.
Linux Kernel did that long time ago, but they did away with it.
OK
Regards, Simon