public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Mark A. Greer" <mgreer@mvista.com>
To: akpm <akpm@osdl.org>
Cc: lkml <linux-kernel@vger.kernel.org>, linuxppc-dev@ozlabs.org
Subject: [PATCH][PPC32] Add setup_indirect_pci_nomap() routine
Date: Mon, 08 Nov 2004 15:56:18 -0700	[thread overview]
Message-ID: <418FF992.8040604@mvista.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 178 bytes --]

This patch adds a routine that sets up indirect pci config space access 
but doesn't ioremap the config space addr/data registers.

Signed-off-by: Mark Greer <mgreer@mvista.com>

[-- Attachment #2: indirect_pci.patch --]
[-- Type: text/plain, Size: 1654 bytes --]

===== arch/ppc/syslib/indirect_pci.c 1.12 vs edited =====
--- 1.12/arch/ppc/syslib/indirect_pci.c	2004-03-17 05:02:23 -07:00
+++ edited/arch/ppc/syslib/indirect_pci.c	2004-10-12 14:24:23 -07:00
@@ -112,15 +112,24 @@
 };
 
 void __init
+setup_indirect_pci_nomap(struct pci_controller* hose, u32 cfg_addr,
+	u32 cfg_data)
+{
+	hose->cfg_addr = (unsigned int *)cfg_addr;
+	hose->cfg_data = (unsigned char *)cfg_data;
+	hose->ops = &indirect_pci_ops;
+}
+
+void __init
 setup_indirect_pci(struct pci_controller* hose, u32 cfg_addr, u32 cfg_data)
 {
 	unsigned long base = cfg_addr & PAGE_MASK;
 	char *mbase;
 
 	mbase = ioremap(base, PAGE_SIZE);
-	hose->cfg_addr = (unsigned int *)(mbase + (cfg_addr & ~PAGE_MASK));
+	cfg_addr = (u32)(mbase + (cfg_addr & ~PAGE_MASK));
 	if ((cfg_data & PAGE_MASK) != base)
 		mbase = ioremap(cfg_data & PAGE_MASK, PAGE_SIZE);
-	hose->cfg_data = (unsigned char *)(mbase + (cfg_data & ~PAGE_MASK));
-	hose->ops = &indirect_pci_ops;
+	cfg_data = (u32)(mbase + (cfg_data & ~PAGE_MASK));
+	setup_indirect_pci_nomap(hose, cfg_addr, cfg_data);
 }
===== include/asm-ppc/pci-bridge.h 1.12 vs edited =====
--- 1.12/include/asm-ppc/pci-bridge.h	2003-09-12 09:26:56 -07:00
+++ edited/include/asm-ppc/pci-bridge.h	2004-10-12 14:23:36 -07:00
@@ -94,6 +94,8 @@
 int early_write_config_dword(struct pci_controller *hose, int bus, int dev_fn,
 			     int where, u32 val);
 
+extern void setup_indirect_pci_nomap(struct pci_controller* hose,
+			       u32 cfg_addr, u32 cfg_data);
 extern void setup_indirect_pci(struct pci_controller* hose,
 			       u32 cfg_addr, u32 cfg_data);
 extern void setup_grackle(struct pci_controller *hose);

             reply	other threads:[~2004-11-08 22:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-08 22:56 Mark A. Greer [this message]
2004-11-08 23:02 ` [PATCH][PPC32] Add setup_indirect_pci_nomap() routine Kumar Gala
2004-11-08 23:55   ` Mark A. Greer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=418FF992.8040604@mvista.com \
    --to=mgreer@mvista.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox