summaryrefslogtreecommitdiff
path: root/include/phys2bus.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/phys2bus.h')
-rw-r--r--include/phys2bus.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/phys2bus.h b/include/phys2bus.h
new file mode 100644
index 0000000..87b6d69
--- /dev/null
+++ b/include/phys2bus.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2015 Stephen Warren
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#ifndef _BUS_ADDR_H
+#define _BUS_ADDR_H
+
+#ifdef CONFIG_PHYS_TO_BUS
+unsigned long phys_to_bus(unsigned long phys);
+unsigned long bus_to_phys(unsigned long bus);
+#else
+static inline unsigned long phys_to_bus(unsigned long phys)
+{
+ return phys;
+}
+
+static inline unsigned long bus_to_phys(unsigned long bus)
+{
+ return bus;
+}
+#endif
+
+#endif