1/* $NetBSD: gt_pci.c,v 1.4 2003/07/15 00:24:54 lukem Exp $ */ 2 3/*- 4 * Copyright (c) 2001, 2002 Wasabi Systems, Inc. 5 * All rights reserved. 6 * 7 * Written by Jason R. Thorpe for Wasabi Systems, Inc. 8 * --- 26 unchanged lines hidden (view full) --- 35 * POSSIBILITY OF SUCH DAMAGE. 36 */ 37 38/* 39 * PCI configuration support for gt I/O Processor chip. 40 */ 41 42#include <sys/cdefs.h> |
43__FBSDID("$FreeBSD: head/sys/mips/malta/gt_pci.c 187251 2009-01-14 22:32:43Z gonzo $"); |
44 45#include <sys/param.h> 46#include <sys/systm.h> 47 48#include <sys/bus.h> 49#include <sys/interrupt.h> 50#include <sys/malloc.h> 51#include <sys/kernel.h> --- 400 unchanged lines hidden (view full) --- 452 { 453 reg_data = gt_pci_read_config(dev, bus, slot, func, reg, 4); 454 455 /* 456 * XXX: We assume that words readed from GT chip are BE. 457 * Should we set the mode explicitly during chip 458 * Initialization? 459 */ |
460 shift = 8 * (reg & 3); |
461 462 switch(bytes) 463 { 464 case 1: 465 mask = 0xff; 466 data = (reg_data & ~ (mask << shift)) | (data << shift); 467 break; 468 case 2: --- 231 unchanged lines hidden --- |