adm5120_pciio_space.c revision 1.1
11.1Sdyoung/* $NetBSD: adm5120_pciio_space.c,v 1.1 2007/03/20 08:52:04 dyoung Exp $ */ 21.1Sdyoung 31.1Sdyoung/*- 41.1Sdyoung * Copyright (c) 2001 The NetBSD Foundation, Inc. 51.1Sdyoung * All rights reserved. 61.1Sdyoung * 71.1Sdyoung * This code is derived from software contributed to The NetBSD Foundation 81.1Sdyoung * by Jason R. Thorpe. 91.1Sdyoung * 101.1Sdyoung * Redistribution and use in source and binary forms, with or without 111.1Sdyoung * modification, are permitted provided that the following conditions 121.1Sdyoung * are met: 131.1Sdyoung * 1. Redistributions of source code must retain the above copyright 141.1Sdyoung * notice, this list of conditions and the following disclaimer. 151.1Sdyoung * 2. Redistributions in binary form must reproduce the above copyright 161.1Sdyoung * notice, this list of conditions and the following disclaimer in the 171.1Sdyoung * documentation and/or other materials provided with the distribution. 181.1Sdyoung * 3. All advertising materials mentioning features or use of this software 191.1Sdyoung * must display the following acknowledgement: 201.1Sdyoung * This product includes software developed by the NetBSD 211.1Sdyoung * Foundation, Inc. and its contributors. 221.1Sdyoung * 4. Neither the name of The NetBSD Foundation nor the names of its 231.1Sdyoung * contributors may be used to endorse or promote products derived 241.1Sdyoung * from this software without specific prior written permission. 251.1Sdyoung * 261.1Sdyoung * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 271.1Sdyoung * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 281.1Sdyoung * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 291.1Sdyoung * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 301.1Sdyoung * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 311.1Sdyoung * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 321.1Sdyoung * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 331.1Sdyoung * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 341.1Sdyoung * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 351.1Sdyoung * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 361.1Sdyoung * POSSIBILITY OF SUCH DAMAGE. 371.1Sdyoung */ 381.1Sdyoung 391.1Sdyoung/* 401.1Sdyoung * Platform-specific SOC register support for the Infineon ADM5120. 411.1Sdyoung */ 421.1Sdyoung 431.1Sdyoung#include <sys/cdefs.h> 441.1Sdyoung__KERNEL_RCSID(0, "$NetBSD: adm5120_pciio_space.c,v 1.1 2007/03/20 08:52:04 dyoung Exp $"); 451.1Sdyoung 461.1Sdyoung#include <sys/param.h> 471.1Sdyoung 481.1Sdyoung#include <machine/bus.h> 491.1Sdyoung#include <mips/adm5120/include/adm5120reg.h> 501.1Sdyoung#include <mips/adm5120/include/adm5120_pcivar.h> 511.1Sdyoung 521.1Sdyoung#define CHIP pciio 531.1Sdyoung#define CHIP_MEM /* defined */ 541.1Sdyoung#define CHIP_ACCESS_SIZE 1 551.1Sdyoung 561.1Sdyoung#define CHIP_W1_BUS_START(v) ADM5120_BASE_PCI_IO 571.1Sdyoung#define CHIP_W1_BUS_END(v) ADM5120_BASE_PCI_CONFADDR 581.1Sdyoung#define CHIP_W1_SYS_START(v) CHIP_W1_BUS_START(v) 591.1Sdyoung#define CHIP_W1_SYS_END(v) CHIP_W1_BUS_END(v) 601.1Sdyoung 611.1Sdyoung#include <mips/mips/bus_space_alignstride_chipdep.c> 62