Skip to contentSkip to conversation

4xx patch series for 2.6.24

PATCH In review Josh Boyer 5 participants 43 messages Aug 3, 2007 – Aug 8, 2007

Subsystems (3)
lore
Share & tools
lore

Josh Boyer

author
#0 lore raw

cover 4xx patch series for 2.6.24

Here are the current 4xx patches I'd like to get in to 2.6.24. They include some initial cleanups for 40x support as well as the AMCC Bamboo board support.

If we can get Bamboo merged, that will make it much easier for Sequoia (440EPx) and Rainer (440GRx) to follow on.

Also, I've started a git tree for 4xx work. It contains these patches on the for-2.6.24 branch. If you do

git pull \
git://git.infradead.org/users/jwboyer/powerpc.git for-2.6.24

You should get this entire series. It is currently based off of Paul's latest tree.

josh

author
#1 lore raw

PATCH 1/10 Rename 4xx paths to 40x

4xx is a bit of a misnomer for certain things, as they really apply to PowerPC 40x only. Rename some of the files to clean this up.

---
 arch/powerpc/Makefile               |    2 
 arch/powerpc/kernel/Makefile        |    2 
 arch/powerpc/kernel/head_40x.S      | 1021 ++++++++++++++++++++++++++++++++++++
 arch/powerpc/kernel/head_4xx.S      | 1021 ------------------------------------
 arch/powerpc/mm/40x_mmu.c           |  135 ++++
 arch/powerpc/mm/4xx_mmu.c           |  135 ----
 arch/powerpc/mm/Makefile            |    2 
 arch/powerpc/platforms/40x/Kconfig  |  208 +++++++
 arch/powerpc/platforms/40x/Makefile |    1 
 arch/powerpc/platforms/4xx/Kconfig  |  208 -------
 arch/powerpc/platforms/4xx/Makefile |    1 
 11 files changed, 1368 insertions(+), 1368 deletions(-)
arch/powerpc/Makefile +1 -1
@@ -123,7 +123,7 @@ CFLAGS += $(cpu-as-y)
 head-y				:= arch/powerpc/kernel/head_32.o
 head-$(CONFIG_PPC64)		:= arch/powerpc/kernel/head_64.o
 head-$(CONFIG_8xx)		:= arch/powerpc/kernel/head_8xx.o
-head-$(CONFIG_4xx)		:= arch/powerpc/kernel/head_4xx.o
+head-$(CONFIG_40x)		:= arch/powerpc/kernel/head_40x.o
 head-$(CONFIG_44x)		:= arch/powerpc/kernel/head_44x.o
 head-$(CONFIG_FSL_BOOKE)	:= arch/powerpc/kernel/head_fsl_booke.o
 
arch/powerpc/kernel/Makefile +1 -1
@@ -46,7 +46,7 @@ ifeq ($(CONFIG_PPC_MERGE),y)
 
 extra-$(CONFIG_PPC_STD_MMU)	:= head_32.o
 extra-$(CONFIG_PPC64)		:= head_64.o
-extra-$(CONFIG_40x)		:= head_4xx.o
+extra-$(CONFIG_40x)		:= head_40x.o
 extra-$(CONFIG_44x)		:= head_44x.o
 extra-$(CONFIG_FSL_BOOKE)	:= head_fsl_booke.o
 extra-$(CONFIG_8xx)		:= head_8xx.o
arch/powerpc/kernel/head_40x.S new file +1021 -0

1,021 lines not on this page · raw message

arch/powerpc/kernel/head_4xx.S deleted +0 -1021

1,021 lines not on this page · raw message

arch/powerpc/mm/40x_mmu.c new file +135 -0

135 lines not on this page · raw message

arch/powerpc/mm/4xx_mmu.c deleted +0 -135

135 lines not on this page · raw message

arch/powerpc/mm/Makefile +1 -1
@@ -13,7 +13,7 @@ obj-$(CONFIG_PPC64)		+= init_64.o pgtabl
 				   hash_utils_64.o hash_low_64.o tlb_64.o \
 				   slb_low.o slb.o stab.o mmap.o $(hash-y)
 obj-$(CONFIG_PPC_STD_MMU_32)	+= ppc_mmu_32.o hash_low_32.o tlb_32.o
-obj-$(CONFIG_40x)		+= 4xx_mmu.o
+obj-$(CONFIG_40x)		+= 40x_mmu.o
 obj-$(CONFIG_44x)		+= 44x_mmu.o
 obj-$(CONFIG_FSL_BOOKE)		+= fsl_booke_mmu.o
 obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o
arch/powerpc/platforms/40x/Kconfig new file +208 -0

208 lines not on this page · raw message

arch/powerpc/platforms/40x/Makefile new file +1 -0
@@ -0,0 +1 @@
+# empty makefile so make clean works
\ No newline at end of file
arch/powerpc/platforms/4xx/Kconfig deleted +0 -208

208 lines not on this page · raw message

arch/powerpc/platforms/4xx/Makefile deleted +0 -1
@@ -1 +0,0 @@
-# empty makefile so make clean works
\ No newline at end of file
author
#2 lore raw

PATCH 2/10 4xx Kconfig cleanup

In reply to Josh Boyer

Remove some leftover cruft in the 40x Kconfig file. Also make sure we select WANT_DEVICE_TREE for 40x.

---
 arch/powerpc/platforms/40x/Kconfig     |   77 ---------------------------------
 arch/powerpc/platforms/Kconfig.cputype |    1 
 2 files changed, 1 insertion(+), 77 deletions(-)
arch/powerpc/platforms/40x/Kconfig +0 -77
@@ -1,16 +1,3 @@
-config 4xx
-	bool
-	depends on 40x || 44x
-	default y
-
-config BOOKE
-	bool
-	depends on 44x
-	default y
-
-menu "AMCC 40x options"
-	depends on 40x
-
 #config BUBINGA
 #	bool "Bubinga"
 #	depends on 40x
@@ -82,8 +69,6 @@ menu "AMCC 40x options"
 #	help
 #	  This option enables support for the Xilinx ML300 evaluation board.
 
-endmenu
-
 # 40x specific CPU modules, selected based on the board above.
 config NP405H
 	bool
@@ -126,68 +111,6 @@ config IBM405_ERR77
 config IBM405_ERR51
 	bool
 
-menu "AMCC 44x options"
-	depends on 44x
-
-#config BAMBOO
-#	bool "Bamboo"
-#	depends on 44x
-#	default n
-#	select 440EP
-#	help
-#	  This option enables support for the IBM PPC440EP evaluation board.
-
-config EBONY
-	bool "Ebony"
-	depends on 44x
-	default y
-	select 440GP
-	help
-	  This option enables support for the IBM PPC440GP evaluation board.
-
-#config LUAN
-#	bool "Luan"
-#	depends on 44x
-#	default n
-#	select 440SP
-#	help
-#	  This option enables support for the IBM PPC440SP evaluation board.
-
-#config OCOTEA
-#	bool "Ocotea"
-#	depends on 44x
-#	default n
-#	select 440GX
-#	help
-#	  This option enables support for the IBM PPC440GX evaluation board.
-
-endmenu
-
-# 44x specific CPU modules, selected based on the board above.
-config 440EP
-	bool
-	select PPC_FPU
-	select IBM440EP_ERR42
-
-config 440GP
-	bool
-	select IBM_NEW_EMAC_ZMII
-
-config 440GX
-	bool
-
-config 440SP
-	bool
-
-config 440A
-	bool
-	depends on 440GX
-	default y
-
-# 44x errata/workaround config symbols, selected by the CPU models above
-config IBM440EP_ERR42
-	bool
-
 #config XILINX_OCP
 #	bool
 #	depends on XILINX_ML300
arch/powerpc/platforms/Kconfig.cputype +1 -0
@@ -40,6 +40,7 @@ config PPC_8xx
 config 40x
 	bool "AMCC 40x"
 	select PPC_DCR_NATIVE
+	select WANT_DEVICE_TREE
 
 config 44x
 	bool "AMCC 44x"
#3 lore raw

Re: [patch 02/10] 4xx Kconfig cleanup

Quoted 13 lines · Josh Boyer

Remove some leftover cruft in the 40x Kconfig file. Also make sure we select WANT_DEVICE_TREE for 40x.

---
 arch/powerpc/platforms/40x/Kconfig     |   77 ---------------------------------
 arch/powerpc/platforms/Kconfig.cputype |    1 
 2 files changed, 1 insertion(+), 77 deletions(-)

arch/powerpc/platforms/40x/Kconfig line 4

Quoted 4 lines
arch/powerpc/platforms/40x/Kconfig +0 -4
@@ -1,16 +1,3 @@
-config 4xx
-	bool
-	depends on 40x || 44x
-	default y

You've removed this one, but I don't see you re-add it anywhere. We still need to define the CONFIG_4xx symbol or things will break..

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
author
#4 lore raw

Re: [patch 02/10] 4xx Kconfig cleanup

Quoted 11 lines · David Gibson
Quoted 10 lines · Josh Boyer

Remove some leftover cruft in the 40x Kconfig file. Also make sure we select WANT_DEVICE_TREE for 40x.

---
 arch/powerpc/platforms/40x/Kconfig     |   77 ---------------------------------
 arch/powerpc/platforms/Kconfig.cputype |    1 
 2 files changed, 1 insertion(+), 77 deletions(-)
Quoted 10 lines

arch/powerpc/platforms/40x/Kconfig line 4

Quoted 7 lines
arch/powerpc/platforms/40x/Kconfig +0 -4
@@ -1,16 +1,3 @@
-config 4xx
-	bool
-	depends on 40x || 44x
-	default y

You've removed this one, but I don't see you re-add it anywhere. We still need to define the CONFIG_4xx symbol or things will break..

I don't need to re-add it. It's already in

arch/powerpc/platforms/Kconfig.cputype

josh

Acked-by
#5 lore raw

