drm: remove writeq/readq function definitions
authorCorentin Labbe <clabbe.montjoie@gmail.com>
Fri, 2 Jun 2017 11:25:10 +0000 (13:25 +0200)
committerSean Paul <seanpaul@chromium.org>
Fri, 2 Jun 2017 14:41:20 +0000 (10:41 -0400)
Instead of rewriting write/readq, use linux/io-64-nonatomic-lo-hi.h which
already have them.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20170602112510.17544-1-clabbe.montjoie@gmail.com
include/drm/drm_os_linux.h

index 35e1482ba8a155cb8f6e2be6d7663a4b3dde1fe4..10122353b74482da3bcccb654ca00fc7dc006632 100644 (file)
@@ -6,19 +6,7 @@
 #include <linux/interrupt.h>   /* For task queue support */
 #include <linux/sched/signal.h>
 #include <linux/delay.h>
-
-#ifndef readq
-static inline u64 readq(void __iomem *reg)
-{
-       return ((u64) readl(reg)) | (((u64) readl(reg + 4UL)) << 32);
-}
-
-static inline void writeq(u64 val, void __iomem *reg)
-{
-       writel(val & 0xffffffff, reg);
-       writel(val >> 32, reg + 0x4UL);
-}
-#endif
+#include <linux/io-64-nonatomic-lo-hi.h>
 
 /** Current process ID */
 #define DRM_CURRENTPID                 task_pid_nr(current)