All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hauke Mehrtens <hauke@hauke-m.de>
To: "Rafał Miłecki" <zajec5@gmail.com>,
	linux-mips@linux-mips.org, "Ralf Baechle" <ralf@linux-mips.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Kumar Gala <galak@codeaurora.org>, Paul Walmsley <paul@pwsan.com>,
	Olof Johansson <olof@lixom.net>, Arnd Bergmann <arnd@arndb.de>,
	Sandeep Nair <sandeep_n@ti.com>
Subject: Re: [PATCH V2] MIPS: BCM47XX: Move NVRAM driver to the drivers/soc/
Date: Sun, 23 Nov 2014 13:16:20 +0100	[thread overview]
Message-ID: <5471D014.9040709@hauke-m.de> (raw)
In-Reply-To: <1416736241-12723-1-git-send-email-zajec5@gmail.com>

On 11/23/2014 10:50 AM, 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/soc/
> 
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> ---
> V2: Use drivers/soc/broadcom/ (instead of misc) and use -M for patch
> 
> I wasn't sure who to to/cc sending this patch. There isn't entry for
> drivers/soc/ in MAINTAINERS. I picked e-mails from the commit
> 3a6e08218f36baa9c49282ad2fe0dfbf001d8f23
> soc: Introduce drivers/soc place-holder for SOC specific drivers
> ---
>  arch/mips/Kconfig                                            |  1 +
>  arch/mips/bcm47xx/Makefile                                   |  2 +-
>  arch/mips/bcm47xx/board.c                                    |  2 +-
>  arch/mips/bcm47xx/setup.c                                    |  1 -
>  arch/mips/bcm47xx/sprom.c                                    |  1 -
>  arch/mips/bcm47xx/time.c                                     |  1 -
>  arch/mips/include/asm/mach-bcm47xx/bcm47xx.h                 |  1 +
>  drivers/bcma/driver_mips.c                                   |  2 +-
>  drivers/net/ethernet/broadcom/b44.c                          |  2 +-
>  drivers/net/ethernet/broadcom/bgmac.c                        |  2 +-
>  drivers/soc/Kconfig                                          |  1 +
>  drivers/soc/Makefile                                         |  1 +
>  drivers/soc/broadcom/Kconfig                                 | 12 ++++++++++++
>  drivers/soc/broadcom/Makefile                                |  1 +
>  .../bcm47xx/nvram.c => drivers/soc/broadcom/bcm47xx_nvram.c  |  4 +++-
>  drivers/ssb/driver_chipcommon_pmu.c                          |  2 +-
>  drivers/ssb/driver_mipscore.c                                |  2 +-
>  .../asm/mach-bcm47xx => include/linux}/bcm47xx_nvram.h       |  3 ---
>  18 files changed, 27 insertions(+), 14 deletions(-)
>  create mode 100644 drivers/soc/broadcom/Kconfig
>  create mode 100644 drivers/soc/broadcom/Makefile
>  rename arch/mips/bcm47xx/nvram.c => drivers/soc/broadcom/bcm47xx_nvram.c (98%)
>  rename {arch/mips/include/asm/mach-bcm47xx => include/linux}/bcm47xx_nvram.h (84%)
> 

....

> diff --git a/drivers/soc/broadcom/Kconfig b/drivers/soc/broadcom/Kconfig
> new file mode 100644
> index 0000000..4f1d498
> --- /dev/null
> +++ b/drivers/soc/broadcom/Kconfig
> @@ -0,0 +1,12 @@
> +#
> +# Broadcom SoC drivers
> +#
> +
> +config BCM47XX_NVRAM
> +	bool "Broadcom NVRAM driver"
> +	depends on BCM47XX || ARCH_BCM_5301X
> +	help
> +	  Broadcom home routers contain flash partition called "nvram" with all
> +	  important hardware configuration as well as some minor user setup.
> +	  It contains a text-like data representing name=value pairs.
> +	  This driver provides an easy way to get value of requested parameter.

You could also explicitly add that this "driver" does not drive any
hardware. I think your text already says so, but it could be that
someone does not understand this.

> diff --git a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_nvram.h b/include/linux/bcm47xx_nvram.h
> similarity index 84%
> rename from arch/mips/include/asm/mach-bcm47xx/bcm47xx_nvram.h
> rename to include/linux/bcm47xx_nvram.h
> index ee59ffe..5ed6917 100644
> --- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx_nvram.h
> +++ b/include/linux/bcm47xx_nvram.h
> @@ -1,7 +1,4 @@
>  /*
> - *  Copyright (C) 2005, Broadcom Corporation
> - *  Copyright (C) 2006, Felix Fietkau <nbd@openwrt.org>
> - *

Any reason for removing these copyright statements? I think that nothing
in this file is copyrightable, but I am not a lawyer and would not
remove these lines.

>   *  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
> 

  reply	other threads:[~2014-11-23 12:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-23  9:50 [PATCH V2] MIPS: BCM47XX: Move NVRAM driver to the drivers/soc/ Rafał Miłecki
2014-11-23 12:16 ` Hauke Mehrtens [this message]
2014-11-23 21:35 ` [PATCH V3] " Rafał Miłecki
2014-11-24 10:02   ` Paul Walmsley
2014-11-24 10:35     ` Rafał Miłecki
2014-11-25 17:50       ` Paul Walmsley
2014-11-25 18:22         ` Rafał Miłecki
2014-11-27 19:56           ` Paul Walmsley
2014-11-27 22:36             ` Rafał Miłecki
2014-11-28 17:07               ` Paul Walmsley
2014-11-28 17:16                 ` Ralf Baechle
2014-12-04  6:43                 ` Paul Walmsley
2014-12-04  7:28                   ` Rafał Miłecki

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=5471D014.9040709@hauke-m.de \
    --to=hauke@hauke-m.de \
    --cc=arnd@arndb.de \
    --cc=galak@codeaurora.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-mips@linux-mips.org \
    --cc=olof@lixom.net \
    --cc=paul@pwsan.com \
    --cc=ralf@linux-mips.org \
    --cc=sandeep_n@ti.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.