[U-Boot] [PATCH] ppc/85xx: add ld script file for boot from NAND

2009-09-22 Thread Mingkai Hu
The first stage 4K image uses a seperate ld script file to
generate 4K image. This patch moves it to the cpu/mpc85xx/*
to make it avaliable for 85xx platform.

Signed-off-by: Mingkai Hu 
---

ChangeLog:
 - move from board specific directory to cpu/mpc85xx/*,
   make it avalible for 85xx platform.

 cpu/mpc85xx/u-boot-nand_spl.lds |   67 +++
 1 files changed, 67 insertions(+), 0 deletions(-)
 create mode 100644 cpu/mpc85xx/u-boot-nand_spl.lds

diff --git a/cpu/mpc85xx/u-boot-nand_spl.lds b/cpu/mpc85xx/u-boot-nand_spl.lds
new file mode 100644
index 000..fef3e42
--- /dev/null
+++ b/cpu/mpc85xx/u-boot-nand_spl.lds
@@ -0,0 +1,67 @@
+/*
+ * (C) Copyright 2006
+ * Wolfgang Denk, DENX Software Engineering, w...@denx.de
+ *
+ * Copyright 2009 Freescale Semiconductor, Inc.
+ *
+ * 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
+ */
+
+OUTPUT_ARCH(powerpc)
+SECTIONS
+{
+   . = 0xfff0;
+   .text : {
+   *(.text)
+   }
+   _etext = .;
+
+   .reloc : {
+   _GOT2_TABLE_ = .;
+   *(.got2)
+   _FIXUP_TABLE_ = .;
+   *(.fixup)
+   }
+   __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2;
+   __fixup_entries = (. - _FIXUP_TABLE_) >> 2;
+
+   . = ALIGN(8);
+   .data : {
+   *(.rodata*)
+   *(.data*)
+   *(.sdata*)
+   }
+   _edata  =  .;
+
+   . = ALIGN(8);
+   __init_begin = .;
+   __init_end = .;
+
+   .resetvec ADDR(.text) + 0xffc : {
+   *(.resetvec)
+   } = 0x
+
+   __bss_start = .;
+   .bss : {
+   *(.sbss)
+   *(.bss)
+   }
+   _end = .;
+}
+ASSERT(__init_end <= 0xfff00ffc, "NAND bootstrap too big");
-- 
1.6.4

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


[U-Boot] [PATCH] ppc/85xx: add cpu init config file for boot from NAND

2009-09-22 Thread Mingkai Hu
When boot from NAND, the NAND flash must be connected to br/or0.
Also init RAM(L2 SRAM or DDR SDRAM) for load the second image to
it.

Signed-off-by: Mingkai Hu 
---

ChangeLog:
 - move the board specific config for br/or to board init file, i.e.
   nand_spl/board/freescale/mpc8536ds/nand_boot.c, which make it common
   for 85xx platform.

 cpu/mpc85xx/cpu_init_nand.c |   63 +++
 1 files changed, 63 insertions(+), 0 deletions(-)
 create mode 100644 cpu/mpc85xx/cpu_init_nand.c

diff --git a/cpu/mpc85xx/cpu_init_nand.c b/cpu/mpc85xx/cpu_init_nand.c
new file mode 100644
index 000..184cca4
--- /dev/null
+++ b/cpu/mpc85xx/cpu_init_nand.c
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2009 Freescale Semiconductor, Inc.
+ *
+ * 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 
+#include 
+
+void cpu_init_f(void)
+{
+   ccsr_lbc_t *lbc = (void *)(CONFIG_SYS_MPC85xx_LBC_ADDR);
+
+   /*
+* LCRR - Clock Ratio Register - set up local bus timing
+* when needed
+*/
+   out_be32(&lbc->lcrr, LCRR_DBYP | LCRR_CLKDIV_8);
+
+#if defined(CONFIG_NAND_BR_PRELIM) && defined(CONFIG_NAND_OR_PRELIM)
+   out_be32(&lbc->br0, CONFIG_NAND_BR_PRELIM);
+   out_be32(&lbc->or0, CONFIG_NAND_OR_PRELIM);
+#else
+#error  CONFIG_NAND_BR_PRELIM, CONFIG_NAND_OR_PRELIM must be defined
+#endif
+
+#if defined(CONFIG_SYS_RAMBOOT) && defined(CONFIG_SYS_INIT_L2_ADDR)
+   ccsr_l2cache_t *l2cache = (void *)CONFIG_SYS_MPC85xx_L2_ADDR;
+   char *l2srbar;
+   int i;
+
+   out_be32(&l2cache->l2srbar0, CONFIG_SYS_INIT_L2_ADDR);
+
+   /* set MBECCDIS=1, SBECCDIS=1 */
+   out_be32(&l2cache->l2errdis,
+   (MPC85xx_L2ERRDIS_MBECC | MPC85xx_L2ERRDIS_SBECC));
+
+   /* set L2E=1 & L2SRAM=001 */
+   out_be32(&l2cache->l2ctl,
+   (MPC85xx_L2CTL_L2E | MPC85xx_L2CTL_L2SRAM_ENTIRE));
+
+   /* Initialize L2 SRAM to zero */
+   l2srbar = (char *)CONFIG_SYS_INIT_L2_ADDR;
+   for (i = 0; i < CONFIG_SYS_L2_SIZE; i++)
+   l2srbar[i] = 0;
+#endif
+}
-- 
1.6.4

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


[U-Boot] [PATCH] immap_85xx: add porpllsr's plat ratio definition

2009-09-22 Thread Mingkai Hu
Signed-off-by: Mingkai Hu 
---
 include/asm-ppc/immap_85xx.h |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/asm-ppc/immap_85xx.h b/include/asm-ppc/immap_85xx.h
index e7d412d..39fdb8e 100644
--- a/include/asm-ppc/immap_85xx.h
+++ b/include/asm-ppc/immap_85xx.h
@@ -1542,6 +1542,8 @@ typedef struct ccsr_gur {
 #endif
 #define MPC85xx_PORPLLSR_QE_RATIO  0x3e00
 #define MPC85xx_PORPLLSR_QE_RATIO_SHIFT25
+#define MPC85xx_PORPLLSR_PLAT_RATIO0x003e
+#define MPC85xx_PORPLLSR_PLAT_RATIO_SHIFT   1
uintporbmsr;/* 0xe0004 - POR boot mode status register */
 #define MPC85xx_PORBMSR_HA 0x0007
 #define MPC85xx_PORBMSR_HA_SHIFT   16
-- 
1.6.4

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


[U-Boot] [PATCH] This modification will make the binay of smdk6400 nand spl in correct size

2009-09-22 Thread sun peng
When I'm playing with u-boot I found that the size of smdk6400 nand
spl binary image can't pad to 4K. So I make some minor change to the
config.mk file to achieve the correct padding size.

Signed-off-by: Sunpeng 
---
 nand_spl/board/samsung/smdk6400/config.mk |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/nand_spl/board/samsung/smdk6400/config.mk
b/nand_spl/board/samsung/smdk6400/config.mk
index 4b16230..013dec9 100644
--- a/nand_spl/board/samsung/smdk6400/config.mk
+++ b/nand_spl/board/samsung/smdk6400/config.mk
@@ -33,7 +33,7 @@ include $(TOPDIR)/board/$(BOARDDIR)/config.mk

 # PAD_TO used to generate a 4kByte binary needed for the combined image
 # -> PAD_TO = TEXT_BASE + 4096
-PAD_TO := $(shell expr $$[$(TEXT_BASE) + 4096])
+PAD_TO := $(shell expr $(TEXT_BASE) + 4096)

 ifeq ($(debug),1)
 PLATFORM_CPPFLAGS += -DDEBUG
-- 
1.6.0.4
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] 85xx-fdt: Fixed l2-ctlr's compatible prop for QorIQ

2009-09-22 Thread Vivek Mahajan
This patch does the following:-

* Fixes l2 cache controller's compatible string for QorIQ
* Revamps its copyright

Signed-off-by: Vivek Mahajan 
---
 cpu/mpc85xx/fdt.c |   13 ++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/cpu/mpc85xx/fdt.c b/cpu/mpc85xx/fdt.c
index 723f473..61e0fb0 100644
--- a/cpu/mpc85xx/fdt.c
+++ b/cpu/mpc85xx/fdt.c
@@ -1,5 +1,5 @@
 /*
- * Copyright 2007 Freescale Semiconductor, Inc.
+ * Copyright 2007-2009 Freescale Semiconductor, Inc.
  *
  * (C) Copyright 2000
  * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 #ifdef CONFIG_FSL_ESDHC
 #include 
 #endif
@@ -148,8 +149,14 @@ static inline void ft_fixup_l2cache(void *blob)
}
 
if (cpu) {
-   len = sprintf(compat_buf, "fsl,mpc%s-l2-cache-controller",
-   cpu->name);
+   if (isdigit(cpu->name[0]))
+   len = sprintf(compat_buf,
+   "fsl,mpc%s-l2-cache-controller", cpu->name);
+   else
+   len = sprintf(compat_buf,
+   "fsl,%c%s-l2-cache-controller",
+   tolower(cpu->name[0]), cpu->name + 1);
+
sprintf(&compat_buf[len + 1], "cache");
}
fdt_setprop(blob, off, "cache-unified", NULL, 0);
-- 
1.5.6.5

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


[U-Boot] MPC83xx and uec

2009-09-22 Thread Joakim Tjernlund

I can't find a way to get at uec_info_t/STD_UEC_INFO from my board_eth_init() 
in current u-boot. Am I missing something?
Also
 drivers/qe/uec.h:int uec_initialize(bd_t *bis, uec_info_t *uec_info);
 include/netdev.h:int uec_initialize(int index);
different prototypes for the same function.

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


[U-Boot] Adding new U-Boot Command.

2009-09-22 Thread Tuma
Hi, All!

Help me please in writting new U-Boot commands.
What should I do? I should write new file in "/common", something like 
cmd_, am I right?

So where can I read about cmd_-file structure and how should new commands be 
added? And how can I add my new file to U-Boot binary?


-- 
Software Developer
General Satellite Corp.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Warning Bad CRC

2009-09-22 Thread Detlev Zundel
Hi Rahanesh,

[...]

>  sflash.c is flash driver code . I  showed you the print message of 
> savenev to note that it is erasing 0xad03 - 0xad03. That means
>  environment variables are placed in the mentioned sector(0xad03 
> - 0xad03). Actual address of environment variables is 0xad03f000, 
> which is last 4Kb
>  of  64KB sector.

Well yes, you showed us, that the code that you use actually violates
the otherwise used principle, that the environment is inside its own
erase block.  So the code actually *needs* to use some buffering of the
contents not to be destroyed.  I see this for the first time to be
honest and I would not be surprised, if fw_setenv does *not* do such a
thing by itself.  So it looks like it boils down for you to find out
whether the Linux MTD driver plays such tricks.  I don't think so and
your results indicate the same.

> If this is the case what should be the 
> DEVICE_OFFSET? ENV_SIZE?

The parameters actually do not look incorrect, but as I said, they
violate the implicit assumption that the underlying MTD erase block can
be erase without damaging anything.

> Using the latest u-boot will be quite time consuming. Please help!!!

Adding more exclamation marks will not improve your chances of getting
*free* help.  Using latest code (or code that anybody besides you knows)
however will.

Best wishes
  Detlev

-- 
5.7: Practically speaking, what is the difference between arrays and pointers?
About the difference between alcohol and marijuana; they have different
characteristics, and that's not a problem if you don't mix them too carelessly.
   - Infrequently Asked Questions in comp.lang.c
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 00/13] ppc: Fix relocation

2009-09-22 Thread Detlev Zundel
Hi,

>> This series attempts to fix relocation to RAM for ppc boards.
>>
>> I split the patches up pretty liberally, let me know if you'd like
>> them organized differently.
>>
>> I tried to be thorough during the changes (especially #1), let me
>> know if I missed anything, there's lots of linker scripts for ppc
>> boards:)
>>
>> Peter Tyser (13):
>>   ppc: Enable full relocation to RAM
>>   ppc: Check for compilers that don't support relocation
>>   ppc: Remove board.c relocation fixups
>>   ppc: Remove pci config table pointer relocation fixups
>>   ppc: Remove extable relocation fixups
>>   ppc: Remove board-specific command table relocation fixups
>>   tsec: Remove PHY command relocation fixups
>>   fpga: Remove relocation fixups
>>   mpl: Remove memory test relocation fixups
>>   lwmon, lwmon5: Remove sysmon POST relocation fixups
>>   p3mx: Remove serial relocation fixups
>>   Conditionally perform common relocation fixups
>>   ppc: Remove reloc_off field from global_data structure
>
> Wow, this is really good work. Didn't think there would be so much code
> that could be deleted due to working relocation :)
> I hope WD will pull this in and potentially broken boards will have to
> be fixed rather than backing stuff out.

Seconded.  That's what a merge window is for, isn't it? :)

One should do some further simple text searching to find more code that
can now be potentially be removed.  For example, from what I wrote
board/inka4x0/inkadiag.c also has such reloacted code inside.

Cheers
  Detlev

-- 
While  the list of  different methods is not  endless, it is certainly
pretty long, with new ones being dreamed up all the time. Fortunately,
space limitations prevent us from looking at all of them.
-- Andrew S. Tanenbaum
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Adding new U-Boot Command.

2009-09-22 Thread Detlev Zundel
Hi Tuma,

> Help me please in writting new U-Boot commands.
> What should I do? I should write new file in "/common", something like 
> cmd_, am I right?

This really depends if you want to implement a command which is useful
for all boards, then it should be below common/ or if it is special to
one board.  Then it should go into the board directory.

> So where can I read about cmd_-file structure and how should new
> commands be added?

You have all the source to study.  Look into how other people do it.
Search the history for commits adding new commands and study them.  For
example this commit[1] adds new commands to an already existing file,
but it is a start.

> And how can I add my new file to U-Boot binary?

Make sure it is mentioned in the relevant Makefile.

Cheers
  Detlev

PS: Is the LCD display working now?

[1] 
http://git.denx.de/?p=u-boot.git;a=commitdiff;h=02c9aa1d41f73fdcf8383a36cc0cbbfaf952855d

-- 
While  the list of  different methods is not  endless, it is certainly
pretty long, with new ones being dreamed up all the time. Fortunately,
space limitations prevent us from looking at all of them.
-- Andrew S. Tanenbaum
--
DENX Software Engineering GmbH,  MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: d...@denx.de
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [U-boot] Marvell Pull Request

2009-09-22 Thread Prafulla Wadaskar
 

> -Original Message-
> From: Tom [mailto:tom@windriver.com] 
> Sent: Tuesday, September 22, 2009 12:46 AM
> To: Prafulla Wadaskar
> Cc: U-Boot
> Subject: Re: [U-Boot] [U-boot] Marvell Pull Request
> 
> Prafulla Wadaskar wrote:
> > Hi Wolfgang
> > 
> > Please pull
> 
> Shouldn't this rather get pulled to u-boot-arm?
> Tom

Hi Tom,
Yes :-) you are right.
I was bit biased since u-boot-marvell.git was cloned from u-boot.git
Shall I generate new email pull request? Or
Can you please kindly pull it to u-boot-arm?

Regards..
Prafulla . .

> 
> 
> > 
> > The following changes since commit 
> 3b6a9267f0de7b85d387fa4123d0b58379363447:
> >   Wolfgang Denk (1):
> > board/flagadm/flash.c: fix compile warning
> > 
> > are available in the git repository at:
> > 
> >   git://git.denx.de/u-boot-marvell.git master
> > 
> > Prafulla Wadaskar (2):
> >   Kirkwood: rd6281a: Add kwbimage build support
> >   Kirkwood: mv88f6281gtw_ge: Add kwbimage build support
> > 
> > Simon Kagstrom (1):
> >   Support for the OpenRD base board
> > 
> >  MAINTAINERS|4 +
> >  MAKEALL|1 +
> >  Makefile   |3 +
> >  board/Marvell/mv88f6281gtw_ge/config.mk|3 +
> >  board/Marvell/mv88f6281gtw_ge/kwbimage.cfg |  165 
> +
> >  board/Marvell/openrd_base/Makefile |   56 +++
> >  board/Marvell/openrd_base/config.mk|   33 
> >  board/Marvell/openrd_base/kwbimage.cfg |  168 
> +
> >  board/Marvell/openrd_base/openrd_base.c|  160 
> 
> >  board/Marvell/openrd_base/openrd_base.h|   46 ++
> >  board/Marvell/rd6281a/config.mk|3 +
> >  board/Marvell/rd6281a/kwbimage.cfg |  167 
> +
> >  include/configs/openrd_base.h  |  220 
> 
> >  13 files changed, 1029 insertions(+), 0 deletions(-)
> >  create mode 100644 board/Marvell/mv88f6281gtw_ge/kwbimage.cfg
> >  create mode 100644 board/Marvell/openrd_base/Makefile
> >  create mode 100644 board/Marvell/openrd_base/config.mk
> >  create mode 100644 board/Marvell/openrd_base/kwbimage.cfg
> >  create mode 100644 board/Marvell/openrd_base/openrd_base.c
> >  create mode 100644 board/Marvell/openrd_base/openrd_base.h
> >  create mode 100644 board/Marvell/rd6281a/kwbimage.cfg
> >  create mode 100644 include/configs/openrd_base.h
> > 
> > Regards..
> > Prafulla . . .
> > ___
> > U-Boot mailing list
> > U-Boot@lists.denx.de
> > http://lists.denx.de/mailman/listinfo/u-boot
> 
> 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Warning Bad CRC

2009-09-22 Thread Wolfgang Denk
Dear Rahanesh,

In message <4ab86541.1090...@tataelxsi.co.in> you wrote:
>
> >> *** Warning - bad CRC, using default environment
> >
> > Ah! Here you can see that the CRC is incorrect in U-Boot already, so
> > why do you expect to see a different result when using fw_printenv?
> >
> > WHen the CRC _is_ incorrect, both U-Boot and fw_printenv will report
> > this fact in the same way.
> >   
>  The message is printed because the flash sector or ERPROM containing 
> the environment variables has never been initialized yet. The message 
> will go away as soon as you save the envrionment variables using the 
> |*saveenv*| command.

Well, then just run "saveenv", make sure the warning message
disappears, and re-try using fw_printenv after that.

> > I have no idea what sort of code you might be using there, there is no
> > such file as 'sflash.c' in the mainline U-Boot code.
> >   
>  sflash.c is flash driver code . I  showed you the print message of 

Maybe it's some flash driver code - in any case it is code that is
unknown to us, as it is not part of the mainline U-Boot source code.
How do you expect us to comment on the operation of unknown code?

> savenev to note that it is erasing 0xad03 - 0xad03. That means
>  environment variables are placed in the mentioned sector(0xad03 
> - 0xad03). Actual address of environment variables is 0xad03f000, 
> which is last 4Kb
>  of  64KB sector. If this is the case what should be the 
> DEVICE_OFFSET? ENV_SIZE?

You are using a quite unusual configuration here - and one that makes
no sense to me. But I don;t know your hardware, nor your code, so
Icannot comment.

> Using the latest u-boot will be quite time consuming. Please help!!!

I cannot help you. Nobody can help you. You are using unknown
hardware with unknown code in a suspicious configuration. Someone who
came up with this implementation and configuration should also have
the knowledge to debug the issues you are observing. Contact the
developers of that code, please.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
"An open mind has but one disadvantage: it collects dirt."
- a saying at RPI
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] MPC83xx and uec

2009-09-22 Thread Joakim Tjernlund
>
>
> I can't find a way to get at uec_info_t/STD_UEC_INFO from my board_eth_init()
> in current u-boot. Am I missing something?
> Also
>  drivers/qe/uec.h:int uec_initialize(bd_t *bis, uec_info_t *uec_info);
>  include/netdev.h:int uec_initialize(int index);
> different prototypes for the same function.

BTW, I am looking for a way to swap the order of ethernet interfaces:
static uec_info_t uec_info[] = {
#ifdef CONFIG_UEC_ETH1
STD_UEC_INFO(1),/* UEC1 */
#endif
#ifdef CONFIG_UEC_ETH2
STD_UEC_INFO(2),/* UEC2 */
#endif
#ifdef CONFIG_UEC_ETH3
STD_UEC_INFO(3),/* UEC3 */
#endif
};

Sometimes I want ETH2 to be the first and ETH1 the second I/F and I do this
dynamically depending on actual HW detected.

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


[U-Boot] [PATCH] fsl_i2c: Do not generate STOP after read.

2009-09-22 Thread Joakim Tjernlund
__i2c_read always ends with a STOP condition thereby releasing
the bus. It is cleaner to do the STOP magic in i2c_read(), like
i2c_write() does. This may also help future multimaster systems which
wants to hold on to the bus until all transactions are finished.

Signed-off-by: Joakim Tjernlund 
---

This is on top of my earlier fsl_i2c series. I am about
to send a similar patch to the kernel.

 drivers/i2c/fsl_i2c.c |   11 ++-
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c
index 0c5f6be..413bcba 100644
--- a/drivers/i2c/fsl_i2c.c
+++ b/drivers/i2c/fsl_i2c.c
@@ -333,9 +333,10 @@ __i2c_read(u8 *data, int length)
writeb(I2C_CR_MEN | I2C_CR_MSTA | I2C_CR_TXAK,
   &i2c_dev[i2c_bus_num]->cr);
 
-   /* Generate stop on last byte */
+   /* Do not generate stop on last byte */
if (i == length - 1)
-   writeb(I2C_CR_MEN | I2C_CR_TXAK, 
&i2c_dev[i2c_bus_num]->cr);
+   writeb(I2C_CR_MEN | I2C_CR_MSTA | I2C_CR_MTX,
+  &i2c_dev[i2c_bus_num]->cr);
 
data[i] = readb(&i2c_dev[i2c_bus_num]->dr);
}
@@ -358,11 +359,11 @@ i2c_read(u8 dev, uint addr, int alen, u8 *data, int 
length)
&& i2c_write_addr(dev, I2C_READ_BIT, 1) != 0)
i = __i2c_read(data, length);
 
-   if (length && i2c_wait4bus()) /* Wait until STOP */
-   debug("i2c_read: wait4bus timed out\n");
-
writeb(I2C_CR_MEN, &i2c_dev[i2c_bus_num]->cr);
 
+   if (i2c_wait4bus()) /* Wait until STOP */
+   debug("i2c_read: wait4bus timed out\n");
+
if (i == length)
return 0;
 
-- 
1.6.4.3

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


[U-Boot] [PATCH 1/4 v3] s5pc1xx: support Samsung s5pc1xx SoC

2009-09-22 Thread Minkyu Kang
This patch adds support for the Samsung s5pc100 and s5pc110
SoCs. The s5pc1xx SoC is an ARM Cortex A8 processor.

Signed-off-by: Minkyu Kang 
Signed-off-by: HeungJun, Kim 
---
Changes since v1:
- make C struct instead of base+offset
- use writel/readl function
- use the strmhz function
- fix some comments

Changes since v2:
- use function pointer for separate Soc
- provide two separate functions for each Soc
- remove not helpful cpu informations
- modify to lower case letter in C struct
- remove unnecessary Macro and header files

 cpu/arm_cortexa8/s5pc1xx/Makefile|   53 ++
 cpu/arm_cortexa8/s5pc1xx/cache.c |   43 +
 cpu/arm_cortexa8/s5pc1xx/clock.c |  308 ++
 cpu/arm_cortexa8/s5pc1xx/cpu_info.c  |   57 +++
 cpu/arm_cortexa8/s5pc1xx/reset.S |   47 +
 cpu/arm_cortexa8/s5pc1xx/timer.c |  195 +
 include/asm-arm/arch-s5pc1xx/clk.h   |   32 
 include/asm-arm/arch-s5pc1xx/clock.h |   94 ++
 include/asm-arm/arch-s5pc1xx/cpu.h   |   72 
 include/asm-arm/arch-s5pc1xx/gpio.h  |  129 ++
 include/asm-arm/arch-s5pc1xx/power.h |   42 +
 include/asm-arm/arch-s5pc1xx/pwm.h   |   59 +++
 include/asm-arm/arch-s5pc1xx/uart.h  |   47 +
 13 files changed, 1178 insertions(+), 0 deletions(-)
 create mode 100644 cpu/arm_cortexa8/s5pc1xx/Makefile
 create mode 100644 cpu/arm_cortexa8/s5pc1xx/cache.c
 create mode 100644 cpu/arm_cortexa8/s5pc1xx/clock.c
 create mode 100644 cpu/arm_cortexa8/s5pc1xx/cpu_info.c
 create mode 100644 cpu/arm_cortexa8/s5pc1xx/reset.S
 create mode 100644 cpu/arm_cortexa8/s5pc1xx/timer.c
 create mode 100644 include/asm-arm/arch-s5pc1xx/clk.h
 create mode 100644 include/asm-arm/arch-s5pc1xx/clock.h
 create mode 100644 include/asm-arm/arch-s5pc1xx/cpu.h
 create mode 100644 include/asm-arm/arch-s5pc1xx/gpio.h
 create mode 100644 include/asm-arm/arch-s5pc1xx/power.h
 create mode 100644 include/asm-arm/arch-s5pc1xx/pwm.h
 create mode 100644 include/asm-arm/arch-s5pc1xx/uart.h

