Skip to contentSkip to conversation

OMAP3: add CM-T35 board

PATCH Superseded Mike Rapoport 5 participants 7 messages Nov 11, 2009 – Nov 12, 2009 Kbuild

v2 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 OMAP3: add CM-T35 board

Add CM-T35 board support

--
v2 changes:
- rename board config file from omap3_cm-t35.h to cm-t35.h
- remove SZ_xx references
- add MAKEALL/MAINTEINERS entries
--

---
 MAINTAINERS              |    4 +
 MAKEALL                  |    1 +
 Makefile                 |    2 +
 board/cm-t35/Makefile    |   47 +++++++
 board/cm-t35/cm-t35.c    |  196 ++++++++++++++++++++++++++++++
 board/cm-t35/cm-t35.h    |  173 ++++++++++++++++++++++++++
 board/cm-t35/config.mk   |   30 +++++
 include/configs/cm-t35.h |  300 ++++++++++++++++++++++++++++++++++++++++++++++
 8 files changed, 753 insertions(+), 0 deletions(-)
 create mode 100644 board/cm-t35/Makefile
 create mode 100644 board/cm-t35/cm-t35.c
 create mode 100644 board/cm-t35/cm-t35.h
 create mode 100644 board/cm-t35/config.mk
 create mode 100755 include/configs/cm-t35.h
MAINTAINERS +4 -0
index d70a9d2..bd0a52d 100644
@@ -677,6 +677,10 @@ Stelian Pop <[email protected]>
 	at91sam9263ek	ARM926EJS (AT91SAM9263 SoC)
 	at91sam9rlek	ARM926EJS (AT91SAM9RL SoC)
 
+Mike Rapoport <[email protected]>
+
+	omap3_cm-t35	ARM CORTEX-A8 (OMAP3xx SoC)
+
 Tom Rix <[email protected]>
 
 	omap3_zoom2	ARM CORTEX-A8 (OMAP3xx SoC)
MAKEALL +1 -0
index d63c5c2..6f90ad5 100755
@@ -612,6 +612,7 @@ LIST_ARM11="			\
 ## ARM Cortex-A8 Systems
 #########################################################################
 LIST_ARM_CORTEX_A8="		\
+	cm-t35			\
 	devkit8000		\
 	omap3_beagle		\
 	omap3_overo		\
Makefile +2 -0
index bcb3fe9..24c9418 100644
@@ -3143,6 +3143,8 @@ SMN42_config	:	unconfig
 #########################################################################
 ## ARM CORTEX Systems
 #########################################################################
+cm-t35_config :	unconfig
+	@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 cm-t35 NULL omap3
 
 devkit8000_config :	unconfig
 	@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 devkit8000 timll omap3
board/cm-t35/Makefile new file +47 -0

47 lines not on this page · raw message

board/cm-t35/cm-t35.c new file +196 -0

196 lines not on this page · raw message

board/cm-t35/cm-t35.h new file +173 -0

173 lines not on this page · raw message

board/cm-t35/config.mk new file +30 -0
new file mode 100644
index 0000000..6d1a511
@@ -0,0 +1,30 @@
+#
+# (C) Copyright 2009
+# CompuLab, Ltd., <www.compulab.co.il>
+#
+# 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
+#
+# Physical Address:
+# 8000'0000 (bank0)
+#
+# Linux-Kernel is expected to be at 8000'8000, entry 8000'8000
+# (mem base + reserved)
+
+# For use with external or internal boots.
+TEXT_BASE = 0x80e80000
\ No newline at end of file
include/configs/cm-t35.h new file +300 -0

300 lines not on this page · raw message

Signature · 1 line
1.6.0.6
#1 lore raw

PATCH v2 1/1 OMAP3: add CM-T35 board

Quoted 7 lines · Mike Rapoport

Add CM-T35 board support

--
v2 changes:
- rename board config file from omap3_cm-t35.h to cm-t35.h
- remove SZ_xx references
- add MAKEALL/MAINTEINERS entries

Sorry, you are too fast for me ;)

I wanted to mention to please update doc/README.omap3, too.

