
Hi Stephen,
2015-03-17 13:23 GMT+09:00 Stephen Warren swarren@nvidia.com:
On 03/16/2015 09:51 PM, Masahiro Yamada wrote:
Hi Stephen,
2015-03-17 12:39 GMT+09:00 Stephen Warren swarren@nvidia.com:
On 03/16/2015 04:35 AM, Masahiro Yamada wrote:
BCM2835 (used on Raspberry Pi) and BCM2836 (used on Raspberry Pi 2) are similar enough. One of the biggest differences is the ARM processor. It is reasonable to collect the source files into a single place, arch/arm/mach-bcm283x/.
diff --git a/arch/arm/cpu/arm1176/bcm2835/Makefile b/arch/arm/mach-bcm283x/Makefile
-obj-y := lowlevel_init.o +obj-$(CONFIG_TARGET_RPI) += lowlevel_init.o obj-y += init.o reset.o timer.o mbox.o
Why is only one file conditional; shouldn't they all be either -y or -$(CONFIG_TARGET_RPI)?
This patch just moves source files, not changing the behavior.
If you see arch/arm/cpu/armv7/bcm2835/Makefile (it is added by you),
--------------->8------------------ src_dir := ../../arm1176/bcm2835/
obj-y := obj-y += $(src_dir)/init.o obj-y += $(src_dir)/reset.o obj-y += $(src_dir)/timer.o obj-y += $(src_dir)/mbox.o --------------8<------------------
BCM2836 borrows source files from BCM2835, except lowlevel_init.S.
I intended to reflect the same behavior.
Anyway, lowlevel_init is not linked for Raspberry Pi2 because you added CONFIG_SKIP_LOWLEVEL_INIT to include/configs/rpi_2.h
OK, that makes sense. But, shouldn't the bcm2835-specific file be left in its existing location rather than putting it into a common location when it isn't common? _______________________________________________
I'd like to remove arch/arm/cpu/arm1176/bcm2835. My motivation is to collect all the BCM283x source files under arch/arm/mach-bcm283x.
If we have bcm2835-specific files in the future (although I do not think so), we can create arch/arm/mach-bcm283x/bcm2835/ directory.