diff --git a/cpu/arm_cortexa8/s5pc1xx/Makefile 
b/cpu/arm_cortexa8/s5pc1xx/Makefile
new file mode 100644
index 000..e08d9d8
--- /dev/null
+++ b/cpu/arm_cortexa8/s5pc1xx/Makefile
@@ -0,0 +1,53 @@
+#
+# (C) Copyright 2000-2003
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# (C) Copyright 2008
+# Guennadi Liakhovetki, DENX Software Engineering, 
+#
+# 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$(SOC).a
+
+SOBJS  = reset.o
+
+COBJS  += cache.o
+COBJS  += clock.o
+COBJS  += cpu_info.o
+COBJS  += timer.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS) $(SOBJS))
+
+all:$(obj).depend $(LIB)
+
+$(LIB):$(OBJS)
+   $(AR) $(ARFLAGS) $@ $(OBJS)
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/cpu/arm_cortexa8/s5pc1xx/cache.c b/cpu/arm_cortexa8/s5pc1xx/cache.c
new file mode 100644
index 000..8652a45
--- /dev/null
+++ b/cpu/arm_cortexa8/s5pc1xx/cache.c
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2009 Samsung Electronics
+ * Minkyu Kang 
+ *
+ * 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 
+#include 
+
+void l2_cache_enable(void)
+{
+   unsigned long i;
+
+   __asm__ __volatile__("mrc p15, 0, %0, c1,

[U-Boot] [PATCH 2/4 v3] s5pc1xx: support onenand driver

2009-09-22 Thread Minkyu Kang
This patch includes the onenand driver for s5pc100

Signed-off-by: Minkyu Kang 
Signed-off-by: Kyungmin Park 
---
Changes since v1:
- move samsung_onenand.h to include/linux/mtd/
- make C struct instead of base+offset
- Remove the "1 &&" in while loop

Changes since v2:
- drop blank lines
- adds some comments
- modify to lower case letter in C struct

 drivers/mtd/onenand/Makefile|1 +
 drivers/mtd/onenand/samsung.c   |  622 +++
 include/linux/mtd/onenand.h |1 +
 include/linux/mtd/onenand_regs.h|4 +
 include/linux/mtd/samsung_onenand.h |  131 
 5 files changed, 759 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mtd/onenand/samsung.c
 create mode 100644 include/linux/mtd/samsung_onenand.h

diff --git a/drivers/mtd/onenand/Makefile b/drivers/mtd/onenand/Makefile
index 1d35a57..2571df0 100644
--- a/drivers/mtd/onenand/Makefile
+++ b/drivers/mtd/onenand/Makefile
@@ -26,6 +26,7 @@ include $(TOPDIR)/config.mk
 LIB:= $(obj)libonenand.a
 
 COBJS-$(CONFIG_CMD_ONENAND):= onenand_uboot.o onenand_base.o onenand_bbt.o
+COBJS-$(CONFIG_SAMSUNG_ONENAND)+= samsung.o
 
 COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c
new file mode 100644
index 000..5433f19
--- /dev/null
+++ b/drivers/mtd/onenand/samsung.c
@@ -0,0 +1,622 @@
+/*
+ * S3C64XX/S5PC100 OneNAND driver at U-Boot
+ *
+ *  Copyright (C) 2008-2009 Samsung Electronics
+ *  Kyungmin Park 
+ *
+ * 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.
+ *
+ * Implementation:
+ * Emulate the pseudo BufferRAM
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#ifdef ONENAND_DEBUG
+#define DPRINTK(format, args...)   \
+do {   \
+   printf("%s[%d]: " format "\n", __func__, __LINE__, ##args); \
+} while (0)
+#else
+#define DPRINTK(...)   do { } while (0)
+#endif
+
+#define ONENAND_ERASE_STATUS   0x00
+#define ONENAND_MULTI_ERASE_SET0x01
+#define ONENAND_ERASE_START0x03
+#define ONENAND_UNLOCK_START   0x08
+#define ONENAND_UNLOCK_END 0x09
+#define ONENAND_LOCK_START 0x0A
+#define ONENAND_LOCK_END   0x0B
+#define ONENAND_LOCK_TIGHT_START   0x0C
+#define ONENAND_LOCK_TIGHT_END 0x0D
+#define ONENAND_UNLOCK_ALL 0x0E
+#define ONENAND_OTP_ACCESS 0x12
+#define ONENAND_SPARE_ACCESS_ONLY  0x13
+#define ONENAND_MAIN_ACCESS_ONLY   0x14
+#define ONENAND_ERASE_VERIFY   0x15
+#define ONENAND_MAIN_SPARE_ACCESS  0x16
+#define ONENAND_PIPELINE_READ  0x4000
+
+#if defined(CONFIG_S3C64XX)
+#define MAP_00 (0x0 << 24)
+#define MAP_01 (0x1 << 24)
+#define MAP_10 (0x2 << 24)
+#define MAP_11 (0x3 << 24)
+#elif defined(CONFIG_S5PC1XX)
+#define MAP_00 (0x0 << 26)
+#define MAP_01 (0x1 << 26)
+#define MAP_10 (0x2 << 26)
+#define MAP_11 (0x3 << 26)
+#endif
+
+/* read/write of XIP buffer */
+#define CMD_MAP_00(mem_addr)   (MAP_00 | ((mem_addr) << 1))
+/* read/write to the memory device */
+#define CMD_MAP_01(mem_addr)   (MAP_01 | (mem_addr))
+/* control special functions of the memory device */
+#define CMD_MAP_10(mem_addr)   (MAP_10 | (mem_addr))
+/* direct interface(direct access) with the memory device */
+#define CMD_MAP_11(mem_addr)   (MAP_11 | ((mem_addr) << 2))
+
+struct s3c_onenand {
+   struct mtd_info *mtd;
+   void __iomem*base;
+   void __iomem*ahb_addr;
+   int bootram_command;
+   void __iomem*page_buf;
+   void __iomem*oob_buf;
+   unsigned int(*mem_addr)(int fba, int fpa, int fsa);
+   struct samsung_onenand *reg;
+};
+
+static struct s3c_onenand *onenand;
+
+static int s3c_read_cmd(unsigned int cmd)
+{
+   return readl(onenand->ahb_addr + cmd);
+}
+
+static void s3c_write_cmd(int value, unsigned int cmd)
+{
+   writel(value, onenand->ahb_addr + cmd);
+}
+
+/*
+ * MEM_ADDR
+ *
+ * fba: flash block address
+ * fpa: flash page address
+ * fsa: flash sector address
+ *
+ * return the buffer address on the memory device
+ * It will be combined with CMD_MAP_XX
+ */
+#if defined(CONFIG_S3C64XX)
+static unsigned int s3c_mem_addr(int fba, int fpa, int fsa)
+{
+   return (fba << 12) | (fpa << 6) | (fsa << 4);
+}
+#elif defined(CONFIG_S5PC1XX)
+static unsigned int s3c_mem_addr(int fba, int fpa, int fsa)
+{
+   return (fba << 13) | (fpa << 7) | (fsa << 5);
+}
+#endif
+
+static void s

[U-Boot] [PATCH 3/4 v3] s5pc1xx: support serial driver

2009-09-22 Thread Minkyu Kang
This patch includes the serial driver for s5pc1xx

Signed-off-by: Minkyu Kang 
---
Changes since v1:
- use serial multi API
- use writel/readl function
- remove duplicate code

Changes since v2:
- use sizeof() instead of the constant

 common/serial.c |   18 +++
 drivers/serial/Makefile |1 +
 drivers/serial/serial_s5pc1xx.c |  307 +++
 include/serial.h|7 +
 4 files changed, 333 insertions(+), 0 deletions(-)
 create mode 100644 drivers/serial/serial_s5pc1xx.c

diff --git a/common/serial.c b/common/serial.c
index 41a24c2..e5ce9fd 100644
--- a/common/serial.c
+++ b/common/serial.c
@@ -69,6 +69,18 @@ struct serial_device *__default_serial_console (void)
 #else
 #error "CONFIG_SERIAL? missing."
 #endif
+#elif defined(CONFIG_S5PC1XX)
+#if defined(CONFIG_SERIAL0)
+   return &s5pc1xx_serial0_device;
+#elif defined(CONFIG_SERIAL1)
+   return &s5pc1xx_serial1_device;
+#elif defined(CONFIG_SERIAL2)
+   return &s5pc1xx_serial2_device;
+#elif defined(CONFIG_SERIAL3)
+   return &s5pc1xx_serial3_device;
+#else
+#error "CONFIG_SERIAL? missing."
+#endif
 #elif defined(CONFIG_OMAP3_ZOOM2)
return ZOOM2_DEFAULT_SERIAL_DEVICE;
 #else
@@ -139,6 +151,12 @@ void serial_initialize (void)
serial_register(&s3c24xx_serial1_device);
serial_register(&s3c24xx_serial2_device);
 #endif
+#if defined(CONFIG_S5PC1XX)
+   serial_register(&s5pc1xx_serial0_device);
+   serial_register(&s5pc1xx_serial1_device);
+   serial_register(&s5pc1xx_serial2_device);
+   serial_register(&s5pc1xx_serial3_device);
+#endif
serial_assign (default_serial_console ()->name);
 }
 
diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index 64882a2..3c77a7c 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -33,6 +33,7 @@ COBJS-$(CONFIG_NS9750_UART) += ns9750_serial.o
 COBJS-$(CONFIG_SYS_NS16550) += ns16550.o
 COBJS-$(CONFIG_DRIVER_S3C4510_UART) += s3c4510b_uart.o
 COBJS-$(CONFIG_S3C64XX) += s3c64xx.o
+COBJS-$(CONFIG_S5PC1XX) += serial_s5pc1xx.o
 COBJS-$(CONFIG_SYS_NS16550_SERIAL) += serial.o
 COBJS-$(CONFIG_CLPS7111_SERIAL) += serial_clps7111.o
 COBJS-$(CONFIG_IMX_SERIAL) += serial_imx.o
diff --git a/drivers/serial/serial_s5pc1xx.c b/drivers/serial/serial_s5pc1xx.c
new file mode 100644
index 000..48feb4e
--- /dev/null
+++ b/drivers/serial/serial_s5pc1xx.c
@@ -0,0 +1,307 @@
+/*
+ * (C) Copyright 2009 SAMSUNG Electronics
+ * Minkyu Kang 
+ * Heungjun Kim 
+ *
+ * based on drivers/serial/s3c64xx.c
+ *
+ * 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 
+#include 
+#include 
+#include 
+
+#if defined(CONFIG_SERIAL_MULTI)
+#include 
+
+/* Multi serial device functions */
+#define DECLARE_S5P_SERIAL_FUNCTIONS(port) \
+int  s5p_serial##port##_init(void) { \
+   return serial_init_dev(port); } \
+void s5p_serial##port##_setbrg(void) { \
+   serial_setbrg_dev(port); } \
+int  s5p_serial##port##_getc(void) { \
+   return serial_getc_dev(port); } \
+int  s5p_serial##port##_tstc(void) { \
+   return serial_tstc_dev(port); } \
+void s5p_serial##port##_putc(const char c) { \
+   serial_putc_dev(port, c); } \
+void s5p_serial##port##_puts(const char *s) { \
+   serial_puts_dev(port, s); }
+
+#define INIT_S5P_SERIAL_STRUCTURE(port, name, bus) { \
+   name, \
+   bus, \
+   s5p_serial##port##_init, \
+   s5p_serial##port##_setbrg, \
+   s5p_serial##port##_getc, \
+   s5p_serial##port##_tstc, \
+   s5p_serial##port##_putc, \
+   s5p_serial##port##_puts, }
+#else
+
+#ifdef CONFIG_SERIAL0
+#define UART_NRS5PC1XX_UART0
+#elif defined(CONFIG_SERIAL1)
+#define UART_NRS5PC1XX_UART1
+#elif defined(CONFIG_SERIAL2)
+#define UART_NRS5PC1XX_UART2
+#elif defined(CONFIG_SERIAL3)
+#define UART_NRS5PC1XX_UART3
+#else
+#error "Bad: you didn't configure serial ..."
+#endif
+
+#endif /* CONFIG_SERIAL_MULTI */
+
+static inline struct s5pc1xx_uart *s5pc1xx_get_base_uart(int dev_index)
+{
+   u32 offset = dev_index * sizeof(struct s5pc1xx_uart);
+
+   if (cpu_is_s5pc100())
+   return (struct s5pc1xx_uart *)(S5PC100_UART_BASE + offset);
+   else
+   return (struct s5pc1xx_uart *)(S5PC110_UAR

[U-Boot] [PATCH 4/4 v3] s5pc1xx: add support SMDKC100 board

2009-09-22 Thread Minkyu Kang
Adds new board SMDKC100 that uses s5pc100 SoC

Signed-off-by: Minkyu Kang 
Signed-off-by: HeungJun, Kim 
---
Changes since v1:
- arrange env values for more readable
- make C struct instead of base+offset
- use MACH_TYPE_SMDKC100 directly
- fix the CONFIG_SYS_HZ to 1000
- enable LOADB, LOADS, BOOTD, XIMG, FPGA

Changes since v2:
- remove  and SZ_XX defines
- remove the define of machine type
- remove the unnecessary comment

 MAINTAINERS|4 +
 MAKEALL|1 +
 Makefile   |3 +
 board/samsung/smdkc100/Makefile|   55 +++
 board/samsung/smdkc100/config.mk   |   16 ++
 board/samsung/smdkc100/lowlevel_init.S |  215 
 board/samsung/smdkc100/mem_setup.S |  197 ++
 board/samsung/smdkc100/onenand.c   |   83 +++
 board/samsung/smdkc100/smdkc100.c  |   51 +++
 include/configs/smdkc100.h |  242 
 10 files changed, 867 insertions(+), 0 deletions(-)
 create mode 100644 board/samsung/smdkc100/Makefile
 create mode 100644 board/samsung/smdkc100/config.mk
 create mode 100644 board/samsung/smdkc100/lowlevel_init.S
 create mode 100644 board/samsung/smdkc100/mem_setup.S
 create mode 100644 board/samsung/smdkc100/onenand.c
 create mode 100644 board/samsung/smdkc100/smdkc100.c
 create mode 100644 include/configs/smdkc100.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 439c1b8..eddf736 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -725,6 +725,10 @@ Alex Z
lartSA1100
dnp1110 SA1110
 
+Minkyu Kang 
+
+   SMDKC100ARM CORTEX-A8 (S5PC100 SoC)
+
 -
 
 Unknown / orphaned boards:
diff --git a/MAKEALL b/MAKEALL
index 13f3f5e..0b779dc 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -588,6 +588,7 @@ LIST_ARM_CORTEX_A8="\
omap3_pandora   \
omap3_zoom1 \
omap3_zoom2 \
+   smdkc100\
 "
 
 #
diff --git a/Makefile b/Makefile
index df22bff..8f69c17 100644
--- a/Makefile
+++ b/Makefile
@@ -3169,6 +3169,9 @@ omap3_zoom1_config :  unconfig
 omap3_zoom2_config :   unconfig
@$(MKCONFIG) $(@:_config=) arm arm_cortexa8 zoom2 logicpd omap3
 
+smdkc100_config:   unconfig
+   @$(MKCONFIG) $(@:_config=) arm arm_cortexa8 smdkc100 samsung s5pc1xx
+
 #
 ## XScale Systems
 #
diff --git a/board/samsung/smdkc100/Makefile b/board/samsung/smdkc100/Makefile
new file mode 100644
index 000..808d0dd
--- /dev/null
+++ b/board/samsung/smdkc100/Makefile
@@ -0,0 +1,55 @@
+#
+# (C) Copyright 2000, 2001, 2002
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# (C) Copyright 2008
+# Guennadi Liakhovetki, DENX Software Engineering, 
+#
+# 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).a
+
+COBJS-y:= smdkc100.o
+COBJS-$(CONFIG_SAMSUNG_ONENAND)+= onenand.o
+SOBJS  := lowlevel_init.o
+
+SRCS:= $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS-y))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(SOBJS) $(OBJS)
+   $(AR) $(ARFLAGS) $@ $(SOBJS) $(OBJS)
+
+clean:
+   rm -f $(SOBJS) $(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/samsung/smdkc100/config.mk b/board/samsung/smdkc100/config.mk
new file mode 100644
index 000..ebab420
--- /dev/null
+++ b/board/samsung/smdkc100/config.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2008 # Samsung Elecgtronics
+# Kyungmin Park 
+#
+
+# On S5PC100 we use the 128 MiB OneDRAM bank at
+#
+# 0x3000 to 0x3500 (80MiB)
+# 0x

Re: [U-Boot] Subject: [PATCH v3] mx27ads: add support for iMX27ADS board from Freescale

2009-09-22 Thread Alan Carvalho de Assis
Hi Fred,

Thank you for your fast reply, please see my comments below:

On 9/21/09, Fred Fan  wrote:
> Dear Alan Carvalho de Assis,
>
> 2009/9/16 Alan Carvalho de Assis 
>
>> +   /*
>> +* DDR on CSD0
>> +*/
>> +   write32 0xD8001010, 0x0008
>> +   write32 0x10027828, 0x
>> +   write32 0x10027830, 0x
>> +   write32 0x10027834, 0x
>> +   write32 0x10027838, 0x5005
>> +   write32 0x1002783C, 0x1555
>> +   write32 0xD8001010, 0x0004
>> +   write32 0xD8001004, 0x006ac73a
>> +   write32 0xD8001000, 0x9210
>> +   write32 0xAF00, 0x
>> +   write32 0xD8001000, 0xA210
>> +   write32 0xAF00, 0x
>> +   write32 0xAF00, 0x
>> +   write32 0xAF00, 0x
>> +   write32 0xAF00, 0x
>> +   write32 0xD8001000, 0xA220
>> +   write32 0xAF00, 0x
>> +   write32 0xAF00, 0x
>> +   write32 0xAF00, 0x
>> +   write32 0xAF00, 0x
>> +   write32 0xD8001000, 0xb210
>
> +   ldr r0, =0xA033
>> +   mov r1, #0xda
>> +   strbr1, [r0]
>> +   ldr r0, =0xA100
>> +   mov r1, #0xff
>> +   strbr1, [r0]
>> +   write32 0xD8001000, 0x82226080
>
> Please use the friendly register definition.

I based on U-Boot-v2 start-up code.
Where should I place these registers definition? (could be in
include/asm-arm/arch-mx27/imx-regs.h ?)

>> +*
>> +* FIXME: Using the 399*2 MHz values from table 3-8 doens't work
>> +*with 1.2 V core voltage! Find out if this is
>> +*documented somewhere.
>> +*/
>> +   write32 MPCTL0, 0x1EF15D5   /* MPLL = 199.5*2 MHz
>> */
>> +   write32 SPCTL0, 0x043A1C09  /* SPLL = FIXME (needs review)
>>  */
>>
>  I will check the setting in another mail.
>

Sure, I will wait for it.

>> +   /* clock gating enable */
>> +   write32 0x10027818, 0x00050f08
>> +
>>
> ditto
>

ACK

>> +
>> +   /* skip sdram initialization if we run from ram */
>> +   cmp pc, #0xa000
>> +   bls 1f
>> +   cmp pc, #0xc000
>> +   bhi 1f
>>
> Please use the definitions of ddr area.
>

Ok

>> +int board_init(void)
>> +{
>> +   struct gpio_regs *regs = (struct gpio_regs *)IMX_GPIO_BASE;
>> +
>> +   gd->bd->bi_arch_number = MACH_TYPE_MX27ADS;
>> +   gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
>>
> move bi_boot_params to dram_init.
>

Ok

>> +/*
>> + * Ethernet
>> + */
>> +#define CONFIG_FEC_MXC
>> +#define CONFIG_FEC_MXC_PHYADDR 0x1f
>> +#define CONFIG_MII
>> +#define CONFIG_NET_MULTI
>> +
>> +/*#define CONFIG_DRIVER_CS89001
>> +#define CS8900_BASE 0xD4020300
>> +#define CS8900_BUS161*/
>>
> Remove commented code.
>

I will active this commented lines, I think it just need another
ETHADDR to work.

>> +#define CONFIG_ETHADDR 02:80:ad:20:31:e8

Thank you Fred, I am glad to see more Freescale guys helping
open-source projects.

Best Regards,

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


[U-Boot] how to apply at91 patch for the current u-boot-2009-06?

2009-09-22 Thread sunr2007

Hi all,
i want to know how to apply at91 patch for current versions of u-boot like
2009-06? i saw in linux4sam.org website that patched are available only for
u-boot-1.3.4 ? but after that no patches for the current versions?can anyone
help me plz how to update u-boot-2009-06 with the latest at91 patch. it will
be of great help to me:confused:
warm regards,
Ravi Kulkarni.
-- 
View this message in context: 
http://www.nabble.com/how-to-apply-at91-patch-for-the-current-u-boot-2009-06--tp25530710p25530710.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

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


[U-Boot] [PATCH 0/3] New MIIPHYBB implementation with multi-bus support

2009-09-22 Thread Luigi 'Comio' Mantellini
From: Luigi 'Comio' Mantellini 


This patch rewrites the miiphybb ( Bit-banged MII bus driver ) in order to
support an arbitrary number of buses. This feature is useful when your board
uses different mii buses for different phys and all (or a part) of these buses
are implemented via bit-banging mode.

The driver requires that the following macros should be defined into the board
configuration file:

CONFIG_BITBANGMII   - Enable the miiphybb driver
CONFIG_BITBANGMII_MULTI - Enable the multi bus support

If the CONFIG_BITBANGMII_MULTI is not defined, the board's config file needs to 
define
the following macros:

MII_INIT  - Generic cod to enable the MII bus (like gpios setup)
MDIO_DECLARE  - Declaration needed to access to the MDIO pin
MDIO_ACTIVE   - Activate the MDIO pin as out pin
MDIO_TRISTATE - Activate the MDIO pin as input/tristate pin
MDIO_READ - Read the MDIO pin
MDIO(v)   - Write v on the MDIO pin
MDC_DECLARE   - Declaration needed to access to the MDC pin
MDC(v)- Write v on the MDC pin

The previous macros makes the driver at most compatible with the previous 
version
(that didn't support the multi-bus).

If the CONFIG_BITBANGMII_MULTI is defined, the board code needs to fill the
bbmiibusses[] array with a record for each required bus.
The record (struct bbmiibus) has the following fields/callbacks (see miiphy.h 
for
details):

char name[]- The symbolic name that must be equal to the MII bus 
registered
 name
int (*init)()  - Initialization function called at startup time (just 
before the
 Ethernet initialization)
int (*mdio_active)()   - Activate the MDIO pin as output
int (*mdio_tristate)() - Activate the MDIO pin as input/tristate pin
int (*set_mdio)()  - Write the MDIO pin
int (*get_mdio)()  - Read the MDIO pin
int (*set_mdc)()   - Write the MDC pin
int (*delay)() - Delay function
void *priv - Private data used by board specific code

The board code will look like:

struct bbmiibus bbmiibusses[] = {
 { .name = "miibus#1", .init = b1_init, .mdio_active = b1_mdio_active, ... },
 { .name = "miibus#2", .init = b2_init, .mdio_active = b2_mdio_active, ... },
 ...
};

Luigi 'Comio' Mantellini (3):
  Bit-banged MII driver with multi-bus support.
  Add bb_miiphy_init call before any ethernet bring-up code.
  Update all board to support new bbmiiphy driver (with multibus
support)

 drivers/net/phy/miiphybb.c   |  321 +-
 include/configs/ISPAN.h  |3 +
 include/configs/MPC8260ADS.h |2 +
 include/configs/MPC8266ADS.h |3 +
 include/configs/MPC8560ADS.h |3 +
 include/configs/Rattler.h|3 +
 include/configs/SBC8540.h|3 +
 include/configs/TQM8272.h|2 +
 include/configs/VoVPN-GW.h   |3 +
 include/configs/ZPC1900.h|3 +
 include/configs/ep8248.h |3 +
 include/configs/ep82xxm.h|3 +
 include/configs/gw8260.h |3 +
 include/configs/hymod.h  |9 ++
 include/configs/muas3001.h   |3 +
 include/configs/ppmc8260.h   |3 +
 include/configs/sacsng.h |3 +
 include/configs/sbc8260.h|3 +
 include/configs/sbc8560.h|3 +
 include/miiphy.h |   22 +++
 lib_arm/board.c  |3 +
 lib_avr32/board.c|3 +
 lib_blackfin/board.c |3 +
 lib_i386/board.c |3 +
 lib_m68k/board.c |3 +
 lib_mips/board.c |3 +
 lib_ppc/board.c  |4 +-
 lib_sh/board.c   |3 +
 lib_sparc/board.c|3 +
 29 files changed, 332 insertions(+), 97 deletions(-)

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


[U-Boot] [PATCH 3/3] Update all board to support new bbmiiphy driver (with multibus support)

2009-09-22 Thread Luigi 'Comio' Mantellini
From: Luigi 'Comio' Mantellini 

Signed-off-by: Luigi 'Comio' Mantellini 
---
 include/configs/ISPAN.h  |3 +++
 include/configs/MPC8260ADS.h |2 ++
 include/configs/MPC8266ADS.h |3 +++
 include/configs/MPC8560ADS.h |3 +++
 include/configs/Rattler.h|3 +++
 include/configs/SBC8540.h|3 +++
 include/configs/TQM8272.h|2 ++
 include/configs/VoVPN-GW.h   |3 +++
 include/configs/ZPC1900.h|3 +++
 include/configs/ep8248.h |3 +++
 include/configs/ep82xxm.h|3 +++
 include/configs/gw8260.h |3 +++
 include/configs/hymod.h  |9 +
 include/configs/muas3001.h   |3 +++
 include/configs/ppmc8260.h   |3 +++
 include/configs/sacsng.h |3 +++
 include/configs/sbc8260.h|3 +++
 include/configs/sbc8560.h|3 +++
 18 files changed, 58 insertions(+), 0 deletions(-)

diff --git a/include/configs/ISPAN.h b/include/configs/ISPAN.h
index 6eb466a..be41f37 100644
--- a/include/configs/ISPAN.h
+++ b/include/configs/ISPAN.h
@@ -84,6 +84,9 @@
  * GPIO pins used for bit-banged MII communications
  */
 #define MDIO_PORT  3   /* Port D */
+#define MDIO_DECLARE   volatile ioport_t *iop = ioport_addr ((immap_t *) 
CONFIG_SYS_IMMR, MDIO_PORT)
+#define MDC_DECLAREMDIO_DECLARE
+
 
 #define CONFIG_SYS_MDIO_PIN0x0004  /* PD13 */
 #define CONFIG_SYS_MDC_PIN 0x0008  /* PD12 */
diff --git a/include/configs/MPC8260ADS.h b/include/configs/MPC8260ADS.h
index 942a4cc..255b4aa 100644
--- a/include/configs/MPC8260ADS.h
+++ b/include/configs/MPC8260ADS.h
@@ -149,6 +149,8 @@
  * GPIO pins used for bit-banged MII communications
  */
 #define MDIO_PORT  2   /* Port C */
+#define MDIO_DECLARE   volatile ioport_t *iop = ioport_addr ((immap_t *) 
CONFIG_SYS_IMMR, MDIO_PORT)
+#define MDC_DECLAREMDIO_DECLARE
 
 #if CONFIG_ADSTYPE == CONFIG_SYS_8272ADS
 #define CONFIG_SYS_MDIO_PIN0x2000  /* PC18 */
diff --git a/include/configs/MPC8266ADS.h b/include/configs/MPC8266ADS.h
index 4fd86d3..eb35fc4 100644
--- a/include/configs/MPC8266ADS.h
+++ b/include/configs/MPC8266ADS.h
@@ -95,6 +95,9 @@
  * Port pins used for bit-banged MII communictions (if applicable).
  */
 #define MDIO_PORT  2   /* Port C */
+#define MDIO_DECLARE   volatile ioport_t *iop = ioport_addr ((immap_t *) 
CONFIG_SYS_IMMR, MDIO_PORT)
+#define MDC_DECLAREMDIO_DECLARE
+
 #define MDIO_ACTIVE(iop->pdir |=  0x0040)
 #define MDIO_TRISTATE  (iop->pdir &= ~0x0040)
 #define MDIO_READ  ((iop->pdat &  0x0040) != 0)
diff --git a/include/configs/MPC8560ADS.h b/include/configs/MPC8560ADS.h
index c1a1a6d..1b9f624 100644
--- a/include/configs/MPC8560ADS.h
+++ b/include/configs/MPC8560ADS.h
@@ -362,6 +362,9 @@
  * GPIO pins used for bit-banged MII communications
  */
 #define MDIO_PORT  2   /* Port C */
+#define MDIO_DECLARE   volatile ioport_t *iop = ioport_addr ((immap_t *) 
CONFIG_SYS_IMMR, MDIO_PORT)
+#define MDC_DECLAREMDIO_DECLARE
+
 #define MDIO_ACTIVE(iop->pdir |=  0x0040)
 #define MDIO_TRISTATE  (iop->pdir &= ~0x0040)
 #define MDIO_READ  ((iop->pdat &  0x0040) != 0)
diff --git a/include/configs/Rattler.h b/include/configs/Rattler.h
index 5b6f271..249667c 100644
--- a/include/configs/Rattler.h
+++ b/include/configs/Rattler.h
@@ -103,6 +103,9 @@
  * GPIO pins used for bit-banged MII communications
  */
 #define MDIO_PORT  2   /* Port C */
+#define MDIO_DECLARE   volatile ioport_t *iop = ioport_addr ((immap_t *) 
CONFIG_SYS_IMMR, MDIO_PORT)
+#define MDC_DECLAREMDIO_DECLARE
+
 #define MDIO_ACTIVE(iop->pdir |=  0x0040)
 #define MDIO_TRISTATE  (iop->pdir &= ~0x0040)
 #define MDIO_READ  ((iop->pdat &  0x0040) != 0)
diff --git a/include/configs/SBC8540.h b/include/configs/SBC8540.h
index 7239f84..ede7c10 100644
--- a/include/configs/SBC8540.h
+++ b/include/configs/SBC8540.h
@@ -286,6 +286,9 @@
* GPIO pins used for bit-banged MII communications
*/
   #define MDIO_PORT2   /* Port C */
+  #define MDIO_DECLARE volatile ioport_t *iop = ioport_addr ((immap_t *) 
CONFIG_SYS_IMMR, MDIO_PORT)
+  #define MDC_DECLARE  MDIO_DECLARE
+
   #define MDIO_ACTIVE  (iop->pdir |=  0x0040)
   #define MDIO_TRISTATE(iop->pdir &= ~0x0040)
   #define MDIO_READ((iop->pdat &  0x0040) != 0)
diff --git a/include/configs/TQM8272.h b/include/configs/TQM8272.h
index 6c462af..522e29e 100644
--- a/include/configs/TQM8272.h
+++ b/include/configs/TQM8272.h
@@ -219,6 +219,8 @@
  * GPIO pins used for bit-banged MII communications
  */
 #define MDIO_PORT  2   /* Port C */
+#define MDIO_DECLARE   volatile ioport_t *iop = ioport_addr ((immap_t *) 
CONFIG_SYS_IMMR, MDIO_PORT)
+#define MDC_DECLAREMDIO_DECLARE
 
 #if STK82xx_150
 #define CONFIG_SYS_MDIO_PIN0x8000  /* PC16 */
diff --git a/in

[U-Boot] [PATCH 1/3] Bit-banged MII driver with multi-bus support.

2009-09-22 Thread Luigi 'Comio' Mantellini
From: Luigi 'Comio' Mantellini 

Signed-off-by: Luigi 'Comio' Mantellini 
---
 drivers/net/phy/miiphybb.c |  321 +++-
 include/miiphy.h   |   22 +++
 2 files changed, 247 insertions(+), 96 deletions(-)

