/*-1* SPDX-License-Identifier: BSD-3-Clause2*3* Copyright 2002 by Peter Grehan. All rights reserved.4*5* Redistribution and use in source and binary forms, with or without6* modification, are permitted provided that the following conditions7* are met:8* 1. Redistributions of source code must retain the above copyright9* notice, this list of conditions and the following disclaimer.10* 2. Redistributions in binary form must reproduce the above copyright11* notice, this list of conditions and the following disclaimer in the12* documentation and/or other materials provided with the distribution.13* 3. The name of the author may not be used to endorse or promote products14* derived from this software without specific prior written permission.15*16* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR17* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES18* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.19* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,20* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,21* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED23* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,24* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY25* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF26* SUCH DAMAGE.27*/2829#ifndef _MACIO_MACIOVAR_H_30#define _MACIO_MACIOVAR_H_3132/*33* The addr space size34* XXX it would be better if this could be determined by querying the35* PCI device, but there isn't an access method for this36*/37#define MACIO_REG_SIZE 0x7ffff3839/*40* Feature Control Registers (FCR)41*/42#define HEATHROW_FCR 0x3843#define KEYLARGO_FCR0 0x3844#define KEYLARGO_FCR1 0x3c45#define KEYLARGO_FCR2 0x404647#define FCR_ENET_ENABLE 0x6000000048#define FCR_ENET_RESET 0x800000004950#define FCR1_I2S0_CLK_ENABLE 0x0000100051#define FCR1_I2S0_ENABLE 0x000020005253/* Used only by macio_enable_wireless() for now. */54#define KEYLARGO_GPIO_BASE 0x6a55#define KEYLARGO_EXTINT_GPIO_REG_BASE 0x585657/*58* Format of a macio reg property entry.59*/60struct macio_reg {61u_int32_t mr_base;62u_int32_t mr_size;63};6465/*66* Per macio device structure.67*/68struct macio_devinfo {69int mdi_interrupts[6];70int mdi_ninterrupts;71int mdi_base;72struct ofw_bus_devinfo mdi_obdinfo;73struct resource_list mdi_resources;74};7576extern int macio_enable_wireless(device_t dev, bool enable);7778#endif /* _MACIO_MACIOVAR_H_ */798081