Merge tag 'pci-v6.16-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
[linux-block.git] / arch / mips / include / asm / mach-bcm63xx / bcm63xx_gpio.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
e7300d04
MB
2#ifndef BCM63XX_GPIO_H
3#define BCM63XX_GPIO_H
4
5#include <linux/init.h>
442209f3 6#include <bcm63xx_cpu.h>
e7300d04
MB
7
8int __init bcm63xx_gpio_init(void);
9
10static inline unsigned long bcm63xx_gpio_count(void)
11{
12 switch (bcm63xx_get_cpu_id()) {
e5766aea
JG
13 case BCM6328_CPU_ID:
14 return 32;
7b933421 15 case BCM3368_CPU_ID:
e7300d04 16 return 40;
d1b28758
FF
17 case BCM6338_CPU_ID:
18 return 8;
19 case BCM6345_CPU_ID:
20 return 16;
6af2aa7f 21 case BCM6358_CPU_ID:
04712f3f
MB
22 case BCM6368_CPU_ID:
23 return 38;
6af2aa7f
DGC
24 case BCM6362_CPU_ID:
25 return 48;
e7300d04
MB
26 case BCM6348_CPU_ID:
27 default:
28 return 37;
29 }
30}
31
3e1bf29f
FF
32#define BCM63XX_GPIO_DIR_OUT 0x0
33#define BCM63XX_GPIO_DIR_IN 0x1
e7300d04
MB
34
35#endif /* !BCM63XX_GPIO_H */