summaryrefslogtreecommitdiff
path: root/src/soc/nvidia/tegra/pinmux.c
blob: ee5d80ee57bf18d820c0e5e6cf4e81d4b16deb86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* SPDX-License-Identifier: GPL-2.0-only */
/* This file is part of the coreboot project. */

#include <device/mmio.h>
#include <soc/addressmap.h>

#include "pinmux.h"

static uint32_t *pinmux_regs = (void *)TEGRA_APB_PINMUX_BASE;

void pinmux_set_config(int pin_index, uint32_t config)
{
	write32(&pinmux_regs[pin_index], config);
}

uint32_t pinmux_get_config(int pin_index)
{
	return read32(&pinmux_regs[pin_index]);
}