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>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48986
3c298f89-4303-0410-b956-
a3cf2f4a3e73
* 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.
* 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 <linux/mtd/nand.h>
#include <linux/of_gpio.h>
#include <linux/of_platform.h>
#include <linux/clk.h>
#include <linux/reset.h>
/* nand commands */
#define NAND_CMD_ALE BIT(18)
/* nand commands */
#define NAND_CMD_ALE BIT(18)
}
subsys_initcall(oxnas_register_nand);
}
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");