ixp425_a4x_space.c revision 164426
117849Swosch/* $NetBSD: ixp425_a4x_space.c,v 1.2 2005/12/11 12:16:51 christos Exp $ */ 217849Swosch 315857Swosch/* 417849Swosch * Copyright 2003 Wasabi Systems, Inc. 517849Swosch * All rights reserved. 617849Swosch * 717849Swosch * Written by Steve C. Woodford for Wasabi Systems, Inc. 817849Swosch * 917849Swosch * Redistribution and use in source and binary forms, with or without 1017849Swosch * modification, are permitted provided that the following conditions 1117849Swosch * are met: 1217849Swosch * 1. Redistributions of source code must retain the above copyright 1317849Swosch * notice, this list of conditions and the following disclaimer. 1417849Swosch * 2. Redistributions in binary form must reproduce the above copyright 1517849Swosch * notice, this list of conditions and the following disclaimer in the 1617849Swosch * documentation and/or other materials provided with the distribution. 1717849Swosch * 3. All advertising materials mentioning features or use of this software 1817849Swosch * must display the following acknowledgement: 1917849Swosch * This product includes software developed for the NetBSD Project by 2017849Swosch * Wasabi Systems, Inc. 2117849Swosch * 4. The name of Wasabi Systems, Inc. may not be used to endorse 2217849Swosch * or promote products derived from this software without specific prior 2317849Swosch * written permission. 2417849Swosch * 2550472Speter * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND 2626827Ssteve * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 2715857Swosch * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2879528Sru * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC 2915857Swosch * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 3015857Swosch * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 3149297Snik * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 3215857Swosch * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 3315857Swosch * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 3415857Swosch * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 3515857Swosch * POSSIBILITY OF SUCH DAMAGE. 3615857Swosch */ 3715857Swosch 3815857Swosch/* 39131472Sru * Bus space tag for 8/16-bit devices on 32-bit bus. 4099970Scharnier * all registers are located at the address of multiple of 4. 4115857Swosch * 4299970Scharnier * Based on pxa2x0_a4x_space.c 4315857Swosch */ 4415857Swosch 45131472Sru#include <sys/cdefs.h> 4615857Swosch__FBSDID("$FreeBSD: head/sys/arm/xscale/ixp425/ixp425_a4x_space.c 164426 2006-11-19 23:55:23Z sam $"); 47131491Sru 48131491Sru#include <sys/param.h> 49131472Sru#include <sys/systm.h> 5049297Snik#include <sys/bus.h> 5115857Swosch 5215857Swosch#include <machine/pcb.h> 53131472Sru 5415857Swosch#include <vm/vm.h> 5520241Smpp#include <vm/vm_kern.h> 5699970Scharnier#include <vm/pmap.h> 5749297Snik#include <vm/vm_page.h> 5899970Scharnier#include <vm/vm_extern.h> 5968938Sru 6049297Snik#include <machine/bus.h> 6149297Snik 6215857Swosch/* Prototypes for all the bus_space structure functions */ 6349297Snikbs_protos(ixp425); 6449297Snikbs_protos(a4x); 6515857Swoschbs_protos(generic); 6668938Srubs_protos(generic_armv4); 6715857Swosch 6849297Snikstruct bus_space ixp425_a4x_bs_tag = { 6949297Snik /* cookie */ 7049297Snik .bs_cookie = (void *) 0, 7149297Snik 7215857Swosch /* mapping/unmapping */ 7315857Swosch .bs_map = ixp425_bs_map, 7415857Swosch .bs_unmap = ixp425_bs_unmap, 7515857Swosch .bs_subregion = ixp425_bs_subregion, 7620241Smpp 7749297Snik /* allocation/deallocation */ 7879557Sru .bs_alloc = ixp425_bs_alloc, /* XXX not implemented */ 7915857Swosch .bs_free = ixp425_bs_free, /* XXX not implemented */ 8015857Swosch 8115857Swosch /* barrier */ 8299970Scharnier .bs_barrier = ixp425_bs_barrier, 8320241Smpp 84 /* read (single) */ 85 .bs_r_1 = a4x_bs_r_1, 86 .bs_r_2 = a4x_bs_r_2, 87 .bs_r_4 = a4x_bs_r_4, 88 89 /* read multiple */ 90 .bs_rm_1 = a4x_bs_rm_1, 91 .bs_rm_2 = a4x_bs_rm_2, 92 93 /* read region */ 94 /* XXX not implemented */ 95 96 /* write (single) */ 97 .bs_w_1 = a4x_bs_w_1, 98 .bs_w_2 = a4x_bs_w_2, 99 .bs_w_4 = a4x_bs_w_4, 100 101 /* write multiple */ 102 .bs_wm_1 = a4x_bs_wm_1, 103 .bs_wm_2 = a4x_bs_wm_2, 104 105 /* write region */ 106 /* XXX not implemented */ 107 108 /* set multiple */ 109 /* XXX not implemented */ 110 111 /* set region */ 112 /* XXX not implemented */ 113 114 /* copy */ 115 /* XXX not implemented */ 116}; 117