1*cc51cff6Scgd /* $NetBSD: cfe_ioctl.h,v 1.2 2003/02/07 17:52:08 cgd Exp $ */ 2c188bc0cScgd 3c188bc0cScgd /* 4c188bc0cScgd * Copyright 2000, 2001 5c188bc0cScgd * Broadcom Corporation. All rights reserved. 6c188bc0cScgd * 7c188bc0cScgd * This software is furnished under license and may be used and copied only 8c188bc0cScgd * in accordance with the following terms and conditions. Subject to these 9c188bc0cScgd * conditions, you may download, copy, install, use, modify and distribute 10c188bc0cScgd * modified or unmodified copies of this software in source and/or binary 11c188bc0cScgd * form. No title or ownership is transferred hereby. 12c188bc0cScgd * 13c188bc0cScgd * 1) Any source code used, modified or distributed must reproduce and 14c188bc0cScgd * retain this copyright notice and list of conditions as they appear in 15c188bc0cScgd * the source file. 16c188bc0cScgd * 17c188bc0cScgd * 2) No right is granted to use any trade name, trademark, or logo of 18*cc51cff6Scgd * Broadcom Corporation. The "Broadcom Corporation" name may not be 19*cc51cff6Scgd * used to endorse or promote products derived from this software 20*cc51cff6Scgd * without the prior written permission of Broadcom Corporation. 21c188bc0cScgd * 22c188bc0cScgd * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR IMPLIED 23c188bc0cScgd * WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF 24c188bc0cScgd * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR 25c188bc0cScgd * NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM BE LIABLE 26c188bc0cScgd * FOR ANY DAMAGES WHATSOEVER, AND IN PARTICULAR, BROADCOM SHALL NOT BE 27c188bc0cScgd * LIABLE FOR DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28c188bc0cScgd * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29c188bc0cScgd * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 30c188bc0cScgd * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 31c188bc0cScgd * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 32c188bc0cScgd * OR OTHERWISE), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33c188bc0cScgd */ 34c188bc0cScgd 35c188bc0cScgd /* ********************************************************************* 36c188bc0cScgd * Broadcom Common Firmware Environment (CFE) 37c188bc0cScgd * 38c188bc0cScgd * IOCTL definitions File: cfe_ioctl.h 39c188bc0cScgd * 40c188bc0cScgd * IOCTL function numbers and I/O data structures. 41c188bc0cScgd * 42c188bc0cScgd * Author: Mitch Lichtenberg (mpl@broadcom.com) 43c188bc0cScgd * 44c188bc0cScgd ********************************************************************* */ 45c188bc0cScgd 46c188bc0cScgd 47c188bc0cScgd /* ********************************************************************* 48c188bc0cScgd * NVFAM and FLASH stuff 49c188bc0cScgd ********************************************************************* */ 50c188bc0cScgd 51c188bc0cScgd #define IOCTL_NVRAM_GETINFO 1 /* return nvram_info_t */ 52c188bc0cScgd #define IOCTL_NVRAM_ERASE 2 /* erase sector containing nvram_info_t area */ 53c188bc0cScgd #define IOCTL_FLASH_ERASE_SECTOR 3 /* erase an arbitrary sector */ 54c188bc0cScgd #define IOCTL_FLASH_ERASE_ALL 4 /* Erase the entire flash */ 55c188bc0cScgd 56c188bc0cScgd typedef struct nvram_info_s { 57c188bc0cScgd int nvram_offset; /* offset of environment area */ 58c188bc0cScgd int nvram_size; /* size of environment area */ 59c188bc0cScgd int nvram_eraseflg; /* true if we need to erase first */ 60c188bc0cScgd } nvram_info_t; 61c188bc0cScgd 62c188bc0cScgd /* ********************************************************************* 63c188bc0cScgd * Ethernet stuff 64c188bc0cScgd ********************************************************************* */ 65c188bc0cScgd 66c188bc0cScgd #define IOCTL_ETHER_GETHWADDR 1 67c188bc0cScgd 68c188bc0cScgd /* ********************************************************************* 69c188bc0cScgd * Block device stuff 70c188bc0cScgd ********************************************************************* */ 71c188bc0cScgd 72c188bc0cScgd #define IOCTL_BLOCK_GETBLOCKSIZE 1 73c188bc0cScgd #define IOCTL_BLOCK_GETTOTALBLOCKS 2 74