From patchwork Sun May 10 15:14:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 209876 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=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 027A3C54E4B for ; Sun, 10 May 2020 15:14:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D5C0D2082E for ; Sun, 10 May 2020 15:14:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qb0OGWex" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729242AbgEJPOi (ORCPT ); Sun, 10 May 2020 11:14:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728762AbgEJPOh (ORCPT ); Sun, 10 May 2020 11:14:37 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98030C061A0C; Sun, 10 May 2020 08:14:37 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id m24so5556528wml.2; Sun, 10 May 2020 08:14:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=OyysxUp4XjcgsqI2Lfus556dLlr5fhri7TKgWrqmiJE=; b=qb0OGWexu2cHDt229RIuaammyh4YBvZZQ5yFQ34zvb7DmJHEISASUaV3F10i9spuge PeFpaIbgR75Ge1v/Xy9jvA8k7EudCWJ0H/rXfjl0kz/+dQ6EnkVAnexAjI+igxqPnd3u /+SCj/KyEPZEu6x6WDR66FUZModaorWk3lOtnhfAfPA2jZoimFZqOOvvvKoEIP+EsgWo 11z+YBCsklt4cIlPMqlyiOlaUR6RdpJzdw0HqRWGZNyW66x4XPVbBJlL9HWZn5uCY0PH QK3wc2kQyb7edTGCm+1hMAEHKJJPbKd7NFRZHEwtqmyDk8+CkuSVCaecAmSaLfIU55UZ /Wzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=OyysxUp4XjcgsqI2Lfus556dLlr5fhri7TKgWrqmiJE=; b=cnJa1L5Fq3N1Mgrn4yiLNqjiTxUzxnD2uBTxsbnI/bgIQX3lCkB3SjRaWji6fgaUVh ZG7f4A6JJ5fCB0QUjRief1rS+mVKn6dcAEovYdp05xpIMlUPg0wDmP1HFGiiTLzztkrt o+hXLz8oWRtRiMQapGdVuDDa7QkR+j8kLWB2NNVvHg6qaIiwFjchm8opV1ZemLy5rOlv 1arIP0yjhmBlDFIYmRYDjTfT+9iSZ0txpKRH3A0y7Sf/8hJz8sv3HXTeGplm2k+D9Cj8 Q0h2NINobrFAK+rr3cubzAjbdex7Pc2tjDTpeYGaWK2sgFI2IVV7gC8ErvxL7XSjaliC oMww== X-Gm-Message-State: AGi0PubWYj0MS5d1o+gtJIYNdwiAMkTzZuMFhB12tVD1f8bcnLmOtE1A YYugmzptg6MhvMIsoWy4iO8= X-Google-Smtp-Source: APiQypLLdc4lGN0pRsmfHFAo/Jd2cV7QfHwh3umlf/UMcLSrbBtkd/KW0StN+PjHbPwn1DCEEK+KUw== X-Received: by 2002:a1c:9804:: with SMTP id a4mr2456741wme.80.1589123676201; Sun, 10 May 2020 08:14:36 -0700 (PDT) Received: from skynet.lan (198.red-83-49-57.dynamicip.rima-tde.net. [83.49.57.198]) by smtp.gmail.com with ESMTPSA id d133sm25176897wmc.27.2020.05.10.08.14.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 May 2020 08:14:35 -0700 (PDT) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: computersforpeace@gmail.com, kdasu.kdev@gmail.com, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, sumit.semwal@linaro.org, linux-mtd@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Subject: [PATCH 1/3] nand: brcmnand: rename v4 registers Date: Sun, 10 May 2020 17:14:04 +0200 Message-Id: <20200510151406.2527856-1-noltari@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org These registers are also used on v3.3. Signed-off-by: Álvaro Fernández Rojas --- drivers/mtd/nand/raw/brcmnand/brcmnand.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c index e4e3ceeac38f..6a08dd07b058 100644 --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c @@ -338,8 +338,8 @@ enum brcmnand_reg { BRCMNAND_FC_BASE, }; -/* BRCMNAND v4.0 */ -static const u16 brcmnand_regs_v40[] = { +/* BRCMNAND v3.3-v4.0 */ +static const u16 brcmnand_regs_v33[] = { [BRCMNAND_CMD_START] = 0x04, [BRCMNAND_CMD_EXT_ADDRESS] = 0x08, [BRCMNAND_CMD_ADDRESS] = 0x0c, @@ -591,8 +591,8 @@ static int brcmnand_revision_init(struct brcmnand_controller *ctrl) ctrl->reg_offsets = brcmnand_regs_v60; else if (ctrl->nand_version >= 0x0500) ctrl->reg_offsets = brcmnand_regs_v50; - else if (ctrl->nand_version >= 0x0400) - ctrl->reg_offsets = brcmnand_regs_v40; + else if (ctrl->nand_version >= 0x0303) + ctrl->reg_offsets = brcmnand_regs_v33; /* Chip-select stride */ if (ctrl->nand_version >= 0x0701) From patchwork Tue May 12 07:33:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= X-Patchwork-Id: 209852 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=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 6BF64C54E8B for ; Tue, 12 May 2020 07:33:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4D05A20A8B for ; Tue, 12 May 2020 07:33:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="uGzylulq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729022AbgELHdm (ORCPT ); Tue, 12 May 2020 03:33:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727859AbgELHdi (ORCPT ); Tue, 12 May 2020 03:33:38 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 537FDC061A0E; Tue, 12 May 2020 00:33:38 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id u16so22057904wmc.5; Tue, 12 May 2020 00:33:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=G5WeydaheRjYC65flS9VBT/GaukdHAjM5PopK1ROBpE=; b=uGzylulqminwzQ6povM6ovuuUBe0WiR4xU6SJn+/ZSYfSjJBCwlFQK0jgTnK48gceG BDESWCgsNMop/6BdmxKJRpgdT3qA6z/M4og5XoHwArvwSsUiVikxCWL9PR/d2Q3oJBKd 4D4ag5Wj03XHA0MDGSxGSyso2qvooQRLfFHGagytBBiB0WhxpFyYrtC8cw9Ivc0xJFnJ PFp0FFvnX0h1gm8K85juN3SgJ0GpLAjMP0aEVxM8vLScYZd6dZNMwt0Oz6fSSqxoq7nA mB5n366zhZTIJpm4Pw+AAsQjkZ3mKxBcWuxqm2tLqFlhrYTVGJ8jTPiVU87inTwss5TP vJQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=G5WeydaheRjYC65flS9VBT/GaukdHAjM5PopK1ROBpE=; b=X1PUV912lZiK6rc++Kjc3ywuATs4vKs+gtgiNhxOhsfYt98KfVVSsnhBAeflhBXuO7 f1fmImxoL+MLmi4kMAiwJQt8jIT0HeFrp4KDZJPMyEyBkhtJ7JNbIRe/5IlWrw8uCrzS hQuqb3cr3ivk8/z5xWfGuVBf607FQMUz/KgIuu5U/f7BJDS++Akq/VTcA25zG/IzPf3I Hpd+O6FaZ6iDBPBV/FuvJxdOY8qAkguhjvKQfphSh1nnVo6bHzZcvu2VPX+ugCFEeAo/ LZeULtoUeWrLnHwOlevSPDzNR+EAAkk1wSidYvtcOQk4DziiOP9AvdA9A2ot1SO7cjxw AnSA== X-Gm-Message-State: AOAM5322yAjxDjvEucMn88sOmGKV+frfawAmiadgQGr4V6e6t94cl3cq mBNk2IS0TnVnd9MpaFnm704= X-Google-Smtp-Source: ABdhPJy5oH7h1efIv7HKPXfxD75jowwabOsBtrEQiCX/KAWe4Acx+HNa053Yh3bIJDVBJsMfhrDqJg== X-Received: by 2002:a05:600c:22c9:: with SMTP id 9mr1320114wmg.162.1589268817065; Tue, 12 May 2020 00:33:37 -0700 (PDT) Received: from skynet.lan (198.red-83-49-57.dynamicip.rima-tde.net. [83.49.57.198]) by smtp.gmail.com with ESMTPSA id d9sm5961197wmd.10.2020.05.12.00.33.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2020 00:33:36 -0700 (PDT) From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= To: computersforpeace@gmail.com, kdasu.kdev@gmail.com, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, sumit.semwal@linaro.org, linux-mtd@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= Subject: [PATCH v2 3/5] mtd: rawnand: brcmnand: rename page sizes Date: Tue, 12 May 2020 09:33:27 +0200 Message-Id: <20200512073329.742893-4-noltari@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200512073329.742893-1-noltari@gmail.com> References: <20200510151406.2527856-1-noltari@gmail.com> <20200512073329.742893-1-noltari@gmail.com> MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Current pages sizes apply to controllers after v3.4 Signed-off-by: Álvaro Fernández Rojas --- v2: add new patch. drivers/mtd/nand/raw/brcmnand/brcmnand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c index 72b268d8e3a4..ef60dbbeac2b 100644 --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c @@ -571,7 +571,7 @@ static int brcmnand_revision_init(struct brcmnand_controller *ctrl) { static const unsigned int block_sizes_v6[] = { 8, 16, 128, 256, 512, 1024, 2048, 0 }; static const unsigned int block_sizes_v4[] = { 16, 128, 8, 512, 256, 1024, 2048, 0 }; - static const unsigned int page_sizes[] = { 512, 2048, 4096, 8192, 0 }; + static const unsigned int page_sizes_v3_4[] = { 512, 2048, 4096, 8192, 0 }; ctrl->nand_version = nand_readreg(ctrl, 0) & 0xffff; @@ -618,7 +618,7 @@ static int brcmnand_revision_init(struct brcmnand_controller *ctrl) ctrl->max_page_size = 16 * 1024; ctrl->max_block_size = 2 * 1024 * 1024; } else { - ctrl->page_sizes = page_sizes; + ctrl->page_sizes = page_sizes_v3_4; if (ctrl->nand_version >= 0x0600) ctrl->block_sizes = block_sizes_v6; else