13875Sjlahoda/*- 23907Sjlahoda * Copyright (c) 2011 Jakub Wojciech Klama <jceel@FreeBSD.org> 33875Sjlahoda * All rights reserved. 43875Sjlahoda * 53875Sjlahoda * Redistribution and use in source and binary forms, with or without 63875Sjlahoda * modification, are permitted provided that the following conditions 73875Sjlahoda * are met: 83875Sjlahoda * 1. Redistributions of source code must retain the above copyright 93875Sjlahoda * notice, this list of conditions and the following disclaimer. 103875Sjlahoda * 2. Redistributions in binary form must reproduce the above copyright 113875Sjlahoda * notice, this list of conditions and the following disclaimer in the 123875Sjlahoda * documentation and/or other materials provided with the distribution. 133875Sjlahoda * 143875Sjlahoda * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 153875Sjlahoda * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 163875Sjlahoda * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 173875Sjlahoda * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 183875Sjlahoda * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 193875Sjlahoda * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 203875Sjlahoda * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 213875Sjlahoda * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 223875Sjlahoda * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 233875Sjlahoda * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 243875Sjlahoda * SUCH DAMAGE. 253875Sjlahoda */ 263994Sjlahoda 273875Sjlahoda#include <sys/cdefs.h> 283875Sjlahoda__FBSDID("$FreeBSD$"); 293875Sjlahoda 303875Sjlahoda#include <sys/param.h> 313907Sjlahoda#include <sys/systm.h> 323875Sjlahoda#include <sys/bus.h> 333875Sjlahoda#include <sys/kernel.h> 343875Sjlahoda#include <sys/malloc.h> 353875Sjlahoda#include <machine/bus.h> 363875Sjlahoda 373875Sjlahodabs_protos(generic); 383875Sjlahodabs_protos(generic_armv4); 393875Sjlahoda 403875Sjlahodastatic struct bus_space _base_tag = { 413907Sjlahoda /* cookie */ 423907Sjlahoda NULL, 433907Sjlahoda 443907Sjlahoda /* mapping/unmapping */ 453875Sjlahoda generic_bs_map, 463875Sjlahoda generic_bs_unmap, 473875Sjlahoda generic_bs_subregion, 483875Sjlahoda 493875Sjlahoda /* allocation/deallocation */ 503875Sjlahoda generic_bs_alloc, 513875Sjlahoda generic_bs_free, 523875Sjlahoda 533875Sjlahoda /* barrier */ 543875Sjlahoda generic_bs_barrier, 553875Sjlahoda 563875Sjlahoda /* read (single) */ 573875Sjlahoda generic_bs_r_1, 583875Sjlahoda generic_armv4_bs_r_2, 593875Sjlahoda generic_bs_r_4, 603875Sjlahoda NULL, 613875Sjlahoda 623875Sjlahoda /* read (multiple) */ 633875Sjlahoda generic_bs_rm_1, 643875Sjlahoda generic_armv4_bs_rm_2, 653875Sjlahoda generic_bs_rm_4, 663875Sjlahoda NULL, 673875Sjlahoda 683875Sjlahoda /* read region */ 693875Sjlahoda generic_bs_rr_1, 703875Sjlahoda generic_armv4_bs_rr_2, 713875Sjlahoda generic_bs_rr_4, 723875Sjlahoda NULL, 733875Sjlahoda 743875Sjlahoda /* write (single) */ 753875Sjlahoda generic_bs_w_1, 763875Sjlahoda generic_armv4_bs_w_2, 773875Sjlahoda generic_bs_w_4, 783875Sjlahoda NULL, 793875Sjlahoda 803875Sjlahoda /* write multiple */ 813875Sjlahoda generic_bs_wm_1, 823875Sjlahoda generic_armv4_bs_wm_2, 833875Sjlahoda generic_bs_wm_4, 843875Sjlahoda NULL, 853875Sjlahoda 863875Sjlahoda /* write region */ 873907Sjlahoda NULL, 883907Sjlahoda NULL, 893907Sjlahoda NULL, 903907Sjlahoda NULL, 913907Sjlahoda 923907Sjlahoda /* set multiple */ 933907Sjlahoda NULL, 943907Sjlahoda NULL, 953907Sjlahoda NULL, 963907Sjlahoda NULL, 973907Sjlahoda 983907Sjlahoda /* set region */ 993907Sjlahoda NULL, 1003907Sjlahoda NULL, 1013907Sjlahoda NULL, 1023907Sjlahoda NULL, 1033907Sjlahoda 1043907Sjlahoda /* copy */ 1053907Sjlahoda NULL, 1063907Sjlahoda NULL, 1073907Sjlahoda NULL, 1083907Sjlahoda NULL, 1093907Sjlahoda 1103907Sjlahoda /* read stream (single) */ 1113907Sjlahoda NULL, 1123907Sjlahoda NULL, 1133907Sjlahoda NULL, 1143907Sjlahoda NULL, 1153907Sjlahoda 1163907Sjlahoda /* read multiple stream */ 1173907Sjlahoda NULL, 1183875Sjlahoda generic_armv4_bs_rm_2, 1193875Sjlahoda NULL, 1203875Sjlahoda NULL, 1213875Sjlahoda 1223875Sjlahoda /* read region stream */ 1233875Sjlahoda NULL, 1243875Sjlahoda NULL, 1253875Sjlahoda NULL, 1263875Sjlahoda NULL, 1273875Sjlahoda 1283875Sjlahoda /* write stream (single) */ 1293875Sjlahoda NULL, 1303875Sjlahoda NULL, 1313875Sjlahoda NULL, 1323875Sjlahoda NULL, 1333875Sjlahoda 1343875Sjlahoda /* write multiple stream */ 1353875Sjlahoda NULL, 1363875Sjlahoda generic_armv4_bs_wm_2, 1373875Sjlahoda NULL, 1383875Sjlahoda NULL, 1393875Sjlahoda 1403875Sjlahoda /* write region stream */ 1413875Sjlahoda NULL, 1423875Sjlahoda NULL, 1433875Sjlahoda NULL, 1443875Sjlahoda NULL, 1453875Sjlahoda}; 1463875Sjlahoda 1473875Sjlahodabus_space_tag_t fdtbus_bs_tag = &_base_tag; 1483875Sjlahoda