diff mbox series

[v2,1/3] soc: qcom: geni: move GENI_IF_DISABLE_RO to common header

Message ID 20210618141839.3777270-2-vkoul@kernel.org
State Accepted
Commit cb531cab62a19e97d8de0a2c9935daed93ec3736
Headers show
Series soc: qcom: geni: add support for gpi dma | expand

Commit Message

Vinod Koul June 18, 2021, 2:18 p.m. UTC
GENI_IF_DISABLE_RO is used by geni spi driver as well to check the
status if GENI, so move this to common header qcom-geni-se.h

Also, add FIFO_IF_DISABLE define.

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Signed-off-by: Vinod Koul <vkoul@kernel.org>

---
 drivers/soc/qcom/qcom-geni-se.c | 1 -
 include/linux/qcom-geni-se.h    | 4 ++++
 2 files changed, 4 insertions(+), 1 deletion(-)

-- 
2.31.1

Comments

Bjorn Andersson June 18, 2021, 5:03 p.m. UTC | #1
On Fri 18 Jun 09:18 CDT 2021, Vinod Koul wrote:

> GENI_IF_DISABLE_RO is used by geni spi driver as well to check the

> status if GENI, so move this to common header qcom-geni-se.h

> 

> Also, add FIFO_IF_DISABLE define.

> 


Afaict these registers relates to the hardware block that is primarily
owned by the individual engine-drivers, would it not make sense to move
them all to the shared header file?

(The patch itself still looks ok, but needs the consuming patch to be
merged)

Regards,
Bjorn

> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> Signed-off-by: Vinod Koul <vkoul@kernel.org>

> ---

>  drivers/soc/qcom/qcom-geni-se.c | 1 -

>  include/linux/qcom-geni-se.h    | 4 ++++

>  2 files changed, 4 insertions(+), 1 deletion(-)

> 

> diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c

> index 5bdfb1565c14..fe666ea0c487 100644

> --- a/drivers/soc/qcom/qcom-geni-se.c

> +++ b/drivers/soc/qcom/qcom-geni-se.c

> @@ -104,7 +104,6 @@ static const char * const icc_path_names[] = {"qup-core", "qup-config",

>  #define GENI_OUTPUT_CTRL		0x24

>  #define GENI_CGC_CTRL			0x28

>  #define GENI_CLK_CTRL_RO		0x60

> -#define GENI_IF_DISABLE_RO		0x64

>  #define GENI_FW_S_REVISION_RO		0x6c

>  #define SE_GENI_BYTE_GRAN		0x254

>  #define SE_GENI_TX_PACKING_CFG0		0x260

> diff --git a/include/linux/qcom-geni-se.h b/include/linux/qcom-geni-se.h

> index 7c811eebcaab..5114e2144b17 100644

> --- a/include/linux/qcom-geni-se.h

> +++ b/include/linux/qcom-geni-se.h

> @@ -63,6 +63,7 @@ struct geni_se {

>  #define SE_GENI_STATUS			0x40

>  #define GENI_SER_M_CLK_CFG		0x48

>  #define GENI_SER_S_CLK_CFG		0x4c

> +#define GENI_IF_DISABLE_RO		0x64

>  #define GENI_FW_REVISION_RO		0x68

>  #define SE_GENI_CLK_SEL			0x7c

>  #define SE_GENI_DMA_MODE_EN		0x258

> @@ -105,6 +106,9 @@ struct geni_se {

>  #define CLK_DIV_MSK			GENMASK(15, 4)

>  #define CLK_DIV_SHFT			4

>  

> +/* GENI_IF_DISABLE_RO fields */

> +#define FIFO_IF_DISABLE			(BIT(0))

> +

>  /* GENI_FW_REVISION_RO fields */

>  #define FW_REV_PROTOCOL_MSK		GENMASK(15, 8)

>  #define FW_REV_PROTOCOL_SHFT		8

> -- 

> 2.31.1

>
Vinod Koul June 22, 2021, 12:13 p.m. UTC | #2
On 18-06-21, 12:03, Bjorn Andersson wrote:
> On Fri 18 Jun 09:18 CDT 2021, Vinod Koul wrote:

> 

> > GENI_IF_DISABLE_RO is used by geni spi driver as well to check the

> > status if GENI, so move this to common header qcom-geni-se.h

> > 

> > Also, add FIFO_IF_DISABLE define.

> > 

> 

> Afaict these registers relates to the hardware block that is primarily

> owned by the individual engine-drivers, would it not make sense to move

> them all to the shared header file?


the GENI_IF_DISABLE_RO is used by SPI and I2C drivers, so we would create two
copies. So better to be defined in geni header
-- 
~Vinod
diff mbox series

Patch

diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c
index 5bdfb1565c14..fe666ea0c487 100644
--- a/drivers/soc/qcom/qcom-geni-se.c
+++ b/drivers/soc/qcom/qcom-geni-se.c
@@ -104,7 +104,6 @@  static const char * const icc_path_names[] = {"qup-core", "qup-config",
 #define GENI_OUTPUT_CTRL		0x24
 #define GENI_CGC_CTRL			0x28
 #define GENI_CLK_CTRL_RO		0x60
-#define GENI_IF_DISABLE_RO		0x64
 #define GENI_FW_S_REVISION_RO		0x6c
 #define SE_GENI_BYTE_GRAN		0x254
 #define SE_GENI_TX_PACKING_CFG0		0x260
diff --git a/include/linux/qcom-geni-se.h b/include/linux/qcom-geni-se.h
index 7c811eebcaab..5114e2144b17 100644
--- a/include/linux/qcom-geni-se.h
+++ b/include/linux/qcom-geni-se.h
@@ -63,6 +63,7 @@  struct geni_se {
 #define SE_GENI_STATUS			0x40
 #define GENI_SER_M_CLK_CFG		0x48
 #define GENI_SER_S_CLK_CFG		0x4c
+#define GENI_IF_DISABLE_RO		0x64
 #define GENI_FW_REVISION_RO		0x68
 #define SE_GENI_CLK_SEL			0x7c
 #define SE_GENI_DMA_MODE_EN		0x258
@@ -105,6 +106,9 @@  struct geni_se {
 #define CLK_DIV_MSK			GENMASK(15, 4)
 #define CLK_DIV_SHFT			4
 
+/* GENI_IF_DISABLE_RO fields */
+#define FIFO_IF_DISABLE			(BIT(0))
+
 /* GENI_FW_REVISION_RO fields */
 #define FW_REV_PROTOCOL_MSK		GENMASK(15, 8)
 #define FW_REV_PROTOCOL_SHFT		8