[PATCH 2/2] mtd: rawnand: atmel: Remove timing from atmel_pmecc struct
Alexander Dahl
ada at thorsis.com
Thu Nov 6 17:27:40 CET 2025
Hello,
this is a nice coincident, I'm currently working on sam9x60 u-boot
support anyways. ^^
Am Thu, Nov 06, 2025 at 12:12:02PM +0100 schrieb Zixun LI:
> "timing" is unused in atmel_pmecc struct, also it's not exist in Linux
> driver, let's remove it.
>
> Signed-off-by: Zixun LI <admin at hifiphile.com>
> ---
> drivers/mtd/nand/raw/atmel/pmecc.c | 2 --
> drivers/mtd/nand/raw/atmel/pmecc.h | 1 -
> 2 files changed, 3 deletions(-)
>
> diff --git a/drivers/mtd/nand/raw/atmel/pmecc.c b/drivers/mtd/nand/raw/atmel/pmecc.c
> index 7c4e9bd5f9967b119239adf2b39e683ea62b71fd..8fc5614cc0091d3e0f4b9280beee9e684fe2a57d 100644
> --- a/drivers/mtd/nand/raw/atmel/pmecc.c
> +++ b/drivers/mtd/nand/raw/atmel/pmecc.c
> @@ -839,8 +839,6 @@ atmel_pmecc_create(struct udevice *dev,
> ofnode_read_resource(dev->node_, 1, &res);
> pmecc->regs.errloc = (void *)res.start;
>
> - pmecc->regs.timing = 0;
> -
> /* pmecc data setup time */
> if (caps->clk_ctrl)
> writel(PMECC_CLK_133MHZ, pmecc->regs.base + ATMEL_PMECC_CLK);
> diff --git a/drivers/mtd/nand/raw/atmel/pmecc.h b/drivers/mtd/nand/raw/atmel/pmecc.h
> index 43f96b2f168c7b88e0c907996f2ae64f8554ed58..88b0d18040e7c48f226c74ce9b5caf93b5760360 100644
> --- a/drivers/mtd/nand/raw/atmel/pmecc.h
> +++ b/drivers/mtd/nand/raw/atmel/pmecc.h
> @@ -65,7 +65,6 @@ struct atmel_pmecc {
> struct {
> void __iomem *base;
> void __iomem *errloc;
> - void __iomem *timing;
Acked-by: Alexander Dahl <ada at thorsis.com>
Tested both patches on a sam9x60-curiosity rev 4 board.
Note: the NAND flash is terribly slow without the following additional
patch, I reported this before, someone at Microchip confirmed and
wanted to investigate, never got an answer, you might find the
discussion in the mailing list archive:
diff --git a/arch/arm/dts/at91-sam9x60_curiosity-u-boot.dtsi b/arch/arm/dts/at91-sam9x60_curiosity-u-boot.dtsi
index 9144387861e..3dd2309be10 100644
--- a/arch/arm/dts/at91-sam9x60_curiosity-u-boot.dtsi
+++ b/arch/arm/dts/at91-sam9x60_curiosity-u-boot.dtsi
@@ -56,6 +56,12 @@
bootph-all;
};
+&nand_controller {
+ nand at 3 {
+ /delete-property/ rb-gpios;
+ };
+};
+
&pinctrl {
bootph-all;
};
Want to give your patches another try on a sam9x60 custom board with a
different NAND flash. I'm confident it will work, already does on
Linux. Will report tomorrow.
Greets
Alex
> } regs;
>
> /* Mutex used for pmecc enable/disable */
>
> --
> 2.51.0
>
More information about the U-Boot
mailing list