ixp425_a4x_space.c revision 277460
1169695Skan/* $NetBSD: ixp425_a4x_space.c,v 1.2 2005/12/11 12:16:51 christos Exp $ */ 2169695Skan 3169695Skan/* 4169695Skan * Copyright 2003 Wasabi Systems, Inc. 5169695Skan * All rights reserved. 6169695Skan * 7169695Skan * Written by Steve C. Woodford for Wasabi Systems, Inc. 8169695Skan * 9169695Skan * Redistribution and use in source and binary forms, with or without 10169695Skan * modification, are permitted provided that the following conditions 11169695Skan * are met: 12169695Skan * 1. Redistributions of source code must retain the above copyright 13169695Skan * notice, this list of conditions and the following disclaimer. 14169695Skan * 2. Redistributions in binary form must reproduce the above copyright 15169695Skan * notice, this list of conditions and the following disclaimer in the 16169695Skan * documentation and/or other materials provided with the distribution. 17169695Skan * 3. All advertising materials mentioning features or use of this software 18169695Skan * must display the following acknowledgement: 19169695Skan * This product includes software developed for the NetBSD Project by 20169695Skan * Wasabi Systems, Inc. 21169695Skan * 4. The name of Wasabi Systems, Inc. may not be used to endorse 22169695Skan * or promote products derived from this software without specific prior 23169695Skan * written permission. 24169695Skan * 25169695Skan * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND 26169695Skan * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 27169695Skan * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 28169695Skan * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC 29169695Skan * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30169695Skan * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31169695Skan * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32169695Skan * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33169695Skan * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34169695Skan * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35169695Skan * POSSIBILITY OF SUCH DAMAGE. 36169695Skan */ 37169695Skan 38169695Skan/* 39169695Skan * Bus space tag for 8/16-bit devices on 32-bit bus. 40169695Skan * all registers are located at the address of multiple of 4. 41169695Skan * 42169695Skan * Based on pxa2x0_a4x_space.c 43169695Skan */ 44169695Skan 45169695Skan#include <sys/cdefs.h> 46169695Skan__FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/ixp425_a4x_space.c 277460 2015-01-21 01:06:08Z ian $"); 47169695Skan 48169695Skan#include <sys/param.h> 49169695Skan#include <sys/systm.h> 50169695Skan#include <sys/bus.h> 51169695Skan 52169695Skan#include <machine/pcb.h> 53169695Skan 54169695Skan#include <vm/vm.h> 55169695Skan#include <vm/vm_kern.h> 56169695Skan#include <vm/pmap.h> 57169695Skan#include <vm/vm_page.h> 58169695Skan#include <vm/vm_extern.h> 59169695Skan 60169695Skan#include <machine/bus.h> 61169695Skan 62169695Skan/* Prototypes for all the bus_space structure functions */ 63169695Skanbs_protos(a4x); 64169695Skanbs_protos(generic); 65169695Skanbs_protos(generic_armv4); 66169695Skan 67169695Skanstruct bus_space ixp425_a4x_bs_tag = { 68169695Skan /* cookie */ 69169695Skan .bs_privdata = (void *) 0, 70169695Skan 71169695Skan /* mapping/unmapping */ 72169695Skan .bs_map = generic_bs_map, 73169695Skan .bs_unmap = generic_bs_unmap, 74169695Skan .bs_subregion = generic_bs_subregion, 75169695Skan 76169695Skan /* allocation/deallocation */ 77169695Skan .bs_alloc = generic_bs_alloc, /* XXX not implemented */ 78169695Skan .bs_free = generic_bs_free, /* XXX not implemented */ 79169695Skan 80169695Skan /* barrier */ 81169695Skan .bs_barrier = generic_bs_barrier, 82169695Skan 83169695Skan /* read (single) */ 84169695Skan .bs_r_1 = a4x_bs_r_1, 85169695Skan .bs_r_2 = a4x_bs_r_2, 86169695Skan .bs_r_4 = a4x_bs_r_4, 87169695Skan 88169695Skan /* read multiple */ 89169695Skan .bs_rm_1 = a4x_bs_rm_1, 90169695Skan .bs_rm_2 = a4x_bs_rm_2, 91169695Skan 92169695Skan /* read region */ 93169695Skan /* XXX not implemented */ 94169695Skan 95169695Skan /* write (single) */ 96169695Skan .bs_w_1 = a4x_bs_w_1, 97169695Skan .bs_w_2 = a4x_bs_w_2, 98169695Skan .bs_w_4 = a4x_bs_w_4, 99169695Skan 100169695Skan /* write multiple */ 101169695Skan .bs_wm_1 = a4x_bs_wm_1, 102169695Skan .bs_wm_2 = a4x_bs_wm_2, 103169695Skan 104169695Skan /* write region */ 105169695Skan /* XXX not implemented */ 106169695Skan 107169695Skan /* set multiple */ 108169695Skan /* XXX not implemented */ 109169695Skan 110169695Skan /* set region */ 111169695Skan /* XXX not implemented */ 112169695Skan 113169695Skan /* copy */ 114169695Skan /* XXX not implemented */ 115169695Skan}; 116169695Skan