From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Mon, 05 May 2014 10:00:31 +0200 Subject: [U-Boot] [PATCH v5 04/12] dfu: mmc: raw data write fix In-Reply-To: <1398712412-15503-5-git-send-email-m.zalega@samsung.com> References: <1389277919-15279-1-git-send-email-m.zalega@samsung.com> <1398712412-15503-1-git-send-email-m.zalega@samsung.com> <1398712412-15503-5-git-send-email-m.zalega@samsung.com> Message-ID: <20140505100031.7d142866@amdc2363> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Mateusz, > When user attempted to perform a raw write using DFU (vide > dfu_fill_entity_mmc) with MMC interface not initialized before, > get_mmc_blk_size() reported invalid (zero) block size - it wasn't > possible to write ie. a new u-boot image. > > This commit fixes that by initializing MMC device before use in > dfu_fill_entity_mmc(). > > While fixing initialization sequence, I had to change about half of > dfu_fill_entity_mmc's body, so I refactored it on the way to make it, > IMHO, considerably more comprehensible. > > Being left as dead code, get_mmc_blk_size() was removed. > > Tested on Samsung Goni. > > Signed-off-by: Mateusz Zalega > Signed-off-by: Kyungmin Park > Acked-by: Lukasz Majewski > Acked-by: Tom Rini > Cc: Minkyu Kang Applied to u-boot-dfu. Thanks. -- Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group