Merge tag 'iwlwifi-fixes-for-kalle-2014-12-18' of git://git.kernel.org/pub/scm/linux...
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / host1x / hw / cdma_hw.c
index 6b09b71940c2d5df0251ec2b3cd417ec2eb93e2d..305ea8f3382d22da2611e6de7025695265d97699 100644 (file)
 #include "../debug.h"
 
 /*
- * Put the restart at the end of pushbuffer memor
+ * Put the restart at the end of pushbuffer memory
  */
 static void push_buffer_init(struct push_buffer *pb)
 {
-       *(pb->mapped + (pb->size_bytes >> 2)) = host1x_opcode_restart(0);
+       *(u32 *)(pb->mapped + pb->size_bytes) = host1x_opcode_restart(0);
 }
 
 /*
@@ -51,11 +51,11 @@ static void cdma_timeout_cpu_incr(struct host1x_cdma *cdma, u32 getptr,
 
        /* NOP all the PB slots */
        while (nr_slots--) {
-               u32 *p = (u32 *)((u32)pb->mapped + getptr);
+               u32 *p = (u32 *)(pb->mapped + getptr);
                *(p++) = HOST1X_OPCODE_NOP;
                *(p++) = HOST1X_OPCODE_NOP;
-               dev_dbg(host1x->dev, "%s: NOP at %#llx\n", __func__,
-                       (u64)pb->phys + getptr);
+               dev_dbg(host1x->dev, "%s: NOP at %pad+%#x\n", __func__,
+                       &pb->phys, getptr);
                getptr = (getptr + 8) & (pb->size_bytes - 1);
        }
        wmb();