linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Nathan Lynch <ntl@pobox.com>
Cc: linuxppc-dev@ozlabs.org, Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH 1/2] rename pSeries nvram functions
Date: Thu, 25 Jan 2007 11:46:51 +1100	[thread overview]
Message-ID: <1169686011.24996.18.camel@localhost.localdomain> (raw)
In-Reply-To: <20070125001628.GH16486@localdomain>

On Wed, 2007-01-24 at 18:16 -0600, Nathan Lynch wrote:
> The nvram support in the pSeries platform code is not really tied to
> the pSeries platform.  This code is useful on other platforms that
> have the necessary firmware support.
> 
> Change the "pSeries" prefixes on the nvram function names to "rtas" in
> preparation for moving this code to a platform-neutral location.
> 
> Signed-off-by: Nathan Lynch <ntl@pobox.com>

Please, move them out of platform/pseries while at it, so you can also
merge with chrp nvram.c which is pretty much the same.

Cheers,
Ben.

> ---
>  arch/powerpc/platforms/pseries/nvram.c |   14 +++++++-------
>  arch/powerpc/platforms/pseries/setup.c |    2 +-
>  include/asm-powerpc/nvram.h            |    2 +-
>  3 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/pseries/nvram.c b/arch/powerpc/platforms/pseries/nvram.c
> index 64163ce..45cce8c 100644
> --- a/arch/powerpc/platforms/pseries/nvram.c
> +++ b/arch/powerpc/platforms/pseries/nvram.c
> @@ -29,7 +29,7 @@ static char nvram_buf[NVRW_CNT];	/* assume this is in the first 4GB */
>  static DEFINE_SPINLOCK(nvram_lock);
>  
> 
> -static ssize_t pSeries_nvram_read(char *buf, size_t count, loff_t *index)
> +static ssize_t rtas_nvram_read(char *buf, size_t count, loff_t *index)
>  {
>  	unsigned int i;
>  	unsigned long len;
> @@ -73,7 +73,7 @@ static ssize_t pSeries_nvram_read(char *buf, size_t count, loff_t *index)
>  	return p - buf;
>  }
>  
> -static ssize_t pSeries_nvram_write(char *buf, size_t count, loff_t *index)
> +static ssize_t rtas_nvram_write(char *buf, size_t count, loff_t *index)
>  {
>  	unsigned int i;
>  	unsigned long len;
> @@ -115,12 +115,12 @@ static ssize_t pSeries_nvram_write(char *buf, size_t count, loff_t *index)
>  	return p - buf;
>  }
>  
> -static ssize_t pSeries_nvram_get_size(void)
> +static ssize_t rtas_nvram_get_size(void)
>  {
>  	return nvram_size ? nvram_size : -ENODEV;
>  }
>  
> -int __init pSeries_nvram_init(void)
> +int __init rtas_nvram_init(void)
>  {
>  	struct device_node *nvram;
>  	const unsigned int *nbytes_p;
> @@ -141,9 +141,9 @@ int __init pSeries_nvram_init(void)
>  	printk(KERN_INFO "PPC64 nvram contains %d bytes\n", nvram_size);
>  	of_node_put(nvram);
>  
> -	ppc_md.nvram_read	= pSeries_nvram_read;
> -	ppc_md.nvram_write	= pSeries_nvram_write;
> -	ppc_md.nvram_size	= pSeries_nvram_get_size;
> +	ppc_md.nvram_read	= rtas_nvram_read;
> +	ppc_md.nvram_write	= rtas_nvram_write;
> +	ppc_md.nvram_size	= rtas_nvram_get_size;
>  
>  	return 0;
>  }
> diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
> index 042ecae..488828f 100644
> --- a/arch/powerpc/platforms/pseries/setup.c
> +++ b/arch/powerpc/platforms/pseries/setup.c
> @@ -315,7 +315,7 @@ static void __init pSeries_setup_arch(void)
>  	find_and_init_phbs();
>  	eeh_init();
>  
> -	pSeries_nvram_init();
> +	rtas_nvram_init();
>  
>  	/* Choose an idle loop */
>  	if (firmware_has_feature(FW_FEATURE_SPLPAR)) {
> diff --git a/include/asm-powerpc/nvram.h b/include/asm-powerpc/nvram.h
> index f3563e1..981fb9e 100644
> --- a/include/asm-powerpc/nvram.h
> +++ b/include/asm-powerpc/nvram.h
> @@ -68,7 +68,7 @@ extern int nvram_read_error_log(char * buff, int length, unsigned int * err_type
>  extern int nvram_clear_error_log(void);
>  extern struct nvram_partition *nvram_find_partition(int sig, const char *name);
>  
> -extern int pSeries_nvram_init(void);
> +extern int rtas_nvram_init(void);
>  extern int mmio_nvram_init(void);
>  #endif /* __KERNEL__ */
>  

  reply	other threads:[~2007-01-25  0:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-25  0:16 [PATCH 1/2] rename pSeries nvram functions Nathan Lynch
2007-01-25  0:46 ` Benjamin Herrenschmidt [this message]
2007-01-25  0:47   ` Benjamin Herrenschmidt
2007-01-25  1:00     ` Nathan Lynch
2007-01-25  3:41       ` Benjamin Herrenschmidt
2007-01-30 20:16         ` Nathan Lynch

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=1169686011.24996.18.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=ntl@pobox.com \
    --cc=paulus@samba.org \
    /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;
as well as URLs for NNTP newsgroup(s).