Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752017AbaA2FUT (ORCPT ); Wed, 29 Jan 2014 00:20:19 -0500 Received: from mail-ee0-f48.google.com ([74.125.83.48]:43498 "EHLO mail-ee0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750790AbaA2FUQ (ORCPT ); Wed, 29 Jan 2014 00:20:16 -0500 MIME-Version: 1.0 In-Reply-To: <52E87929.30708@prisktech.co.nz> References: <1385227995-3956-1-git-send-email-alchark@gmail.com> <1390823503-24087-1-git-send-email-alchark@gmail.com> <1390823503-24087-4-git-send-email-alchark@gmail.com> <52E87929.30708@prisktech.co.nz> Date: Wed, 29 Jan 2014 09:20:14 +0400 Message-ID: Subject: Re: [PATCH 3/3] net: via-rhine: add OF bus binding From: Alexey Charkov To: Tony Prisk Cc: Rob Herring , netdev , "devicetree@vger.kernel.org" , Roger Luethi , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2014/1/29 Tony Prisk : > On 29/01/14 07:27, Alexey Charkov wrote: >> >> 2014/1/27 Rob Herring : >>> >>> On Mon, Jan 27, 2014 at 5:51 AM, Alexey Charkov >>> wrote: >>>> >>>> This should make the driver usable with VIA/WonderMedia ARM-based >>>> Systems-on-Chip integrated Rhine III adapters. Note that these >>>> are always in MMIO mode, and don't have any known EEPROM. >>>> >>>> Signed-off-by: Alexey Charkov >>>> Signed-off-by: Roger Luethi >>>> --- >>>> .../devicetree/bindings/net/via-rhine.txt | 18 ++ >>>> drivers/net/ethernet/via/Kconfig | 2 +- >>>> drivers/net/ethernet/via/via-rhine.c | 293 >>>> +++++++++++++-------- >>>> 3 files changed, 200 insertions(+), 113 deletions(-) >>>> create mode 100644 Documentation/devicetree/bindings/net/via-rhine.txt >>>> >>>> diff --git a/Documentation/devicetree/bindings/net/via-rhine.txt >>>> b/Documentation/devicetree/bindings/net/via-rhine.txt >>>> new file mode 100644 >>>> index 0000000..684dd3a >>>> --- /dev/null >>>> +++ b/Documentation/devicetree/bindings/net/via-rhine.txt >>>> @@ -0,0 +1,18 @@ >>>> +* VIA Rhine 10/100 Network Controller >>>> + >>>> +Required properties: >>>> +- compatible : Should be "via,rhine" >>> >>> This should be more specific rather than... >>> >>>> +- reg : Address and length of the io space >>>> +- interrupts : Should contain the controller interrupt line >>>> +- rhine,revision : Rhine core revision, used to inform the >>>> + driver of quirks and capabilities to expect from >>>> + the device. Mimics the respective PCI attribute. >>> >>> having this property. The OF match table can then have the quirks set >>> based on compatible strings. >> >> Sounds fair. Do you think something like the following would fly? >> >> Required properties: >> - compatible : Should be "via,rhine-soc-vt8500" for integrated Rhine >> cores found in SoC's such as VIA VT8500, WonderMedia WM8950 and >> possibly others. These are listed as 1106:3106 rev. 0x84 on the >> virtual PCI bus under vendor-provided kernels. > > Does it need a special name? I would have assumed they are using their own > IP for the VT6105 or VT6106S. > Then you can use it to add quirks later on if needed. The problem is that I have no reliable source for the exact name of the IP block. The lookup table within the driver says that rev. 0x83 is VT6105_B0, and rev. 0x8A is VT6105L (and it doesn't contain any entry for 0x84, so our case gets treated as 0x83 currently). If we only differentiate them by the compatible string, I would be reluctant to call it vt6105 or vt6106 or whatever else without knowing for sure. Otherwise, if at some point we need to add any quirks specific to rev. 0x84, we wouldn't be able to do that without side-effects. Thoughts welcome :) Thanks, Alexey -- 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/