diff mbox series

[v2,33/36] coresight: acpi: Support for components

Message ID 1555344260-12375-34-git-send-email-suzuki.poulose@arm.com (mailing list archive)
State New, archived
Headers show
Series coresight: Support for ACPI bindings | expand

Commit Message

Suzuki K Poulose April 15, 2019, 4:04 p.m. UTC
All AMBA devices are handled via ACPI AMBA scan notifier
infrastructure. The platform devices get the ACPI id
added to their driver.

Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
 drivers/acpi/acpi_amba.c                           | 9 +++++++++
 drivers/hwtracing/coresight/coresight-replicator.c | 9 ++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

Comments

Mathieu Poirier April 25, 2019, 5:45 p.m. UTC | #1
On Mon, Apr 15, 2019 at 05:04:16PM +0100, Suzuki K Poulose wrote:
> All AMBA devices are handled via ACPI AMBA scan notifier
> infrastructure. The platform devices get the ACPI id
> added to their driver.
> 
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> ---
>  drivers/acpi/acpi_amba.c                           | 9 +++++++++
>  drivers/hwtracing/coresight/coresight-replicator.c | 9 ++++++++-
>  2 files changed, 17 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/acpi_amba.c b/drivers/acpi/acpi_amba.c
> index 7f77c07..eef5a69 100644
> --- a/drivers/acpi/acpi_amba.c
> +++ b/drivers/acpi/acpi_amba.c
> @@ -24,6 +24,15 @@
>  
>  static const struct acpi_device_id amba_id_list[] = {
>  	{"ARMH0061", 0}, /* PL061 GPIO Device */
> +	{"ARMHC500", 0}, /* ARM CoreSight ETM4x */
> +	{"ARMHC501", 0}, /* ARM CoreSight ETR */
> +	{"ARMHC502", 0}, /* ARM CoreSight STM */
> +	{"ARMHC503", 0}, /* ARM CoreSight Debug */
> +	{"ARMHC979", 0}, /* ARM CoreSight TPIU */
> +	{"ARMHC97C", 0}, /* ARM CoreSight SoC-400 TMC, SoC-600 ETF/ETB */
> +	{"ARMHC98D", 0}, /* ARM CoreSight Dynamic Replicator */
> +	{"ARMHC9CA", 0}, /* ARM CoreSight CATU */
> +	{"ARMHC9FF", 0}, /* ARM CoreSight Funnel */
>  	{"", 0},
>  };
>  
> diff --git a/drivers/hwtracing/coresight/coresight-replicator.c b/drivers/hwtracing/coresight/coresight-replicator.c
> index 2eb489c..a8f42df 100644
> --- a/drivers/hwtracing/coresight/coresight-replicator.c
> +++ b/drivers/hwtracing/coresight/coresight-replicator.c
> @@ -5,6 +5,7 @@
>   * Description: CoreSight Replicator driver
>   */
>  
> +#include <linux/acpi.h>
>  #include <linux/amba/bus.h>
>  #include <linux/kernel.h>
>  #include <linux/device.h>
> @@ -290,11 +291,17 @@ static const struct of_device_id static_replicator_match[] = {
>  	{}
>  };
>  
> +#ifdef CONFIG_ACPI
> +static const struct acpi_device_id static_replicator_acpi_ids[] = {
> +	{"ARMHC985", 0}, /* ARM CoreSight Static Replicator */
> +};
> +#endif
>  static struct platform_driver static_replicator_driver = {
>  	.probe          = static_replicator_probe,
>  	.driver         = {
>  		.name   = "coresight-replicator",
> -		.of_match_table = static_replicator_match,
> +		.of_match_table = of_match_ptr(static_replicator_match),
> +		.acpi_match_table = ACPI_PTR(static_replicator_acpi_ids),
>  		.pm	= &replicator_dev_pm_ops,
>  		.suppress_bind_attrs = true,
>  	},

For the coresight part: Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>

You probably want to split this patch in half so that Rafael can pick up the
the first part of it in his tree.

I am done reviewing the core part of this set and will do 33-36 next week.  For
the next revision I would leave them out and send a separate set in order to
avoid delaying the ACPI part.

Thanks,
Mathieu

> -- 
> 2.7.4
>
Suzuki K Poulose April 29, 2019, 8:54 a.m. UTC | #2
Rafael,

On 25/04/2019 18:45, Mathieu Poirier wrote:
> On Mon, Apr 15, 2019 at 05:04:16PM +0100, Suzuki K Poulose wrote:
>> All AMBA devices are handled via ACPI AMBA scan notifier
>> infrastructure. The platform devices get the ACPI id
>> added to their driver.
>>
>> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
>> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
>> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
>> ---
>>   drivers/acpi/acpi_amba.c                           | 9 +++++++++
>>   drivers/hwtracing/coresight/coresight-replicator.c | 9 ++++++++-
>>   2 files changed, 17 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/acpi/acpi_amba.c b/drivers/acpi/acpi_amba.c
>> index 7f77c07..eef5a69 100644
>> --- a/drivers/acpi/acpi_amba.c
>> +++ b/drivers/acpi/acpi_amba.c
>> @@ -24,6 +24,15 @@
>>   
>>   static const struct acpi_device_id amba_id_list[] = {
>>   	{"ARMH0061", 0}, /* PL061 GPIO Device */
>> +	{"ARMHC500", 0}, /* ARM CoreSight ETM4x */
>> +	{"ARMHC501", 0}, /* ARM CoreSight ETR */
>> +	{"ARMHC502", 0}, /* ARM CoreSight STM */
>> +	{"ARMHC503", 0}, /* ARM CoreSight Debug */
>> +	{"ARMHC979", 0}, /* ARM CoreSight TPIU */
>> +	{"ARMHC97C", 0}, /* ARM CoreSight SoC-400 TMC, SoC-600 ETF/ETB */
>> +	{"ARMHC98D", 0}, /* ARM CoreSight Dynamic Replicator */
>> +	{"ARMHC9CA", 0}, /* ARM CoreSight CATU */
>> +	{"ARMHC9FF", 0}, /* ARM CoreSight Funnel */
>>   	{"", 0},
>>   };
>>   
>> diff --git a/drivers/hwtracing/coresight/coresight-replicator.c b/drivers/hwtracing/coresight/coresight-replicator.c
>> index 2eb489c..a8f42df 100644
>> --- a/drivers/hwtracing/coresight/coresight-replicator.c
>> +++ b/drivers/hwtracing/coresight/coresight-replicator.c
>> @@ -5,6 +5,7 @@
>>    * Description: CoreSight Replicator driver
>>    */
>>   
>> +#include <linux/acpi.h>
>>   #include <linux/amba/bus.h>
>>   #include <linux/kernel.h>
>>   #include <linux/device.h>
>> @@ -290,11 +291,17 @@ static const struct of_device_id static_replicator_match[] = {
>>   	{}
>>   };
>>   
>> +#ifdef CONFIG_ACPI
>> +static const struct acpi_device_id static_replicator_acpi_ids[] = {
>> +	{"ARMHC985", 0}, /* ARM CoreSight Static Replicator */
>> +};
>> +#endif
>>   static struct platform_driver static_replicator_driver = {
>>   	.probe          = static_replicator_probe,
>>   	.driver         = {
>>   		.name   = "coresight-replicator",
>> -		.of_match_table = static_replicator_match,
>> +		.of_match_table = of_match_ptr(static_replicator_match),
>> +		.acpi_match_table = ACPI_PTR(static_replicator_acpi_ids),
>>   		.pm	= &replicator_dev_pm_ops,
>>   		.suppress_bind_attrs = true,
>>   	},
> 
> For the coresight part: Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> 
> You probably want to split this patch in half so that Rafael can pick up the
> the first part of it in his tree.
> 


We have the CoreSight components span over AMBA and platform devices. This
series is almost getting ready, so for the next revision I would like to
get your view on how to split this particular patch.

We have components in AMBA and Platform devices. Would you prefer to split
the patch and pull the ACPI_AMBA changes above in to your tree ? Or are
you happy with Mathieu pushing this change together with the other ACPI
bindings support in the CoreSight drivers ?

FWIW, we should still be fine if we split and the patches reach at different
times. Please let me know your thoughts.

Suzuki
diff mbox series

Patch

diff --git a/drivers/acpi/acpi_amba.c b/drivers/acpi/acpi_amba.c
index 7f77c07..eef5a69 100644
--- a/drivers/acpi/acpi_amba.c
+++ b/drivers/acpi/acpi_amba.c
@@ -24,6 +24,15 @@ 
 
 static const struct acpi_device_id amba_id_list[] = {
 	{"ARMH0061", 0}, /* PL061 GPIO Device */
+	{"ARMHC500", 0}, /* ARM CoreSight ETM4x */
+	{"ARMHC501", 0}, /* ARM CoreSight ETR */
+	{"ARMHC502", 0}, /* ARM CoreSight STM */
+	{"ARMHC503", 0}, /* ARM CoreSight Debug */
+	{"ARMHC979", 0}, /* ARM CoreSight TPIU */
+	{"ARMHC97C", 0}, /* ARM CoreSight SoC-400 TMC, SoC-600 ETF/ETB */
+	{"ARMHC98D", 0}, /* ARM CoreSight Dynamic Replicator */
+	{"ARMHC9CA", 0}, /* ARM CoreSight CATU */
+	{"ARMHC9FF", 0}, /* ARM CoreSight Funnel */
 	{"", 0},
 };
 
diff --git a/drivers/hwtracing/coresight/coresight-replicator.c b/drivers/hwtracing/coresight/coresight-replicator.c
index 2eb489c..a8f42df 100644
--- a/drivers/hwtracing/coresight/coresight-replicator.c
+++ b/drivers/hwtracing/coresight/coresight-replicator.c
@@ -5,6 +5,7 @@ 
  * Description: CoreSight Replicator driver
  */
 
+#include <linux/acpi.h>
 #include <linux/amba/bus.h>
 #include <linux/kernel.h>
 #include <linux/device.h>
@@ -290,11 +291,17 @@  static const struct of_device_id static_replicator_match[] = {
 	{}
 };
 
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id static_replicator_acpi_ids[] = {
+	{"ARMHC985", 0}, /* ARM CoreSight Static Replicator */
+};
+#endif
 static struct platform_driver static_replicator_driver = {
 	.probe          = static_replicator_probe,
 	.driver         = {
 		.name   = "coresight-replicator",
-		.of_match_table = static_replicator_match,
+		.of_match_table = of_match_ptr(static_replicator_match),
+		.acpi_match_table = ACPI_PTR(static_replicator_acpi_ids),
 		.pm	= &replicator_dev_pm_ops,
 		.suppress_bind_attrs = true,
 	},