[U-Boot,v2,01/10] powerpc, 8xx: move immap.c in arch/powerpc/cpu/mpc8xx/
diff mbox

Message ID 0f6b1b9c0d4d1c29559bfd579591bc77506ddc19.1499329461.git.christophe.leroy@c-s.fr
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Christophe Leroy July 6, 2017, 8:33 a.m. UTC
immap.c used to be common to several CPUs. It is now
only linked to the 8xx, so this patch moves it into
arch/powerpc/cpu/mpc8xx/

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/Kconfig                     | 2 --
 arch/powerpc/cpu/mpc8xx/Kconfig          | 9 +++++++++
 arch/powerpc/cpu/mpc8xx/Makefile         | 1 +
 arch/powerpc/{lib => cpu/mpc8xx}/immap.c | 3 ---
 arch/powerpc/lib/Kconfig                 | 7 -------
 arch/powerpc/lib/Makefile                | 1 -
 6 files changed, 10 insertions(+), 13 deletions(-)
 rename arch/powerpc/{lib => cpu/mpc8xx}/immap.c (99%)
 delete mode 100644 arch/powerpc/lib/Kconfig

Comments

Christophe Leroy July 6, 2017, 8:41 a.m. UTC | #1
Le 06/07/2017 à 10:33, Christophe Leroy a écrit :
> immap.c used to be common to several CPUs. It is now
> only linked to the 8xx, so this patch moves it into
> arch/powerpc/cpu/mpc8xx/
> 
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---

Forgot to tell that this serie applies after '[v6] powerpc: Partialy 
restore core of mpc8xx'

Christophe

