From patchwork Mon Oct 24 16:24:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sylvain Lesne X-Patchwork-Id: 685976 X-Patchwork-Delegate: jh80.chung@samsung.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3t2hb35PPBz9s9N for ; Tue, 25 Oct 2016 03:30:07 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 41D72A75B8; Mon, 24 Oct 2016 18:30:06 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4n7Z4VdbkVQY; Mon, 24 Oct 2016 18:30:06 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B795CA7574; Mon, 24 Oct 2016 18:30:05 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id ED8D6A7580 for ; Mon, 24 Oct 2016 18:30:01 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nXtZ_hEmVO0M for ; Mon, 24 Oct 2016 18:30:01 +0200 (CEST) X-Greylist: delayed 309 seconds by postgrey-1.34 at theia; Mon, 24 Oct 2016 18:29:54 CEST X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.134]) by theia.denx.de (Postfix) with ESMTPS id 2079AA7574 for ; Mon, 24 Oct 2016 18:29:54 +0200 (CEST) Received: from localhost.localdomain ([109.190.217.251]) by mrelayeu.kundenserver.de (mreue001) with ESMTPSA (Nemesis) id 0MFUge-1cAkkc0bq8-00EMUN; Mon, 24 Oct 2016 18:24:38 +0200 From: Sylvain Lesne To: u-boot@lists.denx.de Date: Mon, 24 Oct 2016 18:24:37 +0200 Message-Id: <1477326277-337-1-git-send-email-lesne@alse-fr.com> X-Mailer: git-send-email 1.9.1 X-Provags-ID: V03:K0:KGI7mdNpORRt8bk4bbMd7rjWumvaediROyNHOD0q9h8wrFHVwWL meYxvxwxbW5OzJ8lJ40RCghDN2NrCMrb8Z9Axg7wGnqFchDPOTrnm7wa+qb8G8/p2jud3DE 9XoiIm5PcooUyLySmSjCujgClUbtp2hpMkzKHctTupjol2GfeW8ruYCGNwV30CsE3ZJkzam 3TghVqvJF+cP7uBsFSsgA== X-UI-Out-Filterresults: notjunk:1; V01:K0:0G+vUdW36Qg=:eO4abioblcyYtB+ad4j5FA rCeWsQtQJsNMg5ULdOIPQ14RsvsC9w6M5P1G/OO0zRm+rzCdVaTfLXyA6qCFNFou5kL8BAYeQ AdAKTv4FhQ8X6F1ix7zSmnS4HKWiA8btfCELqbfrhMxqIs/RO3rERKPpcKC7Fz4t0cFeGq6k1 MrQO4F9nPnTrZesT1/S06E0cmy0Osf9aecyIAWD26L5lLndzA5KHyGwenc7OXAGWYcGZZvdKH o3ouWQKIro5ZGlsIIwVtbaknfjyzVCjfQ8cIk7ffnSa4UYjb9CPA3zLiYDPvg3UEokVYNNrlH pOHqaS2rsnfNivLzMYtMaWrZmjoqAWBjeo6Iu6GuKrfLApUPYXv6pWSejkg9fFYiauLBPib46 AE2TofcMaPKYYtMWe3BiiTIqGB6v9uymk2V7VpWYj2xIOwOjo+sR7ZcYLI4s82NlrgMjOnGiM ALxYo0V+GtGwX6KEVi52KkgMUOcFEbAX5vJBVJOfyqrbJs/68fj+HZOUzlyFyLNx0exbkYK9H pfISjOP5K1O+zOEkVESOsdf4L4Q1SbOItD5TIvpw1GYSvI/Cz7ULp3zEPn2R5ABejFH87Z14f 98v0xkL68557aLbBYdK0KrR8lsR0r9SzLYiJbrnx4tggiLhj9qxPRxjE6F6i4noXplNLrnadW XG1urhW7mLnB/VrtlKYE4lE7vQD7GkujhQJ6gJlWJQQ/BiBXSY+KDwYqHwm4J6+/mYy8= Cc: marex@denx.de Subject: [U-Boot] [PATCH] dm: mmc: socfpga: fix MMC_OPS support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Now that CONFIG_BLK and CONFIG_MMC_OPS are enabled by default with CONFIG_DM_MMC, the DWMMC driver on the socfpga platform fails at runtime. This adds the missing fields in the driver declaration. Signed-off-by: Sylvain Lesne Acked-by: Marek Vasut Reviewed-by: Simon Glass --- Hi, I might be missing something, but with the latest master, on a socfpga board, I get the following failure: U-Boot SPL 2016.11-rc2-00072-g869588d-dirty (Oct 24 2016 - 17:18:22) drivers/ddr/altera/sequencer.c: Preparing to start memory calibration drivers/ddr/altera/sequencer.c: CALIBRATION PASSED drivers/ddr/altera/sequencer.c: Calibration complete Trying to boot from MMC1 spl: partition error MMC: block number 0xx exceeds max(0xx) mmc_load_image_raw_sector: mmc block read error SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ### After some digging, it seems that the socfpga_dw_mmc driver slipped through the cracks during some steps of the DM conversion, so I added the missing fields of the driver declaration, mimicking what's done in the other dw_mmc_* drivers, and it works on my board. (Also, this is kind of unrelated, but it looks like the error message 'MMC: block number 0xx exceeds max(0xx)' has a formatting issue!) --- drivers/mmc/socfpga_dw_mmc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mmc/socfpga_dw_mmc.c b/drivers/mmc/socfpga_dw_mmc.c index 5a3a4ff..0a22e58 100644 --- a/drivers/mmc/socfpga_dw_mmc.c +++ b/drivers/mmc/socfpga_dw_mmc.c @@ -151,7 +151,9 @@ U_BOOT_DRIVER(socfpga_dwmmc_drv) = { .id = UCLASS_MMC, .of_match = socfpga_dwmmc_ids, .ofdata_to_platdata = socfpga_dwmmc_ofdata_to_platdata, + .ops = &dm_dwmci_ops, .bind = socfpga_dwmmc_bind, .probe = socfpga_dwmmc_probe, .priv_auto_alloc_size = sizeof(struct dwmci_socfpga_priv_data), + .platdata_auto_alloc_size = sizeof(struct socfpga_dwmci_plat), };