aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2008-11-11 15:12:33 -0500
committerDan Williams <dan.j.williams@intel.com>2008-11-11 15:12:33 -0500
commit65e503814dec83c7b2ac955e75919d009109c919 (patch)
tree6cd01ca32ae269760d864d3c1bae94fdb0e95a45 /arch
parent137cb55c6dcd56cb367285adaf15f808a2a9fec7 (diff)
iop-adma: use iop_paranoia() for debug BUG_ONs
Now that the critical read back to flush the next descriptor address is fixed we can downgrade some BUG_ONs that need only be enabled when testing changes to the driver. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/hardware/iop3xx-adma.h5
-rw-r--r--arch/arm/include/asm/hardware/iop_adma.h6
-rw-r--r--arch/arm/mach-iop13xx/include/mach/adma.h3
3 files changed, 11 insertions, 3 deletions
diff --git a/arch/arm/include/asm/hardware/iop3xx-adma.h b/arch/arm/include/asm/hardware/iop3xx-adma.h
index 87bff09633aa..83e6ba338e2c 100644
--- a/arch/arm/include/asm/hardware/iop3xx-adma.h
+++ b/arch/arm/include/asm/hardware/iop3xx-adma.h
@@ -730,7 +730,8 @@ static inline void iop_desc_set_next_desc(struct iop_adma_desc_slot *desc,
730{ 730{
731 /* hw_desc->next_desc is the same location for all channels */ 731 /* hw_desc->next_desc is the same location for all channels */
732 union iop3xx_desc hw_desc = { .ptr = desc->hw_desc, }; 732 union iop3xx_desc hw_desc = { .ptr = desc->hw_desc, };
733 BUG_ON(hw_desc.dma->next_desc); 733
734 iop_paranoia(hw_desc.dma->next_desc);
734 hw_desc.dma->next_desc = next_desc_addr; 735 hw_desc.dma->next_desc = next_desc_addr;
735} 736}
736 737
@@ -760,7 +761,7 @@ static inline int iop_desc_get_zero_result(struct iop_adma_desc_slot *desc)
760 struct iop3xx_desc_aau *hw_desc = desc->hw_desc; 761 struct iop3xx_desc_aau *hw_desc = desc->hw_desc;
761 struct iop3xx_aau_desc_ctrl desc_ctrl = hw_desc->desc_ctrl_field; 762 struct iop3xx_aau_desc_ctrl desc_ctrl = hw_desc->desc_ctrl_field;
762 763
763 BUG_ON(!(desc_ctrl.tx_complete && desc_ctrl.zero_result_en)); 764 iop_paranoia(!(desc_ctrl.tx_complete && desc_ctrl.zero_result_en));
764 return desc_ctrl.zero_result_err; 765 return desc_ctrl.zero_result_err;
765} 766}
766 767
diff --git a/arch/arm/include/asm/hardware/iop_adma.h b/arch/arm/include/asm/hardware/iop_adma.h
index cb7e3611bcba..385c6e8cbbd2 100644
--- a/arch/arm/include/asm/hardware/iop_adma.h
+++ b/arch/arm/include/asm/hardware/iop_adma.h
@@ -23,6 +23,12 @@
23 23
24#define IOP_ADMA_SLOT_SIZE 32 24#define IOP_ADMA_SLOT_SIZE 32
25#define IOP_ADMA_THRESHOLD 4 25#define IOP_ADMA_THRESHOLD 4
26#ifdef DEBUG
27#define IOP_PARANOIA 1
28#else
29#define IOP_PARANOIA 0
30#endif
31#define iop_paranoia(x) BUG_ON(IOP_PARANOIA && (x))
26 32
27/** 33/**
28 * struct iop_adma_device - internal representation of an ADMA device 34 * struct iop_adma_device - internal representation of an ADMA device
diff --git a/arch/arm/mach-iop13xx/include/mach/adma.h b/arch/arm/mach-iop13xx/include/mach/adma.h
index 60019c8e6465..5722e86f2174 100644
--- a/arch/arm/mach-iop13xx/include/mach/adma.h
+++ b/arch/arm/mach-iop13xx/include/mach/adma.h
@@ -404,7 +404,8 @@ static inline void iop_desc_set_next_desc(struct iop_adma_desc_slot *desc,
404 u32 next_desc_addr) 404 u32 next_desc_addr)
405{ 405{
406 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc; 406 struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
407 BUG_ON(hw_desc->next_desc); 407
408 iop_paranoia(hw_desc->next_desc);
408 hw_desc->next_desc = next_desc_addr; 409 hw_desc->next_desc = next_desc_addr;
409} 410}
410 411