Skip to contentSkip to conversation

ppc4xx: Add GDsys CompactCenter board support.

PATCH New Dirk Eibach 3 participants 4 messages Jul 27, 2009 – Jul 28, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 ppc4xx: Add GDsys CompactCenter board support.

Board support for the Guntermann & Drunck CompactCenter and DevCon-Center.
Based on the AMCC Canyonlands board support by Stefan Roese.

---
Changes since v1:
- removed dead code
- whitespace cleanup
- simplified code for nand/nor distinction in board/gdsys/compactcenter/bootstra p.c

Changes since v2:
- removed get_cpu_num() from board/gdsys/compactcenter/compactcenter.c
- use __ft_board_setup() instead of ft_cpu_setup()
- cleanup CompactCenter/Canyonlands mixup
- reformatted CONFIG_SYS_4xx_GPIO_TABLE. Lines are > 80 chars but readable.

Changes since v3:
- took nor fixup from canyonlands
- use chip_config instead of bootstrap command

Changes since v4:
- removed nor fixup (not needed anymore)

 MAINTAINERS                               |    2 +
 MAKEALL                                   |    2 +
 Makefile                                  |    8 +
 board/gdsys/compactcenter/Makefile        |   53 ++++
 board/gdsys/compactcenter/chip_config.c   |   87 ++++++
 board/gdsys/compactcenter/compactcenter.c |  297 ++++++++++++++++++++
 board/gdsys/compactcenter/config.mk       |   41 +++
 board/gdsys/compactcenter/init.S          |   97 +++++++
 board/gdsys/compactcenter/u-boot.lds      |  144 ++++++++++
 include/configs/compactcenter.h           |  437 +++++++++++++++++++++++++++++
 10 files changed, 1168 insertions(+), 0 deletions(-)
 create mode 100644 board/gdsys/compactcenter/Makefile
 create mode 100644 board/gdsys/compactcenter/chip_config.c
 create mode 100644 board/gdsys/compactcenter/compactcenter.c
 create mode 100644 board/gdsys/compactcenter/config.mk
 create mode 100644 board/gdsys/compactcenter/init.S
 create mode 100644 board/gdsys/compactcenter/u-boot.lds
 create mode 100644 include/configs/compactcenter.h
MAINTAINERS +2 -0
index 575a7ec..888eb5c 100644
@@ -135,6 +135,8 @@ Jon Diekema <[email protected]>
 
 Dirk Eibach <[email protected]>
 
+	compactcenter	PPC460EX
+	devconcenter	PPC460EX
 	gdppc440etx	PPC440EP/GR
 	neo		PPC405EP
 
MAKEALL +2 -0
index 020ff73..7359b2e 100755
@@ -184,6 +184,7 @@ LIST_4xx="		\
 	canyonlands	\
 	canyonlands_nand \
 	CMS700		\
+	compactcenter	\
 	CPCI2DP		\
 	CPCI405		\
 	CPCI4052	\
@@ -194,6 +195,7 @@ LIST_4xx="		\
 	csb272		\
 	csb472		\
 	DASA_SIM	\
+	devconcenter	\
 	DP405		\
 	DU405		\
 	DU440		\
Makefile +8 -0
index 090e645..9be17f6 100644
@@ -1308,6 +1308,14 @@ CATcenter_33_config:	unconfig
 CMS700_config:	unconfig
 	@$(MKCONFIG) $(@:_config=) ppc ppc4xx cms700 esd
 
+# Compact-Center & DevCon-Center use different U-Boot images
+compactcenter_config \
+devconcenter_config:	unconfig
+	@mkdir -p $(obj)include
+	@echo "#define CONFIG_$$(echo $(subst ,,$(@:_config=)) | \
+		tr '[:lower:]' '[:upper:]')" >$(obj)include/config.h
+	@$(MKCONFIG) -n $@ -a compactcenter ppc ppc4xx compactcenter gdsys
+
 CPCI2DP_config:	unconfig
 	@$(MKCONFIG) $(@:_config=) ppc ppc4xx cpci2dp esd
 
board/gdsys/compactcenter/Makefile new file +53 -0

53 lines not on this page · raw message