Cheers

Dirk

#2 lore raw

PATCH v2 1/1 OMAP3: add CM-T35 board

Quoted 9 lines · Dirk Behme
Quoted 7 lines · Mike Rapoport

Add CM-T35 board support

--
v2 changes:
- rename board config file from omap3_cm-t35.h to cm-t35.h
- remove SZ_xx references
- add MAKEALL/MAINTEINERS entries

Quoted 3 lines

Sorry, you are too fast for me ;)

I wanted to mention to please update doc/README.omap3, too.

WIll do.

Quoted 8 lines

Cheers

Dirk
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Signature · 2 lines
	Sincerely Yours,
		Mike.
#3 lore raw

PATCH v2 1/1 OMAP3: add CM-T35 board

In reply to Mike Rapoport
Quoted 10 lines · Mike Rapoport

Add CM-T35 board support

--
v2 changes:
- rename board config file from omap3_cm-t35.h to cm-t35.h
- remove SZ_xx references
- add MAKEALL/MAINTEINERS entries
--

<snip>

Quoted 42 lines
board/cm-t35/cm-t35.c new file +38 -0
@@ -0,0 +1,196 @@
+/*
+ * (C) Copyright 2009
+ * CompuLab, Ltd. <www.compulab.co.il>
+ *
+ * Authors :
+ *	Igor Vaisbein <[email protected]>
+ *	Mike Rapoport <[email protected]>
+ *
+ * Derived from omap3evm and Beagle Board by
+ *	Manikandan Pillai <[email protected]>
+ *	Richard Woodruff <[email protected]>
+ *	Syed Mohammed Khasim <[email protected]>
+ *
+ * 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 <netdev.h>
+#include <net.h>
+#include <i2c.h>
+#include <twl4030.h>
+

board/cm-t35/cm-t35.c line 48

Quoted 10 lines
board/cm-t35/cm-t35.c new file +10 -0
+#include <asm/io.h>
+#include <asm/arch/mem.h>
+#include <asm/arch/mux.h>
+#include <asm/arch/sys_proto.h>
+#include <asm/mach-types.h>
+
+#include "cm-t35.h"
+
+#define CM_T35_SMC911X_BASE	0x2C000000
+#define SB_T35_SMC911X_BASE	(CM_T35_SMC911X_BASE + (16 << 20))

Please follow convention and put this stuff in include/configs/board.h

Quoted 113 lines
board/cm-t35/cm-t35.c new file +112 -0
+
+static u32 gpmc_net_config[GPMC_MAX_REG] = {
+	NET_GPMC_CONFIG1,
+	NET_GPMC_CONFIG2,
+	NET_GPMC_CONFIG3,
+	NET_GPMC_CONFIG4,
+	NET_GPMC_CONFIG5,
+	NET_GPMC_CONFIG6,
+	0
+};
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*
+ * Routine: setup_net_chip
+ * Description: Setting up the configuration GPMC registers specific to the
+ *		Ethernet hardware.
+ */
+static void setup_net_chip(void)
+{
+	struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE;
+
+	enable_gpmc_cs_config(gpmc_net_config, &gpmc_cfg->cs[5],
+			      CM_T35_SMC911X_BASE, GPMC_SIZE_16M);
+	enable_gpmc_cs_config(gpmc_net_config, &gpmc_cfg->cs[4],
+			      SB_T35_SMC911X_BASE, GPMC_SIZE_16M);
+
+	/* Enable off mode for NWE in PADCONF_GPMC_NWE register */
+	writew(readw(&ctrl_base->gpmc_nwe) | 0x0E00, &ctrl_base->gpmc_nwe);
+
+	/* Enable off mode for NOE in PADCONF_GPMC_NADV_ALE register */
+	writew(readw(&ctrl_base->gpmc_noe) | 0x0E00, &ctrl_base->gpmc_noe);
+
+	/* Enable off mode for ALE in PADCONF_GPMC_NADV_ALE register */
+	writew(readw(&ctrl_base->gpmc_nadv_ale) | 0x0E00,
+		&ctrl_base->gpmc_nadv_ale);
+
+	/* Reset the ethernet controller via TPS65930 GPIO */
+	/* Set GPIO1 of TPS65930 as output */
+	twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02,
+			     TWL4030_BASEADD_GPIO+0x03);
+	/* Send a pulse on the GPIO pin */
+	twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02,
+			     TWL4030_BASEADD_GPIO+0x0C);
+	udelay(1);
+	twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02,
+			     TWL4030_BASEADD_GPIO+0x09);
+	udelay(1);
+	twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02,
+			     TWL4030_BASEADD_GPIO+0x0C);
+
+}
+
+/*
+ * Routine: board_init
+ * Description: Early hardware init.
+ */
+int board_init(void)
+{
+	gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
+
+	/* board id for Linux */
+	gd->bd->bi_arch_number = MACH_TYPE_CM_T35;
+	/* boot param addr */
+	gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
+
+	return 0;
+}
+
+/*
+ * Routine: misc_init_r
+ * Description: Init ethernet (done here so udelay works)
+ */
+int misc_init_r(void)
+{
+
+#ifdef CONFIG_DRIVER_OMAP34XX_I2C
+	i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+#endif
+
+#if defined(CONFIG_CMD_NET)
+	setup_net_chip();
+#endif
+
+	dieid_num_r();
+
+	return 0;
+}
+
+/*
+ * Routine: set_muxconf_regs
+ * Description: Setting up the configuration Mux registers specific to the
+ *		hardware. Many pins need to be moved from protect to primary
+ *		mode.
+ */
+void set_muxconf_regs(void)
+{
+	MUX_CM_T35();
+}
+
+/*
+ * Routine: handle_mac_address
+ * Description: prepare MAC address for on-board Ethernet.
+ */
+static int handle_mac_address(void)
+{
+	unsigned char enetaddr[6];
+	int rc;
+
+	rc = eth_getenv_enetaddr("ethaddr", enetaddr);
+	if (rc)
+		return 0;

board/cm-t35/cm-t35.c line 170

Quoted 10 lines
board/cm-t35/cm-t35.c new file +10 -0
+
+	rc = i2c_read(0x50, 0, 1, enetaddr, 6);
+	if (rc)
+		return rc;
+
+	if (!is_valid_ether_addr(enetaddr))
+		return -1;
+
+	return eth_setenv_enetaddr("ethaddr", enetaddr);
+}

