@@ -86,9 +86,9 @@ static void etm_set_pwrup(struct etm_drvdata *drvdata)
86
86
{
87
87
u32 etmpdcr ;
88
88
89
- etmpdcr = readl_relaxed (drvdata -> base + ETMPDCR );
89
+ etmpdcr = readl_relaxed (drvdata -> csa . base + ETMPDCR );
90
90
etmpdcr |= ETMPDCR_PWD_UP ;
91
- writel_relaxed (etmpdcr , drvdata -> base + ETMPDCR );
91
+ writel_relaxed (etmpdcr , drvdata -> csa . base + ETMPDCR );
92
92
/* Ensure pwrup completes before subsequent cp14 accesses */
93
93
mb ();
94
94
isb ();
@@ -101,9 +101,9 @@ static void etm_clr_pwrup(struct etm_drvdata *drvdata)
101
101
/* Ensure pending cp14 accesses complete before clearing pwrup */
102
102
mb ();
103
103
isb ();
104
- etmpdcr = readl_relaxed (drvdata -> base + ETMPDCR );
104
+ etmpdcr = readl_relaxed (drvdata -> csa . base + ETMPDCR );
105
105
etmpdcr &= ~ETMPDCR_PWD_UP ;
106
- writel_relaxed (etmpdcr , drvdata -> base + ETMPDCR );
106
+ writel_relaxed (etmpdcr , drvdata -> csa . base + ETMPDCR );
107
107
}
108
108
109
109
/**
@@ -365,7 +365,7 @@ static int etm_enable_hw(struct etm_drvdata *drvdata)
365
365
struct etm_config * config = & drvdata -> config ;
366
366
struct coresight_device * csdev = drvdata -> csdev ;
367
367
368
- CS_UNLOCK (drvdata -> base );
368
+ CS_UNLOCK (drvdata -> csa . base );
369
369
370
370
rc = coresight_claim_device_unlocked (csdev );
371
371
if (rc )
@@ -427,7 +427,7 @@ static int etm_enable_hw(struct etm_drvdata *drvdata)
427
427
etm_clr_prog (drvdata );
428
428
429
429
done :
430
- CS_LOCK (drvdata -> base );
430
+ CS_LOCK (drvdata -> csa . base );
431
431
432
432
dev_dbg (& drvdata -> csdev -> dev , "cpu: %d enable smp call done: %d\n" ,
433
433
drvdata -> cpu , rc );
@@ -549,7 +549,7 @@ static void etm_disable_hw(void *info)
549
549
struct etm_config * config = & drvdata -> config ;
550
550
struct coresight_device * csdev = drvdata -> csdev ;
551
551
552
- CS_UNLOCK (drvdata -> base );
552
+ CS_UNLOCK (drvdata -> csa . base );
553
553
etm_set_prog (drvdata );
554
554
555
555
/* Read back sequencer and counters for post trace analysis */
@@ -561,7 +561,7 @@ static void etm_disable_hw(void *info)
561
561
etm_set_pwrdwn (drvdata );
562
562
coresight_disclaim_device_unlocked (csdev );
563
563
564
- CS_LOCK (drvdata -> base );
564
+ CS_LOCK (drvdata -> csa . base );
565
565
566
566
dev_dbg (& drvdata -> csdev -> dev ,
567
567
"cpu: %d disable smp call done\n" , drvdata -> cpu );
@@ -574,7 +574,7 @@ static void etm_disable_perf(struct coresight_device *csdev)
574
574
if (WARN_ON_ONCE (drvdata -> cpu != smp_processor_id ()))
575
575
return ;
576
576
577
- CS_UNLOCK (drvdata -> base );
577
+ CS_UNLOCK (drvdata -> csa . base );
578
578
579
579
/* Setting the prog bit disables tracing immediately */
580
580
etm_set_prog (drvdata );
@@ -586,7 +586,7 @@ static void etm_disable_perf(struct coresight_device *csdev)
586
586
etm_set_pwrdwn (drvdata );
587
587
coresight_disclaim_device_unlocked (csdev );
588
588
589
- CS_LOCK (drvdata -> base );
589
+ CS_LOCK (drvdata -> csa . base );
590
590
591
591
/*
592
592
* perf will release trace ids when _free_aux()
@@ -733,7 +733,7 @@ static void etm_init_arch_data(void *info)
733
733
/* Make sure all registers are accessible */
734
734
etm_os_unlock (drvdata );
735
735
736
- CS_UNLOCK (drvdata -> base );
736
+ CS_UNLOCK (drvdata -> csa . base );
737
737
738
738
/* First dummy read */
739
739
(void )etm_readl (drvdata , ETMPDSR );
@@ -766,7 +766,7 @@ static void etm_init_arch_data(void *info)
766
766
767
767
etm_set_pwrdwn (drvdata );
768
768
etm_clr_pwrup (drvdata );
769
- CS_LOCK (drvdata -> base );
769
+ CS_LOCK (drvdata -> csa . base );
770
770
}
771
771
772
772
static int __init etm_hp_setup (void )
@@ -827,8 +827,7 @@ static int etm_probe(struct amba_device *adev, const struct amba_id *id)
827
827
if (IS_ERR (base ))
828
828
return PTR_ERR (base );
829
829
830
- drvdata -> base = base ;
831
- desc .access = CSDEV_ACCESS_IOMEM (base );
830
+ desc .access = drvdata -> csa = CSDEV_ACCESS_IOMEM (base );
832
831
833
832
spin_lock_init (& drvdata -> spinlock );
834
833
0 commit comments