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