[HTC Wildfire S] Antagonist42:
Going snowblind looking at that many msm.nand files :laugh:

I think it could be one of a couple of things...

one from here http://androidhtc.git.sourceforge.net got this to do with renaming NAND_CFG etc to MSM_NAND_CFG as there was clashes with linux/mtd/nand.h

diff --git a/drivers/mtd/devices/msm_nand.c b/drivers/mtd/devices/msm_nand.c
index 86d9f68..3b211a7 100644
--- a/drivers/mtd/devices/msm_nand.c
+++ b/drivers/mtd/devices/msm_nand.c
@@ -37,8 +37,8 @@

#define SUPPORT_WRONG_ECC_CONFIG 1

-#define NAND_CFG0_RAW 0xA80420C0
-#define NAND_CFG1_RAW 0x5045D
+#define MSM_NAND_CFG0_RAW 0xA80420C0
+#define MSM_NAND_CFG1_RAW 0x5045D

#define VERBOSE 0

and this from here http://code.google.com/p/moboot for the HP Touchpad

#define SRC_CRCI_NAND_CMD CMD_SRC_CRCI(DMOV_NAND_CRCI_CMD)
#define DST_CRCI_NAND_CMD CMD_DST_CRCI(DMOV_NAND_CRCI_CMD)
#define SRC_CRCI_NAND_DATA CMD_SRC_CRCI(DMOV_NAND_CRCI_DATA)
#define DST_CRCI_NAND_DATA CMD_DST_CRCI(DMOV_NAND_CRCI_DATA)

#define NAND_CFG0_RAW 0xA80420C0
#define NAND_CFG1_RAW 0x5045D

static unsigned CFG0, CFG1;
static unsigned CFG0_M, CFG1_M;
static unsigned CFG0_A, CFG1_A;

#define CFG1_WIDE_FLASH (1U << 1)

#define paddr(n) ((unsigned) (n))

a third from https://www.codeaurora.org which gave the most info for what the CFG address' is for

+ unsigned long msm_nand_phys;
+
+ #define MSM_NAND_DMA_BUFFER_SIZE SZ_4K
+ #define MSM_NAND_DMA_BUFFER_SLOTS \
+	(MSM_NAND_DMA_BUFFER_SIZE / (sizeof(((atomic_t *)0)->counter) * 8))
+
+ #define NAND_CFG0_RAW 0xA80420C0
+ #define NAND_CFG1_RAW 0x5045D
+
+ #define NAND_CFG0_RAW_ONFI_IDENTIFIER 0x88000800
+ #define NAND_CFG0_RAW_ONFI_PARAM_INFO 0x88040000
+ #define NAND_CFG1_RAW_ONFI_IDENTIFIER 0x0005045d
+ #define NAND_CFG1_RAW_ONFI_PARAM_INFO 0x0005045d
+
+ #define ONFI_IDENTIFIER_LENGTH 0x0004
+ #define ONFI_PARAM_INFO_LENGTH 0x0200
+ #define ONFI_PARAM_PAGE_LENGTH 0x0100
+
+ #define ONFI_PARAMETER_PAGE_SIGNATURE 0x49464E4F
+
+ #define FLASH_READ_ONFI_IDENTIFIER_COMMAND 0x90
+ #define FLASH_READ_ONFI_IDENTIFIER_ADDRESS 0x20
+ #define FLASH_READ_ONFI_PARAMETERS_COMMAND 0xEC
+ #define FLASH_READ_ONFI_PARAMETERS_ADDRESS 0x00
+
+ #define VERBOSE 0
+
+ struct msm_nand_chip {
+	struct device *dev;
+	wait_queue_head_t wait_queue;
+	atomic_t dma_buffer_busy;
+	unsigned dma_channel;
+	uint8_t *dma_buffer;
+	dma_addr_t dma_addr;
+	unsigned CFG0, CFG1;
+	uint32_t ecc_buf_cfg;
+ };
+
+ #define CFG1_WIDE_FLASH (1U << 1)

and finally a fourth to look at http://androidhtc.git.sourceforge.net with a last difference

diff --git a/arch/arm/mach-msm/io.c b/arch/arm/mach-msm/io.c
index 5cf4743..8c4643c 100644
--- a/arch/arm/mach-msm/io.c
+++ b/arch/arm/mach-msm/io.c
@@ -70,6 +70,7 @@ static struct map_desc msm_io_desc[] __initdata = {
MSM_DEVICE(SDC1),
MSM_DEVICE(SDC2),
MSM_DEVICE(EBI2CR),
+	MSM_DEVICE(NAND),
};
int msm_io_initialised=0;
void __init msm_map_common_io(void)
diff --git a/drivers/mtd/devices/msm_nand.c b/drivers/mtd/devices/msm_nand.c
index 18cb5a8..d1eb459 100644
--- a/drivers/mtd/devices/msm_nand.c
+++ b/drivers/mtd/devices/msm_nand.c
@@ -48,6 +48,11 @@
#define NAND_CFG0_RAW 0xA80420C0
#define NAND_CFG1_RAW 0x5045D

+// addr_cyc=5, spare=5, parity=10, user data=512, codewords=3
+//#define NAND_CFG0_RAW 0xaad400c0
+// bsy gap=2, bad block=1d1, cs active busy=0, recvy cycles=7
+//#define NAND_CFG1_RAW 0x4745c
+
#define VERBOSE 0

My guess is that the RAW 0xA80420C0 and RAW 0x5045D may be to verify that a eMMC/EEPROM/NAND/OneNAND device is present and which type it is, especially with the ONFI info in the third finding and that the same info is present in the HP Touchpad info which has a Snapdragon dual-core APQ8060 CPU and Built in 16-32-64GB memory .... we're on 4Gb