the value in environment must be able to override the value in NV-RAM. This seems to do the opposite. If you're implementing NV-RAM in a different way that is common for the driver in question, I'd prefer to see you implement some kind of callback mechanism in the driver. This will ensure proper flow.

Quoted 12 lines
board/cm-t35/cm-t35.c new file +11 -0
+
+/*
+ * Routine: board_eth_init
+ * Description: initialize module and base-board Ethernet chips
+ */
+int board_eth_init(bd_t *bis)
+{
+	int err1 = 0, err2 = 0;
+
+#ifdef CONFIG_SMC911X
+	err1 = handle_mac_address();

board/cm-t35/cm-t35.c line 191

Quoted 10 lines
board/cm-t35/cm-t35.c new file +10 -0
+	err2 = smc911x_initialize(0, CM_T35_SMC911X_BASE);
+
+	if (err1 && !err2)
+		printf("CM-T35: No MAC address found\n");
+
+	err1 = smc911x_initialize(1, SB_T35_SMC911X_BASE);
+
+	/* run eth_init to set up MAC address prior to OS boot */
+	if (!err1 || !err2)
+		err1 = eth_init(bis);

We don't touch hardware that isn't used by U-boot. You'll find all sorts of threads in the archive about this.

board/cm-t35/cm-t35.c line 195

Quoted 5 lines
board/cm-t35/cm-t35.c new file +4 -0
+	else
+		err1 = -1;
+#endif
+	return err1;

As I believe others have mentioned, return the number of interfaces initialized (will be 0 or 1).

<snip>

board/cm-t35/cm-t35.c

Quoted 7 lines
board/cm-t35/cm-t35.c new file +6 -0
+/* BOOTP fields */
+#define CONFIG_BOOTP_SUBNETMASK		0x00000001
+#define CONFIG_BOOTP_GATEWAY		0x00000002
+#define CONFIG_BOOTP_HOSTNAME		0x00000004
+#define CONFIG_BOOTP_BOOTPATH		0x00000010
+

Please don't set any default network parameters.

regards,
Ben

#4 lore raw

PATCH v2 1/1 OMAP3: add CM-T35 board

Quoted 185 lines · Ben Warren
Quoted 10 lines · Mike Rapoport

Add CM-T35 board support

--
v2 changes:
- rename board config file from omap3_cm-t35.h to cm-t35.h
- remove SZ_xx references
- add MAKEALL/MAINTEINERS entries
--

<snip>

Quoted 42 lines
board/cm-t35/cm-t35.c new file +38 -0
@@ -0,0 +1,196 @@
+/*
+ * (C) Copyright 2009
+ * CompuLab, Ltd. <www.compulab.co.il>
+ *
+ * Authors :
+ * ? Igor Vaisbein <[email protected]>
+ * ? Mike Rapoport <[email protected]>
+ *
+ * Derived from omap3evm and Beagle Board by
+ * ? Manikandan Pillai <[email protected]>
+ * ? Richard Woodruff <[email protected]>
+ * ? Syed Mohammed Khasim <[email protected]>
+ *
+ * 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 <netdev.h>
+#include <net.h>
+#include <i2c.h>
+#include <twl4030.h>
+

board/cm-t35/cm-t35.c line 48

Quoted 10 lines
board/cm-t35/cm-t35.c new file +10 -0
+#include <asm/io.h>
+#include <asm/arch/mem.h>
+#include <asm/arch/mux.h>
+#include <asm/arch/sys_proto.h>
+#include <asm/mach-types.h>
+
+#include "cm-t35.h"
+
+#define CM_T35_SMC911X_BASE ?0x2C000000
+#define SB_T35_SMC911X_BASE ?(CM_T35_SMC911X_BASE + (16 << 20))

Please follow convention and put this stuff in include/configs/board.h

Quoted 120 lines
board/cm-t35/cm-t35.c new file +120 -0
+
+static u32 gpmc_net_config[GPMC_MAX_REG] = {
+ ? ? NET_GPMC_CONFIG1,
+ ? ? NET_GPMC_CONFIG2,
+ ? ? NET_GPMC_CONFIG3,
+ ? ? NET_GPMC_CONFIG4,
+ ? ? NET_GPMC_CONFIG5,
+ ? ? NET_GPMC_CONFIG6,
+ ? ? 0
+};
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*
+ * Routine: setup_net_chip
+ * Description: Setting up the configuration GPMC registers specific to the
+ * ? ? ? ? ? Ethernet hardware.
+ */
+static void setup_net_chip(void)
+{
+ ? ? struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE;
+
+ ? ? enable_gpmc_cs_config(gpmc_net_config, &gpmc_cfg->cs[5],
+ ? ? ? ? ? ? ? ? ? ? ? ? ? CM_T35_SMC911X_BASE, GPMC_SIZE_16M);
+ ? ? enable_gpmc_cs_config(gpmc_net_config, &gpmc_cfg->cs[4],
+ ? ? ? ? ? ? ? ? ? ? ? ? ? SB_T35_SMC911X_BASE, GPMC_SIZE_16M);
+
+ ? ? /* Enable off mode for NWE in PADCONF_GPMC_NWE register */
+ ? ? writew(readw(&ctrl_base->gpmc_nwe) | 0x0E00, &ctrl_base->gpmc_nwe);
+
+ ? ? /* Enable off mode for NOE in PADCONF_GPMC_NADV_ALE register */
+ ? ? writew(readw(&ctrl_base->gpmc_noe) | 0x0E00, &ctrl_base->gpmc_noe);
+
+ ? ? /* Enable off mode for ALE in PADCONF_GPMC_NADV_ALE register */
+ ? ? writew(readw(&ctrl_base->gpmc_nadv_ale) | 0x0E00,
+ ? ? ? ? ? ? &ctrl_base->gpmc_nadv_ale);
+
+ ? ? /* Reset the ethernet controller via TPS65930 GPIO */
+ ? ? /* Set GPIO1 of TPS65930 as output */
+ ? ? twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02,
+ ? ? ? ? ? ? ? ? ? ? ? ? ?TWL4030_BASEADD_GPIO+0x03);
+ ? ? /* Send a pulse on the GPIO pin */
+ ? ? twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02,
+ ? ? ? ? ? ? ? ? ? ? ? ? ?TWL4030_BASEADD_GPIO+0x0C);
+ ? ? udelay(1);
+ ? ? twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02,
+ ? ? ? ? ? ? ? ? ? ? ? ? ?TWL4030_BASEADD_GPIO+0x09);
+ ? ? udelay(1);
+ ? ? twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02,
+ ? ? ? ? ? ? ? ? ? ? ? ? ?TWL4030_BASEADD_GPIO+0x0C);
+
+}
+
+/*
+ * Routine: board_init
+ * Description: Early hardware init.
+ */
+int board_init(void)
+{
+ ? ? gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
+
+ ? ? /* board id for Linux */
+ ? ? gd->bd->bi_arch_number = MACH_TYPE_CM_T35;
+ ? ? /* boot param addr */
+ ? ? gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
+
+ ? ? return 0;
+}
+
+/*
+ * Routine: misc_init_r
+ * Description: Init ethernet (done here so udelay works)
+ */
+int misc_init_r(void)
+{
+
+#ifdef CONFIG_DRIVER_OMAP34XX_I2C
+ ? ? i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE);
+#endif
+
+#if defined(CONFIG_CMD_NET)
+ ? ? setup_net_chip();
+#endif
+
+ ? ? dieid_num_r();
+
+ ? ? return 0;
+}
+
+/*
+ * Routine: set_muxconf_regs
+ * Description: Setting up the configuration Mux registers specific to the
+ * ? ? ? ? ? hardware. Many pins need to be moved from protect to primary
+ * ? ? ? ? ? mode.
+ */
+void set_muxconf_regs(void)
+{
+ ? ? MUX_CM_T35();
+}
+
+/*
+ * Routine: handle_mac_address
+ * Description: prepare MAC address for on-board Ethernet.
+ */
+static int handle_mac_address(void)
+{
+ ? ? unsigned char enetaddr[6];
+ ? ? int rc;
+
+ ? ? rc = eth_getenv_enetaddr("ethaddr", enetaddr);
+ ? ? if (rc)
+ ? ? ? ? ? ? return 0;
+
+ ? ? rc = i2c_read(0x50, 0, 1, enetaddr, 6);
+ ? ? if (rc)
+ ? ? ? ? ? ? return rc;
+
+ ? ? if (!is_valid_ether_addr(enetaddr))
+ ? ? ? ? ? ? return -1;
+
Quoted 8 lines

board/cm-t35/cm-t35.c line 170

Quoted 3 lines
board/cm-t35/cm-t35.c new file +2 -0
+ ? ? return eth_setenv_enetaddr("ethaddr", enetaddr);
+}

