1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (c) 2018 Microsemi Corporation
9 void mscc_gpio_set_alternate(int gpio, int mode)
14 val0 = readl(BASE_DEVCPU_GCB + GPIO_ALT(0));
15 val1 = readl(BASE_DEVCPU_GCB + GPIO_ALT(1));
20 } else if (mode == 2) {
23 } else if (mode == 3) {
31 writel(val0, BASE_DEVCPU_GCB + GPIO_ALT(0));
32 writel(val1, BASE_DEVCPU_GCB + GPIO_ALT(1));