Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp980164ybm; Wed, 22 May 2019 15:07:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqzkfIvdb7IjF2e4SWQawHcve4rkPhyiXse0NVXYIA4pYm6ns1QtygTwSxBfohNGna23tOpw X-Received: by 2002:a63:b1d:: with SMTP id 29mr92773796pgl.103.1558562868848; Wed, 22 May 2019 15:07:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558562868; cv=none; d=google.com; s=arc-20160816; b=maUUjckPbYV2nv7sh7OQ+EI6CmYfLGEczSRIJk2HFGwRbsFFSa5cC+CpR5lktuepyW FkLbFFeUObl/bE6uSx0oypzr82vwxRqVa2qG+yU7Yk8eMnxSdXlOTvTU4JP8eun39dwf QiydSUFpPVl6ECZLfnmSV22wIAM7BcNfxg94RCC61H1IOedrLKYVCClwvzPqvcmNqZvs fCzyF4xxyxKA30CHXqITwFm1VKl1ltu2LBD/1TVhCyfz3k7qo8Shpu6pKJRkFi0vwIr/ ji97HoFsBTe2C8fFbwM3rDIoB3UZKQAFKJho6lMO2xQcR8jB7ZVqmy4BSBkgc7erXhVy /rzA== 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=Xen63Bx4GyKjsotO/aDnhvhFxt4TBvia2v6nDlN/t3E=; b=JTSC1S8B8hvF4DUXFYPhPdJvYSRtQg009JXTqcTroHxzJJJpxBSj53jFu+JlT4Rda+ m17ndhUg4Sh12k2kRXBVJaN3fdZBmr5PF75eEwkfskNpzojWqkmsmsOX8HnUlZYl7pLX krpQ0vs5gmKwZFYCxWLU8Mmqd5LzcHZKen+/Ae9E+Fx/7vOhAyf+FDbT3EH4Gvk9SFM9 cZZop8UnAgYH9oRjdbCxbtlx8wackXnjtJlCmpOpST6eTpjDuGJJNQ0DaNmIIUt3p69U yimasvE1zi5LBOjhVPs+lL2Hpr3bjEmLqB52St6PGu+yvEnGJIMCol0SxzDfKlcC+K2x FGcw== 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 33si23202887plk.233.2019.05.22.15.07.34; Wed, 22 May 2019 15:07:48 -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 S1728404AbfEVWGO (ORCPT + 99 others); Wed, 22 May 2019 18:06:14 -0400 Received: from mx.allycomm.com ([138.68.30.55]:13339 "EHLO mx.allycomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726390AbfEVWGN (ORCPT ); Wed, 22 May 2019 18:06:13 -0400 Received: from allycomm.com (unknown [IPv6:2601:647:5401:2210::49]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx.allycomm.com (Postfix) with ESMTPSA id AEED53CB16; Wed, 22 May 2019 15:06:11 -0700 (PDT) From: Jeff Kletsky To: Miquel Raynal , Richard Weinberger , David Woodhouse , Brian Norris , Marek Vasut , Vignesh Raghavendra Cc: Jeff Kletsky , Frieder Schrempf , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 2/3] mtd: spinand: Add support for two-byte device IDs Date: Wed, 22 May 2019 15:05:54 -0700 Message-Id: <20190522220555.11626-3-lede@allycomm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190522220555.11626-1-lede@allycomm.com> References: <20190522220555.11626-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 4c15bb58c623..556bfdb34455 100644 --- a/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c @@ -845,7 +845,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 8aa39ac41e8e..fbc0423bb4ae 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; @@ -452,7 +452,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