Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757002AbbEVMnw (ORCPT ); Fri, 22 May 2015 08:43:52 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:33338 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756896AbbEVMnr (ORCPT ); Fri, 22 May 2015 08:43:47 -0400 Message-ID: <555F247F.9060100@linaro.org> Date: Fri, 22 May 2015 13:43:43 +0100 From: Daniel Thompson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Maxime Coquelin , Philipp Zabel CC: Maxime Ripard , Arnd Bergmann , =?UTF-8?B?VXdlIEtsZWluZS1Lw7ZuaWc=?= , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , Geert Uytterhoeven , Rob Herring , Linus Walleij , Stefan Agner , Peter Meerwald , Paul Bolle , Peter Hurley , Andy Shevchenko , Chanwoo Choi , Russell King , Daniel Lezcano , Joe Perches , Vladimir Zapolskiy , Lee Jones , Jonathan Corbet , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Thomas Gleixner , Greg Kroah-Hartman , Jiri Slaby , Andrew Morton , "David S. Miller" , Mauro Carvalho Chehab , Antti Palosaari , Tejun Heo , Will Deacon , Nikolay Borisov , Rusty Russell , Kees Cook , Michal Marek , "linux-doc@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-gpio@vger.kernel.org" , "linux-serial@vger.kernel.org" , Linux-Arch , "linux-api@vger.kernel.org" , Nicolae Rosia , Kamil Lulko Subject: Re: [PATCH v8 14/16] ARM: dts: Introduce STM32F429 MCU References: <1431158038-3813-1-git-send-email-mcoquelin.stm32@gmail.com> <2282066.NWoIT9ZyLc@wuerfel> <13641152.Yt4ZI3oT6L@wuerfel> <1432285588.3929.28.camel@pengutronix.de> <20150522091822.GF8557@lukather> <1432289231.3929.60.camel@pengutronix.de> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1791 Lines: 47 On 22/05/15 13:32, Maxime Coquelin wrote: > 2015-05-22 12:07 GMT+02:00 Philipp Zabel : >> And that's how I'd expect it to be described by the device tree: >> >> rcc: rcc@40023800 { >> compatible = "st,stm32-rcc"; >> reg = <0x40023800 0xc0>; >> }; >> > > Doing that, since this register bank contains both reset and clock > registers, the reset device cannot get the IO resource at probe time > because the clock driver has already reserved it. > Daniel, who has started to work on the clock driver is facing this issue. > This is why I proposed this binding for "reg" property. Temporarily I've kept things working for me by avoiding of_io_request_and_map() in the clock driver (I am using raw of_iomap() instead). I view this as a hack rather than a solution! Note that, with or without the hack, I do hope to be able to post the clock driver this weekend. I am acutely aware that at the moment we are discussing code I haven't posted yet. > We could think of creating a MFD driver, but the problem is that clock > need to be intialized before a MFD device can be probed. > > Maybe there is a way to have you binding working properly, but I > haven't found one for now. I guess a driver doesn't *have* to reserve all the register space described in DT. The driver could replace of_io_request_and_map() with lower level calls. Thus if we wanted to keep this detail out of DT then I guess the two drivers could simply make an agreement not to request registers they do not use. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/