Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp107221ybm; Mon, 20 May 2019 12:46:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGPt45wl2Sd1scNCujIlq/WjXX9NcEPeqKQrBehc0kCE38b7OBdEYRSbBF163D8bl+cux/ X-Received: by 2002:aa7:8f16:: with SMTP id x22mr10940636pfr.202.1558381606857; Mon, 20 May 2019 12:46:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558381606; cv=none; d=google.com; s=arc-20160816; b=B30nquHx590NXu62GaBNh8ei83HP94j4oKotEaEhCZD7TzDgtp9n2ShUUQOIHlVJla 89IoErGW2GCay6KeYj3heNMKUw8tAoUJ4M6HauHuRk/Vsm2HAwpn1YlWHZmpDhG/UFck 2y8Px/WQ4UwjdSG51PW5YP6p63Nxt31SA9g7qp8VBsk3pdHRj6pEAwpw0RuIWE7Ix1Dw S+eHE5dgxkTncl2vZN4uhNxsDo+spdX4+rJmA2ogfUkH5D/UUNQL+4qFsgsI/8bOGLSK M+Gy3l6RRon1SphIifYSIp7r13Ca3qTFTec1sjEWcYhFk/ngFdZVjH4ruvE5VRlqwR3K Dl6Q== 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=XIt3W9q5XLX6J+0GetbADiK1IblhDFsxFJw7vzubEZw=; b=YIto/2Ms34wbYkKa3NR0yyQ9nDex3vRzQH430XENHKBALrZ3CESMPyKL57pabuqVOq qdqxXQUh1Hl09nK5vx1aY7rxNtNwzfRAdAxIT5vSemkz7IMGKKXt5aWJqtqU6ZRwCPbk cpJmcI6nKM3H6wtg4scVxe7mpHCheCej0lLOW5zlz3RxgWYi+MbLbd1oHlUuGD1yO5e8 H9uEMXxwz3igrB6N8TBfWOjkw4oCqBBVVS8YfrUY+x0bdmdldZ4X2JUA1K1e6MDXRUNy IizJmBBYupnxg5YWCLlo6JTfXDVIo9jpEjOg/wbBAb8Z0VHSBhod+wL7hTZaN3IdVcJI RaJg== 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 cd7si20271210plb.377.2019.05.20.12.46.31; Mon, 20 May 2019 12:46:46 -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 S1726794AbfETTpJ (ORCPT + 99 others); Mon, 20 May 2019 15:45:09 -0400 Received: from mx.allycomm.com ([138.68.30.55]:63149 "EHLO mx.allycomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725554AbfETTpJ (ORCPT ); Mon, 20 May 2019 15:45:09 -0400 Received: from allycomm.com (184-23-191-215.vpn.dynamic.sonic.net [184.23.191.215]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx.allycomm.com (Postfix) with ESMTPSA id D94353BCD7; Mon, 20 May 2019 12:45:07 -0700 (PDT) From: Jeff Kletsky To: Miquel Raynal , Boris Brezillon , Richard Weinberger , David Woodhouse , Brian Norris , Marek Vasut Cc: Jeff Kletsky , Frieder Schrempf , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 2/3] mtd: spinand: Add support for two-byte device IDs Date: Mon, 20 May 2019 12:44:53 -0700 Message-Id: <20190520194454.32175-3-lede@allycomm.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190520194454.32175-1-lede@allycomm.com> References: <20190520194454.32175-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 Reviewed-by: Frieder Schrempf --- 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