From patchwork Tue Nov 6 10:51:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu CASTET X-Patchwork-Id: 1703991 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 93029DF2A2 for ; Tue, 6 Nov 2012 10:52:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750943Ab2KFKv5 (ORCPT ); Tue, 6 Nov 2012 05:51:57 -0500 Received: from mail-bk0-f46.google.com ([209.85.214.46]:45208 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750706Ab2KFKv5 (ORCPT ); Tue, 6 Nov 2012 05:51:57 -0500 Received: by mail-bk0-f46.google.com with SMTP id jk13so118907bkc.19 for ; Tue, 06 Nov 2012 02:51:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=1JjfvSaKef3K3Ckzy7YzU0Ewq2xdROAhYcLV0nF/BL0=; b=Oz07IpWSqkveQQkjrGxREOOK3TdbHYCeAOsCoZ95LPWqPDhqTuLt7ieowtkT8mDUrL b+LakgnARGuUDJHunmbmkwDTwClBQfz+kyEwzJrgUjG5f7cWrKLBimjaeozB6aJIhKqK /UyhwC6O56XcSYFqFsB360wjs23m6M/5/4ECSecTXJtuGhIfWioN50PCoaorq5zTX6mL df/CICstNsifcIqHfa7hIQmf+GxKaE/p00IYsjwpUtOUFEKwtckoD8yNybyV62A3SZuu FI1UF9iXlA+l9UJRtrC/zpm8DqOjU/RvtaVnuyFKqGDZxwl76EFBoBr3c3+YuTOo1OyA +jJw== Received: by 10.204.3.213 with SMTP id 21mr143119bko.121.1352199115577; Tue, 06 Nov 2012 02:51:55 -0800 (PST) Received: from perruche.Parrot.Biz ([46.218.109.82]) by mx.google.com with ESMTPS id s20sm11641363bkw.15.2012.11.06.02.51.53 (version=SSLv3 cipher=OTHER); Tue, 06 Nov 2012 02:51:54 -0800 (PST) From: Matthieu CASTET To: linux-mtd@lists.infradead.org, linux-omap@vger.kernel.org Cc: dedekind1@gmail.com, Matthieu CASTET Subject: [PATCH 1/3] mtd nand : onfi need to be probed in 8 bits mode Date: Tue, 6 Nov 2012 11:51:43 +0100 Message-Id: <1352199105-30215-1-git-send-email-matthieu.castet@parrot.com> X-Mailer: git-send-email 1.7.10.4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org - NAND_CMD_READID want an address that it is not scaled on x16 device (it is always 0x20) - NAND_CMD_PARAM want 8 bits data Signed-off-by: Matthieu CASTET --- drivers/mtd/nand/nand_base.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 5894c2c..abeb8e9 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -2851,6 +2851,8 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip, int i; int val; + /* ONFI need to be probed in 8 bits mode */ + WARN_ON(chip->options & NAND_BUSWIDTH_16); /* Try ONFI for unknown chip or LP */ chip->cmdfunc(mtd, NAND_CMD_READID, 0x20, -1); if (chip->read_byte(mtd) != 'O' || chip->read_byte(mtd) != 'N' ||