Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: Introduce support for Platform definitions

Move platform specific definitions to the platfrom directories.

Each platform shall do the following:
1) include an entry in arch/mips/Kbuild.platforms
2) add relevant definitions to arch/mips/<platform>/Platform

This commits changes ar7 to the new scheme as an example.

Introducing a platform speecific Platfrom file has following advantages:
1) decentralization of platfrom definitions
2) simplification af arch/mips/Makefile
3) force all platfrom to build with -Werror (done in arch/mips/Kbuild)

[Ralf: Remove forgotten -Werror from AR7 Makefile]

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
To: linux-mips <linux-mips@linux-mips.org>
To: Wu Zhangjin <wuzhangjin@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/1302/
Patchwork: http://patchwork.linux-mips.org/patch/1308/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Sam Ravnborg and committed by
Ralf Baechle
5d25b01c 66f9ba10

+16 -8
+3
arch/mips/Kbuild
··· 3 3 # CFLAGS_<file.o> := -Wno-error 4 4 subdir-ccflags-y := -Werror 5 5 6 + # platform specific definitions 7 + include arch/mips/Kbuild.platforms 8 + obj-y := $(platform-y) 6 9 7 10 # mips object files 8 11 # The object files are linked as core-y files would be linked
+6
arch/mips/Kbuild.platforms
··· 1 + # All platforms listed in alphabetic order 2 + 3 + platforms += ar7 4 + 5 + # include the platform specific files 6 + include $(patsubst %, $(srctree)/arch/mips/%/Platform, $(platforms))
+1 -7
arch/mips/Makefile
··· 209 209 # 210 210 # Board-dependent options and extra files 211 211 # 212 - 213 - # 214 - # Texas Instruments AR7 215 - # 216 - core-$(CONFIG_AR7) += arch/mips/ar7/ 217 - cflags-$(CONFIG_AR7) += -I$(srctree)/arch/mips/include/asm/mach-ar7 218 - load-$(CONFIG_AR7) += 0xffffffff94100000 212 + include $(srctree)/arch/mips/Kbuild.platforms 219 213 220 214 # 221 215 # Acer PICA 61, Mips Magnum 4000 and Olivetti M700.
-1
arch/mips/ar7/Makefile
··· 8 8 platform.o \ 9 9 gpio.o \ 10 10 clock.o 11 - EXTRA_CFLAGS += -Werror
+6
arch/mips/ar7/Platform
··· 1 + # 2 + # Texas Instruments AR7 3 + # 4 + platform-$(CONFIG_AR7) += ar7/ 5 + cflags-$(CONFIG_AR7) += -I$(srctree)/arch/mips/include/asm/mach-ar7 6 + load-$(CONFIG_AR7) += 0xffffffff94100000