Re: [patch 02/10] 4xx Kconfig cleanup

Quoted 23 lines · Josh Boyer
Quoted 11 lines · David Gibson
Quoted 10 lines · Josh Boyer

Remove some leftover cruft in the 40x Kconfig file. Also make sure we select WANT_DEVICE_TREE for 40x.

---
 arch/powerpc/platforms/40x/Kconfig     |   77 ---------------------------------
 arch/powerpc/platforms/Kconfig.cputype |    1 
 2 files changed, 1 insertion(+), 77 deletions(-)
Quoted 10 lines

arch/powerpc/platforms/40x/Kconfig line 4

Quoted 7 lines
arch/powerpc/platforms/40x/Kconfig +0 -4
@@ -1,16 +1,3 @@
-config 4xx
-	bool
-	depends on 40x || 44x
-	default y

You've removed this one, but I don't see you re-add it anywhere. We still need to define the CONFIG_4xx symbol or things will break..

Quoted 3 lines

I don't need to re-add it. It's already in

arch/powerpc/platforms/Kconfig.cputype

Ah, so it is. Sorry. In that case:

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
author
#6 lore raw

PATCH 3/10 Rename 44x bootwrapper

In reply to Josh Boyer

Rename the 44x.c wrapper file to 4xx.c. This will allow us to add common functions in a single file that can be shared across all of 4xx.

---
 arch/powerpc/boot/44x.c    |   85 ---------------------------------------------
 arch/powerpc/boot/4xx.c    |   85 +++++++++++++++++++++++++++++++++++++++++++++
 arch/powerpc/boot/Makefile |    4 +-
 3 files changed, 87 insertions(+), 87 deletions(-)
arch/powerpc/boot/44x.c deleted +0 -85
@@ -1,85 +0,0 @@
-/*
- * Copyright 2007 David Gibson, IBM Corporation.
- *
- * Based on earlier code:
- *   Matt Porter <[email protected]>
- *   Copyright 2002-2005 MontaVista Software Inc.
- *
- *   Eugene Surovegin <[email protected]> or <[email protected]>
- *   Copyright (c) 2003, 2004 Zultys Technologies
- *
- * 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 option) any later version.
- */
-#include <stddef.h>
-#include "types.h"
-#include "string.h"
-#include "stdio.h"
-#include "ops.h"
-#include "reg.h"
-#include "dcr.h"
-
-/* Read the 44x memory controller to get size of system memory. */
-void ibm44x_fixup_memsize(void)
-{
-	int i;
-	unsigned long memsize, bank_config;
-
-	memsize = 0;
-	for (i = 0; i < ARRAY_SIZE(sdram_bxcr); i++) {
-		mtdcr(DCRN_SDRAM0_CFGADDR, sdram_bxcr[i]);
-		bank_config = mfdcr(DCRN_SDRAM0_CFGDATA);
-
-		if (bank_config & SDRAM_CONFIG_BANK_ENABLE)
-			memsize += SDRAM_CONFIG_BANK_SIZE(bank_config);
-	}
-
-	dt_fixup_memory(0, memsize);
-}
-
-#define SPRN_DBCR0		0x134
-#define   DBCR0_RST_SYSTEM	0x30000000
-
-void ibm44x_dbcr_reset(void)
-{
-	unsigned long tmp;
-
-	asm volatile (
-		"mfspr	%0,%1\n"
-		"oris	%0,%0,%2@h\n"
-		"mtspr	%1,%0"
-		: "=&r"(tmp) : "i"(SPRN_DBCR0), "i"(DBCR0_RST_SYSTEM)
-		);
-
-}
-
-/* Read 4xx EBC bus bridge registers to get mappings of the peripheral
- * banks into the OPB address space */
-void ibm4xx_fixup_ebc_ranges(const char *ebc)
-{
-	void *devp;
-	u32 bxcr;
-	u32 ranges[EBC_NUM_BANKS*4];
-	u32 *p = ranges;
-	int i;
-
-	for (i = 0; i < EBC_NUM_BANKS; i++) {
-		mtdcr(DCRN_EBC0_CFGADDR, EBC_BXCR(i));
-		bxcr = mfdcr(DCRN_EBC0_CFGDATA);
-
-		if ((bxcr & EBC_BXCR_BU) != EBC_BXCR_BU_OFF) {
-			*p++ = i;
-			*p++ = 0;
-			*p++ = bxcr & EBC_BXCR_BAS;
-			*p++ = EBC_BXCR_BANK_SIZE(bxcr);
-		}
-	}
-
-	devp = finddevice(ebc);
-	if (! devp)
-		fatal("Couldn't locate EBC node %s\n\r", ebc);
-
-	setprop(devp, "ranges", ranges, (p - ranges) * sizeof(u32));
-}
arch/powerpc/boot/4xx.c new file +85 -0

85 lines not on this page · raw message

arch/powerpc/boot/Makefile +2 -2
@@ -31,7 +31,7 @@ endif
 
 BOOTCFLAGS	+= -I$(obj) -I$(srctree)/$(obj)
 
-$(obj)/44x.o: BOOTCFLAGS += -mcpu=440
+$(obj)/4xx.o: BOOTCFLAGS += -mcpu=440
 $(obj)/ebony.o: BOOTCFLAGS += -mcpu=440
 
 zlib       := inffast.c inflate.c inftrees.c
@@ -44,7 +44,7 @@ $(addprefix $(obj)/,$(zlib) gunzip_util.
 src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \
 		ns16550.c serial.c simple_alloc.c div64.S util.S \
 		gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \
-		44x.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c
+		4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c
 src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \
 		cuboot-ebony.c treeboot-ebony.c prpmc2800.c \
 		ps3-head.S ps3-hvcall.S ps3.c
Acked-by on v1 3/10
#7 lore raw

Re: [patch 03/10] Rename 44x bootwrapper

Quoted 4 lines · Josh Boyer

Rename the 44x.c wrapper file to 4xx.c. This will allow us to add common functions in a single file that can be shared across all of 4xx.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
author
#8 lore raw

PATCH 4/10 4xx bootwrapper reworks

In reply to Josh Boyer

Make the fixup_memsize function common for all of 4xx as several chips share the same SDRAM controller. Also add functions to reset 40x chips and quiesce the ethernet.

---
 arch/powerpc/boot/44x.h   |    4 ----
 arch/powerpc/boot/4xx.c   |   36 +++++++++++++++++++++++++++++++-----
 arch/powerpc/boot/4xx.h   |   20 ++++++++++++++++++++
 arch/powerpc/boot/dcr.h   |    2 ++
 arch/powerpc/boot/ebony.c |    3 ++-
 5 files changed, 55 insertions(+), 10 deletions(-)
arch/powerpc/boot/44x.h +0 -4
@@ -10,10 +10,6 @@
 #ifndef _PPC_BOOT_44X_H_
 #define _PPC_BOOT_44X_H_
 
-void ibm44x_fixup_memsize(void);
-void ibm4xx_fixup_ebc_ranges(const char *ebc);
-
-void ibm44x_dbcr_reset(void);
 void ebony_init(void *mac0, void *mac1);
 
 #endif /* _PPC_BOOT_44X_H_ */
arch/powerpc/boot/4xx.c +31 -5
@@ -21,8 +21,8 @@
 #include "reg.h"
 #include "dcr.h"
 
-/* Read the 44x memory controller to get size of system memory. */
-void ibm44x_fixup_memsize(void)
+/* Read the 4xx SDRAM controller to get size of system memory. */
+void ibm4xx_fixup_memsize(void)
 {
 	int i;
 	unsigned long memsize, bank_config;
@@ -39,22 +39,48 @@ void ibm44x_fixup_memsize(void)
 	dt_fixup_memory(0, memsize);
 }
 
-#define SPRN_DBCR0		0x134
-#define   DBCR0_RST_SYSTEM	0x30000000
+#define DBCR0_RST_SYSTEM 0x30000000
 
 void ibm44x_dbcr_reset(void)
 {
 	unsigned long tmp;
 
+	/* DBCR0 on 44x is SPRN 0x134 */
 	asm volatile (
 		"mfspr	%0,%1\n"
 		"oris	%0,%0,%2@h\n"
 		"mtspr	%1,%0"
-		: "=&r"(tmp) : "i"(SPRN_DBCR0), "i"(DBCR0_RST_SYSTEM)
+		: "=&r"(tmp) : "i"(0x134), "i"(DBCR0_RST_SYSTEM)
 		);
 
 }
 
+void ibm40x_dbcr_reset(void)
+{
+	unsigned long tmp;
+
+	/* DBCR0 on 40x is SPRN 0x3F2 */
+	asm volatile (
+		"mfspr	%0,%1\n"
+		"oris	%0,%0,%2@h\n"
+		"mtspr	%1,%0"
+		: "=&r"(tmp) : "i"(0x3F2), "i"(DBCR0_RST_SYSTEM)
+		);
+}
+
+#define EMAC_RESET 0x20000000
+#define MAL_RESET 0x80000000
+void ibm4xx_quiesce_eth(u32 *emac0, u32 *emac1)
+{
+	/* Quiesce the MAL and EMAC(s) since PIBS/OpenBIOS don't do this for us */
+	if (emac0)
+		*emac0 = EMAC_RESET;
+	if (emac1)
+		*emac1 = EMAC_RESET;
+
+	mtdcr(DCRN_MAL0_CFG, MAL_RESET);
+}
+
 /* Read 4xx EBC bus bridge registers to get mappings of the peripheral
  * banks into the OPB address space */
 void ibm4xx_fixup_ebc_ranges(const char *ebc)
arch/powerpc/boot/4xx.h new file +20 -0
@@ -0,0 +1,20 @@
+/*
+ * PowerPC 4xx related functions
+ *
+ * Copyright 2007 IBM Corporation.
+ * Josh Boyer <[email protected]>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed "as is" without any
+ * warranty of any kind, whether express or implied.
+ */
+#ifndef _POWERPC_BOOT_4XX_H_
+#define _POWERPC_BOOT_4XX_H_
+
+void ibm4xx_fixup_memsize(void);
+void ibm44x_dbcr_reset(void);
+void ibm40x_dbcr_reset(void);
+void ibm4xx_quiesce_eth(u32 *emac0, u32 *emac1);
+void ibm4xx_fixup_ebc_ranges(const char *ebc);
+
+#endif /* _POWERPC_BOOT_4XX_H_ */
arch/powerpc/boot/dcr.h +2 -0
@@ -121,4 +121,6 @@ static const unsigned long sdram_bxcr[] 
 #define DCRN_CPC0_MIRQ1					0x0ed
 #define DCRN_CPC0_JTAGID				0x0ef
 
+#define DCRN_MAL0_CFG					0x180
+
 #endif	/* _PPC_BOOT_DCR_H_ */
arch/powerpc/boot/ebony.c +2 -1
@@ -25,6 +25,7 @@
 #include "ops.h"
 #include "reg.h"
 #include "dcr.h"
+#include "4xx.h"
 #include "44x.h"
 
 extern char _dtb_start[];
@@ -98,7 +99,7 @@ static void ebony_fixups(void)
 	unsigned long sysclk = 33000000;
 
 	ibm440gp_fixup_clocks(sysclk, 6 * 1843200);
-	ibm44x_fixup_memsize();
+	ibm4xx_fixup_memsize();
 	dt_fixup_mac_addresses(ebony_mac0, ebony_mac1);
 	ibm4xx_fixup_ebc_ranges("/plb/opb/ebc");
 }
