blob: e7fc650dac78dcf95d7bc9c569b00a95819b4b26 [file] [log] [blame]
Gabe Black08d5a892013-10-03 04:35:01 -07001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright 2013 Google Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
Gabe Black08d5a892013-10-03 04:35:01 -070014 */
15
16#include <arch/io.h>
17#include <soc/addressmap.h>
18
19#include "pinmux.h"
20
21static uint32_t *pinmux_regs = (void *)TEGRA_APB_PINMUX_BASE;
22
23void pinmux_set_config(int pin_index, uint32_t config)
24{
Julius Werner2f37bd62015-02-19 14:51:15 -080025 write32(&pinmux_regs[pin_index], config);
Gabe Black08d5a892013-10-03 04:35:01 -070026}
27
28uint32_t pinmux_get_config(int pin_index)
29{
30 return read32(&pinmux_regs[pin_index]);
31}