diff --git a/drivers/net/phy/miiphybb.c b/drivers/net/phy/miiphybb.c
index b77c917..a60ca69 100644
--- a/drivers/net/phy/miiphybb.c
+++ b/drivers/net/phy/miiphybb.c
@@ -1,4 +1,7 @@
 /*
+ * (C) Copyright 2009 Industrie Dial Face S.p.A.
+ * Luigi 'Comio' Mantellini 
+ *
  * (C) Copyright 2001
  * Gerald Van Baren, Custom IDEAS, vanba...@cideas.com.
  *
@@ -29,18 +32,134 @@
 #include 
 #include 
 #include 
+#include 
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#ifndef CONFIG_BITBANGMII_MULTI
+/*
+ * If CONFIG_BITBANGMII_MULTI is not defined we use a
+ * compatibility layer with the previous miiphybb implementation
+ * based on macros usage.
+ *
+ */
+static int bb_mii_init_wrap(bbmiibus *bus)
+{
+#ifdef MII_INIT
+   MII_INIT;
+#endif
+   return 0;
+}
+
+static int bb_mdio_active_wrap(struct bbmiibus *bus)
+{
+#ifdef MDIO_DECLARE
+   MDIO_DECLARE;
+#endif
+   MDIO_ACTIVE;
+   return 0;
+}
+
+static int bb_mdio_tristate_wrap(struct bbmiibus *bus)
+{
+#ifdef MDIO_DECLARE
+   MDIO_DECLARE;
+#endif
+   MDIO_TRISTATE;
+   return 0;
+}
+
+static int bb_set_mdio_wrap(struct bbmiibus *bus, int v)
+{
+#ifdef MDIO_DECLARE
+   MDIO_DECLARE;
+#endif
+   MDIO (v);
+   return 0;
+}
+
+static int bb_get_mdio_wrap(struct bbmiibus *bus, int *v)
+{
+#ifdef MDIO_DECLARE
+   MDIO_DECLARE;
+#endif
+   *v = MDIO_READ;
+   return 0;
+}
+
+static int bb_set_mdc_wrap(struct bbmiibus *bus, int v)
+{
+#ifdef MDC_DECLARE
+   MDC_DECLARE;
+#endif
+   MDC (v);
+   return 0;
+}
+
+static int bb_delay_wrap(struct bbmiibus *bus)
+{
+   MIIDELAY;
+   return 0;
+}
+
+struct bbmiibus bbmiibusses[] = {
+   {
+   .name = BB_MII_DEVNAME,
+   .init = bb_mii_init_wrap,
+   .mdio_active = bb_mdio_active_wrap,
+   .mdio_tristate = bb_mdio_tristate_wrap,
+   .set_mdio = bb_set_mdio_wrap,
+   .get_mdio = bb_get_mdio_wrap,
+   .set_mdc = bb_set_mdc_wrap,
+   .delay = bb_delay_wrap,
+   }
+};
+#endif
+
+void bb_miiphy_init(void)
+{
+   int i;
+   for (i = 0; i < sizeof(bbmiibusses)/sizeof(bbmiibusses[0]); i++) {
+   /* Reloate the hooks pointers*/
+   bbmiibusses[i].init += gd->reloc_off;
+   bbmiibusses[i].done += gd->reloc_off;
+   bbmiibusses[i].mdio_active += gd->reloc_off;
+   bbmiibusses[i].mdio_tristate += gd->reloc_off;
+   bbmiibusses[i].set_mdio += gd->reloc_off;
+   bbmiibusses[i].get_mdio += gd->reloc_off;
+   bbmiibusses[i].set_mdc += gd->reloc_off;
+   bbmiibusses[i].delay += gd->reloc_off;
+
+   if (bbmiibusses[i].init != NULL) {
+   bbmiibusses[i].init(&bbmiibusses[i]);
+   }
+   }
+}
+
+static inline struct bbmiibus *bb_miiphy_getbus(char *devname)
+{
+#ifdef CONFIG_BITBANGMII_MULTI
+   /* Search the correct bus */
+   for (j = 0; j < sizeof(bbmiibusses)/sizeof(bbmmis[0]); j++) {
+   if (!strcmp(bbmiibusses[i].name, devname)) {
+   return &bbmiibusses[i];
+   }
+   }
+   return NULL;
+#else
+   /* We have just one bitbanging bus */
+   return &bbmiibusses[0];
+#endif
+}
 
 /*
  *
  * Utility to send the preamble, address, and register (common to read
  * and write).
  */
-static void miiphy_pre (char read, unsigned char addr, unsigned char reg)
+static void miiphy_pre (struct bbmiibus *bus, char read, unsigned char addr, 
unsigned char reg)
 {
int j;  /* counter */
-#if !(defined(CONFIG_EP8248) || defined(CONFIG_EP82XXM))
-   volatile ioport_t *iop = ioport_addr ((immap_t *) CONFIG_SYS_IMMR, 
MDIO_PORT);
-#endif
 
/*
 * Send a 32 bit preamble ('1's) with an extra '1' bit for good measure.
@@ -50,67 +169,66 @@ static void miiphy_pre (char read, unsigned char addr, 
unsigned char reg)
 * but it is safer and will be much more robust.
 */
 
-   MDIO_ACTIVE;
-   MDIO (1);
+   bus->mdio_active(bus);
+   bus->set_mdio (bus, 1);
for (j = 0; j < 32; j++) {
-   MDC (0);
-   MIIDELAY;
-   MDC (1);
-   MIIDELAY;
+   bus->set_mdc (bus, 0);
+   bus->delay(bus);
+   bus->set_mdc (bus, 1);
+   bus->delay(bus);
}
 
/* send the start bit (01) and the read opcode (10) or write (10) */
-   MDC (0);
-   MDIO (0);
-   MIIDELAY;
-   MDC (1);
-   MIIDELAY;
-   MDC (0);
-   MDIO (1);
-   MIIDELAY;
-   MDC (1);
-   MIIDEL

[U-Boot] [PATCH 2/3] Add bb_miiphy_init call before any ethernet bring-up code.

2009-09-22 Thread Luigi 'Comio' Mantellini
From: Luigi 'Comio' Mantellini 

Signed-off-by: Luigi 'Comio' Mantellini 
---
 lib_arm/board.c  |3 +++
 lib_avr32/board.c|3 +++
 lib_blackfin/board.c |3 +++
 lib_i386/board.c |3 +++
 lib_m68k/board.c |3 +++
 lib_mips/board.c |3 +++
 lib_ppc/board.c  |4 +++-
 lib_sh/board.c   |3 +++
 lib_sparc/board.c|3 +++
 9 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/lib_arm/board.c b/lib_arm/board.c
index a0e56d5..6e77468 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -417,6 +417,9 @@ extern void davinci_eth_set_mac_addr (const u_int8_t *addr);
mmc_initialize (gd->bd);
 #endif
 
+#ifdef CONFIG_BITBANGMII
+   bb_miiphy_init();
+#endif
 #if defined(CONFIG_CMD_NET)
 #if defined(CONFIG_NET_MULTI)
puts ("Net:   ");
diff --git a/lib_avr32/board.c b/lib_avr32/board.c
index 2d8..e715872 100644
--- a/lib_avr32/board.c
+++ b/lib_avr32/board.c
@@ -337,6 +337,9 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
if (s)
load_addr = simple_strtoul(s, NULL, 16);
 
+#ifdef CONFIG_BITBANGMII
+   bb_miiphy_init();
+#endif
 #if defined(CONFIG_CMD_NET)
s = getenv("bootfile");
if (s)
diff --git a/lib_blackfin/board.c b/lib_blackfin/board.c
index 1053f69..f1a7479 100644
--- a/lib_blackfin/board.c
+++ b/lib_blackfin/board.c
@@ -270,6 +270,9 @@ void board_init_f(ulong bootflag)
 
 static void board_net_init_r(bd_t *bd)
 {
+#ifdef CONFIG_BITBANGMII
+   bb_miiphy_init();
+#endif
 #ifdef CONFIG_CMD_NET
uchar enetaddr[6];
char *s;
diff --git a/lib_i386/board.c b/lib_i386/board.c
index 0262b5e..821713a 100644
--- a/lib_i386/board.c
+++ b/lib_i386/board.c
@@ -351,6 +351,9 @@ void start_i386boot (void)
doc_init();
 #endif
 
+#ifdef CONFIG_BITBANGMII
+   bb_miiphy_init();
+#endif
 #if defined(CONFIG_CMD_NET)
 #if defined(CONFIG_NET_MULTI)
WATCHDOG_RESET();
diff --git a/lib_m68k/board.c b/lib_m68k/board.c
index 3d88530..32ae592 100644
--- a/lib_m68k/board.c
+++ b/lib_m68k/board.c
@@ -630,6 +630,9 @@ void board_init_r (gd_t *id, ulong dest_addr)
nand_init();/* go init the NAND */
 #endif
 
+#ifdef CONFIG_BITBANGMII
+   bb_miiphy_init();
+#endif
 #if defined(CONFIG_CMD_NET)
WATCHDOG_RESET();
 #if defined(FEC_ENET)
diff --git a/lib_mips/board.c b/lib_mips/board.c
index f62a46a..fd12e68 100644
--- a/lib_mips/board.c
+++ b/lib_mips/board.c
@@ -407,6 +407,9 @@ void board_init_r (gd_t *id, ulong dest_addr)
misc_init_r ();
 #endif
 
+#ifdef CONFIG_BITBANGMII
+   bb_miiphy_init();
+#endif
 #if defined(CONFIG_CMD_NET)
 #if defined(CONFIG_NET_MULTI)
puts ("Net:   ");
diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index e8509ee..0bb159e 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -1002,6 +1002,9 @@ void board_init_r (gd_t *id, ulong dest_addr)
doc_init ();
 #endif
 
+#ifdef CONFIG_BITBANGMII
+   bb_miiphy_init();
+#endif
 #if defined(CONFIG_CMD_NET)
 #if defined(CONFIG_NET_MULTI)
WATCHDOG_RESET ();
@@ -1009,7 +1012,6 @@ void board_init_r (gd_t *id, ulong dest_addr)
 #endif
eth_initialize (bd);
 #endif
-
 #if defined(CONFIG_CMD_NET) && ( \
 defined(CONFIG_CCM)|| \
 defined(CONFIG_ELPT860)|| \
diff --git a/lib_sh/board.c b/lib_sh/board.c
index 5d61f0d..52bbc6d 100644
--- a/lib_sh/board.c
+++ b/lib_sh/board.c
@@ -178,6 +178,9 @@ void sh_generic_init(void)
 #endif /* CONFIG_WATCHDOG*/
 
 
+#ifdef CONFIG_BITBANGMII
+   bb_miiphy_init();
+#endif
 #if defined(CONFIG_CMD_NET)
{
char *s;
diff --git a/lib_sparc/board.c b/lib_sparc/board.c
index 6aadb56..56192a7 100644
--- a/lib_sparc/board.c
+++ b/lib_sparc/board.c
@@ -405,6 +405,9 @@ void board_init_f(ulong bootflag)
doc_init();
 #endif
 
+#ifdef CONFIG_BITBANGMII
+   bb_miiphy_init();
+#endif
 #if defined(CONFIG_CMD_NET)
 #if defined(CONFIG_NET_MULTI)
WATCHDOG_RESET();
-- 
1.6.3.3

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


Re: [U-Boot] [U-boot] Marvell Pull Request

2009-09-22 Thread Tom
Prafulla Wadaskar wrote:
>  
> 
>> -Original Message-
>> From: Tom [mailto:tom@windriver.com] 
>> Sent: Tuesday, September 22, 2009 12:46 AM
>> To: Prafulla Wadaskar
>> Cc: U-Boot
>> Subject: Re: [U-Boot] [U-boot] Marvell Pull Request
>>
>> Prafulla Wadaskar wrote:
>>> Hi Wolfgang
>>>
>>> Please pull
>> Shouldn't this rather get pulled to u-boot-arm?
>> Tom
> 
> Hi Tom,
> Yes :-) you are right.
> I was bit biased since u-boot-marvell.git was cloned from u-boot.git
> Shall I generate new email pull request? Or
> Can you please kindly pull it to u-boot-arm?

I would like to set up a process where I just cherry picked your changes
directly from marvell/master.

Comparing marvell/master to arm/next

git cherry t-next
+ ceb2d57c2205db5bbd868577f756c74a2568160c
+ 95a4a593b577b6e2f1da2d4b0f5ec86975c33413
+ 84a45d33c2cc261dbd5411f7c2ad45f6003025b6
+ e67af44d0167d8237dd2c2ddf8e301d19ca12914
+ 0413cfecea35eab5e591a0965c3e3ee0ff00
+ 3b6a9267f0de7b85d387fa4123d0b58379363447
+ ffed6c85ce591cd93e28190153fec421c3b2499c <- pick me
+ c928c19b2563e4977adc0570d06c900ac1e7788c <- pick me
+ 9ef0569a3c8b0d2458bdbce21a5370807e13e20a <- pick me

The others look like they came from u-boot/master

It would be helpful but not required if you merged against arm/master or 
arm/next instead of u-boot/master.

If I can assume what is good in marvell/master, we do not need
for you go through the asking for a pulls, they will just happen
when I have time, likely over the weekend.

These changes will accumulate in arm/next.
Less frequently I will merge these to arm/master.
This will happen once you and the other arm maintainers have
given then the ok.  I was thinking that this could happen monthly
but I am open for other suggestions.

Tom

> 
> Regards..
> Prafulla . .
> 
>>
>>> The following changes since commit 
>> 3b6a9267f0de7b85d387fa4123d0b58379363447:
>>>   Wolfgang Denk (1):
>>> board/flagadm/flash.c: fix compile warning
>>>
>>> are available in the git repository at:
>>>
>>>   git://git.denx.de/u-boot-marvell.git master
>>>
>>> Prafulla Wadaskar (2):
>>>   Kirkwood: rd6281a: Add kwbimage build support
>>>   Kirkwood: mv88f6281gtw_ge: Add kwbimage build support
>>>
>>> Simon Kagstrom (1):
>>>   Support for the OpenRD base board
>>>
>>>  MAINTAINERS|4 +
>>>  MAKEALL|1 +
>>>  Makefile   |3 +
>>>  board/Marvell/mv88f6281gtw_ge/config.mk|3 +
>>>  board/Marvell/mv88f6281gtw_ge/kwbimage.cfg |  165 
>> +
>>>  board/Marvell/openrd_base/Makefile |   56 +++
>>>  board/Marvell/openrd_base/config.mk|   33 
>>>  board/Marvell/openrd_base/kwbimage.cfg |  168 
>> +
>>>  board/Marvell/openrd_base/openrd_base.c|  160 
>> 
>>>  board/Marvell/openrd_base/openrd_base.h|   46 ++
>>>  board/Marvell/rd6281a/config.mk|3 +
>>>  board/Marvell/rd6281a/kwbimage.cfg |  167 
>> +
>>>  include/configs/openrd_base.h  |  220 
>> 
>>>  13 files changed, 1029 insertions(+), 0 deletions(-)
>>>  create mode 100644 board/Marvell/mv88f6281gtw_ge/kwbimage.cfg
>>>  create mode 100644 board/Marvell/openrd_base/Makefile
>>>  create mode 100644 board/Marvell/openrd_base/config.mk
>>>  create mode 100644 board/Marvell/openrd_base/kwbimage.cfg
>>>  create mode 100644 board/Marvell/openrd_base/openrd_base.c
>>>  create mode 100644 board/Marvell/openrd_base/openrd_base.h
>>>  create mode 100644 board/Marvell/rd6281a/kwbimage.cfg
>>>  create mode 100644 include/configs/openrd_base.h
>>>
>>> Regards..
>>> Prafulla . . .
>>> ___
>>> U-Boot mailing list
>>> U-Boot@lists.denx.de
>>> http://lists.denx.de/mailman/listinfo/u-boot

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


Re: [U-Boot] how to apply at91 patch for the current u-boot-2009-06?

2009-09-22 Thread Tom
sunr2007 wrote:
> Hi all,
> i want to know how to apply at91 patch for current versions of u-boot like
> 2009-06? i saw in linux4sam.org website that patched are available only for
> u-boot-1.3.4 ? but after that no patches for the current versions?can anyone
> help me plz how to update u-boot-2009-06 with the latest at91 patch. it will
> be of great help to me:confused:
> warm regards,
> Ravi Kulkarni.

What you are looking for may already be in the current u-boot.
The at91 repository is git.denx.de/u-boot-at91.git.
I believe most (all?) the boards listed in linux4sam are supported.

If you wish to submit a change, please read.
http://www.denx.de/wiki/U-Boot/Patches

Tom


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


Re: [U-Boot] MPC83xx and uec

2009-09-22 Thread Anton Vorontsov
On Tue, Sep 22, 2009 at 01:02:27PM +0200, Joakim Tjernlund wrote:
> >
> >
> > I can't find a way to get at uec_info_t/STD_UEC_INFO from my 
> > board_eth_init()
> > in current u-boot. Am I missing something?
> > Also
> >  drivers/qe/uec.h:int uec_initialize(bd_t *bis, uec_info_t *uec_info);
> >  include/netdev.h:int uec_initialize(int index);
> > different prototypes for the same function.
> 
> BTW, I am looking for a way to swap the order of ethernet interfaces:
> static uec_info_t uec_info[] = {
> #ifdef CONFIG_UEC_ETH1
>   STD_UEC_INFO(1),/* UEC1 */
> #endif
> #ifdef CONFIG_UEC_ETH2
>   STD_UEC_INFO(2),/* UEC2 */
> #endif
> #ifdef CONFIG_UEC_ETH3
>   STD_UEC_INFO(3),/* UEC3 */
> #endif
> };

Works for me:

http://lists.denx.de/pipermail/u-boot/2009-September/060821.html

You'll also need this patch:

http://lists.denx.de/pipermail/u-boot/2009-September/060819.html

-- 
Anton Vorontsov
email: cbouatmai...@gmail.com
irc://irc.freenode.net/bd2
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] MPC83xx and uec

2009-09-22 Thread Joakim Tjernlund


Anton Vorontsov  wrote on 22/09/2009 15:51:17:

> From:
>
> Anton Vorontsov 
>
> To:
>
> Joakim Tjernlund 
>
> Cc:
>
> u-boot@lists.denx.de, kim.phill...@freescale.com
>
> Date:
>
> 22/09/2009 15:51
>
> Subject:
>
> Re: [U-Boot] MPC83xx and uec
>
> On Tue, Sep 22, 2009 at 01:02:27PM +0200, Joakim Tjernlund wrote:
> > >
> > >
> > > I can't find a way to get at uec_info_t/STD_UEC_INFO from my 
> > > board_eth_init()
> > > in current u-boot. Am I missing something?
> > > Also
> > >  drivers/qe/uec.h:int uec_initialize(bd_t *bis, uec_info_t *uec_info);
> > >  include/netdev.h:int uec_initialize(int index);
> > > different prototypes for the same function.
> >
> > BTW, I am looking for a way to swap the order of ethernet interfaces:
> > static uec_info_t uec_info[] = {
> > #ifdef CONFIG_UEC_ETH1
> >STD_UEC_INFO(1),   /* UEC1 */
> > #endif
> > #ifdef CONFIG_UEC_ETH2
> >STD_UEC_INFO(2),   /* UEC2 */
> > #endif
> > #ifdef CONFIG_UEC_ETH3
> >STD_UEC_INFO(3),   /* UEC3 */
> > #endif
> > };
>
> Works for me:
>
> http://lists.denx.de/pipermail/u-boot/2009-September/060821.html

Right, but I don't consider a include as this:
  +#include "../../../drivers/qe/uec.h"
as the correct way of getting of required data types and macros.
Consider that uec_initialize() is exported by netdev.h (although with the
wrong prototype ATM). As far as I can tell, I should only have to include
netdev.h to get the required types and macros.

  Jocke

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


Re: [U-Boot] [PATCH 3/4 v3] s5pc1xx: support serial driver

2009-09-22 Thread Tom
Minkyu Kang wrote:
> This patch includes the serial driver for s5pc1xx
> 
> Signed-off-by: Minkyu Kang 

Nak.

This looks like the zoom2 serial driver.
In the case of zoom2, special handling is needed because the
serial is supplied by a detachable debug board and a
runtime check was needed.

You are not doing a runtime check so why can you not just use
one of the generic interfaces ?

Tom

> ---
> Changes since v1:
> - use serial multi API
> - use writel/readl function
> - remove duplicate code
> 
> Changes since v2:
> - use sizeof() instead of the constant
> 
>  common/serial.c |   18 +++
>  drivers/serial/Makefile |1 +
>  drivers/serial/serial_s5pc1xx.c |  307 
> +++
>  include/serial.h|7 +
>  4 files changed, 333 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/serial/serial_s5pc1xx.c
> 
> diff --git a/common/serial.c b/common/serial.c
> index 41a24c2..e5ce9fd 100644
> --- a/common/serial.c
> +++ b/common/serial.c
> @@ -69,6 +69,18 @@ struct serial_device *__default_serial_console (void)
>  #else
>  #error "CONFIG_SERIAL? missing."
>  #endif
> +#elif defined(CONFIG_S5PC1XX)
> +#if defined(CONFIG_SERIAL0)
> + return &s5pc1xx_serial0_device;
> +#elif defined(CONFIG_SERIAL1)
> + return &s5pc1xx_serial1_device;
> +#elif defined(CONFIG_SERIAL2)
> + return &s5pc1xx_serial2_device;
> +#elif defined(CONFIG_SERIAL3)
> + return &s5pc1xx_serial3_device;
> +#else
> +#error "CONFIG_SERIAL? missing."
> +#endif
>  #elif defined(CONFIG_OMAP3_ZOOM2)
>   return ZOOM2_DEFAULT_SERIAL_DEVICE;
>  #else
> @@ -139,6 +151,12 @@ void serial_initialize (void)
>   serial_register(&s3c24xx_serial1_device);
>   serial_register(&s3c24xx_serial2_device);
>  #endif
> +#if defined(CONFIG_S5PC1XX)
> + serial_register(&s5pc1xx_serial0_device);
> + serial_register(&s5pc1xx_serial1_device);
> + serial_register(&s5pc1xx_serial2_device);
> + serial_register(&s5pc1xx_serial3_device);
> +#endif
>   serial_assign (default_serial_console ()->name);
>  }
>  
> diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
> index 64882a2..3c77a7c 100644
> --- a/drivers/serial/Makefile
> +++ b/drivers/serial/Makefile
> @@ -33,6 +33,7 @@ COBJS-$(CONFIG_NS9750_UART) += ns9750_serial.o
>  COBJS-$(CONFIG_SYS_NS16550) += ns16550.o
>  COBJS-$(CONFIG_DRIVER_S3C4510_UART) += s3c4510b_uart.o
>  COBJS-$(CONFIG_S3C64XX) += s3c64xx.o
> +COBJS-$(CONFIG_S5PC1XX) += serial_s5pc1xx.o
>  COBJS-$(CONFIG_SYS_NS16550_SERIAL) += serial.o
>  COBJS-$(CONFIG_CLPS7111_SERIAL) += serial_clps7111.o
>  COBJS-$(CONFIG_IMX_SERIAL) += serial_imx.o
> diff --git a/drivers/serial/serial_s5pc1xx.c b/drivers/serial/serial_s5pc1xx.c
> new file mode 100644
> index 000..48feb4e
> --- /dev/null
> +++ b/drivers/serial/serial_s5pc1xx.c
> @@ -0,0 +1,307 @@
> +/*
> + * (C) Copyright 2009 SAMSUNG Electronics
> + * Minkyu Kang 
> + * Heungjun Kim 
> + *
> + * based on drivers/serial/s3c64xx.c
> + *
> + * 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 
> +#include 
> +#include 
> +#include 
> +
> +#if defined(CONFIG_SERIAL_MULTI)
> +#include 
> +
> +/* Multi serial device functions */
> +#define DECLARE_S5P_SERIAL_FUNCTIONS(port) \
> +int  s5p_serial##port##_init(void) { \
> + return serial_init_dev(port); } \
> +void s5p_serial##port##_setbrg(void) { \
> + serial_setbrg_dev(port); } \
> +int  s5p_serial##port##_getc(void) { \
> + return serial_getc_dev(port); } \
> +int  s5p_serial##port##_tstc(void) { \
> + return serial_tstc_dev(port); } \
> +void s5p_serial##port##_putc(const char c) { \
> + serial_putc_dev(port, c); } \
> +void s5p_serial##port##_puts(const char *s) { \
> + serial_puts_dev(port, s); }
> +
> +#define INIT_S5P_SERIAL_STRUCTURE(port, name, bus) { \
> + name, \
> + bus, \
> + s5p_serial##port##_init, \
> + s5p_serial##port##_setbrg, \
> + s5p_serial##port##_getc, \
> + s5p_serial##port##_tstc, \
> + s5p_serial##port##_putc, \
> + s5p_serial##port##_puts, }
> +#else
> +
> +#ifdef CONFIG_SERIAL0
> +#define UART_NR  S5PC1XX_UART0
> +#elif defined(CONFIG_SERIAL1)
> +#define UART_NR  S5PC1XX_UART1
> +#elif defined(CONFIG_SERIAL2)

Re: [U-Boot] MPC83xx and uec

2009-09-22 Thread Anton Vorontsov
On Tue, Sep 22, 2009 at 04:03:16PM +0200, Joakim Tjernlund wrote:
[...]
> > > > Also
> > > >  drivers/qe/uec.h:int uec_initialize(bd_t *bis, uec_info_t *uec_info);
> > > >  include/netdev.h:int uec_initialize(int index);
> > > > different prototypes for the same function.
> > >
> > > BTW, I am looking for a way to swap the order of ethernet interfaces:
> > > static uec_info_t uec_info[] = {
> > > #ifdef CONFIG_UEC_ETH1
> > >STD_UEC_INFO(1),   /* UEC1 */
> > > #endif
> > > #ifdef CONFIG_UEC_ETH2
> > >STD_UEC_INFO(2),   /* UEC2 */
> > > #endif
> > > #ifdef CONFIG_UEC_ETH3
> > >STD_UEC_INFO(3),   /* UEC3 */
> > > #endif
> > > };
> >
> > Works for me:
> >
> > http://lists.denx.de/pipermail/u-boot/2009-September/060821.html
> 
> Right, but I don't consider a include as this:
>   +#include "../../../drivers/qe/uec.h"
> as the correct way of getting of required data types and macros.
> Consider that uec_initialize() is exported by netdev.h (although with the
> wrong prototype ATM). As far as I can tell, I should only have to include
> netdev.h to get the required types and macros.

Not sure if having all-in-one netdev header is a good idea.
It might be a good idea to move uec.h to "include/" though.

-- 
Anton Vorontsov
email: cbouatmai...@gmail.com
irc://irc.freenode.net/bd2
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 00/13] ppc: Fix relocation

2009-09-22 Thread Peter Tyser
Hi Detlev,

> >> This series attempts to fix relocation to RAM for ppc boards.
> >>
> >> I split the patches up pretty liberally, let me know if you'd like
> >> them organized differently.
> >>
> >> I tried to be thorough during the changes (especially #1), let me
> >> know if I missed anything, there's lots of linker scripts for ppc
> >> boards:)
> >>
> >> Peter Tyser (13):
> >>   ppc: Enable full relocation to RAM
> >>   ppc: Check for compilers that don't support relocation
> >>   ppc: Remove board.c relocation fixups
> >>   ppc: Remove pci config table pointer relocation fixups
> >>   ppc: Remove extable relocation fixups
> >>   ppc: Remove board-specific command table relocation fixups
> >>   tsec: Remove PHY command relocation fixups
> >>   fpga: Remove relocation fixups
> >>   mpl: Remove memory test relocation fixups
> >>   lwmon, lwmon5: Remove sysmon POST relocation fixups
> >>   p3mx: Remove serial relocation fixups
> >>   Conditionally perform common relocation fixups
> >>   ppc: Remove reloc_off field from global_data structure
> >
> > Wow, this is really good work. Didn't think there would be so much code
> > that could be deleted due to working relocation :)
> > I hope WD will pull this in and potentially broken boards will have to
> > be fixed rather than backing stuff out.
> 
> Seconded.  That's what a merge window is for, isn't it? :)

Thirded:)

> One should do some further simple text searching to find more code that
> can now be potentially be removed.  For example, from what I wrote
> board/inka4x0/inkadiag.c also has such reloacted code inside.

I didn't see any relocation fixups in inkadiag.c that could be removed
at a glance.  Am I missing something?  I attempted to clean up all
relocation fixups that affect ppc (and other arches that support
relocation), so let me know if I missed anything.

Best,
Peter

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


[U-Boot] [PATCH/RFC] arm/microblaze/nios/nios2/sh: Remove relocation fixups

2009-09-22 Thread Peter Tyser
These architectures don't need relocation fixups, so reduce their
codesize a bit by defining CONFIG_RELOC_FIXUP_WORKS.

Also remove the reloc_off field from their global data structures
as it is no longer needed.

Note that the location of the standalone application jump table pointer
in the global data structure is affected by this change, breaking
execution of standalone applications compiled for previous versions of
U-Boot.

Signed-off-by: Peter Tyser 
---
I apparently forgot to send this yesterday with the rest of the
relocation patches.

If the ppc relocation series just sent gets accepted, this change
should cut out some unneeded code from other arches which
don't use relocation fixups.  I haven't compiled any of these arches
though, so take the patch with a grain of salt.

 common/stdio.c   |4 ++--
 include/asm-arm/config.h |3 +++
 include/asm-arm/global_data.h|1 -
 include/asm-microblaze/config.h  |3 +++
 include/asm-microblaze/global_data.h |1 -
 include/asm-nios/config.h|3 +++
 include/asm-nios/global_data.h   |1 -
 include/asm-nios2/config.h   |3 +++
 include/asm-nios2/global_data.h  |1 -
 include/asm-sh/config.h  |3 +++
 include/asm-sh/global_data.h |1 -
 11 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/common/stdio.c b/common/stdio.c