#9 lore raw

Re: [patch 04/10] 4xx bootwrapper reworks

Quoted 41 lines · Josh Boyer

Make the fixup_memsize function common for all of 4xx as several chips share the same SDRAM controller. Also add functions to reset 40x chips and quiesce the ethernet.

---
 arch/powerpc/boot/44x.h   |    4 ----
 arch/powerpc/boot/4xx.c   |   36 +++++++++++++++++++++++++++++++-----
 arch/powerpc/boot/4xx.h   |   20 ++++++++++++++++++++
 arch/powerpc/boot/dcr.h   |    2 ++
 arch/powerpc/boot/ebony.c |    3 ++-
 5 files changed, 55 insertions(+), 10 deletions(-)
arch/powerpc/boot/44x.h +0 -4
@@ -10,10 +10,6 @@
 #ifndef _PPC_BOOT_44X_H_
 #define _PPC_BOOT_44X_H_
 
-void ibm44x_fixup_memsize(void);
-void ibm4xx_fixup_ebc_ranges(const char *ebc);
-
-void ibm44x_dbcr_reset(void);
 void ebony_init(void *mac0, void *mac1);
 
 #endif /* _PPC_BOOT_44X_H_ */
arch/powerpc/boot/4xx.c +2 -2
@@ -21,8 +21,8 @@
 #include "reg.h"
 #include "dcr.h"
 
-/* Read the 44x memory controller to get size of system memory. */
-void ibm44x_fixup_memsize(void)
+/* Read the 4xx SDRAM controller to get size of system memory. */
+void ibm4xx_fixup_memsize(void)
 {
 	int i;
 	unsigned long memsize, bank_config;

arch/powerpc/boot/4xx.c void ibm44x_fixup_memsize(void) · line 42

Quoted 6 lines
arch/powerpc/boot/4xx.c +1 -2
@@ -39,22 +39,48 @@ void ibm44x_fixup_memsize(void)
 	dt_fixup_memory(0, memsize);
 }
 
-#define SPRN_DBCR0		0x134
-#define   DBCR0_RST_SYSTEM	0x30000000
+#define DBCR0_RST_SYSTEM 0x30000000

Rather than just removing these defines and using hardcoded values, I'd prefer to see separate SPRN_DBCR0_40X and SPRN_DBCR0_44X defines.

[snip]

arch/powerpc/boot/4xx.c void ibm44x_fixup_memsize(void) · line 72

Quoted 2 lines
arch/powerpc/boot/4xx.c +2 -0
+#define EMAC_RESET 0x20000000
+#define MAL_RESET 0x80000000

I think the MAL_RESET definition should go in the same place as the DCR number definition.

arch/powerpc/boot/4xx.c void ibm44x_fixup_memsize(void) · line 74

Quoted 2 lines
arch/powerpc/boot/4xx.c +2 -0
+void ibm4xx_quiesce_eth(u32 *emac0, u32 *emac1)
+{

As I think I said before, I'm not really happy with this being hardcoded assuming exactly 2 ethernets.

Quoted 8 lines
arch/powerpc/boot/4xx.c +8 -0
+	/* Quiesce the MAL and EMAC(s) since PIBS/OpenBIOS don't do this for us */
+	if (emac0)
+		*emac0 = EMAC_RESET;
+	if (emac1)
+		*emac1 = EMAC_RESET;
+
+	mtdcr(DCRN_MAL0_CFG, MAL_RESET);
+}

[snip]

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
author
#10 lore raw

Re: [patch 04/10] 4xx bootwrapper reworks

Quoted 7 lines · David Gibson

arch/powerpc/boot/4xx.c void ibm44x_fixup_memsize(void) · line 42

Quoted 3 lines · Josh Boyer
arch/powerpc/boot/4xx.c +1 -2
-#define SPRN_DBCR0		0x134
-#define   DBCR0_RST_SYSTEM	0x30000000
+#define DBCR0_RST_SYSTEM 0x30000000

Rather than just removing these defines and using hardcoded values, I'd prefer to see separate SPRN_DBCR0_40X and SPRN_DBCR0_44X defines.

Ok. And place them where? In the same file since they aren't DCR defines? Seems fairly trivial, but ok.

Quoted 6 lines

[snip]

arch/powerpc/boot/4xx.c void ibm44x_fixup_memsize(void) · line 72

Quoted 2 lines
arch/powerpc/boot/4xx.c +2 -0
+#define EMAC_RESET 0x20000000
+#define MAL_RESET 0x80000000

I think the MAL_RESET definition should go in the same place as the DCR number definition.

Ok. Trivial.

Quoted 2 lines

As I think I said before, I'm not really happy with this being hardcoded assuming exactly 2 ethernets.

Well, it's hardcoded to assume one or two. I know of only one board that has more than two EMACs. I was hoping we could get this in for 2.6.24 as-is and change it when needs be. But I'll look at making it var-args or similar.

josh

#11 lore raw

Re: [patch 04/10] 4xx bootwrapper reworks

Quoted 11 lines · Josh Boyer
Quoted 7 lines · David Gibson

arch/powerpc/boot/4xx.c void ibm44x_fixup_memsize(void) · line 42

Quoted 3 lines · Josh Boyer
arch/powerpc/boot/4xx.c +1 -2
-#define SPRN_DBCR0		0x134
-#define   DBCR0_RST_SYSTEM	0x30000000
+#define DBCR0_RST_SYSTEM 0x30000000

Rather than just removing these defines and using hardcoded values, I'd prefer to see separate SPRN_DBCR0_40X and SPRN_DBCR0_44X defines.

Ok. And place them where? In the same file since they aren't DCR defines? Seems fairly trivial, but ok.

Just where the old 44x specific define was. And yes, it is fairly trivial.

Quoted 8 lines
Quoted 6 lines

[snip]

arch/powerpc/boot/4xx.c void ibm44x_fixup_memsize(void) · line 72

Quoted 2 lines
arch/powerpc/boot/4xx.c +2 -0
+#define EMAC_RESET 0x20000000
+#define MAL_RESET 0x80000000

I think the MAL_RESET definition should go in the same place as the DCR number definition.

Ok. Trivial.

Yes.

Quoted 13 lines
Quoted 2 lines

As I think I said before, I'm not really happy with this being hardcoded assuming exactly 2 ethernets.

Well, it's hardcoded to assume one or two. I know of only one board that has more than two EMACs. I was hoping we could get this in for 2.6.24 as-is and change it when needs be. But I'll look at making it var-args or similar.

josh
_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
author
#12 lore raw

Re: [patch 04/10] 4xx bootwrapper reworks

Quoted 8 lines · On Tue, 7 Aug 2007 13:05:47 +1000 David Gibson <[email protected]> wrote:
Quoted 5 lines
Quoted 2 lines

Rather than just removing these defines and using hardcoded values, I'd prefer to see separate SPRN_DBCR0_40X and SPRN_DBCR0_44X defines.

Ok. And place them where? In the same file since they aren't DCR defines? Seems fairly trivial, but ok.

Just where the old 44x specific define was. And yes, it is fairly trivial.

Fixed.

Quoted 10 lines
Quoted 8 lines
Quoted 6 lines

[snip]

arch/powerpc/boot/4xx.c void ibm44x_fixup_memsize(void) · line 72

Quoted 2 lines
arch/powerpc/boot/4xx.c +2 -0
+#define EMAC_RESET 0x20000000
+#define MAL_RESET 0x80000000

I think the MAL_RESET definition should go in the same place as the DCR number definition.

Ok. Trivial.

Yes.

Fixed.

Quoted 6 lines
Quoted 6 lines
Quoted 2 lines

As I think I said before, I'm not really happy with this being hardcoded assuming exactly 2 ethernets.

Well, it's hardcoded to assume one or two. I know of only one board that has more than two EMACs. I was hoping we could get this in for 2.6.24 as-is and change it when needs be. But I'll look at making it var-args or similar.

I'm going to hold off on this for now. I'm not disagreeing with you, but there are no upcoming board ports that have more than two EMACs so I'd like to focus on getting Bamboo (440EP) and Sequoia (440EPx) in-tree first. Perhaps even Walnut, if there's time.

josh

#13 lore raw

Re: [patch 04/10] 4xx bootwrapper reworks

Quoted 30 lines · Josh Boyer
Quoted 8 lines · On Tue, 7 Aug 2007 13:05:47 +1000 David Gibson <[email protected]> wrote:
Quoted 5 lines
Quoted 2 lines

