Sorting source tree a bit
[tpg/acess2.git] / KernelLand / Kernel / arch / armv7 / pci.c
diff --git a/KernelLand/Kernel/arch/armv7/pci.c b/KernelLand/Kernel/arch/armv7/pci.c
new file mode 100644 (file)
index 0000000..2e674bb
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ *
+ */
+#include <acess.h>
+#include <drv_pci_int.h>
+
+// Realview
+//#define PCI_BASE     0x60000000
+
+//#define PCI_BASE     0xF0400000      // VMM Mapping
+#define PCI_BASE       0
+
+// === CODE ===
+void PCI_CfgWriteDWord(Uint32 Addr, Uint32 Data)
+{
+       #if PCI_BASE
+       Uint32  address = PCI_BASE | Addr;
+       *(Uint32*)(address) = Data;
+       #else
+       #endif
+}
+
+Uint32 PCI_CfgReadDWord(Uint32 Addr)
+{
+       #if PCI_BASE
+       Uint32  address = PCI_BASE | Addr;
+       return *(Uint32*)address;
+       #else
+       return 0xFFFFFFFF;
+       #endif
+}
+

UCC git Repository :: git.ucc.asn.au