Message ID | 20190213085930.31578-9-tudor.ambarus@microchip.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3442314E1 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 13 Feb 2019 09:02:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F0CA2CA00 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 13 Feb 2019 09:02:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 133EA2CA1D; Wed, 13 Feb 2019 09:02:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AE2C92CA00 for <patchwork-linux-arm@patchwork.kernel.org>; Wed, 13 Feb 2019 09:02:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KWQj9BQADA+fLd2OMOy6PTGoJNvr5Ok5u1/ENwzDtEk=; b=e/0hhwE26/LUWu 2rBEMJTxkqenAYCblcgLMBjmOATbpTEAs/EO9H1Sk80SarOZw0rSi4wPBy4SaUNQx0IvewUe4Tph/ RI1Dt5sJx2yo9Vge0djYqR8lFqygZM7kFklc+yV+MCsOg1+YQ2Xxd58W11cP+Gr9OnwnV9+AzW208 bwlOfQWoj29o9x8ArSifTGuRWaYqdCs6DkOg+Q9Ha9VOOmnxfgWIMQDhE9qAsdzU1Dt4nqk09VJ5p 1HpNewFELTWZfIZ3F8nh1b57CK92V/w25j3kTHNtBK4RBCLMG+fSq0+F/El1Kif3iIQGp9OuGVYPM j3te+Asprnde7+2y9reA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gtqRN-0002EE-EP; Wed, 13 Feb 2019 09:02:49 +0000 Received: from esa1.microchip.iphmx.com ([68.232.147.91]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gtqOq-0006JB-QR; Wed, 13 Feb 2019 09:00:54 +0000 X-IronPort-AV: E=Sophos;i="5.58,365,1544511600"; d="scan'208";a="27631565" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 13 Feb 2019 02:00:11 -0700 Received: from NAM01-SN1-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.38) with Microsoft SMTP Server (TLS) id 14.3.352.0; Wed, 13 Feb 2019 02:00:11 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=po1+Rmo5LsZDDrBE5/UwLhyrYNZ5bKrwc0UeryHkhKc=; b=tzpS4sphTe/yuaYrJzwtXx26up8AR5+/neND2R8n+Z3f7ClffCzlVxH5Ur9N68kPqyEQ+/ONTtnmgEB6QGHrAKra/vNtWdX9NB5mHW4vBqRBXQYPuo0hhhd3r2oXd/fXERoBcp5qIyOw6j4MnRBCl4t5hRlcJGkpWHd2Y9gQtSc= Received: from BN6PR11MB1842.namprd11.prod.outlook.com (10.175.98.146) by BN6PR11MB0019.namprd11.prod.outlook.com (10.161.155.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1622.16; Wed, 13 Feb 2019 09:00:08 +0000 Received: from BN6PR11MB1842.namprd11.prod.outlook.com ([fe80::847:4296:13b9:fc9f]) by BN6PR11MB1842.namprd11.prod.outlook.com ([fe80::847:4296:13b9:fc9f%8]) with mapi id 15.20.1601.023; Wed, 13 Feb 2019 09:00:08 +0000 From: <Tudor.Ambarus@microchip.com> To: <robh+dt@kernel.org>, <mark.rutland@arm.com>, <Nicolas.Ferre@microchip.com>, <alexandre.belloni@bootlin.com>, <Ludovic.Desroches@microchip.com>, <dwmw2@infradead.org>, <computersforpeace@gmail.com>, <bbrezillon@kernel.org>, <marek.vasut@gmail.com>, <richard@nod.at>, <miquel.raynal@bootlin.com>, <lee.jones@linaro.org> Subject: [PATCH 08/11] memory: atmel-ebi: move NUM_CS definition inside atmel-ebi Thread-Topic: [PATCH 08/11] memory: atmel-ebi: move NUM_CS definition inside atmel-ebi Thread-Index: AQHUw3qEx2ObER7HjEmtDvVIpHB7CA== Date: Wed, 13 Feb 2019 09:00:08 +0000 Message-ID: <20190213085930.31578-9-tudor.ambarus@microchip.com> References: <20190213085930.31578-1-tudor.ambarus@microchip.com> In-Reply-To: <20190213085930.31578-1-tudor.ambarus@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1PR08CA0085.eurprd08.prod.outlook.com (2603:10a6:800:d3::11) To BN6PR11MB1842.namprd11.prod.outlook.com (2603:10b6:404:101::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Tudor.Ambarus@microchip.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.9.5 x-originating-ip: [94.177.32.154] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5654c66d-a890-4576-81b6-08d69191a70d x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605077)(2017052603328)(7153060)(7193020); SRVR:BN6PR11MB0019; x-ms-traffictypediagnostic: BN6PR11MB0019: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; BN6PR11MB0019; 23:sGyCwV0KwoWFOe1noLaeSKHx3VJJZuVelVdAWCI?= =?iso-8859-1?q?DsHT9JJ49WZUWCx?= =?iso-8859-1?q?L58VVbZP5c/3OquYpiRZ8dDpZJiLTLO0jMG7hZMAyvElPokPyqa3DbsKCM2f?= =?iso-8859-1?q?v3DJrbjIwPGiOXn4vNOdM+0LWtxsQYbL1dIehFWJ00zmbEMiuhAF4tLR0aey?= =?iso-8859-1?q?MoIpki1G4XlOr7dQ47E8quvW8V6uCcUadPj5QFOU5PwNlKaFE8nu9kaMGHW6?= =?iso-8859-1?q?IeWLextbnbwNvvQxKjUFknMk95Jt5zxWh4YMok21lsugDYWEcG1YSEWaHoMj?= =?iso-8859-1?q?eHYVljtsQDsexjvENwdG/VOSVmPYX3ZdQs8bf0dHbTNkZ/ONxLtS6hGOZfCz?= =?iso-8859-1?q?AW9wOcMyvNcl82zZzJ7qbPs8UntH+KY39tjaupI3MrK6dcwdciD7t2aSryDg?= =?iso-8859-1?q?5PXFwtzDY0rl7tVcAVw5Y4atGN3sgwfN7DFSTk8rmc6PpbS+Th08QUK74QB/?= =?iso-8859-1?q?3Os6OJ8F/VdoBQlf5cWNVCKM5pV89VU9ErO3EravesA1wJUrnpuMBfgpSAji?= =?iso-8859-1?q?HjSInldBDRR3DCPr7b0uIY3tQb7BiS2fyvA6Np0JQpi3pPCnQ9iVqMltp1Pk?= =?iso-8859-1?q?yiy6spuKx35ObkCZtGeadHn/syssLfz3qujl3Q10GbJEV3odpNbxhrsQVN9+?= =?iso-8859-1?q?rp1IAZUXXUbSyfkTcYL17mF2q9cOVhtC0GLNpMPHJWfP4hyKqofsjNBnfqv2?= =?iso-8859-1?q?2HaMdaSVVSU1jSfRZKlHnxTIRwly/RKNgqC6ygE23xV7zi2V7QFJjsA/2jRJ?= =?iso-8859-1?q?M5tURsxwcQqhLxVj73VbJmKYHtb6IKWrsaWLD3oTK8EnTzppEEEnOAoZMkcr?= =?iso-8859-1?q?GljLRGbIhNOY23aHxJhlHaHEaWuP2mH2orI0t6eIG2eEugAKXBr3A/gcdCAt?= =?iso-8859-1?q?/X1RqLTGIt5UNuPxDK30DISxRAHNcQAKrppSJK8UghHHm/524HLYk/r7/oGI?= =?iso-8859-1?q?CoQjetrTUibVuJ+wxeQlHhNCsHzt2mrt2vwPDiJ1zR0u5AytXtbbK4XAM/t0?= =?iso-8859-1?q?CX2m7F/X//iWjk3Ft5fEAVesoTS7LGJXW0FEiwEgqnjgU4vyXSt3fNGWJsUI?= =?iso-8859-1?q?YPfUwUAEVg3JbCte8qVNCuXsLoq7FZu2C4eu1OVeKjHcqvDFJOHn9at5jEaf?= =?iso-8859-1?q?cJHQZt/lm9eyAPv5LFgC0Vw8wTuH62O7iX1G8FATXsRHBdSCGNcGrAbz/NP5?= =?iso-8859-1?q?ilzDB8XKyOZrDChAungPZCsvXWCijb6AGwISgG1n3OMNHf1GQNojn3XQW44R?= =?iso-8859-1?q?BahdSBOyOMMjXIwFHKzu8Hbzux4WV3mZ4X4VQvxTi6tEsnZphAsCGkHbmz5w?= =?iso-8859-1?q?MIAb7Y4SA=3D?= x-microsoft-antispam-prvs: <BN6PR11MB0019C9DAEB4832FAB739E39EF0660@BN6PR11MB0019.namprd11.prod.outlook.com> x-forefront-prvs: 094700CA91 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(346002)(366004)(136003)(376002)(39860400002)(189003)(199004)(81166006)(50226002)(106356001)(7416002)(6436002)(54906003)(2201001)(1076003)(81156014)(26005)(110136005)(476003)(102836004)(107886003)(8936002)(6512007)(6486002)(4326008)(446003)(2616005)(316002)(8676002)(105586002)(99286004)(66066001)(486006)(6116002)(3846002)(186003)(11346002)(86362001)(2906002)(72206003)(71190400001)(14454004)(76176011)(53936002)(71200400001)(478600001)(68736007)(6506007)(386003)(2501003)(52116002)(97736004)(7736002)(305945005)(256004)(25786009)(36756003)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR11MB0019; H:BN6PR11MB1842.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: Piq9LueXa1PTnTLYJnrjhst3fRxPYJRunDW7lneP6XDCR4pvwt94iHa++vwpjBJuUGOZBgDPTa64Vjza13APR6KIMtKiBUOPJsby+UfzKp+WRjLE2U5PcZiC55ZPCnwA3C7fh/TCS0LU+O3l5A6gyaoV3LYWYUtkSb3a+dPkPkCd/bGoI9aCS7g+Hj47PRp2M5xVvRBl1KhDJANopJDUIMcaErkSimuGhyV7/td9TxR0FMEAsG5+b527SXyvAOiE+VPmIM76hC7XihOwxs7yECJ8GDddQHqk+IhPlx7XsLyEJZXHjXixZe5oK3kMf7IkVhz2CXHv0deXCyfDZvw8AeZxEYL+OUuP9fOYxC9H3o7aY8YiZIQZljJJS8nemILnFN61FnlfBc7UEWTEiAJGwCwzksc5s89E0j2AUANhxy4= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 5654c66d-a890-4576-81b6-08d69191a70d X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Feb 2019 09:00:05.3779 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB0019 X-OriginatorOrg: microchip.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190213_010013_687768_A6F41DE4 X-CRM114-Status: GOOD ( 10.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: devicetree@vger.kernel.org, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Tudor.Ambarus@microchip.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
add support for sam9x60 nand controller
|
expand
|
diff --git a/drivers/memory/atmel-ebi.c b/drivers/memory/atmel-ebi.c index 0322df9dc249..8515196c2b03 100644 --- a/drivers/memory/atmel-ebi.c +++ b/drivers/memory/atmel-ebi.c @@ -19,6 +19,8 @@ #include <linux/regmap.h> #include <soc/at91/atmel-sfr.h> +#define AT91_EBI_NUM_CS 8 + struct atmel_ebi_dev_config { int cs; struct atmel_smc_cs_conf smcconf; @@ -314,7 +316,7 @@ static int atmel_ebi_dev_setup(struct atmel_ebi *ebi, struct device_node *np, if (ret) return ret; - if (cs >= AT91_MATRIX_EBI_NUM_CS || + if (cs >= AT91_EBI_NUM_CS || !(ebi->caps->available_cs & BIT(cs))) { dev_err(dev, "invalid reg property in %pOF\n", np); return -EINVAL; @@ -344,7 +346,7 @@ static int atmel_ebi_dev_setup(struct atmel_ebi *ebi, struct device_node *np, apply = true; i = 0; - for_each_set_bit(cs, &cslines, AT91_MATRIX_EBI_NUM_CS) { + for_each_set_bit(cs, &cslines, AT91_EBI_NUM_CS) { ebid->configs[i].cs = cs; if (apply) { diff --git a/include/linux/mfd/syscon/atmel-matrix.h b/include/linux/mfd/syscon/atmel-matrix.h index 8293c3e2a82a..1e2cd118e4e3 100644 --- a/include/linux/mfd/syscon/atmel-matrix.h +++ b/include/linux/mfd/syscon/atmel-matrix.h @@ -110,7 +110,6 @@ #define AT91_MATRIX_DDR_IOSR BIT(18) #define AT91_MATRIX_NFD0_SELECT BIT(24) #define AT91_MATRIX_DDR_MP_EN BIT(25) -#define AT91_MATRIX_EBI_NUM_CS 8 #define AT91_MATRIX_USBPUCR_PUON BIT(30)