From mboxrd@z Thu Jan 1 00:00:00 1970 From: gregory.clement@free-electrons.com (Gregory CLEMENT) Date: Wed, 04 Jun 2014 13:25:36 +0200 Subject: [PATCH v6 1/6] clocksource: Add support for the Mediatek SoCs In-Reply-To: References: <1401468964-5307-1-git-send-email-matthias.bgg@gmail.com> <1401468964-5307-2-git-send-email-matthias.bgg@gmail.com> Message-ID: <538F0230.7090800@free-electrons.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Rob, On 04/06/2014 13:18, Rob Herring wrote: [...] >> + >> + if (of_address_to_resource(node, 0, &res)) >> + panic("Failed to parse resource\n"); > > panics are a bit pointless at this stage since your console is > typically not up yet. Warning and continuing on with boot gives you a > better shot at actually seeing the message. > >> + >> + if (!request_mem_region(res.start, resource_size(&res), "mtk-timer")) >> + panic("Registers are a busy IO resource"); >> + >> + evt->gpt_base = ioremap(res.start, resource_size(&res)); > > of_iomap instead of these 3 calls. Actually of_iomap doesn't request_mem_region, that's why for mvebu we are trying now to replace of_iomap by request_mem_region/ioremap. -- Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gregory CLEMENT Subject: Re: [PATCH v6 1/6] clocksource: Add support for the Mediatek SoCs Date: Wed, 04 Jun 2014 13:25:36 +0200 Message-ID: <538F0230.7090800@free-electrons.com> References: <1401468964-5307-1-git-send-email-matthias.bgg@gmail.com> <1401468964-5307-2-git-send-email-matthias.bgg@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Rob Herring Cc: Mark Rutland , Andrew Lunn , "linux-doc@vger.kernel.org" , Thierry Reding , =?UTF-8?B?SGVpa28gU3TDvGJuZXI=?= , Russell King - ARM Linux , Arnd Bergmann , Daniel Lezcano , "linux-arm-kernel@lists.infradead.org" , Florian Vaussard , Sebastian Hesselbarth , "devicetree@vger.kernel.org" , Jason Cooper , Pawel Moll , Ian Campbell , Marc Zyngier , Rob Herring , Matthias Brugger , Thomas Gleixner , Soren Brinkmann List-Id: devicetree@vger.kernel.org Hi Rob, On 04/06/2014 13:18, Rob Herring wrote: [...] >> + >> + if (of_address_to_resource(node, 0, &res)) >> + panic("Failed to parse resource\n"); > > panics are a bit pointless at this stage since your console is > typically not up yet. Warning and continuing on with boot gives you a > better shot at actually seeing the message. > >> + >> + if (!request_mem_region(res.start, resource_size(&res), "mtk-timer")) >> + panic("Registers are a busy IO resource"); >> + >> + evt->gpt_base = ioremap(res.start, resource_size(&res)); > > of_iomap instead of these 3 calls. Actually of_iomap doesn't request_mem_region, that's why for mvebu we are trying now to replace of_iomap by request_mem_region/ioremap. -- Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com