All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 02/10] powerpc, 8xx: move specific reginfo
Date: Thu, 6 Jul 2017 11:40:50 +0200	[thread overview]
Message-ID: <595E05A2.7000200@denx.de> (raw)
In-Reply-To: <f40be3f0aeb43c733850e1458428947038ff08ba.1499329461.git.christophe.leroy@c-s.fr>

Hello Christophe,

Am 06.07.2017 um 10:33 schrieb Christophe Leroy:
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
>   arch/powerpc/cpu/mpc8xx/Makefile           |  1 +
>   {cmd => arch/powerpc/cpu/mpc8xx}/reginfo.c | 30 +----------------
>   cmd/reginfo.c                              | 54 ++----------------------------
>   3 files changed, 4 insertions(+), 81 deletions(-)
>   copy {cmd => arch/powerpc/cpu/mpc8xx}/reginfo.c (78%)

Reviewed-by: Heiko Schocher <hs@denx.de>

bye,
Heiko

>
> diff --git a/arch/powerpc/cpu/mpc8xx/Makefile b/arch/powerpc/cpu/mpc8xx/Makefile
> index eae02da636..b5b4bfafb9 100644
> --- a/arch/powerpc/cpu/mpc8xx/Makefile
> +++ b/arch/powerpc/cpu/mpc8xx/Makefile
> @@ -13,6 +13,7 @@ obj-y	+= fec.o
>   obj-$(CONFIG_OF_LIBFDT) += fdt.o
>   obj-$(CONFIG_CMD_IMMAP) += immap.o
>   obj-y	+= interrupts.o
> +obj-$(CONFIG_CMD_REGINFO) += reginfo.o
>   obj-y	+= serial.o
>   obj-y	+= speed.o
>   obj-y	+= spi.o
> diff --git a/cmd/reginfo.c b/arch/powerpc/cpu/mpc8xx/reginfo.c
> similarity index 78%
> copy from cmd/reginfo.c
> copy to arch/powerpc/cpu/mpc8xx/reginfo.c
> index 850f28cabc..b5a962431e 100644
> --- a/cmd/reginfo.c
> +++ b/arch/powerpc/cpu/mpc8xx/reginfo.c
> @@ -6,19 +6,10 @@
>    */
>
>   #include <common.h>
> -#include <command.h>
> -#if defined(CONFIG_8xx)
>   #include <mpc8xx.h>
> -#elif defined(CONFIG_MPC86xx)
> -extern void mpc86xx_reginfo(void);
> -#elif defined(CONFIG_MPC85xx)
> -extern void mpc85xx_reginfo(void);
> -#endif
>
> -static int do_reginfo(cmd_tbl_t *cmdtp, int flag, int argc,
> -		       char * const argv[])
> +void mpc8xx_reginfo(void)
>   {
> -#if defined(CONFIG_8xx)
>   	volatile immap_t     *immap  = (immap_t *)CONFIG_SYS_IMMR;
>   	volatile memctl8xx_t *memctl = &immap->im_memctl;
>   	volatile sysconf8xx_t *sysconf = &immap->im_siu_conf;
> @@ -70,23 +61,4 @@ static int do_reginfo(cmd_tbl_t *cmdtp, int flag, int argc,
>   	/*
>   	 * May be some CPM info here?
>   	 */
> -
> -#elif defined(CONFIG_MPC86xx)
> -	mpc86xx_reginfo();
> -
> -#elif defined(CONFIG_MPC85xx)
> -	mpc85xx_reginfo();
> -#endif
> -
> -	return 0;
>   }
> -
> - /**************************************************/
> -
> -#if defined(CONFIG_CMD_REGINFO)
> -U_BOOT_CMD(
> -	reginfo,	2,	1,	do_reginfo,
> -	"print register information",
> -	""
> -);
> -#endif
> diff --git a/cmd/reginfo.c b/cmd/reginfo.c
> index 850f28cabc..b364cc899a 100644
> --- a/cmd/reginfo.c
> +++ b/cmd/reginfo.c
> @@ -8,7 +8,7 @@
>   #include <common.h>
>   #include <command.h>
>   #if defined(CONFIG_8xx)
> -#include <mpc8xx.h>
> +void mpc8xx_reginfo(void);
>   #elif defined(CONFIG_MPC86xx)
>   extern void mpc86xx_reginfo(void);
>   #elif defined(CONFIG_MPC85xx)
> @@ -19,57 +19,7 @@ static int do_reginfo(cmd_tbl_t *cmdtp, int flag, int argc,
>   		       char * const argv[])
>   {
>   #if defined(CONFIG_8xx)
> -	volatile immap_t     *immap  = (immap_t *)CONFIG_SYS_IMMR;
> -	volatile memctl8xx_t *memctl = &immap->im_memctl;
> -	volatile sysconf8xx_t *sysconf = &immap->im_siu_conf;
> -	volatile sit8xx_t *timers = &immap->im_sit;
> -
> -	/* Hopefully more PowerPC  knowledgable people will add code to display
> -	 * other useful registers
> -	 */
> -
> -	printf ("\nSystem Configuration registers\n"
> -
> -		"\tIMMR\t0x%08X\n", get_immr(0));
> -
> -	printf("\tSIUMCR\t0x%08X", sysconf->sc_siumcr);
> -	printf("\tSYPCR\t0x%08X\n",sysconf->sc_sypcr);
> -
> -	printf("\tSWT\t0x%08X",    sysconf->sc_swt);
> -	printf("\tSWSR\t0x%04X\n", sysconf->sc_swsr);
> -
> -	printf("\tSIPEND\t0x%08X\tSIMASK\t0x%08X\n",
> -		sysconf->sc_sipend, sysconf->sc_simask);
> -	printf("\tSIEL\t0x%08X\tSIVEC\t0x%08X\n",
> -		sysconf->sc_siel, sysconf->sc_sivec);
> -	printf("\tTESR\t0x%08X\tSDCR\t0x%08X\n",
> -		sysconf->sc_tesr, sysconf->sc_sdcr);
> -
> -	printf ("Memory Controller Registers\n"
> -
> -		"\tBR0\t0x%08X\tOR0\t0x%08X \n", memctl->memc_br0, memctl->memc_or0);
> -	printf("\tBR1\t0x%08X\tOR1\t0x%08X \n", memctl->memc_br1, memctl->memc_or1);
> -	printf("\tBR2\t0x%08X\tOR2\t0x%08X \n", memctl->memc_br2, memctl->memc_or2);
> -	printf("\tBR3\t0x%08X\tOR3\t0x%08X \n", memctl->memc_br3, memctl->memc_or3);
> -	printf("\tBR4\t0x%08X\tOR4\t0x%08X \n", memctl->memc_br4, memctl->memc_or4);
> -	printf("\tBR5\t0x%08X\tOR5\t0x%08X \n", memctl->memc_br5, memctl->memc_or5);
> -	printf("\tBR6\t0x%08X\tOR6\t0x%08X \n", memctl->memc_br6, memctl->memc_or6);
> -	printf("\tBR7\t0x%08X\tOR7\t0x%08X \n", memctl->memc_br7, memctl->memc_or7);
> -	printf ("\n"
> -		"\tmamr\t0x%08X\tmbmr\t0x%08X \n",
> -		memctl->memc_mamr, memctl->memc_mbmr );
> -	printf("\tmstat\t0x%08X\tmptpr\t0x%08X \n",
> -		memctl->memc_mstat, memctl->memc_mptpr );
> -	printf("\tmdr\t0x%08X \n", memctl->memc_mdr);
> -
> -	printf ("\nSystem Integration Timers\n"
> -		"\tTBSCR\t0x%08X\tRTCSC\t0x%08X \n",
> -		timers->sit_tbscr, timers->sit_rtcsc);
> -	printf("\tPISCR\t0x%08X \n", timers->sit_piscr);
> -
> -	/*
> -	 * May be some CPM info here?
> -	 */
> +	mpc8xx_reginfo();
>
>   #elif defined(CONFIG_MPC86xx)
>   	mpc86xx_reginfo();
>

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

  reply	other threads:[~2017-07-06  9:40 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-06  8:33 [U-Boot] [PATCH v2 0/10] powerpc, 8xx: Modernise the 8xx Christophe Leroy
2017-07-06  8:33 ` [U-Boot] [PATCH v2 01/10] powerpc, 8xx: move immap.c in arch/powerpc/cpu/mpc8xx/ Christophe Leroy
2017-07-06  8:41   ` Christophe LEROY
2017-07-06  9:40   ` Heiko Schocher
2017-07-09  0:24   ` [U-Boot] [U-Boot, v2, " Tom Rini
2017-07-06  8:33 ` [U-Boot] [PATCH v2 02/10] powerpc, 8xx: move specific reginfo Christophe Leroy
2017-07-06  9:40   ` Heiko Schocher [this message]
2017-07-09  0:24   ` [U-Boot] [U-Boot,v2,02/10] " Tom Rini
2017-07-06  8:33 ` [U-Boot] [PATCH v2 03/10] powerpc, 8xx: Use IO accessors to access IO memory Christophe Leroy
2017-07-06  9:41   ` Heiko Schocher
2017-07-09  0:24   ` [U-Boot] [U-Boot, v2, " Tom Rini
2017-07-06  8:33 ` [U-Boot] [PATCH v2 04/10] powerpc, 8xx: Implement GLL2 ERRATA Christophe Leroy
2017-07-06  9:43   ` Heiko Schocher
2017-07-06 10:56   ` Wolfgang Denk
2017-07-06 11:12     ` Christophe LEROY
2017-07-06 11:18       ` Christophe LEROY
2017-07-06 11:20       ` Wolfgang Denk
2017-07-06  8:33 ` [U-Boot] [PATCH v2 05/10] powerpc, 8xx: Handle checkpatch errors and some of the warnings/checks Christophe Leroy
2017-07-06  9:43   ` Heiko Schocher
2017-07-09  0:24   ` [U-Boot] [U-Boot, v2, " Tom Rini
2017-07-06  8:33 ` [U-Boot] [PATCH v2 06/10] powerpc, 8xx: Properly set CPM frequency in the device tree Christophe Leroy
2017-07-06  9:46   ` Heiko Schocher
2017-07-09  0:25   ` [U-Boot] [U-Boot, v2, " Tom Rini
2017-07-06  8:33 ` [U-Boot] [PATCH v2 07/10] powerpc, 8xx: Migrate to Kconfig Christophe Leroy
2017-07-06  8:57   ` Bin Meng
2017-07-06  9:47   ` Heiko Schocher
2017-07-09  0:25   ` [U-Boot] [U-Boot,v2,07/10] " Tom Rini
2017-07-06  8:33 ` [U-Boot] [PATCH v2 08/10] powerpc, 8xx: move FEC Ethernet driver in drivers/net Christophe Leroy
2017-07-06  8:54   ` Bin Meng
2017-07-06 12:02     ` Tom Rini
2017-07-09  0:25   ` [U-Boot] [U-Boot, v2, " Tom Rini
2017-07-06  8:33 ` [U-Boot] [PATCH v2 09/10] powerpc, 8xx: move SPI driver to drivers/spi/ Christophe Leroy
2017-07-09  0:25   ` [U-Boot] [U-Boot, v2, " Tom Rini
2017-07-06  8:33 ` [U-Boot] [PATCH v2 10/10] powerpc, 8xx: move Serial driver to drivers/serial/ Christophe Leroy
2017-07-09  0:25   ` [U-Boot] [U-Boot, v2, " Tom Rini

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=595E05A2.7000200@denx.de \
    --to=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    /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.