the value in environment must be able to override the value in NV-RAM. This seems to do the opposite. ?If you're implementing NV-RAM in a different way that is common for the driver in question, I'd prefer to see you implement some kind of callback mechanism in the driver. ?This will ensure proper flow.

The driver assumes that there's an SROM attached to the chip. Unfortunately, CM-T35 does not have the SROM and stores the MAC address in the U-Boot environment and a backup copy in a system EEPROM. The handle_mac_address function here checks is "ethaddr" is set and only otherwise reads the MAC address from the system EEPROM. Which is to my understanding complies with docs/README.enetaddr.

Quoted 16 lines
Quoted 16 lines
board/cm-t35/cm-t35.c new file +16 -0
+
+/*
+ * Routine: board_eth_init
+ * Description: initialize module and base-board Ethernet chips
+ */
+int board_eth_init(bd_t *bis)
+{
+ ? ? int err1 = 0, err2 = 0;
+
+#ifdef CONFIG_SMC911X
+ ? ? err1 = handle_mac_address();
+ ? ? err2 = smc911x_initialize(0, CM_T35_SMC911X_BASE);
+
+ ? ? if (err1 && !err2)
+ ? ? ? ? ? ? printf("CM-T35: No MAC address found\n");
+
Quoted 8 lines

board/cm-t35/cm-t35.c line 191

Quoted 6 lines
board/cm-t35/cm-t35.c new file +5 -0
+ ? ? err1 = smc911x_initialize(1, SB_T35_SMC911X_BASE);
+
+ ? ? /* run eth_init to set up MAC address prior to OS boot */
+ ? ? if (!err1 || !err2)
+ ? ? ? ? ? ? err1 = eth_init(bis);

We don't touch hardware that isn't used by U-boot. ?You'll find all sorts of threads in the archive about this.

I've already did :)
I'm not about to re-open the old discussions, so I'll remove the eth_init() call althought I'm not completely agree that this is the right thing to do.

Quoted 7 lines

board/cm-t35/cm-t35.c line 195

Quoted 5 lines
board/cm-t35/cm-t35.c new file +4 -0
+ ? ? else
+ ? ? ? ? ? ? err1 = -1;
+#endif
+ ? ? return err1;

As I believe others have mentioned, return the number of interfaces initialized (will be 0 or 1).

Will fix.

Quoted 9 lines

<snip>

board/cm-t35/cm-t35.c

Quoted 7 lines
board/cm-t35/cm-t35.c new file +6 -0
+/* BOOTP fields */
+#define CONFIG_BOOTP_SUBNETMASK ? ? ? ? ? ? ?0x00000001
+#define CONFIG_BOOTP_GATEWAY ? ? ? ? 0x00000002
+#define CONFIG_BOOTP_HOSTNAME ? ? ? ? ? ? ? ?0x00000004
+#define CONFIG_BOOTP_BOOTPATH ? ? ? ? ? ? ? ?0x00000010
+

Please don't set any default network parameters.

Will fix.

Quoted 7 lines

regards,
Ben
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Signature · 2 lines
	Sincerely Yours,
		Mike.
#5 lore raw

PATCH v2 1/1 OMAP3: add CM-T35 board

In reply to Mike Rapoport

Dear Mike Rapoport,

Quoted 10 lines · In message <[email protected]> you wrote:

Add CM-T35 board support

--
v2 changes:
- rename board config file from omap3_cm-t35.h to cm-t35.h
- remove SZ_xx references
- add MAKEALL/MAINTEINERS entries
--

The Signed-off-by: line belongs _above_ the "--" line.

MAINTAINERS Stelian Pop <[email protected]> · line 682

Quoted 9 lines
MAINTAINERS +3 -0
@@ -677,6 +677,10 @@ Stelian Pop <[email protected]>
 	at91sam9263ek	ARM926EJS (AT91SAM9263 SoC)
 	at91sam9rlek	ARM926EJS (AT91SAM9RL SoC)
 
+Mike Rapoport <[email protected]>
+
+	omap3_cm-t35	ARM CORTEX-A8 (OMAP3xx SoC)

Please fix the board name.

board/cm-t35/cm-t35.c line 100

Quoted 10 lines
board/cm-t35/cm-t35.c new file +5 -0
new file mode 100644
index 0000000..b3eb087
+	udelay(1);
+	twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02,
+			     TWL4030_BASEADD_GPIO+0x0C);
+
+}

