linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Roelof Berg <rberg@berg-solutions.de>
Cc: "David S. Miller" <davem@davemloft.net>,
	Bryan Whitehead <bryan.whitehead@microchip.com>,
	Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>,
	Russell King <linux@armlinux.org.uk>,
	Thomas Gleixner <tglx@linutronix.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lan743x: Added fixed_phy support
Date: Sun, 26 Apr 2020 16:31:16 +0200	[thread overview]
Message-ID: <20200426143116.GC1140627@lunn.ch> (raw)
In-Reply-To: <20200425234320.32588-1-rberg@berg-solutions.de>

On Sun, Apr 26, 2020 at 01:43:18AM +0200, Roelof Berg wrote:
> +# All the following symbols are dependent on LAN743X - do not repeat
> +# that for each of the symbols.
> +if LAN743X
> +
> +choice LAN743x_MII_MODE
> +	prompt "MII operation mode"
> +	default LAN743x_MII_MODE_DEFAULT
> +	depends on LAN743X
> +	help
> +	 Defines the R/G/MII operation mode of the MAC of lan743.
> +
> +config LAN743x_MII_MODE_DEFAULT
> +	bool "Device default"
> +	help
> +	 The existing internal device configuration, which may have come from
> +	 EEPROM or OTP, will remain unchanged.
> +
> +config LAN743x_MII_MODE_RGMII
> +	bool "RGMII"
> +	help
> +	 RGMII (Reduced GMII) will be enabled when the driver is loaded.
> +
> +config LAN743x_MII_MODE_GMII
> +	bool "G/MII"
> +	help
> +	 GMII (in case of 100 mbit) or MII (in case of 10 mbit) will be enabled when
> +	 the driver is loaded.
> +
> +endchoice

Hi Roelof

You should not be putting this sort of configuration into Kconfig. You
want one kernel to be able to drive all LAN743x instances. Think of a
Debian kernel, etc.

So what are you trying to achieve here? What is the big picture?

You have a PCI device with a LAN743x connected to an Ethernet switch?
You need the MII interface between the LAN743x and the switch to be
configured to some specific speed? But you only want to do this for
your device. How can you identify your device? Do you set the PCI
vendor/device IDs to something unique?

You can add to the end of lan743x_pcidev_tbl[] your vendor/device
ID. In the probe function you can detect your own vendor/product ID
and then configure things as you need. 

    Andrew

  reply	other threads:[~2020-04-26 14:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-25 23:43 [PATCH] lan743x: Added fixed_phy support Roelof Berg
2020-04-26 14:31 ` Andrew Lunn [this message]
2020-04-27 21:37   ` Roelof Berg
2020-04-27 21:52     ` Andrew Lunn
2020-04-28 13:06       ` Roelof Berg
     [not found]       ` <3C939186-D81B-4423-A148-6C5F104E3684@berg-solutions.de>
2020-05-01 18:13         ` [PATCH] lan743x: Added fixed_phy support / Question regarding proper devicetree Roelof Berg
2020-05-01 18:45         ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200426143116.GC1140627@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=bryan.whitehead@microchip.com \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=rberg@berg-solutions.de \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).