Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754661AbbEMLzU (ORCPT ); Wed, 13 May 2015 07:55:20 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45398 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753951AbbEMLzP (ORCPT ); Wed, 13 May 2015 07:55:15 -0400 Date: Wed, 13 May 2015 04:55:14 -0700 From: Greg Kroah-Hartman To: Pantelis Antoniou Cc: Matt Porter , Koen Kooi , Robert Nelson , Rob Herring , Grant Likely , Jonathan Corbet , Srinivas Kandagatla , Guenter Roeck , Geert Uytterhoeven , =?iso-8859-1?Q?Beno=EEt?= Cousso , linux-api@vger.kernel.org, linux-doc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Pantelis Antoniou Subject: Re: [PATCH 1/5] misc: Beaglebone capemanager Message-ID: <20150513115514.GB1021@kroah.com> References: <1431503985-31853-1-git-send-email-pantelis.antoniou@konsulko.com> <1431503985-31853-2-git-send-email-pantelis.antoniou@konsulko.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1431503985-31853-2-git-send-email-pantelis.antoniou@konsulko.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5025 Lines: 147 On Wed, May 13, 2015 at 10:59:41AM +0300, Pantelis Antoniou wrote: > A cape loader based on DT overlays and DT objects. > > This is the beaglebone cape manager which allows capes to be automatically > probed and instantiated via means of a device tree overlay deduced from > the part-number and version contained on the cape's EEPROM. > > The reference manual contains information about the specification > and the contents of the EEPROM. > > http://beagleboard.org/static/beaglebone/latest/Docs/Hardware/BONE_SRM.pdf > > Documentation about the workings of the cape manager is located > in Documentation/misc-devices/bone_capemgr.txt > > This driver is using the EEPROM framework interface to retrieve > the data stored on the baseboard and cape EEPROMs. > > Signed-off-by: Pantelis Antoniou > --- > drivers/misc/Kconfig | 10 + > drivers/misc/Makefile | 1 + > drivers/misc/bone_capemgr.c | 1926 +++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 1937 insertions(+) > create mode 100644 drivers/misc/bone_capemgr.c > > diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig > index 006242c..f9e09e1 100644 > --- a/drivers/misc/Kconfig > +++ b/drivers/misc/Kconfig > @@ -515,6 +515,16 @@ config VEXPRESS_SYSCFG > bus. System Configuration interface is one of the possible means > of generating transactions on this bus. > > +config BONE_CAPEMGR > + tristate "Beaglebone cape manager" > + depends on ARCH_OMAP2PLUS && OF > + select EEPROM > + select OF_OVERLAY > + default n N is always the default, please remove. > + help > + Say Y here to include support for automatic loading of > + beaglebone capes. > + What about if it's a module? > source "drivers/misc/c2port/Kconfig" > source "drivers/misc/eeprom/Kconfig" > source "drivers/misc/cb710/Kconfig" > diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile > index 7d5c4cd..659b78b 100644 > --- a/drivers/misc/Makefile > +++ b/drivers/misc/Makefile > @@ -56,3 +56,4 @@ obj-$(CONFIG_GENWQE) += genwqe/ > obj-$(CONFIG_ECHO) += echo/ > obj-$(CONFIG_VEXPRESS_SYSCFG) += vexpress-syscfg.o > obj-$(CONFIG_CXL_BASE) += cxl/ > +obj-$(CONFIG_BONE_CAPEMGR) += bone_capemgr.o > diff --git a/drivers/misc/bone_capemgr.c b/drivers/misc/bone_capemgr.c > new file mode 100644 > index 0000000..423719c > --- /dev/null > +++ b/drivers/misc/bone_capemgr.c > @@ -0,0 +1,1926 @@ > +/* > + * TI Beaglebone cape manager > + * > + * Copyright (C) 2012 Texas Instruments Inc. > + * Copyright (C) 2012-2015 Konsulko Group. > + * Author: Pantelis Antoniou > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License as published by > + * the Free Software Foundation; either version 2 of the License, or > + * (at your option) any later version. I have to ask, do you really mean, "or any later version"? > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +/* disabled capes */ > +static char *disable_partno; > +module_param(disable_partno, charp, 0444); > +MODULE_PARM_DESC(disable_partno, > + "Comma delimited list of PART-NUMBER[:REV] of disabled capes"); > + > +/* enable capes */ > +static char *enable_partno; > +module_param(enable_partno, charp, 0444); > +MODULE_PARM_DESC(enable_partno, > + "Comma delimited list of PART-NUMBER[:REV] of enabled capes"); > + > +/* delay to scan on boot until rootfs appears */ > +static int boot_scan_period = 1000; > +module_param(boot_scan_period, int, 0444); > +MODULE_PARM_DESC(boot_scan_period, > + "boot scan period until rootfs firmware is available"); Ick, no module parameters please, can't we drop these? And we have a rootfs delay option already for the whole system, this module shouldn't need a special one. thanks, greg k-h -- 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/