From 9ab5d311cba93ce9fe1409b9dbb6ed2da24830c9 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Thu, 23 Jun 2022 16:37:02 +0100 Subject: x1000: move NAND commands to chip data Using predefined commands is too inflexible so allow the chip data to specify I/O commands directly. Change-Id: Ie8f943914da4b8299678a59b1063c4c6d226e83e --- firmware/target/mips/ingenic_x1000/nand-x1000.h | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'firmware/target/mips/ingenic_x1000/nand-x1000.h') diff --git a/firmware/target/mips/ingenic_x1000/nand-x1000.h b/firmware/target/mips/ingenic_x1000/nand-x1000.h index bc80ecce07..b2bf4da358 100644 --- a/firmware/target/mips/ingenic_x1000/nand-x1000.h +++ b/firmware/target/mips/ingenic_x1000/nand-x1000.h @@ -106,10 +106,6 @@ struct nand_chip { uint8_t dev_id; uint8_t dev_id2; - /* Row/column address width */ - uint8_t row_cycles; - uint8_t col_cycles; - /* Base2 logarithm of the number of pages per block */ unsigned log2_ppb; @@ -132,6 +128,13 @@ struct nand_chip { /* Chip specific flags */ uint32_t flags; + /* SFC commands for issuing I/O ops */ + uint32_t cmd_page_read; + uint32_t cmd_program_execute; + uint32_t cmd_block_erase; + uint32_t cmd_read_cache; + uint32_t cmd_program_load; + /* Chip-specific setup routine */ void(*setup_chip)(struct nand_drv* drv); }; @@ -170,13 +173,6 @@ struct nand_drv { uint8_t mf_id; uint8_t dev_id; uint8_t dev_id2; - - /* SFC commands used for I/O, these are set based on chip data */ - uint32_t cmd_page_read; - uint32_t cmd_read_cache; - uint32_t cmd_program_load; - uint32_t cmd_program_execute; - uint32_t cmd_block_erase; }; extern const struct nand_chip supported_nand_chips[]; -- cgit v1.2.3