/*
* Copyright (c) 2007
* Internet Initiative Japan, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/* XXX should only attach Octeon 1 and Octeon Plus drivers */
for (i = 0; i < (int)iobus_ndevs; i++) {
dev = iobus_devs[i];
for (j = 0; j < dev->nunits; j++) {
if (fdt_p && (dev->flags & IOBUS_DEV_FDT) == 0)
continue;
/* XXX map all ``operations'' space at once */
bus_space_map(
iobus_bust,
0x0001280000000000ULL,
0x0001800000000000ULL - 0x0001280000000000ULL,
0,
&sc->sc_ops_bush);
}
/* CIU and GPIO NCB type CSRs */
#define CHIP_W1_BUS_START(v) 0x0001070000000000ULL
#define CHIP_W1_BUS_END(v) 0x00010700ffffffffULL
#define CHIP_W1_SYS_START(v) 0x8001070000000000ULL
#define CHIP_W1_SYS_END(v) 0x80010700ffffffffULL
/* a number of RSL type CSRs */
#define CHIP_W2_BUS_START(v) 0x0001180000000000ULL
#define CHIP_W2_BUS_END(v) 0x000118ffffffffffULL
#define CHIP_W2_SYS_START(v) 0x8001180000000000ULL
#define CHIP_W2_SYS_END(v) 0x800118ffffffffffULL