platform_data: edma: Be precise with the paRAM struct
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Mon, 14 Apr 2014 11:41:56 +0000 (14:41 +0300)
committerVinod Koul <vinod.koul@intel.com>
Tue, 22 Apr 2014 16:04:49 +0000 (21:34 +0530)
The edmacc_param struct should follow the layout of the paRAM area in the
HW. Be explicit on the size of the fields (u32) and also mark the struct
as packed to avoid any padding on non 32bit architectures.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Joel Fernandes <joelf@ti.com>
Reviewed-and-Tested-by: Joel Fernandes <joelf@ti.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
include/linux/platform_data/edma.h

index f50821cb64be8c11165659b0f0719398bfa004cf..923f8a3e4ce0040299045013ba20a52f598af877 100644 (file)
 
 /* PaRAM slots are laid out like this */
 struct edmacc_param {
-       unsigned int opt;
-       unsigned int src;
-       unsigned int a_b_cnt;
-       unsigned int dst;
-       unsigned int src_dst_bidx;
-       unsigned int link_bcntrld;
-       unsigned int src_dst_cidx;
-       unsigned int ccnt;
-};
+       u32 opt;
+       u32 src;
+       u32 a_b_cnt;
+       u32 dst;
+       u32 src_dst_bidx;
+       u32 link_bcntrld;
+       u32 src_dst_cidx;
+       u32 ccnt;
+} __packed;
 
 /* fields in edmacc_param.opt */
 #define SAM            BIT(0)