2018-12-28 00:32:24 -08:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2010-11-01 09:49:04 -04:00
|
|
|
/*
|
|
|
|
* arch/sh/kernel/ioport.c
|
|
|
|
*
|
|
|
|
* Copyright (C) 2000 Niibe Yutaka
|
|
|
|
* Copyright (C) 2005 - 2007 Paul Mundt
|
|
|
|
*/
|
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/io.h>
|
2020-07-14 14:18:52 +02:00
|
|
|
#include <asm/io_trapped.h>
|
2010-11-01 09:49:04 -04:00
|
|
|
|
2012-10-04 17:11:41 -07:00
|
|
|
unsigned long sh_io_port_base __read_mostly = -1;
|
2010-11-01 09:49:04 -04:00
|
|
|
EXPORT_SYMBOL(sh_io_port_base);
|
|
|
|
|
|
|
|
void __iomem *ioport_map(unsigned long port, unsigned int nr)
|
|
|
|
{
|
|
|
|
void __iomem *ret;
|
|
|
|
|
|
|
|
ret = __ioport_map_trapped(port, nr);
|
|
|
|
if (ret)
|
|
|
|
return ret;
|
|
|
|
|
2023-09-14 17:55:23 +02:00
|
|
|
return (void __iomem *)(port + sh_io_port_base);
|
2010-11-01 09:49:04 -04:00
|
|
|
}
|
|
|
|
EXPORT_SYMBOL(ioport_map);
|
|
|
|
|
|
|
|
void ioport_unmap(void __iomem *addr)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
EXPORT_SYMBOL(ioport_unmap);
|