From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751520AbbJFAXu (ORCPT ); Mon, 5 Oct 2015 20:23:50 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:45815 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750780AbbJFAXs (ORCPT ); Mon, 5 Oct 2015 20:23:48 -0400 X-AuditID: cbfec7f5-f794b6d000001495-83-5613149180dc Subject: Re: [PATCH v2 0/7] Add support for Exynos SROM Controller driver To: Pavel Fedin , "'Pankaj Dubey'" , linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <1440403348-8974-1-git-send-email-pankaj.dubey@samsung.com> <018501d0ff62$1650b410$42f21c30$@samsung.com> <5612719E.60006@samsung.com> <01cb01d0ff70$6027b760$20772620$@samsung.com> Cc: k.kozlowski.k@gmail.com, thomas.ab@samsung.com, kgene@kernel.org, heiko@sntech.de From: Krzysztof Kozlowski X-Enigmail-Draft-Status: N1110 Message-id: <5613148E.8010903@samsung.com> Date: Tue, 06 Oct 2015 09:23:42 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-version: 1.0 In-reply-to: <01cb01d0ff70$6027b760$20772620$@samsung.com> Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrJLMWRmVeSWpSXmKPExsVy+t/xK7oTRYTDDNZftLL4/+g1q8Xzfz/Y LV6/MLTof/ya2WLT42usFpd3zWGzmHF+H5PFq0ur2CwWbf3CbtGxjNGBy2PnrLvsHptWdbJ5 bF5S79G3ZRWjx/Zr85g9Pm+SC2CL4rJJSc3JLEst0rdL4Mo4e7+HtWCvYMXGb71MDYwL+boY OTkkBEwkXrTtZoKwxSQu3FvP1sXIxSEksJRR4vCcXVDOF0aJOQchqoQFPCVmPHnHDJIQEdgN VLVmBSNE1RFGiVUt15hBqpgFwiW2T3sHZrMJGEtsXr6EDWKHnERv9yQWEJtXQEtiVuciVhCb RUBVoufbKbAaUYEIiVNn37JB1AhK/Jh8D6yeU8BK4tm5uUDLOIDm60ncv6gFsUpeYvOat8wT GAVnIemYhVA1C0nVAkbmVYyiqaXJBcVJ6blGesWJucWleel6yfm5mxghEfJ1B+PSY1aHGAU4 GJV4eCVuCoUJsSaWFVfmHmKU4GBWEuH9ySUcJsSbklhZlVqUH19UmpNafIhRmoNFSZx35q73 IUIC6YklqdmpqQWpRTBZJg5OqQbGFVsZ22xex6Q8dlBWNZo8015y17Pbansi7XmyjONWeinO /rbsqeFendVJT2Y6ZXJOluN/mtQQELk7zdXAoORWl1vpCrvHSXyLqubIND9sXH/qmwSPpenb wHOqpxlu9/r6t6cvfsPllqCuH/j4vI/UnAOnIy+pHGYOy//QKcFfnLy21MlB/IsSS3FGoqEW c1FxIgBHzThmjAIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05.10.2015 22:18, Pavel Fedin wrote: > Hello! > >> That is interesting. What do you mean by that? Although SROM controller >> can access external memory (SRAM, ROM) but it is not exactly a bus. How >> is the SMSC9111 "connected"? What interface or protocol is used? > > SROM controller actually provides a demultiplexed external address and data bus. This way you could > hook up old good ROM chip to it (hence its name). However, you can plug in there anything else with > the appropriate interface, and SMSC9111 uses exactly that. Just some address + control + data wires. > Therefore, you can think of SROMc as a simple bus. Ah, okay, thanks for details. > >> I am sorry but I cannot figure out what exactly are you talking about. >> The Device Tree is the glue to describe the board, the hardware and its >> configuration. Please elaborate a little more. > > Yes, exactly that. SROM controller has 4 outputs, and for every of these outputs you have to choose > mode and timings. Once you set them correctly, you can use peripherial behind them. These timings > actually depend on the actual peripherial. > > By this time i remembered that u-boot guys also did something with this. And here are links: > http://git.denx.de/?p=u-boot.git;a=blob;f=arch/arm/dts/exynos5250-smdk5250.dts;h=8b695442b1a29dec4e3 > 53ebd3cfee0ff89f218a6;hb=HEAD#l43 - this is how connection is described > http://git.denx.de/?p=u-boot.git;a=blob;f=board/samsung/common/board.c;h=d32c75de50858f131284e28db0c > 7ed55883f1cb0;hb=HEAD#l184 - and this is parsing code I see... Pankaj's driver was not developed for that purpose. You would have to extend it. For the SROMC driver there shouldn't be much work to do: just parse additional bindings and configure the controller for ethernet adapter. > There's only one small problem with their code. "bank" parameter is device-wide, therefore you > cannot configure more than one bank. For SMDK boards it's OK, but in future you may run into problem > with this. You are not bound by u-boot bindings anyhow (at least to my understanding). You can try to re-use them but if some binding is problematic then just create your own. Best regards, Krzysztof