1*be86510bSskrll /* $NetBSD: gt_io_space.c,v 1.1 2018/01/20 13:56:09 skrll Exp $ */ 2*be86510bSskrll 3*be86510bSskrll /* 4*be86510bSskrll * Copyright (c) 2016 The NetBSD Foundation, Inc. 5*be86510bSskrll * All rights reserved. 6*be86510bSskrll * 7*be86510bSskrll * This code is derived from software contributed to The NetBSD Foundation 8*be86510bSskrll * by Nick Hudson. 9*be86510bSskrll * 10*be86510bSskrll * Redistribution and use in source and binary forms, with or without 11*be86510bSskrll * modification, are permitted provided that the following conditions 12*be86510bSskrll * are met: 13*be86510bSskrll * 1. Redistributions of source code must retain the above copyright 14*be86510bSskrll * notice, this list of conditions and the following disclaimer. 15*be86510bSskrll * 2. Redistributions in binary form must reproduce the above copyright 16*be86510bSskrll * notice, this list of conditions and the following disclaimer in the 17*be86510bSskrll * documentation and/or other materials provided with the distribution. 18*be86510bSskrll * 19*be86510bSskrll * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20*be86510bSskrll * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21*be86510bSskrll * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22*be86510bSskrll * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23*be86510bSskrll * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24*be86510bSskrll * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25*be86510bSskrll * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26*be86510bSskrll * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27*be86510bSskrll * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28*be86510bSskrll * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29*be86510bSskrll * POSSIBILITY OF SUCH DAMAGE. 30*be86510bSskrll */ 31*be86510bSskrll 32*be86510bSskrll /* 33*be86510bSskrll * Little Endian bus_space(9) support for PCI IO access 34*be86510bSskrll * on cobalt machines 35*be86510bSskrll */ 36*be86510bSskrll 37*be86510bSskrll #include <sys/cdefs.h> 38*be86510bSskrll __KERNEL_RCSID(0, "$NetBSD: gt_io_space.c,v 1.1 2018/01/20 13:56:09 skrll Exp $"); 39*be86510bSskrll 40*be86510bSskrll #include <sys/types.h> 41*be86510bSskrll #include <sys/param.h> 42*be86510bSskrll #include <sys/bus.h> 43*be86510bSskrll 44*be86510bSskrll #include <cobalt/dev/gtvar.h> 45*be86510bSskrll 46*be86510bSskrll #define CHIP gt 47*be86510bSskrll #define CHIP_IO /* defined */ 48*be86510bSskrll 49*be86510bSskrll /* IO region 1 */ 50*be86510bSskrll #define CHIP_W1_BUS_START(v) 0x00000000UL 51*be86510bSskrll #define CHIP_W1_BUS_END(v) 0x02000000UL 52*be86510bSskrll #define CHIP_W1_SYS_START(v) 0x10000000UL 53*be86510bSskrll #define CHIP_W1_SYS_END(v) 0x12000000UL 54*be86510bSskrll 55*be86510bSskrll void mainbus_bus_mem_init(bus_space_tag_t, void *); 56*be86510bSskrll 57*be86510bSskrll #include <mips/mips/bus_space_alignstride_chipdep.c> 58