index 5e58dbe..870ddfd 100644
--- a/common/stdio.c
+++ b/common/stdio.c
@@ -201,7 +201,7 @@ int stdio_deregister(char *devname)
 
 int stdio_init (void)
 {
-#if !defined(CONFIG_ARM) && !defined(CONFIG_RELOC_FIXUP_WORKS)
+#if !defined(CONFIG_RELOC_FIXUP_WORKS)
/* already relocated for current ARM implementation */
ulong relocation_offset = gd->reloc_off;
int i;
@@ -211,7 +211,7 @@ int stdio_init (void)
stdio_names[i] = (char *) (((ulong) stdio_names[i]) +
relocation_offset);
}
-#endif /* !ARM && !CONFIG_RELOC_FIXUP_WORKS */
+#endif /* !CONFIG_RELOC_FIXUP_WORKS */
 
/* Initialize the list */
INIT_LIST_HEAD(&(devs.list));
diff --git a/include/asm-arm/config.h b/include/asm-arm/config.h
index 049c44e..b76fd8e 100644
--- a/include/asm-arm/config.h
+++ b/include/asm-arm/config.h
@@ -21,4 +21,7 @@
 #ifndef _ASM_CONFIG_H_
 #define _ASM_CONFIG_H_
 
+/* Relocation to SDRAM works on all ARM boards */
+#define CONFIG_RELOC_FIXUP_WORKS
+
 #endif
diff --git a/include/asm-arm/global_data.h b/include/asm-arm/global_data.h
index 5c56ce3..8115a24 100644
--- a/include/asm-arm/global_data.h
+++ b/include/asm-arm/global_data.h
@@ -38,7 +38,6 @@ typedef   struct  global_data {
unsigned long   flags;
unsigned long   baudrate;
unsigned long   have_console;   /* serial_init() was called */
-   unsigned long   reloc_off;  /* Relocation Offset */
unsigned long   env_addr;   /* Address  of Environment struct */
unsigned long   env_valid;  /* Checksum of Environment valid? */
unsigned long   fb_base;/* base address of frame buffer */
diff --git a/include/asm-microblaze/config.h b/include/asm-microblaze/config.h
index 049c44e..8a9064b 100644
--- a/include/asm-microblaze/config.h
+++ b/include/asm-microblaze/config.h
@@ -21,4 +21,7 @@
 #ifndef _ASM_CONFIG_H_
 #define _ASM_CONFIG_H_
 
+/* Relocation to SDRAM works on all Microblaze boards */
+#define CONFIG_RELOC_FIXUP_WORKS
+
 #endif
diff --git a/include/asm-microblaze/global_data.h 
b/include/asm-microblaze/global_data.h
index 3f49c34..ec7837f 100644
--- a/include/asm-microblaze/global_data.h
+++ b/include/asm-microblaze/global_data.h
@@ -39,7 +39,6 @@ typedef   struct  global_data {
unsigned long   flags;
unsigned long   baudrate;
unsigned long   have_console;   /* serial_init() was called */
-   unsigned long   reloc_off;  /* Relocation Offset */
unsigned long   env_addr;   /* Address  of Environment struct */
unsigned long   env_valid;  /* Checksum of Environment valid? */
unsigned long   fb_base;/* base address of frame buffer */
diff --git a/include/asm-nios/config.h b/include/asm-nios/config.h
index 049c44e..2efe898 100644
--- a/include/asm-nios/config.h
+++ b/include/asm-nios/config.h
@@ -21,4 +21,7 @@
 #ifndef _ASM_CONFIG_H_
 #define _ASM_CONFIG_H_
 
+/* Relocation to SDRAM works on all NIOS boards */
+#define CONFIG_RELOC_FIXUP_WORKS
+
 #endif
diff --git a/include/asm-nios/global_data.h b/include/asm-nios/global_data.h
index 4929a5b..fa54ee4 100644
--- a/include/asm-nios/global_data.h
+++ b/include/asm-nios/global_data.h
@@ -31,7 +31,6 @@ typedef   struct  global_data {
unsigned long   cpu_clk;/* CPU clock in Hz! */
unsigned long   have_console;   /* serial_init() was called */
phys_size_t ram_size;   /* RAM size */
-   unsigned long   reloc_off;  /* Relocation Of

Re: [U-Boot] [PATCH 1/4 v3] s5pc1xx: support Samsung s5pc1xx SoC

2009-09-22 Thread Tom
Minkyu Kang wrote:
> This patch adds support for the Samsung s5pc100 and s5pc110
> SoCs. The s5pc1xx SoC is an ARM Cortex A8 processor.
> 
> Signed-off-by: Minkyu Kang 
> Signed-off-by: HeungJun, Kim 

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


Re: [U-Boot] [PATCH 2/4 v3] s5pc1xx: support onenand driver

2009-09-22 Thread Tom
Minkyu Kang wrote:
> This patch includes the onenand driver for s5pc100
> 
> Signed-off-by: Minkyu Kang 
> Signed-off-by: Kyungmin Park 
> ---
> Changes since v1:
> - move samsung_onenand.h to include/linux/mtd/
> - make C struct instead of base+offset
> - Remove the "1 &&" in while loop
> 
> Changes since v2:
> - drop blank lines
> - adds some comments
> - modify to lower case letter in C struct
> 
>  drivers/mtd/onenand/Makefile|1 +
>  drivers/mtd/onenand/samsung.c   |  622 
> +++
>  include/linux/mtd/onenand.h |1 +
>  include/linux/mtd/onenand_regs.h|4 +
>  include/linux/mtd/samsung_onenand.h |  131 
>  5 files changed, 759 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/mtd/onenand/samsung.c
>  create mode 100644 include/linux/mtd/samsung_onenand.h
> 
> diff --git a/drivers/mtd/onenand/Makefile b/drivers/mtd/onenand/Makefile
> index 1d35a57..2571df0 100644
> --- a/drivers/mtd/onenand/Makefile
> +++ b/drivers/mtd/onenand/Makefile
> @@ -26,6 +26,7 @@ include $(TOPDIR)/config.mk
>  LIB  := $(obj)libonenand.a
>  
>  COBJS-$(CONFIG_CMD_ONENAND)  := onenand_uboot.o onenand_base.o onenand_bbt.o
> +COBJS-$(CONFIG_SAMSUNG_ONENAND)  += samsung.o
>  
>  COBJS:= $(COBJS-y)
>  SRCS := $(COBJS:.o=.c)
> diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c
> new file mode 100644
> index 000..5433f19
> --- /dev/null
> +++ b/drivers/mtd/onenand/samsung.c
> @@ -0,0 +1,622 @@
> +/*
> + * S3C64XX/S5PC100 OneNAND driver at U-Boot
> + *
> + *  Copyright (C) 2008-2009 Samsung Electronics
> + *  Kyungmin Park 
> + *
> + * 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.

Add full GPL 2 copyright.

> + *
> + * Implementation:
> + *   Emulate the pseudo BufferRAM
> + */
> +


> +
> +#if defined(CONFIG_S3C64XX)
> +#define MAP_00   (0x0 << 24)
> +#define MAP_01   (0x1 << 24)
> +#define MAP_10   (0x2 << 24)
> +#define MAP_11   (0x3 << 24)
> +#elif defined(CONFIG_S5PC1XX)
> +#define MAP_00   (0x0 << 26)
> +#define MAP_01   (0x1 << 26)
> +#define MAP_10   (0x2 << 26)
> +#define MAP_11   (0x3 << 26)
> +#endif

This and other struct, #defines may be better handled in a H file.
Why did you include them all here?

Otherwise fine.
Just fix the copyright.

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


Re: [U-Boot] [PATCH 4/4 v3] s5pc1xx: add support SMDKC100 board

2009-09-22 Thread Tom
Minkyu Kang wrote:
> Adds new board SMDKC100 that uses s5pc100 SoC
> 
> Signed-off-by: Minkyu Kang 
> Signed-off-by: HeungJun, Kim 
> ---
> Changes since v1:
> - arrange env values for more readable
> - make C struct instead of base+offset
> - use MACH_TYPE_SMDKC100 directly
> - fix the CONFIG_SYS_HZ to 1000
> - enable LOADB, LOADS, BOOTD, XIMG, FPGA
> 
> Changes since v2:
> - remove  and SZ_XX defines
> - remove the define of machine type
> - remove the unnecessary comment
> 
>  MAINTAINERS|4 +
>  MAKEALL|1 +
>  Makefile   |3 +
>  board/samsung/smdkc100/Makefile|   55 +++
>  board/samsung/smdkc100/config.mk   |   16 ++
>  board/samsung/smdkc100/lowlevel_init.S |  215 
>  board/samsung/smdkc100/mem_setup.S |  197 ++
>  board/samsung/smdkc100/onenand.c   |   83 +++
>  board/samsung/smdkc100/smdkc100.c  |   51 +++
>  include/configs/smdkc100.h |  242 
> 
>  10 files changed, 867 insertions(+), 0 deletions(-)
>  create mode 100644 board/samsung/smdkc100/Makefile
>  create mode 100644 board/samsung/smdkc100/config.mk
>  create mode 100644 board/samsung/smdkc100/lowlevel_init.S
>  create mode 100644 board/samsung/smdkc100/mem_setup.S
>  create mode 100644 board/samsung/smdkc100/onenand.c
>  create mode 100644 board/samsung/smdkc100/smdkc100.c
>  create mode 100644 include/configs/smdkc100.h
> 

Please include a brief readme doc/README.s5pc1xx similar to README.omap



> +
> +#ifndef CONFIG_ONENAND_IPL
> + /* setting SRAM */
> + ldr r0, =S5PC100_SROMC_BASE
> + ldr r1, =0x9
> + str r1, [r0]
> +#endif

Where is CONFIG_ONENAND_IPL defined ?
If it is not being used, the #ifndef logic should be reduced.

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


[U-Boot] [PATCH 0/3 v2] New MIIPHYBB implementation with multi-bus support

2009-09-22 Thread Luigi 'Comio' Mantellini
From: Luigi 'Comio' Mantellini 

This patch rewrites the miiphybb ( Bit-banged MII bus driver ) in order to
support an arbitrary number of buses. This feature is useful when your board
uses different mii buses for different phys and all (or a part) of these buses
are implemented via bit-banging mode.

The driver requires that the following macros should be defined into the board
configuration file:

CONFIG_BITBANGMII   - Enable the miiphybb driver
CONFIG_BITBANGMII_MULTI - Enable the multi bus support

If the CONFIG_BITBANGMII_MULTI is not defined, the board's config file needs to 
define
the following macros:

MII_INIT  - Generic cod to enable the MII bus (like gpios setup)
MDIO_DECLARE  - Declaration needed to access to the MDIO pin
MDIO_ACTIVE   - Activate the MDIO pin as out pin
MDIO_TRISTATE - Activate the MDIO pin as input/tristate pin
MDIO_READ - Read the MDIO pin
MDIO(v)   - Write v on the MDIO pin
MDC_DECLARE   - Declaration needed to access to the MDC pin
MDC(v)- Write v on the MDC pin

The previous macros make the driver compatible with the previous version
(that didn't support the multi-bus).

When the CONFIG_BITBANGMII_MULTI is defined, the board code needs to fill the
bbmiibusses[] array with a record for each required bus.
The record (struct bbmiibus) has the following fields/callbacks (see miiphy.h 
for
details):

char name[]- The symbolic name that must be equal to the MII bus 
registered
 name
int (*init)()  - Initialization function called at startup time (just 
before the
 Ethernet initialization)
int (*mdio_active)()   - Activate the MDIO pin as output
int (*mdio_tristate)() - Activate the MDIO pin as input/tristate pin
int (*set_mdio)()  - Write the MDIO pin
int (*get_mdio)()  - Read the MDIO pin
int (*set_mdc)()   - Write the MDC pin
int (*delay)() - Delay function
void *priv - Private data used by board specific code

The board code will look like:

struct bbmiibus bbmiibusses[] = {
 { .name = "miibus#1", .init = b1_init, .mdio_active = b1_mdio_active, ... },
 { .name = "miibus#2", .init = b2_init, .mdio_active = b2_mdio_active, ... },
 ...
};

Patch Changelog:

v1 -- First (broken) release
v2 -- Fix some typos and disable callbacks pointers relacation (if
  CONFIG_RELOC_FIXUP_WORKS is not defined)

Luigi 'Comio' Mantellini (3):
  Bit-banged MII driver with multi-bus support.
  Add bb_miiphy_init call before any ethernet bring-up code.
  Update all board to support new bbmiiphy driver (with multibus
support)

 drivers/net/phy/miiphybb.c   |  322 +-
 include/configs/ISPAN.h  |3 +
 include/configs/MPC8260ADS.h |2 +
 include/configs/MPC8266ADS.h |3 +
 include/configs/MPC8560ADS.h |3 +
 include/configs/Rattler.h|3 +
 include/configs/SBC8540.h|3 +
 include/configs/TQM8272.h|2 +
 include/configs/VoVPN-GW.h   |3 +
 include/configs/ZPC1900.h|3 +
 include/configs/ep8248.h |3 +
 include/configs/ep82xxm.h|3 +
 include/configs/gw8260.h |3 +
 include/configs/hymod.h  |9 ++
 include/configs/muas3001.h   |3 +
 include/configs/ppmc8260.h   |3 +
 include/configs/sacsng.h |3 +
 include/configs/sbc8260.h|3 +
 include/configs/sbc8560.h|3 +
 include/miiphy.h |   22 +++
 lib_arm/board.c  |3 +
 lib_avr32/board.c|3 +
 lib_blackfin/board.c |3 +
 lib_i386/board.c |3 +
 lib_m68k/board.c |3 +
 lib_mips/board.c |3 +
 lib_ppc/board.c  |4 +-
 lib_sh/board.c   |3 +
 lib_sparc/board.c|3 +
 29 files changed, 333 insertions(+), 97 deletions(-)

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


[U-Boot] [PATCH 1/3 v2] Bit-banged MII driver with multi-bus support.

2009-09-22 Thread Luigi 'Comio' Mantellini
From: Luigi 'Comio' Mantellini 

Signed-off-by: Luigi 'Comio' Mantellini 
---
 drivers/net/phy/miiphybb.c |  322 +++-
 include/miiphy.h   |   22 +++
 2 files changed, 248 insertions(+), 96 deletions(-)

diff --git a/drivers/net/phy/miiphybb.c b/drivers/net/phy/miiphybb.c
index b77c917..ccc7a81 100644
--- a/drivers/net/phy/miiphybb.c
+++ b/drivers/net/phy/miiphybb.c
@@ -1,4 +1,7 @@
 /*
+ * (C) Copyright 2009 Industrie Dial Face S.p.A.
+ * Luigi 'Comio' Mantellini 
+ *
  * (C) Copyright 2001
  * Gerald Van Baren, Custom IDEAS, vanba...@cideas.com.
  *
@@ -29,18 +32,135 @@
 #include 
 #include 
 #include 
+#include 
+
+DECLARE_GLOBAL_DATA_PTR;
+
+#ifndef CONFIG_BITBANGMII_MULTI
+/*
+ * If CONFIG_BITBANGMII_MULTI is not defined we use a
+ * compatibility layer with the previous miiphybb implementation
+ * based on macros usage.
+ *
+ */
+static int bb_mii_init_wrap(struct bbmiibus *bus)
+{
+#ifdef MII_INIT
+   MII_INIT;
+#endif
+   return 0;
+}
+
+static int bb_mdio_active_wrap(struct bbmiibus *bus)
+{
+#ifdef MDIO_DECLARE
+   MDIO_DECLARE;
+#endif
+   MDIO_ACTIVE;
+   return 0;
+}
+
+static int bb_mdio_tristate_wrap(struct bbmiibus *bus)
+{
+#ifdef MDIO_DECLARE
+   MDIO_DECLARE;
+#endif
+   MDIO_TRISTATE;
+   return 0;
+}
+
+static int bb_set_mdio_wrap(struct bbmiibus *bus, int v)
+{
+#ifdef MDIO_DECLARE
+   MDIO_DECLARE;
+#endif
+   MDIO (v);
+   return 0;
+}
+
+static int bb_get_mdio_wrap(struct bbmiibus *bus, int *v)
+{
+#ifdef MDIO_DECLARE
+   MDIO_DECLARE;
+#endif
+   *v = MDIO_READ;
+   return 0;
+}
+
+static int bb_set_mdc_wrap(struct bbmiibus *bus, int v)
+{
+#ifdef MDC_DECLARE
+   MDC_DECLARE;
+#endif
+   MDC (v);
+   return 0;
+}
+
+static int bb_delay_wrap(struct bbmiibus *bus)
+{
+   MIIDELAY;
+   return 0;
+}
+
+struct bbmiibus bbmiibusses[] = {
+   {
+   .name = BB_MII_DEVNAME,
+   .init = bb_mii_init_wrap,
+   .mdio_active = bb_mdio_active_wrap,
+   .mdio_tristate = bb_mdio_tristate_wrap,
+   .set_mdio = bb_set_mdio_wrap,
+   .get_mdio = bb_get_mdio_wrap,
+   .set_mdc = bb_set_mdc_wrap,
+   .delay = bb_delay_wrap,
+   }
+};
+#endif
+
+void bb_miiphy_init(void)
+{
+   int i;
+   for (i = 0; i < sizeof(bbmiibusses)/sizeof(bbmiibusses[0]); i++) {
+#if !defined(CONFIG_RELOC_FIXUP_WORKS)
+   /* Reloate the hooks pointers*/
+   bbmiibusses[i].init += gd->reloc_off;
+   bbmiibusses[i].mdio_active += gd->reloc_off;
+   bbmiibusses[i].mdio_tristate += gd->reloc_off;
+   bbmiibusses[i].set_mdio += gd->reloc_off;
+   bbmiibusses[i].get_mdio += gd->reloc_off;
+   bbmiibusses[i].set_mdc += gd->reloc_off;
+   bbmiibusses[i].delay += gd->reloc_off;
+#endif
+
+   if (bbmiibusses[i].init != NULL) {
+   bbmiibusses[i].init(&bbmiibusses[i]);
+   }
+   }
+}
+
+static inline struct bbmiibus *bb_miiphy_getbus(char *devname)
+{
+#ifdef CONFIG_BITBANGMII_MULTI
+   /* Search the correct bus */
+   for (j = 0; j < sizeof(bbmiibusses)/sizeof(bbmmis[0]); j++) {
+   if (!strcmp(bbmiibusses[i].name, devname)) {
+   return &bbmiibusses[i];
+   }
+   }
+   return NULL;
+#else
+   /* We have just one bitbanging bus */
+   return &bbmiibusses[0];
+#endif
+}
 
 /*
  *
  * Utility to send the preamble, address, and register (common to read
  * and write).
  */
-static void miiphy_pre (char read, unsigned char addr, unsigned char reg)
+static void miiphy_pre (struct bbmiibus *bus, char read, unsigned char addr, 
unsigned char reg)
 {
int j;  /* counter */
-#if !(defined(CONFIG_EP8248) || defined(CONFIG_EP82XXM))
-   volatile ioport_t *iop = ioport_addr ((immap_t *) CONFIG_SYS_IMMR, 
MDIO_PORT);
-#endif
 
/*
 * Send a 32 bit preamble ('1's) with an extra '1' bit for good measure.
@@ -50,67 +170,66 @@ static void miiphy_pre (char read, unsigned char addr, 
unsigned char reg)
 * but it is safer and will be much more robust.
 */
 
-   MDIO_ACTIVE;
-   MDIO (1);
+   bus->mdio_active(bus);
+   bus->set_mdio (bus, 1);
for (j = 0; j < 32; j++) {
-   MDC (0);
-   MIIDELAY;
-   MDC (1);
-   MIIDELAY;
+   bus->set_mdc (bus, 0);
+   bus->delay(bus);
+   bus->set_mdc (bus, 1);
+   bus->delay(bus);
}
 
/* send the start bit (01) and the read opcode (10) or write (10) */
-   MDC (0);
-   MDIO (0);
-   MIIDELAY;
-   MDC (1);
-   MIIDELAY;
-   MDC (0);
-   MDIO (1);
-   MIIDELAY;
-   MDC (1);
-   MIIDE

[U-Boot] [PATCH 3/3 v2] Update all board to support new bbmiiphy driver (with multibus support)

2009-09-22 Thread Luigi 'Comio' Mantellini
From: Luigi 'Comio' Mantellini 

Signed-off-by: Luigi 'Comio' Mantellini 
---
 include/configs/ISPAN.h  |3 +++
 include/configs/MPC8260ADS.h |2 ++
 include/configs/MPC8266ADS.h |3 +++
 include/configs/MPC8560ADS.h |3 +++
 include/configs/Rattler.h|3 +++
 include/configs/SBC8540.h|3 +++
 include/configs/TQM8272.h|2 ++
 include/configs/VoVPN-GW.h   |3 +++
 include/configs/ZPC1900.h|3 +++
 include/configs/ep8248.h |3 +++
 include/configs/ep82xxm.h|3 +++
 include/configs/gw8260.h |3 +++
 include/configs/hymod.h  |9 +
 include/configs/muas3001.h   |3 +++
 include/configs/ppmc8260.h   |3 +++
 include/configs/sacsng.h |3 +++
 include/configs/sbc8260.h|3 +++
 include/configs/sbc8560.h|3 +++
 18 files changed, 58 insertions(+), 0 deletions(-)

diff --git a/include/configs/ISPAN.h b/include/configs/ISPAN.h
index 6eb466a..be41f37 100644
--- a/include/configs/ISPAN.h
+++ b/include/configs/ISPAN.h
@@ -84,6 +84,9 @@
  * GPIO pins used for bit-banged MII communications
  */
 #define MDIO_PORT  3   /* Port D */
+#define MDIO_DECLARE   volatile ioport_t *iop = ioport_addr ((immap_t *) 
CONFIG_SYS_IMMR, MDIO_PORT)
+#define MDC_DECLAREMDIO_DECLARE
+
 
 #define CONFIG_SYS_MDIO_PIN0x0004  /* PD13 */
 #define CONFIG_SYS_MDC_PIN 0x0008  /* PD12 */
diff --git a/include/configs/MPC8260ADS.h b/include/configs/MPC8260ADS.h
index 942a4cc..255b4aa 100644
--- a/include/configs/MPC8260ADS.h
+++ b/include/configs/MPC8260ADS.h
@@ -149,6 +149,8 @@
  * GPIO pins used for bit-banged MII communications
  */
 #define MDIO_PORT  2   /* Port C */
+#define MDIO_DECLARE   volatile ioport_t *iop = ioport_addr ((immap_t *) 
CONFIG_SYS_IMMR, MDIO_PORT)
+#define MDC_DECLAREMDIO_DECLARE
 
 #if CONFIG_ADSTYPE == CONFIG_SYS_8272ADS
 #define CONFIG_SYS_MDIO_PIN0x2000  /* PC18 */
diff --git a/include/configs/MPC8266ADS.h b/include/configs/MPC8266ADS.h
index 4fd86d3..eb35fc4 100644
--- a/include/configs/MPC8266ADS.h
+++ b/include/configs/MPC8266ADS.h
@@ -95,6 +95,9 @@
  * Port pins used for bit-banged MII communictions (if applicable).
  */
 #define MDIO_PORT  2   /* Port C */
+#define MDIO_DECLARE   volatile ioport_t *iop = ioport_addr ((immap_t *) 
CONFIG_SYS_IMMR, MDIO_PORT)
+#define MDC_DECLAREMDIO_DECLARE
+
 #define MDIO_ACTIVE(iop->pdir |=  0x0040)
 #define MDIO_TRISTATE  (iop->pdir &= ~0x0040)
 #define MDIO_READ  ((iop->pdat &  0x0040) != 0)
diff --git a/include/configs/MPC8560ADS.h b/include/configs/MPC8560ADS.h
index c1a1a6d..1b9f624 100644
--- a/include/configs/MPC8560ADS.h
+++ b/include/configs/MPC8560ADS.h
@@ -362,6 +362,9 @@
  * GPIO pins used for bit-banged MII communications
  */
 #define MDIO_PORT  2   /* Port C */
+#define MDIO_DECLARE   volatile ioport_t *iop = ioport_addr ((immap_t *) 
CONFIG_SYS_IMMR, MDIO_PORT)
+#define MDC_DECLAREMDIO_DECLARE
+
 #define MDIO_ACTIVE(iop->pdir |=  0x0040)
 #define MDIO_TRISTATE  (iop->pdir &= ~0x0040)
 #define MDIO_READ  ((iop->pdat &  0x0040) != 0)
diff --git a/include/configs/Rattler.h b/include/configs/Rattler.h
index 5b6f271..249667c 100644
--- a/include/configs/Rattler.h
+++ b/include/configs/Rattler.h
@@ -103,6 +103,9 @@
  * GPIO pins used for bit-banged MII communications
  */
 #define MDIO_PORT  2   /* Port C */
+#define MDIO_DECLARE   volatile ioport_t *iop = ioport_addr ((immap_t *) 
CONFIG_SYS_IMMR, MDIO_PORT)
+#define MDC_DECLAREMDIO_DECLARE
+
 #define MDIO_ACTIVE(iop->pdir |=  0x0040)
 #define MDIO_TRISTATE  (iop->pdir &= ~0x0040)
 #define MDIO_READ  ((iop->pdat &  0x0040) != 0)
diff --git a/include/configs/SBC8540.h b/include/configs/SBC8540.h
index 7239f84..ede7c10 100644
--- a/include/configs/SBC8540.h
+++ b/include/configs/SBC8540.h
@@ -286,6 +286,9 @@
* GPIO pins used for bit-banged MII communications
*/
   #define MDIO_PORT2   /* Port C */
+  #define MDIO_DECLARE volatile ioport_t *iop = ioport_addr ((immap_t *) 
CONFIG_SYS_IMMR, MDIO_PORT)
+  #define MDC_DECLARE  MDIO_DECLARE
+
   #define MDIO_ACTIVE  (iop->pdir |=  0x0040)
   #define MDIO_TRISTATE(iop->pdir &= ~0x0040)
   #define MDIO_READ((iop->pdat &  0x0040) != 0)
diff --git a/include/configs/TQM8272.h b/include/configs/TQM8272.h
index 6c462af..522e29e 100644
--- a/include/configs/TQM8272.h
+++ b/include/configs/TQM8272.h
@@ -219,6 +219,8 @@
  * GPIO pins used for bit-banged MII communications
  */
 #define MDIO_PORT  2   /* Port C */
+#define MDIO_DECLARE   volatile ioport_t *iop = ioport_addr ((immap_t *) 
CONFIG_SYS_IMMR, MDIO_PORT)
+#define MDC_DECLAREMDIO_DECLARE
 
 #if STK82xx_150
 #define CONFIG_SYS_MDIO_PIN0x8000  /* PC16 */
diff --git a/in

[U-Boot] [PATCH 2/3 v2] Add bb_miiphy_init call before any ethernet bring-up code.

2009-09-22 Thread Luigi 'Comio' Mantellini
From: Luigi 'Comio' Mantellini 

Signed-off-by: Luigi 'Comio' Mantellini 
---
 lib_arm/board.c  |3 +++
 lib_avr32/board.c|3 +++
 lib_blackfin/board.c |3 +++
 lib_i386/board.c |3 +++
 lib_m68k/board.c |3 +++
 lib_mips/board.c |3 +++
 lib_ppc/board.c  |4 +++-
 lib_sh/board.c   |3 +++
 lib_sparc/board.c|3 +++
 9 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/lib_arm/board.c b/lib_arm/board.c
index a0e56d5..6e77468 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -417,6 +417,9 @@ extern void davinci_eth_set_mac_addr (const u_int8_t *addr);
mmc_initialize (gd->bd);
 #endif
 
+#ifdef CONFIG_BITBANGMII
+   bb_miiphy_init();
+#endif
 #if defined(CONFIG_CMD_NET)
 #if defined(CONFIG_NET_MULTI)
puts ("Net:   ");
diff --git a/lib_avr32/board.c b/lib_avr32/board.c
index 2d8..e715872 100644
--- a/lib_avr32/board.c
+++ b/lib_avr32/board.c
@@ -337,6 +337,9 @@ void board_init_r(gd_t *new_gd, ulong dest_addr)
if (s)
load_addr = simple_strtoul(s, NULL, 16);
 
+#ifdef CONFIG_BITBANGMII
+   bb_miiphy_init();
+#endif
 #if defined(CONFIG_CMD_NET)
