ppc4xx: Add Io64 board support
PATCH v2 1/1 ppc4xx: Add Io64 board support
From: Dirk Eibach <[email protected]>
Board support for the Guntermann & Drunck Io64.
---
Changes for v2:
- Added MAINTAINERS entry
- Cleaned up issues reported by checkpatch
MAINTAINERS | 1 + arch/powerpc/lib/board.c | 7 + board/gdsys/405ex/405ex.c | 250 +++++++++++++++++ board/gdsys/405ex/405ex.h | 10 + board/gdsys/405ex/Makefile | 53 ++++ board/gdsys/405ex/chip_config.c | 96 +++++++ board/gdsys/405ex/io64.c | 380 ++++++++++++++++++++++++++ board/gdsys/common/Makefile | 1 + board/gdsys/common/miiphybb.c | 58 ++++- boards.cfg | 1 + include/configs/io64.h | 565 +++++++++++++++++++++++++++++++++++++++ include/gdsys_fpga.h | 19 ++ 12 files changed, 1433 insertions(+), 8 deletions(-) create mode 100644 board/gdsys/405ex/405ex.c create mode 100644 board/gdsys/405ex/405ex.h create mode 100644 board/gdsys/405ex/Makefile create mode 100644 board/gdsys/405ex/chip_config.c create mode 100644 board/gdsys/405ex/io64.c create mode 100644 include/configs/io64.h
MAINTAINERS +1 -0
@@ -154,6 +154,7 @@ Dirk Eibach <[email protected]> gdppc440etx PPC440EP/GR intip PPC460EX io PPC405EP + io64 PPC405EX iocon PPC405EP neo PPC405EP
arch/powerpc/lib/board.c +7 -0
@@ -130,6 +130,10 @@ ulong monitor_flash_len;#include <bedbug/type.h> #endif +#ifdef CONFIG_SYS_FPGA_COUNT +#include <gdsys_fpga.h> +#endif +/************************************************************************ * Utilities * ************************************************************************
@@ -322,6 +326,9 @@ init_fnc_t *init_sequence[] = {#ifdef CONFIG_POST post_init_f,#endif +#ifdef CONFIG_FPGA_INIT + init_func_fpga, +#endif INIT_FUNC_WATCHDOG_RESET init_func_ram,#if defined(CONFIG_SYS_DRAM_TEST )
board/gdsys/405ex/405ex.c new file +250 -0
250 lines not on this page · raw message
board/gdsys/405ex/405ex.h new file +10 -0
@@ -0,0 +1,10 @@ +#ifndef __405EX_H_ +#define __405EX_H_ + +/* functions to be provided by board implementation */ +void gd405ex_init (void ); +void gd405ex_set_fpga_reset (unsigned state); +void gd405ex_setup_hw (void ); +int gd405ex_get_fpga_done (unsigned fpga); + +#endif /* __405EX_H_ */
board/gdsys/405ex/Makefile new file +53 -0
53 lines not on this page · raw message
board/gdsys/405ex/chip_config.c new file +96 -0
96 lines not on this page · raw message
board/gdsys/405ex/io64.c new file +380 -0
380 lines not on this page · raw message
board/gdsys/common/Makefile +1 -0
@@ -30,6 +30,7 @@ endif LIB = $(obj)lib$(VENDOR).o COBJS-$(CONFIG_IO) += miiphybb.o +COBJS-$(CONFIG_IO64) += miiphybb.o COBJS-$(CONFIG_IOCON) += osd.o COBJS-$(CONFIG_DLVISION_10G) += osd.o
board/gdsys/common/miiphybb.c +50 -8
116 lines not on this page · raw message
boards.cfg +1 -0
@@ -838,6 +838,7 @@ dlvision-10g powerpc ppc4xx 405ep gdsys gdppc440etx powerpc ppc4xx - gdsys intip powerpc ppc4xx intip gdsys - intip:INTIB io powerpc ppc4xx 405ep gdsys +io64 powerpc ppc4xx 405ex gdsys iocon powerpc ppc4xx 405ep gdsys neo powerpc ppc4xx - gdsys icon powerpc ppc4xx - mosaixtech
include/configs/io64.h new file +565 -0
565 lines not on this page · raw message
include/gdsys_fpga.h +19 -0
@@ -24,9 +24,12 @@#ifndef __GDSYS_FPGA_H#define __GDSYS_FPGA_H +int init_func_fpga (void ); +enum {FPGA_STATE_DONE_FAILED =1 <<0 ,FPGA_STATE_REFLECTION_FAILED =1 <<1 , +FPGA_STATE_PLATFORM =1 <<2 , };int get_fpga_state (unsigned dev);
@@ -68,6 +71,22 @@ typedef struct ihs_fpga { } ihs_fpga_t;#endif +#ifdef CONFIG_IO64 +typedef struct ihs_fpga { +u16 reflection_low;/* 0x0000 */ +u16 versions;/* 0x0002 */ +u16 fpga_features;/* 0x0004 */ +u16 fpga_version;/* 0x0006 */ +u16 reserved_0[5 ];/* 0x0008 */ +u16 quad_serdes_reset;/* 0x0012 */ +u16 reserved_1[502 ];/* 0x0014 */ +u16 ch0_status_int;/* 0x0400 */ +u16 ch0_config_int;/* 0x0402 */ +u16 reserved_2[7677 ];/* 0x0404 */ +u16 reflection_high;/* 0x3ffe */ +}ihs_fpga_t ; +#endif + #ifdef CONFIG_IOCON typedef struct ihs_fpga { u16 reflection_low; /* 0x0000 */
Signature · 1 line
1.5.6.5
PATCH v2 1/1 ppc4xx: Add Io64 board support
Hi Dirk,
Quoted 5 lines · On Tuesday 11 October 2011 16:33:05 eibach at gdsys.de wrote:
arch/powerpc/lib/board.c +0
-0
arch/powerpc/lib/board.c ulong monitor_flash_len; · line 138
Quoted 9 lines
arch/powerpc/lib/board.c +4
-0@@ -130,6 +130,10 @@ ulong monitor_flash_len;#include <bedbug/type.h> #endif +#ifdef CONFIG_SYS_FPGA_COUNT +#include <gdsys_fpga.h> +#endif +/************************************************************************ * Utilities
*
arch/powerpc/lib/board.c init_fnc_t *init_sequence[] = { · line 331
Quoted 8 lines
arch/powerpc/lib/board.c +3
-0************************************************************************@@ -322,6 +326,9 @@ init_fnc_t *init_sequence[] = {#ifdef CONFIG_POST post_init_f,#endif +#ifdef CONFIG_FPGA_INIT + init_func_fpga, +#endif
Do you really need to add this to this common code? Can't you move this to some early board specific function? We really shouldn't add more board specific code here.
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
Eibach
PATCH v2 1/1 ppc4xx: Add Io64 board support
!!NOSIG
Hi Stefan,
Quoted 12 lines
**********************************************************************
arch/powerpc/lib/board.c init_fnc_t *init_sequence[] = { · line 331
Quoted 7 lines
** @@ -322,6 +326,9 @@
init_fnc_t*init_sequence[] = { #ifdefCONFIG_POSTarch/powerpc/lib/board.c +3
-0post_init_f,#endif +#ifdef CONFIG_FPGA_INIT + init_func_fpga, +#endif Do you really need to add this to this common code? Can't you move this to some early board specific function? We really shouldn't add more board specific code here.
I need a hook before relocation but with i2c running. I did not find anything generic for this purpose.
Cheers
Dirk
--------------------------------------------------------------------------
Guntermann & Drunck GmbH Systementwicklung
Dortmunder Str. 4a
D-57234 Wilnsdorf - Germany
Tel: +49 (0) 27 39 / 89 01 - 100 Fax: +49 (0) 27 39 / 89 01 - 120
E-Mail: mailto:sales at gdsys.de Web: http://www.gdsys.de
--------------------------------------------------------------------------
Geschaeftsfuehrer:
Udo Guntermann - Martin Drunck - Reiner Ruelmann
HRB 2884, Amtsgericht Siegen - WEEE-Reg.-Nr. DE30763240 USt.-Id.-Nr. DE 126575222 - Steuer-Nr. 342 / 5835 / 1041
--------------------------------------------------------------------------
DQS-zertifiziert nach ISO 9001:2000
--------------------------------------------------------------------------
PATCH v2 1/1 ppc4xx: Add Io64 board support
Dear "Eibach, Dirk",
Quoted 11 lines · In message <[email protected]> you wrote:
Quoted 8 lines
arch/powerpc/lib/board.c init_fnc_t *init_sequence[] = { · line 331
Quoted 4 lines
arch/powerpc/lib/board.c +3
-0+#ifdef CONFIG_FPGA_INIT + init_func_fpga, +#endif Do you really need to add this to this common code? Can't you move this to some early board specific function? We really shouldn't add more board specific code here.
I need a hook before relocation but with i2c running. I did not find anything generic for this purpose.
Why exactly does has this to run before relocation?
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 A stone was placed at a ford in a river with the inscription: "When this stone is covered it is dangerous to ford here."
Eibach
PATCH v2 1/1 ppc4xx: Add Io64 board support
Dear Wolfgang,
Quoted 5 lines
Quoted 1 line
I need a hook before relocation but with i2c running. I did
not find
Quoted 1 line
anything generic for this purpose.
Why exactly does has this to run before relocation?
Our FPGA guys keep bugging me to get their stuff in a defined state ASAP after poweron. So "before relocation" seemed to me the best thing I could offer to them.
To get around this would involve black magic and sacrifice of chickens to appease them which always leaves a bloody mess on our R&D floor. So I thought this hook might be a better option.
Cheers
Dirk
PATCH v2 1/1 ppc4xx: Add Io64 board support
Dear "Eibach, Dirk",
Quoted 4 lines · In message <[email protected]> you wrote:
Our FPGA guys keep bugging me to get their stuff in a defined state ASAP after poweron. So "before relocation" seemed to me the best thing I could offer to them.
Well, tell them that ASAP means "right after relocation", then.
Quoted 3 lines
To get around this would involve black magic and sacrifice of chickens to appease them which always leaves a bloody mess on our R&D floor. So I thought this hook might be a better option.
Yes, but we definitely do not want to clutter this common code with board specific #ifdef's.
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
I wish I had a bronze torc for every user who didn't read the manual.
- Terry Pratchett, _The Light Fantastic_Eibach
PATCH v2 1/1 ppc4xx: Add Io64 board support
Quoted 8 lines
Quoted 4 lines
Our FPGA guys keep bugging me to get their stuff in a defined state ASAP after poweron. So "before relocation" seemed to me the
best thing
Quoted 1 line
I could offer to them.
Well, tell them that ASAP means "right after relocation", then.
Hmm, maybe they won't even notice...
Quoted 8 lines
Quoted 1 line
To get around this would involve black magic and sacrifice
of chickens
Quoted 1 line
to appease them which always leaves a bloody mess on our
R&D floor. So
Quoted 1 line
I thought this hook might be a better option.
Yes, but we definitely do not want to clutter this common code with board specific #ifdef's.
Ok, so tell Stefan to bring some chickens with him in November. And a mop maybe.
Cheers
Dirk
PATCH v2 1/1 ppc4xx: Add Io64 board support
Quoted 8 lines · Dirk
Quoted 8 lines
Quoted 1 line
To get around this would involve black magic and sacrifice
of chickens
Quoted 1 line
to appease them which always leaves a bloody mess on our
R&D floor. So
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
I thought this hook might be a better option.
Yes, but we definitely do not want to clutter this common code with board specific #ifdef's.
Ok, so tell Stefan to bring some chickens with him in November. And a mop maybe.
/me needs to watch "Angel Heart" again to prepare... ;)
Cheers,
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