mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/2] PPC multiple architecture preparation
@ 2011-12-29 11:13 Renaud Barbier
  2011-12-29 11:13 ` [PATCH 1/2] Preparation stage to support multiple PPC architectures Renaud Barbier
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Renaud Barbier @ 2011-12-29 11:13 UTC (permalink / raw)
  To: s.hauer; +Cc: barebox

These patches allow for the future addition of other PPC architectures.

I am planning on submitting the mpc85xx support quite soon.

MPC8xxx patches are quite large. How would you like to handle them?

Renaud Barbier (2):
  Preparation stage to support multiple PPC architectures.
  Make clock shift and mask configurable based on the processor type.

 arch/ppc/Kconfig                  |   45 ++++++------------------------
 arch/ppc/configs/pcm030_defconfig |    2 +
 arch/ppc/lib/time.c               |    6 ++--
 arch/ppc/mach-mpc5xxx/Kconfig     |   54 +++++++++++++++++++++++++++++++++++++
 4 files changed, 68 insertions(+), 39 deletions(-)

-- 
1.7.6.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] Preparation stage to support multiple PPC architectures.
  2011-12-29 11:13 [PATCH 0/2] PPC multiple architecture preparation Renaud Barbier
@ 2011-12-29 11:13 ` Renaud Barbier
  2012-01-02 11:30   ` Sascha Hauer
  2011-12-29 11:13 ` [PATCH 2/2] Make clock shift and mask configurable based on the processor type Renaud Barbier
  2012-01-02 11:26 ` [PATCH 0/2] PPC multiple architecture preparation Sascha Hauer
  2 siblings, 1 reply; 6+ messages in thread
From: Renaud Barbier @ 2011-12-29 11:13 UTC (permalink / raw)
  To: s.hauer; +Cc: barebox

Rework arch/ppc/Kconfig to select processor types.
Move MPC5200 configuration to architecture sub-directory.
pcm030 configuration file is updated to reflect changes.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
---
 arch/ppc/Kconfig                  |   45 ++++++------------------------
 arch/ppc/configs/pcm030_defconfig |    2 +
 arch/ppc/mach-mpc5xxx/Kconfig     |   54 +++++++++++++++++++++++++++++++++++++
 3 files changed, 65 insertions(+), 36 deletions(-)

diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig
index 4c7b7cd..cd561b1 100644
--- a/arch/ppc/Kconfig
+++ b/arch/ppc/Kconfig
@@ -1,53 +1,26 @@
-
-config BOARDINFO
-	default "Phytec Phycore mpc5200b tiny" if MACH_PHYCORE_MPC5200B_TINY
-	
-config ARCH_TEXT_BASE
-	hex
-	default 0x00000000 if RELOCATABLE
-	default 0x01000000 if MACH_PHYCORE_MPC5200B_TINY
-
 config PPC
 	bool
 	select HAVE_CONFIGURABLE_TEXT_BASE
 	select HAS_KALLSYMS
 	select HAS_MODULES
 	select HAVE_CONFIGURABLE_MEMORY_LAYOUT
-	select HAVE_CONFIGURABLE_TEXT_BASE
 	default y
 
-# Uh, we should decide which one we want to use
-config ARCH_MPC5200
-	bool
-
-config MPC5200
-	bool
-
-config MPC5xxx
-	bool
+menu "Architecture Type"
 
-config CACHELINE_SIZE
-	int
-	default 32 if ARCH_MPC5200
+choice
+	prompt "PPC Architecture type"
 
-config HAS_REGINFO
-	bool
-	default y if ARCH_MPC5200
+config ARCH_MPC8XXX
+	bool "Freescale MPC85xx"
 
-choice
-	prompt "Select your board"
+config ARCH_MPC5XXX
+	bool "Freescale MPC5xxx"
 
-config MACH_PHYCORE_MPC5200B_TINY
-	bool "Phycore mpc5200b tiny"
-	select ARCH_MPC5200
-	select MPC5200
-	select MPC5xxx
-	select HAS_CFI
-	help
-	  Say Y here if you are using the Phytec Phycore MPC5200B Tiny
-	  board aka pcm030
 endchoice
 
+endmenu
+
 source arch/ppc/mach-mpc5xxx/Kconfig
 source common/Kconfig
 source commands/Kconfig
diff --git a/arch/ppc/configs/pcm030_defconfig b/arch/ppc/configs/pcm030_defconfig
index 6016076..5488c44 100644
--- a/arch/ppc/configs/pcm030_defconfig
+++ b/arch/ppc/configs/pcm030_defconfig
@@ -17,6 +17,8 @@ CONFIG_NET=y
 CONFIG_NET_DHCP=y
 CONFIG_NET_PING=y
 CONFIG_NET_TFTP=y
+CONFIG_ARCH_MPC5XXX=y
+CONFIG_MACH_PHYCORE_MPC5200B_TINY=y
 CONFIG_DRIVER_NET_MPC5200=y
 CONFIG_DRIVER_CFI=y
 CONFIG_FS_CRAMFS=y
diff --git a/arch/ppc/mach-mpc5xxx/Kconfig b/arch/ppc/mach-mpc5xxx/Kconfig
index 632fb85..088d07e 100644
--- a/arch/ppc/mach-mpc5xxx/Kconfig
+++ b/arch/ppc/mach-mpc5xxx/Kconfig
@@ -1,3 +1,55 @@
+if ARCH_MPC5XXX
+
+config CLOCKSOURCE_MASK
+	int
+	default 32
+
+config CLOCKSOURCE_SHIFT
+	int
+	default 15
+
+config BOARDINFO
+	default "Phytec Phycore mpc5200b tiny" if MACH_PHYCORE_MPC5200B_TINY
+
+config ARCH_TEXT_BASE
+	hex
+	default 0x00000000 if RELOCATABLE
+	default 0x01000000 if MACH_PHYCORE_MPC5200B_TINY
+
+config HAS_REGINFO
+	bool
+	default y if ARCH_MPC5200
+
+config CACHELINE_SIZE
+	int
+	default 32 if ARCH_MPC5200
+
+choice
+	prompt "Select your board"
+
+config MACH_PHYCORE_MPC5200B_TINY
+	bool "Phycore mpc5200b tiny"
+	select HAS_CFI
+	help
+	  Say Y here if you are using the Phytec Phycore MPC5200B Tiny
+	  board aka pcm030
+endchoice
+
+config MPC5200
+	bool
+	depends on MACH_PHYCORE_MPC5200B_TINY
+	default y
+
+config ARCH_MPC5200
+	bool
+	depends on MACH_PHYCORE_MPC5200B_TINY
+	default y
+
+config MPC5xxx
+	bool
+	depends on MACH_PHYCORE_MPC5200B_TINY
+	default y
+
 menu "Board specific settings       "
 
 config MACH_PHYCORE_MPC5200B_TINY_REV
@@ -10,3 +62,5 @@ config MACH_PHYCORE_MPC5200B_TINY_REV
 	  old board you should set this option to 1
 
 endmenu
+
+endif
-- 
1.7.6.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/2] Make clock shift and mask configurable based on the processor type.
  2011-12-29 11:13 [PATCH 0/2] PPC multiple architecture preparation Renaud Barbier
  2011-12-29 11:13 ` [PATCH 1/2] Preparation stage to support multiple PPC architectures Renaud Barbier
