rmixl_obio_el_space.c revision 1.2
11.2Smatt/* $NetBSD: rmixl_obio_el_space.c,v 1.2 2011/02/20 07:48:37 matt Exp $ */ 21.2Smatt 31.2Smatt/*- 41.2Smatt * Copyright (c) 2001 The NetBSD Foundation, Inc. 51.2Smatt * All rights reserved. 61.2Smatt * 71.2Smatt * This code is derived from software contributed to The NetBSD Foundation 81.2Smatt * by Jason R. Thorpe. 91.2Smatt * 101.2Smatt * Redistribution and use in source and binary forms, with or without 111.2Smatt * modification, are permitted provided that the following conditions 121.2Smatt * are met: 131.2Smatt * 1. Redistributions of source code must retain the above copyright 141.2Smatt * notice, this list of conditions and the following disclaimer. 151.2Smatt * 2. Redistributions in binary form must reproduce the above copyright 161.2Smatt * notice, this list of conditions and the following disclaimer in the 171.2Smatt * documentation and/or other materials provided with the distribution. 181.2Smatt * 191.2Smatt * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 201.2Smatt * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 211.2Smatt * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 221.2Smatt * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 231.2Smatt * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 241.2Smatt * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 251.2Smatt * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 261.2Smatt * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 271.2Smatt * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 281.2Smatt * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 291.2Smatt * POSSIBILITY OF SUCH DAMAGE. 301.2Smatt */ 311.2Smatt 321.2Smatt/* 331.2Smatt * Litle Endian bus_space(9) support for RMI {XLP,XLR,XLS} obio 341.2Smatt */ 351.2Smatt 361.2Smatt#include <sys/cdefs.h> 371.2Smatt__KERNEL_RCSID(0, "$NetBSD: rmixl_obio_el_space.c,v 1.2 2011/02/20 07:48:37 matt Exp $"); 381.2Smatt 391.2Smatt#include <sys/types.h> 401.2Smatt#include <sys/param.h> 411.2Smatt 421.2Smatt#include <machine/bus.h> 431.2Smatt#include <mips/rmi/rmixl_obiovar.h> 441.2Smatt#include <mips/rmi/rmixlreg.h> 451.2Smatt#include <mips/rmi/rmixlvar.h> 461.2Smatt 471.2Smatt#define CHIP rmixl_obio_el 481.2Smatt#define CHIP_MEM /* defined */ 491.2Smatt#define CHIP_ACCESS_SIZE 4 501.2Smatt#define CHIP_LITTLE_ENDIAN 511.2Smatt 521.2Smatt#define CHIP_EX_MALLOC_SAFE(v) (((struct rmixl_config *)(v))->rc_mallocsafe) 531.2Smatt#define CHIP_EXTENT(v) (((struct rmixl_config *)(v))->rc_obio_el_ex) 541.2Smatt 551.2Smatt 561.2Smatt/* MEM region 1 */ 571.2Smatt#define CHIP_W1_BUS_START(v) 0 581.2Smatt#define CHIP_W1_BUS_END(v) (RMIXL_IO_DEV_SIZE - 1) 591.2Smatt#define CHIP_W1_SYS_START(v) (((struct rmixl_config *)(v))->rc_io_pbase) 601.2Smatt#define CHIP_W1_SYS_END(v) (CHIP_W1_SYS_START(v) + RMIXL_IO_DEV_SIZE - 1) 611.2Smatt 621.2Smatt#include <mips/mips/bus_space_alignstride_chipdep.c> 63