Home | History | Annotate | Line # | Download | only in virtex
virtex.h revision 1.1.4.3
      1  1.1.4.3  yamt /* 	$NetBSD: virtex.h,v 1.1.4.3 2007/10/27 11:26:04 yamt Exp $ */
      2  1.1.4.2  yamt 
      3  1.1.4.2  yamt /*
      4  1.1.4.2  yamt  * Copyright (c) 2006 Jachym Holecek
      5  1.1.4.2  yamt  * All rights reserved.
      6  1.1.4.2  yamt  *
      7  1.1.4.2  yamt  * Written for DFC Design, s.r.o.
      8  1.1.4.2  yamt  *
      9  1.1.4.2  yamt  * Redistribution and use in source and binary forms, with or without
     10  1.1.4.2  yamt  * modification, are permitted provided that the following conditions
     11  1.1.4.2  yamt  * are met:
     12  1.1.4.2  yamt  *
     13  1.1.4.2  yamt  * 1. Redistributions of source code must retain the above copyright
     14  1.1.4.2  yamt  *    notice, this list of conditions and the following disclaimer.
     15  1.1.4.2  yamt  *
     16  1.1.4.2  yamt  * 2. Redistributions in binary form must reproduce the above copyright
     17  1.1.4.2  yamt  *    notice, this list of conditions and the following disclaimer in the
     18  1.1.4.2  yamt  *    documentation and/or other materials provided with the distribution.
     19  1.1.4.2  yamt  *
     20  1.1.4.2  yamt  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     21  1.1.4.2  yamt  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     22  1.1.4.2  yamt  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     23  1.1.4.2  yamt  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     24  1.1.4.2  yamt  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     25  1.1.4.2  yamt  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     26  1.1.4.2  yamt  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     27  1.1.4.2  yamt  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     28  1.1.4.2  yamt  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     29  1.1.4.2  yamt  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     30  1.1.4.2  yamt  */
     31  1.1.4.2  yamt 
     32  1.1.4.2  yamt #ifndef _VIRTEX_H_
     33  1.1.4.2  yamt #define	_VIRTEX_H_
     34  1.1.4.2  yamt 
     35  1.1.4.2  yamt #ifdef _KERNEL_OPT
     36  1.1.4.2  yamt #include "opt_cons.h"
     37  1.1.4.3  yamt #include "opt_kgdb.h"
     38  1.1.4.2  yamt #endif
     39  1.1.4.2  yamt 
     40  1.1.4.3  yamt /*
     41  1.1.4.3  yamt  * Console and kgdb name are just private tags for design_<foo>.c
     42  1.1.4.3  yamt  * to identify the right device instance. Should be the same as
     43  1.1.4.3  yamt  * device_xname() if there's only one UART available, though.
     44  1.1.4.3  yamt  */
     45  1.1.4.3  yamt 
     46  1.1.4.2  yamt #ifndef CONS_NAME
     47  1.1.4.2  yamt #define CONS_NAME 	"xlcom0"
     48  1.1.4.2  yamt #endif
     49  1.1.4.2  yamt 
     50  1.1.4.2  yamt #ifndef CONS_ADDR
     51  1.1.4.2  yamt #define CONS_ADDR 	0x00
     52  1.1.4.2  yamt #endif
     53  1.1.4.2  yamt 
     54  1.1.4.3  yamt #if defined(KGDB)
     55  1.1.4.3  yamt 
     56  1.1.4.3  yamt #ifndef KGDB_NAME
     57  1.1.4.3  yamt #define	KGDB_NAME 	CONS_NAME
     58  1.1.4.3  yamt #endif
     59  1.1.4.3  yamt 
     60  1.1.4.3  yamt #ifndef KGDB_ADDR
     61  1.1.4.3  yamt #define	KGDB_ADDR 	CONS_ADDR
     62  1.1.4.3  yamt #endif
     63  1.1.4.3  yamt 
     64  1.1.4.3  yamt #endif /* KGDB */
     65  1.1.4.3  yamt 
     66  1.1.4.2  yamt struct mem_region;
     67  1.1.4.2  yamt 
     68  1.1.4.3  yamt /* Early bus space setup, for console and kgdb. Name is purely symbolic. */
     69  1.1.4.3  yamt int 	virtex_bus_space_tag(const char *, bus_space_tag_t *);
     70  1.1.4.2  yamt 
     71  1.1.4.2  yamt /* Called after RAM is linear mapped. Translation & console still off. */
     72  1.1.4.2  yamt void 	virtex_machdep_init(vaddr_t, vsize_t, struct mem_region *,
     73  1.1.4.2  yamt 	    struct mem_region *);
     74  1.1.4.2  yamt 
     75  1.1.4.3  yamt /* For use by console and kgdb. Tag is initialized before <foo>_cninit. */
     76  1.1.4.3  yamt extern bus_space_tag_t 		consdev_iot; 	/* consinit.c */
     77  1.1.4.3  yamt extern bus_space_handle_t 	consdev_ioh; 	/* console device */
     78  1.1.4.3  yamt 
     79  1.1.4.3  yamt #if defined(KGDB)
     80  1.1.4.3  yamt 
     81  1.1.4.3  yamt extern bus_space_tag_t 		kgdb_iot; 	/* consinit.c */
     82  1.1.4.3  yamt extern bus_space_handle_t 	kgdb_ioh; 	/* kgdb device */
     83  1.1.4.3  yamt 
     84  1.1.4.3  yamt #endif /* KGDB */
     85  1.1.4.2  yamt 
     86  1.1.4.2  yamt #endif /*_VIRTEX_H_*/
     87