s = getenv("bootfile");
if (s)
diff --git a/lib_blackfin/board.c b/lib_blackfin/board.c
index 1053f69..f1a7479 100644
--- a/lib_blackfin/board.c
+++ b/lib_blackfin/board.c
@@ -270,6 +270,9 @@ void board_init_f(ulong bootflag)
 
 static void board_net_init_r(bd_t *bd)
 {
+#ifdef CONFIG_BITBANGMII
+   bb_miiphy_init();
+#endif
 #ifdef CONFIG_CMD_NET
uchar enetaddr[6];
char *s;
diff --git a/lib_i386/board.c b/lib_i386/board.c
index 0262b5e..821713a 100644
--- a/lib_i386/board.c
+++ b/lib_i386/board.c
@@ -351,6 +351,9 @@ void start_i386boot (void)
doc_init();
 #endif
 
+#ifdef CONFIG_BITBANGMII
+   bb_miiphy_init();
+#endif
 #if defined(CONFIG_CMD_NET)
 #if defined(CONFIG_NET_MULTI)
WATCHDOG_RESET();
diff --git a/lib_m68k/board.c b/lib_m68k/board.c
index 3d88530..32ae592 100644
--- a/lib_m68k/board.c
+++ b/lib_m68k/board.c
@@ -630,6 +630,9 @@ void board_init_r (gd_t *id, ulong dest_addr)
nand_init();/* go init the NAND */
 #endif
 
+#ifdef CONFIG_BITBANGMII
+   bb_miiphy_init();
+#endif
 #if defined(CONFIG_CMD_NET)
WATCHDOG_RESET();
 #if defined(FEC_ENET)
diff --git a/lib_mips/board.c b/lib_mips/board.c
index f62a46a..fd12e68 100644
--- a/lib_mips/board.c
+++ b/lib_mips/board.c
@@ -407,6 +407,9 @@ void board_init_r (gd_t *id, ulong dest_addr)
misc_init_r ();
 #endif
 
+#ifdef CONFIG_BITBANGMII
+   bb_miiphy_init();
+#endif
 #if defined(CONFIG_CMD_NET)
 #if defined(CONFIG_NET_MULTI)
puts ("Net:   ");
diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index e8509ee..0bb159e 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -1002,6 +1002,9 @@ void board_init_r (gd_t *id, ulong dest_addr)
doc_init ();
 #endif
 
+#ifdef CONFIG_BITBANGMII
+   bb_miiphy_init();
+#endif
 #if defined(CONFIG_CMD_NET)
 #if defined(CONFIG_NET_MULTI)
WATCHDOG_RESET ();
@@ -1009,7 +1012,6 @@ void board_init_r (gd_t *id, ulong dest_addr)
 #endif
eth_initialize (bd);
 #endif
-
 #if defined(CONFIG_CMD_NET) && ( \
 defined(CONFIG_CCM)|| \
 defined(CONFIG_ELPT860)|| \
diff --git a/lib_sh/board.c b/lib_sh/board.c
index 5d61f0d..52bbc6d 100644
--- a/lib_sh/board.c
+++ b/lib_sh/board.c
@@ -178,6 +178,9 @@ void sh_generic_init(void)
 #endif /* CONFIG_WATCHDOG*/
 
 
+#ifdef CONFIG_BITBANGMII
+   bb_miiphy_init();
+#endif
 #if defined(CONFIG_CMD_NET)
{
char *s;
diff --git a/lib_sparc/board.c b/lib_sparc/board.c
index 6aadb56..56192a7 100644
--- a/lib_sparc/board.c
+++ b/lib_sparc/board.c
@@ -405,6 +405,9 @@ void board_init_f(ulong bootflag)
doc_init();
 #endif
 
+#ifdef CONFIG_BITBANGMII
+   bb_miiphy_init();
+#endif
 #if defined(CONFIG_CMD_NET)
 #if defined(CONFIG_NET_MULTI)
WATCHDOG_RESET();
-- 
1.6.3.3

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


Re: [U-Boot] [PATCH 4/4 v3] s5pc1xx: add support SMDKC100 board

2009-09-22 Thread Peter Tyser
On Tue, 2009-09-22 at 10:03 -0500, Tom wrote:
> Minkyu Kang wrote:
> > Adds new board SMDKC100 that uses s5pc100 SoC
> > 
> > Signed-off-by: Minkyu Kang 
> > Signed-off-by: HeungJun, Kim 
> > ---
> > Changes since v1:
> > - arrange env values for more readable
> > - make C struct instead of base+offset
> > - use MACH_TYPE_SMDKC100 directly
> > - fix the CONFIG_SYS_HZ to 1000
> > - enable LOADB, LOADS, BOOTD, XIMG, FPGA
> > 
> > Changes since v2:
> > - remove  and SZ_XX defines
> > - remove the define of machine type
> > - remove the unnecessary comment
> > 
> >  MAINTAINERS|4 +
> >  MAKEALL|1 +
> >  Makefile   |3 +
> >  board/samsung/smdkc100/Makefile|   55 +++
> >  board/samsung/smdkc100/config.mk   |   16 ++
> >  board/samsung/smdkc100/lowlevel_init.S |  215 
> >  board/samsung/smdkc100/mem_setup.S |  197 ++
> >  board/samsung/smdkc100/onenand.c   |   83 +++
> >  board/samsung/smdkc100/smdkc100.c  |   51 +++
> >  include/configs/smdkc100.h |  242 
> > 
> >  10 files changed, 867 insertions(+), 0 deletions(-)
> >  create mode 100644 board/samsung/smdkc100/Makefile
> >  create mode 100644 board/samsung/smdkc100/config.mk
> >  create mode 100644 board/samsung/smdkc100/lowlevel_init.S
> >  create mode 100644 board/samsung/smdkc100/mem_setup.S
> >  create mode 100644 board/samsung/smdkc100/onenand.c
> >  create mode 100644 board/samsung/smdkc100/smdkc100.c
> >  create mode 100644 include/configs/smdkc100.h
> > 
> 
> Please include a brief readme doc/README.s5pc1xx similar to README.omap

Hi Tom,
Others may disagree, but I'm personally opposed to creating
board/vendor-specific doc/README. files in most cases.  My logic
is that the people that are compiling and using U-Boot on my company's
boards will have bought the boards from us, and we should be the ones
providing them documentation.  eg I would guess the vast majority of
board vendors don't say "for board information consult
doc/README. in the U-Boot source code", they provide a PDF, text
document, datasheet, etc about the board and how it can be used.  Thus
the doc/README. doesn't really provide any useful info.

I think the doc/README. files have a tendency to get out of date,
reference old commands, etc so are often not the best source of
reference anyway.  eg take a look at doc/README.m5373evb.  I'd argue a
lot of that info isn't necessary, and some of its duplicated in other
places.

I only care because I hate having to pick through 10 board-specific
README files every time I make a change the renames a command, adds a
new command, changes a CONFIG_XYZ name, etc:)

I think README files are good in general, but board-specific details
should be documented elsewhere such as a product manual. 

Anyway, that's my $.02.

Best,
Peter

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


Re: [U-Boot] Configuring BRGs and BRG input clock on an MPC875

2009-09-22 Thread Mikhail Zaturenskiy
> Hello, I thought I'd ask here before I go and make a mess of my code:
> what's the easiest way to configure my board to have SMC1 use BRG1,
> SCC4 use BRG2, and make my BRG1 and BRG2 use CLK2 as an input clock?
>
> I looked over the code and it looked like most of this is hard-coded
> in the "serial.c" file to use BRG1 for everything and I think to use
> BRGCLK as the BRG clock source ("serial_setdivisor" function).
>
> My board is similar to the EP88xc by the way.
>
> Thanks,
> Mikhail Zaturenskiy
>

I decided to first try to switch over my BRG1 to use CLK2 as the input
clock, it looks like by default it is using BRGCLK. I modified the
"serial_setdivisor" function in cpu/mpc8xx/serial.c to be the
following (CONFIG_PPC_OPS1 is defined):
***
static void serial_setdivisor(volatile cpm8xx_t *cp)
{
#if defined CONFIG_PPC_OPS1
int divisor=(4800 + 8*gd->baudrate)/16/gd->baudrate; // MZ - CLK2 
is 48MHz
#else
int divisor=(gd->cpu_clk + 8*gd->baudrate)/16/gd->baudrate; // MZ -
note: divisor = 70 or 71 at 130MHz and 115200bps
#endif

if(divisor/16>0x1000) {
/* bad divisor, assume 50MHz clock and 9600 baud */
divisor=(50*1000*1000 + 8*9600)/16/9600;
}

#ifdef CONFIG_SYS_BRGCLK_PRESCALE
divisor /= CONFIG_SYS_BRGCLK_PRESCALE;
#endif

if(divisor<=0x1000) {
cp->cp_brgc1=((divisor-1)<<1) | CPM_BRG_EN;
} else {
cp->cp_brgc1=((divisor/16-1)<<1) | CPM_BRG_EN | CPM_BRG_DIV16;
}

#if defined CONFIG_PPC_OPS1
cp->cp_brgc1 |= CPM_BRG_EXTC_CLK2; // MZ - this line is an attempt at
switching BRG1 input clock to CLK2
#endif
}
***

However, now my board is stuck in an infinite loop in "serial.c"
function "smc_putc", when it tries to send the first character:

while (rtx->txbd.cbd_sc & BD_SC_READY) {
WATCHDOG_RESET ();
__asm__("eieio");
}
***

Anybody have an idea as to what I'm doing wrong? Could there be
something wrong with my CLK2?

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


Re: [U-Boot] [PATCH 4/4 v3] s5pc1xx: add support SMDKC100 board

2009-09-22 Thread Tom
Peter Tyser wrote:
> On Tue, 2009-09-22 at 10:03 -0500, Tom wrote:
>> Minkyu Kang wrote:
>>> Adds new board SMDKC100 that uses s5pc100 SoC
>>>
>>> Signed-off-by: Minkyu Kang 
>>> Signed-off-by: HeungJun, Kim 
>>> ---
>>> Changes since v1:
>>> - arrange env values for more readable
>>> - make C struct instead of base+offset
>>> - use MACH_TYPE_SMDKC100 directly
>>> - fix the CONFIG_SYS_HZ to 1000
>>> - enable LOADB, LOADS, BOOTD, XIMG, FPGA
>>>
>>> Changes since v2:
>>> - remove  and SZ_XX defines
>>> - remove the define of machine type
>>> - remove the unnecessary comment
>>>
>>>  MAINTAINERS|4 +
>>>  MAKEALL|1 +
>>>  Makefile   |3 +
>>>  board/samsung/smdkc100/Makefile|   55 +++
>>>  board/samsung/smdkc100/config.mk   |   16 ++
>>>  board/samsung/smdkc100/lowlevel_init.S |  215 
>>>  board/samsung/smdkc100/mem_setup.S |  197 ++
>>>  board/samsung/smdkc100/onenand.c   |   83 +++
>>>  board/samsung/smdkc100/smdkc100.c  |   51 +++
>>>  include/configs/smdkc100.h |  242 
>>> 
>>>  10 files changed, 867 insertions(+), 0 deletions(-)
>>>  create mode 100644 board/samsung/smdkc100/Makefile
>>>  create mode 100644 board/samsung/smdkc100/config.mk
>>>  create mode 100644 board/samsung/smdkc100/lowlevel_init.S
>>>  create mode 100644 board/samsung/smdkc100/mem_setup.S
>>>  create mode 100644 board/samsung/smdkc100/onenand.c
>>>  create mode 100644 board/samsung/smdkc100/smdkc100.c
>>>  create mode 100644 include/configs/smdkc100.h
>>>
>> Please include a brief readme doc/README.s5pc1xx similar to README.omap
> 
> Hi Tom,
> Others may disagree, but I'm personally opposed to creating

Slugfest over documentation!

I can see you point.  If you have the board you likely have the user manual.
In no way do I want a user manual.

Mostly what I am looking for brief product description and a list of the
configs.  Maybe some hints if the setup is tricky.  README.omap3 contains
writeups on 6 boards, each get about 10 lines.

The vendor readme is also good if you want to convey board family u-boot
interfaces to other developers.  See my writeup of omap gpio in omap3.

> board/vendor-specific doc/README. files in most cases.  My logic
> is that the people that are compiling and using U-Boot on my company's
> boards will have bought the boards from us, and we should be the ones
> providing them documentation.  eg I would guess the vast majority of
> board vendors don't say "for board information consult
> doc/README. in the U-Boot source code", they provide a PDF, text
> document, datasheet, etc about the board and how it can be used.  Thus
> the doc/README. doesn't really provide any useful info.

This is doc/README.

> 
> I think the doc/README. files have a tendency to get out of date,
> reference old commands, etc so are often not the best source of
> reference anyway.  eg take a look at doc/README.m5373evb.  I'd argue a
> lot of that info isn't necessary, and some of its duplicated in other
> places.
> 
Yes this is excessive :|

> I only care because I hate having to pick through 10 board-specific
> README files every time I make a change the renames a command, adds a
> new command, changes a CONFIG_XYZ name, etc:)
> 

This should be the task of the board/soc maintainer.


> I think README files are good in general, but board-specific details
> should be documented elsewhere such as a product manual. 
> 
> Anyway, that's my $.02.

Taking it outside over documentation,
Tom

> 
> Best,
> Peter
> 

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


Re: [U-Boot] [PATCH] sbc85x0: tidy up Makefile to use new configuration script.

2009-09-22 Thread Kumar Gala

On Sep 21, 2009, at 2:19 PM, Paul Gortmaker wrote:

> Commit 804d83a5 allows us to move all the configuration
> variation tweaks out of the top level Makefile and down
> into the boards config header.  This takes advantage of
> that for the sbc8540/sbc8560 boards.
>
> There were a couple of cheezy comments pointing at incorrect
> files, or files that don't exist, so I've cleaned those up too.
>
> Signed-off-by: Paul Gortmaker 
> ---
>
> For 85xx tree; since it contains sbc8548 commits which this diff
> has context of one of those commit changes to Makefile
>
> Makefile  |   18 ++
> include/configs/SBC8540.h |   19 +++
> include/configs/sbc8560.h |   17 -
> 3 files changed, 25 insertions(+), 29 deletions(-)

applied to 85xx

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


Re: [U-Boot] [PATCH] mpc8610hpcd: Use common 86xx fdt fixup code

2009-09-22 Thread Kumar Gala

On Sep 21, 2009, at 9:09 PM, Peter Tyser wrote:

> Using the common 86xx fdt fixups removes some board-specific code and
> should make the mpc8610hpcd easier to maintain in the long run.
>
> Signed-off-by: Peter Tyser 
> ---
> board/freescale/mpc8610hpcd/mpc8610hpcd.c |   14 +-
> 2 files changed, 1 insertions(+), 14 deletions(-)

applied to 85xx

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


Re: [U-Boot] [PATCH] ppc/85xx: add ld script file for boot from NAND

2009-09-22 Thread Kumar Gala

On Sep 21, 2009, at 11:53 PM, Mingkai Hu wrote:

> The first stage 4K image uses a seperate ld script file to
> generate 4K image. This patch moves it to the cpu/mpc85xx/*
> to make it avaliable for 85xx platform.
>
> Signed-off-by: Mingkai Hu 
> ---
>
> ChangeLog:
> - move from board specific directory to cpu/mpc85xx/*,
>   make it avalible for 85xx platform.
>
> cpu/mpc85xx/u-boot-nand_spl.lds |   67 ++ 
> +
> 1 files changed, 67 insertions(+), 0 deletions(-)
> create mode 100644 cpu/mpc85xx/u-boot-nand_spl.lds

applied to 85xx

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


Re: [U-Boot] [PATCH] immap_85xx: add porpllsr's plat ratio definition

2009-09-22 Thread Kumar Gala

On Sep 21, 2009, at 11:53 PM, Mingkai Hu wrote:

> Signed-off-by: Mingkai Hu 
> ---
> include/asm-ppc/immap_85xx.h |2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)

applied to 85xx

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


Re: [U-Boot] [PATCH] ppc/85xx: add cpu init config file for boot from NAND

2009-09-22 Thread Kumar Gala

On Sep 21, 2009, at 11:53 PM, Mingkai Hu wrote:

> When boot from NAND, the NAND flash must be connected to br/or0.
> Also init RAM(L2 SRAM or DDR SDRAM) for load the second image to
> it.
>
> Signed-off-by: Mingkai Hu 
> ---
>
> ChangeLog:
> - move the board specific config for br/or to board init file, i.e.
>   nand_spl/board/freescale/mpc8536ds/nand_boot.c, which make it common
>   for 85xx platform.
>
> cpu/mpc85xx/cpu_init_nand.c |   63 ++ 
> +
> 1 files changed, 63 insertions(+), 0 deletions(-)
> create mode 100644 cpu/mpc85xx/cpu_init_nand.c

applied to 85xx

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


Re: [U-Boot] MPC83xx and uec

2009-09-22 Thread Ben Warren
Anton Vorontsov wrote:
> On Tue, Sep 22, 2009 at 04:03:16PM +0200, Joakim Tjernlund wrote:
> [...]
>   
> Also
>  drivers/qe/uec.h:int uec_initialize(bd_t *bis, uec_info_t *uec_info);
>  include/netdev.h:int uec_initialize(int index);
> different prototypes for the same function.
>   
 BTW, I am looking for a way to swap the order of ethernet interfaces:
 static uec_info_t uec_info[] = {
 #ifdef CONFIG_UEC_ETH1
STD_UEC_INFO(1),   /* UEC1 */
 #endif
 #ifdef CONFIG_UEC_ETH2
STD_UEC_INFO(2),   /* UEC2 */
 #endif
 #ifdef CONFIG_UEC_ETH3
STD_UEC_INFO(3),   /* UEC3 */
 #endif
 };
 
>>> Works for me:
>>>
>>> http://lists.denx.de/pipermail/u-boot/2009-September/060821.html
>>>   
>> Right, but I don't consider a include as this:
>>   +#include "../../../drivers/qe/uec.h"
>> as the correct way of getting of required data types and macros.
>> Consider that uec_initialize() is exported by netdev.h (although with the
>> wrong prototype ATM). As far as I can tell, I should only have to include
>> netdev.h to get the required types and macros.
>> 
>
> Not sure if having all-in-one netdev header is a good idea.
> It might be a good idea to move uec.h to "include/" though.
>
>   
This needs to be cleaned up.  THE prototype for the global initialize() 
function needs to be in netdev.h and nowhere else.

BTW - can't you effectively swap the order of the Ethernet interfaces at 
runtime using the 'ethprime' environment variable?

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


Re: [U-Boot] [PATCH 4/4 v3] s5pc1xx: add support SMDKC100 board

2009-09-22 Thread Peter Tyser
> >>>
> >> Please include a brief readme doc/README.s5pc1xx similar to README.omap
> > 
> > Hi Tom,
> > Others may disagree, but I'm personally opposed to creating
> 
> Slugfest over documentation!

Nothing gets me more worked up than a documentation discussion:)

> I can see you point.  If you have the board you likely have the user manual.
> In no way do I want a user manual.
> 
> Mostly what I am looking for brief product description and a list of the
> configs.  Maybe some hints if the setup is tricky.  README.omap3 contains
> writeups on 6 boards, each get about 10 lines.

The README.omap3 looks decent, but even that I would personally have a
few issues with the following:
1. The list of omap3 boards is going to get out of date quickly when
people don't update README.omap3.  Eg devkit8000 already isn't in the
list:)

2. I still think the details of how to configure U-Boot for a board, use
the ecc commands, and gpio interfaces would still be better placed in a
User's Manual.  New users will use the User's Manual and experienced
users will know how to dig through the code - eg I'm not sure who will
reference README.omap3:).  Those command names and config names will
probably change at some point in the future, and there's a decent chance
README.omap3 won't be similarly updated.

> The vendor readme is also good if you want to convey board family u-boot
> interfaces to other developers.  See my writeup of omap gpio in omap3.

I see your point.  If it were me, I'd throw that documentation in the
omap3 gpio driver itself.  Its much more likely to be kept in sync when
code changes, and if someone is writing low-level U-Boot code, I'd hope
they'd be smart enough to track down the gpio driver they need to use.

> > board/vendor-specific doc/README. files in most cases.  My logic
> > is that the people that are compiling and using U-Boot on my company's
> > boards will have bought the boards from us, and we should be the ones
> > providing them documentation.  eg I would guess the vast majority of
> > board vendors don't say "for board information consult
> > doc/README. in the U-Boot source code", they provide a PDF, text
> > document, datasheet, etc about the board and how it can be used.  Thus
> > the doc/README. doesn't really provide any useful info.
> 
> This is doc/README.

OK, I missed that point.  SOC documentation does seem more fitting.  I
personally think low-level details shouldn't be in the SOC doc however.
For example, take a look at README.blackfin.  There's nothing I could
ever change about U-Boot which would require this file to be updated,
which is perfect!



> > I only care because I hate having to pick through 10 board-specific
> > README files every time I make a change the renames a command, adds a
> > new command, changes a CONFIG_XYZ name, etc:)
> > 
> 
> This should be the task of the board/soc maintainer.

I think this is debatable.  I'd guess most board maintainers don't
follow the list closely or care enough to monitor every change and
determine if they need to update their board's README file.  So if the
person making a large change doesn't update relevant READMEs, no one
will.  Eg, no one added devkit8000 to README.omap3.

> > I think README files are good in general, but board-specific details
> > should be documented elsewhere such as a product manual. 
> > 
> > Anyway, that's my $.02.
> 
> Taking it outside over documentation,

Best,
Peter

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


Re: [U-Boot] [PATCH 0/3 v2] New MIIPHYBB implementation with multi-bus support

2009-09-22 Thread Ben Warren
Hi Luigi,

I like what you're doing here.  Thanks for working towards making the BB 
driver more universal.

Luigi 'Comio' Mantellini wrote:
> From: Luigi 'Comio' Mantellini 
>
> This patch rewrites the miiphybb ( Bit-banged MII bus driver ) in order to
> support an arbitrary number of buses. This feature is useful when your board
> uses different mii buses for different phys and all (or a part) of these buses
> are implemented via bit-banging mode.
>
> The driver requires that the following macros should be defined into the board
> configuration file:
>
> CONFIG_BITBANGMII   - Enable the miiphybb driver
> CONFIG_BITBANGMII_MULTI - Enable the multi bus support
>
> If the CONFIG_BITBANGMII_MULTI is not defined, the board's config file needs 
> to define
> the following macros:
>
>   
My preference would be to only support the 'multi' mode.  That way we 
can keep it smaller (source-wise, not binary-wise) and not use macros.
I'll give a more thorough review shortly, but just thought I'd put this 
idea out there...

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


[U-Boot] Please pull u-boot-mpc85xx

2009-09-22 Thread Kumar Gala
The following changes since commit 3b6a9267f0de7b85d387fa4123d0b58379363447:
  Wolfgang Denk (1):
board/flagadm/flash.c: fix compile warning

are available in the git repository at:

  git://git.denx.de/u-boot-mpc85xx.git master

Kumar Gala (15):
  ppc/85xx: Fix LCRR_CLKDIV defines
  ppc/85xx: Simplify the top makefile for 36-bit config for MPC8572DS
  ppc/85xx: Simplify the top makefile for 36-bit config for P2020DS
  ppc/85xx: Simplify the top makefile for P1_P2_RDB boards
  ppc/85xx: Clean up p1_p2_rdb PCI setup
  ppc/85xx: Clean up p2020ds PCI setup code
  ppc/85xx: Clean up mpc8572DS PCI setup code
  ppc/85xx: Clean up use of LAWAR defines
  ppc/p4080: Add p4080 platform immap definitions
  ppc/p4080: Add support for CoreNet style platform LAWs
  ppc/p4080: CoreNet platfrom style CCSRBAR setting
  ppc/p4080: CoreNet platfrom style secondary core release
  ppc/p4080: Add various p4080 related defines (and p4040)
  ppc/p4080: Handle timebase enabling and frequency reporting
  ppc/p4080: Determine various chip frequencies on CoreNet platforms

Mingkai Hu (4):
  ppc/85xx: simplify the top makefile for 36-bit config for mpc8536ds
  ppc/85xx: add ld script file for boot from NAND
  immap_85xx: add porpllsr's plat ratio definition
  ppc/85xx: add cpu init config file for boot from NAND

Paul Gortmaker (12):
  sbc8548: replace README with completely new document
  sbc8548: enable use of PCI network cards
  sbc8548: delete unused MPC8548CDS info carried over from port
  sbc8548: get_clock_freq is not valid for this board
  sbc8548: enable access to second bank of flash
  sbc8548: remove eTSEC3/4 voltage hack
  sbc8548: use I/O accessors
  sbc8548: correct local bus SDRAM size from 64M to 128M
  fsl_pci: create a SET_STD_PCI_INFO() helper wrapper
  sbc8548: update PCI/PCI-e support code
  sbc8548: allow enabling PCI via a make config option
  sbc85x0: tidy up Makefile to use new configuration script.

Peter Tyser (1):
  mpc8610hpcd: Use common 86xx fdt fixup code

Poonam Aggrwal (1):
  ppc/85xx: 32bit DDR changes for P1020/P1011

Vivek Mahajan (1):
  85xx-fdt: Fixed l2-ctlr's compatible prop for QorIQ

 MAKEALL   |4 +
 Makefile  |   66 ++-
 board/atum8548/law.c  |2 +-
 board/freescale/mpc8536ds/law.c   |6 +-
 board/freescale/mpc8540ads/law.c  |2 +-
 board/freescale/mpc8544ds/law.c   |6 +-
 board/freescale/mpc8560ads/law.c  |2 +-
 board/freescale/mpc8572ds/law.c   |6 +-
 board/freescale/mpc8572ds/mpc8572ds.c |  230 +++---
 board/freescale/mpc8610hpcd/mpc8610hpcd.c |   14 +--
 board/freescale/p1_p2_rdb/ddr.c   |   29 +++-
 board/freescale/p1_p2_rdb/law.c   |4 +-
 board/freescale/p1_p2_rdb/pci.c   |   42 ++--
 board/freescale/p2020ds/law.c |6 +-
 board/freescale/p2020ds/p2020ds.c |  150 +++---
 board/pm854/law.c |2 +-
 board/pm856/law.c |2 +-
 board/sbc8548/Makefile|4 +-
 board/sbc8548/law.c   |   12 +-
 board/sbc8548/sbc8548.c   |  305 ++---
 board/sbc8548/tlb.c   |   64 --
 board/socrates/law.c  |4 +-
 board/stx/stxgp3/law.c|2 +-
 board/stx/stxssa/law.c|2 +-
 board/xes/xpedite5200/law.c   |2 +-
 cpu/mpc85xx/Makefile  |1 +
 cpu/mpc85xx/cpu.c |   33 +++
 cpu/mpc85xx/cpu_init.c|   12 ++
 cpu/mpc85xx/cpu_init_early.c  |   29 +++
 cpu/mpc85xx/cpu_init_nand.c   |   63 ++
 cpu/mpc85xx/fdt.c |   15 +-
 cpu/mpc85xx/mp.c  |   68 +++-
 cpu/mpc85xx/speed.c   |   85 
 cpu/mpc85xx/u-boot-nand_spl.lds   |   67 +++
 cpu/mpc8xxx/cpu.c |4 +
 doc/README.sbc8548|  189 --
 drivers/misc/fsl_law.c|   98 +-
 drivers/pci/fsl_pci_init.c|2 +-
 include/asm-ppc/config.h  |6 +-
 include/asm-ppc/fsl_law.h |   31 +++
 include/asm-ppc/fsl_lbc.h |   12 ++
 include/asm-ppc/fsl_pci.h |   12 ++
 include/asm-ppc/immap_85xx.h  |  289 +--
 include/asm-ppc/mmu.h |9 +-
 include/asm-ppc/processor.h   |4 +
 include/configs/MPC8536DS.h   |2 +-
 include/configs/MPC8572DS.h   |4 +
 include/configs/P1_P2_RDB.h   |   13 ++
 include/configs/P2020DS.h 

Re: [U-Boot] [PATCH] Add support for Eukrea CPU9260/CPU9G20 SBC

2009-09-22 Thread Wolfgang Denk
Dear Eric Benard,

