aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2016-03-10 19:11:28 +0000
committerJohn Crispin <john@openwrt.org>2016-03-10 19:11:28 +0000
commit61f27ca3e4e1509ccb5abb01e9892ab90b8bc0cf (patch)
tree2e4d171196250d213ef371ba3c72def3e2c0ef71 /target
parentf78f271c1e2845ce60ac8236505e6baff2b31620 (diff)
downloadupstream-61f27ca3e4e1509ccb5abb01e9892ab90b8bc0cf.tar.gz
upstream-61f27ca3e4e1509ccb5abb01e9892ab90b8bc0cf.tar.bz2
upstream-61f27ca3e4e1509ccb5abb01e9892ab90b8bc0cf.zip
oxnas: clean-up NAND driver to fix probing issue
A re-write of the driver based on xway_nand.c and constants as well as the cmd_ctrl() function from the original oxnas_nand.c resulted in a extremely similar looking file (see diffsize), and fixes the issue of NAND not being detected on newer kernels. Signed-off-by: Daniel Golle <daniel@makrotopia.org> SVN-Revision: 48986
Diffstat (limited to 'target')
-rw-r--r--target/linux/oxnas/files/drivers/mtd/nand/oxnas_nand.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/target/linux/oxnas/files/drivers/mtd/nand/oxnas_nand.c b/target/linux/oxnas/files/drivers/mtd/nand/oxnas_nand.c
index 55eb009bac..9536e5179c 100644
--- a/target/linux/oxnas/files/drivers/mtd/nand/oxnas_nand.c
+++ b/target/linux/oxnas/files/drivers/mtd/nand/oxnas_nand.c
@@ -2,15 +2,18 @@
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation.
+ *
+ * based on xway_nand.c
+ * Copyright © 2012 John Crispin <blogic@openwrt.org>
+ * and oxnas_nand.c "NAND glue for Oxnas platforms"
+ * written by Ma Haijun <mahaijuns@gmail.com>
*/
-#include <linux/module.h>
#include <linux/mtd/nand.h>
#include <linux/of_gpio.h>
#include <linux/of_platform.h>
#include <linux/clk.h>
#include <linux/reset.h>
-#include <mach/utils.h>
/* nand commands */
#define NAND_CMD_ALE BIT(18)
@@ -89,14 +92,3 @@ static int __init oxnas_register_nand(void)
}
subsys_initcall(oxnas_register_nand);
-
-static const struct of_device_id oxnas_nand_ids[] = {
- { .compatible = "plxtech,nand-nas782x"},
- { /* sentinel */ }
-};
-MODULE_DEVICE_TABLE(of, oxnas_nand_ids);
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Ma Haijun");
-MODULE_DESCRIPTION("NAND glue for Oxnas platforms");
-MODULE_ALIAS("platform:oxnas_nand");