[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1411281659190.1406@utopia.booyaka.com>
Date: Fri, 28 Nov 2014 17:07:12 +0000 (UTC)
From: Paul Walmsley <paul@...an.com>
To: Rafał Miłecki <zajec5@...il.com>,
Ralf Baechle <ralf@...ux-mips.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
cc: "linux-mips@...ux-mips.org" <linux-mips@...ux-mips.org>,
Hauke Mehrtens <hauke@...ke-m.de>,
Kumar Gala <galak@...eaurora.org>,
Olof Johansson <olof@...om.net>, Arnd Bergmann <arnd@...db.de>,
Sandeep Nair <sandeep_n@...com>, linux-soc@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V3] MIPS: BCM47XX: Move NVRAM driver to the
drivers/soc/
Hi Rafał,
On Thu, 27 Nov 2014, Rafał Miłecki wrote:
> On 27 November 2014 at 20:56, Paul Walmsley <paul@...an.com> wrote:
> > On Tue, 25 Nov 2014, Rafał Miłecki wrote:
> >> I understand your arguments against drivers/soc/, but on the other hand
> >> I have no idea where else this driver could go.
> >
> > After looking around the tree to find out where similar code is located,
> > it looks like drivers/firmware is the right place. These days,
> > drivers/firmware is mainly used for drivers that parse EFI bootloader
> > data, DMI data, that sort of thing. Quite similar to the CFE-provided
> > data that the bcm47xx-nvram code deals with. So, by functional analogy,
> > drivers/firmware appears to be the right place to stash this device
> > data-probing code.
> >
> >> I guess DT is older than CFE, but Broadcom decided to invent own
> >> solution called NVRAM anyway. This is a bit messy, because it actually
> >> stores hardware details (CPU, RAM, switch) as well as user settings
> >> (e.g. LEDs behavior). I can't say why Broadcom decided to implement it
> >> this way.
> >
> > Yep, based on what the other drivers in drivers/firmware are used for, I
> > think drivers/firmware is the right place for the CFE parsing code.
>
> The problem is I can't find MAINTAINER of the drivers/firmware/. Is
> there someone responsible for that? Some mailing list maybe? Who could
> give us an ACK to move bcm47xx_nvram there?
The list of folks who have committed patches that touch drivers/firmware
is large. I did this as a first-order approximation:
$ git log --format=fuller drivers/firmware/* | grep Commit: | sort -u
Commit: Adrian Bunk <bunk@...nel.org>
Commit: Adrian Bunk <bunk@...sta.de>
Commit: Al Viro <viro@...iv.linux.org.uk>
Commit: Andi Kleen <andi@...il.nowhere.org>
Commit: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Commit: David S. Miller <davem@...emloft.net>
Commit: David Woodhouse <David.Woodhouse@...el.com>
Commit: Dmitry Torokhov <dmitry.torokhov@...il.com>
Commit: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Commit: Greg Kroah-Hartman <gregkh@...e.de>
Commit: H. Peter Anvin <hpa@...ux.intel.com>
Commit: H. Peter Anvin <hpa@...or.com>
Commit: Ingo Molnar <mingo@...e.hu>
Commit: Ingo Molnar <mingo@...nel.org>
Commit: James Bottomley <James.Bottomley@...e.de>
Commit: James Bottomley <JBottomley@...allels.com>
Commit: Jean Delvare <khali@...ux-fr.org>
Commit: Jeff Garzik <jeff@...zik.org>
Commit: Jeff Garzik <jgarzik@...hat.com>
Commit: Jesse Barnes <jbarnes@...tuousgeek.org>
Commit: Jiri Kosina <jkosina@...e.cz>
Commit: Konrad Rzeszutek Wilk <konrad@...nel.org>
Commit: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Commit: Len Brown <len.brown@...el.com>
Commit: Linus Torvalds <torvalds@...osdl.org>
Commit: Linus Torvalds <torvalds@...ux-foundation.org>
Commit: Linus Torvalds <torvalds@...970.osdl.org>
Commit: Linus Torvalds <torvalds@...dy.linux-foundation.org>
Commit: Linus Torvalds <torvalds@...dy.osdl.org>
Commit: Mark Brown <broonie@...nsource.wolfsonmicro.com>
Commit: Mark M. Hoffman <mhoffman@...htlink.com>
Commit: Matt Fleming <matt.fleming@...el.com>
Commit: Matthew Wilcox <willy@...ux.intel.com>
Commit: Paul Gortmaker <paul.gortmaker@...driver.com>
Commit: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
Commit: Russell King <rmk+kernel@....linux.org.uk>
Commit: Tejun Heo <tj@...nel.org>
Commit: Theodore Ts'o <tytso@....edu>
Commit: Thomas Gleixner <tglx@...utronix.de>
Commit: Tony Luck <tony.luck@...el.com>
If I were in your shoes, I would suggest either
1. asking Ralf to merge your patches that touch drivers/firmware, since
he'll also presumably be merging the parts that touch arch/mips
or
2. asking Greg KH to merge those patches
And of course it would not hurt to collect some Reviewed-By:s from other
folks. (See below...)
> >> > It sounds to me like this code is a combination of three
> >> > pieces:
> >> >
> >> > 1. code that autoprobes the size of the "nvram" partition in the Broadcom
> >> > platform flash, by reading various locations in the MMIO flash aperture,
> >> > configured by some other system entity
> >>
> >> That's right, on MIPS we simply detect flash type (drivers/ssb &
> >> driver/bcma) and using that we init NVRAM passing memory offset where
> >> the flash is mapped.
> >
> > OK.
> >
> > So (as a side issue), I would suggest that when you move this code out of
> > arch/mips, the MIPS-isms in it should be removed, like KSEG1ADDR(), etc.,
> > and replaced by the standard ioremap()-type approach. After all, Broadcom
> > could build CFE for ARM, and then we'd want to use this same code to parse
> > the CFE-provided data.
> >
> > Also I would suggest getting rid of the #ifdefs for the flash type, and
> > probing it dynamically instead. The flash setup code under drivers/ssb/
> > and drivers/bcma/ sets up platform_devices for the flash, right? If so
> > then it would be best if this code could run after the bus setup code,
> > query the Linux device model for the type of platform flash in use, and
> > then extract the appropriate address space to probe from that data.
>
> I'm pretty sure you look at some old version of arch/bcm47xx/nvram.c.
> I wouldn't dare to move such a MIPS-focused driver to some common
> place ;)
>
> Please check for the version of nvram.c in Ralf's upstream-sfr tree. I
> think you'll like it much more. Hopefully you will even consider it
> ready for moving to the drivers/firmware/ or whatever :)
OK I will take a look at this, and will either send comments, or will
send a Reviewed-By:.
Thanks for all of the good discussion on this :-)
- Paul
Powered by blists - more mailing lists