In message <1252167339-21415-1-git-send-email-e...@eukrea.com> you wrote:
> these boards are built around Atmel's AT91SAM9260/9G20 and have
> up to 64MB of NOR flash, up to 128MB of SDRAM, up to 2GB of NAND
> and include a 10/100 Ethernet PHY in RMII mode.
> 
> Signed-off-by: Eric Benard 
> ---
>  MAINTAINERS|5 +
>  MAKEALL|2 +
>  Makefile   |8 +
>  board/eukrea/cpu9260/Makefile  |   59 +
>  board/eukrea/cpu9260/config.mk |1 +
>  board/eukrea/cpu9260/cpu9260.c |  218 +
>  board/eukrea/cpu9260/led.c |  153 
>  cpu/arm926ejs/at91/lowlevel_init.S |3 +-
>  include/configs/cpu9260.h  |  453 
> 
>  9 files changed, 901 insertions(+), 1 deletions(-)
>  create mode 100644 board/eukrea/cpu9260/Makefile
>  create mode 100644 board/eukrea/cpu9260/config.mk
>  create mode 100644 board/eukrea/cpu9260/cpu9260.c
>  create mode 100644 board/eukrea/cpu9260/led.c
>  create mode 100644 include/configs/cpu9260.h
...
> index dd01b66..1d1ded4 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2863,6 +2863,14 @@ at91sam9rlek_config:   unconfig
>   fi;
>   @$(MKCONFIG) -a at91sam9rlek arm arm926ejs at91sam9rlek atmel at91
>  
> +CPU9G20_128M_config \
> +CPU9G20_config \
> +CPU9260_128M_config \
> +CPU9260_config   :   unconfig
> + @mkdir -p $(obj)include
> + @echo "#define CONFIG_$(@:_config=) 1" >$(obj)include/config.h
> + @$(MKCONFIG) -a cpu9260 arm arm926ejs cpu9260 eukrea at91
> +
>  meesc_config :   unconfig
>   @$(MKCONFIG) $(@:_config=) arm arm926ejs meesc esd at91

Please use the new "-t" option to mkconfig to simplify the Makefile
entry.

> +#ifdef CONFIG_CMD_NAND
> +static void cpu9260_nand_hw_init(void)
> +{
> + unsigned long csa;
> +
> + /* Enable CS3 */
> + csa = at91_sys_read(AT91_MATRIX_EBICSA);
> + at91_sys_write(AT91_MATRIX_EBICSA,
> +csa | AT91_MATRIX_CS3A_SMC_SMARTMEDIA);
> +
> + /* Configure SMC CS3 for NAND/SmartMedia */
> +#if defined(CONFIG_CPU9G20)
> + at91_sys_write(AT91_SMC_SETUP(3),
> +AT91_SMC_NWESETUP_(2) | AT91_SMC_NCS_WRSETUP_(0) |
> +AT91_SMC_NRDSETUP_(2) | AT91_SMC_NCS_RDSETUP_(0));
> + at91_sys_write(AT91_SMC_PULSE(3),
> +AT91_SMC_NWEPULSE_(4) | AT91_SMC_NCS_WRPULSE_(4) |
> +AT91_SMC_NRDPULSE_(4) | AT91_SMC_NCS_RDPULSE_(4));
> + at91_sys_write(AT91_SMC_CYCLE(3),
> +AT91_SMC_NWECYCLE_(7) | AT91_SMC_NRDCYCLE_(7));
> + at91_sys_write(AT91_SMC_MODE(3),
> +AT91_SMC_READMODE | AT91_SMC_WRITEMODE |
> +AT91_SMC_EXNWMODE_DISABLE |
> +AT91_SMC_DBW_8 |
> +AT91_SMC_TDF_(3));
> +#elif defined(CONFIG_CPU9260)
> + at91_sys_write(AT91_SMC_SETUP(3),
> +AT91_SMC_NWESETUP_(1) | AT91_SMC_NCS_WRSETUP_(0) |
> +AT91_SMC_NRDSETUP_(1) | AT91_SMC_NCS_RDSETUP_(0));
> + at91_sys_write(AT91_SMC_PULSE(3),
> +AT91_SMC_NWEPULSE_(3) | AT91_SMC_NCS_WRPULSE_(3) |
> +AT91_SMC_NRDPULSE_(3) | AT91_SMC_NCS_RDPULSE_(3));
> + at91_sys_write(AT91_SMC_CYCLE(3),
> +AT91_SMC_NWECYCLE_(5) | AT91_SMC_NRDCYCLE_(5));
> + at91_sys_write(AT91_SMC_MODE(3),
> +AT91_SMC_READMODE | AT91_SMC_WRITEMODE |
> +AT91_SMC_EXNWMODE_DISABLE |
> +AT91_SMC_DBW_8 |
> +AT91_SMC_TDF_(2));
> +#endif

The code here looks the same to me, there are just minor differences
in the data. Please #define appropriate variables in the respective
board config files and get rid of the #if in this common file.

...
> +int board_init(void)
> +{
> + /* Enable Ctrlc */
> + console_init_f();
> +
> + /* arch number of the board */
> +#if defined(CONFIG_CPU9G20)
> + gd->bd->bi_arch_number = MACH_TYPE_CPUAT9260;
> +#elif defined(CONFIG_CPU9260)
> + gd->bd->bi_arch_number = MACH_TYPE_CPUAT9260;
> +#endif

Ditto here.

> +#ifdef CONFIG_RESET_PHY_R
> +void reset_phy(void)
> +{
> +#ifdef CONFIG_MACB
> + /*
> +  * Initialize ethernet HW addr prior to starting Linux,
> +  * needed for nfsroot
> +  */
> + eth_init(gd->bd);
> +#endif
> +}
> +#endif

Ethernet must not be unconditionally initilaized. Only when U-Boot
runs a network command it may do that, and then it should disable the
interface again before booting Linux. Please see the FAQ, and fix the
Linux driver issue in Linux.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
No more blah, blah, blah!
-- Kirk, "Miri", stardate 27

Re: [U-Boot] I am maintainer of Freescale i.MX

2009-09-22 Thread Wolfgang Denk
Dear Fred,

In message <2f495dc80909170830j7acdd1b0j4e4d27e60af06...@mail.gmail.com> you 
wrote:
>
>  I am u-boot maintainer of Freescale i.MX team.
>  I have two mail accounts:

Thanks for volunteering to become the custodian for the i.MX support
in U-Boot. 

Please send me your SSH private key, and I will set up a repository
for you.

> fanyef...@gmail.com and r01...@freescale.com.
>  I will use both of them.

That's fine. Your identification for the git repository is through
your SSH key. Which address do you prefer when sending mail to the
i.MX custodian?


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Perl itself is  usually  pretty  good  about  telling  you  what  you
shouldn't do. :-) - Larry Wall in <11...@jpl-devvax.jpl.nasa.gov>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Subject: [PATCH v3] mx27ads: add support for iMX27ADS board from Freescale

2009-09-22 Thread Wolfgang Denk
Dear Alan Carvalho de Assis,

In message <37367b3a0909151429h317066ax2efa504d83dbf...@mail.gmail.com> you 
wrote:
> This patch adds support to iMX27ADS development board. This board has
> 128MB RAM, 32MB NOR Flash and 128MB NAND Flash. Currently only
> booting from NOR is supported.
> 
> Signed-off-by: Alan Carvalho de Assis 

I will try and mention only the issues not yet covered.

...
> --- a/Makefile
> +++ b/Makefile
> @@ -2965,6 +2965,9 @@ davinci_dm365evm_config :   unconfig
>  imx27lite_config:unconfig
>   @$(MKCONFIG) $(@:_config=) arm arm926ejs imx27lite logicpd mx27
> 
> +mx27ads_config : unconfig
> + @$(MKCONFIG) $(@:_config=) arm arm926ejs mx27ads freescale mx27
> +
>  lpd7a400_config \
>  lpd7a404_config: unconfig

Please keep list sorted.

> diff --git a/board/freescale/mx27ads/Makefile 
> b/board/freescale/mx27ads/Makefile
> new file mode 100644
> index 000..d142a9e
> --- /dev/null
> +++ b/board/freescale/mx27ads/Makefile
...
> +#
> +

Please don;t add trailing empty lines.

> diff --git a/board/freescale/mx27ads/config.mk
> b/board/freescale/mx27ads/config.mk
> new file mode 100644
> index 000..a2e7768
> --- /dev/null
> +++ b/board/freescale/mx27ads/config.mk
...
> +/*
> + * For clock initialization, see chapter 3 of the "MCIMX27 Multimedia
> + * Applications Processor Reference Manual, Rev. 0.2".
> + *
> + */

Please don't add random empty comment lines.

...
> + write32 0xAF00, 0x
> + write32 0xD8001000, 0xb210
> + ldr r0, =0xA033
> + mov r1, #0xda
> + strbr1, [r0]
> + ldr r0, =0xA100
> + mov r1, #0xff
> + strbr1, [r0]
> + write32 0xD8001000, 0x82226080
...
> + mov r10, lr
...
> + ldr r0, =CSCR
> + ldr r1, [r0]
> + bic r1, r1, #0x03
> + str r1, [r0]

Please use a consistent style for indentation. I suggest you use the
insn name followed by a single TAB character followed by args.


> +++ b/board/freescale/mx27ads/mx27ads.c
> @@ -0,0 +1,93 @@
...
...
> +# define __REG(x)  (*((volatile u32 *)(x)))
> +
> +#define IMX_CS4_BASE   0xD400
> +#define CS4U __REG(IMX_WEIM_BASE + 0x40) /* Chip Select 4 Upper Register
> */
> +#define CS4L __REG(IMX_WEIM_BASE + 0x44) /* Chip Select 4 Lower Register
> */
> +#define CS4A __REG(IMX_WEIM_BASE + 0x48) /* Chip Select 4 Addition Register 
> */

Please use proper I/O accessors. Direct register accesses like here
are forbidden. Also, you probably want to define a C structure
describing the register map.

...
> + /* Configure CPLD on CS4 */
> + CS4U = 0xDCF6;
> + CS4L = 0x444A4541;
> + CS4A = 0x3302;

Please never use suchmagic numbers in the code. Provide some #defines
for these, together with sufficient comments to explain what the
numbers mean.

> + /* Select FEC data through data path */
> + writew(0x0020, IMX_CS4_BASE + 0x10);
> +
> + /* Enable CPLD FEC data path */
> + writew(0x0010, IMX_CS4_BASE + 0x14);

Please use C structs for the register mapping; do not use base address
plus offsets.

> +int dram_init(void)
> +{
> +

No empty line here.

> +#if CONFIG_NR_DRAM_BANKS > 0
> + gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
> + gd->bd->bi_dram[0].size = get_ram_size((volatile void *)PHYS_SDRAM_1,
> + PHYS_SDRAM_1_SIZE);
> +#endif

Um... is CONFIG_NR_DRAM_BANKS <= 0 any configuration that is supposed
to work? 

> +#if CONFIG_NR_DRAM_BANKS > 1
> + gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
> + gd->bd->bi_dram[1].size = get_ram_size((volatile void *)PHYS_SDRAM_2,
> + PHYS_SDRAM_2_SIZE);
> +#endif
> +
> + return 0;

You unconditionally return OK< even in case of memory errors? This
seems wrong to me.

> diff --git a/board/freescale/mx27ads/u-boot.lds
> b/board/freescale/mx27ads/u-boot.lds
> new file mode 100644
> index 000..f66f20e
> --- /dev/null
> +++ b/board/freescale/mx27ads/u-boot.lds

Does this board need a private linke rscript? Why cannot you use the
common script in cpu/arm926ejs/u-boot.lds ?

> diff --git a/include/configs/mx27ads.h b/include/configs/mx27ads.h
> new file mode 100644
> index 000..3360d76
> --- /dev/null
> +++ b/include/configs/mx27ads.h
...
> +/* memtest start address */
> +#define CONFIG_SYS_MEMTEST_START 0xA000
> +#define CONFIG_SYS_MEMTEST_END   0xA100  /* 16MB RAM 
> test */

Did you ever test this? Overwriting low memory where exception vectors
and such is located is probably a bad idea.

...
> +/* Use hardware sector protection */
> +#define CONFIG_SYS_FLASH_PROTECTION  1
> +#define CONFIG_SYS_MAX_FLASH_BANKS   1   /* max number of flash banks */
> +#define CONFIG_SYS_FLASH_SECT_SZ 0x2000  /* 8KB sect size Intel Flash */
> +/* end of flash */
> +#define CONFIG_ENV_OFFSET(PHYS_FLASH_SIZE - 0x2)
> +/* 

Re: [U-Boot] [PATCH MAKEALL coldfire] : Fix start.S:Error: Conversionof PC relative displacement to absolute

2009-09-22 Thread Liew Tsi Chung-R5AAHP
Philippe,

The error that you encountered only happen when using linux cross
compiler; however, if choosing uclinux cross compiler this will not be
an issue.

Anyway, is an acked for me so that both compiler can be used without
causing the problem.

Best Regards,
TsiChung


-Original Message-
From: u-boot-boun...@lists.denx.de [mailto:u-boot-boun...@lists.denx.de]
On Behalf Of Philippe De Muyter
Sent: Monday, September 21, 2009 2:49 PM
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH MAKEALL coldfire] : Fix start.S:Error:
Conversionof PC relative displacement to absolute

Hi all,

This fixes the following errors when running MAKEALL for coldfire :
start.S: Assembler messages:
start.S:320: Error: Conversion of PC relative displacement to
absolute

Signed-off-by: Philippe De Muyter 

diff -ru a/cpu/mcf523x/start.S b/cpu/mcf523x/start.S
--- a/cpu/mcf523x/start.S   2009-09-17 23:28:31.0 +0200
+++ b/cpu/mcf523x/start.S   2009-09-21 19:58:34.0 +0200
@@ -246,7 +246,7 @@
 /* exception code */
.globl _fault
 _fault:
-   jmp _fault
+   bra _fault
.globl  _exc_handler
 
 _exc_handler:
diff -ru a/cpu/mcf52x2/start.S b/cpu/mcf52x2/start.S
--- a/cpu/mcf52x2/start.S   2009-09-17 23:28:31.0 +0200
+++ b/cpu/mcf52x2/start.S   2009-09-21 19:47:40.0 +0200
@@ -317,7 +317,7 @@
 /* exception code */
.globl _fault
 _fault:
-   jmp _fault
+   bra _fault
 
.globl  _exc_handler
 _exc_handler:
diff -ru a/cpu/mcf532x/start.S b/cpu/mcf532x/start.S
--- a/cpu/mcf532x/start.S   2009-09-17 23:28:31.0 +0200
+++ b/cpu/mcf532x/start.S   2009-09-21 19:50:36.0 +0200
@@ -256,7 +256,7 @@
 /* exception code */
.globl _fault
 _fault:
-   jmp _fault
+   bra _fault
.globl  _exc_handler
 
 _exc_handler:
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

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


Re: [U-Boot] [PATCH v2] document network driver framework

2009-09-22 Thread Wolfgang Denk
Dear Mike Frysinger,

In message <1252521682-5067-1-git-send-email-vap...@gentoo.org> you wrote:
> Signed-off-by: Mike Frysinger 
> ---
> v2
>   - drop CONFIG naming section
>   - fix MII documentation
> 
>  doc/README.drivers.eth |  177 
> 
>  1 files changed, 177 insertions(+), 0 deletions(-)
>  create mode 100644 doc/README.drivers.eth

Acked-by: Wolfgang Denk 

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Virtue is a relative term.
-- Spock, "Friday's Child", stardate 3499.1
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH][v2] FDT: remove obsolete OF_CPU and OF_SOC macros.

2009-09-22 Thread Wolfgang Denk
Dear Marcel Ziswiler,

In message <1252523921.3643.8.ca...@com-21> you wrote:
> Signed-off-by: Marcel Ziswiler 
> ---
> Changes since v1:
> - CC all respective board maintainers
> 
>  README|6 --
>  include/configs/IDS8247.h |2 --
>  include/configs/MPC8260ADS.h  |1 -
>  include/configs/linkstation.h |2 --
>  include/configs/mgcoge.h  |2 --
>  include/configs/mpc7448hpc2.h |1 -
>  include/configs/muas3001.h|2 --
>  include/configs/stxxtc.h  |1 -
>  8 files changed, 4 insertions(+), 13 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Oh, that sound of male ego.  You travel halfway across the galaxy and
it's still the same song.
-- Eve McHuron, "Mudd's Women", stardate 1330.1
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] ppc/85xx: PIO Support for FSL eSDHC Controller Driver

2009-09-22 Thread Wolfgang Denk
Dear Dipen Dudhat,

In message <1252589856-4970-1-git-send-email-dipen.dud...@freescale.com> you 
wrote:
> On some Freescale SoC Internal DMA of eSDHC controller has bug.
> 
> So PIO Mode has introduced to do data transfer using CPU.
> In PIO mode data transfer performance will be degraded by a large extent.
> 
> Note: 
> In PIO mode multiple block read/write requires delay to complete the transfer.

Does that mean you just delay, i. e. you do not check for some ready
state?

...
> --- a/include/fsl_esdhc.h
> +++ b/include/fsl_esdhc.h
> @@ -86,6 +86,7 @@
>  #define PRSSTAT_CDPL (0x0004)
>  #define PRSSTAT_CINS (0x0001)
>  #define PRSSTAT_BREN (0x0800)
> +#define PRSSTAT_BWEN (0x0400)
>  #define PRSSTAT_DLA  (0x0004)
>  #define PRSSTAT_CICHB(0x0002)
>  #define PRSSTAT_CIDHB(0x0001)
> @@ -117,6 +118,7 @@
>  #define XFERTYP_DMAEN0x0001
>  
>  #define CINS_TIMEOUT 1000
> +#define MAX_TIMEOUT  10

MAX_TIMEOUT is a very generic name, please chose a more specific one
so interactions with other code are prevented. (Also, TIMEOUT itself
already means a maximum time, so MAX_TIMEOUT is a tautology.)

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Very ugly or very beautiful women should be flattered on their
understanding, and mediocre ones on their beauty.
   -- Philip Earl of Chesterfield
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3] at91: Update MEESC board support

2009-09-22 Thread Wolfgang Denk
Dear Daniel Gorsulowski,

In message <12525916852655-git-send-email-daniel.gorsulow...@esd.eu> you wrote:
> This patch implements several updates:
> -disable CONFIG_ENV_OVERWRITE
> -add new hardware style variants and set the arch numbers appropriate 
> (autodet.)

LIne too long.

> -pass the serial# and hardware revision to the kernel
> -removed unused macros from include/configs/meesc.h
> 
> Signed-off-by: Daniel Gorsulowski 
...
> --- a/board/esd/meesc/meesc.c
> +++ b/board/esd/meesc/meesc.c
> @@ -156,8 +156,35 @@ int board_eth_init(bd_t *bis)
>  int checkboard(void)
>  {
>   char str[32];
> -
> - puts("Board: esd CAN-EtherCAT Gateway");
> + u_char hw_type; /* hardware type */
> +
> + /* read the "Type" register of the ET1100 controller */
> + hw_type = readb(CONFIG_ET1100_BASE);
> +
> + switch (hw_type) {
> + case 0x11:
> + case 0x3F:

Incorrect indentation - the "case" must have the same indent as the
"switch". Please fix globally.

> + /* ET1100 present,
> +arch number of MEESC-Board */

Incorrect multiline comment style. Please fix globally.



Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Lots of people drink from the wrong bottle sometimes.
-- Edith Keeler, "The City on the Edge of Forever",
   stardate unknown
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] MPC83xx and uec

2009-09-22 Thread Joakim Tjernlund
Ben Warren  wrote on 22/09/2009 18:55:22:
>
> Anton Vorontsov wrote:
> > On Tue, Sep 22, 2009 at 04:03:16PM +0200, Joakim Tjernlund wrote:
> > [...]
> >
> > Also
> >  drivers/qe/uec.h:int uec_initialize(bd_t *bis, uec_info_t *uec_info);
> >  include/netdev.h:int uec_initialize(int index);
> > different prototypes for the same function.
> >
>  BTW, I am looking for a way to swap the order of ethernet interfaces:
>  static uec_info_t uec_info[] = {
>  #ifdef CONFIG_UEC_ETH1
> STD_UEC_INFO(1),   /* UEC1 */
>  #endif
>  #ifdef CONFIG_UEC_ETH2
> STD_UEC_INFO(2),   /* UEC2 */
>  #endif
>  #ifdef CONFIG_UEC_ETH3
> STD_UEC_INFO(3),   /* UEC3 */
>  #endif
>  };
> 
> >>> Works for me:
> >>>
> >>> http://lists.denx.de/pipermail/u-boot/2009-September/060821.html
> >>>
> >> Right, but I don't consider a include as this:
> >>   +#include "../../../drivers/qe/uec.h"
> >> as the correct way of getting of required data types and macros.
> >> Consider that uec_initialize() is exported by netdev.h (although with the
> >> wrong prototype ATM). As far as I can tell, I should only have to include
> >> netdev.h to get the required types and macros.
> >>
> >
> > Not sure if having all-in-one netdev header is a good idea.
> > It might be a good idea to move uec.h to "include/" though.
> >
> >
> This needs to be cleaned up.  THE prototype for the global initialize()
> function needs to be in netdev.h and nowhere else.
>
> BTW - can't you effectively swap the order of the Ethernet interfaces at
> runtime using the 'ethprime' environment variable?

I did this quite some time ago so memory isn't fresh, but at time
I looked high and low(including ethprime) and nothing worked all the way so I
ended up swapping by patching generic code instead. Now I can do the
same in board code, but current u-boot is a bit fuzzy in this area.

  Jocke

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


Re: [U-Boot] [PATCH v1 2/3] Add support for save environment variable to MMC/SD card

2009-09-22 Thread Wolfgang Denk
Dear Mingkai Hu,

In message <1252640445-7890-3-git-send-email-mingkai...@freescale.com> you 
wrote:
> Whether booting from MMC/SD card or not, the environment variables
> can be saved on it, this patch add the operation support.
> 
> Signed-off-by: Mingkai Hu 
...
> --- a/common/Makefile
> +++ b/common/Makefile
> @@ -61,6 +61,7 @@ COBJS-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o
>  COBJS-$(CONFIG_ENV_IS_IN_NVRAM) += env_nvram.o
>  COBJS-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o
>  COBJS-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o
> +COBJS-$(CONFIG_ENV_IS_IN_SDCARD) += env_sdcard.o
>  COBJS-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o

Please keep the list sorted.

>  # command
> diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
> index 2186205..83969ef 100644
> --- a/common/cmd_nvedit.c
> +++ b/common/cmd_nvedit.c
> @@ -60,9 +60,10 @@ DECLARE_GLOBAL_DATA_PTR;
>  !defined(CONFIG_ENV_IS_IN_NVRAM) && \
>  !defined(CONFIG_ENV_IS_IN_ONENAND)   && \
>  !defined(CONFIG_ENV_IS_IN_SPI_FLASH) && \
> +!defined(CONFIG_ENV_IS_IN_SDCARD)&& \

Ditto.

>  # error Define one of CONFIG_ENV_IS_IN_{EEPROM|FLASH|DATAFLASH|ONENAND|\
> -SPI_FLASH|MG_DISK|NVRAM|NOWHERE}
> +SPI_FLASH|MG_DISK|NVRAM|SDCARD|NOWHERE}

Please take the opportunity to sort this list, too. Thanks.

...
> +int env_init(void)
> +{
> + /* eSDHC isn't usable before relocation */
> + gd->env_addr  = (ulong)&default_environment[0];
> + gd->env_valid = 1;

Argh... Does that mean that your environment suddenly changes while
running? That you start running from the default environment (which
cannot be changed) and then switch to a the real, changable
environment?

This is going to cause a hell of confusion to users who for example
want to define a different console baud rate or such...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
It is surely a great calamity for  a  human  being  to  have  no  ob-
sessions.- Robert Bly
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v1 1/3] Make mmc init come before env_relocate

2009-09-22 Thread Wolfgang Denk
Dear Mingkai Hu,

In message <1252640445-7890-2-git-send-email-mingkai...@freescale.com> you 
wrote:
> If the environment variables are saved on the MMC/SD card,
> env_relocat can't relocate env from MMC/SD card without mmc init.
> 
> Signed-off-by: Mingkai Hu 

I'm biased. I understand that you do this because you need it for the
next patch, which reads the environment from MMC card. But then MMC is
just one out of many storage devices, and with the same right we would
have to move the SCSI or DoC or S-ATA initialization up, because we
could implement storing the environment on such devices, too.

This has not been done so far, because it suffers from the fundamental
problem your code is suffering from, too: you cannot access the
environment early enough, so for example your board boots with a
hard-wird, unchangable console baud rate, despite that you suggest to
the user he could change it.

I don't like that, and therefore tend to NAK the whole approach.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Don't hit a man when he's down - kick him; it's easier.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v1 3/3] mpc8536: Get the address of env on the SDCard

2009-09-22 Thread Wolfgang Denk
Dear Mingkai Hu,

In message <1252640445-7890-4-git-send-email-mingkai...@freescale.com> you 
wrote:
> Both the save env and load env operation will call this function
> to get the address of env on the SDCard, so the user can control
> where to put the env freely.
> 
> Also enable the functionlity of saving env variable to SDCard on
> mpc8536
> 
> Signed-off-by: Mingkai Hu 
...
> +#if defined(CONFIG_MMC)
> +/*
> + * The environment variables are written to just after the u-boot image
> + * on SDCard, so we must read the MBR to get the start address and code
> + * length of the u-boot image, then calculate the address of the env.

This seems to be broken by design. If your U-Boot image grows, it
would overwrite the environment? Or am I missing something?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
If A equals success, then the formula is A = X + Y + Z. X is work.  Y
is play. Z is keep your mouth shut. - Albert Einstein
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH][Net] Convert SMC91111 Ethernet driver to CONFIG_NET_MULTI API

2009-09-22 Thread Wolfgang Denk
Dear Mike Frysinger,

In message <200909110606.42732.vap...@gentoo.org> you wrote:
> --===0077506097==
> Content-Type: multipart/signed;
>   boundary="nextPart2279044.usXPOpWbKs";
>   protocol="application/pgp-signature";
>   micalg=pgp-sha1
> Content-Transfer-Encoding: 7bit
> 
> --nextPart2279044.usXPOpWbKs
> Content-Type: multipart/mixed;
>   boundary="Boundary-01=_rEiqKxzcR2Mk9j/"
> Content-Transfer-Encoding: 7bit
> 
> 
> --Boundary-01=_rEiqKxzcR2Mk9j/
> Content-Type: Text/Plain;
>   charset="utf-8"
> Content-Transfer-Encoding: quoted-printable
> Content-Disposition: inline

Please do not do that. Patches are supposed to be submitten inline.

Except for that:

Acked-by: Wolfgang Denk 

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
"We don't care.  We don't have to.  We're the Phone Company."
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v3 3/5] NAND boot: MPC8536DS support

2009-09-22 Thread Wolfgang Denk
Dear Mingkai Hu,

In message <1252649951-28543-2-git-send-email-mingkai...@freescale.com> you 
wrote:
> MPC8536E can support booting from NAND flash which uses the
> image u-boot-nand.bin. This image contains two parts: a 4K
> NAND loader and a main U-Boot image. The former is appended
> to the latter to produce u-boot-nand.bin. The 4K NAND loader
> includes the corresponding nand_spl directory, along with the
> code twisted by CONFIG_NAND_SPL. The main U-Boot image just
> like a general U-Boot image except the parts that included by
> CONFIG_SYS_RAMBOOT.
...
> diff --git a/cpu/mpc85xx/nand_init.c b/cpu/mpc85xx/nand_init.c
> new file mode 100644
> index 000..c29b22d
...
> +void cpu_init_early_f(void)
> +{
> + int i;
> +
> + /* Pointer is writable since we allocated a register for it */
> + gd = (gd_t *) (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_GBL_DATA_OFFSET);
> +
> + /* Clear initial global data */
> + for (i = 0; i < sizeof(gd_t); i++)
> + ((char *)gd)[i] = 0;
> +
> + set_tlb(0, CONFIG_SYS_CCSRBAR, CONFIG_SYS_CCSRBAR_PHYS,
> + MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
> + 1, 0, BOOKE_PAGESZ_4K, 0);
> +
> + /* set up CCSR if we want it moved */
> +#if (CONFIG_SYS_CCSRBAR_DEFAULT != CONFIG_SYS_CCSRBAR_PHYS)
> + {
> + volatile u32 *ccsr_virt =
> + (volatile u32 *)(CONFIG_SYS_CCSRBAR + 0x1000);

Please do not declare vaiables righjt in the middle of the code.
Consider moving this code into a separate function instead.

> diff --git a/cpu/mpc85xx/u-boot-nand.lds b/cpu/mpc85xx/u-boot-nand.lds
> index c14e946..a0fc8f1 100644
> --- a/cpu/mpc85xx/u-boot-nand.lds
> +++ b/cpu/mpc85xx/u-boot-nand.lds
> @@ -65,10 +65,8 @@ SECTIONS
>  PROVIDE (etext = .);
>  .rodata:
> {
> -*(.rodata)
> -*(.rodata1)
> -*(.rodata.str1.4)
>  *(.eh_frame)
> +*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*)))

Please rebase your patch against current code.

...
>  /*
> + * Config the L2 Cache as L2 SRAM
> + */
> +#define CONFIG_SYS_INIT_L2_ADDR  0xf8f8
> +#ifdef CONFIG_PHYS_64BIT
> +#define CONFIG_SYS_INIT_L2_ADDR_PHYS 0xff8f8ull
> +#else
> +#define CONFIG_SYS_INIT_L2_ADDR_PHYS CONFIG_SYS_INIT_L2_ADDR
> +#endif
> +#define CONFIG_SYS_L2_SIZE   (512 << 10)
> +#define CONFIG_SYS_INIT_L2_END   (CONFIG_SYS_INIT_L2_ADDR + 
> CONFIG_SYS_L2_SIZE)