>   arch/powerpc/Kconfig                     | 2 --
>   arch/powerpc/cpu/mpc8xx/Kconfig          | 9 +++++++++
>   arch/powerpc/cpu/mpc8xx/Makefile         | 1 +
>   arch/powerpc/{lib => cpu/mpc8xx}/immap.c | 3 ---
>   arch/powerpc/lib/Kconfig                 | 7 -------
>   arch/powerpc/lib/Makefile                | 1 -
>   6 files changed, 10 insertions(+), 13 deletions(-)
>   rename arch/powerpc/{lib => cpu/mpc8xx}/immap.c (99%)
>   delete mode 100644 arch/powerpc/lib/Kconfig
> 
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index a7558d59b2..e9002a76ab 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -34,8 +34,6 @@ config 8xx
>   
>   endchoice
>   
> -source "arch/powerpc/lib/Kconfig"
> -
>   source "arch/powerpc/cpu/mpc83xx/Kconfig"
>   source "arch/powerpc/cpu/mpc85xx/Kconfig"
>   source "arch/powerpc/cpu/mpc86xx/Kconfig"
> diff --git a/arch/powerpc/cpu/mpc8xx/Kconfig b/arch/powerpc/cpu/mpc8xx/Kconfig
> index a425cba8aa..cb15dc5ebc 100644
> --- a/arch/powerpc/cpu/mpc8xx/Kconfig
> +++ b/arch/powerpc/cpu/mpc8xx/Kconfig
> @@ -10,4 +10,13 @@ choice
>   
>   endchoice
>   
> +comment "Specific commands"
> +
> +config CMD_IMMAP
> +	bool "Enable various commands to dump IMMR information"
> +	help
> +	  This enables various commands such as:
> +
> +	    siuinfo - print System Interface Unit (SIU) registers
> +	    memcinfo - print Memory Controller registers
>   endmenu
> diff --git a/arch/powerpc/cpu/mpc8xx/Makefile b/arch/powerpc/cpu/mpc8xx/Makefile
> index 5dd801d76e..eae02da636 100644
> --- a/arch/powerpc/cpu/mpc8xx/Makefile
> +++ b/arch/powerpc/cpu/mpc8xx/Makefile
> @@ -11,6 +11,7 @@ obj-y	+= cpu.o
>   obj-y	+= cpu_init.o
>   obj-y	+= fec.o
>   obj-$(CONFIG_OF_LIBFDT) += fdt.o
> +obj-$(CONFIG_CMD_IMMAP) += immap.o
>   obj-y	+= interrupts.o
>   obj-y	+= serial.o
>   obj-y	+= speed.o
> diff --git a/arch/powerpc/lib/immap.c b/arch/powerpc/cpu/mpc8xx/immap.c
> similarity index 99%
> rename from arch/powerpc/lib/immap.c
> rename to arch/powerpc/cpu/mpc8xx/immap.c
> index 1beed1fa40..5ff6aa5e3b 100644
> --- a/arch/powerpc/lib/immap.c
> +++ b/arch/powerpc/cpu/mpc8xx/immap.c
> @@ -12,8 +12,6 @@
>   #include <common.h>
>   #include <command.h>
>   
> -#if defined(CONFIG_8xx)
> -
>   #include <asm/8xx_immap.h>
>   #include <commproc.h>
>   #include <asm/iopin_8xx.h>
> @@ -394,4 +392,3 @@ U_BOOT_CMD(
>   	"print Baud Rate Generator (BRG) registers",
>   	""
>   );
> -#endif
> diff --git a/arch/powerpc/lib/Kconfig b/arch/powerpc/lib/Kconfig
> deleted file mode 100644
> index 7c8ea971c3..0000000000
> --- a/arch/powerpc/lib/Kconfig
> +++ /dev/null
> @@ -1,7 +0,0 @@
> -config CMD_IMMAP
> -	bool "Enable various commands to dump IMMR information"
> -	help
> -	  This enables various commands such as:
> -
> -	    siuinfo - print System Interface Unit (SIU) registers
> -	    memcinfo - print Memory Controller registers
> diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
> index 4aa41836a2..9a3043abf8 100644
> --- a/arch/powerpc/lib/Makefile
> +++ b/arch/powerpc/lib/Makefile
> @@ -32,7 +32,6 @@ obj-$(CONFIG_BAT_RW) += bat_rw.o
>   obj-$(CONFIG_CMD_BOOTM) += bootm.o
>   obj-y	+= cache.o
>   obj-y	+= extable.o
> -obj-$(CONFIG_CMD_IMMAP) += immap.o
>   obj-y	+= interrupts.o
>   obj-$(CONFIG_CMD_KGDB) += kgdb.o
>   obj-y	+= stack.o
>
Heiko Schocher July 6, 2017, 9:40 a.m. UTC | #2
Hello Christophe,

Am 06.07.2017 um 10:33 schrieb Christophe Leroy:
> immap.c used to be common to several CPUs. It is now
> only linked to the 8xx, so this patch moves it into
> arch/powerpc/cpu/mpc8xx/
>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
>   arch/powerpc/Kconfig                     | 2 --
>   arch/powerpc/cpu/mpc8xx/Kconfig          | 9 +++++++++
>   arch/powerpc/cpu/mpc8xx/Makefile         | 1 +
>   arch/powerpc/{lib => cpu/mpc8xx}/immap.c | 3 ---
>   arch/powerpc/lib/Kconfig                 | 7 -------
>   arch/powerpc/lib/Makefile                | 1 -
>   6 files changed, 10 insertions(+), 13 deletions(-)
>   rename arch/powerpc/{lib => cpu/mpc8xx}/immap.c (99%)
>   delete mode 100644 arch/powerpc/lib/Kconfig

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