Delete this empty line, please (please check globally).

Quoted 1 line

+++ b/board/cm-t35/cm-t35.h

...

Quoted 3 lines

+#define MUX_CM_T35() \
+ /*SDRC*/\
+ MUX_VAL(CP(SDRC_D0), (IEN | PTD | DIS | M0)) /*SDRC_D0*/\

...
Indentation by TAB, please.

Quoted 2 lines

+++ b/board/cm-t35/config.mk

board/cm-t35/cm-t35.c new file +0 -0
@@ -0,0 +1,30 @@

...

board/cm-t35/cm-t35.c

Quoted 3 lines
board/cm-t35/cm-t35.c new file +2 -0
+# For use with external or internal boots.
+TEXT_BASE = 0x80e80000
\ No newline at end of file

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Please fix.

Quoted 5 lines
include/configs/cm-t35.h new file +0 -0
new file mode 100755
index 0000000..b881112

...

include/configs/cm-t35.h line 283

Quoted 8 lines
include/configs/cm-t35.h new file +8 -0
+#ifndef __ASSEMBLY__
+extern struct gpmc *gpmc_cfg;
+extern unsigned int boot_flash_base;
+extern volatile unsigned int boot_flash_env_addr;
+extern unsigned int boot_flash_off;
+extern unsigned int boot_flash_sec;
+extern unsigned int boot_flash_type;
+#endif

