Skip to content

Commit 2668331

Browse files
jkrzyszttmlind
authored andcommitted
ARM: OMAP1: ams-delta-fiq: Use <linux/platform_data/gpio-omap.h>
Instead of defining symbols already defined in linux/platform_data/gpio-omap.h, use that header file. Since we include the header into an assembler code, prevent C only bits from being read in. Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
1 parent d3e952a commit 2668331

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

arch/arm/mach-omap1/ams-delta-fiq-handler.S

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
#include <linux/linkage.h>
1717
#include <linux/platform_data/ams-delta-fiq.h>
18+
#include <linux/platform_data/gpio-omap.h>
1819

1920
#include <asm/assembler.h>
2021
#include <mach/board-ams-delta.h>
@@ -24,17 +25,10 @@
2425
#include "soc.h"
2526

2627
/*
27-
* GPIO related definitions, copied from arch/arm/plat-omap/gpio.c.
28-
* Unfortunately, those were not placed in a separate header file.
28+
* OMAP1510 GPIO related symbol copied from arch/arm/mach-omap1/gpio15xx.c.
29+
* Unfortunately, it was not placed in a separate header file.
2930
*/
3031
#define OMAP1510_GPIO_BASE 0xFFFCE000
31-
#define OMAP1510_GPIO_DATA_INPUT 0x00
32-
#define OMAP1510_GPIO_DATA_OUTPUT 0x04
33-
#define OMAP1510_GPIO_DIR_CONTROL 0x08
34-
#define OMAP1510_GPIO_INT_CONTROL 0x0c
35-
#define OMAP1510_GPIO_INT_MASK 0x10
36-
#define OMAP1510_GPIO_INT_STATUS 0x14
37-
#define OMAP1510_GPIO_PIN_CONTROL 0x18
3832

3933
/* GPIO register bitmasks */
4034
#define KEYBRD_DATA_MASK (0x1 << AMS_DELTA_GPIO_PIN_KEYBRD_DATA)

include/linux/platform_data/gpio-omap.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@
2424
#ifndef __ASM_ARCH_OMAP_GPIO_H
2525
#define __ASM_ARCH_OMAP_GPIO_H
2626

27+
#ifndef __ASSEMBLER__
2728
#include <linux/io.h>
2829
#include <linux/platform_device.h>
30+
#endif
2931

3032
#define OMAP1_MPUIO_BASE 0xfffb5000
3133

@@ -157,6 +159,7 @@
157159
#define OMAP_MPUIO(nr) (OMAP_MAX_GPIO_LINES + (nr))
158160
#define OMAP_GPIO_IS_MPUIO(nr) ((nr) >= OMAP_MAX_GPIO_LINES)
159161

162+
#ifndef __ASSEMBLER__
160163
struct omap_gpio_reg_offs {
161164
u16 revision;
162165
u16 direction;
@@ -215,5 +218,6 @@ static inline void omap2_gpio_resume_after_idle(void)
215218
{
216219
}
217220
#endif
221+
#endif /* __ASSEMBLER__ */
218222

219223
#endif

0 commit comments

Comments
 (0)