return 0;
}
+/* reads parameter page */
+int nand_read_param_page(unsigned char *data, unsigned int size)
+{
+ unsigned int i;
+
+ NAND_ENABLE_CE();
+
+ if (NanD_Command(NAND_CMD_RESET)) {
+ NAND_DISABLE_CE();
+ return 1;
+ }
+
+ if (NanD_Command(NAND_CMD_READPARAM)) {
+ NAND_DISABLE_CE();
+ return 1;
+ }
+
+ NanD_Address(ADDR_COLUMN, 0);
+ delay(10000);
+
+ for (i = 0; i < size; i++) {
+ data[i] = READ_NAND(NAND_ADDR);
+ delay(10);
+ }
+
+ NAND_DISABLE_CE();
+ return 0;
+}
+
/* read chip mfr and id
* return 0 if they match board config
* return 1 if not