From: Naresh Bhat naresh.bhat@linaro.org
Add vexpress sysreg probe support, platform ID and remove dts binding. Logs on the v8 model are as below
root@genericarmv8:/sys# find . -name LINA0009* ./bus/acpi/devices/LINA0009:00 ./bus/platform/devices/LINA0009:00 ./bus/platform/drivers/vexpress-sysreg/LINA0009:00 ./devices/platform/LINA0009:00 ./devices/LNXSYSTM:00/device:00/ACPI0004:01/ACPI0004:02/LINA0009:00 root@genericarmv8:/sys#
Naresh Bhat (3): v2m_sysreg: Add ACPI probing for SYSREG ACPI: Add vexpress sysreg platform ID arm64: dts: remove the vexpress-sysreg binding
arch/arm64/boot/dts/foundation-v8-acpi.dts | 6 +++--- drivers/acpi/acpi_platform.c | 3 ++- drivers/mfd/vexpress-sysreg.c | 9 +++++++++ 3 files changed, 14 insertions(+), 4 deletions(-)
From: Naresh Bhat naresh.bhat@linaro.org
Add match table and pointers for ACPI probing into vexpress-sysreg driver.
Signed-off-by: Naresh Bhat naresh.bhat@linaro.org --- drivers/mfd/vexpress-sysreg.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/drivers/mfd/vexpress-sysreg.c b/drivers/mfd/vexpress-sysreg.c index 981bef4..9e39075 100644 --- a/drivers/mfd/vexpress-sysreg.c +++ b/drivers/mfd/vexpress-sysreg.c @@ -22,6 +22,7 @@ #include <linux/stat.h> #include <linux/timer.h> #include <linux/vexpress.h> +#include <linux/acpi.h>
#define SYS_ID 0x000 #define SYS_SW 0x004 @@ -512,10 +513,18 @@ static const struct of_device_id vexpress_sysreg_match[] = { {}, };
+#ifdef CONFIG_ACPI +static const struct acpi_device_id vexpress_sysreg_acpi_match[] = { + { "LINA0009", }, + { } +}; +#endif + static struct platform_driver vexpress_sysreg_driver = { .driver = { .name = "vexpress-sysreg", .of_match_table = vexpress_sysreg_match, + .acpi_match_table = ACPI_PTR(vexpress_sysreg_acpi_match), }, .probe = vexpress_sysreg_probe, };
Hi,
We need to revisited this driver, I have tried to run kernel with sysreg and got failure. Here is the reason: [...] static void __iomem *vexpress_sysreg_base(void) { if (!__vexpress_sysreg_base) { struct device_node *node = of_find_compatible_node(NULL, NULL, "arm,vexpress-sysreg");
__vexpress_sysreg_base = of_iomap(node, 0); }
WARN_ON(!__vexpress_sysreg_base);
return __vexpress_sysreg_base; } [...]
So sysreg still tries to obtain info from FDT while now we are using pure ACPI kernel.
Regards, Tomasz
On 23.10.2013 13:23, naresh.bhat@linaro.org wrote:
From: Naresh Bhat naresh.bhat@linaro.org
Add match table and pointers for ACPI probing into vexpress-sysreg driver.
Signed-off-by: Naresh Bhat naresh.bhat@linaro.org
drivers/mfd/vexpress-sysreg.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/drivers/mfd/vexpress-sysreg.c b/drivers/mfd/vexpress-sysreg.c index 981bef4..9e39075 100644 --- a/drivers/mfd/vexpress-sysreg.c +++ b/drivers/mfd/vexpress-sysreg.c @@ -22,6 +22,7 @@ #include <linux/stat.h> #include <linux/timer.h> #include <linux/vexpress.h> +#include <linux/acpi.h>
#define SYS_ID 0x000 #define SYS_SW 0x004 @@ -512,10 +513,18 @@ static const struct of_device_id vexpress_sysreg_match[] = { {}, };
+#ifdef CONFIG_ACPI +static const struct acpi_device_id vexpress_sysreg_acpi_match[] = {
- { "LINA0009", },
- { }
+}; +#endif
- static struct platform_driver vexpress_sysreg_driver = { .driver = { .name = "vexpress-sysreg", .of_match_table = vexpress_sysreg_match,
}, .probe = vexpress_sysreg_probe, };.acpi_match_table = ACPI_PTR(vexpress_sysreg_acpi_match),
Agreed, This patch was issued very long back. We use to have FDT and ACPI blob both.
Regards -Naresh
On 10 June 2014 17:39, Tomasz Nowicki tomasz.nowicki@linaro.org wrote:
Hi,
We need to revisited this driver, I have tried to run kernel with sysreg and got failure. Here is the reason: [...] static void __iomem *vexpress_sysreg_base(void) { if (!__vexpress_sysreg_base) { struct device_node *node = of_find_compatible_node(NULL, NULL, "arm,vexpress-sysreg");
__vexpress_sysreg_base = of_iomap(node, 0); } WARN_ON(!__vexpress_sysreg_base); return __vexpress_sysreg_base;
} [...]
So sysreg still tries to obtain info from FDT while now we are using pure ACPI kernel.
Regards, Tomasz
On 23.10.2013 13:23, naresh.bhat@linaro.org wrote:
From: Naresh Bhat naresh.bhat@linaro.org
Add match table and pointers for ACPI probing into vexpress-sysreg driver.
Signed-off-by: Naresh Bhat naresh.bhat@linaro.org
drivers/mfd/vexpress-sysreg.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/drivers/mfd/vexpress-sysreg.c b/drivers/mfd/vexpress-sysreg. c index 981bef4..9e39075 100644 --- a/drivers/mfd/vexpress-sysreg.c +++ b/drivers/mfd/vexpress-sysreg.c @@ -22,6 +22,7 @@ #include <linux/stat.h> #include <linux/timer.h> #include <linux/vexpress.h> +#include <linux/acpi.h>
#define SYS_ID 0x000 #define SYS_SW 0x004 @@ -512,10 +513,18 @@ static const struct of_device_id vexpress_sysreg_match[] = { {}, };
+#ifdef CONFIG_ACPI +static const struct acpi_device_id vexpress_sysreg_acpi_match[] = {
{ "LINA0009", },
{ }
+}; +#endif
- static struct platform_driver vexpress_sysreg_driver = { .driver = { .name = "vexpress-sysreg", .of_match_table = vexpress_sysreg_match,
};.acpi_match_table = ACPI_PTR(vexpress_sysreg_acpi_match), }, .probe = vexpress_sysreg_probe,
From: Naresh Bhat naresh.bhat@linaro.org
Whitelist the following platform ID vexpress-sysreg LINA0009
Signed-off-by: Naresh Bhat naresh.bhat@linaro.org --- drivers/acpi/acpi_platform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/acpi_platform.c b/drivers/acpi/acpi_platform.c index fdfa990..7234949 100644 --- a/drivers/acpi/acpi_platform.c +++ b/drivers/acpi/acpi_platform.c @@ -35,8 +35,9 @@ static const struct acpi_device_id acpi_platform_device_ids[] = { { "LINA0005" }, /* virtio mmio */ { "LINA0007" }, /* armv8 pmu */ { "LINA0008" }, /* Fixed clock */ + { "LINA0009" }, /* vexpress-sysreg */
- { "AMBA0000" }, + { "AMBA0000" },
{ } };
From: Naresh Bhat naresh.bhat@linaro.org
This binding has now been moved to DSDT so remove from here.
Signed-off-by: Naresh Bhat naresh.bhat@linaro.org --- arch/arm64/boot/dts/foundation-v8-acpi.dts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/boot/dts/foundation-v8-acpi.dts b/arch/arm64/boot/dts/foundation-v8-acpi.dts index f0671eb..7d38df7 100644 --- a/arch/arm64/boot/dts/foundation-v8-acpi.dts +++ b/arch/arm64/boot/dts/foundation-v8-acpi.dts @@ -195,14 +195,14 @@ #size-cells = <1>; ranges = <0 3 0 0x200000>;
+ /* + * Removed for ACPI + * v2m_sysreg: sysreg@010000 { compatible = "arm,vexpress-sysreg"; reg = <0x010000 0x1000>; };
- /* - * Removed for ACPI - * v2m_serial0: uart@090000 { compatible = "arm,pl011", "arm,primecell"; reg = <0x090000 0x1000>;
These patches look good, but will only work for the foundation model. Do you have something in mind for porting the RTSM definition?
In the RTSM model, vexpress-sysreg is closely related to the mmci definition and mcc section in dts so all of this will need to be converted at the same time. The mmci definition is complicated because it has to use a GPIO from vexpress-sysreg. I have started working on this to understand what is necessary, but I will not look at it again until after I'm finished adding clocks into the AMBA bus ACPI patches.
Brandon
-----Original Message----- From: linaro-acpi-bounces@lists.linaro.org [mailto:linaro-acpi-bounces@lists.linaro.org] On Behalf Of naresh.bhat@linaro.org Sent: Wednesday, October 23, 2013 6:24 AM To: linaro-acpi@lists.linaro.org Subject: [Linaro-acpi] [RFC PATCH 0/3] ACPI: Add vexpress-sysreg
From: Naresh Bhat naresh.bhat@linaro.org
Add vexpress sysreg probe support, platform ID and remove dts binding. Logs on the v8 model are as below
root@genericarmv8:/sys# find . -name LINA0009* ./bus/acpi/devices/LINA0009:00 ./bus/platform/devices/LINA0009:00 ./bus/platform/drivers/vexpress-sysreg/LINA0009:00 ./devices/platform/LINA0009:00 ./devices/LNXSYSTM:00/device:00/ACPI0004:01/ACPI0004:02/LINA0009:00 root@genericarmv8:/sys#
Naresh Bhat (3): v2m_sysreg: Add ACPI probing for SYSREG ACPI: Add vexpress sysreg platform ID arm64: dts: remove the vexpress-sysreg binding
arch/arm64/boot/dts/foundation-v8-acpi.dts | 6 +++--- drivers/acpi/acpi_platform.c | 3 ++- drivers/mfd/vexpress-sysreg.c | 9 +++++++++ 3 files changed, 14 insertions(+), 4 deletions(-)
Pushed this series thanks.
Graeme
On Wed, Oct 23, 2013 at 04:53:30PM +0530, naresh.bhat@linaro.org wrote:
From: Naresh Bhat naresh.bhat@linaro.org
Add vexpress sysreg probe support, platform ID and remove dts binding. Logs on the v8 model are as below
root@genericarmv8:/sys# find . -name LINA0009* ./bus/acpi/devices/LINA0009:00 ./bus/platform/devices/LINA0009:00 ./bus/platform/drivers/vexpress-sysreg/LINA0009:00 ./devices/platform/LINA0009:00 ./devices/LNXSYSTM:00/device:00/ACPI0004:01/ACPI0004:02/LINA0009:00 root@genericarmv8:/sys#
Naresh Bhat (3): v2m_sysreg: Add ACPI probing for SYSREG ACPI: Add vexpress sysreg platform ID arm64: dts: remove the vexpress-sysreg binding
arch/arm64/boot/dts/foundation-v8-acpi.dts | 6 +++--- drivers/acpi/acpi_platform.c | 3 ++- drivers/mfd/vexpress-sysreg.c | 9 +++++++++ 3 files changed, 14 insertions(+), 4 deletions(-)
-- 1.7.9.5
Linaro-acpi mailing list Linaro-acpi@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-acpi