blob: f704afaca12b26f24dadcbb4084d6fccea09a9d8 [file] [log] [blame]
Peter Korsgaard5d3f6822012-10-18 01:21:11 +00001/*
2 * mux.h
3 *
Nishanth Menoneaa39c62023-11-01 15:56:03 -05004 * Copyright (C) 2013 Texas Instruments Incorporated - https://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
Peter Korsgaard5d3f6822012-10-18 01:21:11 +000019#include <asm/io.h>
20
Matt Porterb409a802013-03-15 10:07:05 +000021#ifdef CONFIG_AM33XX
22#include <asm/arch/mux_am33xx.h>
Lokesh Vutla83269d02013-07-30 11:36:28 +053023#elif defined(CONFIG_AM43XX)
24#include <asm/arch/mux_am43xx.h>
Matt Porterb409a802013-03-15 10:07:05 +000025#endif
Peter Korsgaard5d3f6822012-10-18 01:21:11 +000026
27struct module_pin_mux {
28 short reg_offset;
Matt Porterb409a802013-03-15 10:07:05 +000029 unsigned int val;
Peter Korsgaard5d3f6822012-10-18 01:21:11 +000030};
31
32/* Pad control register offset */
33#define PAD_CTRL_BASE 0x800
Igor Grinberg165808d2014-10-21 18:25:30 +030034#define OFFSET(x) (unsigned int) (&((struct pad_signals *)\
Peter Korsgaard5d3f6822012-10-18 01:21:11 +000035 (PAD_CTRL_BASE))->x)
36
37/*
38 * Configure the pin mux for the module
39 */
40void configure_module_pin_mux(struct module_pin_mux *mod_pin_mux);
41
Matt Porterb409a802013-03-15 10:07:05 +000042#endif /* endif _MUX_H */