#include <linux/bitops.h>
 
 #define HASH_BLOCK_SIZE                        64
+#define HASH_DMA_FIFO                  4
 #define HASH_DMA_ALIGN_SIZE            4
 #define HASH_DMA_PERFORMANCE_MIN_SIZE  1024
 #define HASH_BYTES_PER_WORD            4
 
 /**
  * struct hash_device_data - structure for a hash device.
- * @base:              Pointer to the hardware base address.
+ * @base:              Pointer to virtual base address of the hash device.
+ * @phybase:           Pointer to physical memory location of the hash device.
  * @list_node:         For inclusion in klist.
  * @dev:               Pointer to the device dev structure.
  * @ctx_lock:          Spinlock for current_ctx.
  */
 struct hash_device_data {
        struct hash_register __iomem    *base;
+       phys_addr_t             phybase;
        struct klist_node       list_node;
        struct device           *dev;
        struct spinlock         ctx_lock;
 
                                struct device *dev)
 {
        struct hash_platform_data *platform_data = dev->platform_data;
+       struct dma_slave_config conf = {
+               .direction = DMA_MEM_TO_DEV,
+               .dst_addr = device_data->phybase + HASH_DMA_FIFO,
+               .dst_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES,
+               .dst_maxburst = 16,
+        };
+
        dma_cap_zero(device_data->dma.mask);
        dma_cap_set(DMA_SLAVE, device_data->dma.mask);
 
                                platform_data->dma_filter,
                                device_data->dma.cfg_mem2hash);
 
+       dmaengine_slave_config(device_data->dma.chan_mem2hash, &conf);
+
        init_completion(&device_data->dma.complete);
 }
 
                goto out_kfree;
        }
 
+       device_data->phybase = res->start;
        device_data->base = ioremap(res->start, resource_size(res));
        if (!device_data->base) {
                dev_err(dev, "[%s] ioremap() failed!",