1*1fd2c684Smatt /* $NetBSD: opbvar.h,v 1.6 2011/06/18 06:41:42 matt Exp $ */ 26bf1aaf8Ssimonb 36bf1aaf8Ssimonb /* 46bf1aaf8Ssimonb * Copyright 2002 Wasabi Systems, Inc. 56bf1aaf8Ssimonb * All rights reserved. 66bf1aaf8Ssimonb * 76bf1aaf8Ssimonb * Written by Simon Burge for Wasabi Systems, Inc. 86bf1aaf8Ssimonb * 96bf1aaf8Ssimonb * Redistribution and use in source and binary forms, with or without 106bf1aaf8Ssimonb * modification, are permitted provided that the following conditions 116bf1aaf8Ssimonb * are met: 126bf1aaf8Ssimonb * 1. Redistributions of source code must retain the above copyright 136bf1aaf8Ssimonb * notice, this list of conditions and the following disclaimer. 146bf1aaf8Ssimonb * 2. Redistributions in binary form must reproduce the above copyright 156bf1aaf8Ssimonb * notice, this list of conditions and the following disclaimer in the 166bf1aaf8Ssimonb * documentation and/or other materials provided with the distribution. 176bf1aaf8Ssimonb * 3. All advertising materials mentioning features or use of this software 186bf1aaf8Ssimonb * must display the following acknowledgement: 196bf1aaf8Ssimonb * This product includes software developed for the NetBSD Project by 206bf1aaf8Ssimonb * Wasabi Systems, Inc. 216bf1aaf8Ssimonb * 4. The name of Wasabi Systems, Inc. may not be used to endorse 226bf1aaf8Ssimonb * or promote products derived from this software without specific prior 236bf1aaf8Ssimonb * written permission. 246bf1aaf8Ssimonb * 256bf1aaf8Ssimonb * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND 266bf1aaf8Ssimonb * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 276bf1aaf8Ssimonb * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 286bf1aaf8Ssimonb * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC 296bf1aaf8Ssimonb * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 306bf1aaf8Ssimonb * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 316bf1aaf8Ssimonb * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 326bf1aaf8Ssimonb * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 336bf1aaf8Ssimonb * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 346bf1aaf8Ssimonb * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 356bf1aaf8Ssimonb * POSSIBILITY OF SUCH DAMAGE. 366bf1aaf8Ssimonb */ 376bf1aaf8Ssimonb 38*1fd2c684Smatt #include <sys/bus.h> 396bf1aaf8Ssimonb 402692e2e2Skiyohara struct opb_softc { 412692e2e2Skiyohara device_t sc_dev; 422692e2e2Skiyohara bus_space_tag_t sc_iot; 432692e2e2Skiyohara bus_space_handle_t sc_zmiih; 442692e2e2Skiyohara bus_space_handle_t sc_rgmiih; 452692e2e2Skiyohara }; 462692e2e2Skiyohara 476bf1aaf8Ssimonb struct opb_attach_args { 486bf1aaf8Ssimonb const char *opb_name; 49b636d491Sthorpej int opb_instance; 506bf1aaf8Ssimonb u_long opb_addr; 516bf1aaf8Ssimonb int opb_irq; 526bf1aaf8Ssimonb bus_space_tag_t opb_bt; /* Bus space tag */ 536bf1aaf8Ssimonb bus_dma_tag_t opb_dmat; /* DMA tag */ 542692e2e2Skiyohara 552692e2e2Skiyohara int opb_flags; 562692e2e2Skiyohara #define OPB_FLAGS_EMAC_GBE (1 << 0) /* emac Giga bit Ethernet */ 572692e2e2Skiyohara #define OPB_FLAGS_EMAC_STACV2 (1 << 1) /* emac Other version STAC */ 582692e2e2Skiyohara #define OPB_FLAGS_EMAC_HT256 (1 << 2) /* emac 256bit Hash Table */ 592692e2e2Skiyohara #define OPB_FLAGS_EMAC_RMII_ZMII (1 << 3) /* emac RMII uses ZMII */ 602692e2e2Skiyohara #define OPB_FLAGS_EMAC_RMII_RGMII (1 << 4) /* emac RMII uses RGMII */ 616bf1aaf8Ssimonb }; 62728102e6Sscw 63728102e6Sscw /* For use before opb_attach() is called */ 64728102e6Sscw extern bus_space_tag_t opb_get_bus_space_tag(void); 652692e2e2Skiyohara extern int (*opb_get_frequency)(void); 66