coresight: etm4x: Change etm4_platform_driver driver for MMIO devices
authorAnshuman Khandual <anshuman.khandual@arm.com>
Mon, 10 Jul 2023 06:24:58 +0000 (11:54 +0530)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Wed, 26 Jul 2023 15:46:25 +0000 (16:46 +0100)
commit73d779a03a76ac3fe26832cba3c9ad04194af595
treedf6954cc9dbcf55f3234dfbb10123b878165ab84
parent5a1c7097472fcde5745654e3a59f55140903d9cc
coresight: etm4x: Change etm4_platform_driver driver for MMIO devices

Add support for handling MMIO based devices via platform driver. We need to
make sure that :

1) The APB clock, if present is enabled at probe and via runtime_pm ops
2) Use the ETM4x architecture or CoreSight architecture registers to
   identify a device as CoreSight ETM4x, instead of relying a white list of
   "Peripheral IDs"

The driver doesn't get to handle the devices yet, until we wire the ACPI
changes to move the devices to be handled via platform driver than the
etm4_amba driver.

Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: coresight@lists.linaro.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20230710062500.45147-5-anshuman.khandual@arm.com
drivers/hwtracing/coresight/coresight-etm4x-core.c
drivers/hwtracing/coresight/coresight-etm4x.h
include/linux/coresight.h