@@ -86,9 +86,9 @@ static void etm_set_pwrup(struct etm_drvdata *drvdata)
8686{
8787 u32 etmpdcr ;
8888
89- etmpdcr = readl_relaxed (drvdata -> base + ETMPDCR );
89+ etmpdcr = readl_relaxed (drvdata -> csa . base + ETMPDCR );
9090 etmpdcr |= ETMPDCR_PWD_UP ;
91- writel_relaxed (etmpdcr , drvdata -> base + ETMPDCR );
91+ writel_relaxed (etmpdcr , drvdata -> csa . base + ETMPDCR );
9292 /* Ensure pwrup completes before subsequent cp14 accesses */
9393 mb ();
9494 isb ();
@@ -101,9 +101,9 @@ static void etm_clr_pwrup(struct etm_drvdata *drvdata)
101101 /* Ensure pending cp14 accesses complete before clearing pwrup */
102102 mb ();
103103 isb ();
104- etmpdcr = readl_relaxed (drvdata -> base + ETMPDCR );
104+ etmpdcr = readl_relaxed (drvdata -> csa . base + ETMPDCR );
105105 etmpdcr &= ~ETMPDCR_PWD_UP ;
106- writel_relaxed (etmpdcr , drvdata -> base + ETMPDCR );
106+ writel_relaxed (etmpdcr , drvdata -> csa . base + ETMPDCR );
107107}
108108
109109/**
@@ -365,7 +365,7 @@ static int etm_enable_hw(struct etm_drvdata *drvdata)
365365 struct etm_config * config = & drvdata -> config ;
366366 struct coresight_device * csdev = drvdata -> csdev ;
367367
368- CS_UNLOCK (drvdata -> base );
368+ CS_UNLOCK (drvdata -> csa . base );
369369
370370 rc = coresight_claim_device_unlocked (csdev );
371371 if (rc )
@@ -427,7 +427,7 @@ static int etm_enable_hw(struct etm_drvdata *drvdata)
427427 etm_clr_prog (drvdata );
428428
429429done :
430- CS_LOCK (drvdata -> base );
430+ CS_LOCK (drvdata -> csa . base );
431431
432432 dev_dbg (& drvdata -> csdev -> dev , "cpu: %d enable smp call done: %d\n" ,
433433 drvdata -> cpu , rc );
@@ -549,7 +549,7 @@ static void etm_disable_hw(void *info)
549549 struct etm_config * config = & drvdata -> config ;
550550 struct coresight_device * csdev = drvdata -> csdev ;
551551
552- CS_UNLOCK (drvdata -> base );
552+ CS_UNLOCK (drvdata -> csa . base );
553553 etm_set_prog (drvdata );
554554
555555 /* Read back sequencer and counters for post trace analysis */
@@ -561,7 +561,7 @@ static void etm_disable_hw(void *info)
561561 etm_set_pwrdwn (drvdata );
562562 coresight_disclaim_device_unlocked (csdev );
563563
564- CS_LOCK (drvdata -> base );
564+ CS_LOCK (drvdata -> csa . base );
565565
566566 dev_dbg (& drvdata -> csdev -> dev ,
567567 "cpu: %d disable smp call done\n" , drvdata -> cpu );
@@ -574,7 +574,7 @@ static void etm_disable_perf(struct coresight_device *csdev)
574574 if (WARN_ON_ONCE (drvdata -> cpu != smp_processor_id ()))
575575 return ;
576576
577- CS_UNLOCK (drvdata -> base );
577+ CS_UNLOCK (drvdata -> csa . base );
578578
579579 /* Setting the prog bit disables tracing immediately */
580580 etm_set_prog (drvdata );
@@ -586,7 +586,7 @@ static void etm_disable_perf(struct coresight_device *csdev)
586586 etm_set_pwrdwn (drvdata );
587587 coresight_disclaim_device_unlocked (csdev );
588588
589- CS_LOCK (drvdata -> base );
589+ CS_LOCK (drvdata -> csa . base );
590590
591591 /*
592592 * perf will release trace ids when _free_aux()
@@ -733,7 +733,7 @@ static void etm_init_arch_data(void *info)
733733 /* Make sure all registers are accessible */
734734 etm_os_unlock (drvdata );
735735
736- CS_UNLOCK (drvdata -> base );
736+ CS_UNLOCK (drvdata -> csa . base );
737737
738738 /* First dummy read */
739739 (void )etm_readl (drvdata , ETMPDSR );
@@ -766,7 +766,7 @@ static void etm_init_arch_data(void *info)
766766
767767 etm_set_pwrdwn (drvdata );
768768 etm_clr_pwrup (drvdata );
769- CS_LOCK (drvdata -> base );
769+ CS_LOCK (drvdata -> csa . base );
770770}
771771
772772static int __init etm_hp_setup (void )
@@ -827,8 +827,7 @@ static int etm_probe(struct amba_device *adev, const struct amba_id *id)
827827 if (IS_ERR (base ))
828828 return PTR_ERR (base );
829829
830- drvdata -> base = base ;
831- desc .access = CSDEV_ACCESS_IOMEM (base );
830+ desc .access = drvdata -> csa = CSDEV_ACCESS_IOMEM (base );
832831
833832 spin_lock_init (& drvdata -> spinlock );
834833
0 commit comments