bye,
Heiko
>
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index a7558d59b2..e9002a76ab 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -34,8 +34,6 @@ config 8xx
>
>   endchoice
>
> -source "arch/powerpc/lib/Kconfig"
> -
>   source "arch/powerpc/cpu/mpc83xx/Kconfig"
>   source "arch/powerpc/cpu/mpc85xx/Kconfig"
>   source "arch/powerpc/cpu/mpc86xx/Kconfig"
> diff --git a/arch/powerpc/cpu/mpc8xx/Kconfig b/arch/powerpc/cpu/mpc8xx/Kconfig
> index a425cba8aa..cb15dc5ebc 100644
> --- a/arch/powerpc/cpu/mpc8xx/Kconfig
> +++ b/arch/powerpc/cpu/mpc8xx/Kconfig
> @@ -10,4 +10,13 @@ choice
>
>   endchoice
>
> +comment "Specific commands"
> +
> +config CMD_IMMAP
> +	bool "Enable various commands to dump IMMR information"
> +	help
> +	  This enables various commands such as:
> +
> +	    siuinfo - print System Interface Unit (SIU) registers
> +	    memcinfo - print Memory Controller registers
>   endmenu
> diff --git a/arch/powerpc/cpu/mpc8xx/Makefile b/arch/powerpc/cpu/mpc8xx/Makefile
> index 5dd801d76e..eae02da636 100644
> --- a/arch/powerpc/cpu/mpc8xx/Makefile
> +++ b/arch/powerpc/cpu/mpc8xx/Makefile
> @@ -11,6 +11,7 @@ obj-y	+= cpu.o
>   obj-y	+= cpu_init.o
>   obj-y	+= fec.o
>   obj-$(CONFIG_OF_LIBFDT) += fdt.o
> +obj-$(CONFIG_CMD_IMMAP) += immap.o
>   obj-y	+= interrupts.o
>   obj-y	+= serial.o
>   obj-y	+= speed.o
> diff --git a/arch/powerpc/lib/immap.c b/arch/powerpc/cpu/mpc8xx/immap.c
> similarity index 99%
> rename from arch/powerpc/lib/immap.c
> rename to arch/powerpc/cpu/mpc8xx/immap.c
> index 1beed1fa40..5ff6aa5e3b 100644
> --- a/arch/powerpc/lib/immap.c
> +++ b/arch/powerpc/cpu/mpc8xx/immap.c
> @@ -12,8 +12,6 @@
>   #include <common.h>
>   #include <command.h>
>
> -#if defined(CONFIG_8xx)
> -
>   #include <asm/8xx_immap.h>
>   #include <commproc.h>
>   #include <asm/iopin_8xx.h>
> @@ -394,4 +392,3 @@ U_BOOT_CMD(
>   	"print Baud Rate Generator (BRG) registers",
>   	""
>   );
> -#endif
> diff --git a/arch/powerpc/lib/Kconfig b/arch/powerpc/lib/Kconfig
> deleted file mode 100644
> index 7c8ea971c3..0000000000
> --- a/arch/powerpc/lib/Kconfig
> +++ /dev/null
> @@ -1,7 +0,0 @@
> -config CMD_IMMAP
> -	bool "Enable various commands to dump IMMR information"
> -	help
> -	  This enables various commands such as:
> -
> -	    siuinfo - print System Interface Unit (SIU) registers
> -	    memcinfo - print Memory Controller registers
> diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
> index 4aa41836a2..9a3043abf8 100644
> --- a/arch/powerpc/lib/Makefile
> +++ b/arch/powerpc/lib/Makefile
> @@ -32,7 +32,6 @@ obj-$(CONFIG_BAT_RW) += bat_rw.o
>   obj-$(CONFIG_CMD_BOOTM) += bootm.o
>   obj-y	+= cache.o
>   obj-y	+= extable.o
> -obj-$(CONFIG_CMD_IMMAP) += immap.o
>   obj-y	+= interrupts.o
>   obj-$(CONFIG_CMD_KGDB) += kgdb.o
>   obj-y	+= stack.o
>
Tom Rini July 9, 2017, 12:24 a.m. UTC | #3
On Thu, Jul 06, 2017 at 10:33:09AM +0200, Christophe Leroy wrote:

