Skip to content

Commit e97ff12

Browse files
committed
ARC: [Review] Multi-platform image raspberrypi#4: Isolate platform headers
-Top level ARC makefile removes -I for platform headers -asm/irq.h no longer includes plat/irq.h -platform makefile adds -I for it's specfic platform headers -platform code to directly include it's plat/irq.h -Linker script needed plat/memmap.h for CCM info, already in .config Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Cc: Arnd Bergmann <arnd@arndb.de> Acked-by: Arnd Bergmann <arnd@arndb.de>
1 parent 877768c commit e97ff12

7 files changed

Lines changed: 7 additions & 20 deletions

File tree

‎arch/arc/Makefile‎

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,6 @@ UTS_MACHINE := arc
1010

1111
KBUILD_DEFCONFIG := fpga_defconfig
1212

13-
# For ARC FPGA Platforms
14-
platform-$(CONFIG_ARC_PLAT_FPGA_LEGACY) := arcfpga
15-
#New platform adds here
16-
17-
PLATFORM := $(platform-y)
18-
export PLATFORM
19-
20-
cflags-y += -Iarch/arc/plat-$(PLATFORM)/include
2113
cflags-y += -mA7 -fno-common -pipe -fno-builtin -D__linux__
2214

2315
LINUXINCLUDE += -include ${src}/arch/arc/include/asm/defines.h
@@ -86,9 +78,6 @@ KBUILD_CFLAGS += $(cflags-y)
8678
KBUILD_AFLAGS += $(KBUILD_CFLAGS)
8779
LDFLAGS += $(ldflags-y)
8880

89-
# Needed for Linker script preprocessing
90-
KBUILD_CPPFLAGS += -Iarch/arc/plat-$(PLATFORM)/include
91-
9281
head-y := arch/arc/kernel/head.o
9382

9483
# See arch/arc/Kbuild for content of core part of the kernel
@@ -97,10 +86,7 @@ core-y += arch/arc/
9786
# w/o this dtb won't embed into kernel binary
9887
core-y += arch/arc/boot/dts/
9988

100-
# w/o this ifneq, make ARCH=arc clean was crapping out
101-
ifneq ($(platform-y),)
102-
core-y += arch/arc/plat-$(PLATFORM)/
103-
endif
89+
core-$(CONFIG_ARC_PLAT_FPGA_LEGACY) += arch/arc/plat-arcfpga/
10490

10591
drivers-$(CONFIG_OPROFILE) += arch/arc/oprofile/
10692

‎arch/arc/include/asm/irq.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#define TIMER0_IRQ 3
1414
#define TIMER1_IRQ 4
1515

16-
#include <plat/irq.h> /* Board Specific IRQ assignments */
1716
#include <asm-generic/irq.h>
1817

1918
extern void __init arc_init_IRQ(void);

‎arch/arc/kernel/vmlinux.lds.S‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include <asm/cache.h>
1111
#include <asm/page.h>
1212
#include <asm/thread_info.h>
13-
#include <plat/memmap.h>
1413

1514
OUTPUT_ARCH(arc)
1615
ENTRY(_stext)

‎arch/arc/plat-arcfpga/Makefile‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@
66
# published by the Free Software Foundation.
77
#
88

9+
KBUILD_CFLAGS += -Iarch/arc/plat-arcfpga/include
10+
911
obj-y := platform.o irq.o
1012
obj-$(CONFIG_SMP) += smp.o

‎arch/arc/plat-arcfpga/irq.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010

1111
#include <linux/interrupt.h>
12-
#include <asm/irq.h>
12+
#include <plat/irq.h>
1313

1414
void __init plat_fpga_init_IRQ(void)
1515
{

‎arch/arc/plat-arcfpga/platform.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
#include <linux/console.h>
1717
#include <linux/of_platform.h>
1818
#include <asm/setup.h>
19-
#include <asm/irq.h>
2019
#include <asm/clk.h>
2120
#include <asm/mach_desc.h>
2221
#include <plat/memmap.h>
2322
#include <plat/smp.h>
23+
#include <plat/irq.h>
2424

2525
/*-----------------------BVCI Latency Unit -----------------------------*/
2626

‎arch/arc/plat-arcfpga/smp.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
*/
1313

1414
#include <linux/smp.h>
15-
#include <asm/irq.h>
15+
#include <linux/irq.h>
16+
#include <plat/irq.h>
1617
#include <plat/smp.h>
1718

1819
static char smp_cpuinfo_buf[128];

0 commit comments

Comments
 (0)