ARM: omap2: gpmc-onenand: Print something useful on CS request failure
authorEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Tue, 12 Feb 2013 19:22:21 +0000 (16:22 -0300)
committerJon Hunter <jon-hunter@ti.com>
Mon, 1 Apr 2013 19:53:37 +0000 (14:53 -0500)
If CS request fails the current error message is rather unhelpful.
Fix it by printing the failing chip select and the error code.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Reviewed-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
arch/arm/mach-omap2/gpmc-onenand.c

index 0d75889c0a6f57d13f9362cd10bc6c137b023fdb..f7c9c207d71b3fe20647bb9ca1b95e5fbb0b207e 100644 (file)
@@ -379,7 +379,8 @@ void gpmc_onenand_init(struct omap_onenand_platform_data *_onenand_data)
        err = gpmc_cs_request(gpmc_onenand_data->cs, ONENAND_IO_SIZE,
                                (unsigned long *)&gpmc_onenand_resource.start);
        if (err < 0) {
-               pr_err("%s: Cannot request GPMC CS\n", __func__);
+               pr_err("%s: Cannot request GPMC CS %d, error %d\n",
+                      __func__, gpmc_onenand_data->cs, err);
                return;
        }