Rather than just removing these defines and using hardcoded values, I'd prefer to see separate SPRN_DBCR0_40X and SPRN_DBCR0_44X defines.

Ok. And place them where? In the same file since they aren't DCR defines? Seems fairly trivial, but ok.

Just where the old 44x specific define was. And yes, it is fairly trivial.

Fixed.

Quoted 10 lines
Quoted 8 lines
Quoted 6 lines

[snip]

arch/powerpc/boot/4xx.c void ibm44x_fixup_memsize(void) · line 72

Quoted 2 lines
arch/powerpc/boot/4xx.c +2 -0
+#define EMAC_RESET 0x20000000
+#define MAL_RESET 0x80000000

I think the MAL_RESET definition should go in the same place as the DCR number definition.

Ok. Trivial.

Yes.

Fixed.

Quoted 3 lines
Quoted 3 lines
Quoted 2 lines

As I think I said before, I'm not really happy with this being hardcoded assuming exactly 2 ethernets.

Quoted 8 lines
Quoted 3 lines
Quoted 3 lines

Well, it's hardcoded to assume one or two. I know of only one board that has more than two EMACs. I was hoping we could get this in for 2.6.24 as-is and change it when needs be. But I'll look at making it var-args or similar.

I'm going to hold off on this for now. I'm not disagreeing with you, but there are no upcoming board ports that have more than two EMACs so I'd like to focus on getting Bamboo (440EP) and Sequoia (440EPx) in-tree first. Perhaps even Walnut, if there's time.

Fair enough.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
author
#14 lore raw

PATCH 5/10 40x MMU

In reply to Josh Boyer

Add MMU definitions for 40x platforms. Also fixes two warnings in 40x_mmu.c.

---
 arch/powerpc/kernel/head_40x.S |    2 -
 arch/powerpc/mm/40x_mmu.c      |    4 +-
 include/asm-powerpc/mmu-40x.h  |   65 +++++++++++++++++++++++++++++++++++++++++
 include/asm-powerpc/mmu.h      |    3 +
 4 files changed, 71 insertions(+), 3 deletions(-)
include/asm-powerpc/mmu-40x.h new file +65 -0
@@ -0,0 +1,65 @@
+#ifndef _ASM_POWERPC_MMU_40X_H_
+#define _ASM_POWERPC_MMU_40X_H_
+
+/*
+ * PPC40x support
+ */
+
+#define PPC40X_TLB_SIZE 64
+
+/*
+ * TLB entries are defined by a "high" tag portion and a "low" data
+ * portion.  On all architectures, the data portion is 32-bits.
+ *
+ * TLB entries are managed entirely under software control by reading,
+ * writing, and searchoing using the 4xx-specific tlbre, tlbwr, and tlbsx
+ * instructions.
+ */
+
+#define	TLB_LO          1
+#define	TLB_HI          0
+
+#define	TLB_DATA        TLB_LO
+#define	TLB_TAG         TLB_HI
+
+/* Tag portion */
+
+#define TLB_EPN_MASK    0xFFFFFC00      /* Effective Page Number */
+#define TLB_PAGESZ_MASK 0x00000380
+#define TLB_PAGESZ(x)   (((x) & 0x7) << 7)
+#define   PAGESZ_1K		0
+#define   PAGESZ_4K             1
+#define   PAGESZ_16K            2
+#define   PAGESZ_64K            3
+#define   PAGESZ_256K           4
+#define   PAGESZ_1M             5
+#define   PAGESZ_4M             6
+#define   PAGESZ_16M            7
+#define TLB_VALID       0x00000040      /* Entry is valid */
+
+/* Data portion */
+
+#define TLB_RPN_MASK    0xFFFFFC00      /* Real Page Number */
+#define TLB_PERM_MASK   0x00000300
+#define TLB_EX          0x00000200      /* Instruction execution allowed */
+#define TLB_WR          0x00000100      /* Writes permitted */
+#define TLB_ZSEL_MASK   0x000000F0
+#define TLB_ZSEL(x)     (((x) & 0xF) << 4)
+#define TLB_ATTR_MASK   0x0000000F
+#define TLB_W           0x00000008      /* Caching is write-through */
+#define TLB_I           0x00000004      /* Caching is inhibited */
+#define TLB_M           0x00000002      /* Memory is coherent */
+#define TLB_G           0x00000001      /* Memory is guarded from prefetch */
+
+#ifndef __ASSEMBLY__
+
+typedef unsigned long phys_addr_t;
+
+typedef struct {
+	unsigned long id;
+	unsigned long vdso_base;
+} mm_context_t;
+
+#endif /* !__ASSEMBLY__ */
+
+#endif /* _ASM_POWERPC_MMU_40X_H_ */
include/asm-powerpc/mmu.h +3 -0
@@ -8,6 +8,9 @@
 #elif defined(CONFIG_PPC_STD_MMU)
 /* 32-bit classic hash table MMU */
 #  include <asm/mmu-hash32.h>
+#elif defined(CONFIG_40x)
+/* 40x-style software loaded TLB */
+#  include <asm/mmu-40x.h>
 #elif defined(CONFIG_44x)
 /* 44x-style software loaded TLB */
 #  include <asm/mmu-44x.h>
arch/powerpc/mm/40x_mmu.c +2 -2
@@ -108,7 +108,7 @@ unsigned long __init mmu_mapin_ram(void)
 		pmd_t *pmdp;
 		unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE;
 
-		pmdp = pmd_offset(pgd_offset_k(v), v);
+		pmdp = pmd_offset(pud_offset(pgd_offset_k(v), v), v);
 		pmd_val(*pmdp++) = val;
 		pmd_val(*pmdp++) = val;
 		pmd_val(*pmdp++) = val;
@@ -123,7 +123,7 @@ unsigned long __init mmu_mapin_ram(void)
 		pmd_t *pmdp;
 		unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE;
 
-		pmdp = pmd_offset(pgd_offset_k(v), v);
+		pmdp = pmd_offset(pud_offset(pgd_offset_k(v), v), v);
 		pmd_val(*pmdp) = val;
 
 		v += LARGE_PAGE_SIZE_4M;
arch/powerpc/kernel/head_40x.S +1 -1
@@ -772,7 +772,7 @@ finish_tlb_load:
 	*/
 	lwz	r9, tlb_4xx_index@l(0)
 	addi	r9, r9, 1
-	andi.	r9, r9, (PPC4XX_TLB_SIZE-1)
+	andi.	r9, r9, (PPC40X_TLB_SIZE-1)
 	stw	r9, tlb_4xx_index@l(0)
 
 6:
Acked-by on v1 5/10
#15 lore raw

Re: [patch 05/10] 40x MMU

Quoted 3 lines · Josh Boyer

Add MMU definitions for 40x platforms. Also fixes two warnings in 40x_mmu.c.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
author
#16 lore raw

PATCH 6/10 40x decrementer fixes

In reply to Josh Boyer

Allow generic_calibrate_decr to work for 40x platforms. Given that the hardware behavior is identical, this also changes the set_dec function to reload the PIT on 40x to match the behavior 44x currently has.

---
 arch/powerpc/kernel/time.c |    2 +-
 include/asm-powerpc/time.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/kernel/time.c +1 -1
@@ -867,7 +867,7 @@ void __init generic_calibrate_decr(void)
 				"(not found)\n");
 	}
 
-#ifdef CONFIG_BOOKE
+#if defined(CONFIG_BOOKE) || defined(CONFIG_40x)
 	/* Set the time base to zero */
 	mtspr(SPRN_TBWL, 0);
 	mtspr(SPRN_TBWU, 0);
