From patchwork Fri Mar 12 13:26:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 47674 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 96CCEB7D21 for ; Sat, 13 Mar 2010 00:28:40 +1100 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1Nq4so-0003WG-8k; Fri, 12 Mar 2010 13:26:30 +0000 Received: from ey-out-1920.google.com ([74.125.78.146]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1Nq4si-0003VK-9v for linux-mtd@lists.infradead.org; Fri, 12 Mar 2010 13:26:28 +0000 Received: by ey-out-1920.google.com with SMTP id 3so94847eyh.26 for ; Fri, 12 Mar 2010 05:26:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=sID7AR9wE88mp43RxzB+MtDoI6qYYajCexJfFPifWmQ=; b=MDCt5Nrqv3RNkjN9oZVLZEXoyVucRqOsdVDc2W9s3W1okdHfu7LsTJnm99aS1U0hC4 FasiE9ESXLa8n/ipqcpl48Yolhn7qMDPflhcPTolhnu/eo0YnFU5lTW6hh01/3q3cJJv /9PdoukgD8nNnnNUGsDggGo769tgdWCM2ZjGc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=WLAWov23MjRXMjEL++1mLLS8QaLzGFJCQUMU+uNHAIPs8mopl+7Jb9k9b6uguIpih/ r6IstNsm9kl67YFaMxyp3WOxwac1BMQ4yi7s7L9od24XV3VSsmXBjR2U3ZnIE65lPSs2 JloDFn9E1nIKmY8kG+qjV6jmXzrNt5YceNIMc= Received: by 10.213.59.145 with SMTP id l17mr436595ebh.56.1268400380443; Fri, 12 Mar 2010 05:26:20 -0800 (PST) Received: from localhost.localdomain ([91.213.169.4]) by mx.google.com with ESMTPS id 14sm912701ewy.6.2010.03.12.05.26.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 12 Mar 2010 05:26:19 -0800 (PST) From: Vladimir Zapolskiy To: linux-mtd@lists.infradead.org Subject: [PATCH] [MTD] physmap: remove physmap_flash_shutdown() method. Date: Fri, 12 Mar 2010 16:26:06 +0300 Message-Id: <1268400366-14802-1-git-send-email-vzapolskiy@gmail.com> X-Mailer: git-send-email 1.6.6.1 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20100312_082624_446401_470B6D64 X-CRM114-Status: GOOD ( 15.29 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.2.5 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- _SUMMARY_ Cc: Artem Bityutskiy , Lennert Buytenhek , Vladimir Zapolskiy , Mike Frysinger , David Woodhouse X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org physmap driver operates with cfi, jedec, qinfo and map_rom compliant chips. None of interface drivers for all these chips uses actual suspend and resume chip operations, but correspondent two methods only change flash chip state in drivers' internal state machines, and for Intel chips save/restore block locks is done. To operate with boards with Intel flash chips where RP# pin is not asserted on reset there is an already implemented mechanism of reboot notifiers, and on reboot the flash moves into defined "read array" state. If CONFIG_PM kernel option is enabled, then physmap_flash_shutdown() method is called after reboot notifier work, and save/restore block locks operations disturb the chip from default "read array" state, thus if the flash is a bootable one, board cann't be booted from it after reset. Signed-off-by: Vladimir Zapolskiy Cc: David Woodhouse Cc: Artem Bityutskiy Cc: Mike Frysinger Cc: Lennert Buytenhek --- drivers/mtd/maps/physmap.c | 16 ---------------- 1 files changed, 0 insertions(+), 16 deletions(-) diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c index d9603f7..dea81d7 100644 --- a/drivers/mtd/maps/physmap.c +++ b/drivers/mtd/maps/physmap.c @@ -193,25 +193,9 @@ err_out: return err; } -#ifdef CONFIG_PM -static void physmap_flash_shutdown(struct platform_device *dev) -{ - struct physmap_flash_info *info = platform_get_drvdata(dev); - int i; - - for (i = 0; i < MAX_RESOURCES && info->mtd[i]; i++) - if (info->mtd[i]->suspend && info->mtd[i]->resume) - if (info->mtd[i]->suspend(info->mtd[i]) == 0) - info->mtd[i]->resume(info->mtd[i]); -} -#else -#define physmap_flash_shutdown NULL -#endif - static struct platform_driver physmap_flash_driver = { .probe = physmap_flash_probe, .remove = physmap_flash_remove, - .shutdown = physmap_flash_shutdown, .driver = { .name = "physmap-flash", .owner = THIS_MODULE,