Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6844933yba; Tue, 14 May 2019 14:58:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyR6vGjWOsIjyIpM7sBWKb8ldE2yrUc8zAZGo2UxD8S5V20+cTrGaQKSO8fb0tnPin7JDhk X-Received: by 2002:a63:fd50:: with SMTP id m16mr40794508pgj.192.1557871089659; Tue, 14 May 2019 14:58:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557871089; cv=none; d=google.com; s=arc-20160816; b=Q9WrCxa9gICcFOg+ixWVXmQQbTJNQ2/sSATIaGqDwHRN4nlTIq1HxC/eajZbwBhP0t CyzsPxmKkSMI8ijtNz4f/Lsc0myML/eHDtI91+/yJEpc9lpK+VLXz11oZTOO6daXgBdc ua+ifeXXCUHuCKd2bmeZKbfOAe+WjGOI1J3wWBxiH0za9QpaOdptGYo3bf4n67Z1N00t i6tRQ5dhEJkQGl6FKac455c5AY8ePGvJ6po7DIbPSGvd/4G7wJYJUvTPujSlq/6Iotw4 e7ouofA98343n+KSr2Ge92HtL2xt0Hj4BKN2UsQKhw1yM0f1IDD2JZzzEirGNAvTf+z+ KzpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=8Jw50TpwwoFZgS0sjFZMb6UR4UkpeyKLKo5Wd+OK/7Y=; b=qskvGveT96vTR+40NQuJN/0Tg9owdacOIhehDEes5iXAQTpVoad1Wd/u7yRre5B9mo hlS/VPjg5xItuRsaV6UReokFt2nR/dnScfZc/ffCgcZ6abWqOCq7a/vAcMlXaOryVr5b 8tM+btKaae79d9v44uQP+GP9LXKfL0lTaVK18if9lOoAkY+pO/+tG/kDMkQ8xQoGXeoM vOYVndxQFD9us0r0T0RCTFweccZoDbz+Zihzzwq3RfqHCne0SxoILwzhFuXOojtrExGA oj+KWdSTRahYwWz8ourvi+PcWSPbOgOqP9SW36/fkZ8pp2oZ8zeyOZfEf9Fnx/M4epAV v6Kw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o23si27504pgm.595.2019.05.14.14.57.55; Tue, 14 May 2019 14:58:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726400AbfENVzV (ORCPT + 99 others); Tue, 14 May 2019 17:55:21 -0400 Received: from mx.allycomm.com ([138.68.30.55]:19989 "EHLO mx.allycomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726148AbfENVzU (ORCPT ); Tue, 14 May 2019 17:55:20 -0400 Received: from allycomm.com (inet.guidewire.com [199.91.42.30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx.allycomm.com (Postfix) with ESMTPSA id 37F7C3B853; Tue, 14 May 2019 14:55:19 -0700 (PDT) From: Jeff Kletsky To: Boris Brezillon , Miquel Raynal , Richard Weinberger , David Woodhouse , Brian Norris , Marek Vasut Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/3] mtd: spinand: Add support for two-byte device IDs Date: Tue, 14 May 2019 14:53:14 -0700 Message-Id: <20190514215315.19228-3-lede@allycomm.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190514215315.19228-1-lede@allycomm.com> References: <20190514215315.19228-1-lede@allycomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jeff Kletsky The GigaDevice GD5F1GQ4UFxxG SPI NAND utilizes two-byte device IDs. http://www.gigadevice.com/datasheet/gd5f1gq4xfxxg/ Signed-off-by: Jeff Kletsky --- drivers/mtd/nand/spi/core.c | 2 +- include/linux/mtd/spinand.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c index fa87ae28cdfe..a13154785dad 100644 --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c @@ -853,7 +853,7 @@ spinand_select_op_variant(struct spinand_device *spinand, */ int spinand_match_and_init(struct spinand_device *spinand, const struct spinand_info *table, - unsigned int table_size, u8 devid) + unsigned int table_size, u16 devid) { struct nand_device *nand = spinand_to_nand(spinand); unsigned int i; diff --git a/include/linux/mtd/spinand.h b/include/linux/mtd/spinand.h index 05fe98eebe27..8901ba272538 100644 --- a/include/linux/mtd/spinand.h +++ b/include/linux/mtd/spinand.h @@ -290,7 +290,7 @@ struct spinand_ecc_info { */ struct spinand_info { const char *model; - u8 devid; + u16 devid; u32 flags; struct nand_memory_organization memorg; struct nand_ecc_req eccreq; @@ -445,7 +445,7 @@ static inline void spinand_set_of_node(struct spinand_device *spinand, int spinand_match_and_init(struct spinand_device *dev, const struct spinand_info *table, - unsigned int table_size, u8 devid); + unsigned int table_size, u16 devid); int spinand_upd_cfg(struct spinand_device *spinand, u8 mask, u8 val); int spinand_select_target(struct spinand_device *spinand, unsigned int target); -- 2.20.1