Re: [U-Boot] [PATCH V2] MX28: Add SchulerControl SC_SPS_1 platform

2012-08-07 Thread Stefano Babic
On 05/08/2012 12:37, Marek Vasut wrote:
 This i.MX28 platform supports the following:
 * 2x FEC ethernet
 * USB on USBH0
 * I2C EEPROM
 * SPI NVRAM
 * LEDs
 
 Signed-off-by: Marek Vasut ma...@denx.de
 ---
  board/schulercontrol/sc_sps_1/Makefile   |   47 +++
  board/schulercontrol/sc_sps_1/sc_sps_1.c |  113 
  board/schulercontrol/sc_sps_1/spl_boot.c |  165 
  boards.cfg   |1 +
  include/configs/sc_sps_1.h   |  208 
 ++
  5 files changed, 534 insertions(+)
  create mode 100644 board/schulercontrol/sc_sps_1/Makefile
  create mode 100644 board/schulercontrol/sc_sps_1/sc_sps_1.c
  create mode 100644 board/schulercontrol/sc_sps_1/spl_boot.c
  create mode 100644 include/configs/sc_sps_1.h
 

You forget the MAINTAINER file

Stefano



-- 
=
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH V2] MX28: Add SchulerControl SC_SPS_1 platform

2012-08-05 Thread Marek Vasut
This i.MX28 platform supports the following:
* 2x FEC ethernet
* USB on USBH0
* I2C EEPROM
* SPI NVRAM
* LEDs

Signed-off-by: Marek Vasut ma...@denx.de
---
 board/schulercontrol/sc_sps_1/Makefile   |   47 +++
 board/schulercontrol/sc_sps_1/sc_sps_1.c |  113 
 board/schulercontrol/sc_sps_1/spl_boot.c |  165 
 boards.cfg   |1 +
 include/configs/sc_sps_1.h   |  208 ++
 5 files changed, 534 insertions(+)
 create mode 100644 board/schulercontrol/sc_sps_1/Makefile
 create mode 100644 board/schulercontrol/sc_sps_1/sc_sps_1.c
 create mode 100644 board/schulercontrol/sc_sps_1/spl_boot.c
 create mode 100644 include/configs/sc_sps_1.h

V2: Removed u-boot.bd in favor of shared file

diff --git a/board/schulercontrol/sc_sps_1/Makefile 
b/board/schulercontrol/sc_sps_1/Makefile
new file mode 100644
index 000..24a1003
--- /dev/null
+++ b/board/schulercontrol/sc_sps_1/Makefile
@@ -0,0 +1,47 @@
+#
+# (C) Copyright 2000-2012
+# Wolfgang Denk, DENX Software Engineering, w...@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
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+ifndef CONFIG_SPL_BUILD
+COBJS  := sc_sps_1.o
+else
+COBJS  := spl_boot.o
+endif
+
+SRCS   := $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+
+$(LIB):$(obj).depend $(OBJS)
+   $(call cmd_link_o_target, $(OBJS))
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/schulercontrol/sc_sps_1/sc_sps_1.c 
b/board/schulercontrol/sc_sps_1/sc_sps_1.c
new file mode 100644
index 000..0fee289
--- /dev/null
+++ b/board/schulercontrol/sc_sps_1/sc_sps_1.c
@@ -0,0 +1,113 @@
+/*
+ * SchulerControl GmbH, SC_SPS_1 module
+ *
+ * Copyright (C) 2012 Marek Vasut ma...@denx.de
+ * on behalf of DENX Software Engineering GmbH
+ *
+ * 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 asm/gpio.h
+#include asm/io.h
+#include asm/arch/imx-regs.h
+#include asm/arch/iomux-mx28.h
+#include asm/arch/clock.h
+#include asm/arch/sys_proto.h
+#include linux/mii.h
+#include miiphy.h
+#include netdev.h
+#include errno.h
+
+DECLARE_GLOBAL_DATA_PTR;
+
+/*
+ * Functions
+ */
+int board_early_init_f(void)
+{
+   /* IO0 clock at 480MHz */
+   mx28_set_ioclk(MXC_IOCLK0, 48);
+   /* IO1 clock at 480MHz */
+   mx28_set_ioclk(MXC_IOCLK1, 48);
+
+   /* SSP0 clock at 96MHz */
+   mx28_set_sspclk(MXC_SSPCLK0, 96000, 0);
+   /* SSP2 clock at 96MHz */
+   mx28_set_sspclk(MXC_SSPCLK2, 96000, 0);
+
+#ifdef CONFIG_CMD_USB
+   mxs_iomux_setup_pad(MX28_PAD_AUART1_CTS__USB0_OVERCURRENT);
+   mxs_iomux_setup_pad(MX28_PAD_AUART2_TX__GPIO_3_9 |
+   MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL);
+   gpio_direction_output(MX28_PAD_AUART2_TX__GPIO_3_9, 1);
+#endif
+
+   return 0;
+}
+
+int board_init(void)
+{
+   /* Adress of boot parameters */
+   gd-bd-bi_boot_params = PHYS_SDRAM_1 + 0x100;
+
+   return 0;
+}
+
+int dram_init(void)
+{
+   return mx28_dram_init();
+}
+
+#ifdef CONFIG_CMD_MMC
+int board_mmc_init(bd_t *bis)
+{
+   return mxsmmc_initialize(bis, 0, NULL);
+}
+#endif
+
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+