systemsw.h revision 1.9
11.9Smatt/* $NetBSD: systemsw.h,v 1.9 2011/02/20 07:47:38 matt Exp $ */ 21.1Ssimonb 31.1Ssimonb/* 41.1Ssimonb * Copyright 2000, 2001 51.1Ssimonb * Broadcom Corporation. All rights reserved. 61.1Ssimonb * 71.1Ssimonb * This software is furnished under license and may be used and copied only 81.1Ssimonb * in accordance with the following terms and conditions. Subject to these 91.1Ssimonb * conditions, you may download, copy, install, use, modify and distribute 101.1Ssimonb * modified or unmodified copies of this software in source and/or binary 111.1Ssimonb * form. No title or ownership is transferred hereby. 121.1Ssimonb * 131.1Ssimonb * 1) Any source code used, modified or distributed must reproduce and 141.1Ssimonb * retain this copyright notice and list of conditions as they appear in 151.1Ssimonb * the source file. 161.1Ssimonb * 171.1Ssimonb * 2) No right is granted to use any trade name, trademark, or logo of 181.4Scgd * Broadcom Corporation. The "Broadcom Corporation" name may not be 191.4Scgd * used to endorse or promote products derived from this software 201.4Scgd * without the prior written permission of Broadcom Corporation. 211.1Ssimonb * 221.1Ssimonb * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR IMPLIED 231.1Ssimonb * WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF 241.1Ssimonb * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR 251.1Ssimonb * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM BE LIABLE 261.1Ssimonb * FOR ANY DAMAGES WHATSOEVER, AND IN PARTICULAR, BROADCOM SHALL NOT BE 271.1Ssimonb * LIABLE FOR DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 281.1Ssimonb * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 291.1Ssimonb * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 301.1Ssimonb * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 311.1Ssimonb * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 321.1Ssimonb * OR OTHERWISE), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 331.1Ssimonb */ 341.1Ssimonb 351.1Ssimonb#ifndef _SBMIPS_SYSTEMSW_H_ 361.1Ssimonb#define _SBMIPS_SYSTEMSW_H_ 371.1Ssimonb 381.1Ssimonb#include <sys/types.h> 391.1Ssimonb 401.1Ssimonbstruct systemsw { 411.1Ssimonb /* ordered to match likely locality. */ 421.9Smatt void (*s_cpu_intr)(int, vaddr_t, uint32_t); 431.1Ssimonb 441.1Ssimonb void *s_clock_arg; 451.1Ssimonb void (*s_clock_init)(void *); 461.1Ssimonb 471.3Ssimonb void *s_statclock_arg; 481.1Ssimonb void (*s_statclock_init)(void *); 491.1Ssimonb void (*s_statclock_setrate)(void *, int); 501.1Ssimonb 511.1Ssimonb void *(*s_intr_establish)(u_int, u_int, 521.8Smatt void (*fun)(void *, uint32_t, vaddr_t), void *); 531.1Ssimonb}; 541.1Ssimonbextern struct systemsw systemsw; 551.1Ssimonb 561.9Smattbool system_set_clockfns(void *, void (*)(void *)); 571.9Smatt 581.9Smattvoid sb1250_icu_init(void); 591.9Smattstruct cpu_softc; 601.9Smattvoid sb1250_cpu_init(struct cpu_softc *); 611.9Smattvoid sb1250_ipl_map_init(void); 621.1Ssimonb 631.1Ssimonb#define cpu_intr_establish(n,s,f,a) ((*systemsw.s_intr_establish)(n,s,f,a)) 641.1Ssimonb 651.1Ssimonb#endif /* _SBMIPS_SYSTEMSW_H_ */ 66