From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miquel Raynal Date: Wed, 3 Oct 2018 14:57:33 +0200 Subject: [U-Boot] [PATCH v13 5/7] cmd: mtd: add 'mtd' command In-Reply-To: References: <20181001134331.9756-1-miquel.raynal@bootlin.com> <20181001134331.9756-6-miquel.raynal@bootlin.com> <20181003144259.333c1b00@xps13> Message-ID: <20181003145733.3ffc748e@xps13> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de Hi Adam, Adam Ford wrote on Wed, 3 Oct 2018 07:47:25 -0500: > On Wed, Oct 3, 2018 at 7:43 AM Miquel Raynal = wrote: > > > > Hi Adam, > > > > Adam Ford wrote on Wed, 3 Oct 2018 07:35:15 -0500: > > =20 > > > On Mon, Oct 1, 2018 at 8:48 AM Miquel Raynal wrote: =20 > > > > > > > > There should not be a 'nand' command, a 'sf' command and certainly = not > > > > a new 'spi-nand' command. Write a 'mtd' command instead to manage a= ll > > > > MTD devices/partitions at once. This should be the preferred way to > > > > access any MTD device. =20 > > > > > > What is the expected behavior when I type 'mtd list' on my omap37 > > > board, it just hangs. =20 > > > > What do you mean "hangs", does U-Boot crashes? Or is it really hanging > > with no more on the console? Can you Ctrl-C to cancel the command or is > > it really stuck? =20 >=20 > It's really stuck >=20 > U-Boot 2018.11-rc1-00636-g592cd5defd (Oct 03 2018 - 07:28:27 -0500) >=20 > OMAP3630/3730-GP ES1.2, CPU-OPP2, L3-200MHz, Max CPU Clock 800 MHz > Model: LogicPD Zoom OMAP3 Development Kit > Logic DM37x/OMAP35x reference board + LPDDR/NAND > DRAM: 256 MiB > NAND: 512 MiB > MMC: OMAP SD/MMC: 0 > Loading Environment from NAND... OK > OMAP die ID: 155000029ff800000168301018021018 > Board: DM37xx Torpedo > Net: smc911x-0 > Hit any key to stop autoboot: 0 > OMAP Logic # mtd list >=20 > Control-C does nothing. >=20 >=20 > > =20 > > > > > > I can use the nand read/write functions and mtdparts lists the > > > partitions, so I know nand works. My defconfig > > > lists the partitions, so if we're not supposed to use mtdparts, where > > > I do store the partition information? =20 > > > > You are not supposed to use the mtdpart _command_, but the mtdparts > > _variable_ must be used in order to declare the partitions. =20 >=20 > OK. If I can get MTD working, I'll work to remove the other commands > like NAND and MTDPARTS As of today, the process of migration is not entirely finished to DM and you might still need to issue *first* a "nand probe" to register the device operations. For the hang, could you check the while (remaining_partitions) loop in drivers/mtd/mtd_uboot.c:mtd_probe_devices()? Otherwise if you have some time you may add more traces to track down where it hangs? >=20 > > =20 > > > > > > I intentionally removed it from the device tree a while ago, because > > > U-Boot was passing the partition info to Linux. =20 > > > > Indeed, that's his primary role. =20 >=20 > OK, I just want to make sure I'm understanding it correctly. Sure, no pb! Thanks, Miqu=C3=A8l