Skip to contentSkip to conversation

ppc4xx: Add CATCenter Io 405EP board support

PATCH New Dirk Eibach 3 participants 4 messages Oct 13, 2010

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ppc4xx: Add CATCenter Io 405EP board support

Board support for the Guntermann & Drunck CATCenter Io.

---
Changes since v1:
- added MAINTAINERS entry
- sort MAKEALL
- whitespace/codestyle cleanup
- use boards.cfg instead of Makefile
- added some comments for clarification
- use CONFIG_BITBANGMII_MULTI

 MAINTAINERS                  |    1 +
 MAKEALL                      |    1 +
 board/gdsys/io/Makefile      |   51 +++++++++
 board/gdsys/io/config.mk     |   24 ++++
 board/gdsys/io/io.c          |  249 ++++++++++++++++++++++++++++++++++++++++++
 board/gdsys/io/io_miiphybb.c |  102 +++++++++++++++++
 boards.cfg                   |    1 +
 include/configs/io.h         |  241 ++++++++++++++++++++++++++++++++++++++++
 8 files changed, 670 insertions(+), 0 deletions(-)
 create mode 100644 board/gdsys/io/Makefile
 create mode 100644 board/gdsys/io/config.mk
 create mode 100644 board/gdsys/io/io.c
 create mode 100644 board/gdsys/io/io_miiphybb.c
 create mode 100644 include/configs/io.h
MAINTAINERS +1 -0
index e003226..a321c7a 100644
@@ -145,6 +145,7 @@ Dirk Eibach <[email protected]>
 	dlvision        PPC405EP
 	gdppc440etx	PPC440EP/GR
 	intip		PPC460EX
+	io		PPC405EP
 	neo		PPC405EP
 
 Dave Ellis <[email protected]>
MAKEALL +1 -0
index 1b506d6..e7e1bd9 100755
@@ -157,6 +157,7 @@ LIST_4xx="$(boards_by_cpu ppc4xx)
 	hcu4		\
 	hcu5		\
 	intip		\
+	io		\
 	kilauea		\
 	kilauea_nand	\
 	mcu25		\
board/gdsys/io/Makefile new file +51 -0

51 lines not on this page · raw message

board/gdsys/io/config.mk new file +24 -0
new file mode 100644
index 0000000..1bdf5e4
@@ -0,0 +1,24 @@
+#
+# (C) Copyright 2000
+# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# 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.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+TEXT_BASE = 0xFFFC0000
board/gdsys/io/io.c new file +249 -0

249 lines not on this page · raw message

board/gdsys/io/io_miiphybb.c new file +102 -0

102 lines not on this page · raw message

boards.cfg +1 -0
index 202de1a..903e378 100644
@@ -357,6 +357,7 @@ pcs440ep	powerpc	ppc4xx
 quad100hd	powerpc	ppc4xx
 dlvision	powerpc	ppc4xx		-		gdsys
 gdppc440etx	powerpc	ppc4xx		-		gdsys
+io		powerpc	ppc4xx		-		gdsys
 CPCIISER4	powerpc	ppc4xx		cpciiser4	esd
 DASA_SIM	powerpc	ppc4xx		dasa_sim	esd
 PMC405DE	powerpc	ppc4xx		pmc405de	esd
include/configs/io.h new file +241 -0

241 lines not on this page · raw message

Signature · 1 line
1.5.6.5
#1 lore raw

PATCH v2 1/1 ppc4xx: Add CATCenter Io 405EP board support

Hi Dirk,

Quoted 11 lines · On Wednesday 13 October 2010 12:20:18 Dirk Eibach wrote:

Board support for the Guntermann & Drunck CATCenter Io.

---
Changes since v1:
- added MAINTAINERS entry
- sort MAKEALL
- whitespace/codestyle cleanup
- use boards.cfg instead of Makefile
- added some comments for clarification
- use CONFIG_BITBANGMII_MULTI

Now that was quick. :) But I still have some improvement suggestions below.

Quoted 29 lines

+++ b/board/gdsys/io/io_miiphybb.c

board/gdsys/io/io_miiphybb.c new file +27 -0
@@ -0,0 +1,102 @@
+/*
+ * (C) Copyright 2010
+ * Dirk Eibach,  Guntermann & Drunck GmbH, eibach at gdsys.de
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <miiphy.h>
+
+#include <asm/io.h>

board/gdsys/io/io_miiphybb.c line 37

Quoted 10 lines
board/gdsys/io/io_miiphybb.c new file +10 -0
+
+static int io_bb_mii_init(struct bb_miiphy_bus *bus)
+{
+	return 0;
+}
+
+static int io_bb_mdio_active(struct bb_miiphy_bus *bus)
+{
+	out_be32((void *)GPIO0_TCR,
+		in_be32((void *)GPIO0_TCR) | CONFIG_SYS_MDIO_PIN);

Why not use the already available GPIO functions instead (gpio_write_bit() etc)? This will make it easier to move this to the common (Linux) GPIO API at some time later.

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

#2 lore raw

PATCH v2 1/1 ppc4xx: Add CATCenter Io 405EP board support

Hi Stefan,

Quoted 4 lines

Why not use the already available GPIO functions instead (gpio_write_bit() etc)? This will make it easier to move this to the common (Linux) GPIO API at some time later.

Hmm, nice, didn't notice those yet.
But somehow functionality is missing for toggling between output and tristate mode without changing output value.
In linux we have gpio_direction_input() and gpio_direction_output() for this purpose.

Should I add something like this to ppc4xx-gpio.h?

Quoted 2 lines

Cheers,
Stefan

Cheers
Dirk

#3 lore raw

PATCH v2 1/1 ppc4xx: Add CATCenter Io 405EP board support

Hi Dirk,

Quoted 11 lines · Dirk
Quoted 3 lines

Why not use the already available GPIO functions instead (gpio_write_bit() etc)? This will make it easier to move this to the common (Linux) GPIO API at some time later.

Hmm, nice, didn't notice those yet.
But somehow functionality is missing for toggling between output and tristate mode without changing output value.
In linux we have gpio_direction_input() and gpio_direction_output() for this purpose.

Should I add something like this to ppc4xx-gpio.h?

Best would be to move to the Linux GPIO API for PPC4xx in U-Boot now then. This has been discussed before on the list. And is on my list of open tasks. But it will have to wait a few more weeks I'm afraid. Perhaps you have some spare cycles left to migrate the current GPIO API to the Linux one? See Blackfin arch as an example.

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