Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/arch/sh/kernel/ioport.c
26442 views
1
// SPDX-License-Identifier: GPL-2.0
2
/*
3
* arch/sh/kernel/ioport.c
4
*
5
* Copyright (C) 2000 Niibe Yutaka
6
* Copyright (C) 2005 - 2007 Paul Mundt
7
*/
8
#include <linux/module.h>
9
#include <linux/io.h>
10
#include <asm/io_trapped.h>
11
12
unsigned long sh_io_port_base __read_mostly = -1;
13
EXPORT_SYMBOL(sh_io_port_base);
14
15
void __iomem *ioport_map(unsigned long port, unsigned int nr)
16
{
17
void __iomem *ret;
18
19
ret = __ioport_map_trapped(port, nr);
20
if (ret)
21
return ret;
22
23
return (void __iomem *)(port + sh_io_port_base);
24
}
25
EXPORT_SYMBOL(ioport_map);
26
27