@@ -198,30 +198,28 @@ struct pxa3xx_nand {
uint32_t command;
uint16_t data_size; /* data size in FIFO */
uint16_t oob_size;
- uint32_t bad_count;
unsigned char *dma_buff;
unsigned char *data_buff;
unsigned char *oob_buff;
+ uint8_t chip_select;
+ uint8_t total_cmds;
uint32_t buf_start;
uint32_t buf_count;
+
+ uint32_t state;
+ uint32_t bad_count;
uint16_t data_column;
uint16_t oob_column;
-
- /* relate to the command */
- uint8_t chip_select;
- uint8_t ecc_strength;
- unsigned int state;
int use_dma; /* use DMA ? */
int retcode;
+ uint8_t ecc_strength;
/* cached register value */
uint8_t cmd_seqs;
- uint8_t total_cmds;
uint8_t wait_ready[CMD_POOL_SIZE];
uint32_t ndcb0[CMD_POOL_SIZE];
- uint32_t ndcb1;
+ uint32_t ndcb1[CMD_POOL_SIZE];
uint32_t ndcb2;
- uint32_t ndcb3[CMD_POOL_SIZE];
};
static int use_dma = 1;
@@ -350,8 +348,8 @@ static void pxa3xx_set_datasize(struct
pxa3xx_nand_info *info)
struct pxa3xx_nand *nand = info->nand_data;
int oob_enable = info->reg_ndcr & NDCR_SPARE_EN;
- if (info->page_size >= PAGE_CHUNK_SIZE) {
- nand->data_size = PAGE_CHUNK_SIZE;
+ if (info->page_size < PAGE_CHUNK_SIZE) {
+ nand->data_size = 512;
if (!oob_enable) {
nand->oob_size = 0;