From 32cc24d3c75c2b43e8b08b117e00120b7cc32f68 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sun, 7 Jul 2013 20:20:26 +0200 Subject: m28evk: add trimffs to nand command this is usefull when writing an UBI image which contains and UBIFS volume (check README.nand and UBI FAQ for more details) Signed-off-by: Marek Vasut Cc: Stefano Babic diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h index 5b3fa43..10ccc3b 100644 --- a/include/configs/m28evk.h +++ b/include/configs/m28evk.h @@ -70,6 +70,7 @@ #define CONFIG_CMD_MII #define CONFIG_CMD_MMC #define CONFIG_CMD_NAND +#define CONFIG_CMD_NAND_TRIMFFS #define CONFIG_CMD_NET #define CONFIG_CMD_NFS #define CONFIG_CMD_PING -- cgit v0.10.2 From 3104ce1f6f2d541e8bf2edfb698d0f51dc43b5fb Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Thu, 11 Jul 2013 17:23:26 +0200 Subject: net: fec: Remove bogus flush_dcache_range() call Remove incorrectly called and duplicate flush_dcache_range() call from fec_mxc driver. The call is not needed, since the caches are already flushed in fec_tbd_init(), moreover the second argument should be the ending address, not size. Signed-off-by: Marek Vasut Reported-by: Albert Aribaud Cc: Stefano Babic Cc: Tom Rini diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index da95e28..97bf8fe 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -560,7 +560,6 @@ static int fec_init(struct eth_device *dev, bd_t* bd) } memset(fec->tbd_base, 0, size); fec_tbd_init(fec); - flush_dcache_range((unsigned)fec->tbd_base, size); } /* -- cgit v0.10.2 From ab94cd491faf3e7b0a3b934f5817b15997bcb315 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Fri, 12 Jul 2013 01:03:04 +0200 Subject: net: fec: Avoid MX28 bus sync issue The MX28 multi-layer AHB bus can be too slow and trigger the FEC DMA too early, before all the data hit the DRAM. This patch ensures the data are written in the RAM before the DMA starts. Please see the comment in the patch for full details. This patch was produced with an amazing help from Albert Aribaud, who pointed out it can possibly be such a bus synchronisation issue. Signed-off-by: Marek Vasut Cc: Albert ARIBAUD Cc: Fabio Estevam Cc: Stefano Babic Tested-by: Fabio Estevam Tested-by: Alexandre Pereira da Silva diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 97bf8fe..ec5b9db 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -737,6 +737,28 @@ static int fec_send(struct eth_device *dev, void *packet, int length) flush_dcache_range(addr, addr + size); /* + * Below we read the DMA descriptor's last four bytes back from the + * DRAM. This is important in order to make sure that all WRITE + * operations on the bus that were triggered by previous cache FLUSH + * have completed. + * + * Otherwise, on MX28, it is possible to observe a corruption of the + * DMA descriptors. Please refer to schematic "Figure 1-2" in MX28RM + * for the bus structure of MX28. The scenario is as follows: + * + * 1) ARM core triggers a series of WRITEs on the AHB_ARB2 bus going + * to DRAM due to flush_dcache_range() + * 2) ARM core writes the FEC registers via AHB_ARB2 + * 3) FEC DMA starts reading/writing from/to DRAM via AHB_ARB3 + * + * Note that 2) does sometimes finish before 1) due to reordering of + * WRITE accesses on the AHB bus, therefore triggering 3) before the + * DMA descriptor is fully written into DRAM. This results in occasional + * corruption of the DMA descriptor. + */ + readl(addr + size - 4); + + /* * Enable SmartDMA transmit task */ fec_tx_task_enable(fec); -- cgit v0.10.2 From 254fd8da45312cfd00c0986739e68f09b40a88e6 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Fri, 28 Jun 2013 18:52:39 -0300 Subject: mx53loco: Change default environment to cope with OE changes OpenEmbedded has change partitioning layout of generated image so it does not raise warnings during the boot regarding unkown partition being used for U-Boot. Signed-off-by: Otavio Salvador Acked-by: Jason Liu diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h index a4b610f..cc31e9b 100644 --- a/include/configs/mx53loco.h +++ b/include/configs/mx53loco.h @@ -124,8 +124,8 @@ "boot_fdt=try\0" \ "ip_dyn=yes\0" \ "mmcdev=0\0" \ - "mmcpart=2\0" \ - "mmcroot=/dev/mmcblk0p3 rw rootwait\0" \ + "mmcpart=1\0" \ + "mmcroot=/dev/mmcblk0p2 rw rootwait\0" \ "mmcargs=setenv bootargs console=ttymxc0,${baudrate} root=${mmcroot}\0" \ "loadbootscript=" \ "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ -- cgit v0.10.2 From 21692281ea6972041d5055e64cebb7ef3ae8c989 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Fri, 28 Jun 2013 18:52:40 -0300 Subject: mx6qsabrelite: Change default environment to cope with OE changes OpenEmbedded has change partitioning layout of generated image so it does not raise warnings during the boot regarding unkown partition being used for U-Boot. Signed-off-by: Otavio Salvador Acked-by: Fabio Estevam diff --git a/include/configs/mx6qsabrelite.h b/include/configs/mx6qsabrelite.h index b814418..c7db81d 100644 --- a/include/configs/mx6qsabrelite.h +++ b/include/configs/mx6qsabrelite.h @@ -170,8 +170,8 @@ "boot_fdt=try\0" \ "ip_dyn=yes\0" \ "mmcdev=0\0" \ - "mmcpart=2\0" \ - "mmcroot=/dev/mmcblk0p3 rootwait rw\0" \ + "mmcpart=1\0" \ + "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ "mmcargs=setenv bootargs console=${console},${baudrate} " \ "root=${mmcroot}\0" \ "loadbootscript=" \ -- cgit v0.10.2 From 94aeb8a62d0695c0868e5ee6fa0621872b231128 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Fri, 28 Jun 2013 18:52:41 -0300 Subject: mx6slevk: Change default environment to cope with OE changes OpenEmbedded has change partitioning layout of generated image so it does not raise warnings during the boot regarding unkown partition being used for U-Boot. Signed-off-by: Otavio Salvador Acked-by: Fabio Estevam diff --git a/include/configs/mx6slevk.h b/include/configs/mx6slevk.h index 19dcdd6..55e3ad9 100644 --- a/include/configs/mx6slevk.h +++ b/include/configs/mx6slevk.h @@ -73,8 +73,8 @@ "boot_fdt=try\0" \ "ip_dyn=yes\0" \ "mmcdev=0\0" \ - "mmcpart=2\0" \ - "mmcroot=/dev/mmcblk0p3 rootwait rw\0" \ + "mmcpart=1\0" \ + "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ "mmcargs=setenv bootargs console=${console},${baudrate} " \ "root=${mmcroot}\0" \ "loadbootscript=" \ -- cgit v0.10.2 From 86812c4d5bf2d4252e268ddf82503e8d392fe369 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Fri, 28 Jun 2013 18:52:42 -0300 Subject: wandboard: Change default environment to cope with OE changes OpenEmbedded has change partitioning layout of generated image so it does not raise warnings during the boot regarding unkown partition being used for U-Boot. Signed-off-by: Otavio Salvador Acked-by: Fabio Estevam diff --git a/include/configs/wandboard.h b/include/configs/wandboard.h index b2995d8..ee6bf21 100644 --- a/include/configs/wandboard.h +++ b/include/configs/wandboard.h @@ -120,8 +120,8 @@ "boot_fdt=try\0" \ "ip_dyn=yes\0" \ "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ - "mmcpart=2\0" \ - "mmcroot=/dev/mmcblk0p3 rootwait rw\0" \ + "mmcpart=1\0" \ + "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ "update_sd_firmware_filename=u-boot.imx\0" \ "update_sd_firmware=" \ "if test ${ip_dyn} = yes; then " \ -- cgit v0.10.2 From e97721c41a808b8078b686e23eb80dd65264ed55 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Fri, 28 Jun 2013 18:52:43 -0300 Subject: mx51evk: Change default environment to cope with OE changes OpenEmbedded has change partitioning layout of generated image so it does not raise warnings during the boot regarding unkown partition being used for U-Boot. Signed-off-by: Otavio Salvador Acked-by: Stefano Babic diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h index 13d1839..4383375d 100644 --- a/include/configs/mx51evk.h +++ b/include/configs/mx51evk.h @@ -162,8 +162,8 @@ "boot_fdt=try\0" \ "ip_dyn=yes\0" \ "mmcdev=0\0" \ - "mmcpart=2\0" \ - "mmcroot=/dev/mmcblk0p3 rootwait rw\0" \ + "mmcpart=1\0" \ + "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ "mmcargs=setenv bootargs console=ttymxc0,${baudrate} " \ "root=${mmcroot}\0" \ "loadbootscript=" \ -- cgit v0.10.2 From a3f170cdbf7ae0bd24c94c2f46725699bbd69f05 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Fri, 28 Jun 2013 18:52:44 -0300 Subject: mx53ard: Change default environment to cope with OE changes OpenEmbedded has change partitioning layout of generated image so it does not raise warnings during the boot regarding unkown partition being used for U-Boot. Signed-off-by: Otavio Salvador Acked-by: Fabio Estevam diff --git a/include/configs/mx53ard.h b/include/configs/mx53ard.h index b0a965f..fa160e4 100644 --- a/include/configs/mx53ard.h +++ b/include/configs/mx53ard.h @@ -118,8 +118,8 @@ "boot_fdt=try\0" \ "ip_dyn=yes\0" \ "mmcdev=" __stringify(CONFIG_SYS_MMC_ENV_DEV) "\0" \ - "mmcpart=2\0" \ - "mmcroot=/dev/mmcblk0p3 rootwait rw\0" \ + "mmcpart=1\0" \ + "mmcroot=/dev/mmcblk0p2 rootwait rw\0" \ "update_sd_firmware_filename=u-boot.imx\0" \ "update_sd_firmware=" \ "if test ${ip_dyn} = yes; then " \ -- cgit v0.10.2