board.h revision 224110
1234353Sdim/*- 2193323Sed * Copyright 2003-2011 Netlogic Microsystems (Netlogic). All rights 3193323Sed * reserved. 4193323Sed * 5193323Sed * Redistribution and use in source and binary forms, with or without 6193323Sed * modification, are permitted provided that the following conditions are 7193323Sed * met: 8193323Sed * 9193323Sed * 1. Redistributions of source code must retain the above copyright 10224145Sdim * notice, this list of conditions and the following disclaimer. 11193323Sed * 2. Redistributions in binary form must reproduce the above copyright 12193323Sed * notice, this list of conditions and the following disclaimer in 13193323Sed * the documentation and/or other materials provided with the 14193323Sed * distribution. 15249423Sdim * 16234353Sdim * THIS SOFTWARE IS PROVIDED BY Netlogic Microsystems ``AS IS'' AND 17263508Sdim * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18263508Sdim * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 19263508Sdim * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NETLOGIC OR CONTRIBUTORS BE 20249423Sdim * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21263508Sdim * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22239462Sdim * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23226633Sdim * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24249423Sdim * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25193323Sed * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 26224145Sdim * THE POSSIBILITY OF SUCH DAMAGE. 27224145Sdim * 28224145Sdim * $FreeBSD: head/sys/mips/nlm/board.h 224110 2011-07-16 19:35:44Z jchandra $ 29224145Sdim * NETLOGIC_BSD */ 30224145Sdim 31193323Sed#ifndef __NLM_BOARD_H__ 32193323Sed#define __NLM_BOARD_H__ 33224145Sdim 34224145Sdim#define XLP_NAE_NBLOCKS 5 35224145Sdim#define XLP_NAE_NPORTS 4 36193323Sed#define XLP_I2C_MAXDEVICES 8 37221345Sdim 38263508Sdimstruct xlp_i2c_devinfo { 39263508Sdim u_int addr; /* keep first, for i2c ivars to work */ 40263508Sdim int bus; 41193323Sed char *device; 42263508Sdim}; 43263508Sdim 44263508Sdimstruct xlp_port_ivars { 45263508Sdim int port; 46263508Sdim int block; 47263508Sdim int type; 48263508Sdim int phy_addr; 49263508Sdim}; 50263508Sdim 51263508Sdimstruct xlp_block_ivars { 52263508Sdim int block; 53263508Sdim int type; 54263508Sdim u_int portmask; 55263508Sdim struct xlp_port_ivars port_ivars[XLP_NAE_NPORTS]; 56263508Sdim}; 57263508Sdim 58263508Sdimstruct xlp_nae_ivars { 59263508Sdim int node; 60263508Sdim u_int blockmask; 61263508Sdim struct xlp_block_ivars block_ivars[XLP_NAE_NBLOCKS]; 62263508Sdim}; 63263508Sdim 64263508Sdimstruct xlp_board_info { 65263508Sdim u_int nodemask; 66263508Sdim struct xlp_node_info { 67263508Sdim struct xlp_i2c_devinfo i2c_devs[XLP_I2C_MAXDEVICES]; 68263508Sdim struct xlp_nae_ivars nae_ivars; 69263508Sdim } nodes[XLP_MAX_NODES]; 70263508Sdim}; 71263508Sdim 72263508Sdimextern struct xlp_board_info xlp_board_info; 73263508Sdimint nlm_board_info_setup(void); 74263508Sdim 75263508Sdim#endif 76263508Sdim