xref: /netbsd-src/sys/dev/podulebus/podulebus.h (revision 95e1ffb15694e54f29f8baaa4232152b703c2a5a)
1*95e1ffb1Schristos /* $NetBSD: podulebus.h,v 1.8 2005/12/11 12:23:28 christos Exp $ */
299860639Sbjh21 
399860639Sbjh21 /*
499860639Sbjh21  * Copyright (c) 1995 Mark Brinicombe.
599860639Sbjh21  * Copyright (c) 1995 Brini.
699860639Sbjh21  * All rights reserved.
799860639Sbjh21  *
899860639Sbjh21  * Redistribution and use in source and binary forms, with or without
999860639Sbjh21  * modification, are permitted provided that the following conditions
1099860639Sbjh21  * are met:
1199860639Sbjh21  * 1. Redistributions of source code must retain the above copyright
1299860639Sbjh21  *    notice, this list of conditions and the following disclaimer.
1399860639Sbjh21  * 2. Redistributions in binary form must reproduce the above copyright
1499860639Sbjh21  *    notice, this list of conditions and the following disclaimer in the
1599860639Sbjh21  *    documentation and/or other materials provided with the distribution.
1699860639Sbjh21  * 3. All advertising materials mentioning features or use of this software
1799860639Sbjh21  *    must display the following acknowledgement:
1899860639Sbjh21  *	This product includes software developed by Brini.
1999860639Sbjh21  * 4. The name of the company nor the name of the author may be used to
2099860639Sbjh21  *    endorse or promote products derived from this software without specific
2199860639Sbjh21  *    prior written permission.
2299860639Sbjh21  *
2399860639Sbjh21  * THIS SOFTWARE IS PROVIDED BY BRINI ``AS IS'' AND ANY EXPRESS OR IMPLIED
2499860639Sbjh21  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2599860639Sbjh21  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
2699860639Sbjh21  * IN NO EVENT SHALL BRINI OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
2799860639Sbjh21  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2899860639Sbjh21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
2999860639Sbjh21  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3099860639Sbjh21  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3199860639Sbjh21  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3299860639Sbjh21  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3399860639Sbjh21  * SUCH DAMAGE.
3499860639Sbjh21  *
3599860639Sbjh21  * RiscBSD kernel project
3699860639Sbjh21  *
3799860639Sbjh21  * podulebus.h
3899860639Sbjh21  *
3999860639Sbjh21  * Podule bus header file
4099860639Sbjh21  *
4199860639Sbjh21  * Created      : 26/04/95
4299860639Sbjh21  */
4399860639Sbjh21 
4499860639Sbjh21 #ifndef _DEV_PODULEBUS_PODULEBUS_H_
4599860639Sbjh21 #define _DEV_PODULEBUS_PODULEBUS_H_
4699860639Sbjh21 
4799860639Sbjh21 /* Define the structures used to describe the "known" podules */
4899860639Sbjh21 
4999860639Sbjh21 struct podule_description {
5099860639Sbjh21 	int product_id;
51f1f4a50eShe 	const char *description;
5299860639Sbjh21 };
5399860639Sbjh21 
5420518673Sbjh21 struct manufacturer_description {
5599860639Sbjh21 	int manufacturer_id;
56f1f4a50eShe 	const char *description;
5799860639Sbjh21 };
5890567f2dSbjh21 
5986d6442cSbjh21 #include <machine/podulebus_machdep.h>
6099860639Sbjh21 
616d59ad5eSbjh21 extern void podulebus_readcmos(struct podulebus_attach_args *, u_int8_t *);
626d59ad5eSbjh21 
63b8a09ee7Sbjh21 /* Podule loader functions. */
64b8a09ee7Sbjh21 extern int podulebus_initloader(struct podulebus_attach_args *);
65b8a09ee7Sbjh21 extern int podloader_readbyte(struct podulebus_attach_args *, u_int);
66b8a09ee7Sbjh21 extern void podloader_writebyte(struct podulebus_attach_args *, u_int, int);
67b8a09ee7Sbjh21 void podloader_reset(struct podulebus_attach_args *);
68b8a09ee7Sbjh21 int podloader_callloader(struct podulebus_attach_args *, u_int, u_int);
69b8a09ee7Sbjh21 
7099860639Sbjh21 #endif
71