include/asm-powerpc/time.h +1 -1
@@ -174,7 +174,7 @@ static inline unsigned int get_dec(void)
 static inline void set_dec(int val)
 {
 #if defined(CONFIG_40x)
-	return;		/* Have to let it auto-reload */
+	mtspr(SPRN_PIT, val);
 #elif defined(CONFIG_8xx_CPU6)
 	set_dec_cpu6(val);
 #else
#17 lore raw

Re: [patch 06/10] 40x decrementer fixes

Quoted 3 lines · Josh Boyer

Allow generic_calibrate_decr to work for 40x platforms. Given that the hardware behavior is identical, this also changes the set_dec function to reload the PIT on 40x to match the behavior 44x currently has.

Why bother doing this?! This will only warrant you imprecise decrementer
interrupts while it should be interrupting at the precise period currently (if you load PIT once)...

WBR, Sergei

#18 lore raw

Re: [patch 06/10] 40x decrementer fixes

Quoted 2 lines · I wrote:
Quoted 2 lines

Allow generic_calibrate_decr to work for 40x platforms. Given that the hardware behavior is identical, this also changes the set_dec function to reload the PIT

It's not actually identical. When you're writing to the PIT reg on 40x,
you're alos writing to the hidden PIT auto-reload reg. which is not the case for 440 that is true Book E.

Quoted 4 lines
Quoted 1 line

on 40x to match the behavior 44x currently has.

Why bother doing this?! This will only warrant you imprecise decrementer
interrupts while it should be interrupting at the precise period currently (if you load PIT once)...

I.e. the error will only accumulate. NAK.

WBR, Sergei

author
#19 lore raw

Re: [patch 06/10] 40x decrementer fixes

Quoted 8 lines · On Fri, 03 Aug 2007 21:10:19 +0400 Sergei Shtylyov <[email protected]>…
Quoted 2 lines · I wrote:
Quoted 2 lines

Allow generic_calibrate_decr to work for 40x platforms. Given that the hardware behavior is identical, this also changes the set_dec function to reload the PIT

    It's not actually identical. When you're writing to the PIT reg on 40x, 

you're alos writing to the hidden PIT auto-reload reg. which is not the case for 440 that is true Book E.

I said the hardware _behavior_ is identical. On both 440 and 405, if the PIT/DEC counts down to 0 and ARE isn't set, it just doesn't tick anymore. The fact that writing to PIT sets the shadow reload reg on 405 doesn't matter since ARE isn't enabled. The same is true for 440 at the moment, since DECAR is never set.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

on 40x to match the behavior 44x currently has.

Why bother doing this?! This will only warrant you imprecise decrementer
interrupts while it should be interrupting at the precise period currently (if you load PIT once)...

I.e. the error will only accumulate. NAK.

What error exactly? I'm not following you there. If there really is an error, then we can fix it but it seems that it would be common error for both 440 and 405 at the moment.

josh

#20 lore raw

Re: [patch 06/10] 40x decrementer fixes

Quoted 8 lines · Josh Boyer
Quoted 6 lines
Quoted 4 lines
Quoted 1 line

on 40x to match the behavior 44x currently has.

Why bother doing this?! This will only warrant you imprecise decrementer
interrupts while it should be interrupting at the precise period currently (if you load PIT once)...

I.e. the error will only accumulate. NAK.

What error exactly? I'm not following you there. If there really is

I was assuming that the decrementer is in auto-reload mode. Brain fade. :-<

Quoted 1 line

josh

WBR, Sergei

author
#21 lore raw

Re: [patch 06/10] 40x decrementer fixes

Quoted 8 lines · On Fri, 03 Aug 2007 21:30:57 +0400 Sergei Shtylyov <[email protected]>…
Quoted 5 lines · Josh Boyer
Quoted 5 lines
Quoted 5 lines
Quoted 1 line

on 40x to match the behavior 44x currently has.

Why bother doing this?! This will only warrant you imprecise decrementer
interrupts while it should be interrupting at the precise period currently (if you load PIT once)...

Quoted 5 lines
Quoted 3 lines
Quoted 1 line

I.e. the error will only accumulate. NAK.

What error exactly? I'm not following you there. If there really is

I was assuming that the decrementer is in auto-reload mode. Brain fade. :-<

Heh, ok. Glad I wasn't completely lost there :).

josh

#22 lore raw

Re: [patch 06/10] 40x decrementer fixes

Quoted 9 lines · Josh Boyer
Quoted 7 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Why bother doing this?! This will only warrant you imprecise decrementer
interrupts while it should be interrupting at the precise period currently (if you load PIT once)...

I.e. the error will only accumulate. NAK.

What error exactly? I'm not following you there. If there really is

I was assuming that the decrementer is in auto-reload mode. Brain fade. :-<

Heh, ok. Glad I wasn't completely lost there :).

Actually, the current set_dec() which you're fixing made me think so. :-)

Quoted 1 line

josh

WBR, Sergei

#23 lore raw

Re: [patch 06/10] 40x decrementer fixes

In reply to Sergei Shtylyov
Quoted 5 lines · Sergei Shtylyov
Quoted 3 lines

Why bother doing this?! This will only warrant you imprecise decrementer
interrupts while it should be interrupting at the precise period currently (if you load PIT once)...

I.e. the error will only accumulate. NAK.

No, it won't since the timebase is always used as the reference.

Ben.

#24 lore raw

Re: [patch 06/10] 40x decrementer fixes

Hello.

Quoted 6 lines · Benjamin Herrenschmidt
Quoted 4 lines
Quoted 2 lines

Why bother doing this?! This will only warrant you imprecise decrementer
interrupts while it should be interrupting at the precise period currently (if you load PIT once)...

I.e. the error will only accumulate. NAK.

No, it won't since the timebase is always used as the reference.

I meant the error in the interrupt period itself (I know that this gets
accounted for) but that was a thinko anyway...

Quoted 1 line

Ben.

WBR, Sergei

author
#25 lore raw

Re: [patch 06/10] 40x decrementer fixes

In reply to Sergei Shtylyov
Quoted 9 lines · On Fri, 03 Aug 2007 20:47:03 +0400 Sergei Shtylyov <[email protected]>…
Quoted 3 lines · Josh Boyer

Allow generic_calibrate_decr to work for 40x platforms. Given that the hardware behavior is identical, this also changes the set_dec function to reload the PIT on 40x to match the behavior 44x currently has.

Why bother doing this?! This will only warrant you imprecise decrementer
interrupts while it should be interrupting at the precise period currently (if you load PIT once)...

Without some kind of fix, it doesn't function at all. We can load the PIT once, but then we need to make sure ARE is set because if the PIT ticks down to zero it just sits there.

If we want to do that, then fine but it should be common between 40x and 44x. I didn't see much of a reason to differ from what's there today.

josh

#26 lore raw

Re: [patch 06/10] 40x decrementer fixes

Quoted 10 lines · Josh Boyer
Quoted 6 lines
Quoted 3 lines

Allow generic_calibrate_decr to work for 40x platforms. Given that the hardware behavior is identical, this also changes the set_dec function to reload the PIT on 40x to match the behavior 44x currently has.

Why bother doing this?! This will only warrant you imprecise decrementer
interrupts while it should be interrupting at the precise period currently (if you load PIT once)...

Without some kind of fix, it doesn't function at all. We can load the PIT once, but then we need to make sure ARE is set because if the PIT ticks down to zero it just sits there.

Ah, sorry... somehow I thought 40x doesn't have TCR and so only a periodic
mode. :-<

Quoted 1 line

josh

WBR, Sergei

#27 lore raw

Re: [patch 06/10] 40x decrementer fixes

In reply to Sergei Shtylyov
Quoted 9 lines · Sergei Shtylyov
Quoted 3 lines · Josh Boyer

Allow generic_calibrate_decr to work for 40x platforms. Given that the hardware behavior is identical, this also changes the set_dec function to reload the PIT on 40x to match the behavior 44x currently has.

Why bother doing this?! This will only warrant you imprecise decrementer
interrupts while it should be interrupting at the precise period currently (if you load PIT once)...

Because that's what the kernel timekeeping code expects ? The reference time is the timebase and it doesn't drift.

The DEC/PIT is commonly used to trigger any timing, such as what is done for lost interrupts on some platforms. Also, with dynticks, we'll most certainly want variable reload values as well.

So I'm very happy to have Josh change the code that way. It makes things more consistent accross the board and removes confusion.

Ben.

#28 lore raw

Re: [patch 06/10] 40x decrementer fixes

Quoted 7 lines · Benjamin Herrenschmidt
Quoted 6 lines
Quoted 3 lines

Allow generic_calibrate_decr to work for 40x platforms. Given that the hardware behavior is identical, this also changes the set_dec function to reload the PIT on 40x to match the behavior 44x currently has.

Why bother doing this?! This will only warrant you imprecise decrementer
interrupts while it should be interrupting at the precise period currently (if you load PIT once)...

Quoted 6 lines

Because that's what the kernel timekeeping code expects ? The reference time is the timebase and it doesn't drift.

The DEC/PIT is commonly used to trigger any timing, such as what is done for lost interrupts on some platforms. Also, with dynticks, we'll most certainly want variable reload values as well.

That's another matter. :-)
BTW, because of that mere return in set_dec() for the 40x case I had to
write to the PIT myself in the decrementer clockevent's set_next_event() method -- while for classic PPC I was just calling set_dec(n-1)...

Quoted 2 lines

So I'm very happy to have Josh change the code that way. It makes things more consistent accross the board and removes confusion.

Yeah, it's OK now that's my temporary confusion has passed.
Well, it wasn't only not only mine -- the set_dec() code was suggesting
auto-reload mode, and has been obviosuly copied from <asm-ppc/time.h>, so arch/ppc/ was using the auto-reload mode indeed.

Quoted 1 line

Ben.

WBR, Sergei

author
#29 lore raw

PATCH 7/10 Fix 40x build

In reply to Josh Boyer

Remove inclusion of __res on 40x. We don't need it in arch/powerpc

---
 arch/powerpc/kernel/head_40x.S  |    1 -
 arch/powerpc/kernel/ppc_ksyms.c |    2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)
arch/powerpc/kernel/ppc_ksyms.c +1 -1
@@ -180,7 +180,7 @@ EXPORT_SYMBOL(cacheable_memcpy);
 EXPORT_SYMBOL(cpm_install_handler);
 EXPORT_SYMBOL(cpm_free_handler);
 #endif /* CONFIG_8xx */
-#if defined(CONFIG_8xx) || defined(CONFIG_40x)
+#if defined(CONFIG_8xx)
 EXPORT_SYMBOL(__res);
 #endif
 
arch/powerpc/kernel/head_40x.S +0 -1
@@ -35,7 +35,6 @@
 #include <asm/page.h>
 #include <asm/mmu.h>
 #include <asm/pgtable.h>
-#include <asm/ibm4xx.h>
 #include <asm/cputable.h>
 #include <asm/thread_info.h>
 #include <asm/ppc_asm.h>
Acked-by on v1 7/10
#30 lore raw

Re: [patch 07/10] Fix 40x build

Quoted 3 lines · Josh Boyer

Remove inclusion of __res on 40x. We don't need it in arch/powerpc

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
author
#31 lore raw

PATCH 8/10 Bamboo DTS

In reply to Josh Boyer

AMCC Bamboo board DTS

---
 arch/powerpc/boot/dts/bamboo.dts |  248 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 248 insertions(+)
