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

ARM: OMAP: Fix relative includes for fpga.h

As discussed on linux-arm-kernel, we want to avoid
relative includes for the arch/arm/*omap* code:

http://www.spinics.net/lists/linux-omap/msg80520.html

Fix includes for fpga.h by making fpga.h local
to mach-omap1. The common code in plat-omap just
needs to know the struct h2p2_dbg_fpga, which can
be local to debug-leds.c.

This also fixes the braindead <../*.h> style includes
that got accidentally added with search and replace
during the cleanup.

Signed-off-by: Tony Lindgren <tony@atomide.com>

+23 -30
+1 -1
arch/arm/mach-omap1/board-fsample.c
··· 30 30 #include <mach/tc.h> 31 31 #include <mach/mux.h> 32 32 #include <mach/flash.h> 33 - #include <../plat-omap/fpga.h> 34 33 #include <linux/platform_data/keypad-omap.h> 35 34 36 35 #include <mach/hardware.h> 37 36 38 37 #include "iomap.h" 39 38 #include "common.h" 39 + #include "fpga.h" 40 40 41 41 /* fsample is pretty close to p2-sample */ 42 42
-1
arch/arm/mach-omap1/board-innovator.c
··· 33 33 34 34 #include <mach/mux.h> 35 35 #include <mach/flash.h> 36 - #include <../plat-omap/fpga.h> 37 36 #include <mach/tc.h> 38 37 #include <linux/platform_data/keypad-omap.h> 39 38
+1 -1
arch/arm/mach-omap1/board-perseus2.c
··· 30 30 31 31 #include <mach/tc.h> 32 32 #include <mach/mux.h> 33 - #include <../plat-omap/fpga.h> 34 33 #include <mach/flash.h> 35 34 36 35 #include <mach/hardware.h> 37 36 38 37 #include "iomap.h" 39 38 #include "common.h" 39 + #include "fpga.h" 40 40 41 41 static const unsigned int p2_keymap[] = { 42 42 KEY(0, 0, KEY_UP),
+1 -2
arch/arm/mach-omap1/fpga.c
··· 27 27 #include <asm/irq.h> 28 28 #include <asm/mach/irq.h> 29 29 30 - #include <../plat-omap/fpga.h> 31 - 32 30 #include <mach/hardware.h> 33 31 34 32 #include "iomap.h" 35 33 #include "common.h" 34 + #include "fpga.h" 36 35 37 36 static void fpga_mask_irq(struct irq_data *d) 38 37 {
+20 -3
arch/arm/plat-omap/debug-leds.c
··· 17 17 #include <linux/platform_data/gpio-omap.h> 18 18 #include <linux/slab.h> 19 19 20 - #include <mach/hardware.h> 21 20 #include <asm/mach-types.h> 22 - 23 - #include "fpga.h" 24 21 25 22 /* Many OMAP development platforms reuse the same "debug board"; these 26 23 * platforms include H2, H3, H4, and Perseus2. There are 16 LEDs on the 27 24 * debug board (all green), accessed through FPGA registers. 28 25 */ 26 + 27 + /* NOTE: most boards don't have a static mapping for the FPGA ... */ 28 + struct h2p2_dbg_fpga { 29 + /* offset 0x00 */ 30 + u16 smc91x[8]; 31 + /* offset 0x10 */ 32 + u16 fpga_rev; 33 + u16 board_rev; 34 + u16 gpio_outputs; 35 + u16 leds; 36 + /* offset 0x18 */ 37 + u16 misc_inputs; 38 + u16 lan_status; 39 + u16 lan_reset; 40 + u16 reserved0; 41 + /* offset 0x20 */ 42 + u16 ps2_data; 43 + u16 ps2_ctrl; 44 + /* plus also 4 rs232 ports ... */ 45 + }; 29 46 30 47 static struct h2p2_dbg_fpga __iomem *fpga; 31 48
-22
arch/arm/plat-omap/fpga.h arch/arm/mach-omap1/fpga.h
··· 1 1 /* 2 - * arch/arm/plat-omap/include/mach/fpga.h 3 - * 4 2 * Interrupt handler for OMAP-1510 FPGA 5 3 * 6 4 * Copyright (C) 2001 RidgeRun, Inc. ··· 35 37 #define H2P2_DBG_FPGA_MISC_INPUTS IOMEM(H2P2_DBG_FPGA_BASE + 0x18) /* Misc inputs */ 36 38 #define H2P2_DBG_FPGA_LAN_STATUS IOMEM(H2P2_DBG_FPGA_BASE + 0x1A) /* LAN Status line */ 37 39 #define H2P2_DBG_FPGA_LAN_RESET IOMEM(H2P2_DBG_FPGA_BASE + 0x1C) /* LAN Reset line */ 38 - 39 - /* NOTE: most boards don't have a static mapping for the FPGA ... */ 40 - struct h2p2_dbg_fpga { 41 - /* offset 0x00 */ 42 - u16 smc91x[8]; 43 - /* offset 0x10 */ 44 - u16 fpga_rev; 45 - u16 board_rev; 46 - u16 gpio_outputs; 47 - u16 leds; 48 - /* offset 0x18 */ 49 - u16 misc_inputs; 50 - u16 lan_status; 51 - u16 lan_reset; 52 - u16 reserved0; 53 - /* offset 0x20 */ 54 - u16 ps2_data; 55 - u16 ps2_ctrl; 56 - /* plus also 4 rs232 ports ... */ 57 - }; 58 40 59 41 /* LEDs definition on debug board (16 LEDs, all physically green) */ 60 42 #define H2P2_DBG_FPGA_LED_GREEN (1 << 15)