> immap.c used to be common to several CPUs. It is now
> only linked to the 8xx, so this patch moves it into
> arch/powerpc/cpu/mpc8xx/
> 
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> Reviewed-by: Heiko Schocher <hs@denx.de>

Applied to u-boot/master, thanks!

Patch
diff mbox

diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index a7558d59b2..e9002a76ab 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -34,8 +34,6 @@  config 8xx
 
 endchoice
 
-source "arch/powerpc/lib/Kconfig"
-
 source "arch/powerpc/cpu/mpc83xx/Kconfig"
 source "arch/powerpc/cpu/mpc85xx/Kconfig"
 source "arch/powerpc/cpu/mpc86xx/Kconfig"
diff --git a/arch/powerpc/cpu/mpc8xx/Kconfig b/arch/powerpc/cpu/mpc8xx/Kconfig
index a425cba8aa..cb15dc5ebc 100644
--- a/arch/powerpc/cpu/mpc8xx/Kconfig
+++ b/arch/powerpc/cpu/mpc8xx/Kconfig
@@ -10,4 +10,13 @@  choice
 
 endchoice
 
+comment "Specific commands"
+
+config CMD_IMMAP
+	bool "Enable various commands to dump IMMR information"
+	help
+	  This enables various commands such as:
+
+	    siuinfo - print System Interface Unit (SIU) registers
+	    memcinfo - print Memory Controller registers
 endmenu
diff --git a/arch/powerpc/cpu/mpc8xx/Makefile b/arch/powerpc/cpu/mpc8xx/Makefile
index 5dd801d76e..eae02da636 100644
--- a/arch/powerpc/cpu/mpc8xx/Makefile
+++ b/arch/powerpc/cpu/mpc8xx/Makefile
@@ -11,6 +11,7 @@  obj-y	+= cpu.o
 obj-y	+= cpu_init.o
 obj-y	+= fec.o
 obj-$(CONFIG_OF_LIBFDT) += fdt.o
+obj-$(CONFIG_CMD_IMMAP) += immap.o
 obj-y	+= interrupts.o
 obj-y	+= serial.o
 obj-y	+= speed.o
diff --git a/arch/powerpc/lib/immap.c b/arch/powerpc/cpu/mpc8xx/immap.c
similarity index 99%
rename from arch/powerpc/lib/immap.c
rename to arch/powerpc/cpu/mpc8xx/immap.c
index 1beed1fa40..5ff6aa5e3b 100644
--- a/arch/powerpc/lib/immap.c
+++ b/arch/powerpc/cpu/mpc8xx/immap.c
@@ -12,8 +12,6 @@ 
 #include <common.h>
 #include <command.h>
 
-#if defined(CONFIG_8xx)
-
 #include <asm/8xx_immap.h>
 #include <commproc.h>
 #include <asm/iopin_8xx.h>
@@ -394,4 +392,3 @@  U_BOOT_CMD(
 	"print Baud Rate Generator (BRG) registers",
 	""
 );
-#endif
diff --git a/arch/powerpc/lib/Kconfig b/arch/powerpc/lib/Kconfig
deleted file mode 100644
index 7c8ea971c3..0000000000
--- a/arch/powerpc/lib/Kconfig
+++ /dev/null
@@ -1,7 +0,0 @@ 
-config CMD_IMMAP
-	bool "Enable various commands to dump IMMR information"
-	help
-	  This enables various commands such as:
-
-	    siuinfo - print System Interface Unit (SIU) registers
-	    memcinfo - print Memory Controller registers
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index 4aa41836a2..9a3043abf8 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -32,7 +32,6 @@  obj-$(CONFIG_BAT_RW) += bat_rw.o
 obj-$(CONFIG_CMD_BOOTM) += bootm.o
 obj-y	+= cache.o
 obj-y	+= extable.o
-obj-$(CONFIG_CMD_IMMAP) += immap.o
 obj-y	+= interrupts.o
 obj-$(CONFIG_CMD_KGDB) += kgdb.o
 obj-y	+= stack.o