Re: [PATCH V2] MIPS: BCM47XX: Move NVRAM driver to the drivers/soc/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> ---
> 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@xxxxxxxxxxx>
> - *

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
> 






[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux