Skip to contentSkip to conversation

nand/denali: Adding Denali NAND driver support

PATCH Superseded Chin Liang See 2 participants 3 messages Feb 27, 2014 – Mar 5, 2014

Subsystems (2)

v3 of 10 Superseded Latest is v10 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 nand/denali: Adding Denali NAND driver support

To add the Denali NAND driver support into U-Boot. It required information such as register base address from configuration header file within include/configs folder.

Cc Artem Bityutskiy <[email protected]>
Cc David Woodhouse <[email protected]>
Cc Brian Norris <[email protected]>
Cc Scott Wood <[email protected]>

---
Changes for v3
- Fixed coding style
Changes for v2
- Enable this driver support for SOCFPGA

---
 drivers/mtd/nand/Makefile      |    1 +
 drivers/mtd/nand/denali_nand.c | 1201 ++++++++++++++++++++++++++++++++++++++++
 drivers/mtd/nand/denali_nand.h |  501 +++++++++++++++++
 3 files changed, 1703 insertions(+)
 create mode 100644 drivers/mtd/nand/denali_nand.c
 create mode 100644 drivers/mtd/nand/denali_nand.h
drivers/mtd/nand/Makefile +1 -0
index 02b149c..24e8218 100644
@@ -39,6 +39,7 @@ obj-$(CONFIG_NAND_ECC_BCH) += nand_bch.o
 obj-$(CONFIG_NAND_ATMEL) += atmel_nand.o
 obj-$(CONFIG_DRIVER_NAND_BFIN) += bfin_nand.o
 obj-$(CONFIG_NAND_DAVINCI) += davinci_nand.o
+obj-$(CONFIG_NAND_DENALI) += denali_nand.o
 obj-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_nand.o
 obj-$(CONFIG_NAND_FSL_IFC) += fsl_ifc_nand.o
 obj-$(CONFIG_NAND_FSL_UPM) += fsl_upm.o
drivers/mtd/nand/denali_nand.c new file +1201 -0

1,201 lines not on this page · raw message

drivers/mtd/nand/denali_nand.h new file +501 -0

501 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v3 1/1 nand/denali: Adding Denali NAND driver support

Quoted 10 lines · Chin Liang See

To add the Denali NAND driver support into U-Boot. It required information such as register base address from configuration header file within include/configs folder.

Cc Artem Bityutskiy <[email protected]>
Cc David Woodhouse <[email protected]>
Cc Brian Norris <[email protected]>
Cc Scott Wood <[email protected]>
Quoted 5 lines

---
Changes for v3
- Fixed coding style
Changes for v2
- Enable this driver support for SOCFPGA

Sorry, didn't see this when I replied to v2. Some of those comments still apply, though.

drivers/mtd/nand/denali_nand.c line 54

Quoted 5 lines
drivers/mtd/nand/denali_nand.c new file +5 -0
+/*
+ * This macro divides two integers and rounds fractional values up
+ * to the nearest integer value.
+ */
+#define CEIL_DIV(X, Y) (((X)%(Y)) ? ((X)/(Y)+1) : ((X)/(Y)))

How is this different from DIV_ROUND_UP(), other than being more complicated?

-Scott

#2 lore raw

PATCH v3 1/1 nand/denali: Adding Denali NAND driver support

Quoted 11 lines · Scott Wood
Quoted 10 lines · Chin Liang See

To add the Denali NAND driver support into U-Boot. It required information such as register base address from configuration header file within include/configs folder.

Cc Artem Bityutskiy <[email protected]>
Cc David Woodhouse <[email protected]>
Cc Brian Norris <[email protected]>
Cc Scott Wood <[email protected]>
Quoted 8 lines
Quoted 5 lines

---
Changes for v3
- Fixed coding style
Changes for v2
- Enable this driver support for SOCFPGA

Sorry, didn't see this when I replied to v2. Some of those comments still apply, though.

Yup, fixed

Quoted 9 lines

drivers/mtd/nand/denali_nand.c line 54

Quoted 6 lines
drivers/mtd/nand/denali_nand.c new file +5 -0
+/*
+ * This macro divides two integers and rounds fractional values up
+ * to the nearest integer value.
+ */
+#define CEIL_DIV(X, Y) (((X)%(Y)) ? ((X)/(Y)+1) : ((X)/(Y)))

How is this different from DIV_ROUND_UP(), other than being more complicated?

All change to use DIV_ROUND_UP as no need to duplicate

Thanks

Chin Liang

Quoted 3 lines

-Scott