blob: 1c6b65f4a008c03f46f5074274dcd92fe6e200c5 [file] [log] [blame]
Peter Korsgaard5d3f6822012-10-18 01:21:11 +00001/*
2 * mux.h
3 *
Matt Porterb409a802013-03-15 10:07:05 +00004 * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/
Peter Korsgaard5d3f6822012-10-18 01:21:11 +00005 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation version 2.
9 *
10 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
11 * kind, whether express or implied; without even the implied warranty
12 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
16#ifndef _MUX_H_
17#define _MUX_H_
18
19#include <common.h>
20#include <asm/io.h>
21
Matt Porterb409a802013-03-15 10:07:05 +000022#ifdef CONFIG_AM33XX
23#include <asm/arch/mux_am33xx.h>
24#elif defined(CONFIG_TI814X)
25#include <asm/arch/mux_ti814x.h>
26#endif
Peter Korsgaard5d3f6822012-10-18 01:21:11 +000027
28struct module_pin_mux {
29 short reg_offset;
Matt Porterb409a802013-03-15 10:07:05 +000030 unsigned int val;
Peter Korsgaard5d3f6822012-10-18 01:21:11 +000031};
32
33/* Pad control register offset */
34#define PAD_CTRL_BASE 0x800
35#define OFFSET(x) (unsigned int) (&((struct pad_signals *) \
36 (PAD_CTRL_BASE))->x)
37
38/*
39 * Configure the pin mux for the module
40 */
41void configure_module_pin_mux(struct module_pin_mux *mod_pin_mux);
42
Matt Porterb409a802013-03-15 10:07:05 +000043#endif /* endif _MUX_H */