linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][PPC32] Add setup_indirect_pci_nomap() routine
@ 2004-11-08 22:56 Mark A. Greer
  2004-11-08 23:02 ` Kumar Gala
  0 siblings, 1 reply; 3+ messages in thread
From: Mark A. Greer @ 2004-11-08 22:56 UTC (permalink / raw)
  To: akpm; +Cc: linuxppc-dev, lkml

[-- 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);

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-11-08 23:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-08 22:56 [PATCH][PPC32] Add setup_indirect_pci_nomap() routine Mark A. Greer
2004-11-08 23:02 ` Kumar Gala
2004-11-08 23:55   ` Mark A. Greer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).