1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (c) 2018 Microsemi Corporation
8 #include <linux/bitops.h>
10 void mscc_gpio_set_alternate(int gpio, int mode)
15 val0 = readl(BASE_DEVCPU_GCB + GPIO_ALT(0));
16 val1 = readl(BASE_DEVCPU_GCB + GPIO_ALT(1));
21 } else if (mode == 2) {
24 } else if (mode == 3) {
32 writel(val0, BASE_DEVCPU_GCB + GPIO_ALT(0));
33 writel(val1, BASE_DEVCPU_GCB + GPIO_ALT(1));