arch/powerpc/boot/dts/bamboo.dts new file +248 -0
@@ -0,0 +1,248 @@
+/*
+ * Device Tree Source for AMCC Bamboo
+ *
+ * Copyright (c) 2006, 2007 IBM Corp.
+ * Josh Boyer <[email protected]>
+ *
+ * FIXME: Draft only!
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed "as is" without
+ * any warranty of any kind, whether express or implied.
+ *
+ * To build:
+ *   dtc -I dts -O asm -o bamboo.S -b 0 bamboo.dts
+ *   dtc -I dts -O dtb -o bamboo.dtb -b 0 bamboo.dts
+ */
+
+/ {
+	#address-cells = <2>;
+	#size-cells = <1>;
+	model = "amcc,bamboo";
+	compatible = "amcc,bamboo";
+	dcr-parent = <&/cpus/PowerPC,440EP@0>;
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		PowerPC,440EP@0 {
+			device_type = "cpu";
+			reg = <0>;
+			clock-frequency = <0>; /* Filled in by zImage */
+			timebase-frequency = <0>; /* Filled in by zImage */
+			i-cache-line-size = <20>;
+			d-cache-line-size = <20>;
+			i-cache-size = <8000>;
+			d-cache-size = <8000>;
+			dcr-controller;
+			dcr-access-method = "native";
+		};
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0 0 0>; /* Filled in by zImage */
+	};
+
+	UIC0: interrupt-controller0 {
+		compatible = "ibm,uic-440gp","ibm,uic";
+		interrupt-controller;
+		cell-index = <0>;
+		dcr-reg = <0c0 009>;
+		#address-cells = <0>;
+		#size-cells = <0>;
+		#interrupt-cells = <2>;
+	};
+
+	UIC1: interrupt-controller1 {
+		compatible = "ibm,uic-440gp","ibm,uic";
+		interrupt-controller;
+		cell-index = <1>;
+		dcr-reg = <0d0 009>;
+		#address-cells = <0>;
+		#size-cells = <0>;
+		#interrupt-cells = <2>;
+		interrupts = <1e 4 1f 4>; /* cascade */
+		interrupt-parent = <&UIC0>;
+	};
+
+	SDR0: sdr {
+		compatible = "ibm,sdr-440ep";
+		dcr-reg = <00e 002>;
+	};
+
+	CPR0: cpr {
+		compatible = "ibm,cpr-440ep";
+		dcr-reg = <00c 002>;
+	};
+
+	plb {
+		compatible = "ibm,plb-440gp", "ibm,plb4";
+		#address-cells = <2>;
+		#size-cells = <1>;
+		ranges;
+		clock-frequency = <0>; /* Filled in by zImage */
+
+		SDRAM0: sdram {
+			compatible = "ibm,sdram-405gp";
+			dcr-reg = <010 2>;
+		};
+
+		DMA0: dma {
+			compatible = "ibm,dma-440gp";
+			dcr-reg = <100 027>;
+		};
+
+		MAL0: mcmal {
+			compatible = "ibm,mcmal-440gp", "ibm,mcmal";
+			dcr-reg = <180 62>;
+			num-tx-chans = <4>;
+			num-rx-chans = <4>;
+			interrupt-parent = <&MAL0>;
+			interrupts = <0 1 2 3 4>;
+			#interrupt-cells = <1>;
+			interrupt-map = </*TXEOB*/ 0 &UIC0 a 4
+					/*RXEOB*/ 1 &UIC0 b 4
+					/*SERR*/  2 &UIC1 0 4
+					/*TXDE*/  3 &UIC1 1 4
+					/*RXDE*/  4 &UIC1 3 4>;
+		};
+
+		POB0: opb {
+		  	compatible = "ibm,opb-440gp", "ibm,opb";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			/* Bamboo is oddball in the 44x world and doesn't use the ERPN
+			 * bits.
+			 */
+		  	ranges = <00000000 0 00000000 80000000
+			          80000000 0 80000000 80000000>;
+		  	interrupt-parent = <&UIC1>;
+		  	interrupts = <7 4>;
+		  	clock-frequency = <0>; /* Filled in by zImage */
+
+			EBC0: ebc {
+				compatible = "ibm,ebc-440gp", "ibm,ebc";
+				dcr-reg = <012 2>;
+				#address-cells = <2>;
+				#size-cells = <1>;
+				clock-frequency = <0>; /* Filled in by zImage */
+				ranges;
+				interrupts = <5 1>;
+				interrupt-parent = <&UIC1>;
+			};
+
+			UART0: serial@ef600300 {
+		   		device_type = "serial";
+		   		compatible = "ns16550";
+		   		reg = <ef600300 8>;
+		   		virtual-reg = <ef600300>;
+		   		clock-frequency = <0>; /* Filled in by zImage */
+		   		current-speed = <1c200>;
+		   		interrupt-parent = <&UIC0>;
+		   		interrupts = <0 4>;
+	   		};
+
+			UART1: serial@ef600400 {
+		   		device_type = "serial";
+		   		compatible = "ns16550";
+		   		reg = <ef600400 8>;
+		   		virtual-reg = <ef600400>;
+		   		clock-frequency = <0>;
+		   		current-speed = <0>;
+		   		interrupt-parent = <&UIC0>;
+		   		interrupts = <1 4>;
+	   		};
+
+			UART2: serial@ef600500 {
+		   		device_type = "serial";
+		   		compatible = "ns16550";
+		   		reg = <ef600500 8>;
+		   		virtual-reg = <ef600500>;
+		   		clock-frequency = <0>;
+		   		current-speed = <0>;
+		   		interrupt-parent = <&UIC0>;
+		   		interrupts = <3 4>;
+	   		};
+
+			UART3: serial@ef600600 {
+		   		device_type = "serial";
+		   		compatible = "ns16550";
+		   		reg = <ef600600 8>;
+		   		virtual-reg = <ef600600>;
+		   		clock-frequency = <0>;
+		   		current-speed = <0>;
+		   		interrupt-parent = <&UIC0>;
+		   		interrupts = <4 4>;
+	   		};
+
+			IIC0: i2c@ef600700 {
+				device_type = "i2c";
+				compatible = "ibm,iic-440gp", "ibm,iic";
+				reg = <ef600700 14>;
+				interrupt-parent = <&UIC0>;
+				interrupts = <2 4>;
+			};
+
+			IIC1: i2c@ef600800 {
+				device_type = "i2c";
+				compatible = "ibm,iic-44gp", "ibm,iic";
+				reg = <ef600800 14>;
+				interrupt-parent = <&UIC0>;
+				interrupts = <7 4>;
+			};
+
+			ZMII0: emac-zmii@ef600d00 {
+				device_type = "zmii-interface";
+				compatible = "ibm,zmii-440gp", "ibm,zmii";
+				reg = <ef600d00 c>;
+			};
+
+			EMAC0: ethernet@ef600e00 {
+				device_type = "network";
+				compatible = "ibm,emac-440gp", "ibm,emac";
+				interrupt-parent = <&UIC1>;
+				interrupts = <1c 4 1d 4>;
+				reg = <ef600e00 70>;
+				local-mac-address = [000000000000];
+				mal-device = <&MAL0>;
+				mal-tx-channel = <0 1>;
+				mal-rx-channel = <0>;
+				cell-index = <0>;
+				max-frame-size = <5dc>;
+				rx-fifo-size = <1000>;
+				tx-fifo-size = <800>;
+				phy-mode = "rmii";
+				phy-map = <00000001>;
+				zmii-device = <&ZMII0>;
+				zmii-channel = <0>;
+			};
+
+			EMAC1: ethernet@ef600f00 {
+				device_type = "network";
+				compatible = "ibm,emac-440gp", "ibm,emac";
+				interrupt-parent = <&UIC1>;
+				interrupts = <1e 4 1f 4>;
+				reg = <ef600f00 70>;
+				local-mac-address = [000000000000];
+				mal-device = <&MAL0>;
+				mal-tx-channel = <2 3>;
+				mal-rx-channel = <1>;
+				cell-index = <1>;
+				max-frame-size = <5dc>;
+				rx-fifo-size = <1000>;
+				tx-fifo-size = <800>;
+				phy-mode = "rmii";
+				phy-map = <00000001>;
+				zmii-device = <&ZMII0>;
+				zmii-channel = <1>;
+			};
+		};
+	};
+
+	chosen {
+		linux,stdout-path = "/plb/opb/serial@ef600300";
+		bootargs = "console=ttyS0,115200";
+	};
+};
#32 lore raw

Re: [patch 08/10] Bamboo DTS

Quoted 1 line · Josh Boyer

AMCC Bamboo board DTS

All the compatible properties should have "XXXX-440ep" as the most precise version, in addition to the more general strings.

