diff --git a/nand.c b/nand.c index 925d515..bd5cfcd 100644 --- a/nand.c +++ b/nand.c @@ -48,10 +48,6 @@ type *name = (type*)(((u32)(_al__##name)) + ((alignment) - (( \ #define NAND_FLAGS_RD 0x2000 #define NAND_FLAGS_ECC 0x1000 -#define PAGE_SIZE 2048 -#define PAGE_SPARE_SIZE 64 -#define ECC_BUFFER_SIZE (PAGE_SPARE_SIZE+16) -#define NAND_MAX_PAGE 0x40000 ipc_request current_request; diff --git a/nand.h b/nand.h index 171443e..6f009a8 100644 --- a/nand.h +++ b/nand.h @@ -4,6 +4,13 @@ #include "types.h" #include "ipc.h" +#define PAGE_SIZE 2048 +#define PAGE_SPARE_SIZE 64 +#define ECC_BUFFER_SIZE (PAGE_SPARE_SIZE+16) +#define ECC_BUFFER_ALLOC (PAGE_SPARE_SIZE+32) +#define BLOCK_SIZE 64 +#define NAND_MAX_PAGE 0x40000 + void nand_irq(void); void nand_send_command(u32 command, u32 bitmask, u32 flags, u32 num_bytes);