SAMA5 NAND: Basic NAND access now work (software ECC and no DMA)

This commit is contained in:
Gregory Nutt 2013-12-01 18:21:41 -06:00
parent 778a5f2b27
commit 4418c9664d
2 changed files with 982 additions and 1050 deletions

File diff suppressed because it is too large Load Diff

View File

@ -57,8 +57,10 @@
#include "up_arch.h"
#include "sam_periphclks.h"
#include "sam_pio.h"
#include "sam_nand.h"
#include "chip/sam_hsmc.h"
#include "chip/sam_pinmap.h"
#include "sama5d3x-ek.h"
@ -138,6 +140,22 @@ int board_nandflash_config(int cs)
HSMC_MODE_BIT_8 | HSMC_MODE_TDFCYCLES(1);
putreg32(regval, SAM_HSMC_MODE(HSMC_CS3));
/* Configure NAND PIO pins
*
* NAND Interface:
*
* NCS3/NANDCE - Dedicated pin; no configuration needed
* NANDCLE - PE21
* NANDALE - PE22
* NRD/NANDOE - Dedicated pin; no configuration needed
* NWE/NANDWE - Dedicated pin; no configuration needed
* NANDRDY - Dedicated pin; no configuration needed
* M_EBI_D0-7 - Dedicated pins; no configuration needed
*/
sam_configpio(PIO_HSMC_NANDALE);
sam_configpio(PIO_HSMC_NANDCLE);
return OK;
}