Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118877
b: refs/heads/master
c: 65e5038
h: refs/heads/master
i:
  118875: 880609f
v: v3
  • Loading branch information
Dan Williams committed Nov 11, 2008
1 parent e8593b4 commit 5930d3c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 137cb55c6dcd56cb367285adaf15f808a2a9fec7
refs/heads/master: 65e503814dec83c7b2ac955e75919d009109c919
5 changes: 3 additions & 2 deletions trunk/arch/arm/include/asm/hardware/iop3xx-adma.h
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,8 @@ static inline void iop_desc_set_next_desc(struct iop_adma_desc_slot *desc,
{
/* hw_desc->next_desc is the same location for all channels */
union iop3xx_desc hw_desc = { .ptr = desc->hw_desc, };
BUG_ON(hw_desc.dma->next_desc);

iop_paranoia(hw_desc.dma->next_desc);
hw_desc.dma->next_desc = next_desc_addr;
}

Expand Down Expand Up @@ -760,7 +761,7 @@ static inline int iop_desc_get_zero_result(struct iop_adma_desc_slot *desc)
struct iop3xx_desc_aau *hw_desc = desc->hw_desc;
struct iop3xx_aau_desc_ctrl desc_ctrl = hw_desc->desc_ctrl_field;

BUG_ON(!(desc_ctrl.tx_complete && desc_ctrl.zero_result_en));
iop_paranoia(!(desc_ctrl.tx_complete && desc_ctrl.zero_result_en));
return desc_ctrl.zero_result_err;
}

Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/arm/include/asm/hardware/iop_adma.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@

#define IOP_ADMA_SLOT_SIZE 32
#define IOP_ADMA_THRESHOLD 4
#ifdef DEBUG
#define IOP_PARANOIA 1
#else
#define IOP_PARANOIA 0
#endif
#define iop_paranoia(x) BUG_ON(IOP_PARANOIA && (x))

/**
* struct iop_adma_device - internal representation of an ADMA device
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/arm/mach-iop13xx/include/mach/adma.h
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,8 @@ static inline void iop_desc_set_next_desc(struct iop_adma_desc_slot *desc,
u32 next_desc_addr)
{
struct iop13xx_adma_desc_hw *hw_desc = desc->hw_desc;
BUG_ON(hw_desc->next_desc);

iop_paranoia(hw_desc->next_desc);
hw_desc->next_desc = next_desc_addr;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/dma/iop-adma.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ iop_adma_tx_submit(struct dma_async_tx_descriptor *tx)
BUG_ON(iop_desc_get_next_desc(old_chain_tail) != next_dma); /* flush */

/* check for pre-chained descriptors */
BUG_ON(iop_desc_get_next_desc(sw_desc));
iop_paranoia(iop_desc_get_next_desc(sw_desc));

/* increment the pending count by the number of slots
* memcpy operations have a 1:1 (slot:operation) relation
Expand Down

0 comments on commit 5930d3c

Please sign in to comment.