18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci *  setup.c, Setup for the CASIO CASSIOPEIA E-11/15/55/65.
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci *  Copyright (C) 2002-2006  Yoichi Yuasa <yuasa@linux-mips.org>
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci#include <linux/init.h>
88c2ecf20Sopenharmony_ci#include <linux/ioport.h>
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci#include <asm/io.h>
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci#define E55_ISA_IO_BASE		0x1400c000
138c2ecf20Sopenharmony_ci#define E55_ISA_IO_SIZE		0x03ff4000
148c2ecf20Sopenharmony_ci#define E55_ISA_IO_START	0
158c2ecf20Sopenharmony_ci#define E55_ISA_IO_END		(E55_ISA_IO_SIZE - 1)
168c2ecf20Sopenharmony_ci#define E55_IO_PORT_BASE	KSEG1ADDR(E55_ISA_IO_BASE)
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_cistatic int __init casio_e55_setup(void)
198c2ecf20Sopenharmony_ci{
208c2ecf20Sopenharmony_ci	set_io_port_base(E55_IO_PORT_BASE);
218c2ecf20Sopenharmony_ci	ioport_resource.start = E55_ISA_IO_START;
228c2ecf20Sopenharmony_ci	ioport_resource.end = E55_ISA_IO_END;
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci	return 0;
258c2ecf20Sopenharmony_ci}
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ciarch_initcall(casio_e55_setup);
28