Line too long, please fix globally.

> diff --git a/nand_spl/board/freescale/mpc8536ds/Makefile 
> b/nand_spl/board/freescale/mpc8536ds/Makefile
> new file mode 100644
> index 000..c9104d3
> --- /dev/null
> +++ b/nand_spl/board/freescale/mpc8536ds/Makefile
...
> +$(obj)start.S:
> + @rm -f $(obj)start.S
> + ln -sf $(SRCTREE)/cpu/mpc85xx/start.S $(obj)start.S
> +
> +$(obj)resetvec.S:
> + @rm -f $(obj)resetvec.S
> + ln -s $(SRCTREE)/cpu/$(CPU)/resetvec.S $(obj)resetvec.S
> +
> +$(obj)nand_boot_fsl_elbc.c:
> + @rm -f $(obj)nand_boot_fsl_elbc.c
> + ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c \
> +$(obj)nand_boot_fsl_elbc.c
> +
> +$(obj)ns16550.c:
> + @rm -f $(obj)ns16550.c
> + ln -sf $(SRCTREE)/drivers/serial/ns16550.c $(obj)ns16550.c
> +
> +$(obj)nand_init.c:
> + @rm -f $(obj)nand_init.c
> + ln -sf $(SRCTREE)/cpu/mpc85xx/nand_init.c $(obj)nand_init.c
> +
> +$(obj)cache.c:
> + @rm -f $(obj)cache.c
> + ln -sf $(SRCTREE)/lib_ppc/cache.c $(obj)cache.c
> +
> +$(obj)tlb.c:
> + @rm -f $(obj)tlb.c
> + ln -sf $(SRCTREE)/cpu/mpc85xx/tlb.c $(obj)tlb.c
> +
> +$(obj)tlb_table.c:
> + @rm -f $(obj)tlb_table.c
> + ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $(obj)tlb_table.c

Consider using the same file name here; it will simplify the Makefile
rules.

> +
> +$(obj)law.c:
> + @rm -f $(obj)law.c
> + ln -sf $(SRCTREE)/drivers/misc/fsl_law.c $(obj)law.c

Ditto.

> +
> +$(obj)law_table.c:
> + @rm -f $(obj)law_table.c
> + ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $(obj)law_table.c

Ditto.

Please sort list.

And why do you need a separate rule everywhere? They look all the
same to me  (except for the inconsistent file names) ?

> +#
> +
> +$(obj)%.o:   $(obj)%.S
> + $(CC) $(AFLAGS) -c -o $@ $<
> +
> +$(obj)%.o:   $(obj)%.c
> + $(CC) $(CFLAGS) -c -o $@ $<
> +
> +# defines $(obj).depend target
> +include $(SRCTREE)/rules.mk
> +
> +sinclude $(obj).depend
> +
> +#
> diff --git a/nand_spl/board/freescale/mpc8536ds/nand_boot.c 
> b/nand_spl/board/freescale/mpc8536ds/nand_boot.c
> new file mode 100644
> index 000..77973d1
> --- /dev/null
> +++ b/nand_spl/board/freescale/mpc8536ds/nand_boot.c
...
> +void board_init_f(ulong bootflag)
> +{
> + u8 sysclk_ratio;
> + uint plat_ratio, bus_clk, sys_clk;
> + volatile ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
> +
> + /* initialize selected port w

Re: [U-Boot] [PATCH] Support for Calao USB A9263 board based on AT91SAM9263 CPU

2009-09-22 Thread Wolfgang Denk
Dear Thomas Petazzoni,

In message 
<1252668335-17986-1-git-send-email-thomas.petazz...@free-electrons.com> you 
wrote:
> The Calao USB A9263 board is a board manufactured and sold by Calao
> Systems . Its components are very
> similar to the AT91SAM9263EK board, so its configuration is based
> on the configuration of this board. There are however some
> differences: different clocks, no LCD, etc.
> 
> Signed-off-by: Thomas Petazzoni 
> Signed-off-by: Albin Tonnerre 
...
> +#ifdef CONFIG_RESET_PHY_R
> +void reset_phy(void)
> +{
> +#ifdef CONFIG_MACB
> + /*
> +  * Initialize ethernet HW addr prior to starting Linux,
> +  * needed for nfsroot
> +  */
> + eth_init(gd->bd);
> +#endif
> +}
> +#endif

You must not initialize the Ethernet interface unless U-Boot is
running a network coimmand. And you should then disable it again
before booting Linux. Please read the FAQ and fix the Linux driver
issues in Linux.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
A weak mind is like a microscope, which magnifies trifling things,
but cannot receive great ones.  -- Philip Earl of Chesterfield
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] Add support for the Calao QIL-A9G20 board

2009-09-22 Thread Wolfgang Denk
Dear Albin Tonnerre,

In message 
<1252688802-29403-1-git-send-email-albin.tonne...@free-electrons.com> you wrote:
> The Calao SBC35-A9G20 board is manufactured and sold by Calao Systems
> . It is built around an AT91SAM9G20 ARM SoC
> running at 400MHz. It features an Ethernet port, an SPI RTC backed by an 
> onboard
> battery , an SD/MMC slot, a CompactFlash slot, 64Mo of SDRAM, 256Mo of NAND
> flash, two USB host ports, and an USB device port. More informations can be
> found at 
> 
> Signed-off-by: Albin Tonnerre 
> ---
>  MAINTAINERS   |2 +
>  MAKEALL   |2 +
>  Makefile  |   10 ++
>  board/calao/qil_a9g20/Makefile|   55 ++
>  board/calao/qil_a9g20/config.mk   |1 +
>  board/calao/qil_a9g20/qil_a9g20.c |  201 
> +
>  board/calao/qil_a9g20/spi.c   |   57 +++
>  include/configs/qil_a9g20.h   |  200 
>  8 files changed, 528 insertions(+), 0 deletions(-)
>  create mode 100644 board/calao/qil_a9g20/Makefile
>  create mode 100644 board/calao/qil_a9g20/config.mk
>  create mode 100644 board/calao/qil_a9g20/qil_a9g20.c
>  create mode 100644 board/calao/qil_a9g20/spi.c
>  create mode 100644 include/configs/qil_a9g20.h
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index e9db278..b1e82f4 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -696,6 +696,8 @@ Andrea Scian 
>  
>  Albin Tonnerre 
>  
> + qil_a9260   ARM926EJS (AT91SAM9260 SoC)
> + qil_a9g20   ARM926EJS (AT91SAM9G20 SoC)
>   sbc35_a9g20 ARM926EJS (AT91SAM9G20 SoC)
>   tny_a9260   ARM926EJS (AT91SAM9260 SoC)
>   tny_a9g20   ARM926EJS (AT91SAM9G20 SoC)

This is a mess.

The Subject mentions adding the QIL-A9G20 board; the commit message
says you were adding the SBC35-A9G20 board (which already exists),
but actually you seem to be adding the QIL-A9G20 and QIL-A9260
boards?

Please make comments and code match.


> diff --git a/MAKEALL b/MAKEALL
> index f0ed8ea..531a667 100755
> --- a/MAKEALL
> +++ b/MAKEALL
> @@ -614,6 +614,8 @@ LIST_at91="   \
>   m501sk  \
>   pm9261  \
>   pm9263  \
> + QIL_A9260   \
> + QIL_A9G20   \
>   SBC35_A9G20 \
>   TNY_A9260   \
>   TNY_A9G20   \

Ditto.

> diff --git a/Makefile b/Makefile
> index 0449a5b..eb542a4 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2897,6 +2897,16 @@ at91sam9g45ekes_config :   unconfig
>  pm9263_config:   unconfig
>   @$(MKCONFIG) $(@:_config=) arm arm926ejs pm9263 ronetix at91
>  
> +QIL_A9G20_NANDFLASH_config \
> +QIL_A9G20_EEPROM_config \
> +QIL_A9G20_config \
> +QIL_A9260_NANDFLASH_config \
> +QIL_A9260_EEPROM_config \
> +QIL_A9260_config :   unconfig
> + @mkdir -p $(obj)include
> + @echo "#define CONFIG_$(@:_config=) 1" >$(obj)include/config.h
> + @$(MKCONFIG) -a qil_a9g20 arm arm926ejs qil_a9g20 calao at91

Ditto.

...
> diff --git a/board/calao/qil_a9g20/qil_a9g20.c 
> b/board/calao/qil_a9g20/qil_a9g20.c
> new file mode 100644
> index 000..38f4cce
> --- /dev/null
> +++ b/board/calao/qil_a9g20/qil_a9g20.c
...
> +int board_init(void)
> +{
> + /* Enable Ctrlc */
> + console_init_f();
> +
> +#ifdef CONFIG_QIL_A9G20
> + gd->bd->bi_arch_number = MACH_TYPE_QIL_A9G20;
> +#else
> + gd->bd->bi_arch_number = MACH_TYPE_QIL_A9260;
> +#endif

Please avoid the #ifdef here; use for example a #define in the board
config file instead.

...
> +#ifdef CONFIG_RESET_PHY_R
> +void reset_phy(void)
> +{
> +#ifdef CONFIG_MACB
> + /*
> +  * Initialize ethernet HW addr prior to starting Linux,
> +  * needed for nfsroot
> +  */
> + eth_init(gd->bd);
> +#endif
> +}
> +#endif

You must not initialize the Ethernet interface unless U-Boot is
running a network coimmand. And you should then disable it again
before booting Linux. Please read the FAQ and fix the Linux driver
issues in Linux.

...
> +/*
> + * Command line configuration.
> + */
> +#include 
> +#undef CONFIG_CMD_BDI
> +#undef CONFIG_CMD_FPGA
> +#undef CONFIG_CMD_IMI
> +#undef CONFIG_CMD_IMLS
> +#undef CONFIG_CMD_LOADS
> +#undef CONFIG_CMD_SOURCE

You are undefining some pretty useful commands here (like bdinfo,
iminfo, source, etc.) Is ther eany special reason for doing this?


...
> +/* USB */
> +#define CONFIG_USB_ATMEL
> +#define CONFIG_USB_OHCI_NEW  1
> +#define CONFIG_DOS_PARTITION 1
> +#define CONFIG_SYS_USB_OHCI_CPU_INIT 1
> +#define CONFIG_SYS_USB_OHCI_REGS_BASE0x0050  /* 
> AT91SAM9260_UHP_BASE */

Line too long. Please fix globally.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groe

Re: [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support

2009-09-22 Thread Wolfgang Denk
Dear Olof Johansson,

In message <20090911204750.ga22...@lixom.net> you wrote:
> Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
> over tftp.
> 
> Based on the omap3 evm code. I added a new highlevel define for Tobi
> to avoid having it dependent on CMD_NET (which would seem backward in
> this case).
> 
> 
> Signed-off-by: Olof Johansson 
> 
> diff --git a/board/overo/overo.c b/board/overo/overo.c
> index dd6d286..4a67360 100644

Please use "git format-patch" / "git send-email" to create and submit
patches. For example, it is always nice to see a file statistics in
the patch.

> --- a/board/overo/overo.h
> +++ b/board/overo/overo.h
> @@ -33,6 +33,8 @@ const omap3_sysinfo sysinfo = {
>  #endif
>  };
>  
> +static void setup_net_chip(void);
> +
>  /*
>   * IEN  - Input Enable
>   * IDIS - Input Disable
> @@ -378,4 +380,42 @@ const omap3_sysinfo sysinfo = {
>   MUX_VAL(CP(SDRC_CKE0),  (IDIS | PTU | EN  | M0)) /*sdrc_cke0*/\
>   MUX_VAL(CP(SDRC_CKE1),  (IDIS | PTU | EN  | M0)) /*sdrc_cke1*/
>  
> +#if defined(CONFIG_OMAP3_OVERO_TOBI)
> +#define MUX_OVERO_TOBI() \
> + MUX_VAL(CP(GPMC_A1),(IDIS | PTU | EN  | M0)) /*GPMC_A1*/\
> + MUX_VAL(CP(GPMC_A2),(IDIS | PTU | EN  | M0)) /*GPMC_A2*/\
> + MUX_VAL(CP(GPMC_A3),(IDIS | PTU | EN  | M0)) /*GPMC_A3*/\
> + MUX_VAL(CP(GPMC_A4),(IDIS | PTU | EN  | M0)) /*GPMC_A4*/\
> + MUX_VAL(CP(GPMC_A5),(IDIS | PTU | EN  | M0)) /*GPMC_A5*/\
> + MUX_VAL(CP(GPMC_A6),(IDIS | PTU | EN  | M0)) /*GPMC_A6*/\
> + MUX_VAL(CP(GPMC_A7),(IDIS | PTU | EN  | M0)) /*GPMC_A7*/\
> + MUX_VAL(CP(GPMC_A8),(IDIS | PTU | EN  | M0)) /*GPMC_A8*/\
> + MUX_VAL(CP(GPMC_A9),(IDIS | PTU | EN  | M0)) /*GPMC_A9*/\
> + MUX_VAL(CP(GPMC_A10),   (IDIS | PTU | EN  | M0)) /*GPMC_A10*/\
> + MUX_VAL(CP(GPMC_D0),(IEN  | PTU | EN  | M0)) /*GPMC_D0*/\
> + MUX_VAL(CP(GPMC_D1),(IEN  | PTU | EN  | M0)) /*GPMC_D1*/\
> + MUX_VAL(CP(GPMC_D2),(IEN  | PTU | EN  | M0)) /*GPMC_D2*/\
> + MUX_VAL(CP(GPMC_D3),(IEN  | PTU | EN  | M0)) /*GPMC_D3*/\
> + MUX_VAL(CP(GPMC_D4),(IEN  | PTU | EN  | M0)) /*GPMC_D4*/\
> + MUX_VAL(CP(GPMC_D5),(IEN  | PTU | EN  | M0)) /*GPMC_D5*/\
> + MUX_VAL(CP(GPMC_D6),(IEN  | PTU | EN  | M0)) /*GPMC_D6*/\
> + MUX_VAL(CP(GPMC_D7),(IEN  | PTU | EN  | M0)) /*GPMC_D7*/\
> + MUX_VAL(CP(GPMC_D8),(IEN  | PTU | EN  | M0)) /*GPMC_D8*/\
> + MUX_VAL(CP(GPMC_D9),(IEN  | PTU | EN  | M0)) /*GPMC_D9*/\
> + MUX_VAL(CP(GPMC_D10),   (IEN  | PTU | EN  | M0)) /*GPMC_D10*/\
> + MUX_VAL(CP(GPMC_D11),   (IEN  | PTU | EN  | M0)) /*GPMC_D11*/\
> + MUX_VAL(CP(GPMC_D12),   (IEN  | PTU | EN  | M0)) /*GPMC_D12*/\
> + MUX_VAL(CP(GPMC_D13),   (IEN  | PTU | EN  | M0)) /*GPMC_D13*/\
> + MUX_VAL(CP(GPMC_D14),   (IEN  | PTU | EN  | M0)) /*GPMC_D14*/\
> + MUX_VAL(CP(GPMC_D15),   (IEN  | PTU | EN  | M0)) /*GPMC_D15*/\
> + MUX_VAL(CP(GPMC_NCS5),  (IDIS | PTU | EN  | M0)) /*GPMC_nCS5*/\
> + MUX_VAL(CP(GPMC_CLK),   (IDIS | PTU | EN  | M0)) /*GPMC_CLK*/\
> + MUX_VAL(CP(GPMC_WAIT2), (IEN  | PTU | EN  | M4)) /*GPIO_64*/\
> +  /* - SMSC911X_NRES*/\
> + MUX_VAL(CP(MCSPI1_CS2), (IEN  | PTU | DIS | M4)) /*GPIO_176 */\
> +  /* - LAN_INTR */\

Please use either no indentatioin at all, or indent by a multiple of
TAB characters.

> diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
> index 07a031b..6616b55 100644
> --- a/include/configs/omap3_overo.h
> +++ b/include/configs/omap3_overo.h
> @@ -28,7 +28,8 @@
>  #define CONFIG_OMAP  1   /* in a TI OMAP core */
>  #define CONFIG_OMAP34XX  1   /* which is a 34XX */
>  #define CONFIG_OMAP3430  1   /* which is in a 3430 */
> -#define CONFIG_OMAP3_OVERO   1   /* working with overo */
> +#define CONFIG_OMAP3_OVERO   1   /* working with overo */
> +//#define CONFIG_OMAP3_OVERO_TOBI1   /* overo mounted on tobi */

Please do not use an C++ comments, and do not add dead code.

> +#if !defined(CONFIG_OMAP3_OVERO_TOBI)
> +#undef CONFIG_CMD_NET/* bootp, tftpboot, rarpboot*/
> +#endif
> +
> +

Only one blank line, please.

> +#endif /* (CONFIG_CMD_NET) */
> +
> +

Ditto.

Best regards,

Wolfgang Denk

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
When some people discover the truth, they just can't  understand  why
everybody isn't eager to hear it.
___

Re: [U-Boot] [PATCH-ARM 4/4] Clean-up of s3c24x0 nand driver

2009-09-22 Thread Wolfgang Denk
Dear Scott Wood,

In message <20090911222349.ga26...@b07421-ec1.am.freescale.net> you wrote:
> On Mon, Sep 07, 2009 at 12:15:22AM +0100, 
> kevin.morf...@fearnside-systems.co.uk wrote:
> > This patch re-formats the arm920t s3c24x0 nand driver in preparation for 
> > changes
> > to add support for the Embest SBC2440-II Board.
> > 
> > The changes are as follows:
> > - re-indent the code using Lindent
> > - make sure register layouts are defined using a C struct
> > - replace the upper-case typedef'ed C struct names with lower case
> > non-typedef'ed ones
> > - make sure registers are accessed using the proper accessor functions
> > - run checkpatch.pl and fix any error reports
> > 
> > It assumes the following patch has been applied first:
> > - [U-Boot][PATCH-ARM] CONFIG_SYS_HZ fix for ARM902T S3C24X0 Boards, 
> > 05/09/2009
> >  - patches 1/4, 2/4 and 3/4 of this series
> 
> Acked-by: Scott Wood 

What does that ACK mean? Who is supposed to apply this patch - the ARM
custodian?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
The moral of the story is: "Don't stop to  tighten  your  shoe  laces
during the Olympics 100m finals".
 - Kevin Jones in 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support

2009-09-22 Thread Wolfgang Denk
Dear "Paulraj, Sandeep",

In message <0554bef07d437848af01b9c9b5f0bc5d92708...@dlee01.ent.ti.com> you 
wrote:
> 
> > Olof Johansson wrote:
> > > Add setup for ethernet on Tobi, allowing kernel/ramdisk to be loaded
> > > over tftp.
> > >
> > > Based on the omap3 evm code. I added a new highlevel define for Tobi
> > > to avoid having it dependent on CMD_NET (which would seem backward in
> > > this case).
> > >
> > > Signed-off-by: Olof Johansson 
> > 
> > Acked-by: Dirk Behme 
> 
> Pushed to u-boot-ti

Sorry, please see my previous review comments. I apologize for the
late review.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Diplomacy is the art of saying "nice doggy" until you can find a rock.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support

2009-09-22 Thread Wolfgang Denk
Dear Olof Johansson,

In message  you wrote:
> 
> Random question on u-boot development process: I see you didn't add  
> your signed-off on the commit. People don't do that when they check in  
> patches to the u-boot trees?

No, we don't do this if we check in an unchanged patch.

Linus does not S-o-b all patches that go into the Linux kernel, or
does he?



Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
"What the scientists have in their briefcases is terrifying."
- Nikita Khrushchev
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support

2009-09-22 Thread Wolfgang Denk
Dear Ben Warren,

In message  you 
wrote:
>
> > I always use 'git am -s', which adds the SOB.   My understanding is that
> maintainers should do this as an indication of approval and help in
> traceability.

Please feel free to do that, but I consider this just adding
line-noise, unless you _really_ express special approval.

Which sense would it make if I added a s-o-b to each and every commit
I'm pulling in from anywhere? 

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Man is the best computer we can put aboard a spacecraft ...  and  the
only one that can be mass produced with unskilled labor.
  - Wernher von Braun
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support

2009-09-22 Thread Wolfgang Denk
Dear "Paulraj, Sandeep",

In message <0554bef07d437848af01b9c9b5f0bc5d91e07...@dlee01.ent.ti.com> you 
wrote:
> 
> > I always use 'git am -s', which adds the SOB.   My understanding is that 
> > maintainers should do this as an indication of approval and help in 
> > traceability.
> 
> OK Thanks. Shall do so henceforth.

Hm. I have to amit that I don't consider this a change to the better.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
No man knows what true happiness is until he gets married.  By  then,
of course, its too late.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] imx51:Add support basic boot code of freescale imx51 bbg board

2009-09-22 Thread Magnus Lilja
Hi

2009/9/22 Fred Fan :
> Hi Magnus Liljia:
>     Thanks for your comments.
>  Best Regards
> Fred
>
> 2009/9/22, Magnus Lilja :
>>
>> Hi
>>
>>
>> I've scanned the patch briefly and have some comments below.
>>
>> gareat...@gmail.com wrote:
>> > diff --git a/MAKEALL b/MAKEALL
>> > index edebaea..ed8c437 100755
>> > --- a/MAKEALL
>> > +++ b/MAKEALL
>> 
>
>
> Does means use new board name?

Heh, no.  just means that I've removed parts of your patch
(those parts which I don't have any comments on). Sorry for the
confusion.

>> > +++ b/board/freescale/imx51/Makefile
>> 
>> Does means use new board name?

The board name should be used instead of the imx51 name.
>> > + mxc_request_iomux(MX51_PIN_UART1_RXD, IOMUX_CONFIG_ALT0);
>> > + mxc_iomux_set_pad(MX51_PIN_UART1_RXD, pad | PAD_CTL_SRE_FAST);
>> > + mxc_request_iomux(MX51_PIN_UART1_TXD, IOMUX_CONFIG_ALT0);
>> > + mxc_iomux_set_pad(MX51_PIN_UART1_TXD, pad | PAD_CTL_SRE_FAST);
>> > + mxc_request_iomux(MX51_PIN_UART1_RTS, IOMUX_CONFIG_ALT0);
>> > + mxc_iomux_set_pad(MX51_PIN_UART1_RTS, pad);
>> > + mxc_request_iomux(MX51_PIN_UART1_CTS, IOMUX_CONFIG_ALT0);
>> > + mxc_iomux_set_pad(MX51_PIN_UART1_CTS, pad);
>> > +}
>> > +
>> > +void setup_nfc(void)
>> > +{
>> > + /* Enable NFC IOMUX */
>> > + mxc_request_iomux(MX51_PIN_NANDF_CS0, IOMUX_CONFIG_ALT0);
>> > + mxc_request_iomux(MX51_PIN_NANDF_CS1, IOMUX_CONFIG_ALT0);
>> > + mxc_request_iomux(MX51_PIN_NANDF_CS2, IOMUX_CONFIG_ALT0);
>> > + mxc_request_iomux(MX51_PIN_NANDF_CS3, IOMUX_CONFIG_ALT0);
>> > + mxc_request_iomux(MX51_PIN_NANDF_CS4, IOMUX_CONFIG_ALT0);
>> > + mxc_request_iomux(MX51_PIN_NANDF_CS5, IOMUX_CONFIG_ALT0);
>> > + mxc_request_iomux(MX51_PIN_NANDF_CS6, IOMUX_CONFIG_ALT0);
>> > + mxc_request_iomux(MX51_PIN_NANDF_CS7, IOMUX_CONFIG_ALT0);
>> > +}
>>
>> Since it's very likely that setup_nfc() and setup_uart() will be used in
>> other i.MX51 boards as well it's a good idea to
>> place these functions in cpu/arm_cortexa8/mx51/devices.c (or something
>> similar).
>> I think it should be board level. Some board based on i.MX51 maybe has
>> differenent choice.

That can  be handed with #ifdef's just like in the i.MX31 case.

<...>
>> > +#define MXC_SRPGC_EMI_SRPGCR (MXC_SRPGC_EMI_BASE + 0x0)
>> > +#define MXC_SRPGC_EMI_PUPSCR (MXC_SRPGC_EMI_BASE + 0x4)
>> > +#define MXC_SRPGC_EMI_PDNSCR (MXC_SRPGC_EMI_BASE + 0x8)
>> > +
>>
>> Are all of the above #defines needed/expected to be needed by U-boot?
>
>   No. It just copy from linux kernel code. Does need remove them?

Don't no what the policy is.
>> > diff --git a/cpu/arm_cortexa8/mx51/interrupts.c
>> > b/cpu/arm_cortexa8/mx51/interrupts.c
>> > new file mode 100644
>> > index 000..c0d70ac
>> > --- /dev/null
>> > +++ b/cpu/arm_cortexa8/mx51/interrupts.c
>> 
>> What's means?

Ignore the  comments.

>> > diff --git a/cpu/arm_cortexa8/mx51/serial.c
>> > b/cpu/arm_cortexa8/mx51/serial.c
>> > new file mode 100644
>> > index 000..580ac13
>> > --- /dev/null
>> > +++ b/cpu/arm_cortexa8/mx51/serial.c
>>
>> I haven't looked in the details of the serial driver, but would it be
>> possible to use drivers/serial/serial_mxc.c
>> instead? It looks very similar.
>> I don't like the implement of this driver. It contains the chip details in
>> driver code.
>>
>> But I will do what as your said. And restructure this driver in another
>> patch.

That sounds like a good idea if you want to improve the serial driver.
Create a separate standalone patch so people can review and test that.

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


Re: [U-Boot] [PATCH] TI: DaVinci: DM355 Leopard board support

2009-09-22 Thread Wolfgang Denk
Dear s-paul...@ti.com,

In message <1252783335-13371-1-git-send-email-s-paul...@ti.com> you wrote:
> From: Sandeep Paulraj 
> 
> This patch adds support for the leopard board which is
> based on the DM355 SOC.
> 
> Signed-off-by: Sandeep Paulraj 
> ---
>  Makefile  |3 +
>  board/davinci/dm355leopard/Makefile   |   52 +
>  board/davinci/dm355leopard/config.mk  |6 +
>  board/davinci/dm355leopard/dm355leopard.c |   84 +++
>  include/configs/davinci_dm355leopard.h|  162 
> +
>  5 files changed, 307 insertions(+), 0 deletions(-)
>  create mode 100644 board/davinci/dm355leopard/Makefile
>  create mode 100644 board/davinci/dm355leopard/config.mk
>  create mode 100644 board/davinci/dm355leopard/dm355leopard.c
>  create mode 100644 include/configs/davinci_dm355leopard.h

Entries to MAINTAINERS and MAKEALL missing.

> diff --git a/Makefile b/Makefile
> index 0449a5b..5a4a109 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2958,6 +2958,9 @@ davinci_dm355evm_config :   unconfig
>  davinci_dm365evm_config :unconfig
>   @$(MKCONFIG) $(@:_config=) arm arm926ejs dm365evm davinci davinci
>  
> +davinci_dm355leopard_config :unconfig
> + @$(MKCONFIG) $(@:_config=) arm arm926ejs dm355leopard davinci davinci
> +

Please keep list sorted.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Our business is run on trust.  We trust you will pay in advance.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] imx51:Add support basic boot code of freescale imx51 bbg board

2009-09-22 Thread Magnus Lilja

Hmm, for some reason "Reply" in gmail cut part of the qouted message so 
here's the rest of the followup.

Fred Fan skrev:
> Hi Magnus Liljia:
> Thanks for your comments.
>  Best Regards
> Fred
> 
> 2009/9/22, Magnus Lilja :
> 
>> Hi
>>
>>
>> I've scanned the patch briefly and have some comments below.
>>
>> gareat...@gmail.com wrote:
>> I don't think everything in this file is needed by U-Boot, e.g. the
>> interrupt definitions.
>> Yes. But interrupt maybe use when interrupt is supportted. Do I need remove
>> the definitions which are not used?

Don't know.

>>> diff --git a/include/configs/imx51.h b/include/configs/imx51.h
>>> new file mode 100644
>>> index 000..f0def4e
>>> --- /dev/null
>>> +++ b/include/configs/imx51.h
>>> @@ -0,0 +1,177 @@
>>> +/*
>>> + * Copyright (C) 2007, Guennadi Liakhovetski 
>>> + *
>>> + * (C) Copyright 2009 Freescale Semiconductor, Inc.
>>> + *
>>> + * Configuration settings for the MX51-3Stack Freescale board.
>>> + *
>>> + * 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 __CONFIG_H
>>> +#define __CONFIG_H
>>> +
>>> +#include 
>>> +
>>> + /* High Level Configuration Options */
>>> +#define CONFIG_ARMV7 1   /* This is armv7 Cortex-A8 CPU core
>> */
>>> +#define CONFIG_L2_OFF
>>> +
>>> +#define CONFIG_MXC   1
>>> +#define CONFIG_MX51_BBG  1   /* in a mx51 */
>> Can't see that this is used anywhere.
>> OK. I will remove them;

