Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp296919imu; Mon, 5 Nov 2018 00:41:25 -0800 (PST) X-Google-Smtp-Source: AJdET5eRzyjfErlA0Cnjgr5GlfixbmMRGZg6L+W4ZVOR/XXc7bImiG/dTECdoNDyE5Cv/Zm8sc7x X-Received: by 2002:a63:7986:: with SMTP id u128-v6mr19500245pgc.111.1541407285104; Mon, 05 Nov 2018 00:41:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541407285; cv=none; d=google.com; s=arc-20160816; b=0LZckpmvmb2IwbYV7NoTApwafm9pu4d0c7aaJuZ4SvluN0kPHs5o31PceSVs/XEHme M0HvmpNt9FV10ygwwLjYXSeSQYOWXVRnfijpEtEk1f7I0UWOIu4t3RBa3w2tUBbHDM0N xFHu3UE1x/6Ijm1EtsAuYTWUluv9YeiPGATV7MK/nh9dv9h30FWMhy3ulRQfHAlOa3/B Bhe+6aoYUxUH4JJnymHyftyiMK8mSyaOnd6vx2fvtBELB+VhZyCOOGdTFniGpa4SGXeR W0O5mWGYpImTFex5p9KGDt78Wf5y1atZDz2a04aTSKKtLmVyv5gObKWTqnJB2E2B8l1N HDAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=nge/XGzcuuqS1pKwxAheyOqqx88Jde4jBXKsvDhBJv0=; b=VTcrFi1rWFjcWdJ57l/d5XcIsqrbLbjbPDO5hSAXiKgYEgebKgxof9+rawT/nq1Fgg NXg7oBB5KQMsSNNzuRubfrPuK85ljrqqSnAKfAZkAq23vdQPxozxwcbmq3U2EggsKII1 oHo6VSQp1TkLILZti1ywC728Jl6WGZWnPTJieuR6wp/ZEKYQQzeTabXVGp3O4PPZkDQf Oj537MWig8SjXOoOH4tlJSyEpHTVvpo8Edjvh4CGmjQ88UVWcmYf75CN3oejo/IkZA05 uy2syL/fvMlhRCsH6mRykCDJgIwgQ8MvzyI89Jg/eng51uh1dL5+Cip391mgyJ5vt7zA 3rOg== 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 q23-v6si11236807pll.178.2018.11.05.00.41.08; Mon, 05 Nov 2018 00:41:25 -0800 (PST) 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 S1726555AbeKER7V (ORCPT + 99 others); Mon, 5 Nov 2018 12:59:21 -0500 Received: from mail.intenta.de ([178.249.25.132]:28848 "EHLO mail.intenta.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726086AbeKER7V (ORCPT ); Mon, 5 Nov 2018 12:59:21 -0500 Received: from [10.10.16.42] (port=61437 helo=ICSMA001.intenta.de) by mail.intenta.de with esmtps (TLSv1.2:AES256-SHA:256) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1gJaR7-0005xY-1K; Mon, 05 Nov 2018 09:40:41 +0100 Received: from localhost (10.10.136.105) by ICSMA001.intenta.de (10.10.16.42) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 5 Nov 2018 09:40:41 +0100 X-CTCH-RefID: str=0001.0A0C0213.5BE00209.00BC,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 Date: Mon, 5 Nov 2018 09:40:43 +0100 From: Helmut Grohne To: Naga Sureshkumar Relli CC: , , , , , , , , , , , , , , Subject: Re: [LINUX PATCH v12] mtd: rawnand: pl353: Add basic driver for arm pl353 smc nand interface Message-ID: <20181105084040.xyxzkmcrlg7iyics@laureti-dev> References: <1533620414-3332-1-git-send-email-naga.sureshkumar.relli@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1533620414-3332-1-git-send-email-naga.sureshkumar.relli@xilinx.com> User-Agent: NeoMutt/20170113 (1.7.2) X-Originating-IP: [10.10.136.105] X-ClientProxiedBy: ICSMA001.intenta.de (10.10.16.42) To ICSMA001.intenta.de (10.10.16.42) X-EsetResult: clean, is OK X-EsetId: 47C16134FCD33539178C3D Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 07, 2018 at 11:10:14AM +0530, Naga Sureshkumar Relli wrote: > Add driver for arm pl353 static memory controller nand interface with > HW ECC support. This controller is used in Xilinx Zynq SoC for > interfacing the NAND flash memory. > > Signed-off-by: Naga Sureshkumar Relli > --- > Changes in v12: I attempted to apply this v12 together with the v11 of pl353-smc (which seems to be the latest version) onto a vanilla v4.19 kernel tree. Application was smooth and a build was without errors. During boot, my dmesg was spammed with lots of repetitions of this: [ 5.816275] ------------[ cut here ]------------ [ 5.820981] WARNING: CPU: 0 PID: 1 at .../linux/drivers/mtd/nand/raw/nand_base.c:2773 nand_subop_get_data_len+0x60/0xa4 [ 5.836868] Modules linked in: [ 5.836912] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 4.19.0-dirty #3 [ 5.836929] Hardware name: Xilinx Zynq Platform [ 5.836943] Backtrace: [ 5.836981] [] (dump_backtrace) from [] (show_stack+0x20/0x24) [ 5.837004] r7:c062e618 r6:00000000 r5:600f0013 r4:c062e618 [ 5.837027] [] (show_stack) from [] (dump_stack+0xac/0xd8) [ 5.837055] [] (dump_stack) from [] (__warn+0x118/0x130) [ 5.837079] r10:00000000 r9:c0270be8 r8:00000ad5 r7:c0550358 r6:00000009 r5:00000000 [ 5.837097] r4:00000000 r3:de4c6000 [ 5.837122] [] (__warn) from [] (warn_slowpath_null+0x50/0x58) [ 5.837146] r9:de4c78c5 r8:da4d1010 r7:de4c78f8 r6:c0270be8 r5:00000ad5 r4:c0550358 [ 5.837173] [] (warn_slowpath_null) from [] (nand_subop_get_data_len+0x60/0xa4) [ 5.837192] r6:0000003c r5:00000003 r4:de4c7870 [ 5.837217] [] (nand_subop_get_data_len) from [] (pl353_nand_exec_op_cmd+0x60/0x314) [ 5.837238] r7:de4c78f8 r6:0000003c r5:de4c7870 r4:00000003 [ 5.837262] [] (pl353_nand_exec_op_cmd) from [] (nand_op_parser_exec_op+0x484/0x4e8) [ 5.837285] r10:00000002 r9:00000014 r8:de4c790c r7:00000004 r6:c0634260 r5:c052cc44 [ 5.837301] r4:c0620bcc [ 5.837325] [] (nand_op_parser_exec_op) from [] (pl353_nfc_exec_op+0x24/0x2c) [ 5.837348] r10:de4c7a18 r9:00000080 r8:03463678 r7:89705f41 r6:36b4a597 r5:de4c78d0 [ 5.837364] r4:da4d1010 [ 5.837387] [] (pl353_nfc_exec_op) from [] (nand_erase_op+0x150/0x1f0) [ 5.837411] [] (nand_erase_op) from [] (single_erase+0x28/0x2c) [ 5.837434] r9:e08c1000 r8:00000006 r7:00000040 r6:00000001 r5:0001ff80 r4:da4d1010 [ 5.837459] [] (single_erase) from [] (nand_erase_nand+0x1f8/0x3f8) [ 5.837484] [] (nand_erase_nand) from [] (write_bbt+0x30c/0x748) [ 5.837508] r10:00000006 r9:e08c1000 r8:00000006 r7:00000002 r6:da4d1010 r5:00000000 [ 5.837524] r4:0ffc0000 [ 5.837549] [] (write_bbt) from [] (nand_create_bbt+0x30c/0x6d0) [ 5.837572] r10:c061fd2c r9:c061fce8 r8:00000000 r7:c061fd2c r6:00000000 r5:00000003 [ 5.837587] r4:00000000 [ 5.837614] [] (nand_create_bbt) from [] (nand_scan_with_ids+0x1248/0x1e74) [ 5.837636] r10:c0620524 r9:00000004 r8:00000001 r7:00000004 r6:da4d1378 r5:00000001 [ 5.837652] r4:da4d1010 [ 5.837676] [] (nand_scan_with_ids) from [] (pl353_nand_probe+0x144/0x208) [ 5.837699] r10:00000000 r9:c0620ae0 r8:c0633ba0 r7:00000000 r6:da4d8e10 r5:da4d8e00 [ 5.837715] r4:da4d1010 [ 5.837738] [] (pl353_nand_probe) from [] (platform_drv_probe+0x44/0x7c) [ 5.837757] r6:c0e0205c r5:c0620ae0 r4:da4d8e10 [ 5.837783] [] (platform_drv_probe) from [] (really_probe+0x27c/0x408) [ 5.837801] r5:da4d8e10 r4:c0e02058 [ 5.837827] [] (really_probe) from [] (driver_probe_device+0x138/0x198) [ 5.837850] r10:00000000 r9:00000000 r8:c0e02014 r7:00000001 r6:de4c7c70 r5:c0620ae0 [ 5.837865] r4:da4d8e10 [ 5.837891] [] (driver_probe_device) from [] (__device_attach_driver+0xc8/0x144) [ 5.837913] r9:00000000 r8:c0e02014 r6:de4c7c70 r5:da4d8e10 r4:c0620ae0 [ 5.837938] [] (__device_attach_driver) from [] (bus_for_each_drv+0x70/0xa4) [ 5.837958] r7:00000001 r6:c0251f0c r5:de4c7c70 r4:00000000 [ 5.837982] [] (bus_for_each_drv) from [] (__device_attach+0xb0/0x11c) [ 5.838001] r6:c061e8d0 r5:da4d8e44 r4:da4d8e10 [ 5.838027] [] (__device_attach) from [] (device_initial_probe+0x1c/0x20) [ 5.838047] r7:da4d8e10 r6:c061e8d0 r5:da4d8e10 r4:da4d8e18 [ 5.838073] [] (device_initial_probe) from [] (bus_probe_device+0x98/0xa0) [ 5.838097] [] (bus_probe_device) from [] (device_add+0x380/0x5dc) [ 5.838117] r7:da4d8e10 r6:de595e00 r5:00000000 r4:da4d8e18 [ 5.838142] [] (device_add) from [] (of_device_add+0x44/0x4c) [ 5.838164] r10:c0563da4 r9:dfbf0a70 r8:dfbf0ac0 r7:00000000 r6:de595e00 r5:00000000 [ 5.838180] r4:da4d8e00 [ 5.838205] [] (of_device_add) from [] (of_platform_device_create_pdata+0xa0/0xd0) [ 5.838229] [] (of_platform_device_create_pdata) from [] (of_platform_device_create+0x20/0x24) [ 5.838252] r9:dfbf0a70 r8:dfbf0780 r7:c0470470 r6:ddfe9f50 r5:00000000 r4:de595e00 [ 5.838280] [] (of_platform_device_create) from [] (pl353_smc_probe+0x1b0/0x244) [ 5.838305] [] (pl353_smc_probe) from [] (amba_probe+0xa4/0xb8) [ 5.838328] r10:00000000 r9:c06262f4 r8:c0633ba0 r7:00000000 r6:c06262f4 r5:de595e00 [ 5.838345] r4:c04706bc r3:c02dfa98 [ 5.838370] [] (amba_probe) from [] (really_probe+0x27c/0x408) [ 5.838391] r7:00000000 r6:c0e0205c r5:de595e00 r4:c0e02058 [ 5.838416] [] (really_probe) from [] (driver_probe_device+0x138/0x198) [ 5.838439] r10:c06311e0 r9:00000000 r8:00000000 r7:c0633ac8 r6:c06262f4 r5:c06262f4 [ 5.838455] r4:de595e00 [ 5.838480] [] (driver_probe_device) from [] (__driver_attach+0x138/0x154) [ 5.838502] r9:00000000 r8:00000000 r6:c06262f4 r5:de595e34 r4:de595e00 [ 5.838527] [] (__driver_attach) from [] (bus_for_each_dev+0x68/0xa4) [ 5.838547] r7:c0633ac8 r6:c0251db8 r5:c06262f4 r4:de595e00 [ 5.838572] [] (bus_for_each_dev) from [] (driver_attach+0x2c/0x30) [ 5.838591] r6:c061c22c r5:da4cc900 r4:c06262f4 [ 5.838616] [] (driver_attach) from [] (bus_add_driver+0x1b8/0x278) [ 5.838641] [] (bus_add_driver) from [] (driver_register+0x88/0x11c) [ 5.838663] r8:c05eeeec r7:c06311e0 r6:c05ff420 r5:c05c8be0 r4:c06262f4 [ 5.838687] [] (driver_register) from [] (amba_driver_register+0x60/0x64) [ 5.838704] r5:c05c8be0 r4:c0630960 [ 5.838730] [] (amba_driver_register) from [] (pl353_smc_driver_init+0x20/0x24) [ 5.838756] [] (pl353_smc_driver_init) from [] (do_one_initcall+0x8c/0x368) [ 5.838779] [] (do_one_initcall) from [] (kernel_init_freeable+0x3ac/0x484) [ 5.838802] r9:c063a9c0 r8:c05eeeec r7:c063a9c0 r6:c05ff420 r5:00000007 r4:de4c6000 [ 5.838827] [] (kernel_init_freeable) from [] (kernel_init+0x1c/0x108) [ 5.838849] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c043a390 [ 5.838866] r4:0000a9c0 [ 5.838888] [] (kernel_init) from [] (ret_from_fork+0x14/0x28) [ 5.838905] Exception stack(0xde4c7fb0 to 0xde4c7ff8) [ 5.838925] 7fa0: 00000000 00000000 00000000 00000000 [ 5.838947] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 5.838967] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 5.838984] r5:c043a390 r4:00000000 [ 5.839001] irq event stamp: 224953 [ 5.839027] hardirqs last enabled at (224959): [] console_unlock+0x4bc/0x664 [ 5.839053] hardirqs last disabled at (224964): [] console_unlock+0xe4/0x664 [ 5.839078] softirqs last enabled at (224936): [] __do_softirq+0x458/0x540 [ 5.839103] softirqs last disabled at (224921): [] irq_exit+0x148/0x14c [ 5.839123] ---[ end trace eb0330276aefb0c8 ]--- The respective mtd character devices were created, but e.g. reading them results in -EIO. The device tested on works fine with v4.14 and a driver close to the xilinx kernel tree at github. I acknowledge that th v12 submission predates the v4.19 release, but at this time, the driver will need reworking. Helmut