21 #include <linux/types.h>
22 #include <linux/kernel.h>
24 #include <linux/device.h>
25 #include <linux/module.h>
47 platform_set_drvdata(pdev, priv);
51 dev_err(&pdev->
dev,
"failed to get memory resource\n");
55 priv->
map.bankwidth = 4;
57 priv->
map.size = resource_size(res);
60 if (!priv->
map.virt) {
61 dev_err(&pdev->
dev,
"failed to remap mem resource\n");
77 tmp.
x[0] = ~save0.
x[0];
81 if (!map_word_equal(&priv->
map, tmp, save0)) {
94 priv->
mtd->erasesize = 16;
95 priv->
mtd->dev.parent = &pdev->
dev;
98 "NV-RAM device size %ldKiB registered on AUTCPU12\n",
104 dev_err(&pdev->
dev,
"NV-RAM device addition failed\n");
120 .name =
"autcpu12_nvram",
123 .probe = autcpu12_nvram_probe,