From patchwork Wed Jan 27 09:40:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yicong Yang X-Patchwork-Id: 373038 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08BE6C433E9 for ; Wed, 27 Jan 2021 09:46:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B911920759 for ; Wed, 27 Jan 2021 09:46:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233803AbhA0JpW (ORCPT ); Wed, 27 Jan 2021 04:45:22 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:11451 "EHLO szxga06-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235447AbhA0Jnt (ORCPT ); Wed, 27 Jan 2021 04:43:49 -0500 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4DQdt95PtHzjCvf; Wed, 27 Jan 2021 17:42:09 +0800 (CST) Received: from localhost.localdomain (10.67.165.24) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.498.0; Wed, 27 Jan 2021 17:42:59 +0800 From: Yicong Yang To: , , , , , , CC: , , , Subject: [PATCH 0/2] Add check of 4-byte when parsing SFDP 4bait table Date: Wed, 27 Jan 2021 17:40:48 +0800 Message-ID: <1611740450-47975-1-git-send-email-yangyicong@hisilicon.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 X-Originating-IP: [10.67.165.24] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Add check of 4-byte address mode support when parsing SFDP 4bait. Some flash will provide a 4bait table and the spi-nor core will convert the address mode to 4-byte without checking whether it's actually supported or not by the controller. For example, the 16M s25fs128s1 provides the 4bait and will be convert to 4-byte address mode, which makes it unusable on hisi-sfc-v3xx on hip08 platform. Add the check before convert the address mode when parsing the 4bait will solve this issue. Yicong Yang (2): mtd: spi-nor: check 4-byte address support when parsing 4bait spi: hisi-sfc-v3xx: add address mode check drivers/mtd/spi-nor/sfdp.c | 48 +++++++++++++++++++++++++++++++++++++++++ drivers/spi/spi-hisi-sfc-v3xx.c | 25 ++++++++++++++++++++- 2 files changed, 72 insertions(+), 1 deletion(-)