Skip to content

Commit 5d25b01

Browse files
sravnborgralfbaechle
authored andcommitted
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>
1 parent 66f9ba1 commit 5d25b01

5 files changed

Lines changed: 16 additions & 8 deletions

File tree

‎arch/mips/Kbuild‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# CFLAGS_<file.o> := -Wno-error
44
subdir-ccflags-y := -Werror
55

6+
# platform specific definitions
7+
include arch/mips/Kbuild.platforms
8+
obj-y := $(platform-y)
69

710
# mips object files
811
# The object files are linked as core-y files would be linked

‎arch/mips/Kbuild.platforms‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
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))

‎arch/mips/Makefile‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,7 @@ endif
209209
#
210210
# Board-dependent options and extra files
211211
#
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
219213

220214
#
221215
# Acer PICA 61, Mips Magnum 4000 and Olivetti M700.

‎arch/mips/ar7/Makefile‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ obj-y := \
88
platform.o \
99
gpio.o \
1010
clock.o
11-
EXTRA_CFLAGS += -Werror

‎arch/mips/ar7/Platform‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
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

0 commit comments

Comments
 (0)