Quoted 8 lines
arch/powerpc/boot/dts/bamboo.dts new file +5 -0
@@ -0,0 +1,248 @@
+/*
+ * Device Tree Source for AMCC Bamboo
+ *
+ * Copyright (c) 2006, 2007 IBM Corp.
+ * Josh Boyer <[email protected]>

arch/powerpc/boot/dts/bamboo.dts line 15

Quoted 10 lines
arch/powerpc/boot/dts/bamboo.dts new file +10 -0
+ *
+ * FIXME: Draft only!
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed "as is" without
+ * any warranty of any kind, whether express or implied.
+ *
+ * To build:
+ *   dtc -I dts -O asm -o bamboo.S -b 0 bamboo.dts
+ *   dtc -I dts -O dtb -o bamboo.dtb -b 0 bamboo.dts

Can we ditch this "to build" boilerplate. It's just another thing people frequently forget to update as they copy it from dts to dts.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#33 lore raw

Re: [patch 08/10] Bamboo DTS

Quoted 7 lines · David Gibson
Quoted 4 lines

+ *
+ * To build:
+ * dtc -I dts -O asm -o bamboo.S -b 0 bamboo.dts
+ * dtc -I dts -O dtb -o bamboo.dtb -b 0 bamboo.dts

Can we ditch this "to build" boilerplate. It's just another thing people frequently forget to update as they copy it from dts to dts.

That's a good idea, I think. Especially since it is not really accurate for u-boot with libfdt either. I believe it that case it needs to have some extra space reservations made for it as well.

Thanks,
jdl

author
#34 lore raw

Re: [patch 08/10] Bamboo DTS

Quoted 7 lines · On Mon, 06 Aug 2007 13:01:28 -0500 Jon Loeliger <[email protected]> wrote:
Quoted 5 lines · David Gibson
Quoted 4 lines

+ *
+ * To build:
+ * dtc -I dts -O asm -o bamboo.S -b 0 bamboo.dts
+ * dtc -I dts -O dtb -o bamboo.dtb -b 0 bamboo.dts

Quoted 7 lines
Quoted 2 lines

Can we ditch this "to build" boilerplate. It's just another thing people frequently forget to update as they copy it from dts to dts.

That's a good idea, I think. Especially since it is not really accurate for u-boot with libfdt either. I believe it that case it needs to have some extra space reservations made for it as well.

Yeah, will kill it.

josh

author
#35 lore raw

Re: [patch 08/10] Bamboo DTS

In reply to David Gibson
Quoted 5 lines · On Mon, 6 Aug 2007 14:53:32 +1000 David Gibson <[email protected]> wrote:
Quoted 1 line · Josh Boyer

AMCC Bamboo board DTS

All the compatible properties should have "XXXX-440ep" as the most precise version, in addition to the more general strings.

Done.

Quoted 13 lines
Quoted 13 lines
arch/powerpc/boot/dts/bamboo.dts new file +10 -0
@@ -0,0 +1,248 @@
+/*
+ * Device Tree Source for AMCC Bamboo
+ *
+ * Copyright (c) 2006, 2007 IBM Corp.
+ * Josh Boyer <[email protected]>
+ *
+ * FIXME: Draft only!
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2.  This program is licensed "as is" without
Quoted 8 lines

arch/powerpc/boot/dts/bamboo.dts line 15

Quoted 5 lines
arch/powerpc/boot/dts/bamboo.dts new file +5 -0
+ * any warranty of any kind, whether express or implied.
+ *
+ * To build:
+ *   dtc -I dts -O asm -o bamboo.S -b 0 bamboo.dts
+ *   dtc -I dts -O dtb -o bamboo.dtb -b 0 bamboo.dts

Can we ditch this "to build" boilerplate. It's just another thing people frequently forget to update as they copy it from dts to dts.

Removed.

josh

author
#36 lore raw

PATCH 9/10 Bamboo board support

In reply to Josh Boyer

Add support for the AMCC Bamboo board

---
 arch/powerpc/configs/bamboo_defconfig |  775 ++++++++++++++++++++++++++++++++++
 arch/powerpc/platforms/44x/Kconfig    |   15 
 arch/powerpc/platforms/44x/Makefile   |    1 
 arch/powerpc/platforms/44x/bamboo.c   |   66 ++
 4 files changed, 850 insertions(+), 7 deletions(-)
arch/powerpc/configs/bamboo_defconfig new file +775 -0
@@ -0,0 +1,775 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23-rc1
+# Fri Aug  3 10:46:53 2007
+#
+# CONFIG_PPC64 is not set
+
+#
+# Processor support
+#
+# CONFIG_6xx is not set
+# CONFIG_PPC_85xx is not set
+# CONFIG_PPC_8xx is not set
+# CONFIG_40x is not set
+CONFIG_44x=y
+# CONFIG_E200 is not set
+CONFIG_PPC_FPU=y
+CONFIG_4xx=y
+CONFIG_BOOKE=y
+CONFIG_PTE_64BIT=y
+CONFIG_PHYS_64BIT=y
+# CONFIG_PPC_MM_SLICES is not set
+CONFIG_NOT_COHERENT_CACHE=y
+CONFIG_PPC32=y
+CONFIG_PPC_MERGE=y
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_IRQ_PER_CPU=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+CONFIG_ARCH_HAS_ILOG2_U32=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+# CONFIG_ARCH_NO_VIRT_TO_BUS is not set
+CONFIG_PPC=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_GENERIC_NVRAM=y
+CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_PPC_OF=y
+CONFIG_OF=y
+CONFIG_PPC_UDBG_16550=y
+# CONFIG_GENERIC_TBSYNC is not set
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
+# CONFIG_DEFAULT_UIMAGE is not set
+CONFIG_PPC_DCR_NATIVE=y
+# CONFIG_PPC_DCR_MMIO is not set
+CONFIG_PPC_DCR=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+CONFIG_LBD=y
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# Platform support
+#
+# CONFIG_PPC_MPC52xx is not set
+# CONFIG_PPC_MPC5200 is not set
+# CONFIG_PPC_CELL is not set
+# CONFIG_PPC_CELL_NATIVE is not set
+# CONFIG_PQ2ADS is not set
+CONFIG_BAMBOO=y
+# CONFIG_EBONY is not set
+CONFIG_440EP=y
+CONFIG_IBM440EP_ERR42=y
+# CONFIG_MPIC is not set
+# CONFIG_MPIC_WEIRD is not set
+# CONFIG_PPC_I8259 is not set
+# CONFIG_PPC_RTAS is not set
+# CONFIG_MMIO_NVRAM is not set
+# CONFIG_PPC_MPC106 is not set
+# CONFIG_PPC_970_NAP is not set
+# CONFIG_PPC_INDIRECT_IO is not set
+# CONFIG_GENERIC_IOMAP is not set
+# CONFIG_CPU_FREQ is not set
+# CONFIG_CPM2 is not set
+
+#
+# Kernel options
+#
+# CONFIG_HIGHMEM is not set
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+# CONFIG_HZ_300 is not set
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=250
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_MATH_EMULATION is not set
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_RESOURCES_64BIT=y
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_PROC_DEVICETREE=y
+CONFIG_CMDLINE_BOOL=y
+CONFIG_CMDLINE=""
+CONFIG_SECCOMP=y
+CONFIG_WANT_DEVICE_TREE=y
+CONFIG_DEVICE_TREE="bamboo.dts"
+CONFIG_ISA_DMA_API=y
+
+#
+# Bus options
+#
+CONFIG_ZONE_DMA=y
+CONFIG_PPC_INDIRECT_PCI=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_SYSCALL=y
+# CONFIG_PCIEPORTBUS is not set
+CONFIG_ARCH_SUPPORTS_MSI=y
+# CONFIG_PCI_MSI is not set
+# CONFIG_PCI_DEBUG is not set
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+# CONFIG_HOTPLUG_PCI is not set
+
+#
+# Advanced setup
+#
+# CONFIG_ADVANCED_OPTIONS is not set
+
+#
+# Default settings for advanced configuration options are used
+#
+CONFIG_HIGHMEM_START=0xfe000000
+CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_TASK_SIZE=0x80000000
+CONFIG_CONSISTENT_START=0xff100000
+CONFIG_CONSISTENT_SIZE=0x00200000
+CONFIG_BOOT_LOAD=0x01000000
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+CONFIG_CONNECTOR=y
+CONFIG_PROC_EVENTS=y
+# CONFIG_MTD is not set
+CONFIG_OF_DEVICE=y
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_SX8 is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=35000
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_XILINX_SYSACE is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_PHANTOM is not set
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+# CONFIG_SCSI_DMA is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_ATA is not set
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_FIREWIRE is not set
+# CONFIG_IEEE1394 is not set
+# CONFIG_I2O is not set
+CONFIG_MACINTOSH_DRIVERS=y
+# CONFIG_MAC_EMUMOUSEBTN is not set
+# CONFIG_WINDFARM is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_ARCNET is not set
+# CONFIG_NET_ETHERNET is not set
+CONFIG_NETDEV_1000=y
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
+# CONFIG_SKGE is not set
+# CONFIG_SKY2 is not set
+# CONFIG_VIA_VELOCITY is not set
+# CONFIG_TIGON3 is not set
+# CONFIG_BNX2 is not set
+# CONFIG_QLA3XXX is not set
+# CONFIG_ATL1 is not set
+CONFIG_NETDEV_10000=y
+# CONFIG_CHELSIO_T1 is not set
+# CONFIG_CHELSIO_T3 is not set
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+# CONFIG_MYRI10GE is not set
+# CONFIG_NETXEN_NIC is not set
+# CONFIG_MLX4_CORE is not set
+# CONFIG_TR is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+# CONFIG_INPUT is not set
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+# CONFIG_SERIAL_8250_PCI is not set
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+CONFIG_SERIAL_8250_EXTENDED=y
+# CONFIG_SERIAL_8250_MANY_PORTS is not set
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+# CONFIG_SERIAL_8250_DETECT_IRQ is not set
+# CONFIG_SERIAL_8250_RSA is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_UARTLITE is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_JSM is not set
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_WATCHDOG is not set
+# CONFIG_HW_RANDOM is not set
+# CONFIG_NVRAM is not set
+# CONFIG_GEN_RTC is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_DEVPORT=y
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+# CONFIG_W1 is not set
+# CONFIG_POWER_SUPPLY is not set
+# CONFIG_HWMON is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+CONFIG_DAB=y
+
+#
+# Graphics support
+#
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=m
+# CONFIG_FB is not set
+# CONFIG_FB_IBM_GXT4500 is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+# CONFIG_MMC is not set
+# CONFIG_NEW_LEDS is not set
+# CONFIG_INFINIBAND is not set
+# CONFIG_EDAC is not set
+# CONFIG_RTC_CLASS is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
+#
+# Userspace I/O
+#
+# CONFIG_UIO is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_EXT4DEV_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_MSDOS_FS is not set
+# CONFIG_VFAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_CRAMFS=y
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+# CONFIG_NLS is not set
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+# CONFIG_UCC_SLOW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+
+#
+# Instrumentation Support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+CONFIG_SCHED_DEBUG=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+# CONFIG_DEBUG_STACKOVERFLOW is not set
+# CONFIG_DEBUG_STACK_USAGE is not set
+# CONFIG_DEBUG_PAGEALLOC is not set
+CONFIG_DEBUGGER=y
+# CONFIG_KGDB is not set
+# CONFIG_XMON is not set
+# CONFIG_BDI_SWITCH is not set
+CONFIG_PPC_EARLY_DEBUG=y
+# CONFIG_PPC_EARLY_DEBUG_LPAR is not set
+# CONFIG_PPC_EARLY_DEBUG_G5 is not set
+# CONFIG_PPC_EARLY_DEBUG_RTAS_PANEL is not set
+# CONFIG_PPC_EARLY_DEBUG_RTAS_CONSOLE is not set
+# CONFIG_PPC_EARLY_DEBUG_MAPLE is not set
+# CONFIG_PPC_EARLY_DEBUG_ISERIES is not set
+# CONFIG_PPC_EARLY_DEBUG_PAS_REALMODE is not set
+# CONFIG_PPC_EARLY_DEBUG_BEAT is not set
+CONFIG_PPC_EARLY_DEBUG_44x=y
+CONFIG_PPC_EARLY_DEBUG_44x_PHYSLOW=0xef600300
+CONFIG_PPC_EARLY_DEBUG_44x_PHYSHIGH=0x0
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_MANAGER=y
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_PCBC=y
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+CONFIG_CRYPTO_HW=y
arch/powerpc/platforms/44x/Kconfig +8 -7
@@ -1,10 +1,10 @@
-#config BAMBOO
-#	bool "Bamboo"
-#	depends on 44x
-#	default n
-#	select 440EP
-#	help
-#	  This option enables support for the IBM PPC440EP evaluation board.
+config BAMBOO
+	bool "Bamboo"
+	depends on 44x
+	default n
+	select 440EP
+	help
+	  This option enables support for the IBM PPC440EP evaluation board.
 
 config EBONY
 	bool "Ebony"
@@ -35,6 +35,7 @@ config 440EP
 	bool
 	select PPC_FPU
 	select IBM440EP_ERR42
+#	select IBM_NEW_EMAC_ZMII
 
 config 440GP
 	bool
arch/powerpc/platforms/44x/Makefile +1 -0
@@ -1,2 +1,3 @@
 obj-$(CONFIG_44x)	:= misc_44x.o
 obj-$(CONFIG_EBONY)	+= ebony.o
+obj-$(CONFIG_BAMBOO) += bamboo.o
arch/powerpc/platforms/44x/bamboo.c new file +66 -0

66 lines not on this page · raw message

Acked-by on v1 9/10
#37 lore raw

Re: [patch 09/10] Bamboo board support

Quoted 3 lines · Josh Boyer

Add support for the AMCC Bamboo board

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
author
#38 lore raw

PATCH 10/10 Bamboo zImage wrapper

In reply to Josh Boyer

Add a bootwrapper for the AMCC 440EP Bamboo Eval board. This also adds a common fixup_clock function for all 440EP(x) chips.

---
 arch/powerpc/boot/44x.h             |    1 
 arch/powerpc/boot/4xx.c             |   82 ++++++++++++++++++++++++++++++++++++
 arch/powerpc/boot/4xx.h             |    1 
 arch/powerpc/boot/Makefile          |    5 +-
 arch/powerpc/boot/bamboo.c          |   45 +++++++++++++++++++
 arch/powerpc/boot/dcr.h             |   10 ++++
 arch/powerpc/boot/treeboot-bamboo.c |   27 +++++++++++
 7 files changed, 169 insertions(+), 2 deletions(-)
arch/powerpc/boot/44x.h +1 -0
@@ -11,5 +11,6 @@
 #define _PPC_BOOT_44X_H_
 
 void ebony_init(void *mac0, void *mac1);
+void bamboo_init(void);
 
 #endif /* _PPC_BOOT_44X_H_ */
