]> git.ipfire.org Git - thirdparty/u-boot.git/blame - include/iomux.h
Merge patch series "mux: mmio: support "reg-mux" compatible"
[thirdparty/u-boot.git] / include / iomux.h
CommitLineData
83d290c5 1/* SPDX-License-Identifier: GPL-2.0+ */
16a28ef2
GJ
2/*
3 * (C) Copyright 2008
4 * Gary Jennejohn, DENX Software Engineering GmbH, garyj@denx.de.
16a28ef2
GJ
5 */
6
7#ifndef _IO_MUX_H
8#define _IO_MUX_H
9
52cb4d4f 10#include <stdio_dev.h>
16a28ef2
GJ
11
12/*
13 * Stuff required to support console multiplexing.
14 */
15
16/*
17 * Pointers to devices used for each file type. Defined in console.c
18 * but storage is allocated in iomux.c.
19 */
52cb4d4f 20extern struct stdio_dev **console_devices[MAX_FILES];
16a28ef2
GJ
21/*
22 * The count of devices assigned to each FILE. Defined in console.c
23 * and populated in iomux.c.
24 */
25extern int cd_count[MAX_FILES];
26
9dc775aa
SA
27#define for_each_console_dev(i, file, dev) \
28 for (i = 0; \
29 i < cd_count[file] && (dev = console_devices[file][i]); \
30 i++)
400797ca 31
b672c161 32int iomux_match_device(struct stdio_dev **, const int, struct stdio_dev *);
16a28ef2 33int iomux_doenv(const int, const char *);
694cd561 34int iomux_replace_device(const int, const char *, const char *);
16a28ef2 35void iomux_printdevs(const int);
16a28ef2
GJ
36
37#endif /* _IO_MUX_H */