dmaengine: Revert "dmaengine: qcom: bam_dma: Avoid writing unavailable register"
This commit causes a hard crash on sdm845 and likely other platforms. Revert it until a proper fix is found. This reverts commit57a7138d06
: ("dmaengine: qcom: bam_dma: Avoid writing unavailable register") Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org> Fixes:57a7138d06
("dmaengine: qcom: bam_dma: Avoid writing unavailable register") Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on sdm845-DB845c Tested-by: David Heidelberg <david@ixit.cz> Link: https://lore.kernel.org/r/20250208223112.142567-1-caleb.connolly@linaro.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
76ed9b7d17
commit
e521f51671
1 changed files with 8 additions and 16 deletions
|
@ -59,9 +59,6 @@ struct bam_desc_hw {
|
|||
#define DESC_FLAG_NWD BIT(12)
|
||||
#define DESC_FLAG_CMD BIT(11)
|
||||
|
||||
#define BAM_NDP_REVISION_START 0x20
|
||||
#define BAM_NDP_REVISION_END 0x27
|
||||
|
||||
struct bam_async_desc {
|
||||
struct virt_dma_desc vd;
|
||||
|
||||
|
@ -401,7 +398,6 @@ struct bam_device {
|
|||
|
||||
/* dma start transaction tasklet */
|
||||
struct tasklet_struct task;
|
||||
u32 bam_revision;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -445,10 +441,8 @@ static void bam_reset(struct bam_device *bdev)
|
|||
writel_relaxed(val, bam_addr(bdev, 0, BAM_CTRL));
|
||||
|
||||
/* set descriptor threshold, start with 4 bytes */
|
||||
if (in_range(bdev->bam_revision, BAM_NDP_REVISION_START,
|
||||
BAM_NDP_REVISION_END))
|
||||
writel_relaxed(DEFAULT_CNT_THRSHLD,
|
||||
bam_addr(bdev, 0, BAM_DESC_CNT_TRSHLD));
|
||||
writel_relaxed(DEFAULT_CNT_THRSHLD,
|
||||
bam_addr(bdev, 0, BAM_DESC_CNT_TRSHLD));
|
||||
|
||||
/* Enable default set of h/w workarounds, ie all except BAM_FULL_PIPE */
|
||||
writel_relaxed(BAM_CNFG_BITS_DEFAULT, bam_addr(bdev, 0, BAM_CNFG_BITS));
|
||||
|
@ -1006,10 +1000,9 @@ static void bam_apply_new_config(struct bam_chan *bchan,
|
|||
maxburst = bchan->slave.src_maxburst;
|
||||
else
|
||||
maxburst = bchan->slave.dst_maxburst;
|
||||
if (in_range(bdev->bam_revision, BAM_NDP_REVISION_START,
|
||||
BAM_NDP_REVISION_END))
|
||||
writel_relaxed(maxburst,
|
||||
bam_addr(bdev, 0, BAM_DESC_CNT_TRSHLD));
|
||||
|
||||
writel_relaxed(maxburst,
|
||||
bam_addr(bdev, 0, BAM_DESC_CNT_TRSHLD));
|
||||
}
|
||||
|
||||
bchan->reconfigure = 0;
|
||||
|
@ -1199,11 +1192,10 @@ static int bam_init(struct bam_device *bdev)
|
|||
u32 val;
|
||||
|
||||
/* read revision and configuration information */
|
||||
val = readl_relaxed(bam_addr(bdev, 0, BAM_REVISION));
|
||||
if (!bdev->num_ees)
|
||||
if (!bdev->num_ees) {
|
||||
val = readl_relaxed(bam_addr(bdev, 0, BAM_REVISION));
|
||||
bdev->num_ees = (val >> NUM_EES_SHIFT) & NUM_EES_MASK;
|
||||
|
||||
bdev->bam_revision = val & REVISION_MASK;
|
||||
}
|
||||
|
||||
/* check that configured EE is within range */
|
||||
if (bdev->ee >= bdev->num_ees)
|
||||
|
|
Loading…
Add table
Reference in a new issue