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>
This commit is contained in:
Sam Ravnborg 2010-05-30 16:27:10 +02:00 committed by Ralf Baechle
parent 66f9ba101f
commit 5d25b01cf9
5 changed files with 16 additions and 8 deletions

View File

@ -3,6 +3,9 @@
# CFLAGS_<file.o> := -Wno-error # CFLAGS_<file.o> := -Wno-error
subdir-ccflags-y := -Werror subdir-ccflags-y := -Werror
# platform specific definitions
include arch/mips/Kbuild.platforms
obj-y := $(platform-y)
# mips object files # mips object files
# The object files are linked as core-y files would be linked # The object files are linked as core-y files would be linked

View File

@ -0,0 +1,6 @@
# All platforms listed in alphabetic order
platforms += ar7
# include the platform specific files
include $(patsubst %, $(srctree)/arch/mips/%/Platform, $(platforms))

View File

@ -209,13 +209,7 @@ endif
# #
# Board-dependent options and extra files # Board-dependent options and extra files
# #
include $(srctree)/arch/mips/Kbuild.platforms
#
# Texas Instruments AR7
#
core-$(CONFIG_AR7) += arch/mips/ar7/
cflags-$(CONFIG_AR7) += -I$(srctree)/arch/mips/include/asm/mach-ar7
load-$(CONFIG_AR7) += 0xffffffff94100000
# #
# Acer PICA 61, Mips Magnum 4000 and Olivetti M700. # Acer PICA 61, Mips Magnum 4000 and Olivetti M700.

View File

@ -8,4 +8,3 @@ obj-y := \
platform.o \ platform.o \
gpio.o \ gpio.o \
clock.o clock.o
EXTRA_CFLAGS += -Werror

6
arch/mips/ar7/Platform Normal file
View File

@ -0,0 +1,6 @@
#
# Texas Instruments AR7
#
platform-$(CONFIG_AR7) += ar7/
cflags-$(CONFIG_AR7) += -I$(srctree)/arch/mips/include/asm/mach-ar7
load-$(CONFIG_AR7) += 0xffffffff94100000