arm64: dts: Revert "specify console via command line"
[linux/fpc-iii.git] / arch / x86 / kernel / pmem.c
blob6b07faaa157980915e42dc71bdc392a7c5a704e0
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * Copyright (c) 2015, Christoph Hellwig.
4 * Copyright (c) 2015, Intel Corporation.
5 */
6 #include <linux/platform_device.h>
7 #include <linux/init.h>
8 #include <linux/ioport.h>
10 static int found(struct resource *res, void *data)
12 return 1;
15 static __init int register_e820_pmem(void)
17 struct platform_device *pdev;
18 int rc;
20 rc = walk_iomem_res_desc(IORES_DESC_PERSISTENT_MEMORY_LEGACY,
21 IORESOURCE_MEM, 0, -1, NULL, found);
22 if (rc <= 0)
23 return 0;
26 * See drivers/nvdimm/e820.c for the implementation, this is
27 * simply here to trigger the module to load on demand.
29 pdev = platform_device_alloc("e820_pmem", -1);
30 return platform_device_add(pdev);
32 device_initcall(register_e820_pmem);