Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753191AbdLKOH1 (ORCPT ); Mon, 11 Dec 2017 09:07:27 -0500 Received: from mail01.prevas.se ([62.95.78.3]:60885 "EHLO mail01.prevas.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753128AbdLKOHB (ORCPT ); Mon, 11 Dec 2017 09:07:01 -0500 X-IronPort-AV: E=Sophos;i="5.45,391,1508796000"; d="scan'208";a="2942204" Subject: Re: [RFC] irqchip: add support for LS1021A external interrupt lines From: Rasmus Villemoes To: Alexander Stein CC: Marc Zyngier , Thomas Gleixner , Jason Cooper , Rob Herring , Mark Rutland , , References: <48d2d08c-c57a-ce49-5958-0fd5ad4a2dc7@arm.com> <58297576-cc32-819d-c6b3-7d1355095482@prevas.dk> <5117875.4tMaEC1223@ws-stein> <2475814.YIHTfursNv@ws-stein> <42019fb5-393a-08b0-924d-bf1a97e078fe@prevas.dk> Message-ID: <7badefae-a952-7839-0bfe-dcd09ea1204f@prevas.dk> Date: Mon, 11 Dec 2017 15:06:52 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <42019fb5-393a-08b0-924d-bf1a97e078fe@prevas.dk> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [172.16.8.31] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 733 Lines: 16 On 2017-12-11 14:45, Rasmus Villemoes wrote: > On 2017-12-11 11:02, Alexander Stein wrote: > >> Oh, and what is the content of register SCFG_SCFGREVCR? > > Good point. On my board it's 0xffffffff, set even before U-boot starts, > and lots board support code in U-boot expects this. I can't immediately > find examples in the linux source code that actually writes to the scfg, Not a write, but we do already implicitly assume SCFG_SCFGREVCR is set to all-ones: In drivers/pci/dwc/pci-layerscape.c, bits which are numbered 6-11 in the reference manual are extracted with a regmap_read() followed by a left-shift by 20 and mask with 0x3f. That's consistent with me setting bit 0 (reference manual enumeration) using 1U<<31. Rasmus