From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161777AbWKIBqY (ORCPT ); Wed, 8 Nov 2006 20:46:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1161780AbWKIBqY (ORCPT ); Wed, 8 Nov 2006 20:46:24 -0500 Received: from mga05.intel.com ([192.55.52.89]:42131 "EHLO fmsmga101.fm.intel.com") by vger.kernel.org with ESMTP id S1161777AbWKIBqX (ORCPT ); Wed, 8 Nov 2006 20:46:23 -0500 X-ExtLoop1: 1 X-IronPort-AV: i="4.09,401,1157353200"; d="scan'208"; a="13570112:sNHT29925045" Date: Wed, 8 Nov 2006 17:23:52 -0800 From: "Siddha, Suresh B" To: ak@suse.de, akpm@osdl.org Cc: shaohua.li@intel.com, linux-kernel@vger.kernel.org, discuss@x86-64.org, ashok.raj@intel.com, suresh.b.siddha@intel.com, greg@kroah.com Subject: [patch 1/4] i386: add write_pci_config_byte() to direct PCI access routines Message-ID: <20061108172352.B10294@unix-os.sc.intel.com> References: <20061108172017.A10294@unix-os.sc.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20061108172017.A10294@unix-os.sc.intel.com>; from suresh.b.siddha@intel.com on Wed, Nov 08, 2006 at 05:20:18PM -0800 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Add write_pci_config_byte() to direct PCI access routines Signed-off-by: Suresh Siddha --- diff --git a/arch/i386/pci/early.c b/arch/i386/pci/early.c index 713d6c8..42df4b6 100644 --- a/arch/i386/pci/early.c +++ b/arch/i386/pci/early.c @@ -45,6 +45,13 @@ void write_pci_config(u8 bus, u8 slot, u outl(val, 0xcfc); } +void write_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset, u8 val) +{ + PDprintk("%x writing to %x: %x\n", slot, offset, val); + outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); + outb(val, 0xcfc); +} + int early_pci_allowed(void) { return (pci_probe & (PCI_PROBE_CONF1|PCI_PROBE_NOEARLY)) == diff --git a/include/asm-x86_64/pci-direct.h b/include/asm-x86_64/pci-direct.h index eba9cb4..6823fa4 100644 --- a/include/asm-x86_64/pci-direct.h +++ b/include/asm-x86_64/pci-direct.h @@ -10,6 +10,7 @@ extern u32 read_pci_config(u8 bus, u8 sl extern u8 read_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset); extern u16 read_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset); extern void write_pci_config(u8 bus, u8 slot, u8 func, u8 offset, u32 val); +extern void write_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset, u8 val); extern int early_pci_allowed(void);