From a43278a43d522fba7fea0ed3045b718a9c8d22ac Mon Sep 17 00:00:00 2001 From: wdenk Date: Thu, 11 Sep 2003 19:48:06 +0000 Subject: * Patch by Gary Jennejohn, 11 Sep 2003: - allow for longer timeouts for USB mass storage devices * Patch by Denis Peter, 11 Sep 2003: - fix USB data pointer assignment for bulk only transfer. - prevent to display erased directories in FAT filesystem. * Change output format for NAND flash - make it look like for other memory, too --- common/cmd_nand.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'common/cmd_nand.c') diff --git a/common/cmd_nand.c b/common/cmd_nand.c index 60cdd8eb49..0e49e9f08d 100644 --- a/common/cmd_nand.c +++ b/common/cmd_nand.c @@ -38,7 +38,7 @@ struct nand_oob_config { int eccvalid_pos; /* position of ECC valid flag inside oob -1 = inactive */ } oob_config = { {0}, 0, 0}; -#define NAND_DEBUG +#undef NAND_DEBUG #undef PSYCHO_DEBUG /* ****************** WARNING ********************* @@ -734,7 +734,9 @@ static void NanD_ScanChips(struct nand_chip *nand) /* If there are none at all that we recognise, bail */ if (!nand->numchips) { +#ifdef NAND_DEBUG puts ("No NAND flash chips recognised.\n"); +#endif return; } @@ -1408,7 +1410,7 @@ static inline int nandcheck(unsigned long potential, unsigned long physadr) return 0; } -void nand_probe(unsigned long physadr) +unsigned long nand_probe(unsigned long physadr) { struct nand_chip *nand = NULL; int i = 0, ChipID = 1; @@ -1434,10 +1436,12 @@ void nand_probe(unsigned long physadr) for (i=0; iChipID = NAND_ChipID_UNKNOWN; - return; + return (0); } nand->ChipID = ChipID; @@ -1459,8 +1463,10 @@ void nand_probe(unsigned long physadr) nand->data_buf = malloc (nand->oobblock + nand->oobsize); if (!nand->data_buf) { puts ("Cannot allocate memory for data structures.\n"); - return; + return (0); } + + return (nand->totlen); } #ifdef CONFIG_MTD_NAND_ECC -- cgit