.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
---|
1 | 2 | /* |
---|
2 | 3 | * OMAP GPIO handling defines and functions |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2003-2005 Nokia Corporation |
---|
5 | 6 | * |
---|
6 | 7 | * Written by Juha Yrjölä <juha.yrjola@nokia.com> |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or modify |
---|
9 | | - * it under the terms of the GNU General Public License as published by |
---|
10 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
11 | | - * (at your option) any later version. |
---|
12 | | - * |
---|
13 | | - * This program is distributed in the hope that it will be useful, |
---|
14 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | | - * GNU General Public License for more details. |
---|
17 | | - * |
---|
18 | | - * You should have received a copy of the GNU General Public License |
---|
19 | | - * along with this program; if not, write to the Free Software |
---|
20 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
21 | | - * |
---|
22 | 8 | */ |
---|
23 | 9 | |
---|
24 | 10 | #ifndef __ASM_ARCH_OMAP_GPIO_H |
---|
25 | 11 | #define __ASM_ARCH_OMAP_GPIO_H |
---|
26 | 12 | |
---|
| 13 | +#ifndef __ASSEMBLER__ |
---|
27 | 14 | #include <linux/io.h> |
---|
28 | 15 | #include <linux/platform_device.h> |
---|
| 16 | +#endif |
---|
29 | 17 | |
---|
30 | 18 | #define OMAP1_MPUIO_BASE 0xfffb5000 |
---|
31 | 19 | |
---|
.. | .. |
---|
97 | 85 | * omap2+ specific GPIO registers |
---|
98 | 86 | */ |
---|
99 | 87 | #define OMAP24XX_GPIO_REVISION 0x0000 |
---|
| 88 | +#define OMAP24XX_GPIO_SYSCONFIG 0x0010 |
---|
100 | 89 | #define OMAP24XX_GPIO_IRQSTATUS1 0x0018 |
---|
101 | 90 | #define OMAP24XX_GPIO_IRQSTATUS2 0x0028 |
---|
102 | 91 | #define OMAP24XX_GPIO_IRQENABLE2 0x002c |
---|
.. | .. |
---|
120 | 109 | #define OMAP24XX_GPIO_SETDATAOUT 0x0094 |
---|
121 | 110 | |
---|
122 | 111 | #define OMAP4_GPIO_REVISION 0x0000 |
---|
| 112 | +#define OMAP4_GPIO_SYSCONFIG 0x0010 |
---|
123 | 113 | #define OMAP4_GPIO_EOI 0x0020 |
---|
124 | 114 | #define OMAP4_GPIO_IRQSTATUSRAW0 0x0024 |
---|
125 | 115 | #define OMAP4_GPIO_IRQSTATUSRAW1 0x0028 |
---|
.. | .. |
---|
157 | 147 | #define OMAP_MPUIO(nr) (OMAP_MAX_GPIO_LINES + (nr)) |
---|
158 | 148 | #define OMAP_GPIO_IS_MPUIO(nr) ((nr) >= OMAP_MAX_GPIO_LINES) |
---|
159 | 149 | |
---|
| 150 | +#ifndef __ASSEMBLER__ |
---|
160 | 151 | struct omap_gpio_reg_offs { |
---|
161 | 152 | u16 revision; |
---|
| 153 | + u16 sysconfig; |
---|
162 | 154 | u16 direction; |
---|
163 | 155 | u16 datain; |
---|
164 | 156 | u16 dataout; |
---|
.. | .. |
---|
197 | 189 | bool is_mpuio; /* whether the bank is of type MPUIO */ |
---|
198 | 190 | u32 non_wakeup_gpios; |
---|
199 | 191 | |
---|
200 | | - struct omap_gpio_reg_offs *regs; |
---|
| 192 | + const struct omap_gpio_reg_offs *regs; |
---|
201 | 193 | |
---|
202 | 194 | /* Return context loss count due to PM states changing */ |
---|
203 | 195 | int (*get_context_loss_count)(struct device *dev); |
---|
204 | 196 | }; |
---|
205 | 197 | |
---|
206 | | -#if IS_BUILTIN(CONFIG_GPIO_OMAP) |
---|
207 | | -extern void omap2_gpio_prepare_for_idle(int off_mode); |
---|
208 | | -extern void omap2_gpio_resume_after_idle(void); |
---|
209 | | -#else |
---|
210 | | -static inline void omap2_gpio_prepare_for_idle(int off_mode) |
---|
211 | | -{ |
---|
212 | | -} |
---|
213 | | - |
---|
214 | | -static inline void omap2_gpio_resume_after_idle(void) |
---|
215 | | -{ |
---|
216 | | -} |
---|
217 | | -#endif |
---|
| 198 | +#endif /* __ASSEMBLER__ */ |
---|
218 | 199 | |
---|
219 | 200 | #endif |
---|