@ 2011-12-29 11:13 ` Renaud Barbier
  2012-01-02 11:31   ` Sascha Hauer
  2012-01-02 11:26 ` [PATCH 0/2] PPC multiple architecture preparation Sascha Hauer
  2 siblings, 1 reply; 6+ messages in thread
From: Renaud Barbier @ 2011-12-29 11:13 UTC (permalink / raw)
  To: s.hauer; +Cc: barebox


Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
---
 arch/ppc/lib/time.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/ppc/lib/time.c b/arch/ppc/lib/time.c
index 04c71df..accc548 100644
--- a/arch/ppc/lib/time.c
+++ b/arch/ppc/lib/time.c
@@ -55,9 +55,9 @@ uint64_t ppc_clocksource_read(void)
 }
 
 static struct clocksource cs = {
-	.read	= ppc_clocksource_read,
-	.mask	= CLOCKSOURCE_MASK(32),
-	.shift	= 15,
+	.read = ppc_clocksource_read,
+	.mask = CLOCKSOURCE_MASK(CONFIG_CLOCKSOURCE_MASK),
+	.shift = CONFIG_CLOCKSOURCE_SHIFT,
 };
 
 static int clocksource_init (void)
-- 
1.7.6.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] PPC multiple architecture preparation
  2011-12-29 11:13 [PATCH 0/2] PPC multiple architecture preparation Renaud Barbier
  2011-12-29 11:13 ` [PATCH 1/2] Preparation stage to support multiple PPC architectures Renaud Barbier
  2011-12-29 11:13 ` [PATCH 2/2] Make clock shift and mask configurable based on the processor type Renaud Barbier
@ 2012-01-02 11:26 ` Sascha Hauer
  2 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2012-01-02 11:26 UTC (permalink / raw)
  To: Renaud Barbier; +Cc: barebox