board/gdsys/compactcenter/chip_config.c new file +87 -0

87 lines not on this page · raw message

board/gdsys/compactcenter/compactcenter.c new file +297 -0

297 lines not on this page · raw message

board/gdsys/compactcenter/config.mk new file +41 -0

41 lines not on this page · raw message

board/gdsys/compactcenter/init.S new file +97 -0

97 lines not on this page · raw message

board/gdsys/compactcenter/u-boot.lds new file +144 -0

144 lines not on this page · raw message

include/configs/compactcenter.h new file +437 -0

437 lines not on this page · raw message

Signature · 1 line
1.5.6.5
#1 lore raw

PATCH v5 1/1 ppc4xx: Add GDsys CompactCenter board support.

Dear Stefan,

In message <[email protected]> Dirk

Quoted 3 lines · Eibach

Board support for the Guntermann & Drunck CompactCenter and DevCon-Center.
Based on the AMCC Canyonlands board support by Stefan Roese.

...

Quoted 28 lines
board/gdsys/compactcenter/compactcenter.c new file +28 -0
+int board_early_init_f(void)
+{
+	u32 pvr = get_pvr();
+
+	/*
+	 * Setup the interrupt controller polarities, triggers, etc.
+	 */
+	mtdcr(uic0sr, 0xffffffff);	/* clear all */
+	mtdcr(uic0er, 0x00000000);	/* disable all */
+	mtdcr(uic0cr, 0x00000005);	/* ATI & UIC1 crit are critical */
+	mtdcr(uic0pr, 0xffffffff);	/* per ref-board manual */
+	mtdcr(uic0tr, 0x00000000);	/* per ref-board manual */
+	mtdcr(uic0vr, 0x00000000);	/* int31 highest, base=0x000 */
+	mtdcr(uic0sr, 0xffffffff);	/* clear all */
+
+	mtdcr(uic1sr, 0xffffffff);	/* clear all */
+	mtdcr(uic1er, 0x00000000);	/* disable all */
+	mtdcr(uic1cr, 0x00000000);	/* all non-critical */
+	mtdcr(uic1pr, 0xffffffff);	/* per ref-board manual */
+	mtdcr(uic1tr, 0x00000000);	/* per ref-board manual */
+	mtdcr(uic1vr, 0x00000000);	/* int31 highest, base=0x000 */
+	mtdcr(uic1sr, 0xffffffff);	/* clear all */
+
+	mtdcr(uic2sr, 0xffffffff);	/* clear all */
+	mtdcr(uic2er, 0x00000000);	/* disable all */
+	mtdcr(uic2cr, 0x00000000);	/* all non-critical */
+	mtdcr(uic2pr, 0xffffffff);	/* per ref-board manual */
+	mtdcr(uic2tr, 0x00000000);	/* per ref-board manual */

board/gdsys/compactcenter/compactcenter.c line 79

Quoted 10 lines
board/gdsys/compactcenter/compactcenter.c new file +10 -0
+	mtdcr(uic2vr, 0x00000000);	/* int31 highest, base=0x000 */
+	mtdcr(uic2sr, 0xffffffff);	/* clear all */
+
+	mtdcr(uic3sr, 0xffffffff);	/* clear all */
+	mtdcr(uic3er, 0x00000000);	/* disable all */
+	mtdcr(uic3cr, 0x00000000);	/* all non-critical */
+	mtdcr(uic3pr, 0xffffffff);	/* per ref-board manual */
+	mtdcr(uic3tr, 0x00000000);	/* per ref-board manual */
+	mtdcr(uic3vr, 0x00000000);	/* int31 highest, base=0x000 */
+	mtdcr(uic3sr, 0xffffffff);	/* clear all */

All these lower case #defines in "include/asm-ppc/ppc4xx-uic.h" should be cleaned up.

...

Quoted 8 lines
board/gdsys/compactcenter/compactcenter.c new file +8 -0
+void pci_target_init(struct pci_controller *hose)
+{
+	/*
+	 * Disable everything
+	 */
+	out_le32((void *)PCIX0_PIM0SA, 0); /* disable */
+	out_le32((void *)PCIX0_PIM1SA, 0); /* disable */
+	out_le32((void *)PCIX0_PIM2SA, 0); /* disable */

board/gdsys/compactcenter/compactcenter.c line 173

Quoted 10 lines
board/gdsys/compactcenter/compactcenter.c new file +10 -0
+	out_le32((void *)PCIX0_EROMBA, 0); /* disable expansion rom */
+
+	/*
+	 * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440
+	 * strapping options to not support sizes such as 128/256 MB.
+	 */
+	out_le32((void *)PCIX0_PIM0LAL, CONFIG_SYS_SDRAM_BASE);
+	out_le32((void *)PCIX0_PIM0LAH, 0);
+	out_le32((void *)PCIX0_PIM0SA, ~(gd->ram_size - 1) | 1);
+	out_le32((void *)PCIX0_BAR0, 0);

And we should proper C structs in "include/ppc440.h" so we can get rid of all these nasty casts.

I don't intend to block this patch at this stage, but can you please put such cleanup on your list for the next release? Thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"What the scientists have in their briefcases is terrifying."
- Nikita Khrushchev
#2 lore raw

PATCH v5 1/1 ppc4xx: Add GDsys CompactCenter board support.

Hi Wolfgang,

Quoted 36 lines · On Monday 27 July 2009 23:06:50 Wolfgang Denk wrote:

board/gdsys/compactcenter/compactcenter.c line 79

Quoted 7 lines
board/gdsys/compactcenter/compactcenter.c new file +7 -0
+	mtdcr(uic3sr, 0xffffffff);	/* clear all */
+	mtdcr(uic3er, 0x00000000);	/* disable all */
+	mtdcr(uic3cr, 0x00000000);	/* all non-critical */
+	mtdcr(uic3pr, 0xffffffff);	/* per ref-board manual */
+	mtdcr(uic3tr, 0x00000000);	/* per ref-board manual */
+	mtdcr(uic3vr, 0x00000000);	/* int31 highest, base=0x000 */
+	mtdcr(uic3sr, 0xffffffff);	/* clear all */

All these lower case #defines in "include/asm-ppc/ppc4xx-uic.h" should be cleaned up.

..

Quoted 8 lines
board/gdsys/compactcenter/compactcenter.c new file +8 -0
+void pci_target_init(struct pci_controller *hose)
+{
+	/*
+	 * Disable everything
+	 */
+	out_le32((void *)PCIX0_PIM0SA, 0); /* disable */
+	out_le32((void *)PCIX0_PIM1SA, 0); /* disable */
+	out_le32((void *)PCIX0_PIM2SA, 0); /* disable */

board/gdsys/compactcenter/compactcenter.c line 173

Quoted 10 lines
board/gdsys/compactcenter/compactcenter.c new file +10 -0
+	out_le32((void *)PCIX0_EROMBA, 0); /* disable expansion rom */
+
+	/*
+	 * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440
+	 * strapping options to not support sizes such as 128/256 MB.
+	 */
+	out_le32((void *)PCIX0_PIM0LAL, CONFIG_SYS_SDRAM_BASE);
+	out_le32((void *)PCIX0_PIM0LAH, 0);
+	out_le32((void *)PCIX0_PIM0SA, ~(gd->ram_size - 1) | 1);
+	out_le32((void *)PCIX0_BAR0, 0);

And we should proper C structs in "include/ppc440.h" so we can get rid of all these nasty casts.

Quoted 2 lines

I don't intend to block this patch at this stage, but can you please put such cleanup on your list for the next release? Thanks.

OK, I'll put it on my list. The lower-case stuff shouldn't be that hard, but the C struct change is quite intrusive and I can't really promise that I can finish such a cleanup quickly. But I'll try.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================

Applied
#3 lore raw

PATCH v5 1/1 ppc4xx: Add GDsys CompactCenter board support.

In reply to Dirk Eibach
Quoted 5 lines · On Monday 27 July 2009 08:49:48 Dirk Eibach wrote:

Board support for the Guntermann & Drunck CompactCenter and DevCon-Center.
Based on the AMCC Canyonlands board support by Stefan Roese.

Applied to ppc4xx/master. Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================