Message ID | 1439668968-3882-11-git-send-email-hdegoede@redhat.com |
---|---|
State | Accepted |
Delegated to: | Hans de Goede |
Headers | show |
On Sat, 2015-08-15 at 22:02 +0200, Hans de Goede wrote: > We currently only use the spl nand code to get u-boot itself, which > _always_ is located on a syndrome partition. Once we figure out how > we are going to store the u-boot env on nand, we may need non syndrome > support, but even then there will likely be better ways to determine > whether to use syndrome or not (e.g. look at the loadaddr passed in). > > Signed-off-by: Hans de Goede <hdegoede@redhat.com> I suppose I should back reference my question as to whether we should remove this option (even though it seems to have ended up the other way round to what I was anticipating). Anyway, I'm fine with this anyway: Acked-by: Ian Campbell < ijc@hellion.org.uk >
Hi, On 17-08-15 10:27, Ian Campbell wrote: > On Sat, 2015-08-15 at 22:02 +0200, Hans de Goede wrote: >> We currently only use the spl nand code to get u-boot itself, which >> _always_ is located on a syndrome partition. Once we figure out how >> we are going to store the u-boot env on nand, we may need non syndrome >> support, but even then there will likely be better ways to determine >> whether to use syndrome or not (e.g. look at the loadaddr passed in). >> >> Signed-off-by: Hans de Goede <hdegoede@redhat.com> > > I suppose I should back reference my question as to whether we should > remove this option (even though it seems to have ended up the other way > round to what I was anticipating). Actually I've been discussing nand partitioning with Boris Brezillon and it looks like that we need may need to use a non syndrome partition for u-boot on some nands, because the ecc options supported by the BROM are too weak for this nand, so we will only use a BROM compatible ecc setting for the spl and use a separate nand partition for u-boot. We're still figuring this out, but I think I'll drop this patch for now, as we may need this after all. Regards, Hans
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index 18039f7..8a3fae5 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig @@ -95,14 +95,6 @@ config SPL_NAND_SUNXI Depending on the NAND chip, values like ECC strength and page sizes have to be configured. -config NAND_SUNXI_SPL_SYNDROME_PARTITIONS_END - hex "Size of syndrome partitions in sunxi NAND" - default 0x400000 - depends on SPL_NAND_SUNXI - ---help--- - End address for boot partitions on NAND. Those partitions have a - different random seed that has to match the sunxi BROM setting. - config NAND_SUNXI_SPL_ECC_STRENGTH int "ECC Strength for sunxi NAND" default 40 diff --git a/drivers/mtd/nand/sunxi_nand_spl.c b/drivers/mtd/nand/sunxi_nand_spl.c index 61eb393..9c304f4 100644 --- a/drivers/mtd/nand/sunxi_nand_spl.c +++ b/drivers/mtd/nand/sunxi_nand_spl.c @@ -297,8 +297,7 @@ int nand_spl_load_image(uint32_t offs, unsigned int size, void *dest) for (current_dest = dest; current_dest < (dest + size); current_dest += CONFIG_NAND_SUNXI_SPL_ECC_PAGE_SIZE) { - nand_read_page(offs, (dma_addr_t)current_dest, - offs < CONFIG_NAND_SUNXI_SPL_SYNDROME_PARTITIONS_END, + nand_read_page(offs, (dma_addr_t)current_dest, 1, &ecc_errors); offs += CONFIG_NAND_SUNXI_SPL_ECC_PAGE_SIZE; }
We currently only use the spl nand code to get u-boot itself, which _always_ is located on a syndrome partition. Once we figure out how we are going to store the u-boot env on nand, we may need non syndrome support, but even then there will likely be better ways to determine whether to use syndrome or not (e.g. look at the loadaddr passed in). Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- drivers/mtd/nand/Kconfig | 8 -------- drivers/mtd/nand/sunxi_nand_spl.c | 3 +-- 2 files changed, 1 insertion(+), 10 deletions(-)