ACPI 6.0 specified MADT generic distributor version values, but
the detail definition is missing, add its support in this patch.
Signed-off-by: Hanjun Guo <hanjun.guo(a)linaro.org>
---
Hi Bob, Lv,
As discussed with Lv on linux-acpi maillist, I prepared this
patch for review.
Please treat this patch as a fix for next ACPICA version and
linux kernel 4.2 material, because we still can not
use the newest ACPICA for linux when this enum is missing,
any comments are welcomed.
Thanks
Hanjun
source/include/actbl1.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/source/include/actbl1.h b/source/include/actbl1.h
index 1c508a0..0235543 100644
--- a/source/include/actbl1.h
+++ b/source/include/actbl1.h
@@ -1050,6 +1050,18 @@ typedef struct acpi_madt_generic_distributor
} ACPI_MADT_GENERIC_DISTRIBUTOR;
+/* Values for Version in Generic Distributor (ACPI 6.0) */
+
+enum AcpiMadtGicVersionType
+{
+ ACPI_MADT_GIC_VER_UNKNOWN = 0,
+ ACPI_MADT_GIC_VER_V1 = 1,
+ ACPI_MADT_GIC_VER_V2 = 2,
+ ACPI_MADT_GIC_VER_V3 = 3,
+ ACPI_MADT_GIC_VER_V4 = 4,
+ ACPI_MADT_GIC_VER_RESERVED = 5 /* 5 and greater are reserved */
+};
+
/* 13: Generic MSI Frame (ACPI 5.1) */
--
1.9.1
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Export "arch_timer_get_rate" in arm_arch_timer.c for the
other drivers, like SBSA watchdog driver
(2)Introduce Documentation/devicetree/bindings/watchdog/sbsa-gwdt.txt
for FDT info of SBSA Generic Watchdog, and give two examples of
adding SBSA Generic Watchdog device node into the dts files:
foundation-v8.dts and amd-seattle-soc.dtsi.
(3)Introduce "pretimeout" into the watchdog framework, and update
Documentation/watchdog/watchdog-kernel-api.txt to introduce:
(1)the new elements in the watchdog_device and watchdog_ops struct;
(2)the new API "watchdog_init_timeouts".
(4)Introduce ARM SBSA watchdog driver:
a.Use linux kernel watchdog framework;
b.Work with FDT on ARM64;
c.Use "pretimeout" in watchdog framework;
d.In first timeout(WS0), do panic to save system context;
e.Support geting timeout and pretimeout from parameter and FDT
at the driver init stage.
(5)Parse SBSA Generic Watchdog Structure in GTDT table of ACPI,
and create a platform device with that information.
This platform device can be used by This Watchdog driver.
This patchset has been tested with watchdog daemon
(ACPI/FDT, module/build-in) on the following platforms:
(1)ARM Foundation v8 model
(2)AMD Seattle B0
Changelog:
v2: Improve watchdog-kernel-api.txt documentation for pretimeout support.
Export "arch_timer_get_rate" in arm_arch_timer.c.
Add watchdog_init_timeouts API for pretimeout support in framework.
Improve suspend and resume foundation in driver
Improve timeout/pretimeout values init code in driver.
Delete unnecessary items of the sbsa_gwdt struct and #define.
Delete all unnecessary debug info in driver.
Fix 64bit division bug.
Use the arch_timer interface to get watchdog clock rate.
Add MODULE_DEVICE_TABLE for platform device id.
Fix typoes.
v1: The first version upstream patchset to linux mailing list
Fu Wei (7):
clocksource: export "arch_timer_get_rate" for the other drivers
Documentation: add sbsa-gwdt.txt documentation
ARM64: add SBSA Generic Watchdog device node in foundation-v8.dts
ARM64: add SBSA Generic Watchdog device node in amd-seattle-soc.dtsi
Watchdog: introduce "pretimeout" into framework
Watchdog: introduce ARM SBSA watchdog driver
ACPI: import watchdog info of GTDT into platform device
.../devicetree/bindings/watchdog/sbsa-gwdt.txt | 36 ++
Documentation/watchdog/watchdog-kernel-api.txt | 62 ++-
arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi | 11 +
arch/arm64/boot/dts/arm/foundation-v8.dts | 10 +
arch/arm64/kernel/acpi.c | 136 ++++++
drivers/clocksource/arm_arch_timer.c | 1 +
drivers/watchdog/Kconfig | 12 +
drivers/watchdog/Makefile | 1 +
drivers/watchdog/sbsa_gwdt.c | 476 +++++++++++++++++++++
drivers/watchdog/watchdog_core.c | 103 +++--
drivers/watchdog/watchdog_dev.c | 48 +++
include/linux/watchdog.h | 30 +-
12 files changed, 891 insertions(+), 35 deletions(-)
create mode 100644 Documentation/devicetree/bindings/watchdog/sbsa-gwdt.txt
create mode 100644 drivers/watchdog/sbsa_gwdt.c
--
1.9.1
Hi Hanjun / Mark / Tomasz,
I have tried the following branch on AMD Seattle.
http://git.linaro.org/leg/acpi/acpi.git devel
Last commit: f6b94809b273023f675d3504922457c9ffde7e81
I ran info a couple issues. Here are two patches (1 and 2),
which should resolve the issues. Please see if they make sense.
Also, patch 3 is needed for parsing _CCA information as a follow up of
the CCA patch series here (https://lkml.org/lkml/2015/5/20/1033).
Thanks,
Suravee
Suravee Suthikulpanit (3):
ARM64 / PCI / ACPI: Do not return error when a MMCONFIG entry already
exist
ACPI / PCI: Also look for _PRT in the PCI host bridge device
PCI: Generic function for setting up PCI device DMA coherency
arch/arm64/kernel/pci.c | 9 +++++++--
drivers/acpi/pci_irq.c | 46 +++++++++++++++++++++++++++++++++-------------
drivers/of/of_pci.c | 20 --------------------
drivers/pci/probe.c | 35 +++++++++++++++++++++++++++++++++--
include/linux/of_pci.h | 3 ---
5 files changed, 73 insertions(+), 40 deletions(-)
--
2.1.0
This patch series introduce support for _CCA object, which is currently
used mainly by ARM64 platform to specify DMA coherency attribute for
devices when booting with ACPI.
A copy of ACPIv6 can be found here:
http://www.uefi.org/sites/default/files/resources/ACPI_6.0.pdf
This patch also introduces 2 new APIS:
1. acpi_dma_is_coherent() as part of ACPI API.
2. device_dma_is_coherent() as part of unified device property API.
This simplifies the logic in device drivers to determine device coherency
attribute regardless of booting with DT vs ACPI.
This has been tested on AMD-Seattle platform, which implements _CCA
object as described in the AMD Opteron A1100 Series Processor ACPI Porting Guide:
http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/Seattle_ACPI…
Changes from V3 (https://lkml.org/lkml/2015/5/7/1004):
* Remove ARCH64_SUPPORT_ACPI_CCA_ZERO and just use CONFIG_ARM64.
(per Catalin and Rafael)
* Do not need to call arch_setup_dma_ops() for acpi_device->dev.
(per Rafael)
* [3/6] (New) We also need to call arch_setup_dma_ops() for pci
devices and check the CCA of the host bridge. Similar logic
exists for OF. So, I refactor of_pci_dma_configure() to
the more generic version pci_dma_configure(), and add support
for ACPI.
Changes from V2 (https://lkml.org/lkml/2015/5/5/510):
* Reword ACPI_MUST_HAVE_CCA to ACPI_CCA_REQUIRED (per Rafael)
* Reword ACPI_SUPPORT_CCA_ZERO to ARCH64_SUPPORT_ACPI_CCA_ZERO
(per Rafael and Arnd)
* Misc code styling clean up (per Rafael)
* Only print missing _CCA warning message in debug mode.
* Refactor logic in acpi_setup_device_dma() into
if acpi_dma_is_supported() then call arch_setup_dma_ops().
* Do not allocate device dma_mask if !acpi_dma_is_supported()
(per Arnd).
* Re-use the dummy functions with the same signature.
Changes from V1 (https://lkml.org/lkml/2015/4/29/290):
* Remove supports for 32-bit ARM since doesn't currently
supporting ACPI (Per Catalin suggestions.)
* Do not call arch_setup_dma_ops() and when _CCA is missing.
(per Arnd suggestion)
* Add CONFIG_ACPI_SUPPORT_CCA_ZERO kernel config flag to
allow architectures to specify the behavior when _CCA=0.
* Add dummy_dma_ops for ARM64 (per Catalin suggestions).
* Fixed build error when ACPI is not configured by defining
acpi_dma_is_coherent() for when CONFIG_ACPI is not set.
* Introduce device_dma_is_coherent().
* Use device_dma_is_coherent in crypto/ccp and amd-xgbe driver.
Changes from RFC: (https://lkml.org/lkml/2015/4/1/389)
* New logic for deriving and propagating coherent attribute from
parent devices. (by Mark)
* Introducing acpi_dma_is_coherent() API (Per Tom suggestion)
* Introducing CONFIG_ACPI_MUST_HAVE_CCA kernel configuration.
* Rebased to linux-4.1-rc1
Suravee Suthikulpanit (6):
ACPI / scan: Parse _CCA and setup device coherency
arm64 : Introduce support for ACPI _CCA object
pci: Generic function for setting up PCI device DMA coherency
device property: Introduces device_dma_is_coherent()
crypto: ccp - Unify coherency checking logic with
device_dma_is_coherent()
amd-xgbe: Unify coherency checking logic with device_dma_is_coherent()
arch/arm64/Kconfig | 1 +
arch/arm64/include/asm/dma-mapping.h | 18 +++++-
arch/arm64/mm/dma-mapping.c | 92 +++++++++++++++++++++++++++++++
drivers/acpi/Kconfig | 3 +
drivers/acpi/acpi_platform.c | 10 +++-
drivers/acpi/scan.c | 40 ++++++++++++++
drivers/base/property.c | 12 ++++
drivers/crypto/ccp/ccp-platform.c | 60 +-------------------
drivers/net/ethernet/amd/xgbe/xgbe-main.c | 27 +--------
drivers/of/of_pci.c | 20 -------
drivers/pci/probe.c | 35 +++++++++++-
include/acpi/acpi_bus.h | 32 ++++++++++-
include/linux/acpi.h | 10 ++++
include/linux/of_pci.h | 3 -
include/linux/property.h | 2 +
15 files changed, 249 insertions(+), 116 deletions(-)
--
2.1.0
The leg-kernel release has been made and tagged as leg-20150519.0
This is based on mainline kernel v4.1-rc4
Repository : http://git.linaro.org/leg/acpi/leg-kernel.git
Direct Link:
http://git.linaro.org/leg/acpi/leg-kernel.git/commit/6fad3ac6a73d6ec7f1c664…
Notes :-
1) Contains first draft of exporting RSDP, RSDT, XSDT tables patch for
the no /dev/mem project
2) Contains V4 of the SBSA Watchdog driver patches.
3) Kludge/fix for Redhat OS login issues.
4) Support for booting on qemu virt machine type.
From: Fu Wei <fu.wei(a)linaro.org>
Reasons:
(1)kernel already has two watchdog drivers are using "pretimeout":
drivers/char/ipmi/ipmi_watchdog.c
drivers/watchdog/kempld_wdt.c(but the definition is different)
(2)some other dirvers are going to use this: ARM SBSA Generic Watchdog
Signed-off-by: Fu Wei <fu.wei(a)linaro.org>
---
drivers/watchdog/watchdog_core.c | 66 ++++++++++++++++++++++++++++++++++++++++
drivers/watchdog/watchdog_dev.c | 48 +++++++++++++++++++++++++++++
include/linux/watchdog.h | 19 ++++++++++++
3 files changed, 133 insertions(+)
diff --git a/drivers/watchdog/watchdog_core.c b/drivers/watchdog/watchdog_core.c
index cec9b55..6ca9578 100644
--- a/drivers/watchdog/watchdog_core.c
+++ b/drivers/watchdog/watchdog_core.c
@@ -54,6 +54,14 @@ static void watchdog_check_min_max_timeout(struct watchdog_device *wdd)
wdd->min_timeout = 0;
wdd->max_timeout = 0;
}
+ if (wdd->min_pretimeout && wdd->min_timeout < wdd->min_pretimeout) {
+ pr_info("Invalid min timeout, resetting to min pretimeout!\n");
+ wdd->min_timeout = wdd->min_pretimeout;
+ }
+ if (wdd->max_pretimeout && wdd->max_timeout < wdd->max_pretimeout) {
+ pr_info("Invalid max timeout, resetting to max pretimeout!\n");
+ wdd->max_timeout = wdd->max_pretimeout;
+ }
}
/**
@@ -98,6 +106,63 @@ int watchdog_init_timeout(struct watchdog_device *wdd,
}
EXPORT_SYMBOL_GPL(watchdog_init_timeout);
+static void watchdog_check_min_max_pretimeout(struct watchdog_device *wdd)
+{
+ /*
+ * Check that we have valid min and max pretimeout values, if
+ * not reset them both to 0 (=not used or unknown)
+ */
+ if (wdd->min_pretimeout > wdd->max_pretimeout) {
+ pr_info("Invalid min and max pretimeout, resetting to 0!\n");
+ wdd->min_pretimeout = 0;
+ wdd->max_pretimeout = 0;
+ }
+}
+
+/**
+ * watchdog_init_pretimeout() - initialize the pretimeout field
+ * @pretimeout_parm: pretimeout module parameter
+ * @dev: Device that stores the timeout-sec property
+ *
+ * Initialize the pretimeout field of the watchdog_device struct with either
+ * the pretimeout module parameter (if it is valid value) or the timeout-sec
+ * property (only if it is a valid value and the timeout_parm is out of bounds).
+ * If none of them are valid then we keep the old value (which should normally
+ * be the default pretimeout value.
+ *
+ * A zero is returned on success and -EINVAL for failure.
+ */
+int watchdog_init_pretimeout(struct watchdog_device *wdd,
+ unsigned int pretimeout_parm, struct device *dev)
+{
+ int ret = 0;
+ u32 timeouts[2];
+
+ watchdog_check_min_max_pretimeout(wdd);
+
+ /* try to get the timeout module parameter first */
+ if (!watchdog_pretimeout_invalid(wdd, pretimeout_parm) &&
+ pretimeout_parm) {
+ wdd->pretimeout = pretimeout_parm;
+ return ret;
+ }
+ if (pretimeout_parm)
+ ret = -EINVAL;
+
+ /* try to get the timeout_sec property */
+ if (!dev || !dev->of_node)
+ return ret;
+ ret = of_property_read_u32_array(dev->of_node,
+ "timeout-sec", timeouts, 2);
+ if (!watchdog_pretimeout_invalid(wdd, timeouts[1]) && timeouts[1])
+ wdd->pretimeout = timeouts[1];
+ else
+ ret = -EINVAL;
+
+ return ret;
+}
+EXPORT_SYMBOL_GPL(watchdog_init_pretimeout);
+
/**
* watchdog_register_device() - register a watchdog device
* @wdd: watchdog device
@@ -119,6 +184,7 @@ int watchdog_register_device(struct watchdog_device *wdd)
if (wdd->ops->start == NULL || wdd->ops->stop == NULL)
return -EINVAL;
+ watchdog_check_min_max_pretimeout(wdd);
watchdog_check_min_max_timeout(wdd);
/*
diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c
index 6aaefba..b519257 100644
--- a/drivers/watchdog/watchdog_dev.c
+++ b/drivers/watchdog/watchdog_dev.c
@@ -218,6 +218,38 @@ out_timeout:
}
/*
+ * watchdog_set_pretimeout: set the watchdog timer pretimeout
+ * @wddev: the watchdog device to set the timeout for
+ * @pretimeout: pretimeout to set in seconds
+ */
+
+static int watchdog_set_pretimeout(struct watchdog_device *wddev,
+ unsigned int pretimeout)
+{
+ int err;
+
+ if (!wddev->ops->set_pretimeout ||
+ !(wddev->info->options & WDIOF_PRETIMEOUT))
+ return -EOPNOTSUPP;
+
+ if (watchdog_pretimeout_invalid(wddev, pretimeout))
+ return -EINVAL;
+
+ mutex_lock(&wddev->lock);
+
+ if (test_bit(WDOG_UNREGISTERED, &wddev->status)) {
+ err = -ENODEV;
+ goto out_pretimeout;
+ }
+
+ err = wddev->ops->set_pretimeout(wddev, pretimeout);
+
+out_pretimeout:
+ mutex_unlock(&wddev->lock);
+ return err;
+}
+
+/*
* watchdog_get_timeleft: wrapper to get the time left before a reboot
* @wddev: the watchdog device to get the remaining time from
* @timeleft: the time that's left
@@ -388,6 +420,22 @@ static long watchdog_ioctl(struct file *file, unsigned int cmd,
if (wdd->timeout == 0)
return -EOPNOTSUPP;
return put_user(wdd->timeout, p);
+ case WDIOC_SETPRETIMEOUT:
+ if (get_user(val, p))
+ return -EFAULT;
+ err = watchdog_set_pretimeout(wdd, val);
+ if (err < 0)
+ return err;
+ /* If the watchdog is active then we send a keepalive ping
+ * to make sure that the watchdog keep's running (and if
+ * possible that it takes the new timeout) */
+ watchdog_ping(wdd);
+ /* Fall */
+ case WDIOC_GETPRETIMEOUT:
+ /* timeout == 0 means that we don't use the pretimeout */
+ if (wdd->pretimeout == 0)
+ return -EOPNOTSUPP;
+ return put_user(wdd->pretimeout, p);
case WDIOC_GETTIMELEFT:
err = watchdog_get_timeleft(wdd, &val);
if (err)
diff --git a/include/linux/watchdog.h b/include/linux/watchdog.h
index a746bf5..f0a3c5b 100644
--- a/include/linux/watchdog.h
+++ b/include/linux/watchdog.h
@@ -25,6 +25,7 @@ struct watchdog_device;
* @ping: The routine that sends a keepalive ping to the watchdog device.
* @status: The routine that shows the status of the watchdog device.
* @set_timeout:The routine for setting the watchdog devices timeout value.
+ * @set_pretimeout:The routine for setting the watchdog devices pretimeout value
* @get_timeleft:The routine that get's the time that's left before a reset.
* @ref: The ref operation for dyn. allocated watchdog_device structs
* @unref: The unref operation for dyn. allocated watchdog_device structs
@@ -44,6 +45,7 @@ struct watchdog_ops {
int (*ping)(struct watchdog_device *);
unsigned int (*status)(struct watchdog_device *);
int (*set_timeout)(struct watchdog_device *, unsigned int);
+ int (*set_pretimeout)(struct watchdog_device *, unsigned int);
unsigned int (*get_timeleft)(struct watchdog_device *);
void (*ref)(struct watchdog_device *);
void (*unref)(struct watchdog_device *);
@@ -62,6 +64,9 @@ struct watchdog_ops {
* @timeout: The watchdog devices timeout value.
* @min_timeout:The watchdog devices minimum timeout value.
* @max_timeout:The watchdog devices maximum timeout value.
+ * @pretimeout: The watchdog devices pretimeout value.
+ * @min_pretimeout:The watchdog devices minimum pretimeout value.
+ * @max_pretimeout:The watchdog devices maximum pretimeout value.
* @driver-data:Pointer to the drivers private data.
* @lock: Lock for watchdog core internal use only.
* @status: Field that contains the devices internal status bits.
@@ -86,6 +91,9 @@ struct watchdog_device {
unsigned int timeout;
unsigned int min_timeout;
unsigned int max_timeout;
+ unsigned int pretimeout;
+ unsigned int min_pretimeout;
+ unsigned int max_pretimeout;
void *driver_data;
struct mutex lock;
unsigned long status;
@@ -120,6 +128,14 @@ static inline bool watchdog_timeout_invalid(struct watchdog_device *wdd, unsigne
(t < wdd->min_timeout || t > wdd->max_timeout));
}
+/* Use the following function to check if a pretimeout value is invalid */
+static inline bool watchdog_pretimeout_invalid(struct watchdog_device *wdd,
+ unsigned int t)
+{
+ return ((wdd->max_pretimeout != 0) &&
+ (t < wdd->min_pretimeout || t > wdd->max_pretimeout));
+}
+
/* Use the following functions to manipulate watchdog driver specific data */
static inline void watchdog_set_drvdata(struct watchdog_device *wdd, void *data)
{
@@ -134,6 +150,9 @@ static inline void *watchdog_get_drvdata(struct watchdog_device *wdd)
/* drivers/watchdog/watchdog_core.c */
extern int watchdog_init_timeout(struct watchdog_device *wdd,
unsigned int timeout_parm, struct device *dev);
+extern int watchdog_init_pretimeout(struct watchdog_device *wdd,
+ unsigned int pretimeout_parm,
+ struct device *dev);
extern int watchdog_register_device(struct watchdog_device *);
extern void watchdog_unregister_device(struct watchdog_device *);
--
1.9.1
Hi Graeme,
Are you saying :
static struct platform_driver sbsa_gwdt_driver = {
.driver = {
.name = "sbsa-gwdt",
.pm = &sbsa_gwdt_pm_ops,
.of_match_table = sbsa_gwdt_of_match,
},
.probe = sbsa_gwdt_probe,
.remove = sbsa_gwdt_remove,
.shutdown = sbsa_gwdt_shutdown,
};
.name = "sbsa-gwdt", ???
I am not sure if that can do the auto-insmod part, maybe I miss some
knowledge of platform_driver , But AFAIK, the platform mechanism uses
that name to match the driver and device, ONCE the driver or device is
registered into system. that means when the driver is insmod'ed , then
the "name" will take effect.
But MODULE_DEVICE_TABLE creates an alias string in the .ok so depmod
can find device table.
please correct me , If I misunderstand this part .
On 18 May 2015 at 17:11, Hanjun Guo <hanjun.guo(a)linaro.org> wrote:
> On 2015年05月18日 17:05, G Gregory wrote:
>>
>> Shouldn't the standard platform_device matching kick in?
>>
>> It should match the driver to the name!
>
>
> Hmm, I missed this part, I'm not familiar with
> the mechanism, Fuwei, could you please try this
> direction?
>
>
>>
>> Graeme
>>
>> On 18 May 2015 at 10:04, Hanjun Guo <hanjun.guo(a)linaro.org> wrote:
>>>
>>> On 2015年05月18日 16:48, Fu Wei wrote:
>>>>
>>>>
>>>> Hi Suravee,
>>>>
>>>> Hanjun and me have figured out the problem of auto-insmod SBSA
>>>> watchdog module, when boot with ACPI:
>>>>
>>>> For now , we can not insmod SBSA watchdog driver automatically, because
>>>> :
>>>>
>>>> For booting with dtb , in the driver module, we already have :
>>>> ---------------------
>>>> static const struct of_device_id sbsa_gwdt_of_match[] = {
>>>> { .compatible = "arm,sbsa-gwdt", },
>>>> {},
>>>> };
>>>> MODULE_DEVICE_TABLE(of, sbsa_gwdt_of_match);
>>>> ---------------------
>>>>
>>>> For booting with acpi , we should have sometime like :
>>>> ---------------------
>>>> static const struct acpi_device_id sbsa_gwdt_ids[] __used = {
>>>> {ACPI_GTDT_SBSA_GWDT_HID, 0},
>>>> {"", 0}
>>>> };
>>>> MODULE_DEVICE_TABLE(acpi, sbsa_gwdt_ids);
>>>> ---------------------
>>>>
>>>> Unfortunately, for now , in ACPI spec, it seems we don't have
>>>> ACPI_GTDT_SBSA_GWDT_HID, and in Linux kernel, there is not a
>>>> mechanism to register the Wakeup-timer and Watchdog in GTDT with
>>>> ACPI_GTDT_*_HID.
>>>>
>>>> Maybe, ACPI team of LEG can discuss about that and rise a request of
>>>> adding ACPI_GTDT_*_HID to ACPI spec for GTDT table
>>>>
>>>> @Hanjun, Al
>>>> Please correct me if I misunderstand something :-)
>>>> Great thanks!
>>>
>>>
>>>
>>> You are right, more specifically, there is no mechanism to auto
>>> match/register modules for ACPI static tables (MADT/gtdt..), I think
>>> we can post a question on ACPI maillist to see if any good inputs.
>>>
>>> Thanks
>>> Hanjun
--
Best regards,
Fu Wei
Software Engineer
Red Hat Software (Beijing) Co.,Ltd.Shanghai Branch
Ph: +86 21 61221326(direct)
Ph: +86 186 2020 4684 (mobile)
Room 1512, Regus One Corporate Avenue,Level 15,
One Corporate Avenue,222 Hubin Road,Huangpu District,
Shanghai,China 200021
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Introdouces Documentation/devicetree/bindings/watchdog/sbsa-gwdt.txt
for FDT info of SBSA Generic Watchdog, and give two examples of
adding SBSA Generic Watchdog device node into the dts files:
foundation-v8.dts and amd-seattle-soc.dtsi
(2)Introdouce "pretimeout" into the watchdog framework
(3)Introdouces ARM SBSA watchdog driver
a.Use linux kernel watchdog framework
b.Work with FDT on ARM64
c.Use "pretimeout" in watchdog framework
d.In first timeout(WS0), do panic to save system context
e.Support geting timeout and pretimeout from
parameter and FDT at the driver init stage
(4)Parse SBSA Generic Watchdog Structure in GTDT table of ACPI,
and create a platform device with that information
This platform device can be used by This Watchdog driver
This patchset has been tested with watchdog daemon
(ACPI/FDT, module/build-in) on the following platforms:
(1)ARM Foundation v8 model
(2)AMD Seattle B0
Fu Wei (6):
Documentation: add sbsa-gwdt.txt documentation
ARM64: add SBSA Generic Watchdog device node in foundation-v8.dts
ARM64: add SBSA Generic Watchdog device node in amd-seattle-soc.dtsi
Watchdog: introdouce "pretimeout" into framework
Watchdog: introdouce ARM SBSA watchdog driver
ACPI: import watchdog info of GTDT into platform device
.../devicetree/bindings/watchdog/sbsa-gwdt.txt | 36 ++
arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi | 11 +
arch/arm64/boot/dts/arm/foundation-v8.dts | 10 +
arch/arm64/kernel/acpi.c | 136 +++++
drivers/watchdog/Kconfig | 10 +
drivers/watchdog/Makefile | 1 +
drivers/watchdog/sbsa_gwdt.c | 553 +++++++++++++++++++++
drivers/watchdog/watchdog_core.c | 66 +++
drivers/watchdog/watchdog_dev.c | 48 ++
include/linux/watchdog.h | 19 +
10 files changed, 890 insertions(+)
create mode 100644 Documentation/devicetree/bindings/watchdog/sbsa-gwdt.txt
create mode 100644 drivers/watchdog/sbsa_gwdt.c
--
1.9.1