diff mbox series

[3/8] RFC: drivers/video/rockchip/rk_edp.c: Change interrupt polarity configuration

Message ID 20200925183856.447902421@rtp-net.org
State RFC
Delegated to: Anatolij Gustschin
Headers show
Series RFC: Pinebook pro EDP support | expand

Commit Message

Arnaud Patard (Rtp) Sept. 25, 2020, 6:36 p.m. UTC
The linux code is setting polarity configuration to 3 but
uboot code is setting it to 1. Change the configuration to match the
linux configuration

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>

Comments

Alper Nebi Yasak Oct. 22, 2020, 6:39 p.m. UTC | #1
On 25/09/2020 21:36, Arnaud Patard (Rtp) wrote:
> The linux code is setting polarity configuration to 3 but
> uboot code is setting it to 1. Change the configuration to match the
> linux configuration
FYI, coreboot does the same as existing code, but Linux support for this
is bound to be better than both coreboot and U-Boot.

> 
> Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
> Index: u-boot/drivers/video/rockchip/rk_edp.c
> ===================================================================
> --- u-boot.orig/drivers/video/rockchip/rk_edp.c
> +++ u-boot/drivers/video/rockchip/rk_edp.c
> @@ -100,10 +100,13 @@ static void rk_edp_init_refclk(struct rk
>  	       &regs->dp_reserv2);
>  }
>  
> +#define INT_POL1                                (0x1 << 1)
> +#define INT_POL0                                (0x1 << 0)
> +

INT_POL is defined at arch/arm/include/asm/arch-rockchip/edp_rk3288.h,
so these would probably go there.

>  static void rk_edp_init_interrupt(struct rk3288_edp *regs)
>  {
>  	/* Set interrupt pin assertion polarity as high */
> -	writel(INT_POL, &regs->int_ctl);
> +	writel(INT_POL0 | INT_POL1, &regs->int_ctl);
>  
>  	/* Clear pending registers */
>  	writel(0xff, &regs->common_int_sta_1);
> 
>
Arnaud Patard (Rtp) Oct. 23, 2020, 8:51 a.m. UTC | #2
Alper Nebi Yasak <alpernebiyasak@gmail.com> writes:

> On 25/09/2020 21:36, Arnaud Patard (Rtp) wrote:
>> The linux code is setting polarity configuration to 3 but
>> uboot code is setting it to 1. Change the configuration to match the
>> linux configuration
> FYI, coreboot does the same as existing code, but Linux support for this
> is bound to be better than both coreboot and U-Boot.
>
>> 
>> Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
>> Index: u-boot/drivers/video/rockchip/rk_edp.c
>> ===================================================================
>> --- u-boot.orig/drivers/video/rockchip/rk_edp.c
>> +++ u-boot/drivers/video/rockchip/rk_edp.c
>> @@ -100,10 +100,13 @@ static void rk_edp_init_refclk(struct rk
>>  	       &regs->dp_reserv2);
>>  }
>>  
>> +#define INT_POL1                                (0x1 << 1)
>> +#define INT_POL0                                (0x1 << 0)
>> +
>
> INT_POL is defined at arch/arm/include/asm/arch-rockchip/edp_rk3288.h,
> so these would probably go there.
>

I've been wondering were to put them tbh. I'll move them to edp_rk3288.h
then.

Arnaud
diff mbox series

Patch

Index: u-boot/drivers/video/rockchip/rk_edp.c
===================================================================
--- u-boot.orig/drivers/video/rockchip/rk_edp.c
+++ u-boot/drivers/video/rockchip/rk_edp.c
@@ -100,10 +100,13 @@  static void rk_edp_init_refclk(struct rk
 	       &regs->dp_reserv2);
 }
 
+#define INT_POL1                                (0x1 << 1)
+#define INT_POL0                                (0x1 << 0)
+
 static void rk_edp_init_interrupt(struct rk3288_edp *regs)
 {
 	/* Set interrupt pin assertion polarity as high */
-	writel(INT_POL, &regs->int_ctl);
+	writel(INT_POL0 | INT_POL1, &regs->int_ctl);
 
 	/* Clear pending registers */
 	writel(0xff, &regs->common_int_sta_1);