diff mbox series

[1/2] soc: mediatek: pm-domains: Use correct mask for bus_prot_clr

Message ID 20210201054542.1470695-2-Bilal.Wasim@imgtec.com (mailing list archive)
State New, archived
Headers show
Series Misc bug fixes in mtk power domain driver | expand

Commit Message

Bilal Wasim Feb. 1, 2021, 5:45 a.m. UTC
When "bus_prot_reg_update" is false, the driver should use
INFRA_TOPAXI_PROTECTEN for both setting and clearing the bus
protection. However, the driver does not use this mask for
clearing bus protection which causes failure when booting
the imgtec gpu.

Corrected and tested with mt8173 chromebook.

Signed-off-by: Bilal Wasim <Bilal.Wasim@imgtec.com>
---
 drivers/soc/mediatek/mtk-pm-domains.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Hsin-Yi Wang Feb. 1, 2021, 5:54 a.m. UTC | #1
On Mon, Feb 1, 2021 at 1:45 PM Bilal Wasim <bilalwasim676@gmail.com> wrote:
>
> When "bus_prot_reg_update" is false, the driver should use
> INFRA_TOPAXI_PROTECTEN for both setting and clearing the bus
> protection. However, the driver does not use this mask for
> clearing bus protection which causes failure when booting
> the imgtec gpu.
>
> Corrected and tested with mt8173 chromebook.
>
> Signed-off-by: Bilal Wasim <Bilal.Wasim@imgtec.com>

Reviewed-by: Hsin-Yi Wang <hsinyi@chromium.org>

> ---
>  drivers/soc/mediatek/mtk-pm-domains.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/soc/mediatek/mtk-pm-domains.h b/drivers/soc/mediatek/mtk-pm-domains.h
> index 141dc76054e6..7454c0b4f768 100644
> --- a/drivers/soc/mediatek/mtk-pm-domains.h
> +++ b/drivers/soc/mediatek/mtk-pm-domains.h
> @@ -60,7 +60,7 @@
>  #define BUS_PROT_UPDATE_TOPAXI(_mask)                          \
>                 BUS_PROT_UPDATE(_mask,                          \
>                                 INFRA_TOPAXI_PROTECTEN,         \
> -                               INFRA_TOPAXI_PROTECTEN_CLR,     \
> +                               INFRA_TOPAXI_PROTECTEN,         \
>                                 INFRA_TOPAXI_PROTECTSTA1)
>
>  struct scpsys_bus_prot_data {
> --
> 2.25.1
>
Matthias Brugger Feb. 1, 2021, 8:59 a.m. UTC | #2
On 01/02/2021 06:45, Bilal Wasim wrote:
> When "bus_prot_reg_update" is false, the driver should use
> INFRA_TOPAXI_PROTECTEN for both setting and clearing the bus
> protection. However, the driver does not use this mask for
> clearing bus protection which causes failure when booting
> the imgtec gpu.
> 
> Corrected and tested with mt8173 chromebook.
> 
> Signed-off-by: Bilal Wasim <Bilal.Wasim@imgtec.com>
> ---
>  drivers/soc/mediatek/mtk-pm-domains.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soc/mediatek/mtk-pm-domains.h b/drivers/soc/mediatek/mtk-pm-domains.h
> index 141dc76054e6..7454c0b4f768 100644
> --- a/drivers/soc/mediatek/mtk-pm-domains.h
> +++ b/drivers/soc/mediatek/mtk-pm-domains.h
> @@ -60,7 +60,7 @@
>  #define BUS_PROT_UPDATE_TOPAXI(_mask)				\
>  		BUS_PROT_UPDATE(_mask,				\
>  				INFRA_TOPAXI_PROTECTEN,		\
> -				INFRA_TOPAXI_PROTECTEN_CLR,	\
> +				INFRA_TOPAXI_PROTECTEN,		\

BUS_PROT_UPDATE sets bus_prot_reg_update to true, which contradicts what you say
in the commit message.

Please clarify.

Regards,
Matthias

>  				INFRA_TOPAXI_PROTECTSTA1)
>  
>  struct scpsys_bus_prot_data {
>
Bilal Wasim Feb. 1, 2021, 11:34 a.m. UTC | #3
On Mon, 1 Feb 2021 09:59:47 +0100
Matthias Brugger <matthias.bgg@gmail.com> wrote:

> On 01/02/2021 06:45, Bilal Wasim wrote:
> > When "bus_prot_reg_update" is false, the driver should use
> > INFRA_TOPAXI_PROTECTEN for both setting and clearing the bus
> > protection. However, the driver does not use this mask for
> > clearing bus protection which causes failure when booting
> > the imgtec gpu.
> > 
> > Corrected and tested with mt8173 chromebook.
> > 
> > Signed-off-by: Bilal Wasim <Bilal.Wasim@imgtec.com>
> > ---
> >  drivers/soc/mediatek/mtk-pm-domains.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/soc/mediatek/mtk-pm-domains.h
> > b/drivers/soc/mediatek/mtk-pm-domains.h index
> > 141dc76054e6..7454c0b4f768 100644 ---
> > a/drivers/soc/mediatek/mtk-pm-domains.h +++
> > b/drivers/soc/mediatek/mtk-pm-domains.h @@ -60,7 +60,7 @@
> >  #define BUS_PROT_UPDATE_TOPAXI(_mask)
> > 	\ BUS_PROT_UPDATE(_mask,				\
> >  				INFRA_TOPAXI_PROTECTEN,
> > 	\
> > -				INFRA_TOPAXI_PROTECTEN_CLR,
> > \
> > +				INFRA_TOPAXI_PROTECTEN,
> > 	\  
> 
> BUS_PROT_UPDATE sets bus_prot_reg_update to true, which contradicts
> what you say in the commit message.
> 
> Please clarify.
> 

Yes, that's a problem in the commit message - Will fix and send out a
v2.

Thanks,
Bilal

> Regards,
> Matthias
> 
> >  				INFRA_TOPAXI_PROTECTSTA1)
> >  
> >  struct scpsys_bus_prot_data {
> >
diff mbox series

Patch

diff --git a/drivers/soc/mediatek/mtk-pm-domains.h b/drivers/soc/mediatek/mtk-pm-domains.h
index 141dc76054e6..7454c0b4f768 100644
--- a/drivers/soc/mediatek/mtk-pm-domains.h
+++ b/drivers/soc/mediatek/mtk-pm-domains.h
@@ -60,7 +60,7 @@ 
 #define BUS_PROT_UPDATE_TOPAXI(_mask)				\
 		BUS_PROT_UPDATE(_mask,				\
 				INFRA_TOPAXI_PROTECTEN,		\
-				INFRA_TOPAXI_PROTECTEN_CLR,	\
+				INFRA_TOPAXI_PROTECTEN,		\
 				INFRA_TOPAXI_PROTECTSTA1)
 
 struct scpsys_bus_prot_data {