From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756447AbcBCPfI (ORCPT ); Wed, 3 Feb 2016 10:35:08 -0500 Received: from plane.gmane.org ([80.91.229.3]:47057 "EHLO plane.gmane.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754840AbcBCPfG (ORCPT ); Wed, 3 Feb 2016 10:35:06 -0500 X-Injected-Via-Gmane: http://gmane.org/ To: linux-kernel@vger.kernel.org From: Sebastian Frias Subject: Re: Grafting old platform drivers onto a new DT kernel Date: Wed, 3 Feb 2016 15:33:11 +0000 (UTC) Message-ID: References: <563B3749.50701@free.fr> <20151105151559.GA16666@lunn.ch> <5640B877.4020108@free.fr> <5640BD96.4070504@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 83.142.147.193 (Mozilla/5.0 (X11; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Marc, Marc Zyngier arm.com> writes: > > Both ethernet and sdhci driver call platform_get_irq(pdev, 0); > > but the eth driver is DT, so calls of_irq_get() while sdhci is > > legacy, so calls platform_get_resource() -- IIUC. > > > > How do I specify a "hwirq" instead of a "Linux index"? and where? > > You don't. Either you're using DT all over the place (and the problem is > moot), or you're not using DT at all (and you're left with hardcoding > everything). There is strictly no provision for "mix-and-match", because > that ends up being an intricate (and unmaintainable) mess. > > If you want a temporary workaround, have a look at 0fb22a8 ("ARM: OMAP: > Work around hardcoded interrupts"). That will give you an idea of how to > convert one into the other at runtime. It will also give you an insight > as to why you really don't want this in a mainline kernel, and certainly > not on a new platform. > One question about commit 0fb22a8 ("ARM: OMAP: Work around hardcoded interrupts"), there is a call to irq_create_of_mapping(), but no call to irq_dispose_mapping(), is that intended? In previous API iterations, we had request_irq() and free_irq() $ git grep irq_dispose_mapping drivers/ | wc -l 105 $ git grep irq_dispose_mapping arch/arm/mach-omap2/ | wc -l 0 Regards, Sebastian