These should not be needed in your board config file. Please move to a more appropriate header.

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
Conquest is easy. Control is not.
	-- Kirk, "Mirror, Mirror", stardate unknown
#6 lore raw

PATCH v2 1/1 OMAP3: add CM-T35 board

Dear Wolfgang,

Quoted 66 lines · Wolfgang Denk

Dear Mike Rapoport,

Quoted 10 lines · In message <[email protected]> you wrote:

Add CM-T35 board support

--
v2 changes:
- rename board config file from omap3_cm-t35.h to cm-t35.h
- remove SZ_xx references
- add MAKEALL/MAINTEINERS entries
--

The Signed-off-by: line belongs _above_ the "--" line.

MAINTAINERS Stelian Pop <[email protected]> · line 682

Quoted 9 lines
MAINTAINERS +3 -0
@@ -677,6 +677,10 @@ Stelian Pop <[email protected]>
 	at91sam9263ek	ARM926EJS (AT91SAM9263 SoC)
 	at91sam9rlek	ARM926EJS (AT91SAM9RL SoC)
 
+Mike Rapoport <[email protected]>
+
+	omap3_cm-t35	ARM CORTEX-A8 (OMAP3xx SoC)

Please fix the board name.

board/cm-t35/cm-t35.c line 100

Quoted 10 lines
board/cm-t35/cm-t35.c new file +5 -0
new file mode 100644
index 0000000..b3eb087
+	udelay(1);
+	twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, 0x02,
+			     TWL4030_BASEADD_GPIO+0x0C);
+
+}

