aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/maps/lantiq-flash.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mtd/maps/lantiq-flash.c b/drivers/mtd/maps/lantiq-flash.c
index aefa11121674..c03456f17004 100644
--- a/drivers/mtd/maps/lantiq-flash.c
+++ b/drivers/mtd/maps/lantiq-flash.c
@@ -19,6 +19,7 @@
19#include <linux/mtd/cfi.h> 19#include <linux/mtd/cfi.h>
20#include <linux/platform_device.h> 20#include <linux/platform_device.h>
21#include <linux/mtd/physmap.h> 21#include <linux/mtd/physmap.h>
22#include <linux/of.h>
22 23
23#include <lantiq_soc.h> 24#include <lantiq_soc.h>
24 25
@@ -116,6 +117,12 @@ ltq_mtd_probe(struct platform_device *pdev)
116 struct cfi_private *cfi; 117 struct cfi_private *cfi;
117 int err; 118 int err;
118 119
120 if (of_machine_is_compatible("lantiq,falcon") &&
121 (ltq_boot_select() != BS_FLASH)) {
122 dev_err(&pdev->dev, "invalid bootstrap options\n");
123 return -ENODEV;
124 }
125
119 ltq_mtd = kzalloc(sizeof(struct ltq_mtd), GFP_KERNEL); 126 ltq_mtd = kzalloc(sizeof(struct ltq_mtd), GFP_KERNEL);
120 platform_set_drvdata(pdev, ltq_mtd); 127 platform_set_drvdata(pdev, ltq_mtd);
121 128