Re: [U-Boot] [PATCH v3] MX28: use a clear name for DDR2 initialization

2012-08-05 Thread Stefano Babic
On 28/07/2012 23:44, Otavio Salvador wrote:
 The mx28 prefix has been added to the initialization data and function
 so it is clear by which SoC it is used as i.MX233 will have a specific
 one. While on that, we also change it to static.
 
 Signed-off-by: Otavio Salvador ota...@ossystems.com.br
 ---
 Changes in v2:
 - use static for the allocation of memory initialization matrix
 
 Changes in v3:
 - change short-description prefix
 
  arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c |   12 ++--
  1 file changed, 6 insertions(+), 6 deletions(-)
 
 diff --git a/arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c 
 b/arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c
 index e17a4d7..cca1316 100644
 --- a/arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c
 +++ b/arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c
 @@ -31,7 +31,7 @@
  
  #include mx28_init.h
  
 -uint32_t dram_vals[] = {
 +static uint32_t mx28_dram_vals[] = {
   0x, 0x, 0x, 0x,
   0x, 0x, 0x, 0x,
   0x, 0x, 0x, 0x,
 @@ -88,14 +88,14 @@ void __mx28_adjust_memory_params(uint32_t *dram_vals)
  void mx28_adjust_memory_params(uint32_t *dram_vals)
   __attribute__((weak, alias(__mx28_adjust_memory_params)));
  
 -void init_m28_200mhz_ddr2(void)
 +void init_mx28_200mhz_ddr2(void)
  {
   int i;
  
 - mx28_adjust_memory_params(dram_vals);
 + mx28_adjust_memory_params(mx28_dram_vals);
  
 - for (i = 0; i  ARRAY_SIZE(dram_vals); i++)
 - writel(dram_vals[i], MXS_DRAM_BASE + (4 * i));
 + for (i = 0; i  ARRAY_SIZE(mx28_dram_vals); i++)
 + writel(mx28_dram_vals[i], MXS_DRAM_BASE + (4 * i));
  }
  
  void mx28_mem_init_clock(void)
 @@ -230,7 +230,7 @@ void mx28_mem_init(void)
   /* Clear START bit from DRAM_CTL16 */
   clrbits_le32(MXS_DRAM_BASE + 0x40, 1);
  
 - init_m28_200mhz_ddr2();
 + init_mx28_200mhz_ddr2();
  
   /* Clear SREFRESH bit from DRAM_CTL17 */
   clrbits_le32(MXS_DRAM_BASE + 0x44, 1);
 

Acked-by : Stefano Babic sba...@denx.de

Best regards,
Stefano Babic

-- 
=
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


Re: [U-Boot] [RFC PATCH 3/5] mxs: prefix register structs with 'mxs' prefix

2012-08-05 Thread Stefano Babic
On 05/08/2012 00:46, Marek Vasut wrote:
 Dear Otavio Salvador,
 
 On Sat, Aug 4, 2012 at 7:40 PM, Marek Vasut ma...@denx.de wrote:
 Signed-off-by: Otavio Salvador ota...@ossystems.com.br
 ---

  arch/arm/cpu/arm926ejs/mxs/clock.c   |   36 
  arch/arm/cpu/arm926ejs/mxs/mx28.c|   28 +++---
  arch/arm/cpu/arm926ejs/mxs/spl_lradc_init.c  |4 +-
  arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c|   24 +++---
  arch/arm/cpu/arm926ejs/mxs/spl_power_init.c  |  120

 [...]

 This one doesn't apply

 I will rebase it and resend. Should I rebase on imx/master or master?
 
 Stefano ... ?

Patches merged into the -next branch before the release are now in
imx/master. Rebasing on imx/master makes things for me easier...

Best regards,
Stefano Babic

-- 
=
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


Re: [U-Boot] [PATCH v3] MX28: use a clear name for DDR2 initialization

2012-08-05 Thread Stefano Babic
On 28/07/2012 23:44, Otavio Salvador wrote:
 The mx28 prefix has been added to the initialization data and function
 so it is clear by which SoC it is used as i.MX233 will have a specific
 one. While on that, we also change it to static.
 
 Signed-off-by: Otavio Salvador ota...@ossystems.com.br
 ---


Applied to u-boot-imx, thanks

Best regards,
Stefano Babic


-- 
=
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


Re: [U-Boot] [PATCH] rtc: imxdi: Initial support

2012-08-05 Thread Stefano Babic
On 20/07/2012 16:24, Benoît Thébaudeau wrote:
 Add support for Freescale's i.MX DryIce RTC, present on i.MX25.
 
 Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
 Cc: Wolfgang Denk w...@denx.de
 Cc: Stefano Babic sba...@denx.de
 ---

Hi Benoit,


just a few comments.

 +
 +/*
 + * Date  Time support for Freescale i.MX DryIce RTC
 + */
 +
 +#include common.h
 +#include command.h
 +#include rtc.h
 +
 +#if defined(CONFIG_CMD_DATE)
 +
 +#include asm/io.h
 +#include asm/arch/imx-regs.h
 +
 +/* DryIce Register Definitions */
 +
 +#define DTCMR 0x00   /* Time Counter MSB Reg */
 +#define DTCLR 0x04   /* Time Counter LSB Reg */
 +
 +#define DCAMR 0x08   /* Clock Alarm MSB Reg */
 +#define DCALR 0x0c   /* Clock Alarm LSB Reg */

U-Boot as rule does not allow usage of start address + offset to access
internal registers. Instead of that, please define a proper C structure
with the register's layout. This should be fixed globally for all read /
write accesses.

 +/*
 + * This function attempts to clear the dryice write-error flag.
 + *
 + * A dryice write error is similar to a bus fault and should not occur in
 + * normal operation.  Clearing the flag requires another write, so the root
 + * cause of the problem may need to be fixed before the flag can be cleared.
 + */
 +static void clear_write_error(void)
 +{
 + int cnt;
 +
 + puts(### Warning: RTC - Register write error!\n);
 +
 + /* clear the write error flag */
 + __raw_writel(DSR_WEF, IMX_DRYICE_BASE + DSR);

Ditto

 +int rtc_get(struct rtc_time *tmp)
 +{
 + unsigned long now;
 + int rc;
 +
 + rc = di_init();

Why is di_init always called ? Should be not checked if it is was
already initialized and the function should be called only once ?

Best regards,
Stefano Babic

-- 
=
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


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

2012-08-05 Thread Stefano Babic
On 01/08/2012 15:14, Marek Vasut wrote:
 This i.MX28 platform supports the following:
 * 2x FEC ethernet
 * USB on USBH0
 * I2C EEPROM
 * SPI NVRAM
 * LEDs
 

Hi Marek,

 +#
 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)
 +{
 + struct mx28_clkctrl_regs *clkctrl_regs =
 + (struct mx28_clkctrl_regs *)MXS_CLKCTRL_BASE;
 + int ret;
 +
 + ret = cpu_eth_init(bis);
 +
 + clrsetbits_le32(clkctrl_regs-hw_clkctrl_enet,
 + CLKCTRL_ENET_TIME_SEL_MASK,
 + CLKCTRL_ENET_TIME_SEL_RMII_CLK | CLKCTRL_ENET_CLK_OUT_EN);
 +
 + ret = fecmxc_initialize_multi(bis, 0, 0, MXS_ENET0_BASE);
 + if (ret) {
 + printf(FEC MXS: Unable to init FEC0\n);
 + return ret;
 + }
 +
 + ret = fecmxc_initialize_multi(bis, 1, 1, MXS_ENET1_BASE);
 + if (ret) {
 + printf(FEC MXS: Unable to init FEC1\n);
 + return ret;
 + }
 +
 + return ret;
 +}
 +
 +#endif
 diff --git a/board/schulercontrol/sc_sps_1/spl_boot.c 
 b/board/schulercontrol/sc_sps_1/spl_boot.c
 new file mode 100644
 index 000..4d2151d
 --- /dev/null
 +++ b/board/schulercontrol/sc_sps_1/spl_boot.c
 @@ -0,0 +1,165 @@
 +/*
 + * SchulerControl GmbH, SC_SPS_1 module setup
 + *
 + * 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 config.h
 +#include asm/io.h
 +#include asm/arch/iomux-mx28.h
 +#include asm/arch/imx-regs.h
 +#include asm/arch/sys_proto.h
 +
 +#define  

Re: [U-Boot] [PATCH] mx28evk: Turn on caches

2012-08-05 Thread Stefano Babic
On 31/07/2012 20:10, Fabio Estevam wrote:
 Turn on data and instruction caches.
 
 Signed-off-by: Fabio Estevam fabio.este...@freescale.com
 ---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

-- 
=
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


Re: [U-Boot] The way the list manages patch submission

2012-08-05 Thread Alexander Holler


Am 04.08.2012 18:55, schrieb Karl O. Pinc:


So perhaps the u-boot list default that has
duplicate elimination turned on,
where other lists do not, is factor contributing
to the confusion.  I've never had


Some mail-servers have that feature enabled by default too. E.g. 
cyrus-imapd (called duplicate delivery suppression there). So if you get 
a mail by cc and from a list, usually the one from list doesn't show up 
because it is delivered after the cc'ed one.


Regards,

Alexander
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/2] gpio: add gpio api support to mx27

2012-08-05 Thread Philippe Reynes
Signed-off-by: Philippe Reynes trem...@yahoo.fr
---
 arch/arm/cpu/arm926ejs/mx27/generic.c |   11 +++---
 arch/arm/include/asm/arch-mx27/gpio.h |   55 +
 arch/arm/include/asm/arch-mx27/imx-regs.h |   30 
 drivers/gpio/mxc_gpio.c   |8 +++--
 4 files changed, 73 insertions(+), 31 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-mx27/gpio.h

diff --git a/arch/arm/cpu/arm926ejs/mx27/generic.c 
b/arch/arm/cpu/arm926ejs/mx27/generic.c
index 65c4813..41bb84b 100644
--- a/arch/arm/cpu/arm926ejs/mx27/generic.c
+++ b/arch/arm/cpu/arm926ejs/mx27/generic.c
@@ -24,6 +24,7 @@
 #include asm/io.h
 #include asm/arch/imx-regs.h
 #include asm/arch/clock.h
+#include asm/arch/gpio.h
 #ifdef CONFIG_MXC_MMC
 #include asm/arch/mxcmmc.h
 #endif
@@ -209,7 +210,7 @@ int cpu_mmc_init(bd_t *bis)
 
 void imx_gpio_mode(int gpio_mode)
 {
-   struct gpio_regs *regs = (struct gpio_regs *)IMX_GPIO_BASE;
+   struct gpio_port_regs *regs = (struct gpio_port_regs *)IMX_GPIO_BASE;
unsigned int pin = gpio_mode  GPIO_PIN_MASK;
unsigned int port = (gpio_mode  GPIO_PORT_MASK)  GPIO_PORT_SHIFT;
unsigned int ocr = (gpio_mode  GPIO_OCR_MASK)  GPIO_OCR_SHIFT;
@@ -228,11 +229,11 @@ void imx_gpio_mode(int gpio_mode)
 
/* Data direction */
if (gpio_mode  GPIO_OUT) {
-   writel(readl(regs-port[port].ddir) | 1  pin,
-   regs-port[port].ddir);
+   writel(readl(regs-port[port].gpio_dir) | 1  pin,
+   regs-port[port].gpio_dir);
} else {
-   writel(readl(regs-port[port].ddir)  ~(1  pin),
-   regs-port[port].ddir);
+   writel(readl(regs-port[port].gpio_dir)  ~(1  pin),
+   regs-port[port].gpio_dir);
}
 
/* Primary / alternate function */
diff --git a/arch/arm/include/asm/arch-mx27/gpio.h 
b/arch/arm/include/asm/arch-mx27/gpio.h
new file mode 100644
index 000..965b584
--- /dev/null
+++ b/arch/arm/include/asm/arch-mx27/gpio.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2012
+ * Philippe Reynes trem...@yahoo.fr
+ *
+ * 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
+ */
+
+
+#ifndef __ASM_ARCH_MX27_GPIO_H
+#define __ASM_ARCH_MX27_GPIO_H
+
+/* GPIO registers */
+struct gpio_regs {
+   u32 gpio_dir; /* DDIR */
+   u32 ocr1;
+   u32 ocr2;
+   u32 iconfa1;
+   u32 iconfa2;
+   u32 iconfb1;
+   u32 iconfb2;
+   u32 gpio_dr; /* DR */
+   u32 gius;
+   u32 ssr;
+   u32 icr1;
+   u32 icr2;
+   u32 imr;
+   u32 isr;
+   u32 gpr;
+   u32 swr;
+   u32 puen;
+   u32 res[0x2f];
+};
+
+/* This structure is used by the function imx_gpio_mode */
+struct gpio_port_regs {
+   struct gpio_regs port[6];
+};
+
+#endif
diff --git a/arch/arm/include/asm/arch-mx27/imx-regs.h 
b/arch/arm/include/asm/arch-mx27/imx-regs.h
index ced5b2a..4035d2b 100644
--- a/arch/arm/include/asm/arch-mx27/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx27/imx-regs.h
@@ -162,29 +162,6 @@ struct gpt_regs {
 #define PORTE 4
 #define PORTF 5
 
-struct gpio_regs {
-   struct {
-   u32 ddir;
-   u32 ocr1;
-   u32 ocr2;
-   u32 iconfa1;
-   u32 iconfa2;
-   u32 iconfb1;
-   u32 iconfb2;
-   u32 dr;
-   u32 gius;
-   u32 ssr;
-   u32 icr1;
-   u32 icr2;
-   u32 imr;
-   u32 isr;
-   u32 gpr;
-   u32 swr;
-   u32 puen;
-   u32 res[0x2f];
-   } port[6];
-};
-
 /* IIM Control Registers */
 struct iim_regs {
u32 iim_stat;
@@ -471,6 +448,13 @@ struct fuse_bank0_regs {
 #define TSTAT_CAPT (1  1)/* Capture event */
 #define TSTAT_COMP 1   /* Compare event */
 
+#define GPIO1_BASE_ADDR 0x10015000
+#define GPIO2_BASE_ADDR 0x10015100
+#define GPIO3_BASE_ADDR 0x10015200
+#define GPIO4_BASE_ADDR 0x10015300
+#define GPIO5_BASE_ADDR 0x10015400
+#define GPIO6_BASE_ADDR 0x10015500
+
 #define GPIO_PIN_MASK  0x1f
 
 #define GPIO_PORT_SHIFT5
diff 

[U-Boot] [PATCH 2/2] imx27lite: update with gpio api change

2012-08-05 Thread Philippe Reynes
Signed-off-by: Philippe Reynes trem...@yahoo.fr
---
 board/logicpd/imx27lite/imx27lite.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/board/logicpd/imx27lite/imx27lite.c 
b/board/logicpd/imx27lite/imx27lite.c
index 8a5015c..5bd3b68 100644
--- a/board/logicpd/imx27lite/imx27lite.c
+++ b/board/logicpd/imx27lite/imx27lite.c
@@ -23,12 +23,13 @@
 #include common.h
 #include asm/io.h
 #include asm/arch/imx-regs.h
+#include asm/arch/gpio.h
 
 DECLARE_GLOBAL_DATA_PTR;
 
 int board_init(void)
 {
-   struct gpio_regs *regs = (struct gpio_regs *)IMX_GPIO_BASE;
+   struct gpio_port_regs *regs = (struct gpio_port_regs *)IMX_GPIO_BASE;
 #if defined(CONFIG_SYS_NAND_LARGEPAGE)
struct system_control_regs *sc_regs =
(struct system_control_regs *)IMX_SYSTEM_CTL_BASE;
@@ -43,8 +44,8 @@ int board_init(void)
 #ifdef CONFIG_FEC_MXC
mx27_fec_init_pins();
imx_gpio_mode((GPIO_PORTC | GPIO_OUT | GPIO_PUEN | GPIO_GPIO | 31));
-   writel(readl(regs-port[PORTC].dr) | (1  31),
-   regs-port[PORTC].dr);
+   writel(readl(regs-port[PORTC].gpio_dr) | (1  31),
+   regs-port[PORTC].gpio_dr);
 #endif
 #ifdef CONFIG_MXC_MMC
 #if defined(CONFIG_MAGNESIUM)
-- 
1.7.4.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mx53loco: Define CONFIG_BOARD_LATE_INIT

2012-08-05 Thread Stefano Babic
On 05/08/2012 09:34, Stefano Babic wrote:
 On 31/07/2012 21:21, Fabio Estevam wrote:
 Define CONFIG_BOARD_LATE_INIT so that the serial console messages can be 
 redirected to the serial port.

 This is needed because in mx53loco.c we have:

 #ifdef CONFIG_BOARD_LATE_INIT
 int board_late_init(void)
 {
  setenv(stdout, serial);

  return 0;
 }
 #endif

 Signed-off-by: Fabio Estevam fabio.este...@freescale.com
 ---
  include/configs/mx53loco.h |1 +
  1 files changed, 1 insertions(+), 0 deletions(-)

 diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h
 index 0a25c7d..bd23387 100644
 --- a/include/configs/mx53loco.h
 +++ b/include/configs/mx53loco.h
 @@ -41,6 +41,7 @@
  #define CONFIG_SYS_MALLOC_LEN   (10 * 1024 * 1024)
  
  #define CONFIG_BOARD_EARLY_INIT_F
 +#define CONFIG_BOARD_LATE_INIT
 
 
 Applied to u-boot-imx, thank.
 
 This is a real fix - board does not run without it. According to our
 discussion in the thread, dropping setenv(stdout, serial) in code
 should be done in a separate patch.

Sorry Fabio - I was too fast. I thnked about and there is a better
solution. I drop your patch from u-boot-imx and I send a new on for
review, fixing the same issue.

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] MX5: mx53loco: do not overwrite the console

2012-08-05 Thread Stefano Babic
On this board, the console is always set to the serial line.
Do not allow to overwrite it when video is enabled.

Signed-off-by: Stefano Babic sba...@denx.de
CC: Fabio Estevam fabio.este...@freescale.com
---
 board/freescale/mx53loco/mx53loco.c |   12 ++--
 include/configs/mx53loco.h  |2 ++
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/board/freescale/mx53loco/mx53loco.c 
b/board/freescale/mx53loco/mx53loco.c
index cbdcfad..7cfb3f4 100644
--- a/board/freescale/mx53loco/mx53loco.c
+++ b/board/freescale/mx53loco/mx53loco.c
@@ -495,14 +495,14 @@ int print_cpuinfo(void)
return 0;
 }
 
-#ifdef CONFIG_BOARD_LATE_INIT
-int board_late_init(void)
+/*
+ * Do not overwrite the console
+ * Use always serial for U-Boot console
+ */
+int overwrite_console(void)
 {
-   setenv(stdout, serial);
-
-   return 0;
+   return 1;
 }
-#endif
 
 int board_init(void)
 {
diff --git a/include/configs/mx53loco.h b/include/configs/mx53loco.h
index 0a25c7d..f4b43ee 100644
--- a/include/configs/mx53loco.h
+++ b/include/configs/mx53loco.h
@@ -222,6 +222,8 @@
 #define CONFIG_VIDEO_IPUV3
 #define CONFIG_CFB_CONSOLE
 #define CONFIG_VGA_AS_SINGLE_DEVICE
+#define CONFIG_SYS_CONSOLE_IS_IN_ENV
+#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
 #define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_SPLASH_SCREEN
 #define CONFIG_BMP_16BPP
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2012-08-05 Thread Marek Vasut
Dear Stefano Babic,

[...]

  diff --git a/board/schulercontrol/sc_sps_1/u-boot.bd
  b/board/schulercontrol/sc_sps_1/u-boot.bd new file mode 100644
  index 000..c60615a
  --- /dev/null
  +++ b/board/schulercontrol/sc_sps_1/u-boot.bd
  @@ -0,0 +1,14 @@
  +sources {
  +   u_boot_spl=spl/u-boot-spl.bin;
  +   u_boot=u-boot.bin;
  +}
  +
  +section (0) {
  +   load u_boot_spl  0x;
  +   load ivt (entry = 0x0014)  0x8000;
  +   hab call 0x8000;
  +
  +   load u_boot  0x4100;
  +   load ivt (entry = 0x4100)  0x8000;
  +   hab call 0x8000;
  +}
 
 This is the fourth copy of the same file in u-boot. Do we have really no
 chance to share it among boards ?

Given that we're coliding with Otavio with every single patch, do you prefer to 
apply this one and do a separate patch || move and repost?

 Best regards,
 Stefano Babic

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] MX28: Move the u-boot.bd info CPUDIR/SOCDIR

2012-08-05 Thread Marek Vasut
This gets us rid of duplication of the same file.

Signed-off-by: Marek Vasut ma...@denx.de
Cc: Stefano Babic sba...@denx.de
---
 Makefile  |2 +-
 arch/arm/cpu/arm926ejs/mx28/u-boot.bd |   14 ++
 board/bluegiga/apx4devkit/u-boot.bd   |   14 --
 board/denx/m28evk/u-boot.bd   |   14 --
 board/freescale/mx28evk/u-boot.bd |   14 --
 5 files changed, 15 insertions(+), 43 deletions(-)
 create mode 100644 arch/arm/cpu/arm926ejs/mx28/u-boot.bd
 delete mode 100644 board/bluegiga/apx4devkit/u-boot.bd
 delete mode 100644 board/denx/m28evk/u-boot.bd
 delete mode 100644 board/freescale/mx28evk/u-boot.bd

diff --git a/Makefile b/Makefile
index eb37ea1..81b8c87 100644
--- a/Makefile
+++ b/Makefile
@@ -453,7 +453,7 @@ $(obj)u-boot.ais:   $(obj)spl/u-boot-spl.bin 
$(obj)u-boot.bin
rm $(obj)spl/u-boot-spl{,-pad}.ais
 
 $(obj)u-boot.sb:   $(obj)u-boot.bin $(obj)spl/u-boot-spl.bin
-   elftosb -zdf imx28 -c $(TOPDIR)/board/$(BOARDDIR)/u-boot.bd \
+   elftosb -zdf imx28 -c $(TOPDIR)/$(CPUDIR)/$(SOC)/u-boot.bd \
-o $(obj)u-boot.sb
 
 # On x600 (SPEAr600) U-Boot is appended to U-Boot SPL.
diff --git a/arch/arm/cpu/arm926ejs/mx28/u-boot.bd 
b/arch/arm/cpu/arm926ejs/mx28/u-boot.bd
new file mode 100644
index 000..c60615a
--- /dev/null
+++ b/arch/arm/cpu/arm926ejs/mx28/u-boot.bd
@@ -0,0 +1,14 @@
+sources {
+   u_boot_spl=spl/u-boot-spl.bin;
+   u_boot=u-boot.bin;
+}
+
+section (0) {
+   load u_boot_spl  0x;
+   load ivt (entry = 0x0014)  0x8000;
+   hab call 0x8000;
+
+   load u_boot  0x4100;
+   load ivt (entry = 0x4100)  0x8000;
+   hab call 0x8000;
+}
diff --git a/board/bluegiga/apx4devkit/u-boot.bd 
b/board/bluegiga/apx4devkit/u-boot.bd
deleted file mode 100644
index c60615a..000
--- a/board/bluegiga/apx4devkit/u-boot.bd
+++ /dev/null
@@ -1,14 +0,0 @@
-sources {
-   u_boot_spl=spl/u-boot-spl.bin;
-   u_boot=u-boot.bin;
-}
-
-section (0) {
-   load u_boot_spl  0x;
-   load ivt (entry = 0x0014)  0x8000;
-   hab call 0x8000;
-
-   load u_boot  0x4100;
-   load ivt (entry = 0x4100)  0x8000;
-   hab call 0x8000;
-}
diff --git a/board/denx/m28evk/u-boot.bd b/board/denx/m28evk/u-boot.bd
deleted file mode 100644
index c60615a..000
--- a/board/denx/m28evk/u-boot.bd
+++ /dev/null
@@ -1,14 +0,0 @@
-sources {
-   u_boot_spl=spl/u-boot-spl.bin;
-   u_boot=u-boot.bin;
-}
-
-section (0) {
-   load u_boot_spl  0x;
-   load ivt (entry = 0x0014)  0x8000;
-   hab call 0x8000;
-
-   load u_boot  0x4100;
-   load ivt (entry = 0x4100)  0x8000;
-   hab call 0x8000;
-}
diff --git a/board/freescale/mx28evk/u-boot.bd 
b/board/freescale/mx28evk/u-boot.bd
deleted file mode 100644
index c60615a..000
--- a/board/freescale/mx28evk/u-boot.bd
+++ /dev/null
@@ -1,14 +0,0 @@
-sources {
-   u_boot_spl=spl/u-boot-spl.bin;
-   u_boot=u-boot.bin;
-}
-
-section (0) {
-   load u_boot_spl  0x;
-   load ivt (entry = 0x0014)  0x8000;
-   hab call 0x8000;
-
-   load u_boot  0x4100;
-   load ivt (entry = 0x4100)  0x8000;
-   hab call 0x8000;
-}
-- 
1.7.10.4

___
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)
+{
+   

Re: [U-Boot] [PATCH] MX28: Move the u-boot.bd info CPUDIR/SOCDIR

2012-08-05 Thread Stefano Babic
On 05/08/2012 12:36, Marek Vasut wrote:
 This gets us rid of duplication of the same file.
 
 Signed-off-by: Marek Vasut ma...@denx.de
 Cc: Stefano Babic sba...@denx.de
 ---
  Makefile  |2 +-
  arch/arm/cpu/arm926ejs/mx28/u-boot.bd |   14 ++
  board/bluegiga/apx4devkit/u-boot.bd   |   14 --
  board/denx/m28evk/u-boot.bd   |   14 --
  board/freescale/mx28evk/u-boot.bd |   14 --
  5 files changed, 15 insertions(+), 43 deletions(-)
  create mode 100644 arch/arm/cpu/arm926ejs/mx28/u-boot.bd
  delete mode 100644 board/bluegiga/apx4devkit/u-boot.bd
  delete mode 100644 board/denx/m28evk/u-boot.bd
  delete mode 100644 board/freescale/mx28evk/u-boot.bd
 

Acked-by: Stefano Babic sba...@denx.de

Best regards,
Stefano Babic

-- 
=
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


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

2012-08-05 Thread Stefano Babic
On 05/08/2012 12:14, Marek Vasut wrote:
 Dear Stefano Babic,
 

Hi Marek,

 This is the fourth copy of the same file in u-boot. Do we have really no
 chance to share it among boards ?
 
 Given that we're coliding with Otavio with every single patch, do you prefer 
 to 
 apply this one and do a separate patch || move and repost?

You have already sent patch to factorize u-boot.bd. I will apply it soon.

So please send V2 of this patch dropping u-boot.sb

Best regards,
Stefano Babic


-- 
=
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] OMAP3: fix DRAM size for IGEP-based boards.

2012-08-05 Thread Enric Balletbo i Serra
The total RAM size of the IGEP-based boards is 512MiB not 1GiB, the
LPDDR memory consist on two dies of 256MiB.

Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
---
 board/isee/igep0020/igep0020.c |6 +++---
 board/isee/igep0030/igep0030.c |6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/board/isee/igep0020/igep0020.c b/board/isee/igep0020/igep0020.c
index a4d099a..a8257a3 100644
--- a/board/isee/igep0020/igep0020.c
+++ b/board/isee/igep0020/igep0020.c
@@ -77,19 +77,19 @@ void get_board_mem_timings(u32 *mcfg, u32 *ctrla, u32 
*ctrlb, u32 *rfr_ctrl,
 {
*mr = MICRON_V_MR_165;
 #ifdef CONFIG_BOOT_NAND
-   *mcfg = MICRON_V_MCFG_200(512  20);
+   *mcfg = MICRON_V_MCFG_200(256  20);
*ctrla = MICRON_V_ACTIMA_200;
*ctrlb = MICRON_V_ACTIMB_200;
*rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz;
 #else
if (get_cpu_family() == CPU_OMAP34XX) {
-   *mcfg = NUMONYX_V_MCFG_165(512  20);
+   *mcfg = NUMONYX_V_MCFG_165(256  20);
*ctrla = NUMONYX_V_ACTIMA_165;
*ctrlb = NUMONYX_V_ACTIMB_165;
*rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz;
 
} else {
-   *mcfg = NUMONYX_V_MCFG_200(512  20);
+   *mcfg = NUMONYX_V_MCFG_200(256  20);
*ctrla = NUMONYX_V_ACTIMA_200;
*ctrlb = NUMONYX_V_ACTIMB_200;
*rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz;
diff --git a/board/isee/igep0030/igep0030.c b/board/isee/igep0030/igep0030.c
index 4f8b645..107cb7f 100644
--- a/board/isee/igep0030/igep0030.c
+++ b/board/isee/igep0030/igep0030.c
@@ -64,19 +64,19 @@ void get_board_mem_timings(u32 *mcfg, u32 *ctrla, u32 
*ctrlb, u32 *rfr_ctrl,
 {
*mr = MICRON_V_MR_165;
 #ifdef CONFIG_BOOT_NAND
-   *mcfg = MICRON_V_MCFG_200(512  20);
+   *mcfg = MICRON_V_MCFG_200(256  20);
*ctrla = MICRON_V_ACTIMA_200;
*ctrlb = MICRON_V_ACTIMB_200;
*rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz;
 #else
if (get_cpu_family() == CPU_OMAP34XX) {
-   *mcfg = NUMONYX_V_MCFG_165(512  20);
+   *mcfg = NUMONYX_V_MCFG_165(256  20);
*ctrla = NUMONYX_V_ACTIMA_165;
*ctrlb = NUMONYX_V_ACTIMB_165;
*rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz;
 
} else {
-   *mcfg = NUMONYX_V_MCFG_200(512  20);
+   *mcfg = NUMONYX_V_MCFG_200(256  20);
*ctrla = NUMONYX_V_ACTIMA_200;
*ctrlb = NUMONYX_V_ACTIMB_200;
*rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz;
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] rtc: imxdi: Initial support

2012-08-05 Thread Benoît Thébaudeau
On Sun, Aug 5, 2012 at 09:13:29 AM, Stefano Babic wrote:
 On 20/07/2012 16:24, Benoît Thébaudeau wrote:
  Add support for Freescale's i.MX DryIce RTC, present on i.MX25.
  
  Signed-off-by: Benoît Thébaudeau benoit.thebaud...@advansee.com
  Cc: Wolfgang Denk w...@denx.de
  Cc: Stefano Babic sba...@denx.de
  ---
 
 Hi Benoit,
 
 
 just a few comments.
 
  +
  +/*
  + * Date  Time support for Freescale i.MX DryIce RTC
  + */
  +
  +#include common.h
  +#include command.h
  +#include rtc.h
  +
  +#if defined(CONFIG_CMD_DATE)
  +
  +#include asm/io.h
  +#include asm/arch/imx-regs.h
  +
  +/* DryIce Register Definitions */
  +
  +#define DTCMR 0x00   /* Time Counter MSB Reg */
  +#define DTCLR 0x04   /* Time Counter LSB Reg */
  +
  +#define DCAMR 0x08   /* Clock Alarm MSB Reg */
  +#define DCALR 0x0c   /* Clock Alarm LSB Reg */
 
 U-Boot as rule does not allow usage of start address + offset to
 access
 internal registers. Instead of that, please define a proper C
 structure
 with the register's layout. This should be fixed globally for all
 read /
 write accesses.

OK, I'll do that.

  +/*
  + * This function attempts to clear the dryice write-error flag.
  + *
  + * A dryice write error is similar to a bus fault and should not
  occur in
  + * normal operation.  Clearing the flag requires another write, so
  the root
  + * cause of the problem may need to be fixed before the flag can
  be cleared.
  + */
  +static void clear_write_error(void)
  +{
  +   int cnt;
  +
  +   puts(### Warning: RTC - Register write error!\n);
  +
  +   /* clear the write error flag */
  +   __raw_writel(DSR_WEF, IMX_DRYICE_BASE + DSR);
 
 Ditto
 
  +int rtc_get(struct rtc_time *tmp)
  +{
  +   unsigned long now;
  +   int rc;
  +
  +   rc = di_init();
 
 Why is di_init always called ? Should be not checked if it is was
 already initialized and the function should be called only once ?

I think this can be done. I'll check that this does not cause any regression.
I think only the reset function should have to call di_init unconditionally.

Best regards,
Benoît
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] MX23/MX28 USB loader

2012-08-05 Thread Marek Vasut
Hi,

I developed the following thingie to load firmware onto MX28 via USB recovery. 
It's still very early development thingie, but might come handy.

http://git.bfuser.eu/?p=marex/mxsldr.git;a=summary

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/2] apx4devkit: Turn on caches

2012-08-05 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com

Turn on data and instruction caches.

Signed-off-by: Fabio Estevam fabio.este...@freescale.com
 include/configs/apx4devkit.h |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/include/configs/apx4devkit.h b/include/configs/apx4devkit.h
index 9e7ead5..1281ce4 100644
--- a/include/configs/apx4devkit.h
+++ b/include/configs/apx4devkit.h
@@ -33,8 +33,6 @@
 #define CONFIG_MACH_TYPE   MACH_TYPE_APX4DEVKIT
 
 #define CONFIG_SYS_NO_FLASH
-#define CONFIG_SYS_ICACHE_OFF
-#define CONFIG_SYS_DCACHE_OFF
 #define CONFIG_BOARD_EARLY_INIT_F
 #define CONFIG_ARCH_CPU_INIT
 #define CONFIG_ARCH_MISC_INIT
-- 
1.7.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/2] m28evk: Turn on caches

2012-08-05 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com

Turn on data and instruction caches.

Signed-off-by: Fabio Estevam fabio.este...@freescale.com
---
 include/configs/m28evk.h |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h
index f12d927..e843c96 100644
--- a/include/configs/m28evk.h
+++ b/include/configs/m28evk.h
@@ -37,8 +37,6 @@
 #defineCONFIG_MACH_TYPEMACH_TYPE_M28EVK
 
 #defineCONFIG_SYS_NO_FLASH
-#defineCONFIG_SYS_ICACHE_OFF
-#defineCONFIG_SYS_DCACHE_OFF
 #defineCONFIG_BOARD_EARLY_INIT_F
 #defineCONFIG_ARCH_MISC_INIT
 
-- 
1.7.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2] m28evk: Turn on caches

2012-08-05 Thread Marek Vasut
Dear Fabio Estevam,

 From: Fabio Estevam fabio.este...@freescale.com
 
 Turn on data and instruction caches.
 
 Signed-off-by: Fabio Estevam fabio.este...@freescale.com
[...]

I'd like to put this one on hold until I can properly test all components. I 
had 
this in my tree for a while, but I still want to retest SPI and MMC /w DMA 
before I go for this.

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] OMAP3: fix DRAM size for IGEP-based boards.

2012-08-05 Thread Javier Martinez Canillas
On Sun, Aug 5, 2012 at 12:55 PM, Enric Balletbo i Serra
eballe...@gmail.com wrote:
 The total RAM size of the IGEP-based boards is 512MiB not 1GiB, the
 LPDDR memory consist on two dies of 256MiB.

 Signed-off-by: Enric Balletbo i Serra eballe...@gmail.com
 ---
  board/isee/igep0020/igep0020.c |6 +++---
  board/isee/igep0030/igep0030.c |6 +++---
  2 files changed, 6 insertions(+), 6 deletions(-)

 diff --git a/board/isee/igep0020/igep0020.c b/board/isee/igep0020/igep0020.c
 index a4d099a..a8257a3 100644
 --- a/board/isee/igep0020/igep0020.c
 +++ b/board/isee/igep0020/igep0020.c
 @@ -77,19 +77,19 @@ void get_board_mem_timings(u32 *mcfg, u32 *ctrla, u32 
 *ctrlb, u32 *rfr_ctrl,
  {
 *mr = MICRON_V_MR_165;
  #ifdef CONFIG_BOOT_NAND
 -   *mcfg = MICRON_V_MCFG_200(512  20);
 +   *mcfg = MICRON_V_MCFG_200(256  20);
 *ctrla = MICRON_V_ACTIMA_200;
 *ctrlb = MICRON_V_ACTIMB_200;
 *rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz;
  #else
 if (get_cpu_family() == CPU_OMAP34XX) {
 -   *mcfg = NUMONYX_V_MCFG_165(512  20);
 +   *mcfg = NUMONYX_V_MCFG_165(256  20);
 *ctrla = NUMONYX_V_ACTIMA_165;
 *ctrlb = NUMONYX_V_ACTIMB_165;
 *rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz;

 } else {
 -   *mcfg = NUMONYX_V_MCFG_200(512  20);
 +   *mcfg = NUMONYX_V_MCFG_200(256  20);
 *ctrla = NUMONYX_V_ACTIMA_200;
 *ctrlb = NUMONYX_V_ACTIMB_200;
 *rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz;
 diff --git a/board/isee/igep0030/igep0030.c b/board/isee/igep0030/igep0030.c
 index 4f8b645..107cb7f 100644
 --- a/board/isee/igep0030/igep0030.c
 +++ b/board/isee/igep0030/igep0030.c
 @@ -64,19 +64,19 @@ void get_board_mem_timings(u32 *mcfg, u32 *ctrla, u32 
 *ctrlb, u32 *rfr_ctrl,
  {
 *mr = MICRON_V_MR_165;
  #ifdef CONFIG_BOOT_NAND
 -   *mcfg = MICRON_V_MCFG_200(512  20);
 +   *mcfg = MICRON_V_MCFG_200(256  20);
 *ctrla = MICRON_V_ACTIMA_200;
 *ctrlb = MICRON_V_ACTIMB_200;
 *rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz;
  #else
 if (get_cpu_family() == CPU_OMAP34XX) {
 -   *mcfg = NUMONYX_V_MCFG_165(512  20);
 +   *mcfg = NUMONYX_V_MCFG_165(256  20);
 *ctrla = NUMONYX_V_ACTIMA_165;
 *ctrlb = NUMONYX_V_ACTIMB_165;
 *rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz;

 } else {
 -   *mcfg = NUMONYX_V_MCFG_200(512  20);
 +   *mcfg = NUMONYX_V_MCFG_200(256  20);
 *ctrla = NUMONYX_V_ACTIMA_200;
 *ctrlb = NUMONYX_V_ACTIMB_200;
 *rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz;
 --
 1.7.9.5


Hi Enric,

I missed that on the original patch, thanks for fixing it.

Tested-by: Javier Martinez Canillas jav...@dowhile0.org

Best regards,
Javier
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/2] mx51evk: do not overwrite the console

2012-08-05 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com

On this board, the console is always set to the serial line.
Do not allow to overwrite it when video is enabled.

Signed-off-by: Fabio Estevam fabio.este...@freescale.com
---
 board/freescale/mx51evk/mx51evk.c |   10 +-
 include/configs/mx51evk.h |2 ++
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/board/freescale/mx51evk/mx51evk.c 
b/board/freescale/mx51evk/mx51evk.c
index 514a7ac..97c8a2c 100644
--- a/board/freescale/mx51evk/mx51evk.c
+++ b/board/freescale/mx51evk/mx51evk.c
@@ -536,12 +536,20 @@ int board_late_init(void)
setup_iomux_spi();
power_init();
 #endif
-   setenv(stdout, serial);
 
return 0;
 }
 #endif
 
+/*
+ * Do not overwrite the console
+ * Use always serial for U-Boot console
+ */
+int overwrite_console(void)
+{
+   return 1;
+}
+
 int checkboard(void)
 {
puts(Board: MX51EVK\n);
diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h
index 6af5ed7..635678a 100644
--- a/include/configs/mx51evk.h
+++ b/include/configs/mx51evk.h
@@ -129,6 +129,8 @@
 #define CONFIG_VIDEO_IPUV3
 #define CONFIG_CFB_CONSOLE
 #define CONFIG_VGA_AS_SINGLE_DEVICE
+#define CONFIG_SYS_CONSOLE_IS_IN_ENV
+#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
 #define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_SPLASH_SCREEN
 #define CONFIG_BMP_16BPP
-- 
1.7.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/2] vision2: do not overwrite the console

2012-08-05 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com

On this board, the console is always set to the serial line.
Do not allow to overwrite it when video is enabled.

Signed-off-by: Fabio Estevam fabio.este...@freescale.com
---
 board/ttcontrol/vision2/vision2.c |   11 +--
 include/configs/vision2.h |2 ++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/board/ttcontrol/vision2/vision2.c 
b/board/ttcontrol/vision2/vision2.c
index d68bef7..d287544 100644
--- a/board/ttcontrol/vision2/vision2.c
+++ b/board/ttcontrol/vision2/vision2.c
@@ -674,11 +674,18 @@ int board_late_init(void)
udelay(2000);
 #endif
 
-   setenv(stdout, serial);
-
return 0;
 }
 
+/*
+ * Do not overwrite the console
+ * Use always serial for U-Boot console
+ */
+int overwrite_console(void)
+{
+   return 1;
+}
+
 int checkboard(void)
 {
puts(Board: TTControl Vision II CPU V\n);
diff --git a/include/configs/vision2.h b/include/configs/vision2.h
index 0ed53d2..34fc1cb 100644
--- a/include/configs/vision2.h
+++ b/include/configs/vision2.h
@@ -215,6 +215,8 @@
 #define CONFIG_VIDEO_IPUV3
 #define CONFIG_CFB_CONSOLE
 #define CONFIG_VGA_AS_SINGLE_DEVICE
+#define CONFIG_SYS_CONSOLE_IS_IN_ENV
+#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
 #define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_SPLASH_SCREEN
 #define CONFIG_CMD_BMP
-- 
1.7.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [RESEND] [PATCH 0/2] kirkwood: Generalise dns325 support, include dns320

2012-08-05 Thread Jamie Lentin

Hi Prafulla, thankyou for taking the time to review.

On Tue, 31 Jul 2012, Prafulla Wadaskar wrote:


-Original Message-
From: Jamie Lentin [mailto:j...@lentin.co.uk]
Sent: 31 July 2012 14:01
To: Prafulla Wadaskar
Cc: u-boot@lists.denx.de; albert.u.b...@aribaud.net;
ub...@lukaperkov.net
Subject: RE: [RESEND] [PATCH 0/2] kirkwood: Generalise dns325 support,
include dns320

On Mon, 30 Jul 2012, Prafulla Wadaskar wrote:


Dear Jamie Lentin


-Original Message-
From: Jamie Lentin [mailto:j...@lentin.co.uk]
Sent: 31 July 2012 03:26
To: u-boot@lists.denx.de
Cc: Prafulla Wadaskar; albert.u.b...@aribaud.net;
ub...@lukaperkov.net; Jamie Lentin
Subject: [RESEND] [PATCH 0/2] kirkwood: Generalise dns325 support,
include dns320

I submitted this a while ago[0], it would be nice to see it

included

if possible. It generalises the DNS325 support so that it can be

used

for both the DNS320 and DNS325.

Luka Perkov stated I have no more questions regarding this patch,
not
sure if this counts as an ACK. The patch here is ~same, just

rebased.


Somewhat related, I have tried using tools/kwboot to boot both

NASes.

The DNS325 boots fine, however the DNS320 reports:-

Sending boot message. Please reboot the target...|
Sending boot image...
  0 % [+xmodem: Bad message

UART-boot works with kwuartboot, although only when it is killed

and

restarted. If I work out anything interesting will follow it up in
a separate thread.

Any feedback appreciated!

[0] http://thread.gmane.org/gmane.comp.boot-loaders.u-
boot/130234/focus=130575

Jamie Lentin (2):
  kirkwood: Rename dns325 to dnskw
  kirkwood: Add support for the D-Link DNS-320

 MAINTAINERS|4 +
 board/d-link/{dns325 = dnskw}/Makefile|2 +-
 board/d-link/{dns325/dns325.c = dnskw/dnskw.c}|   18 +-
 board/d-link/{dns325/dns325.h = dnskw/dnskw.h}|   30 ++-
 board/d-link/dnskw/kwbimage.dns320.cfg |  207

 .../kwbimage.cfg = dnskw/kwbimage.dns325.cfg} |0
 boards.cfg |3 +-
 include/configs/{dns325.h = dnskw.h}  |   21 +-
 8 files changed, 261 insertions(+), 24 deletions(-)
 rename board/d-link/{dns325 = dnskw}/Makefile (98%)
 rename board/d-link/{dns325/dns325.c = dnskw/dnskw.c} (90%)
 rename board/d-link/{dns325/dns325.h = dnskw/dnskw.h} (65%)
 create mode 100644 board/d-link/dnskw/kwbimage.dns320.cfg


Finally you will two kwbimage files for two boards being supported.

BTW:

I would like to ask : what is a difference between these two files?

If

it is very small, it can be handled in early_board_init().

In that case you can keep the earlier name kwbimage.cfg as it is and

one file can be avoided.

The DNS-320 has half the RAM of the DNS-325 at different timings, so
the
difference is non-trivial. I'm not sure there would be a logical way
to
divide it up into a common setup and changes in early_board_init(). I
could have a go if you prefer though---if there's prior art somewhere
else
in u-boot please let me know and I'll have a look.


Hi Jamie

You can create a common kwbimage.cfg that suits for both the 
boards (with larger RAM size and comfortable timings for both the 
boards)


These configuration will be pushed on the Kirkwood registers before 
u-boot image kick start. Then in early_board_init() you can tuned these 
register for appropriate boards (for ex. reduce size, or tune timings 
etc.)


Please try to implement this if this sounds good.


I've had a look into this, and still not convinced it's the way to go.

Designing a kwbimage.cfg that suits both is somewhat outside my sphere of 
knowledge (both of the hardware in question and generally). e.g. can I 
assert both M_ODT[0] (as used in DNS-325) and M_ODT[1] (DNS-320) during 
write to CS0 safely, not knowing where the other pin is wired to? Will 
changing the address multiplex at runtime result in memory corruption?


Regardless, the end result would increase board-specifics. There would be 
the same information as in kwbimage.dns32[0|5].cfg now, but hidden away in 
device-specfic code and C constants instead of in a config file with a 
known format and location. This seems like a step backwards to me, and 
would certainly give headaches to anyone trying to move away from 
kwbimage.cfg to, say, devicetree.


I've implemented the other comments on the patchset, and can send these if 
you're happy with the above.


Thanks,


Regards...
Prafulla . . .



--
Jamie Lentin
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/2] gpio: add gpio api support to mx27 (v2)

2012-08-05 Thread Philippe Reynes
There is a little change on gpio_get_value because
on mx27 the register to read is ssr and not dr.

Signed-off-by: Philippe Reynes trem...@yahoo.fr
---
 arch/arm/cpu/arm926ejs/mx27/generic.c |   11 +++---
 arch/arm/include/asm/arch-mx27/gpio.h |   55 +
 arch/arm/include/asm/arch-mx27/imx-regs.h |   30 
 drivers/gpio/mxc_gpio.c   |   12 +--
 4 files changed, 77 insertions(+), 31 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-mx27/gpio.h

diff --git a/arch/arm/cpu/arm926ejs/mx27/generic.c 
b/arch/arm/cpu/arm926ejs/mx27/generic.c
index 65c4813..41bb84b 100644
--- a/arch/arm/cpu/arm926ejs/mx27/generic.c
+++ b/arch/arm/cpu/arm926ejs/mx27/generic.c
@@ -24,6 +24,7 @@
 #include asm/io.h
 #include asm/arch/imx-regs.h
 #include asm/arch/clock.h
+#include asm/arch/gpio.h
 #ifdef CONFIG_MXC_MMC
 #include asm/arch/mxcmmc.h
 #endif
@@ -209,7 +210,7 @@ int cpu_mmc_init(bd_t *bis)
 
 void imx_gpio_mode(int gpio_mode)
 {
-   struct gpio_regs *regs = (struct gpio_regs *)IMX_GPIO_BASE;
+   struct gpio_port_regs *regs = (struct gpio_port_regs *)IMX_GPIO_BASE;
unsigned int pin = gpio_mode  GPIO_PIN_MASK;
unsigned int port = (gpio_mode  GPIO_PORT_MASK)  GPIO_PORT_SHIFT;
unsigned int ocr = (gpio_mode  GPIO_OCR_MASK)  GPIO_OCR_SHIFT;
@@ -228,11 +229,11 @@ void imx_gpio_mode(int gpio_mode)
 
/* Data direction */
if (gpio_mode  GPIO_OUT) {
-   writel(readl(regs-port[port].ddir) | 1  pin,
-   regs-port[port].ddir);
+   writel(readl(regs-port[port].gpio_dir) | 1  pin,
+   regs-port[port].gpio_dir);
} else {
-   writel(readl(regs-port[port].ddir)  ~(1  pin),
-   regs-port[port].ddir);
+   writel(readl(regs-port[port].gpio_dir)  ~(1  pin),
+   regs-port[port].gpio_dir);
}
 
/* Primary / alternate function */
diff --git a/arch/arm/include/asm/arch-mx27/gpio.h 
b/arch/arm/include/asm/arch-mx27/gpio.h
new file mode 100644
index 000..965b584
--- /dev/null
+++ b/arch/arm/include/asm/arch-mx27/gpio.h
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2012
+ * Philippe Reynes trem...@yahoo.fr
+ *
+ * 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
+ */
+
+
+#ifndef __ASM_ARCH_MX27_GPIO_H
+#define __ASM_ARCH_MX27_GPIO_H
+
+/* GPIO registers */
+struct gpio_regs {
+   u32 gpio_dir; /* DDIR */
+   u32 ocr1;
+   u32 ocr2;
+   u32 iconfa1;
+   u32 iconfa2;
+   u32 iconfb1;
+   u32 iconfb2;
+   u32 gpio_dr; /* DR */
+   u32 gius;
+   u32 ssr;
+   u32 icr1;
+   u32 icr2;
+   u32 imr;
+   u32 isr;
+   u32 gpr;
+   u32 swr;
+   u32 puen;
+   u32 res[0x2f];
+};
+
+/* This structure is used by the function imx_gpio_mode */
+struct gpio_port_regs {
+   struct gpio_regs port[6];
+};
+
+#endif
diff --git a/arch/arm/include/asm/arch-mx27/imx-regs.h 
b/arch/arm/include/asm/arch-mx27/imx-regs.h
index ced5b2a..4035d2b 100644
--- a/arch/arm/include/asm/arch-mx27/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx27/imx-regs.h
@@ -162,29 +162,6 @@ struct gpt_regs {
 #define PORTE 4
 #define PORTF 5
 
-struct gpio_regs {
-   struct {
-   u32 ddir;
-   u32 ocr1;
-   u32 ocr2;
-   u32 iconfa1;
-   u32 iconfa2;
-   u32 iconfb1;
-   u32 iconfb2;
-   u32 dr;
-   u32 gius;
-   u32 ssr;
-   u32 icr1;
-   u32 icr2;
-   u32 imr;
-   u32 isr;
-   u32 gpr;
-   u32 swr;
-   u32 puen;
-   u32 res[0x2f];
-   } port[6];
-};
-
 /* IIM Control Registers */
 struct iim_regs {
u32 iim_stat;
@@ -471,6 +448,13 @@ struct fuse_bank0_regs {
 #define TSTAT_CAPT (1  1)/* Capture event */
 #define TSTAT_COMP 1   /* Compare event */
 
+#define GPIO1_BASE_ADDR 0x10015000
+#define GPIO2_BASE_ADDR 0x10015100
+#define GPIO3_BASE_ADDR 0x10015200
+#define GPIO4_BASE_ADDR 0x10015300
+#define GPIO5_BASE_ADDR 0x10015400
+#define 

[U-Boot] [PATCH 2/2] imx27lite: update with gpio api change (v2)

2012-08-05 Thread Philippe Reynes
Signed-off-by: Philippe Reynes trem...@yahoo.fr
---
 board/logicpd/imx27lite/imx27lite.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/board/logicpd/imx27lite/imx27lite.c 
b/board/logicpd/imx27lite/imx27lite.c
index 8a5015c..5bd3b68 100644
--- a/board/logicpd/imx27lite/imx27lite.c
+++ b/board/logicpd/imx27lite/imx27lite.c
@@ -23,12 +23,13 @@
 #include common.h
 #include asm/io.h
 #include asm/arch/imx-regs.h
+#include asm/arch/gpio.h
 
 DECLARE_GLOBAL_DATA_PTR;
 
 int board_init(void)
 {
-   struct gpio_regs *regs = (struct gpio_regs *)IMX_GPIO_BASE;
+   struct gpio_port_regs *regs = (struct gpio_port_regs *)IMX_GPIO_BASE;
 #if defined(CONFIG_SYS_NAND_LARGEPAGE)
struct system_control_regs *sc_regs =
(struct system_control_regs *)IMX_SYSTEM_CTL_BASE;
@@ -43,8 +44,8 @@ int board_init(void)
 #ifdef CONFIG_FEC_MXC
mx27_fec_init_pins();
imx_gpio_mode((GPIO_PORTC | GPIO_OUT | GPIO_PUEN | GPIO_GPIO | 31));
-   writel(readl(regs-port[PORTC].dr) | (1  31),
-   regs-port[PORTC].dr);
+   writel(readl(regs-port[PORTC].gpio_dr) | (1  31),
+   regs-port[PORTC].gpio_dr);
 #endif
 #ifdef CONFIG_MXC_MMC
 #if defined(CONFIG_MAGNESIUM)
-- 
1.7.4.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v1 0/6] Rework for mxs SoC family support

2012-08-05 Thread Otavio Salvador
This patchset is the basis for inclusion of i.MX233 support on U-Boot.
To accomplish it, this patchset moves code around to create the mxs
SoC family support.

Changes in v1:
- new patch
- rebase against imx/master
- rework due apx4devkit board addition

Otavio Salvador (6):
  mxs: reorganize source directory for easy sharing of code in i.MXS
SoCs
  mxs: prefix register acessor macros with 'mxs' prefix
  mxs: prefix register structs with 'mxs' prefix
  mxs: Reowork SPL to use 'mxs' prefix for methods
  mxs: Clarify why we poweroff in case of brownout in 5v conflict
  mxs: rename mx28.c to mxs.c as it is common to i.MX233 and i.MX28
SoCs

 arch/arm/cpu/arm926ejs/{mx28 = mxs}/Makefile  |2 +-
 arch/arm/cpu/arm926ejs/{mx28 = mxs}/clock.c   |   40 +--
 arch/arm/cpu/arm926ejs/{mx28 = mxs}/iomux.c   |6 +-
 arch/arm/cpu/arm926ejs/{mx28/mx28.c = mxs/mxs.c}  |   42 ++--
 .../arm926ejs/{mx28/mx28_init.h = mxs/mxs_init.h} |   14 +-
 arch/arm/cpu/arm926ejs/{mx28 = mxs}/spl_boot.c|   20 +-
 .../cpu/arm926ejs/{mx28 = mxs}/spl_lradc_init.c   |   10 +-
 .../arm/cpu/arm926ejs/{mx28 = mxs}/spl_mem_init.c |   54 ++--
 .../cpu/arm926ejs/{mx28 = mxs}/spl_power_init.c   |  262 ++--
 arch/arm/cpu/arm926ejs/{mx28 = mxs}/start.S   |0
 arch/arm/cpu/arm926ejs/{mx28 = mxs}/timer.c   |8 +-
 .../arm/cpu/arm926ejs/{mx28 = mxs}/u-boot-spl.lds |2 +-
 .../include/asm/{arch-mx28 = arch-mxs}/clock.h|0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/dma.h |0
 .../arm/include/asm/{arch-mx28 = arch-mxs}/gpio.h |0
 .../include/asm/{arch-mx28 = arch-mxs}/imx-regs.h |0
 .../asm/{arch-mx28 = arch-mxs}/iomux-mx28.h   |0
 .../include/asm/{arch-mx28 = arch-mxs}/iomux.h|0
 .../asm/{arch-mx28 = arch-mxs}/regs-apbh.h|  256 +--
 .../asm/{arch-mx28 = arch-mxs}/regs-base.h|0
 .../include/asm/{arch-mx28 = arch-mxs}/regs-bch.h |   44 ++--
 .../asm/{arch-mx28 = arch-mxs}/regs-clkctrl.h |   60 ++---
 .../asm/{arch-mx28 = arch-mxs}/regs-common.h  |   34 +--
 .../asm/{arch-mx28 = arch-mxs}/regs-digctl.h  |   52 ++--
 .../asm/{arch-mx28 = arch-mxs}/regs-gpmi.h|   28 +--
 .../include/asm/{arch-mx28 = arch-mxs}/regs-i2c.h |   30 +--
 .../asm/{arch-mx28 = arch-mxs}/regs-lcdif.h   |   66 ++---
 .../asm/{arch-mx28 = arch-mxs}/regs-lradc.h   |   50 ++--
 .../asm/{arch-mx28 = arch-mxs}/regs-ocotp.h   |   88 +++
 .../asm/{arch-mx28 = arch-mxs}/regs-pinctrl.h |  170 ++---
 .../asm/{arch-mx28 = arch-mxs}/regs-power.h   |   30 +--
 .../include/asm/{arch-mx28 = arch-mxs}/regs-rtc.h |   30 +--
 .../include/asm/{arch-mx28 = arch-mxs}/regs-ssp.h |   42 ++--
 .../asm/{arch-mx28 = arch-mxs}/regs-timrot.h  |   40 +--
 .../include/asm/{arch-mx28 = arch-mxs}/regs-usb.h |2 +-
 .../asm/{arch-mx28 = arch-mxs}/regs-usbphy.h  |   22 +-
 .../asm/{arch-mx28 = arch-mxs}/sys_proto.h|   10 +-
 board/bluegiga/apx4devkit/apx4devkit.c |4 +-
 board/bluegiga/apx4devkit/spl_boot.c   |4 +-
 board/denx/m28evk/m28evk.c |4 +-
 board/denx/m28evk/spl_boot.c   |2 +-
 board/freescale/mx28evk/iomux.c|2 +-
 board/freescale/mx28evk/mx28evk.c  |4 +-
 boards.cfg |6 +-
 doc/README.m28 |4 +-
 doc/README.mx28evk |4 +-
 drivers/dma/apbh_dma.c |   32 +--
 drivers/gpio/mxs_gpio.c|   16 +-
 drivers/i2c/mxs_i2c.c  |   12 +-
 drivers/mmc/mxsmmc.c   |   20 +-
 drivers/mtd/nand/mxs_nand.c|   12 +-
 drivers/rtc/mxsrtc.c   |6 +-
 drivers/spi/mxs_spi.c  |   19 +-
 drivers/usb/host/ehci-mxs.c|   24 +-
 include/configs/apx4devkit.h   |4 +-
 include/configs/m28evk.h   |4 +-
 include/configs/mx28evk.h  |4 +-
 57 files changed, 852 insertions(+), 849 deletions(-)
 rename arch/arm/cpu/arm926ejs/{mx28 = mxs}/Makefile (97%)
 rename arch/arm/cpu/arm926ejs/{mx28 = mxs}/clock.c (89%)
 rename arch/arm/cpu/arm926ejs/{mx28 = mxs}/iomux.c (94%)
 rename arch/arm/cpu/arm926ejs/{mx28/mx28.c = mxs/mxs.c} (86%)
 rename arch/arm/cpu/arm926ejs/{mx28/mx28_init.h = mxs/mxs_init.h} (81%)
 rename arch/arm/cpu/arm926ejs/{mx28 = mxs}/spl_boot.c (90%)
 rename arch/arm/cpu/arm926ejs/{mx28 = mxs}/spl_lradc_init.c (91%)
 rename arch/arm/cpu/arm926ejs/{mx28 = mxs}/spl_mem_init.c (86%)
 rename arch/arm/cpu/arm926ejs/{mx28 = mxs}/spl_power_init.c (82%)
 rename arch/arm/cpu/arm926ejs/{mx28 = mxs}/start.S (100%)
 rename arch/arm/cpu/arm926ejs/{mx28 = mxs}/timer.c (95%)
 rename arch/arm/cpu/arm926ejs/{mx28 = 

[U-Boot] [PATCH v1 1/6] mxs: reorganize source directory for easy sharing of code in i.MXS SoCs

2012-08-05 Thread Otavio Salvador
Most code can be shared between i.MX23 and i.MX28 as both are from
i.MXS family; this source directory structure makes easy to share code
among them.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---
Changes in v1:
- rebase against imx/master
- rework due apx4devkit board addition

 arch/arm/cpu/arm926ejs/{mx28 = mxs}/Makefile   |0
 arch/arm/cpu/arm926ejs/{mx28 = mxs}/clock.c|0
 arch/arm/cpu/arm926ejs/{mx28 = mxs}/iomux.c|0
 arch/arm/cpu/arm926ejs/{mx28 = mxs}/mx28.c |0
 arch/arm/cpu/arm926ejs/{mx28 = mxs}/mx28_init.h|0
 arch/arm/cpu/arm926ejs/{mx28 = mxs}/spl_boot.c |0
 arch/arm/cpu/arm926ejs/{mx28 = mxs}/spl_lradc_init.c   |0
 arch/arm/cpu/arm926ejs/{mx28 = mxs}/spl_mem_init.c |0
 arch/arm/cpu/arm926ejs/{mx28 = mxs}/spl_power_init.c   |0
 arch/arm/cpu/arm926ejs/{mx28 = mxs}/start.S|0
 arch/arm/cpu/arm926ejs/{mx28 = mxs}/timer.c|0
 arch/arm/cpu/arm926ejs/{mx28 = mxs}/u-boot-spl.lds |2 +-
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/clock.h|0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/dma.h  |0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/gpio.h |0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/imx-regs.h |0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/iomux-mx28.h   |0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/iomux.h|0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-apbh.h|0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-base.h|0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-bch.h |0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-clkctrl.h |0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-common.h  |0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-digctl.h  |0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-gpmi.h|0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-i2c.h |0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-lcdif.h   |0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-lradc.h   |0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-ocotp.h   |0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-pinctrl.h |0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-power.h   |0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-rtc.h |0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-ssp.h |0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-timrot.h  |0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-usb.h |0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-usbphy.h  |0
 arch/arm/include/asm/{arch-mx28 = arch-mxs}/sys_proto.h|0
 boards.cfg  |6 +++---
 doc/README.m28  |4 ++--
 doc/README.mx28evk  |4 ++--
 include/configs/apx4devkit.h|4 ++--
 include/configs/m28evk.h|4 ++--
 include/configs/mx28evk.h   |4 ++--
 43 files changed, 14 insertions(+), 14 deletions(-)
 rename arch/arm/cpu/arm926ejs/{mx28 = mxs}/Makefile (100%)
 rename arch/arm/cpu/arm926ejs/{mx28 = mxs}/clock.c (100%)
 rename arch/arm/cpu/arm926ejs/{mx28 = mxs}/iomux.c (100%)
 rename arch/arm/cpu/arm926ejs/{mx28 = mxs}/mx28.c (100%)
 rename arch/arm/cpu/arm926ejs/{mx28 = mxs}/mx28_init.h (100%)
 rename arch/arm/cpu/arm926ejs/{mx28 = mxs}/spl_boot.c (100%)
 rename arch/arm/cpu/arm926ejs/{mx28 = mxs}/spl_lradc_init.c (100%)
 rename arch/arm/cpu/arm926ejs/{mx28 = mxs}/spl_mem_init.c (100%)
 rename arch/arm/cpu/arm926ejs/{mx28 = mxs}/spl_power_init.c (100%)
 rename arch/arm/cpu/arm926ejs/{mx28 = mxs}/start.S (100%)
 rename arch/arm/cpu/arm926ejs/{mx28 = mxs}/timer.c (100%)
 rename arch/arm/cpu/arm926ejs/{mx28 = mxs}/u-boot-spl.lds (97%)
 rename arch/arm/include/asm/{arch-mx28 = arch-mxs}/clock.h (100%)
 rename arch/arm/include/asm/{arch-mx28 = arch-mxs}/dma.h (100%)
 rename arch/arm/include/asm/{arch-mx28 = arch-mxs}/gpio.h (100%)
 rename arch/arm/include/asm/{arch-mx28 = arch-mxs}/imx-regs.h (100%)
 rename arch/arm/include/asm/{arch-mx28 = arch-mxs}/iomux-mx28.h (100%)
 rename arch/arm/include/asm/{arch-mx28 = arch-mxs}/iomux.h (100%)
 rename arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-apbh.h (100%)
 rename arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-base.h (100%)
 rename arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-bch.h (100%)
 rename arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-clkctrl.h (100%)
 rename arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-common.h (100%)
 rename arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-digctl.h (100%)
 rename arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-gpmi.h (100%)
 rename arch/arm/include/asm/{arch-mx28 = arch-mxs}/regs-i2c.h (100%)
 

[U-Boot] [PATCH v1 2/6] mxs: prefix register acessor macros with 'mxs' prefix

2012-08-05 Thread Otavio Salvador
As the register accessing mode is the same for all i.MXS SoCs we ought
to use 'mxs' prefix intead of 'mx28'.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---
Changes in v1:
- rebase against imx/master

 arch/arm/cpu/arm926ejs/mxs/clock.c   |4 +-
 arch/arm/cpu/arm926ejs/mxs/iomux.c   |6 +-
 arch/arm/cpu/arm926ejs/mxs/mx28.c|6 +-
 arch/arm/include/asm/arch-mxs/regs-apbh.h|  254 +-
 arch/arm/include/asm/arch-mxs/regs-bch.h |   42 ++---
 arch/arm/include/asm/arch-mxs/regs-clkctrl.h |   58 +++---
 arch/arm/include/asm/arch-mxs/regs-common.h  |   34 ++--
 arch/arm/include/asm/arch-mxs/regs-digctl.h  |   50 ++---
 arch/arm/include/asm/arch-mxs/regs-gpmi.h|   26 +--
 arch/arm/include/asm/arch-mxs/regs-i2c.h |   28 +--
 arch/arm/include/asm/arch-mxs/regs-lcdif.h   |   64 +++
 arch/arm/include/asm/arch-mxs/regs-lradc.h   |   48 ++---
 arch/arm/include/asm/arch-mxs/regs-ocotp.h   |   86 -
 arch/arm/include/asm/arch-mxs/regs-pinctrl.h |  168 -
 arch/arm/include/asm/arch-mxs/regs-power.h   |   28 +--
 arch/arm/include/asm/arch-mxs/regs-rtc.h |   28 +--
 arch/arm/include/asm/arch-mxs/regs-ssp.h |   40 ++--
 arch/arm/include/asm/arch-mxs/regs-timrot.h  |   38 ++--
 arch/arm/include/asm/arch-mxs/regs-usbphy.h  |   20 +-
 arch/arm/include/asm/arch-mxs/sys_proto.h|6 +-
 drivers/gpio/mxs_gpio.c  |   16 +-
 drivers/usb/host/ehci-mxs.c  |8 +-
 22 files changed, 529 insertions(+), 529 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/mxs/clock.c 
b/arch/arm/cpu/arm926ejs/mxs/clock.c
index 0439f9c..3e29c56 100644
--- a/arch/arm/cpu/arm926ejs/mxs/clock.c
+++ b/arch/arm/cpu/arm926ejs/mxs/clock.c
@@ -207,7 +207,7 @@ void mx28_set_sspclk(enum mxs_sspclock ssp, uint32_t freq, 
int xtal)
return;
 
clkreg = (uint32_t)(clkctrl_regs-hw_clkctrl_ssp0) +
-   (ssp * sizeof(struct mx28_register_32));
+   (ssp * sizeof(struct mxs_register_32));
 
clrbits_le32(clkreg, CLKCTRL_SSP_CLKGATE);
while (readl(clkreg)  CLKCTRL_SSP_CLKGATE)
@@ -256,7 +256,7 @@ static uint32_t mx28_get_sspclk(enum mxs_sspclock ssp)
return XTAL_FREQ_KHZ;
 
clkreg = (uint32_t)(clkctrl_regs-hw_clkctrl_ssp0) +
-   (ssp * sizeof(struct mx28_register_32));
+   (ssp * sizeof(struct mxs_register_32));
 
tmp = readl(clkreg)  CLKCTRL_SSP_DIV_MASK;
 
diff --git a/arch/arm/cpu/arm926ejs/mxs/iomux.c 
b/arch/arm/cpu/arm926ejs/mxs/iomux.c
index 12916b6..73f1446 100644
--- a/arch/arm/cpu/arm926ejs/mxs/iomux.c
+++ b/arch/arm/cpu/arm926ejs/mxs/iomux.c
@@ -43,7 +43,7 @@ int mxs_iomux_setup_pad(iomux_cfg_t pad)
 {
u32 reg, ofs, bp, bm;
void *iomux_base = (void *)MXS_PINCTRL_BASE;
-   struct mx28_register_32 *mxs_reg;
+   struct mxs_register_32 *mxs_reg;
 
/* muxsel */
ofs = 0x100;
@@ -70,7 +70,7 @@ int mxs_iomux_setup_pad(iomux_cfg_t pad)
/* vol */
if (PAD_VOL_VALID(pad)) {
bp = PAD_PIN(pad) % 8 * 4 + 2;
-   mxs_reg = (struct mx28_register_32 *)(iomux_base + ofs);
+   mxs_reg = (struct mxs_register_32 *)(iomux_base + ofs);
if (PAD_VOL(pad))
writel(1  bp, mxs_reg-reg_set);
else
@@ -82,7 +82,7 @@ int mxs_iomux_setup_pad(iomux_cfg_t pad)
ofs = PULL_OFFSET;
ofs += PAD_BANK(pad) * 0x10;
bp = PAD_PIN(pad);
-   mxs_reg = (struct mx28_register_32 *)(iomux_base + ofs);
+   mxs_reg = (struct mxs_register_32 *)(iomux_base + ofs);
if (PAD_PULL(pad))
writel(1  bp, mxs_reg-reg_set);
else
diff --git a/arch/arm/cpu/arm926ejs/mxs/mx28.c 
b/arch/arm/cpu/arm926ejs/mxs/mx28.c
index cf7a50f..65fcd75 100644
--- a/arch/arm/cpu/arm926ejs/mxs/mx28.c
+++ b/arch/arm/cpu/arm926ejs/mxs/mx28.c
@@ -81,7 +81,7 @@ void enable_caches(void)
 #endif
 }
 
-int mx28_wait_mask_set(struct mx28_register_32 *reg, uint32_t mask, int 
timeout)
+int mx28_wait_mask_set(struct mxs_register_32 *reg, uint32_t mask, int timeout)
 {
while (--timeout) {
if ((readl(reg-reg)  mask) == mask)
@@ -92,7 +92,7 @@ int mx28_wait_mask_set(struct mx28_register_32 *reg, uint32_t 
mask, int timeout)
return !timeout;
 }
 
-int mx28_wait_mask_clr(struct mx28_register_32 *reg, uint32_t mask, int 
timeout)
+int mx28_wait_mask_clr(struct mxs_register_32 *reg, uint32_t mask, int timeout)
 {
while (--timeout) {
if ((readl(reg-reg)  mask) == 0)
@@ -103,7 +103,7 @@ int mx28_wait_mask_clr(struct mx28_register_32 *reg, 
uint32_t mask, int timeout)
return !timeout;
 }
 
-int mx28_reset_block(struct mx28_register_32 *reg)
+int mx28_reset_block(struct mxs_register_32 *reg)
 {
/* Clear SFTRST */
   

[U-Boot] [PATCH v1 3/6] mxs: prefix register structs with 'mxs' prefix

2012-08-05 Thread Otavio Salvador
Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---
Changes in v1:
- rebase against imx/master
- rework due apx4devkit board addition

 arch/arm/cpu/arm926ejs/mxs/clock.c   |   36 
 arch/arm/cpu/arm926ejs/mxs/mx28.c|   28 +++
 arch/arm/cpu/arm926ejs/mxs/spl_lradc_init.c  |4 +-
 arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c|   24 +++---
 arch/arm/cpu/arm926ejs/mxs/spl_power_init.c  |  116 +-
 arch/arm/cpu/arm926ejs/mxs/timer.c   |8 +-
 arch/arm/include/asm/arch-mxs/regs-apbh.h|2 +-
 arch/arm/include/asm/arch-mxs/regs-bch.h |2 +-
 arch/arm/include/asm/arch-mxs/regs-clkctrl.h |2 +-
 arch/arm/include/asm/arch-mxs/regs-digctl.h  |2 +-
 arch/arm/include/asm/arch-mxs/regs-gpmi.h|2 +-
 arch/arm/include/asm/arch-mxs/regs-i2c.h |2 +-
 arch/arm/include/asm/arch-mxs/regs-lcdif.h   |2 +-
 arch/arm/include/asm/arch-mxs/regs-lradc.h   |2 +-
 arch/arm/include/asm/arch-mxs/regs-ocotp.h   |2 +-
 arch/arm/include/asm/arch-mxs/regs-pinctrl.h |2 +-
 arch/arm/include/asm/arch-mxs/regs-power.h   |2 +-
 arch/arm/include/asm/arch-mxs/regs-rtc.h |2 +-
 arch/arm/include/asm/arch-mxs/regs-ssp.h |2 +-
 arch/arm/include/asm/arch-mxs/regs-timrot.h  |2 +-
 arch/arm/include/asm/arch-mxs/regs-usb.h |2 +-
 arch/arm/include/asm/arch-mxs/regs-usbphy.h  |2 +-
 board/bluegiga/apx4devkit/apx4devkit.c   |4 +-
 board/denx/m28evk/m28evk.c   |4 +-
 board/freescale/mx28evk/mx28evk.c|4 +-
 drivers/dma/apbh_dma.c   |   32 +++
 drivers/i2c/mxs_i2c.c|   12 +--
 drivers/mmc/mxsmmc.c |   20 ++---
 drivers/mtd/nand/mxs_nand.c  |   12 +--
 drivers/rtc/mxsrtc.c |6 +-
 drivers/spi/mxs_spi.c|   19 ++---
 drivers/usb/host/ehci-mxs.c  |   16 ++--
 32 files changed, 188 insertions(+), 189 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/mxs/clock.c 
b/arch/arm/cpu/arm926ejs/mxs/clock.c
index 3e29c56..bfea6ab 100644
--- a/arch/arm/cpu/arm926ejs/mxs/clock.c
+++ b/arch/arm/cpu/arm926ejs/mxs/clock.c
@@ -43,8 +43,8 @@
 
 static uint32_t mx28_get_pclk(void)
 {
-   struct mx28_clkctrl_regs *clkctrl_regs =
-   (struct mx28_clkctrl_regs *)MXS_CLKCTRL_BASE;
+   struct mxs_clkctrl_regs *clkctrl_regs =
+   (struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE;
 
uint32_t clkctrl, clkseq, div;
uint8_t clkfrac, frac;
@@ -75,8 +75,8 @@ static uint32_t mx28_get_pclk(void)
 
 static uint32_t mx28_get_hclk(void)
 {
-   struct mx28_clkctrl_regs *clkctrl_regs =
-   (struct mx28_clkctrl_regs *)MXS_CLKCTRL_BASE;
+   struct mxs_clkctrl_regs *clkctrl_regs =
+   (struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE;
 
uint32_t div;
uint32_t clkctrl;
@@ -93,8 +93,8 @@ static uint32_t mx28_get_hclk(void)
 
 static uint32_t mx28_get_emiclk(void)
 {
-   struct mx28_clkctrl_regs *clkctrl_regs =
-   (struct mx28_clkctrl_regs *)MXS_CLKCTRL_BASE;
+   struct mxs_clkctrl_regs *clkctrl_regs =
+   (struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE;
 
uint32_t clkctrl, clkseq, div;
uint8_t clkfrac, frac;
@@ -118,8 +118,8 @@ static uint32_t mx28_get_emiclk(void)
 
 static uint32_t mx28_get_gpmiclk(void)
 {
-   struct mx28_clkctrl_regs *clkctrl_regs =
-   (struct mx28_clkctrl_regs *)MXS_CLKCTRL_BASE;
+   struct mxs_clkctrl_regs *clkctrl_regs =
+   (struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE;
 
uint32_t clkctrl, clkseq, div;
uint8_t clkfrac, frac;
@@ -145,8 +145,8 @@ static uint32_t mx28_get_gpmiclk(void)
  */
 void mx28_set_ioclk(enum mxs_ioclock io, uint32_t freq)
 {
-   struct mx28_clkctrl_regs *clkctrl_regs =
-   (struct mx28_clkctrl_regs *)MXS_CLKCTRL_BASE;
+   struct mxs_clkctrl_regs *clkctrl_regs =
+   (struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE;
uint32_t div;
int io_reg;
 
@@ -178,8 +178,8 @@ void mx28_set_ioclk(enum mxs_ioclock io, uint32_t freq)
  */
 static uint32_t mx28_get_ioclk(enum mxs_ioclock io)
 {
-   struct mx28_clkctrl_regs *clkctrl_regs =
-   (struct mx28_clkctrl_regs *)MXS_CLKCTRL_BASE;
+   struct mxs_clkctrl_regs *clkctrl_regs =
+   (struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE;
uint8_t ret;
int io_reg;
 
@@ -199,8 +199,8 @@ static uint32_t mx28_get_ioclk(enum mxs_ioclock io)
  */
 void mx28_set_sspclk(enum mxs_sspclock ssp, uint32_t freq, int xtal)
 {
-   struct mx28_clkctrl_regs *clkctrl_regs =
-   (struct mx28_clkctrl_regs *)MXS_CLKCTRL_BASE;
+   struct mxs_clkctrl_regs *clkctrl_regs =
+   (struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE;
uint32_t clk, clkreg;
 
if (ssp  MXC_SSPCLK3)
@@ -243,8 +243,8 @@ void 

[U-Boot] [PATCH v1 4/6] mxs: Reowork SPL to use 'mxs' prefix for methods

2012-08-05 Thread Otavio Salvador
Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---
Changes in v1:
- rebase against imx/master
- rework due apx4devkit board addition

 arch/arm/cpu/arm926ejs/mxs/mx28.c  |8 +-
 .../cpu/arm926ejs/mxs/{mx28_init.h = mxs_init.h}  |   14 +-
 arch/arm/cpu/arm926ejs/mxs/spl_boot.c  |   20 +--
 arch/arm/cpu/arm926ejs/mxs/spl_lradc_init.c|6 +-
 arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c  |   30 ++---
 arch/arm/cpu/arm926ejs/mxs/spl_power_init.c|  142 ++--
 arch/arm/include/asm/arch-mxs/sys_proto.h  |4 +-
 board/bluegiga/apx4devkit/spl_boot.c   |4 +-
 board/denx/m28evk/spl_boot.c   |2 +-
 board/freescale/mx28evk/iomux.c|2 +-
 10 files changed, 116 insertions(+), 116 deletions(-)
 rename arch/arm/cpu/arm926ejs/mxs/{mx28_init.h = mxs_init.h} (81%)

diff --git a/arch/arm/cpu/arm926ejs/mxs/mx28.c 
b/arch/arm/cpu/arm926ejs/mxs/mx28.c
index dc271cf..a61f75b 100644
--- a/arch/arm/cpu/arm926ejs/mxs/mx28.c
+++ b/arch/arm/cpu/arm926ejs/mxs/mx28.c
@@ -222,8 +222,8 @@ static const char *get_cpu_rev(void)
 
 int print_cpuinfo(void)
 {
-   struct mx28_spl_data *data = (struct mx28_spl_data *)
-   ((CONFIG_SYS_TEXT_BASE - sizeof(struct mx28_spl_data))  ~0xf);
+   struct mxs_spl_data *data = (struct mxs_spl_data *)
+   ((CONFIG_SYS_TEXT_BASE - sizeof(struct mxs_spl_data))  ~0xf);
 
printf(CPU:   Freescale i.MX%s rev%s at %d MHz\n,
get_cpu_type(),
@@ -322,8 +322,8 @@ void imx_get_mac_from_fuse(int dev_id, unsigned char *mac)
 
 int mx28_dram_init(void)
 {
-   struct mx28_spl_data *data = (struct mx28_spl_data *)
-   ((CONFIG_SYS_TEXT_BASE - sizeof(struct mx28_spl_data))  ~0xf);
+   struct mxs_spl_data *data = (struct mxs_spl_data *)
+   ((CONFIG_SYS_TEXT_BASE - sizeof(struct mxs_spl_data))  ~0xf);
 
if (data-mem_dram_size == 0) {
printf(MX28:\n
diff --git a/arch/arm/cpu/arm926ejs/mxs/mx28_init.h 
b/arch/arm/cpu/arm926ejs/mxs/mxs_init.h
similarity index 81%
rename from arch/arm/cpu/arm926ejs/mxs/mx28_init.h
rename to arch/arm/cpu/arm926ejs/mxs/mxs_init.h
index e3a4493..2ddc5bc 100644
--- a/arch/arm/cpu/arm926ejs/mxs/mx28_init.h
+++ b/arch/arm/cpu/arm926ejs/mxs/mxs_init.h
@@ -28,18 +28,18 @@
 
 void early_delay(int delay);
 
-void mx28_power_init(void);
+void mxs_power_init(void);
 
 #ifdef CONFIG_SPL_MX28_PSWITCH_WAIT
-void mx28_power_wait_pswitch(void);
+void mxs_power_wait_pswitch(void);
 #else
-static inline void mx28_power_wait_pswitch(void) { }
+static inline void mxs_power_wait_pswitch(void) { }
 #endif
 
-void mx28_mem_init(void);
-uint32_t mx28_mem_get_size(void);
+void mxs_mem_init(void);
+uint32_t mxs_mem_get_size(void);
 
-void mx28_lradc_init(void);
-void mx28_lradc_enable_batt_measurement(void);
+void mxs_lradc_init(void);
+void mxs_lradc_enable_batt_measurement(void);
 
 #endif /* __M28_INIT_H__ */
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c 
b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
index a6dfca3..46f6770 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_boot.c
@@ -31,7 +31,7 @@
 #include asm/arch/sys_proto.h
 #include asm/gpio.h
 
-#include mx28_init.h
+#include mxs_init.h
 
 /*
  * This delay function is intended to be used only in early stage of boot, 
where
@@ -58,7 +58,7 @@ const iomux_cfg_t iomux_boot[] = {
MX28_PAD_LCD_D05__GPIO_1_5 | MUX_CONFIG_BOOTMODE_PAD,
 };
 
-uint8_t mx28_get_bootmode_index(void)
+uint8_t mxs_get_bootmode_index(void)
 {
uint8_t bootmode = 0;
int i;
@@ -92,22 +92,22 @@ uint8_t mx28_get_bootmode_index(void)
return i;
 }
 
-void mx28_common_spl_init(const iomux_cfg_t *iomux_setup,
+void mxs_common_spl_init(const iomux_cfg_t *iomux_setup,
const unsigned int iomux_size)
 {
-   struct mx28_spl_data *data = (struct mx28_spl_data *)
-   ((CONFIG_SYS_TEXT_BASE - sizeof(struct mx28_spl_data))  ~0xf);
-   uint8_t bootmode = mx28_get_bootmode_index();
+   struct mxs_spl_data *data = (struct mxs_spl_data *)
+   ((CONFIG_SYS_TEXT_BASE - sizeof(struct mxs_spl_data))  ~0xf);
+   uint8_t bootmode = mxs_get_bootmode_index();
 
mxs_iomux_setup_multiple_pads(iomux_setup, iomux_size);
-   mx28_power_init();
+   mxs_power_init();
 
-   mx28_mem_init();
-   data-mem_dram_size = mx28_mem_get_size();
+   mxs_mem_init();
+   data-mem_dram_size = mxs_mem_get_size();
 
data-boot_mode_idx = bootmode;
 
-   mx28_power_wait_pswitch();
+   mxs_power_wait_pswitch();
 }
 
 /* Support aparatus */
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_lradc_init.c 
b/arch/arm/cpu/arm926ejs/mxs/spl_lradc_init.c
index c1df81d..d90f0a1 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_lradc_init.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_lradc_init.c
@@ -28,9 +28,9 @@
 #include asm/io.h
 #include 

[U-Boot] [PATCH v1 6/6] mxs: rename mx28.c to mxs.c as it is common to i.MX233 and i.MX28 SoCs

2012-08-05 Thread Otavio Salvador
Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---
Changes in v1:
- rebase against imx/master

 arch/arm/cpu/arm926ejs/mxs/Makefile  |2 +-
 arch/arm/cpu/arm926ejs/mxs/{mx28.c = mxs.c} |0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename arch/arm/cpu/arm926ejs/mxs/{mx28.c = mxs.c} (100%)

diff --git a/arch/arm/cpu/arm926ejs/mxs/Makefile 
b/arch/arm/cpu/arm926ejs/mxs/Makefile
index 674a3af..eeecf89 100644
--- a/arch/arm/cpu/arm926ejs/mxs/Makefile
+++ b/arch/arm/cpu/arm926ejs/mxs/Makefile
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk
 
 LIB= $(obj)lib$(SOC).o
 
-COBJS  = clock.o mx28.o iomux.o timer.o
+COBJS  = clock.o mxs.o iomux.o timer.o
 
 ifdef  CONFIG_SPL_BUILD
 COBJS  += spl_boot.o spl_lradc_init.o spl_mem_init.o spl_power_init.o
diff --git a/arch/arm/cpu/arm926ejs/mxs/mx28.c 
b/arch/arm/cpu/arm926ejs/mxs/mxs.c
similarity index 100%
rename from arch/arm/cpu/arm926ejs/mxs/mx28.c
rename to arch/arm/cpu/arm926ejs/mxs/mxs.c
-- 
1.7.10.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v1 5/6] mxs: Clarify why we poweroff in case of brownout in 5v conflict

2012-08-05 Thread Otavio Salvador
If VDDIO has a brownout, then the VDD5V_GT_VDDIO becomes unreliable
but this wasn't clear on code so a comment has been added to clarify
it.

Signed-off-by: Otavio Salvador ota...@ossystems.com.br
---
Changes in v1:
- new patch

 arch/arm/cpu/arm926ejs/mxs/spl_power_init.c |4 
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c 
b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
index c341960..6dd3bfc 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
@@ -577,6 +577,10 @@ void mxs_handle_5v_conflict(void)
tmp = readl(power_regs-hw_power_sts);
 
if (tmp  POWER_STS_VDDIO_BO) {
+   /*
+* VDDIO has a brownout, then the VDD5V_GT_VDDIO becomes
+* unreliable
+*/
mxs_powerdown();
break;
}
-- 
1.7.10.4

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] pull request for u-boot-tegra/master

2012-08-05 Thread Albert ARIBAUD
Hi Tom,

On Fri, 3 Aug 2012 16:35:40 -0700, Tom Warren twarren.nvi...@gmail.com wrote:
 Albert,
 
 Has this been pulled into ARM master? I don't think I saw a response
 from you, but I might have missed it.

Sorry Tom, but I have been unavailable for some time and especially on jul 30 
and 31,
so no, it has not been pulled in. :(

I am pulling it in right now, but I have sparse access to Internet right now.

 Thanks,
 
 Tom

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] pull request for u-boot-tegra/master

2012-08-05 Thread Albert ARIBAUD
Hi Albert,

On Sun, 5 Aug 2012 21:46:21 +0200, Albert ARIBAUD albert.u.b...@aribaud.net 
wrote:
 Hi Tom,
 
 On Fri, 3 Aug 2012 16:35:40 -0700, Tom Warren twarren.nvi...@gmail.com 
 wrote:
  Albert,
  
  Has this been pulled into ARM master? I don't think I saw a response
  from you, but I might have missed it.
 
 Sorry Tom, but I have been unavailable for some time and especially on jul 30 
 and 31,
 so no, it has not been pulled in. :(
 
 I am pulling it in right now, but I have sparse access to Internet right now.

Seems like f414d013c5e129e66c04ff699bd60b34894d3d38 breaks a lot of builds with 
the
stock Ubuntu linaro toolchain, e.g.

--

$ ./MAKEALL jornada
Configuring for jornada board...
make: *** [jornada_config] Error 1
arm-linux-gnueabi-size: './u-boot': No such file
make: *** No rule to make target `include/autoconf.mk', needed by `depend'.  
Stop.
make: *** Waiting for unfinished jobs

- SUMMARY 
Boards compiled: 1
Boards with warnings but no errors: 1 ( jornada )
--

--

The .MAKELOG is empty and the .ERR says:

--
make: *** No rule to make target `include/autoconf.mk', needed by `depend'.  Sto
p.
make: *** Waiting for unfinished jobs
--

Amicalement,
-- 
Albert.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Please pull u-boot-ti/master

2012-08-05 Thread Albert ARIBAUD
Hi Tom,

On Fri, 3 Aug 2012 09:16:26 -0700, Tom Rini tr...@ti.com wrote:
 Hello,
 
 The following changes since commit 30a5f098e261b00b9c3ce43b8d4a641e106d26a0:
 
   Revert arm: armv7: add compile option -mno-unaligned-access if available 
 (2012-07-29 11:19:37 +0200)
 
 are available in the git repository at:
 
   git://git.denx.de/u-boot-ti master
 
 for you to fetch changes up to c7dd093429d46d28ccbb0bde81a3e2f9c86e:
 
   DaVinci DA8xx: fix set_cpu_clk_info() (2012-08-03 09:00:57 -0700)
 
 
 Chandan Nath (3):
   am33xx: CPSW init and definitions
   am33xx: pin mux defintions for CPSW switch
   am335x_evm: CPSW support
 
 Cyril Chemparathy (1):
   cpsw: add driver for cpsw ethernet device
 
 Ilya Yanok (1):
   am335x_evm: read the on-board EEPROM
 
 Javier Martinez Canillas (3):
   OMAP3: igep00x0: Add config option to choose flash storage memory
   OMAP3: mem: Add Numonyx OneNAND 200MHz timing information
   OMAP3: igep00x0: add SPL support for IGEP-based boards
 
 Laurence Withers (4):
   DaVinci DA8xx: tidy up clock ID definition
   DaVinci DA850: UART2 clock ID comes from ASYNC3
   DaVinci DA8xx: replace magic number for DDR speed
   DaVinci DA8xx: fix set_cpu_clk_info()
 
 Marek Vasut (2):
   dm: Select CONFIG_SPL_GPIO_SUPPORT on OMAP
   dm: Move OMAP GPIO driver to drivers/gpio/
 
 Mikhail Kshevetskiy (3):
   arm/davinci: fix DDR2/mDDR memory controller initialization for Omap 
 L138
   arm/davinci/da850: add uart0 pinmux
   serial/ns16550: ns16550 has a different register layout on SOC_DA8XX
 
 Peter Meerwald (1):
   beagle: only call DSS code when #defined CONFIG_VIDEO_OMAP3
 
 Tom Rini (25):
   am33xx: Enable gpio0 clock
   am335x_evm: Update config for common usage
   am33xx: Remove DMM_BASE define
   am33xx: Convert to using asm/emif.h to describe the EMIF
   am33xx: Remove extra check in enable_ddr_clocks
   am33xx: Bugfix to config_sdram()
   am33xx: Rework DDR2 EMIF initalization slightly
   am33xx: Make config_cmd_ctrl / config_ddr_data take const structs
   am33xx: Pass to config_ddr the type of memory that is connected
   am33xx: Move the call to ddr_pll_config, make it take the frequency
   am33xx: Clean up unused DDR defines, prefix more with 'DDR2'
   am33xx: Document what we're doing with ddrctrl-ddrckectrl
   am33xx: Turn a number of 'int' functions to 'void'
   am33xx: Use emif_regs struct for storing initialization values
   am33xx: Rework config_io_ctrl slightly
   am33xx: Do not touch 'ratio1' fields
   am33xx: Correct and clean up ddr_regs struct
   am33xx: Move some variables in emif4.c, mark them static.
   am33xx: Rework config_ddr to make DDR3 support easier.
   am33xx: Add DDR3 (Micron MT41J128M16JT-125) timings and support
   am33xx: Remove board/ti/am335x/evm.c
   am33xx: Add support for TI AM335x StarterKit EVM
   am33xx evm: Add CONFIG_CMD_EEPROM and related
   am33xx: Rework pinmux functions
   doc/git-mailrc: Update 'ti' alias
 
 Vaibhav Bedia (1):
   am335x: ddr_defs: Update EMIF parameters
 
  arch/arm/cpu/arm926ejs/davinci/cpu.c   |   22 +-
  arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c|   26 +-
  arch/arm/cpu/arm926ejs/davinci/da850_pinmux.c  |5 +
  arch/arm/cpu/armv7/am33xx/board.c  |  194 +++-
  arch/arm/cpu/armv7/am33xx/clock.c  |   22 +-
  arch/arm/cpu/armv7/am33xx/ddr.c|   87 +-
  arch/arm/cpu/armv7/am33xx/emif4.c  |  240 +++--
  arch/arm/cpu/armv7/omap-common/Makefile|3 -
  arch/arm/include/asm/arch-am33xx/common_def.h  |   23 -
  arch/arm/include/asm/arch-am33xx/cpu.h |   11 +
  arch/arm/include/asm/arch-am33xx/ddr_defs.h|  184 ++--
  arch/arm/include/asm/arch-am33xx/hardware.h|6 +-
  arch/arm/include/asm/arch-am33xx/sys_proto.h   |   29 +
  arch/arm/include/asm/arch-davinci/hardware.h   |   60 +-
  arch/arm/include/asm/arch-davinci/pinmux_defs.h|1 +
  arch/arm/include/asm/arch-omap3/mem.h  |   29 +
  arch/arm/include/asm/emif.h|8 +-
  board/isee/igep0020/config.mk  |   33 -
  board/isee/igep0020/igep0020.c |   42 +-
  board/isee/igep0020/igep0020.h |4 +
  board/isee/igep0030/config.mk  |   33 -
  board/isee/igep0030/igep0030.c |   42 +-
  board/isee/igep0030/igep0030.h |4 +
  board/ti/am335x/Makefile   |4 +-
  board/ti/am335x/evm.c  |   40 -
  board/ti/am335x/mux.c  |   87 +-
  board/ti/beagle/beagle.c   |4 +
  boards.cfg |6 +-
  

[U-Boot] [PATCH v4 0/5] OMAP: SPL networking support

2012-08-05 Thread Ilya Yanok

These series provides support for networking in SPL.
These patches try to use network infrasctructure as is, without
trying to cut some minimal set of it, so the resulting SPL image
is quite big and only useful for boards with plenty of SRAM/OCRAM
(like TI AM335x based ones).

Changes in v3:
 - add support for setting different VCI in SPL
 - set Vendor Class Identifier for SPL
 - use BOOTP in SPL regardless of CONFIG_CMD_DHCP

Changes in v4:
   and CONFIG_BOOTD defined
 - SPL_BOARD_INIT is not needed anymore
 - fix compilation of SPL's libcommon with CONFIG_HUSH_PARSER
 - moved vci_strlen var inside macro
 - rename spl_eth.c to spl_net.c
 - set ethact variable if device name is passed
 - used strlen instead of sizeof

Ilya Yanok (5):
  net/bootp: add VCI support for BOOTP also
  spl: don't mark __u_boot_cmd* as undefined
  OMAP: spl: call timer_inti() from SPL
  OMAP: networking support for SPL
  am335x_evm: enable networking in SPL

 arch/arm/cpu/armv7/omap-common/Makefile  |3 ++
 arch/arm/cpu/armv7/omap-common/spl.c |   11 +++
 arch/arm/cpu/armv7/omap-common/spl_net.c |   52 ++
 arch/arm/include/asm/omap_common.h   |4 +++
 common/Makefile  |6 
 common/cmd_nvedit.c  |6 ++--
 common/command.c |2 +-
 common/env_common.c  |3 +-
 common/main.c|4 +--
 include/configs/am335x_evm.h |5 ++-
 lib/Makefile |   10 --
 lib/vsprintf.c   |2 +-
 net/bootp.c  |   30 +
 net/net.c|3 ++
 spl/Makefile |5 +--
 15 files changed, 128 insertions(+), 18 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/omap-common/spl_net.c

-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 1/5] net/bootp: add VCI support for BOOTP also

2012-08-05 Thread Ilya Yanok
Vendor Class Identifier option is common to BOOTP and DHCP and
can be useful without PXE. So send VCI in both BOOTP and DHCP
requests if CONFIG_BOOTP_VCI_STRING is defined.

Signed-off-by: Ilya Yanok ilya.ya...@cogentembedded.com

---
Changes in v4:
 - moved vci_strlen var inside macro
 - used strlen instead of sizeof

 net/bootp.c |   22 --
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/net/bootp.c b/net/bootp.c
index c9b8349..35b2e77 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -341,6 +341,15 @@ BootpTimeout(void)
}
 }
 
+#define put_vci(e, str)\
+   do {\
+   size_t vci_strlen = strlen(str);\
+   *e++ = 60;  /* Vendor Class Identifier */   \
+   *e++ = vci_strlen;  \
+   memcpy(e, str, vci_strlen); \
+   e += vci_strlen;\
+   } while (0)
+
 /*
  * Initialize BOOTP extension fields in the request.
  */
@@ -352,7 +361,6 @@ static int DhcpExtended(u8 *e, int message_type, IPaddr_t 
ServerID,
u8 *cnt;
 #if defined(CONFIG_BOOTP_PXE)
char *uuid;
-   size_t vci_strlen;
u16 clientarch;
 #endif
 
@@ -437,12 +445,10 @@ static int DhcpExtended(u8 *e, int message_type, IPaddr_t 
ServerID,
printf(Invalid pxeuuid: %s\n, uuid);
}
}
+#endif
 
-   *e++ = 60;  /* Vendor Class Identifier */
-   vci_strlen = strlen(CONFIG_BOOTP_VCI_STRING);
-   *e++ = vci_strlen;
-   memcpy(e, CONFIG_BOOTP_VCI_STRING, vci_strlen);
-   e += vci_strlen;
+#ifdef CONFIG_BOOTP_VCI_STRING
+   put_vci(e, CONFIG_VCI_STRING);
 #endif
 
 #if defined(CONFIG_BOOTP_VENDOREX)
@@ -529,6 +535,10 @@ static int BootpExtended(u8 *e)
*e++ = (576 - 312 + OPT_FIELD_SIZE)  0xff;
 #endif
 
+#ifdef CONFIG_BOOTP_VCI_STRING
+   put_vci(e, CONFIG_VCI_STRING);
+#endif
+
 #if defined(CONFIG_BOOTP_SUBNETMASK)
*e++ = 1;   /* Subnet mask request */
*e++ = 4;
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 3/5] OMAP: spl: call timer_inti() from SPL

2012-08-05 Thread Ilya Yanok
We need to initialize timer properly, otherwise all delays
inside SPL will be wrong.

Signed-off-by: Ilya Yanok ilya.ya...@cogentembedded.com
---

 arch/arm/cpu/armv7/omap-common/spl.c |2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/cpu/armv7/omap-common/spl.c 
b/arch/arm/cpu/armv7/omap-common/spl.c
index 4d1ac85..f0d766c 100644
--- a/arch/arm/cpu/armv7/omap-common/spl.c
+++ b/arch/arm/cpu/armv7/omap-common/spl.c
@@ -152,6 +152,8 @@ void board_init_r(gd_t *id, ulong dummy)
mem_malloc_init(CONFIG_SYS_SPL_MALLOC_START,
CONFIG_SYS_SPL_MALLOC_SIZE);
 
+   timer_init();
+
 #ifdef CONFIG_SPL_BOARD_INIT
spl_board_init();
 #endif
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 2/5] spl: don't mark __u_boot_cmd* as undefined

2012-08-05 Thread Ilya Yanok
__u_boot_cmd* symbols are not used in SPL so there is no need
to tell the linker that they are undefined. With these symbols
marked as undefined linker fails to garbage collect some unused
functions and even fails to build the resulting image.

Signed-off-by: Ilya Yanok ilya.ya...@cogentembedded.com
---

 spl/Makefile |2 --
 1 file changed, 2 deletions(-)

diff --git a/spl/Makefile b/spl/Makefile
index ea7d475..8576d56 100644
--- a/spl/Makefile
+++ b/spl/Makefile
@@ -126,8 +126,6 @@ $(obj)u-boot-spl.bin:   $(obj)u-boot-spl
$(OBJCOPY) $(OBJCFLAGS) -O binary $ $@
 
 GEN_UBOOT = \
-   UNDEF_SYM=`$(OBJDUMP) -x $(LIBS) | \
-   sed  -n -e 's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
cd $(obj)  $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) $$UNDEF_SYM $(__START) \
--start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
-Map u-boot-spl.map -o u-boot-spl
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v4 4/5] OMAP: networking support for SPL

2012-08-05 Thread Ilya Yanok
This patch adds support for networking in SPL. Some devices are
capable of loading SPL via network so it makes sense to load the
main U-Boot binary via network too. This patch tries to use
existing network code as much as possible. Unfortunately, it depends
on environment which in turn depends on other code so SPL size
is increased significantly. No effort was done to decouple network
code and environment so far.

Signed-off-by: Ilya Yanok ilya.ya...@cogentembedded.com

---
Changes in v3:
 - add support for setting different VCI in SPL
 - use BOOTP in SPL regardless of CONFIG_CMD_DHCP

Changes in v4:
   and CONFIG_BOOTD defined
 - fix compilation of SPL's libcommon with CONFIG_HUSH_PARSER
 - rename spl_eth.c to spl_net.c
 - set ethact variable if device name is passed

 arch/arm/cpu/armv7/omap-common/Makefile  |3 ++
 arch/arm/cpu/armv7/omap-common/spl.c |9 ++
 arch/arm/cpu/armv7/omap-common/spl_net.c |   52 ++
 arch/arm/include/asm/omap_common.h   |4 +++
 common/Makefile  |6 
 common/cmd_nvedit.c  |6 ++--
 common/command.c |2 +-
 common/env_common.c  |3 +-
 common/main.c|4 +--
 lib/Makefile |   10 --
 lib/vsprintf.c   |2 +-
 net/bootp.c  |   10 +-
 net/net.c|3 ++
 spl/Makefile |3 ++
 14 files changed, 107 insertions(+), 10 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/omap-common/spl_net.c

diff --git a/arch/arm/cpu/armv7/omap-common/Makefile 
b/arch/arm/cpu/armv7/omap-common/Makefile
index d37b22d..f042078 100644
--- a/arch/arm/cpu/armv7/omap-common/Makefile
+++ b/arch/arm/cpu/armv7/omap-common/Makefile
@@ -53,6 +53,9 @@ endif
 ifdef CONFIG_SPL_YMODEM_SUPPORT
 COBJS  += spl_ymodem.o
 endif
+ifdef CONFIG_SPL_NET_SUPPORT
+COBJS  += spl_net.o
+endif
 endif
 
 ifndef CONFIG_SPL_BUILD
diff --git a/arch/arm/cpu/armv7/omap-common/spl.c 
b/arch/arm/cpu/armv7/omap-common/spl.c
index f0d766c..53b9261 100644
--- a/arch/arm/cpu/armv7/omap-common/spl.c
+++ b/arch/arm/cpu/armv7/omap-common/spl.c
@@ -178,6 +178,15 @@ void board_init_r(gd_t *id, ulong dummy)
spl_ymodem_load_image();
break;
 #endif
+#ifdef CONFIG_SPL_ETH_SUPPORT
+   case BOOT_DEVICE_CPGMAC:
+#ifdef CONFIG_SPL_ETH_DEVICE
+   spl_net_load_image(CONFIG_SPL_ETH_DEVICE);
+#else
+   spl_net_load_image(NULL);
+#endif
+   break;
+#endif
default:
printf(SPL: Un-supported Boot Device - %d!!!\n, boot_device);
hang();
diff --git a/arch/arm/cpu/armv7/omap-common/spl_net.c 
b/arch/arm/cpu/armv7/omap-common/spl_net.c
new file mode 100644
index 000..cbb3087
--- /dev/null
+++ b/arch/arm/cpu/armv7/omap-common/spl_net.c
@@ -0,0 +1,52 @@
+/*
+ * (C) Copyright 2000-2004
+ * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+ *
+ * (C) Copyright 2012
+ * Ilya Yanok ilya.ya...@gmail.com
+ *
+ * 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.
+ */
+#include common.h
+#include net.h
+#include asm/omap_common.h
+
+DECLARE_GLOBAL_DATA_PTR;
+
+void spl_net_load_image(const char *device)
+{
+   int rv;
+
+   env_init();
+   env_relocate();
+   setenv(autoload, yes);
+   load_addr = CONFIG_SYS_TEXT_BASE - sizeof(struct image_header);
+   rv = eth_initialize(gd-bd);
+   if (rv == 0) {
+   printf(No Ethernet devices found\n);
+   hang();
+   }
+   if (device)
+   setenv(ethact, device);
+   rv = NetLoop(BOOTP);
+   if (rv  0) {
+   printf(Problem booting with BOOTP\n);
+   hang();
+   }
+   spl_parse_image_header((struct image_header *)load_addr);
+}
diff --git a/arch/arm/include/asm/omap_common.h 
b/arch/arm/include/asm/omap_common.h
index 4e95eee..9b96527 100644
--- a/arch/arm/include/asm/omap_common.h
+++ b/arch/arm/include/asm/omap_common.h
@@ -69,6 +69,7 @@ void preloader_console_init(void);
 #define BOOT_DEVICE_MMC1   8
 #define BOOT_DEVICE_MMC2   0
 #define BOOT_DEVICE_UART   65
+#define 

[U-Boot] [PATCH v4 5/5] am335x_evm: enable networking in SPL

2012-08-05 Thread Ilya Yanok
This patch adds support for networking in SPL on TI AM335x based
boards. Vendor Class Identifier used by SPL during BOOTP is
AM335x U-Boot SPL.

Signed-off-by: Ilya Yanok ilya.ya...@cogentembedded.com

---
Changes in v3:
 - set Vendor Class Identifier for SPL

Changes in v4:
 - SPL_BOARD_INIT is not needed anymore

 include/configs/am335x_evm.h |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 69ab076..d36ad8f 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -185,7 +185,7 @@
 /* Defines for SPL */
 #define CONFIG_SPL
 #define CONFIG_SPL_TEXT_BASE   0x402F0400
-#define CONFIG_SPL_MAX_SIZE(46 * 1024)
+#define CONFIG_SPL_MAX_SIZE(101 * 1024)
 #define CONFIG_SPL_STACK   LOW_LEVEL_SRAM_STACK
 
 #define CONFIG_SPL_BSS_START_ADDR  0x8000
@@ -205,6 +205,9 @@
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_GPIO_SUPPORT
 #define CONFIG_SPL_YMODEM_SUPPORT
+#define CONFIG_SPL_NET_SUPPORT
+#define CONFIG_SPL_NET_VCI_STRING  AM335x U-Boot SPL
+#define CONFIG_SPL_ETH_SUPPORT
 #define CONFIG_SPL_LDSCRIPT$(CPUDIR)/omap-common/u-boot-spl.lds
 
 /*
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2] arm: rmobile: Add support TMU base timer function

2012-08-05 Thread Nobuhiro Iwamatsu
Some rmobile SoC has TMU base timer function. This supports TMU.

Signed-off-by: Nobuhiro Iwamatsu nobuhiro.iwamatsu...@renesas.com
---
 V2: Remove unused variable.
 
 arch/arm/cpu/armv7/rmobile/Makefile   |4 +-
 arch/arm/cpu/armv7/rmobile/timer_tmu.c|  161 +
 arch/arm/include/asm/arch-rmobile/timer_tmu.h |   51 
 3 files changed, 215 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/cpu/armv7/rmobile/timer_tmu.c
 create mode 100644 arch/arm/include/asm/arch-rmobile/timer_tmu.h

diff --git a/arch/arm/cpu/armv7/rmobile/Makefile 
b/arch/arm/cpu/armv7/rmobile/Makefile
index f70af58..154a5da 100644
--- a/arch/arm/cpu/armv7/rmobile/Makefile
+++ b/arch/arm/cpu/armv7/rmobile/Makefile
@@ -26,7 +26,9 @@ include $(TOPDIR)/config.mk
 LIB= $(obj)lib$(SOC).o
 
 SOBJS = lowlevel_init.o
-COBJS += cpu_info.o board.o timer.o
+COBJS += cpu_info.o board.o
+COBJS-$(CONFIG_GLOBAL_TIMER) += timer.o
+COBJS-$(CONFIG_TMU_TIMER) += timer_tmu.o
 COBJS-$(CONFIG_SH73A0) += pfc-sh73a0.o cpu_info-sh73a0.o
 
 SRCS:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
diff --git a/arch/arm/cpu/armv7/rmobile/timer_tmu.c 
b/arch/arm/cpu/armv7/rmobile/timer_tmu.c
new file mode 100644
index 000..78aee07
--- /dev/null
+++ b/arch/arm/cpu/armv7/rmobile/timer_tmu.c
@@ -0,0 +1,161 @@
+/*
+ * (C) Copyright 2012
+ * Renesas Solutions Corp.
+ *
+ * This code is based on arch/sh/lib/time.c:
+ *
+ * (C) Copyright 2009
+ * Jean-Christophe PLAGNIOL-VILLARD plagn...@jcrosoft.com
+ *
+ * (C) Copyright 2007-2010
+ * Nobobuhiro Iwamatsu iwama...@nigauri.org
+ *
+ * (C) Copyright 2003
+ * 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 common.h
+#include div64.h
+#include asm/io.h
+#include asm/arch/timer_tmu.h
+
+static struct tmu_regs *tmu = (struct tmu_regs *)TMU_BASE;
+
+static unsigned long last_tcnt;
+static unsigned long long overflow_ticks;
+static u16 bit;
+
+static inline unsigned long long tick_to_time(unsigned long long tick)
+{
+   ulong timer_freq;
+   timer_freq = get_tmu0_clk_rate()  ((bit + 1) * 2);
+   tick *= CONFIG_SYS_HZ;
+   do_div(tick, timer_freq);
+
+   return tick;
+}
+
+static inline unsigned long long usec_to_tick(unsigned long long usec)
+{
+   ulong timer_freq;
+   timer_freq = get_tmu0_clk_rate()  ((bit + 1) * 2);
+   usec *= timer_freq;
+   do_div(usec, 100);
+
+   return usec;
+}
+
+static void tmu_timer_start(unsigned int timer)
+{
+   if (timer  2)
+   return;
+   writeb(readb(tmu-tstr) | (1  timer), tmu-tstr);
+}
+
+static void tmu_timer_stop(unsigned int timer)
+{
+   if (timer  2)
+   return;
+   writeb(readb(tmu-tstr)  ~(1  timer), tmu-tstr);
+}
+
+int timer_init(void)
+{
+   /* Divide clock by CONFIG_SYS_TMU_CLK_DIV */
+   u16 bit = 0;
+
+   switch (CONFIG_SYS_TMU_CLK_DIV) {
+   case 1024:
+   bit = 4;
+   break;
+   case 256:
+   bit = 3;
+   break;
+   case 64:
+   bit = 2;
+   break;
+   case 16:
+   bit = 1;
+   break;
+   case 4:
+   default:
+   break;
+   }
+   writew(readw(tmu-tcr0) | bit, tmu-tcr0);
+
+   tmu_timer_stop(0);
+   tmu_timer_start(0);
+
+   last_tcnt = 0;
+   overflow_ticks = 0;
+
+   return 0;
+}
+
+unsigned long long get_ticks(void)
+{
+   unsigned long tcnt = 0 - readl(tmu-tcnt0);
+   unsigned long ticks = tcnt;
+
+   if (last_tcnt  tcnt) { /* overflow */
+   overflow_ticks++;
+   ticks = (0x - last_tcnt) + tcnt;
+   }
+
+   last_tcnt = tcnt;
+
+   return (overflow_ticks  32) | tcnt;
+}
+
+void __udelay(unsigned long usec)
+{
+   unsigned long long tmp;
+   ulong tmo;
+
+   tmo = usec_to_tick(usec);
+   tmp = get_ticks() + tmo;/* get current timestamp */
+
+   while (get_ticks()  tmp)   /* loop till event */
+/*NOP*/;
+}
+
+unsigned long get_timer(unsigned long base)
+{
+   /* return msec */
+   return tick_to_time(get_ticks()) - base;
+}
+
+void 

[U-Boot] [PATCH v2] arm: rmobile: Add support for ATMARK-TECHNO Armadillo-800EVA board

2012-08-05 Thread Nobuhiro Iwamatsu
From: Hideyuki Sano hideyuki.sano...@renesas.com

The Armadillo-800EVA board has Renesas R-Mobile R8A7740, 512MB DDR3-SDRAM,
Ethernet, and more.

This patch supports the following functions:
 - 512MB DDR3-SDRAM
 - Serial console (SCIF)
 - Ethernet MAC(MII)  PHY(SMSC)

Signed-off-by: Hideyuki Sano hideyuki.sano...@renesas.com
Signed-off-by: Nobuhiro Iwamatsu nobuhiro.iwamatsu...@renesas.com
---
 v2: Fix typo in changelog

 MAINTAINERS|4 +
 arch/arm/include/asm/mach-types.h  |1 +
 board/atmark-techno/armadillo-800eva/Makefile  |   46 +++
 .../armadillo-800eva/armadillo-800eva.c|  331 
 boards.cfg |1 +
 include/configs/armadillo-800eva.h |  157 ++
 6 files changed, 540 insertions(+)
 create mode 100644 board/atmark-techno/armadillo-800eva/Makefile
 create mode 100644 board/atmark-techno/armadillo-800eva/armadillo-800eva.c
 create mode 100644 include/configs/armadillo-800eva.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 564fe6a..6c58bdd 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -968,6 +968,10 @@ Tetsuyuki Kobayashi k...@kmckk.co.jp
 
kzm9g   SH73A0 (RMOBILE SoC)
 
+Nobuhiro Iwamatsu nobuhiro.iwamatsu...@renesas.com
+
+   armadillo-800evaR8A7740 (RMOBILE SoC)
+
 -
 
 Unknown / orphaned boards:
diff --git a/arch/arm/include/asm/mach-types.h 
b/arch/arm/include/asm/mach-types.h
index 98c992c..529b3d5 100644
--- a/arch/arm/include/asm/mach-types.h
+++ b/arch/arm/include/asm/mach-types.h
@@ -1105,6 +1105,7 @@ extern unsigned int __machine_arch_type;
 #define MACH_TYPE_UBISYS_P9D_EVP   3493
 #define MACH_TYPE_ATDGP318 3494
 #define MACH_TYPE_OMAP5_SEVM   3777
+#define MACH_TYPE_ARMADILLO_800EVA 3863
 
 #define MACH_TYPE_KZM9G4140
 
diff --git a/board/atmark-techno/armadillo-800eva/Makefile 
b/board/atmark-techno/armadillo-800eva/Makefile
new file mode 100644
index 000..9f9618b
--- /dev/null
+++ b/board/atmark-techno/armadillo-800eva/Makefile
@@ -0,0 +1,46 @@
+#
+# Copyright (C) 2012  Nobuhiro Iwamatsu nobuhiro.iwamatsu...@renesas.com
+#
+# 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.
+#
+# 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
+
+COBJS-y+= armadillo-800eva.o
+COBJS   := $(COBJS-y)
+
+SRCS   := $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+
+$(LIB):$(obj).depend $(OBJS)
+   $(call cmd_link_o_target, $(OBJS))
+
+clean:
+   rm -f $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak $(obj).depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
+
diff --git a/board/atmark-techno/armadillo-800eva/armadillo-800eva.c 
b/board/atmark-techno/armadillo-800eva/armadillo-800eva.c
new file mode 100644
index 000..2f91666
--- /dev/null
+++ b/board/atmark-techno/armadillo-800eva/armadillo-800eva.c
@@ -0,0 +1,331 @@
+/*
+ * Copyright (C) 2012  Renesas Solutions Corp.
+ *
+ * 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.
+ *
+ * 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 malloc.h
+#include asm/processor.h
+#include asm/mach-types.h
+#include asm/io.h
+#include asm/arch/sys_proto.h
+#include asm/gpio.h
+#include asm/arch/rmobile.h
+
+#define s_init_wait(cnt) \
+   ({  \
+   volatile u32 i = 0x1 * cnt; \
+

[U-Boot] [PATCH 1/2] arm: rmobile: armadillo-800eva Remove board_eth_init

2012-08-05 Thread Nobuhiro Iwamatsu
Signed-off-by: Nobuhiro Iwamatsu nobuhiro.iwamatsu...@renesas.com
---
 board/atmark-techno/armadillo-800eva/armadillo-800eva.c |5 -
 1 file changed, 5 deletions(-)

diff --git a/board/atmark-techno/armadillo-800eva/armadillo-800eva.c 
b/board/atmark-techno/armadillo-800eva/armadillo-800eva.c
index 2f91666..a075865 100644
--- a/board/atmark-techno/armadillo-800eva/armadillo-800eva.c
+++ b/board/atmark-techno/armadillo-800eva/armadillo-800eva.c
@@ -312,11 +312,6 @@ int dram_init(void)
return 0;
 }
 
-int board_eth_init(bd_t *bis)
-{
-   return sh_eth_initialize(bis);
-}
-
 const struct rmobile_sysinfo sysinfo = {
CONFIG_RMOBILE_BOARD_STRING
 };
-- 
1.7.10

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/2] arm: rmobile: Add cpu_eth_init function

2012-08-05 Thread Nobuhiro Iwamatsu
This supports ethernet driver of RMOBILE R8A7740.

Signed-off-by: Nobuhiro Iwamatsu nobuhiro.iwamatsu...@renesas.com
---
 arch/arm/cpu/armv7/rmobile/Makefile |2 +-
 arch/arm/cpu/armv7/rmobile/emac.c   |   36 +++
 2 files changed, 37 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/cpu/armv7/rmobile/emac.c

diff --git a/arch/arm/cpu/armv7/rmobile/Makefile 
b/arch/arm/cpu/armv7/rmobile/Makefile
index 4e0eb35..b9663fa 100644
--- a/arch/arm/cpu/armv7/rmobile/Makefile
+++ b/arch/arm/cpu/armv7/rmobile/Makefile
@@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk
 LIB= $(obj)lib$(SOC).o
 
 SOBJS = lowlevel_init.o
-COBJS += cpu_info.o board.o
+COBJS += cpu_info.o board.o emac.o
 COBJS-$(CONFIG_GLOBAL_TIMER) += timer.o
 COBJS-$(CONFIG_TMU_TIMER) += timer_tmu.o
 COBJS-$(CONFIG_SH73A0) += pfc-sh73a0.o cpu_info-sh73a0.o
diff --git a/arch/arm/cpu/armv7/rmobile/emac.c 
b/arch/arm/cpu/armv7/rmobile/emac.c
new file mode 100644
index 000..da5269e
--- /dev/null
+++ b/arch/arm/cpu/armv7/rmobile/emac.c
@@ -0,0 +1,36 @@
+/*
+ * RMOBILE EtherMAC initialization.
+ *
+ * Copyright (C) 2012  Renesas Solutions Corp.
+ * Copyright (C) 2012  Nobuhiro Iwamatsu nobuhiro.iwamatsu...@renesas.com
+ *
+ * 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.
+ */
+
+#include common.h
+#include asm/errno.h
+#include netdev.h
+
+int cpu_eth_init(bd_t *bis)
+{
+   int ret = -ENODEV;
+#ifdef CONFIG_SH_ETHER
+   ret = sh_eth_initialize(bis);
+#endif
+   return ret;
+}
-- 
1.7.10

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 3/5] OMAP: spl: call timer_inti() from SPL

2012-08-05 Thread Tom Rini
On Sun, Aug 5, 2012 at 2:21 PM, Ilya Yanok
ilya.ya...@cogentembedded.com wrote:
 We need to initialize timer properly, otherwise all delays
 inside SPL will be wrong.

 Signed-off-by: Ilya Yanok ilya.ya...@cogentembedded.com
 ---

  arch/arm/cpu/armv7/omap-common/spl.c |2 ++
  1 file changed, 2 insertions(+)

 diff --git a/arch/arm/cpu/armv7/omap-common/spl.c 
 b/arch/arm/cpu/armv7/omap-common/spl.c
 index 4d1ac85..f0d766c 100644
 --- a/arch/arm/cpu/armv7/omap-common/spl.c
 +++ b/arch/arm/cpu/armv7/omap-common/spl.c
 @@ -152,6 +152,8 @@ void board_init_r(gd_t *id, ulong dummy)
 mem_malloc_init(CONFIG_SYS_SPL_MALLOC_START,
 CONFIG_SYS_SPL_MALLOC_SIZE);

 +   timer_init();
 +
  #ifdef CONFIG_SPL_BOARD_INIT
 spl_board_init();
  #endif

Calling it twice has other bad side-effects so there should be a
timer_init removal somewhere too.

-- 
Tom
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v4 2/5] spl: don't mark __u_boot_cmd* as undefined

2012-08-05 Thread Tom Rini
On Sun, Aug 5, 2012 at 2:21 PM, Ilya Yanok
ilya.ya...@cogentembedded.com wrote:
 __u_boot_cmd* symbols are not used in SPL so there is no need
 to tell the linker that they are undefined. With these symbols
 marked as undefined linker fails to garbage collect some unused
 functions and even fails to build the resulting image.

I don't like this because it causes SPL to bloat when the commands
aren't also removed from the build.  But I assume a number of commands
were being pulled in as part of the networking stack?

-- 
Tom
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH V4 1/4] README: fix references to config_cmd_default.h

2012-08-05 Thread Stephen Warren
All usage of config_cmd_default.h uses  for the include statement.
Update the README to do the same, rather than using .

Signed-off-by: Stephen Warren swar...@wwwdotorg.org
---
v4: No change
v3: No change
v2: New patch
---
 README |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/README b/README
index dac46f3..a7deaf4 100644
--- a/README
+++ b/README
@@ -744,8 +744,8 @@ The following options need to be configured:
 - Monitor Functions:
Monitor commands can be included or excluded
from the build by using the #include files
-   config_cmd_all.h and #undef'ing unwanted
-   commands, or using config_cmd_default.h
+   config_cmd_all.h and #undef'ing unwanted
+   commands, or using config_cmd_default.h
and augmenting with additional #define's
for wanted commands.
 
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH V4 3/4] ARM: add basic support for the Broadcom BCM2835 SoC

2012-08-05 Thread Stephen Warren
This SoC is used in the Raspberry Pi, for example.

For more details, see:
http://www.broadcom.com/products/BCM2835
http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf.

Initial support is enough to boot to a serial console, execute a minimal
set of U-Boot commands, download data over a serial port, and boot a
Linux kernel. No storage or network drivers are implemented.

GPIO driver originally by Vikram Narayanan vikram...@gmail.com
with many fixes from myself.

Signed-off-by: Stephen Warren swar...@wwwdotorg.org
---
v4: No change
v3: Squash base SoC, watchdog, and GPIO driver patches into one.
---
 arch/arm/cpu/arm1176/bcm2835/Makefile|   37 +++
 arch/arm/cpu/arm1176/bcm2835/config.mk   |   19 ++
 arch/arm/cpu/arm1176/bcm2835/lowlevel_init.S |   19 ++
 arch/arm/cpu/arm1176/bcm2835/reset.c |   35 ++
 arch/arm/cpu/arm1176/bcm2835/timer.c |   55 
 arch/arm/include/asm/arch-bcm2835/gpio.h |   66 +++
 arch/arm/include/asm/arch-bcm2835/timer.h|   37 +++
 arch/arm/include/asm/arch-bcm2835/wdog.h |   37 +++
 drivers/gpio/Makefile|1 +
 drivers/gpio/bcm2835_gpio.c  |   90 ++
 10 files changed, 396 insertions(+)
 create mode 100644 arch/arm/cpu/arm1176/bcm2835/Makefile
 create mode 100644 arch/arm/cpu/arm1176/bcm2835/config.mk
 create mode 100644 arch/arm/cpu/arm1176/bcm2835/lowlevel_init.S
 create mode 100644 arch/arm/cpu/arm1176/bcm2835/reset.c
 create mode 100644 arch/arm/cpu/arm1176/bcm2835/timer.c
 create mode 100644 arch/arm/include/asm/arch-bcm2835/gpio.h
 create mode 100644 arch/arm/include/asm/arch-bcm2835/timer.h
 create mode 100644 arch/arm/include/asm/arch-bcm2835/wdog.h
 create mode 100644 drivers/gpio/bcm2835_gpio.c

diff --git a/arch/arm/cpu/arm1176/bcm2835/Makefile 
b/arch/arm/cpu/arm1176/bcm2835/Makefile
new file mode 100644
index 000..4ea6d6b
--- /dev/null
+++ b/arch/arm/cpu/arm1176/bcm2835/Makefile
@@ -0,0 +1,37 @@
+#
+# 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
+# version 2 as published by the Free Software Foundation.
+#
+# 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.
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(SOC).o
+
+SOBJS  := lowlevel_init.o
+COBJS  := reset.o timer.o
+
+SRCS   := $(SOBJS:.o=.c) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))
+
+all:   $(obj).depend $(LIB)
+
+$(LIB):$(OBJS)
+   $(call cmd_link_o_target, $(OBJS))
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/arch/arm/cpu/arm1176/bcm2835/config.mk 
b/arch/arm/cpu/arm1176/bcm2835/config.mk
new file mode 100644
index 000..b87ce24
--- /dev/null
+++ b/arch/arm/cpu/arm1176/bcm2835/config.mk
@@ -0,0 +1,19 @@
+#
+# (C) Copyright 2012 Stephen Warren
+#
+# 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
+# version 2 as published by the Free Software Foundation.
+#
+# 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.
+
+# Don't attempt to override the target CPU/ABI options;
+# the Raspberry Pi toolchain does the right thing by default.
+PLATFORM_RELFLAGS := $(filter-out -msoft-float,$(PLATFORM_RELFLAGS))
+PLATFORM_CPPFLAGS := $(filter-out -march=armv5t,$(PLATFORM_CPPFLAGS))
diff --git a/arch/arm/cpu/arm1176/bcm2835/lowlevel_init.S 
b/arch/arm/cpu/arm1176/bcm2835/lowlevel_init.S
new file mode 100644
index 000..c7b0843
--- /dev/null
+++ b/arch/arm/cpu/arm1176/bcm2835/lowlevel_init.S
@@ -0,0 +1,19 @@
+/*
+ * (C) Copyright 2012 Stephen Warren
+ *
+ * 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
+ * version 2 as published by the Free Software Foundation.
+ *
+ * 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.
+ */
+
+.globl 

[U-Boot] [PATCH V4 4/4] ARM: add Raspberry Pi model B board, using BCM2835 SoC

2012-08-05 Thread Stephen Warren
The Raspberry Pi model B uses the BCM2835 SoC, has 256MB of RAM,
contains an SMSC 9512 USB LAN/Hub chip, and various IO connectors.
For more details, see http://www.raspberrypi.org/.

Various portions (cache enable, MACH_TYPE setup, RAM size limit, stack
relocation to top of RAM) extracted from work by:
Oleksandr Tymoshenko go...@bluezbox.com.

GPIO driver enablement by Vikram Narayanan vikram...@gmail.com.

Signed-off-by: Stephen Warren swar...@wwwdotorg.org
---
v4: Remove redundant CONFIG_SYS_BAUDRATE_TABLE, CONFIG_SYS_PROMPT_HUSH_PS2.
v3: Squash a number of patches into this single patch.
---
 MAINTAINERS  |4 ++
 board/raspberrypi/rpi_b/Makefile |   34 +
 board/raspberrypi/rpi_b/rpi_b.c  |   34 +
 boards.cfg   |1 +
 include/configs/rpi_b.h  |  104 ++
 5 files changed, 177 insertions(+)
 create mode 100644 board/raspberrypi/rpi_b/Makefile
 create mode 100644 board/raspberrypi/rpi_b/rpi_b.c
 create mode 100644 include/configs/rpi_b.h

diff --git a/MAINTAINERS b/MAINTAINERS
index fd0c65c..abe621e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -928,6 +928,10 @@ Stephen Warren swar...@nvidia.com
trimslice   Tegra2 (ARM7  A9 Dual Core)
whistlerTegra2 (ARM7  A9 Dual Core)
 
+Stephen Warren swar...@wwwdotorg.org
+
+   rpi_b   BCM2835 (ARM1176)
+
 Thomas Weber we...@corscience.de
 
devkit8000  ARM ARMV7 (OMAP3530 SoC)
diff --git a/board/raspberrypi/rpi_b/Makefile b/board/raspberrypi/rpi_b/Makefile
new file mode 100644
index 000..9d0c377
--- /dev/null
+++ b/board/raspberrypi/rpi_b/Makefile
@@ -0,0 +1,34 @@
+#
+# 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
+# version 2 as published by the Free Software Foundation.
+#
+# 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.
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+COBJS  := $(BOARD).o
+
+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/raspberrypi/rpi_b/rpi_b.c b/board/raspberrypi/rpi_b/rpi_b.c
new file mode 100644
index 000..688b0aa
--- /dev/null
+++ b/board/raspberrypi/rpi_b/rpi_b.c
@@ -0,0 +1,34 @@
+/*
+ * (C) Copyright 2012 Stephen Warren
+ *
+ * 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
+ * version 2 as published by the Free Software Foundation.
+ *
+ * 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.
+ */
+
+#include common.h
+#include asm/global_data.h
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int dram_init(void)
+{
+   gd-ram_size = CONFIG_SYS_SDRAM_SIZE;
+
+   return 0;
+}
+
+int board_init(void)
+{
+   gd-bd-bi_boot_params = 0x100;
+
+   return 0;
+}
diff --git a/boards.cfg b/boards.cfg
index 2d36d83..7a88eb9 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -48,6 +48,7 @@ mx35pdk  arm arm1136 -
   freesca
 apollon arm arm1136 apollon
 -  omap24xx
 omap2420h4   arm arm1136 -   ti
 omap24xx
 tnetv107x_evmarm arm1176 tnetv107xevmti
 tnetv107x
+rpi_barm arm1176 rpi_b   
raspberrypibcm2835
 integratorap_cm720t  arm arm720t integrator  
armltd -   integratorap:CM720T
 integratorap_cm920t  arm arm920t integrator  
armltd -   integratorap:CM920T
 integratorcp_cm920t  arm arm920t integrator  
armltd -   integratorcp:CM920T
diff --git a/include/configs/rpi_b.h b/include/configs/rpi_b.h
new file mode 100644
index 000..cf62e45
--- /dev/null
+++ b/include/configs/rpi_b.h
@@ -0,0 +1,104 @@
+/*
+ * (C) Copyright 2012 Stephen Warren
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This 

[U-Boot] [PATCH V4 2/4] ARM: arm1176: enable instruction cache in arch_cpu_init()

2012-08-05 Thread Stephen Warren
Note that this affects all users of the ARM1176 CPU that enable
CONFIG_ARCH_CPU_INIT, not just the BCM2835 SoC, potentially such as
tnetv107x.

Cc: Cyril Chemparathy cy...@ti.com
Signed-off-by: Stephen Warren swar...@wwwdotorg.org
---
v4: No change
v3: No change, re-ordered patch
v2: No change
---
 arch/arm/cpu/arm1176/cpu.c |7 +++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/cpu/arm1176/cpu.c b/arch/arm/cpu/arm1176/cpu.c
index c0fd114..532a90b 100644
--- a/arch/arm/cpu/arm1176/cpu.c
+++ b/arch/arm/cpu/arm1176/cpu.c
@@ -65,3 +65,10 @@ static void cache_flush (void)
/* mem barrier to sync things */
asm (mcr p15, 0, %0, c7, c10, 4: :r (0));
 }
+
+int arch_cpu_init(void)
+{
+   icache_enable();
+
+   return 0;
+}
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot