From owner-p4-projects@FreeBSD.ORG Sun Apr 2 06:31:15 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8A16316A420; Sun, 2 Apr 2006 06:31:15 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 68E6D16A400 for ; Sun, 2 Apr 2006 06:31:15 +0000 (UTC) (envelope-from jmg@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 37AFF43D46 for ; Sun, 2 Apr 2006 06:31:15 +0000 (GMT) (envelope-from jmg@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k326VFIA014173 for ; Sun, 2 Apr 2006 06:31:15 GMT (envelope-from jmg@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k326VEV2014170 for perforce@freebsd.org; Sun, 2 Apr 2006 06:31:14 GMT (envelope-from jmg@freebsd.org) Date: Sun, 2 Apr 2006 06:31:14 GMT Message-Id: <200604020631.k326VEV2014170@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmg@freebsd.org using -f From: John-Mark Gurney To: Perforce Change Reviews Cc: Subject: PERFORCE change 94450 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Apr 2006 06:31:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=94450 Change 94450 by jmg@jmg_carbon-60 on 2006/04/02 06:31:02 make comple.. support writing config registers.. Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/hv_pci.c#8 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/hv_pci.c#8 (text+ko) ==== @@ -160,6 +160,7 @@ pci_config_size_t size; pci_cfg_data_t data; uint32_t ret; + int r; sc = device_get_softc(dev); @@ -211,11 +212,31 @@ uint32_t val, int width) { struct hvpci_softc *sc; + pci_config_size_t size; + pci_cfg_data_t data; uint32_t err_flags; sc = device_get_softc(dev); + + switch (width) { + case 1: + size = PCI_CFG_SIZE_BYTE; + data.b = val; + break; + case 2: + size = PCI_CFG_SIZE_WORD; + data.w = val; + break; + case 4: + size = PCI_CFG_SIZE_DWORD; + data.dw = val; + break; + default: + panic("unsupported width: %d", width); + } + hvio_config_put(sc->hs_devhandle, HVPCI_BDF(bus, slot, func), reg, - width, val, &err_flags); + size, data, &err_flags); } #ifdef notyet