On Thu, Dec 29, 2011 at 11:13:29AM +0000, Renaud Barbier wrote:
> These patches allow for the future addition of other PPC architectures.
> 
> I am planning on submitting the mpc85xx support quite soon.
> 
> MPC8xxx patches are quite large. How would you like to handle them?

Please just send them to the list, maybe split up into
headerfiles/sourcecode if you hit the list limit. Also It's always
nice to have cleanups first in the series as this is easier to review.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] Preparation stage to support multiple PPC architectures.
  2011-12-29 11:13 ` [PATCH 1/2] Preparation stage to support multiple PPC architectures Renaud Barbier
@ 2012-01-02 11:30   ` Sascha Hauer
  0 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2012-01-02 11:30 UTC (permalink / raw)
  To: Renaud Barbier; +Cc: barebox

On Thu, Dec 29, 2011 at 11:13:30AM +0000, Renaud Barbier wrote:
> diff --git a/arch/ppc/mach-mpc5xxx/Kconfig b/arch/ppc/mach-mpc5xxx/Kconfig
> index 632fb85..088d07e 100644
> --- a/arch/ppc/mach-mpc5xxx/Kconfig
> +++ b/arch/ppc/mach-mpc5xxx/Kconfig
> @@ -1,3 +1,55 @@
> +if ARCH_MPC5XXX
> +
> +config CLOCKSOURCE_MASK
> +	int
> +	default 32
> +
> +config CLOCKSOURCE_SHIFT
> +	int
> +	default 15

Please no kconfig variable for this. It's easier to just have some SoC
specific include file for this. But please let me first see your 8xxx
patches. arch/ppc/lib/time.c has some (currently unused) #ifdefs and it
might be more appropriate to create a time-8xxx.c (and moving time.c to
time-mpc5200.c) instead of ifdeffing a 75 line file.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] Make clock shift and mask configurable based on the processor type.
  2011-12-29 11:13 ` [PATCH 2/2] Make clock shift and mask configurable based on the processor type Renaud Barbier
@ 2012-01-02 11:31   ` Sascha Hauer
  0 siblings, 0 replies; 6+ messages in thread
From: Sascha Hauer @ 2012-01-02 11:31 UTC (permalink / raw)
  To: Renaud Barbier; +Cc: barebox

On Thu, Dec 29, 2011 at 11:13:31AM +0000, Renaud Barbier wrote:
> 
> Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
> ---
>  arch/ppc/lib/time.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/ppc/lib/time.c b/arch/ppc/lib/time.c
> index 04c71df..accc548 100644
> --- a/arch/ppc/lib/time.c
> +++ b/arch/ppc/lib/time.c
> @@ -55,9 +55,9 @@ uint64_t ppc_clocksource_read(void)
>  }
>  
>  static struct clocksource cs = {
> -	.read	= ppc_clocksource_read,
> -	.mask	= CLOCKSOURCE_MASK(32),
> -	.shift	= 15,
> +	.read = ppc_clocksource_read,
> +	.mask = CLOCKSOURCE_MASK(CONFIG_CLOCKSOURCE_MASK),
> +	.shift = CONFIG_CLOCKSOURCE_SHIFT,

We have clocks_calc_mult_shift to calculate both mult and shift. This
is currently unused, but it might be the moment to start using it.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-01-02 11:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-29 11:13 [PATCH 0/2] PPC multiple architecture preparation Renaud Barbier
2011-12-29 11:13 ` [PATCH 1/2] Preparation stage to support multiple PPC architectures Renaud Barbier
2012-01-02 11:30   ` Sascha Hauer
2011-12-29 11:13 ` [PATCH 2/2] Make clock shift and mask configurable based on the processor type Renaud Barbier
2012-01-02 11:31   ` Sascha Hauer
2012-01-02 11:26 ` [PATCH 0/2] PPC multiple architecture preparation Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox