1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <device/mmio.h>
7 void *gpio_find_reg_addr(gpio_t gpio
)
10 switch (gpio
.base
& 0x0f) {
12 reg_addr
= (void *)IOCFG_RM_BASE
;
15 reg_addr
= (void *)IOCFG_BM_BASE
;
18 reg_addr
= (void *)IOCFG_BL_BASE
;
21 reg_addr
= (void *)IOCFG_BR_BASE
;
24 reg_addr
= (void *)IOCFG_LM_BASE
;
27 reg_addr
= (void *)IOCFG_LB_BASE
;
30 reg_addr
= (void *)IOCFG_RT_BASE
;
33 reg_addr
= (void *)IOCFG_LT_BASE
;
36 reg_addr
= (void *)IOCFG_TL_BASE
;