Delete this empty line, please (please check globally).

Quoted 1 line

+++ b/board/cm-t35/cm-t35.h

...

Quoted 3 lines

+#define MUX_CM_T35() \
+ /*SDRC*/\
+ MUX_VAL(CP(SDRC_D0), (IEN | PTD | DIS | M0)) /*SDRC_D0*/\

...
Indentation by TAB, please.

Quoted 2 lines

+++ b/board/cm-t35/config.mk

board/cm-t35/cm-t35.c new file +0 -0
@@ -0,0 +1,30 @@

...

board/cm-t35/cm-t35.c

Quoted 3 lines
board/cm-t35/cm-t35.c new file +2 -0
+# For use with external or internal boots.
+TEXT_BASE = 0x80e80000
\ No newline at end of file

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Please fix.

Quoted 5 lines
include/configs/cm-t35.h new file +0 -0
new file mode 100755
index 0000000..b881112

...

Quoted 11 lines

include/configs/cm-t35.h line 283

Quoted 8 lines
include/configs/cm-t35.h new file +8 -0
+#ifndef __ASSEMBLY__
+extern struct gpmc *gpmc_cfg;
+extern unsigned int boot_flash_base;
+extern volatile unsigned int boot_flash_env_addr;
+extern unsigned int boot_flash_off;
+extern unsigned int boot_flash_sec;
+extern unsigned int boot_flash_type;
+#endif

These should not be needed in your board config file. Please move to a more appropriate header.

This is what all other omap3 board do... Moving these requires some rework of common omap3 code and updates to all omap3 boards.

Quoted 5 lines

Best regards,

Wolfgang Denk

Signature · 2 lines
Sincerely yours,
Mike.