Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Hauke Mehrtens <hauke@hauke-m.de>
To: "Arnd Bergmann" <arnd@arndb.de>, "Rafał Miłecki" <zajec5@gmail.com>
Cc: linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] MIPS: BCM47XX: Move NVRAM driver to the drivers/misc/
Date: Wed, 12 Nov 2014 22:09:35 +0100	[thread overview]
Message-ID: <5463CC8F.5000309@hauke-m.de> (raw)
In-Reply-To: <15071020.3LPpWWN4p1@wuerfel>

On 11/12/2014 10:43 AM, Arnd Bergmann wrote:
> On Tuesday 11 November 2014 20:45:46 Rafał Miłecki wrote:
>> After Broadcom switched from MIPS to ARM for their home routers we need
>> to have NVRAM driver in some common place (not arch/mips/).
>> We were thinking about putting it in bus directory, however there are
>> two possible buses for MIPS: drivers/ssb/ and drivers/bcma/. So this
>> won't fit there neither.
>> This is why I would like to move this driver to the drivers/misc/
>>
>> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
>>
> 
> I think drivers/soc would be more appropriate, as this is a purely
> in-kernel interface, and it interacts with other drivers, while
> drivers/misc is generally for oddball devices that don't fit in
> elsewhere and have their own user interface.
> 
> I don't remember if what we had concluded on the previous discussion.
> I think I suggested converting the nvram variables into DT properties
> on ARM. The API certainly feels obscure, so it would be nice to
> keep it out of the modern port if we can come up with a better alternative
> to pass the same information.

When there would be devices shipping with device tree in the boot loader
with this SoC I would go for using device tree for this purpose, but I
do not think there are any and I do not know what Broadcom plans are.

The nvram partition contains all configuration information about the
device like the MAC addresses, the calibration data for the Wifi chips
(either in the SoC or attached via PCIe/USB), default configuration for
the switch and so on. I think expect for the MAC addresses these values
do not vary on one series of boards, but I am to completely sure about
the calibration data. For the mac address we have to parse this as long
as the boot loader does not provide these information in some other way.

My plan would be that we integrate this nvram support into Linux also
for the ARM SoCs at first and then make the old drivers also take device
tree attributes. For new drivers we can make them use device tree
attributes only.

Hauke

  reply	other threads:[~2014-11-12 21:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-11 19:45 [PATCH] MIPS: BCM47XX: Move NVRAM driver to the drivers/misc/ Rafał Miłecki
2014-11-12  9:34 ` Zubair Lutfullah Kakakhel
2014-11-12  9:43 ` Arnd Bergmann
2014-11-12 21:09   ` Hauke Mehrtens [this message]
2014-11-12 21:16 ` Hauke Mehrtens
2014-11-23  9:45   ` Rafał Miłecki
2014-11-23 11:22     ` Hauke Mehrtens

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=5463CC8F.5000309@hauke-m.de \
    --to=hauke@hauke-m.de \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=zajec5@gmail.com \
    /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