Only remove MX51_BBG, I didn't check if CONFIG_MXC is used anywhere.


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


Re: [U-Boot] [PATCH] TI: DaVinci: DM355 Leopard board support

2009-09-22 Thread Wolfgang Denk
Dear "Paulraj, Sandeep",

In message <0554bef07d437848af01b9c9b5f0bc5d929e5...@dlee01.ent.ti.com> you 
wrote:
> 
> > From: Sandeep Paulraj 
> > 
> > This patch adds support for the leopard board which is
> > based on the DM355 SOC.
> > 
> > Signed-off-by: Sandeep Paulraj 
> > ---
> >  Makefile  |3 +
> >  board/davinci/dm355leopard/Makefile   |   52 +
> >  board/davinci/dm355leopard/config.mk  |6 +
> >  board/davinci/dm355leopard/dm355leopard.c |   84 +++
> >  include/configs/davinci_dm355leopard.h|  162
> > +
> >  5 files changed, 307 insertions(+), 0 deletions(-)
> >  create mode 100644 board/davinci/dm355leopard/Makefile
> >  create mode 100644 board/davinci/dm355leopard/config.mk
> >  create mode 100644 board/davinci/dm355leopard/dm355leopard.c
> >  create mode 100644 include/configs/davinci_dm355leopard.h
> 
> Pushed to u-boot-ti

Sorry for the late review - I just requested some changes to this
patch.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Every program has at least one bug and can be shortened by  at  least
one instruction - from which, by induction, one can deduce that every
program can be reduced to one instruction which doesn't work.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] TI: DaVinci: Adding GIO addresses to header file

2009-09-22 Thread Wolfgang Denk
Dear s-paul...@ti.com,

In message <1252783655-13545-1-git-send-email-s-paul...@ti.com> you wrote:
> From: Sandeep Paulraj 
> 
> This patch adds GIO definitions to the hardware.h
> header file
> 
> Signed-off-by: Sandeep Paulraj 

NAK. Please do not add such address lists. Please use C structures to
describe the hardware mapping.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Never call a man a fool.  Borrow from him.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] TI: DaVinci: Adding GIO addresses to header file

2009-09-22 Thread Wolfgang Denk
Dear "Paulraj, Sandeep",

In message <0554bef07d437848af01b9c9b5f0bc5d92854...@dlee01.ent.ti.com> you 
wrote:
> 
> > 
> > From: Sandeep Paulraj 
> > 
> > This patch adds GIO definitions to the hardware.h
> > header file
> > 
> > Signed-off-by: Sandeep Paulraj 
> > ---
> >  include/asm-arm/arch-davinci/hardware.h |   23 +++
> >  1 files changed, 23 insertions(+), 0 deletions(-)
> > 
> Pushed to u-boot-ti

Sorry, I just NAKed that patch.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
It is a good thing for an uneducated man to read books of quotations.
- Sir Winston Churchill _My Early Life_ ch. 9
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] OMAP3 Overo: Fix ethernet related warnings

2009-09-22 Thread Wolfgang Denk
Dear "Paulraj, Sandeep",

In message <0554bef07d437848af01b9c9b5f0bc5d927da...@dlee01.ent.ti.com> you 
wrote:
> 
> 
> > 
> > Fix warning
> > 
> > 'setup_net_chip' declared 'static' but never defined
> > 
> > with CONFIG_OMAP3_OVERO_TOBI disabled and
> > 
> > implicit declaration of function 'smc911x_initialize'
> > 
> > with CONFIG_OMAP3_OVERO_TOBI enabled.
> > 
> > Signed-off-by: Dirk Behme 
> > 
> 
> Pushed to u-boot-ti

I think all these cleanup patches by Dirk should be merged into a
cleaned up version of the Overo patch which is needed anyway due to
my other comments.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
COBOL is for morons. -- E.W. Dijkstra
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support

2009-09-22 Thread Olof Johansson

On Sep 22, 2009, at 2:48 PM, Wolfgang Denk wrote:

> Dear Olof Johansson,
>
> In message  you wrote:
>>
>> Random question on u-boot development process: I see you didn't add
>> your signed-off on the commit. People don't do that when they check  
>> in
>> patches to the u-boot trees?
>
> No, we don't do this if we check in an unchanged patch.
>
> Linus does not S-o-b all patches that go into the Linux kernel, or
> does he?

He does.

For example, see 
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e258b80e691f1f3ae83a60aa80eaf7322bd55ec4



-Olof

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


Re: [U-Boot] [help] is there anything wrong with my previously sent A320 patches?

2009-09-22 Thread Wolfgang Denk
Dear Po-Yu Chuang,

In message  you 
wrote:
> 
> I sent the following patches two weeks ago and got no reply.
> Maybe you did not receive the mails?
> I wonder if there was something wrong with my mail server or if I
> messed up something.
> 
> [U-Boot] [PATCH v6 1/2 resend] arm: A320: driver for FTRTC010 real time clock
> http://lists.denx.de/pipermail/u-boot/2009-September/059753.html
> 
> [U-Boot] [PATCH v6 2/2 resend] arm: A320: Add support for Faraday A320
> evaluation board
> http://lists.denx.de/pipermail/u-boot/2009-September/059755.html
> 
> Please let me know if there is anything wrong.

I cannot find these patches in my archive (even though I see the
archive entries).

Please (rebase and) resend. Sorry for the inconvenience.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Anything that is worth doing at all is worth doing well.
   -- Philip Earl of Chesterfield
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] ppc/85xx: PIO Support for FSL eSDHC Controller Driver

2009-09-22 Thread Wolfgang Denk
Dear Dipen Dudhat,

In message <1252904203-9129-1-git-send-email-dipen.dud...@freescale.com> you 
wrote:
> On some Freescale SoC Internal DMA of eSDHC controller has bug.
> 
> So PIO Mode has introduced to do data transfer using CPU.
> In PIO mode data transfer performance will be degraded by a large extent.
> 
> Note: 
> In PIO mode multiple block read/write requires delay to complete the transfer.
> 
> Signed-off-by: Dipen Dudhat 

My comments to v1 of the patch still apply.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
We do not colonize. We conquer. We rule. There is no  other  way  for
us.
-- Rojan, "By Any Other Name", stardate 4657.5
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] TI: OMAP3: Overo Tobi ethernet support

2009-09-22 Thread Olof Johansson
On Tue, Sep 22, 2009 at 09:41:42PM +0200, Wolfgang Denk wrote:

> Please use "git format-patch" / "git send-email" to create and submit
> patches. For example, it is always nice to see a file statistics in
> the patch.

k.

> > + MUX_VAL(CP(GPMC_CLK), (IDIS | PTU | EN  | M0)) /*GPMC_CLK*/\
> > + MUX_VAL(CP(GPMC_WAIT2),   (IEN  | PTU | EN  | M4)) /*GPIO_64*/\
> > +/* - SMSC911X_NRES*/\
> > + MUX_VAL(CP(MCSPI1_CS2),   (IEN  | PTU | DIS | M4)) /*GPIO_176 */\
> > +/* - LAN_INTR */\
> 
> Please use either no indentatioin at all, or indent by a multiple of
> TAB characters.

So no aligning with spaces at the end of a run of tabs to make them line
up? Ok, if you prefer so.

> > diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h
> > index 07a031b..6616b55 100644
> > --- a/include/configs/omap3_overo.h
> > +++ b/include/configs/omap3_overo.h
> > @@ -28,7 +28,8 @@
> >  #define CONFIG_OMAP1   /* in a TI OMAP core */
> >  #define CONFIG_OMAP34XX1   /* which is a 34XX */
> >  #define CONFIG_OMAP34301   /* which is in a 3430 */
> > -#define CONFIG_OMAP3_OVERO 1   /* working with overo */
> > +#define CONFIG_OMAP3_OVERO 1   /* working with overo */
> > +//#define CONFIG_OMAP3_OVERO_TOBI  1   /* overo mounted on tobi */
> 
> Please do not use an C++ comments, and do not add dead code.

What is the preferred way to show that the option is available but not enabled
by default?

> > +#if !defined(CONFIG_OMAP3_OVERO_TOBI)
> > +#undef CONFIG_CMD_NET  /* bootp, tftpboot, rarpboot*/
> > +#endif
> > +
> > +
> 
> Only one blank line, please.
> 
> > +#endif /* (CONFIG_CMD_NET) */
> > +
> > +
> 
> Ditto.

Sure (on both).

This patch has been applied and pulled though. I'll submit an incremental patch 
to address the above.


-Olof

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


Re: [U-Boot] [PATCH] TI: DaVinci DM365: Enabling net support on DM365

2009-09-22 Thread Wolfgang Denk
Dear s-paul...@ti.com,

In message <1252955798-31840-1-git-send-email-s-paul...@ti.com> you wrote:
> From: Sandeep Paulraj 
> 
> This patch enables EMAC on the DM365 EVM.
> 
> Signed-off-by: Sandeep Paulraj 
> ---
>  board/davinci/dm365evm/dm365evm.c |   38 
> +
>  1 files changed, 38 insertions(+), 0 deletions(-)
...
> + /* Configure PINMUX 3 to enable EMAC pins */
> + writel((readl(PINMUX3) | 0x1a), PINMUX3);
> +
> + /* Configure GPIO20 as output */
> + writel((readl(GIO_DIR01) & 0xffef), GIO_DIR01);

Please use C structs to dsescribe the register layout. Do not use
typeless addresses.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
To know how another being, another creature feels -  that  is  impos-
sible.  - Terry Pratchett, _The Dark Side of the Sun_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] TI: DaVinci DM365: Enabling net support on DM365

2009-09-22 Thread Wolfgang Denk
Dear "Paulraj, Sandeep",

In message <0554bef07d437848af01b9c9b5f0bc5d929e5...@dlee01.ent.ti.com> you 
wrote:
> 
> 
> > From: Sandeep Paulraj 
> > 
> > This patch enables EMAC on the DM365 EVM.
> > 
> > Signed-off-by: Sandeep Paulraj 
> > ---
> >  board/davinci/dm365evm/dm365evm.c |   38
> > +
> >  1 files changed, 38 insertions(+), 0 deletions(-)
> > 
> 
> Pushed to u-boot-ti

Please undo. We want to enable the compiler for strict type checkings
for all accesses to hardware registers, which is impossible with the
use of plain address constants in this code.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Whom the gods would destroy, they first teach BASIC.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] board/linkstation/ide.c: Fix compile warning

2009-09-22 Thread Wolfgang Denk
Dear Guennadi Liakhovetski,

In message  you wrote:
> 
> I have the hardware, yes, and I even have something, that should be a Jtag 
> cable for it... But I don't have near 100% certainty, that if I brick it I 
> will be able in reasonable time to recover it... But, hey, that's what I 
> have that hardware for... So, yes, I would be able to test, just not 
> immediately.

Do you think you can submit this patch before the end of the current
merge window? Otherwise I'd check in my previous clean up patch now,
and then wait for your rework in the next (?) version.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
A modem is a baudy house.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] imx51:Add support basic boot code of freescale imx51 bbg board

2009-09-22 Thread Fred Fan
HI Magnus Lilja:
Best Regards
Fred


2009/9/23, Magnus Lilja :
>
> Hi
>
> 2009/9/22 Fred Fan :
> > Hi Magnus Liljia:
> > Thanks for your comments.
> >  Best Regards
> > Fred
> >
> > 2009/9/22, Magnus Lilja :
> >>
> >> Hi
> >>
> >>
> >> I've scanned the patch briefly and have some comments below.
> >>
> >> gareat...@gmail.com wrote:
> >> > diff --git a/MAKEALL b/MAKEALL
> >> > index edebaea..ed8c437 100755
> >> > --- a/MAKEALL
> >> > +++ b/MAKEALL
> >> 
> >
> >
> > Does means use new board name?
>
> Heh, no.  just means that I've removed parts of your patch
> (those parts which I don't have any comments on). Sorry for the
> confusion.
> OK
> >> > +++ b/board/freescale/imx51/Makefile
> >> 
> >> Does means use new board name?
>
> The board name should be used instead of the imx51 name.

OK

>> > + mxc_request_iomux(MX51_PIN_UART1_RXD, IOMUX_CONFIG_ALT0);
> >> > + mxc_iomux_set_pad(MX51_PIN_UART1_RXD, pad | PAD_CTL_SRE_FAST);
> >> > + mxc_request_iomux(MX51_PIN_UART1_TXD, IOMUX_CONFIG_ALT0);
> >> > + mxc_iomux_set_pad(MX51_PIN_UART1_TXD, pad | PAD_CTL_SRE_FAST);
> >> > + mxc_request_iomux(MX51_PIN_UART1_RTS, IOMUX_CONFIG_ALT0);
> >> > + mxc_iomux_set_pad(MX51_PIN_UART1_RTS, pad);
> >> > + mxc_request_iomux(MX51_PIN_UART1_CTS, IOMUX_CONFIG_ALT0);
> >> > + mxc_iomux_set_pad(MX51_PIN_UART1_CTS, pad);
> >> > +}
> >> > +
> >> > +void setup_nfc(void)
> >> > +{
> >> > + /* Enable NFC IOMUX */
> >> > + mxc_request_iomux(MX51_PIN_NANDF_CS0, IOMUX_CONFIG_ALT0);
> >> > + mxc_request_iomux(MX51_PIN_NANDF_CS1, IOMUX_CONFIG_ALT0);
> >> > + mxc_request_iomux(MX51_PIN_NANDF_CS2, IOMUX_CONFIG_ALT0);
> >> > + mxc_request_iomux(MX51_PIN_NANDF_CS3, IOMUX_CONFIG_ALT0);
> >> > + mxc_request_iomux(MX51_PIN_NANDF_CS4, IOMUX_CONFIG_ALT0);
> >> > + mxc_request_iomux(MX51_PIN_NANDF_CS5, IOMUX_CONFIG_ALT0);
> >> > + mxc_request_iomux(MX51_PIN_NANDF_CS6, IOMUX_CONFIG_ALT0);
> >> > + mxc_request_iomux(MX51_PIN_NANDF_CS7, IOMUX_CONFIG_ALT0);
> >> > +}
> >>
> >> Since it's very likely that setup_nfc() and setup_uart() will be used in
> >> other i.MX51 boards as well it's a good idea to
> >> place these functions in cpu/arm_cortexa8/mx51/devices.c (or something
> >> similar).
> >> I think it should be board level. Some board based on i.MX51 maybe has
> >> differenent choice.
>
> That can  be handed with #ifdef's just like in the i.MX31 case.



> If we do like i.MX31, the code in soc level has the details of board level.

   we should reduce the block of #ifdef.

> <...>
> >> > +#define MXC_SRPGC_EMI_SRPGCR (MXC_SRPGC_EMI_BASE + 0x0)
> >> > +#define MXC_SRPGC_EMI_PUPSCR (MXC_SRPGC_EMI_BASE + 0x4)
> >> > +#define MXC_SRPGC_EMI_PDNSCR (MXC_SRPGC_EMI_BASE + 0x8)
> >> > +
> >>
> >> Are all of the above #defines needed/expected to be needed by U-boot?
> >
> >   No. It just copy from linux kernel code. Does need remove them?
>
> Don't no what the policy is.


we prefer to keep the sync with the file in kernel source code.

>> > diff --git a/cpu/arm_cortexa8/mx51/interrupts.c
> >> > b/cpu/arm_cortexa8/mx51/interrupts.c
> >> > new file mode 100644
> >> > index 000..c0d70ac
> >> > --- /dev/null
> >> > +++ b/cpu/arm_cortexa8/mx51/interrupts.c
> >> 
> >> What's means?
>
> Ignore the  comments.
>
> >> > diff --git a/cpu/arm_cortexa8/mx51/serial.c
> >> > b/cpu/arm_cortexa8/mx51/serial.c
> >> > new file mode 100644
> >> > index 000..580ac13
> >> > --- /dev/null
> >> > +++ b/cpu/arm_cortexa8/mx51/serial.c
> >>
> >> I haven't looked in the details of the serial driver, but would it be
> >> possible to use drivers/serial/serial_mxc.c
> >> instead? It looks very similar.
> >> I don't like the implement of this driver. It contains the chip details
> in
> >> driver code.
> >>
> >> But I will do what as your said. And restructure this driver in another
> >> patch.
>
> That sounds like a good idea if you want to improve the serial driver.
> Create a separate standalone patch so people can review and test that.
>
> Regards, Magnus
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] imx51:Add support basic boot code of freescale imx51 bbg board

2009-09-22 Thread Fred Fan
HI Magnus Lilja:
 Best Regards
Fred

2009/9/23, Magnus Lilja :
>
>
> Hmm, for some reason "Reply" in gmail cut part of the qouted message so
> here's the rest of the followup.
>
> Fred Fan skrev:
> > Hi Magnus Liljia:
> > Thanks for your comments.
> >  Best Regards
> > Fred
> >
> > 2009/9/22, Magnus Lilja :
> >
> >> Hi
> >>
> >>
> >> I've scanned the patch briefly and have some comments below.
> >>
> >> gareat...@gmail.com wrote:
> >> I don't think everything in this file is needed by U-Boot, e.g. the
> >> interrupt definitions.
> >> Yes. But interrupt maybe use when interrupt is supportted. Do I need
> remove
> >> the definitions which are not used?
>
> Don't know.
> We have plan to support interrupt in furture.

>>> diff --git a/include/configs/imx51.h b/include/configs/imx51.h
> >>> new file mode 100644
> >>> index 000..f0def4e
> >>> --- /dev/null
> >>> +++ b/include/configs/imx51.h
> >>> @@ -0,0 +1,177 @@
> >>> +/*
> >>> + * Copyright (C) 2007, Guennadi Liakhovetski 
> >>> + *
> >>> + * (C) Copyright 2009 Freescale Semiconductor, Inc.
> >>> + *
> >>> + * Configuration settings for the MX51-3Stack Freescale board.
> >>> + *
> >>> + * 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 __CONFIG_H
> >>> +#define __CONFIG_H
> >>> +
> >>> +#include 
> >>> +
> >>> + /* High Level Configuration Options */
> >>> +#define CONFIG_ARMV7 1   /* This is armv7 Cortex-A8 CPU
> core
> >> */
> >>> +#define CONFIG_L2_OFF
> >>> +
> >>> +#define CONFIG_MXC   1
> >>> +#define CONFIG_MX51_BBG  1   /* in a mx51 */
> >> Can't see that this is used anywhere.
> >> OK. I will remove them;
>
> Only remove MX51_BBG, I didn't check if CONFIG_MXC is used anywhere.
> OK.
>
> Regards, Magnus
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCHv5 2/2] mucmc52, uc101: delete a...@3a00 node, if no CF card is detected

2009-09-22 Thread Wolfgang Denk
Dear Heiko Schocher,

In message <4aaf1fe4.9050...@denx.de> you wrote:
> U-Boot can detect if an IDE device is present or not.
> If not, and this new config option is activated, U-Boot
> removes the ATA node from the DTS before booting Linux,
> so the Linux IDE driver does not probe the device and
> crash. This is needed for buggy hardware (uc101) where
> no pull down resistor is connected to the signal IDE5V_DD7.
> 
> Signed-off-by: Heiko Schocher 

Seems this patch depends on other patches, that add support for the
manroland boards, which have not been accepted yet. I think I'm
waiting for a resubmit from you?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
ATTENTION: Despite Any Other Listing of Product Contents Found  Here-
on, the Consumer is Advised That, in Actuality, This Product Consists
Of 99.99% Empty Space.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 2/2 v2] Blackfin: tweak embedded env config option

2009-09-22 Thread Wolfgang Denk
Dear Mike Frysinger,

In message <200909151736.52720.vap...@gentoo.org> you wrote:
>
> > ...
> > >  $(obj)u-boot.ldr:$(obj)u-boot
> > > - $(obj)tools/envcrc --binary > $(obj)env-ldr.o
> > > + $(CREATE_LDR_ENV)
> > >   $(LDR) -T $(CONFIG_BFIN_CPU) -c $@ $< $(LDR_FLAGS)
> > 
> > This is all BF specific stuff, right? Maybe we should move this into
> > some BF Makefile, then, instead of adding more and more references to
> > magic variables that have no meaning anywhere except for BF.
>
> if you're talking about the %.ldr target, then yes, it is only for Blackfin 
> systems.  it isnt the only target-specific top level which is why it's there 
> now, but that doesnt mean it has to stay there (as well as the other cruft).  
> ive already looked at moving this to the Blackfin specific config.mk, but it 
> would require adding dummy "all" targets early on in the top level Makefile 
> and one or two subdir Makefiles.  i didnt feel like dealing with people 
> complaining about this.  although if we created a new lib_$(ARCH)/targets.mk, 
> we could push all arch-specific crap there (like all the boards config 
> targets), and only the top level Makefile would include it.

I'm not asking for a general Makefile rework. But maybe we can move
this code to some BF Makefile?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
"A child is a person who can't understand why someone would give away
a perfectly good kitten."   - Doug Larson
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] env: only build env_embedded and envcrc when needed

2009-09-22 Thread Wolfgang Denk
Dear Mike Frysinger,

In message <200909151739.11704.vap...@gentoo.org> you wrote:
>
> > > i saw it as "custom embedding of the environment".  the only thing it
> > > does is enable the envcrc binary.  i thought of using "CONFIG_ENVCRC",
> > > but it seemed a little too short.
> > 
> > CONFIG_ENABLE_ENVCRC ?   CONFIG_BUILD_ENVCRC ?
>
> the name doesnt really matter to me.  if you're fine with 
> CONFIG_BUILD_ENVCRC, 
> i'll use that in common code and keep the CONFIG_ENV_IS_EMBEDDED_CUSTOM in 
> the 
> Blackfin specific code.

CONFIG_BUILD_ENVCRC is fine with me (and I'd rather see if you got rid
of this unwieldy CONFIG_ENV_IS_EMBEDDED_CUSTOM thingy).

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Leave bigotry in your quarters; there's no room for it on the bridge.
-- Kirk, "Balance of Terror", stardate 1709.2
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mpc512x. Micron nand flash needs a reset before a read command is issued.

2009-09-22 Thread Wolfgang Denk
Dear Paul Gibson,

In message <26b052040909151705r35cdb874gbbe5a184d20e4...@mail.gmail.com> you 
wrote:
> Micron nand flash needs a reset before a read command is issued.
> The current mpc5121_nfc driver ignores the reset command.
> 
> ---
>  drivers/mtd/nand/mpc5121_nfc.c |1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)

Applied, after fixing the line wrapping added by your mailer.

Please use "git send-email" to submit patches, which avoid this (and
other) problem(s).

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Hegel was right when he said that we learn from history that man  can
never learn anything from history.  - George Bernard Shaw
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] smc91111_eeprom: get working with net multi conversion

2009-09-22 Thread Wolfgang Denk
Dear Mike Frysinger,

In message <1253068647-29134-1-git-send-email-vap...@gentoo.org> you wrote:
> This should be squashed into the pending:
>   Convert SMC9 Ethernet driver to CONFIG_NET_MULTI API
> 
> The changes to the eeprom were incomplete, and the new version needs
> slightly different handling on the BF533 boards that share flash.
> 
> Signed-off-by: Mike Frysinger 

Then better send a v2 patch which includes this stuff.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
You can love it, change it, or leave it.There is NO other option.
But do not complain - it is your own choice...  -- wd
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] board/linkstation/ide.c: Fix compile warning

2009-09-22 Thread Guennadi Liakhovetski
On Tue, 22 Sep 2009, Wolfgang Denk wrote:

> Dear Guennadi Liakhovetski,
> 
> In message  you wrote:
> > 
> > I have the hardware, yes, and I even have something, that should be a Jtag 
> > cable for it... But I don't have near 100% certainty, that if I brick it I 
> > will be able in reasonable time to recover it... But, hey, that's what I 
> > have that hardware for... So, yes, I would be able to test, just not 
> > immediately.
> 
> Do you think you can submit this patch before the end of the current
> merge window? Otherwise I'd check in my previous clean up patch now,
> and then wait for your rework in the next (?) version.

don't think so, very unlikely I'll have time for this in the next month.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] mpc512x. Micron nand flash needs a reset before a read command is issued

2009-09-22 Thread Wolfgang Denk
Dear Paul Gibson,

In message <26b052040909152126q55945d47yad3bcf90334ac...@mail.gmail.com> you 
wrote:
> Micron nand flash needs a reset before a read command is issued.
> The current mpc5121_nfc driver ignores the reset command.
> 
> Signed-off-by: Paul Gibson 
> 
> ---
>  drivers/mtd/nand/mpc5121_nfc.c |1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)

Why did you resend this? I don't notice any changes, there is not "v2"
indication or comments aboyt changes either. So what am I supposed to
do with that?

And the patch is line-wrapped like the first posting. Please *fix*
that.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
America has been discovered before, but it has always been hushed up.
- Oscar Wilde
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] SPARC standalone app fix

2009-09-22 Thread Wolfgang Denk
Dear Daniel Hellstrom,

In message <4ab35893.4000...@gaisler.com> you wrote:
> 
> Thank you for your work. I have updated the sparc repository with your
> patch. And, yes, you are probably the first one to use the standalone
> app feature :)

Um... Please put this patch on hold. 

We need Sergey's Signed-off-by: line first!

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
panic: kernel trap (ignored)
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] smc91111_eeprom: get working with net multi conversion

2009-09-22 Thread Ben Warren
Wolfgang Denk wrote:
> Dear Mike Frysinger,
>
> In message <1253068647-29134-1-git-send-email-vap...@gentoo.org> you wrote:
>   
>> This should be squashed into the pending:
>>  Convert SMC9 Ethernet driver to CONFIG_NET_MULTI API
>>
>> The changes to the eeprom were incomplete, and the new version needs
>> slightly different handling on the BF533 boards that share flash.
>>
>> Signed-off-by: Mike Frysinger 
>> 
>
> Then better send a v2 patch which includes this stuff.
>
>   
I think he was commenting that my SMC9 patch was incomplete and this 
fixes it, but may be wrong (it happens from time to time :).

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


Re: [U-Boot] [PATCH 1/3] fsl_i2c: Wait for STOP condition to propagate

2009-09-22 Thread Wolfgang Denk
Dear Joakim Tjernlund,

In message <1253178437-32398-1-git-send-email-joakim.tjernl...@transmode.se> 
you wrote:
> After issuing a STOP one must wait until the STOP has completed
> on the bus before doing something new to the controller.
> 
> Also add an extra read of SR as the manual mentions doing that
> is a good idea.
> 
> Remove surplus write of CR just before a write, isn't required and
> could potentially disturb the I2C bus.
> 
> Signed-off-by: Joakim Tjernlund 
> ---
>  drivers/i2c/fsl_i2c.c |   12 
>  1 files changed, 8 insertions(+), 4 deletions(-)

Could you _please_ start adding some version information to your
patches, and a list of changes between the versions?

Thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Crash programs fail because they are based on the theory  that,  with
nine women pregnant, you can get a baby a month.  - Wernher von Braun
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2] Remove deprecated 'autoscr' command/variables

2009-09-22 Thread Wolfgang Denk
Dear Peter Tyser,

In message <1253155091-6576-1-git-send-email-pty...@xes-inc.com> you wrote:
> The more standard 'source' command provides identical functionality to
> the autoscr command.
> 
> Environment variable names/values on the MVBC_P, MVBML7, kmeter1,
> mgcoge, and km8xx boards are updated to no longer refernce 'autoscr'.
> 
> The 'autoscript' and 'autoscript_uname' environment variables are
> also removed.
> 
> Signed-off-by: Peter Tyser 
> ---
> Changes since v1:
> - Removed all references to autoscript and autoscript_uname, previously
>   just the autoscr command was removed.
> 
>  README   |8 
>  board/LEOX/elpt860/README.LEOX   |2 +-
>  board/matrix_vision/mvbc_p/mvbc_p_autoscript |4 ++--
>  board/matrix_vision/mvblm7/mvblm7_autoscript |4 ++--
>  board/musenki/README |2 +-
>  board/pn62/cmd_pn62.c|   18 --
>  common/cmd_load.c|   18 --
>  common/cmd_net.c |   15 ---
>  common/cmd_source.c  |   18 --
>  doc/README.IPHASE4539|2 +-
>  doc/README.m52277evb |2 +-
>  doc/README.m5373evb  |2 +-
>  doc/README.m54455evb |2 +-
>  doc/README.m5475evb  |2 +-
>  doc/feature-removal-schedule.txt |   19 ---
>  include/configs/MVBC_P.h |   14 +++---
>  include/configs/MVBLM7.h |   14 +++---
>  include/configs/keymile-common.h |6 +++---
>  18 files changed, 28 insertions(+), 124 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
Hi there! This is just a note from me, to you, to tell you, the  per-
son  reading this note, that I can't think up any more famous quotes,
jokes, nor bizarre stories, so you may as well go home.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


  1   2   >