dmaengine: qcom_bam_dma: Add support for BAM v1.7.0
Subsystems (3)
PATCH 1/1 dmaengine: qcom_bam_dma: Add support for BAM v1.7.0
Add register offset table entry for the newer (v1.7.0) version of the BAM IP found on MSM8916. Update the DT bindings documentation.
--- .../devicetree/bindings/dma/qcom_bam_dma.txt | 1 + drivers/dma/qcom_bam_dma.c | 30 ++++++++++++++++++++++ 2 files changed, 31 insertions(+)
Documentation/devicetree/bindings/dma/qcom_bam_dma.txt +1 -0
@@ -4,6 +4,7 @@ Required properties: - compatible: must be one of the following: * "qcom,bam-v1.4.0" for MSM8974, APQ8074 and APQ8084 * "qcom,bam-v1.3.0" for APQ8064, IPQ8064 and MSM8960 + * "qcom,bam-v1.7.0" for MSM8916 - reg: Address range for DMA registers - interrupts: Should contain the one interrupt shared by all channels - #dma-cells: must be <1>, the cell in the dmas property of the client device
drivers/dma/qcom_bam_dma.c +30 -0
@@ -171,6 +171,35 @@ static const struct reg_offset_data bam_v1_4_reg_info[] = { [BAM_P_FIFO_SIZES] = { 0x1820, 0x00, 0x1000, 0x00 }, }; +static const struct reg_offset_data bam_v1_7_reg_info[] = { + [BAM_CTRL ] = {0x00000 ,0x00 ,0x00 ,0x00 }, + [BAM_REVISION ] = {0x01000 ,0x00 ,0x00 ,0x00 }, + [BAM_NUM_PIPES ] = {0x01008 ,0x00 ,0x00 ,0x00 }, + [BAM_DESC_CNT_TRSHLD ] = {0x00008 ,0x00 ,0x00 ,0x00 }, + [BAM_IRQ_SRCS ] = {0x03010 ,0x00 ,0x00 ,0x00 }, + [BAM_IRQ_SRCS_MSK ] = {0x03014 ,0x00 ,0x00 ,0x00 }, + [BAM_IRQ_SRCS_UNMASKED ] = {0x03018 ,0x00 ,0x00 ,0x00 }, + [BAM_IRQ_STTS ] = {0x00014 ,0x00 ,0x00 ,0x00 }, + [BAM_IRQ_CLR ] = {0x00018 ,0x00 ,0x00 ,0x00 }, + [BAM_IRQ_EN ] = {0x0001C ,0x00 ,0x00 ,0x00 }, + [BAM_CNFG_BITS ] = {0x0007C ,0x00 ,0x00 ,0x00 }, + [BAM_IRQ_SRCS_EE ] = {0x03000 ,0x00 ,0x00 ,0x80 }, + [BAM_IRQ_SRCS_MSK_EE ] = {0x03004 ,0x00 ,0x00 ,0x80 }, + [BAM_P_CTRL ] = {0x13000 ,0x1000 ,0x00 ,0x00 }, + [BAM_P_RST ] = {0x13004 ,0x1000 ,0x00 ,0x00 }, + [BAM_P_HALT ] = {0x13008 ,0x1000 ,0x00 ,0x00 }, + [BAM_P_IRQ_STTS ] = {0x13010 ,0x1000 ,0x00 ,0x00 }, + [BAM_P_IRQ_CLR ] = {0x13014 ,0x1000 ,0x00 ,0x00 }, + [BAM_P_IRQ_EN ] = {0x13018 ,0x1000 ,0x00 ,0x00 }, + [BAM_P_EVNT_DEST_ADDR ] = {0x1382C ,0x00 ,0x1000 ,0x00 }, + [BAM_P_EVNT_REG ] = {0x13818 ,0x00 ,0x1000 ,0x00 }, + [BAM_P_SW_OFSTS ] = {0x13800 ,0x00 ,0x1000 ,0x00 }, + [BAM_P_DATA_FIFO_ADDR ] = {0x13824 ,0x00 ,0x1000 ,0x00 }, + [BAM_P_DESC_FIFO_ADDR ] = {0x1381C ,0x00 ,0x1000 ,0x00 }, + [BAM_P_EVNT_GEN_TRSHLD ] = {0x13828 ,0x00 ,0x1000 ,0x00 }, + [BAM_P_FIFO_SIZES ] = {0x13820 ,0x00 ,0x1000 ,0x00 }, +}; +/* BAM CTRL */ #define BAM_SW_RST BIT(0)#define BAM_EN BIT(1)
@@ -1053,6 +1082,7 @@ static void bam_channel_init(struct bam_device *bdev, struct bam_chan *bchan,static const struct of_device_id bam_of_match[] = { { .compatible ="qcom,bam-v1.3.0" , .data = &bam_v1_3_reg_info }, { .compatible ="qcom,bam-v1.4.0" , .data = &bam_v1_4_reg_info }, + { .compatible ="qcom,bam-v1.7.0" , .data = &bam_v1_7_reg_info }, {} };
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation
Quoted 5 lines · Archit Taneja
Add register offset table entry for the newer (v1.7.0) version of the BAM IP found on MSM8916. Update the DT bindings documentation.
Signed-off-by Archit Taneja <[email protected]>---
Looks good.
Signature · 3 lines
Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
Stanimir Varbanov
Reviewed-byQuoted 11 lines · Andy Gross
Quoted 5 lines · Archit Taneja
Add register offset table entry for the newer (v1.7.0) version of the BAM IP found on MSM8916. Update the DT bindings documentation.
Signed-off-by Archit Taneja <[email protected]>---
Looks good.
Reviewed-by Andy Gross <[email protected]>
Vinod, is that one OK with you? If so could you merge it in your tree.
regards,
Stan
Quoted 33 lines · Archit Taneja
Add register offset table entry for the newer (v1.7.0) version of the BAM IP found on MSM8916. Update the DT bindings documentation.
Signed-off-by Archit Taneja <[email protected]>--- .../devicetree/bindings/dma/qcom_bam_dma.txt | 1 + drivers/dma/qcom_bam_dma.c | 30 ++++++++++++++++++++++ 2 files changed, 31 insertions(+)Documentation/devicetree/bindings/dma/qcom_bam_dma.txt +1
-0@@ -4,6 +4,7 @@ Required properties: - compatible: must be one of the following: * "qcom,bam-v1.4.0" for MSM8974, APQ8074 and APQ8084 * "qcom,bam-v1.3.0" for APQ8064, IPQ8064 and MSM8960 + * "qcom,bam-v1.7.0" for MSM8916 - reg: Address range for DMA registers - interrupts: Should contain the one interrupt shared by all channels - #dma-cells: must be <1>, the cell in the dmas property of the client devicedrivers/dma/qcom_bam_dma.c +4
-0@@ -171,6 +171,35 @@ static const struct reg_offset_data bam_v1_4_reg_info[] = { [BAM_P_FIFO_SIZES] = { 0x1820, 0x00, 0x1000, 0x00 }, }; +static const struct reg_offset_data bam_v1_7_reg_info[] = { + [BAM_CTRL ] = {0x00000 ,0x00 ,0x00 ,0x00 }, + [BAM_REVISION ] = {0x01000 ,0x00 ,0x00 ,0x00 }, + [BAM_NUM_PIPES ] = {0x01008 ,0x00 ,0x00 ,0x00 },
drivers/dma/qcom_bam_dma.c static const struct reg_offset_data bam_v1_4_reg_info[] = { · line 187
Quoted 10 lines
drivers/dma/qcom_bam_dma.c +10
-0+ [BAM_DESC_CNT_TRSHLD] = { 0x00008, 0x00, 0x00, 0x00 }, + [BAM_IRQ_SRCS] = { 0x03010, 0x00, 0x00, 0x00 }, + [BAM_IRQ_SRCS_MSK] = { 0x03014, 0x00, 0x00, 0x00 }, + [BAM_IRQ_SRCS_UNMASKED] = { 0x03018, 0x00, 0x00, 0x00 }, + [BAM_IRQ_STTS] = { 0x00014, 0x00, 0x00, 0x00 }, + [BAM_IRQ_CLR] = { 0x00018, 0x00, 0x00, 0x00 }, + [BAM_IRQ_EN] = { 0x0001C, 0x00, 0x00, 0x00 }, + [BAM_CNFG_BITS] = { 0x0007C, 0x00, 0x00, 0x00 }, + [BAM_IRQ_SRCS_EE] = { 0x03000, 0x00, 0x00, 0x80 }, + [BAM_IRQ_SRCS_MSK_EE] = { 0x03004, 0x00, 0x00, 0x80 },
huh, 0x80 should be 0x1000 ?
Quoted 14 lines
drivers/dma/qcom_bam_dma.c +14
-0+ [BAM_P_CTRL] = { 0x13000, 0x1000, 0x00, 0x00 }, + [BAM_P_RST] = { 0x13004, 0x1000, 0x00, 0x00 }, + [BAM_P_HALT] = { 0x13008, 0x1000, 0x00, 0x00 }, + [BAM_P_IRQ_STTS] = { 0x13010, 0x1000, 0x00, 0x00 }, + [BAM_P_IRQ_CLR] = { 0x13014, 0x1000, 0x00, 0x00 }, + [BAM_P_IRQ_EN] = { 0x13018, 0x1000, 0x00, 0x00 }, + [BAM_P_EVNT_DEST_ADDR] = { 0x1382C, 0x00, 0x1000, 0x00 }, + [BAM_P_EVNT_REG] = { 0x13818, 0x00, 0x1000, 0x00 }, + [BAM_P_SW_OFSTS] = { 0x13800, 0x00, 0x1000, 0x00 }, + [BAM_P_DATA_FIFO_ADDR] = { 0x13824, 0x00, 0x1000, 0x00 }, + [BAM_P_DESC_FIFO_ADDR] = { 0x1381C, 0x00, 0x1000, 0x00 }, + [BAM_P_EVNT_GEN_TRSHLD] = { 0x13828, 0x00, 0x1000, 0x00 }, + [BAM_P_FIFO_SIZES] = { 0x13820, 0x00, 0x1000, 0x00 }, +};
<snip>
Signature · 2 lines
regards, Stan
On Fri, Feb 20, 2015 at 01:57:29PM +0200, Stanimir Varbanov wrote:
<snip>
Quoted 6 lines
drivers/dma/qcom_bam_dma.c static const struct reg_offset_data bam_v1_4_reg_info[] = { · line 187
Quoted 4 lines
drivers/dma/qcom_bam_dma.c +4
-0+ [BAM_IRQ_EN] = { 0x0001C, 0x00, 0x00, 0x00 }, + [BAM_CNFG_BITS] = { 0x0007C, 0x00, 0x00, 0x00 }, + [BAM_IRQ_SRCS_EE] = { 0x03000, 0x00, 0x00, 0x80 }, + [BAM_IRQ_SRCS_MSK_EE] = { 0x03004, 0x00, 0x00, 0x80 },huh,
0x80should be0x1000?
yeah the SRCS_EE and SRCS_MSK_EE should be 0x1000. good catch
<snip>
Signature · 3 lines
Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
PATCH v2 1/1 dmaengine: qcom_bam_dma: Add support for BAM v1.7.0
In reply to Archit TanejaAdd register offset table entry for the newer (v1.7.0) version of the BAM IP found on MSM8916. Update the DT bindings documentation.
---
Change in v2: Fix wrong execution environment multiplier for BAM_IRQ_SRCS_EE and
BAM_IRQ_SRCS_MSK_EE
.../devicetree/bindings/dma/qcom_bam_dma.txt | 1 + drivers/dma/qcom_bam_dma.c | 30 ++++++++++++++++++++++ 2 files changed, 31 insertions(+)
Documentation/devicetree/bindings/dma/qcom_bam_dma.txt +1 -0
@@ -4,6 +4,7 @@ Required properties: - compatible: must be one of the following: * "qcom,bam-v1.4.0" for MSM8974, APQ8074 and APQ8084 * "qcom,bam-v1.3.0" for APQ8064, IPQ8064 and MSM8960 + * "qcom,bam-v1.7.0" for MSM8916 - reg: Address range for DMA registers - interrupts: Should contain the one interrupt shared by all channels - #dma-cells: must be <1>, the cell in the dmas property of the client device
drivers/dma/qcom_bam_dma.c +30 -0
@@ -171,6 +171,35 @@ static const struct reg_offset_data bam_v1_4_reg_info[] = { [BAM_P_FIFO_SIZES] = { 0x1820, 0x00, 0x1000, 0x00 }, }; +static const struct reg_offset_data bam_v1_7_reg_info[] = { + [BAM_CTRL ] = {0x00000 ,0x00 ,0x00 ,0x00 }, + [BAM_REVISION ] = {0x01000 ,0x00 ,0x00 ,0x00 }, + [BAM_NUM_PIPES ] = {0x01008 ,0x00 ,0x00 ,0x00 }, + [BAM_DESC_CNT_TRSHLD ] = {0x00008 ,0x00 ,0x00 ,0x00 }, + [BAM_IRQ_SRCS ] = {0x03010 ,0x00 ,0x00 ,0x00 }, + [BAM_IRQ_SRCS_MSK ] = {0x03014 ,0x00 ,0x00 ,0x00 }, + [BAM_IRQ_SRCS_UNMASKED ] = {0x03018 ,0x00 ,0x00 ,0x00 }, + [BAM_IRQ_STTS ] = {0x00014 ,0x00 ,0x00 ,0x00 }, + [BAM_IRQ_CLR ] = {0x00018 ,0x00 ,0x00 ,0x00 }, + [BAM_IRQ_EN ] = {0x0001C ,0x00 ,0x00 ,0x00 }, + [BAM_CNFG_BITS ] = {0x0007C ,0x00 ,0x00 ,0x00 }, + [BAM_IRQ_SRCS_EE ] = {0x03000 ,0x00 ,0x00 ,0x1000 }, + [BAM_IRQ_SRCS_MSK_EE ] = {0x03004 ,0x00 ,0x00 ,0x1000 }, + [BAM_P_CTRL ] = {0x13000 ,0x1000 ,0x00 ,0x00 }, + [BAM_P_RST ] = {0x13004 ,0x1000 ,0x00 ,0x00 }, + [BAM_P_HALT ] = {0x13008 ,0x1000 ,0x00 ,0x00 }, + [BAM_P_IRQ_STTS ] = {0x13010 ,0x1000 ,0x00 ,0x00 }, + [BAM_P_IRQ_CLR ] = {0x13014 ,0x1000 ,0x00 ,0x00 }, + [BAM_P_IRQ_EN ] = {0x13018 ,0x1000 ,0x00 ,0x00 }, + [BAM_P_EVNT_DEST_ADDR ] = {0x1382C ,0x00 ,0x1000 ,0x00 }, + [BAM_P_EVNT_REG ] = {0x13818 ,0x00 ,0x1000 ,0x00 }, + [BAM_P_SW_OFSTS ] = {0x13800 ,0x00 ,0x1000 ,0x00 }, + [BAM_P_DATA_FIFO_ADDR ] = {0x13824 ,0x00 ,0x1000 ,0x00 }, + [BAM_P_DESC_FIFO_ADDR ] = {0x1381C ,0x00 ,0x1000 ,0x00 }, + [BAM_P_EVNT_GEN_TRSHLD ] = {0x13828 ,0x00 ,0x1000 ,0x00 }, + [BAM_P_FIFO_SIZES ] = {0x13820 ,0x00 ,0x1000 ,0x00 }, +}; +/* BAM CTRL */ #define BAM_SW_RST BIT(0)#define BAM_EN BIT(1)
@@ -1051,6 +1080,7 @@ static void bam_channel_init(struct bam_device *bdev, struct bam_chan *bchan,static const struct of_device_id bam_of_match[] = { { .compatible ="qcom,bam-v1.3.0" , .data = &bam_v1_3_reg_info }, { .compatible ="qcom,bam-v1.4.0" , .data = &bam_v1_4_reg_info }, + { .compatible ="qcom,bam-v1.7.0" , .data = &bam_v1_7_reg_info }, {} };
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation
Quoted 11 lines · Archit Taneja
Add register offset table entry for the newer (v1.7.0) version of the BAM IP found on MSM8916. Update the DT bindings documentation.
Signed-off-by Archit Taneja <[email protected]>---
Change in v2: Fix wrong execution environment multiplier forBAM_IRQ_SRCS_EEand
BAM_IRQ_SRCS_MSK_EE.../devicetree/bindings/dma/qcom_bam_dma.txt | 1 + drivers/dma/qcom_bam_dma.c | 30 ++++++++++++++++++++++ 2 files changed, 31 insertions(+)
Using Stan's SPI DMA patches[1].
Thanks,
Ivan
Vinod Koul
AppliedQuoted 3 lines · Archit Taneja
Add register offset table entry for the newer (v1.7.0) version of the BAM IP found on MSM8916. Update the DT bindings documentation.
Applied, thanks
Signature · 1 line
~Vinod