arch/powerpc/boot/4xx.c +82 -0

85 lines not on this page · raw message

arch/powerpc/boot/4xx.h +1 -0
@@ -16,5 +16,6 @@ void ibm44x_dbcr_reset(void);
 void ibm40x_dbcr_reset(void);
 void ibm4xx_quiesce_eth(u32 *emac0, u32 *emac1);
 void ibm4xx_fixup_ebc_ranges(const char *ebc);
+void ibm440ep_fixup_clocks(unsigned int sysclk, unsigned int ser_clk);
 
 #endif /* _POWERPC_BOOT_4XX_H_ */
arch/powerpc/boot/Makefile +3 -2
@@ -44,10 +44,10 @@ $(addprefix $(obj)/,$(zlib) gunzip_util.
 src-wlib := string.S crt0.S stdio.c main.c flatdevtree.c flatdevtree_misc.c \
 		ns16550.c serial.c simple_alloc.c div64.S util.S \
 		gunzip_util.c elf_util.c $(zlib) devtree.c oflib.c ofconsole.c \
-		4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c
+		4xx.c ebony.c mv64x60.c mpsc.c mv64x60_i2c.c cuboot.c bamboo.c
 src-plat := of.c cuboot-83xx.c cuboot-85xx.c holly.c \
 		cuboot-ebony.c treeboot-ebony.c prpmc2800.c \
-		ps3-head.S ps3-hvcall.S ps3.c
+		ps3-head.S ps3-hvcall.S ps3.c treeboot-bamboo.c
 src-boot := $(src-wlib) $(src-plat) empty.c
 
 src-boot := $(addprefix $(obj)/, $(src-boot))
@@ -142,6 +142,7 @@ ifneq ($(CONFIG_DEVICE_TREE),"")
 image-$(CONFIG_PPC_83xx)		+= cuImage.83xx
 image-$(CONFIG_PPC_85xx)		+= cuImage.85xx
 image-$(CONFIG_EBONY)			+= treeImage.ebony cuImage.ebony
+image-$(CONFIG_BAMBOO)			+= treeImage.bamboo
 endif
 
 # For 32-bit powermacs, build the COFF and miboot images
arch/powerpc/boot/bamboo.c new file +45 -0

45 lines not on this page · raw message

arch/powerpc/boot/dcr.h +10 -0
@@ -123,4 +123,14 @@ static const unsigned long sdram_bxcr[] 
 
 #define DCRN_MAL0_CFG					0x180
 
+/* 440EP Clock/Power-on Reset regs */
+#define DCRN_CPR0_ADDR	0xc
+#define DCRN_CPR0_DATA	0xd
+#define CPR0_PLLD0	0x60
+#define CPR0_OPBD0	0xc0
+#define CPR0_PERD0	0xe0
+#define CPR0_PRIMBD0	0xa0
+#define CPR0_SCPID	0x120
+#define CPR0_PLLC0	0x40
+
 #endif	/* _PPC_BOOT_DCR_H_ */
arch/powerpc/boot/treeboot-bamboo.c new file +27 -0
@@ -0,0 +1,27 @@
+/*
+ * Copyright IBM Corporation, 2007
+ * Josh Boyer <[email protected]>
+ *
+ * Based on ebony wrapper:
+ * Copyright 2007 David Gibson, IBM Corporation.
+ *
+ * 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; version 2 of the License
+ */
+#include "ops.h"
+#include "stdio.h"
+#include "44x.h"
+
+extern char _end[];
+
+BSS_STACK(4096);
+
+void platform_init(void)
+{
+	unsigned long end_of_ram = 0x8000000;
+	unsigned long avail_ram = end_of_ram - (unsigned long)_end;
+
+	simple_alloc_init(_end, avail_ram, 32, 64);
+	bamboo_init();
+}
#39 lore raw

Re: [patch 10/10] Bamboo zImage wrapper

Quoted 2 lines · Josh Boyer

Add a bootwrapper for the AMCC 440EP Bamboo Eval board. This also adds a common fixup_clock function for all 440EP(x) chips.

Ok, you have a separate bamboo.c and treeboot-bamboo.c, like with ebony. However here, therer's only one outermost wrapper - treeboot-bamboo.c which means there's not really any point to this separation.

Do you know if there are Bamboo boards with old u-boot versions, or some other bootloader which would make the separation worthwhile later?

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
author
#40 lore raw

Re: [patch 10/10] Bamboo zImage wrapper

Quoted 8 lines · David Gibson
Quoted 2 lines · Josh Boyer

Add a bootwrapper for the AMCC 440EP Bamboo Eval board. This also adds a common fixup_clock function for all 440EP(x) chips.

Ok, you have a separate bamboo.c and treeboot-bamboo.c, like with ebony. However here, therer's only one outermost wrapper - treeboot-bamboo.c which means there's not really any point to this separation.

Milton already mentioned this the first time I submitted the patch.

Quoted 3 lines

Do you know if there are Bamboo boards with old u-boot versions, or some other bootloader which would make the separation worthwhile later?

Yes, there are. And yes, I plan on submitting the cuboot-bamboo.c wrapper just as soon as I get a chance to get my board switched back to u-boot. It's actually pretty trivial to keep both PIBS and u-boot on a bamboo board, since you can program u-boot into the flash from PIBS and flip some switches to boot from it.

josh

#41 lore raw

Re: [patch 10/10] Bamboo zImage wrapper

Quoted 16 lines · Josh Boyer
Quoted 8 lines · David Gibson
Quoted 2 lines · Josh Boyer

Add a bootwrapper for the AMCC 440EP Bamboo Eval board. This also adds a common fixup_clock function for all 440EP(x) chips.

Ok, you have a separate bamboo.c and treeboot-bamboo.c, like with ebony. However here, therer's only one outermost wrapper - treeboot-bamboo.c which means there's not really any point to this separation.

Milton already mentioned this the first time I submitted the patch.

Quoted 3 lines

Do you know if there are Bamboo boards with old u-boot versions, or some other bootloader which would make the separation worthwhile later?

Quoted 5 lines

Yes, there are. And yes, I plan on submitting the cuboot-bamboo.c wrapper just as soon as I get a chance to get my board switched back to u-boot. It's actually pretty trivial to keep both PIBS and u-boot on a bamboo board, since you can program u-boot into the flash from PIBS and flip some switches to boot from it.

Ok.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
Acked-by on v1 10/10
#42 lore raw

Re: [patch 10/10] Bamboo zImage wrapper

In reply to Josh Boyer
Quoted 4 lines · Josh Boyer

Add a bootwrapper for the AMCC 440EP Bamboo Eval board. This also adds a common fixup_clock function for all 440EP(x) chips.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson