Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751818AbdFII6o convert rfc822-to-8bit (ORCPT ); Fri, 9 Jun 2017 04:58:44 -0400 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:33765 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751575AbdFII6m (ORCPT ); Fri, 9 Jun 2017 04:58:42 -0400 Message-ID: <1496998692.3536.24.camel@pengutronix.de> Subject: Re: [RFC PATCH 3/4] ARM: l2x0: add arm,ecc-enable property for aurora From: Jan =?ISO-8859-1?Q?L=FCbbe?= To: Chris Packham Cc: bp@alien8.de, linux-arm-kernel@lists.infradead.org, linux-edac@vger.kernel.org, Rob Herring , Mark Rutland , Russell King , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 09 Jun 2017 10:58:12 +0200 In-Reply-To: <20170608041124.4624-4-chris.packham@alliedtelesis.co.nz> References: <20170608041124.4624-1-chris.packham@alliedtelesis.co.nz> <20170608041124.4624-4-chris.packham@alliedtelesis.co.nz> Organization: Pengutronix Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Mailer: Evolution 3.12.9-1+b1 Mime-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c3 X-SA-Exim-Mail-From: jlu@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1230 Lines: 29 On Do, 2017-06-08 at 16:11 +1200, Chris Packham wrote: > + if (of_property_read_bool(np, "arm,ecc-enable")) { > + mask |= L2C_AUX_CTRL_EVTMON_ENABLE; > + val |= L2C_AUX_CTRL_EVTMON_ENABLE; > + } else if (of_property_read_bool(np, "arm,ecc-disable")) { > + mask |= L2C_AUX_CTRL_EVTMON_ENABLE; > + } Unless I misunderstand the code in __l2c_init(), the mask is used to specify the bits to preserve: old_aux = aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL); aux &= aux_mask; aux |= aux_val; if (old_aux != aux) pr_warn("L2C: DT/platform modifies aux control register: 0x%08x -> 0x%08x\n", old_aux, aux); So the arm,ecc-disable property will have no effect. This probably also applies to patch 2/4. The existing property *-disable code removes the corresponding bit from the mask. Regards, Jan -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |