Re: [U-Boot] [PATCH] punt unused clean/distclean targets

2011-09-18 Thread Wolfgang Denk
Dear Mike Frysinger,

In message 1316323020-4027-1-git-send-email-vap...@gentoo.org you wrote:
 The top level Makefile does not do any recursion into subdirs when
 cleaning, so these clean/distclean targets in random arch/board dirs
 never get used.  Punt them all.

I think this is the wrong approach.  Would it not be better to get rid
of the 60 lines of clean/clobber target in the top level Makefile,
including it's brute force methods of find ... | xargs rm -f and
actually remove the files from the Makefiles in the respective
directories instead?

This would for example allow that a board maintainer can fix the clean
/ clobber rules for his code without having to edit the top level
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
What is wanted is not the will to believe, but the will to find out,
which is the exact opposite. - Bertrand Russell, _Sceptical_Essays_,
1928
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/5 v1] integrator: pass configs for core modules

2011-09-18 Thread Linus Walleij
Alter the board.cfg to pass core module configuration flags
so we can make compile-time switches for different core
modules. These are already in use for some low-level code,
they just got lost in the conversion to the new build
system.

Signed-off-by: Linus Walleij linus.wall...@linaro.org
---
 boards.cfg |   16 
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/boards.cfg b/boards.cfg
index 8a5bfc1..46e08e8 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -35,16 +35,16 @@
 # Target ARCHCPU Board name  
VendorSoC Options
 
###
 
-integratorcp_cm1136  arm arm1136 integrator  
armltd -   integratorcp
+integratorcp_cm1136  arm arm1136 integrator  
armltd -   integratorcp:CM1136
 qong arm arm1136 -   
davedenx   mx31
 mx31ads  arm arm1136 -   
freescale  mx31
 imx31_litekitarm arm1136 -   
logicpdmx31
 mx35pdk  arm arm1136 -   
freescale  mx35
 omap2420h4   arm arm1136 -   ti
 omap24xx
 tnetv107x_evmarm arm1176 tnetv107xevmti
 tnetv107x
-integratorap_cm720t  arm arm720t integrator  
armltd -   integratorap
-integratorap_cm920t  arm arm920t integrator  
armltd -   integratorap
-integratorcp_cm920t  arm arm920t integrator  
armltd -   integratorcp
+integratorap_cm720t  arm arm720t integrator  
armltd -   integratorap:CM720T
+integratorap_cm920t  arm arm920t integrator  
armltd -   integratorap:CM920T
+integratorcp_cm920t  arm arm920t integrator  
armltd -   integratorcp:CM920T
 a320evb  arm arm920t -   
faradaya320
 at91rm9200ek arm arm920t at91rm9200ekatmel 
 at91at91rm9200ek
 at91rm9200ek_ram arm arm920t at91rm9200ekatmel 
 at91at91rm9200ek:RAMBOOT
@@ -58,8 +58,8 @@ cm41xx   arm arm920t -
   -
 VCMA9arm arm920t vcma9   mpl   
 s3c24x0
 smdk2410 arm arm920t -   
samsungs3c24x0
 omap1510inn  arm arm925t -   ti
-integratorap_cm926ejsarm arm926ejs   integrator  
armltd -   integratorap
-integratorcp_cm926ejsarm arm926ejs   integrator  
armltd -   integratorcp
+integratorap_cm926ejsarm arm926ejs   integrator  
armltd -   integratorap:CM926EJ_S
+integratorcp_cm926ejsarm arm926ejs   integrator  
armltd -   integratorcp:CM924EJ_S
 versatileqemuarm arm926ejs   versatile   
armltd versatile   versatile:ARCH_VERSATILE_QEMU,ARCH_VERSATILE_PB
 versatilepb  arm arm926ejs   versatile   
armltd versatile   versatile:ARCH_VERSATILE_PB
 versatileab  arm arm926ejs   versatile   
armltd versatile   versatile:ARCH_VERSATILE_AB
@@ -152,8 +152,8 @@ nhk8815_onenand  arm arm926ejs   
nhk8815 st
 omap5912osk  arm arm926ejs   -   ti
 omap
 edminiv2 arm arm926ejs   -   LaCie 
 orion5x
 dkb arm arm926ejs   -   
Marvellpantheon
-integratorap_cm946es arm arm946esintegrator  
armltd -   integratorap
-integratorcp_cm946es arm arm946esintegrator  
armltd -   integratorcp
+integratorap_cm946es arm arm946esintegrator  
armltd -   integratorap:CM946ES
+integratorcp_cm946es arm arm946esintegrator  
armltd -   integratorcp:CM946ES
 ca9x4_ct_vxp arm armv7   vexpressarmltd
 efikamx  arm armv7   efikamx - 
 mx5efikamx:IMX_CONFIG=board/efikamx/imximage.cfg
 mx51evk  arm

[U-Boot] [PATCH 2/5 v1] integrator: move text offset to config

2011-09-18 Thread Linus Walleij
Do away with the config.mk file and move the text offset to the
config files to make things easier.

Signed-off-by: Linus Walleij linus.wall...@linaro.org
---
 board/armltd/integrator/config.mk |5 -
 include/configs/integratorap.h|1 +
 include/configs/integratorcp.h|1 +
 3 files changed, 2 insertions(+), 5 deletions(-)
 delete mode 100644 board/armltd/integrator/config.mk

diff --git a/board/armltd/integrator/config.mk 
b/board/armltd/integrator/config.mk
deleted file mode 100644
index 8b57af1..000
--- a/board/armltd/integrator/config.mk
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-# image should be loaded at 0x0100
-#
-
-CONFIG_SYS_TEXT_BASE = 0x0100
diff --git a/include/configs/integratorap.h b/include/configs/integratorap.h
index 3b983af..ec6521f 100644
--- a/include/configs/integratorap.h
+++ b/include/configs/integratorap.h
@@ -37,6 +37,7 @@
  * High Level Configuration Options
  * (easy to change)
  */
+#define CONFIG_SYS_TEXT_BASE   0x0100
 #define CONFIG_SYS_MEMTEST_START   0x10
 #define CONFIG_SYS_MEMTEST_END 0x1000
 #define CONFIG_SYS_HZ  1000
diff --git a/include/configs/integratorcp.h b/include/configs/integratorcp.h
index e9b68c6..41868a6 100644
--- a/include/configs/integratorcp.h
+++ b/include/configs/integratorcp.h
@@ -37,6 +37,7 @@
  * High Level Configuration Options
  * (easy to change)
  */
+#define CONFIG_SYS_TEXT_BASE   0x0100
 #define CONFIG_SYS_MEMTEST_START   0x10
 #define CONFIG_SYS_MEMTEST_END 0x1000
 #define CONFIG_SYS_HZ  1000
-- 
1.7.6

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


[U-Boot] [PATCH 3/5 v1] integrator: do not test first part of the memory

2011-09-18 Thread Linus Walleij
When booting from Flash, the Integrator remaps its flash memory
from 0x2400 to 0x, and starts executing it at
0x. This ROM thus hides the RAM underneath and first
0x4 bytes of the memory cannot be tested by get_ram_size().
So let's test from 0x4 to the end of detected memory
instead.

Signed-off-by: Linus Walleij linus.wall...@linaro.org
---
 board/armltd/integrator/integrator.c |   19 +++
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/board/armltd/integrator/integrator.c 
b/board/armltd/integrator/integrator.c
index c8d2bc7..83f047c 100644
--- a/board/armltd/integrator/integrator.c
+++ b/board/armltd/integrator/integrator.c
@@ -86,6 +86,15 @@ int misc_init_r (void)
return (0);
 }
 
+/*
+ * The Integrator remaps the Flash memory to 0x and executes U-Boot
+ * from there, which means we cannot test the RAM underneath the ROM at this
+ * point. It will be unmapped later on, when we are executing from the
+ * relocated in RAM U-Boot. We simply assume that this RAM is usable if the
+ * RAM on higher addresses works fine.
+ */
+#define REMAPPED_FLASH_SZ 0x4
+
 int dram_init (void)
 {
gd-bd-bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
@@ -111,15 +120,17 @@ extern void dram_query(void);
 *
 */
sdram_shift  = ((cm_reg_sdram  0x001C)/4)%4;
-   gd-bd-bi_dram[0].size  = 0x0100  sdram_shift;
-   gd-ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
+   gd-ram_size = get_ram_size((long *) CONFIG_SYS_SDRAM_BASE +
+   REMAPPED_FLASH_SZ,
0x0100  sdram_shift);
}
 #else
-   gd-bd-bi_dram[0].size = PHYS_SDRAM_1_SIZE;
-   gd-ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
+   gd-ram_size = get_ram_size((long *) CONFIG_SYS_SDRAM_BASE +
+   REMAPPED_FLASH_SZ,
PHYS_SDRAM_1_SIZE);
 #endif /* CM_SPD_DETECT */
+   /* We only have one bank of RAM, set it to whatever was detected */
+   gd-bd-bi_dram[0].size  = gd-ram_size;
 
return 0;
 }
-- 
1.7.6

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


[U-Boot] [PATCH 4/5 v1] integrator: use io-accessors for board init

2011-09-18 Thread Linus Walleij
Casting around to *(volatile ulong *) doesn't look good, so include
the asm/io.h macros and use good old readl() instead.

Signed-off-by: Linus Walleij linus.wall...@linaro.org
---
 board/armltd/integrator/integrator.c |9 +
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/board/armltd/integrator/integrator.c 
b/board/armltd/integrator/integrator.c
index 83f047c..780218c 100644
--- a/board/armltd/integrator/integrator.c
+++ b/board/armltd/integrator/integrator.c
@@ -35,6 +35,7 @@
 
 #include common.h
 #include netdev.h
+#include asm/io.h
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -101,15 +102,15 @@ int dram_init (void)
 #ifdef CONFIG_CM_SPD_DETECT
{
 extern void dram_query(void);
-   unsigned long cm_reg_sdram;
-   unsigned long sdram_shift;
+   u32 cm_reg_sdram;
+   u32 sdram_shift;
 
dram_query();   /* Assembler accesses to CM registers */
/* Queries the SPD values */
 
/* Obtain the SDRAM size from the CM SDRAM register */
 
-   cm_reg_sdram = *(volatile ulong *)(CM_BASE + OS_SDRAM);
+   cm_reg_sdram = readl(CM_BASE + OS_SDRAM);
/*   Register SDRAM size
 *
 *   0xXXbbb000bb16 MB
@@ -119,7 +120,7 @@ extern void dram_query(void);
 *   0xXXbbb100bb   256 MB
 *
 */
-   sdram_shift  = ((cm_reg_sdram  0x001C)/4)%4;
+   sdram_shift = ((cm_reg_sdram  0x001C)/4)%4;
gd-ram_size = get_ram_size((long *) CONFIG_SYS_SDRAM_BASE +
REMAPPED_FLASH_SZ,
0x0100  sdram_shift);
-- 
1.7.6

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


[U-Boot] [PATCH 5/5 v1] integrator: make flash writeable on boot

2011-09-18 Thread Linus Walleij
This reconfigures the EBI (External Bus Interface) on the
integrator so that chip select 1, handling the flash memory, is
set to writeable. Without this it is not possible for U-Boot to
access flash memory and it crashes on startup since CFI won't
work properly.

Since this is the first time we use the EBI, we create a header
file for its registers.

Signed-off-by: Linus Walleij linus.wall...@linaro.org
---
 board/armltd/integrator/integrator.c |   15 
 include/arm-ebi.h|   62 ++
 2 files changed, 77 insertions(+), 0 deletions(-)
 create mode 100644 include/arm-ebi.h

diff --git a/board/armltd/integrator/integrator.c 
b/board/armltd/integrator/integrator.c
index 780218c..44e69f1 100644
--- a/board/armltd/integrator/integrator.c
+++ b/board/armltd/integrator/integrator.c
@@ -35,6 +35,7 @@
 
 #include common.h
 #include netdev.h
+#include arm-ebi.h
 #include asm/io.h
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -56,6 +57,8 @@ void show_boot_progress(int progress)
 
 int board_init (void)
 {
+   u32 val;
+
/* arch number of Integrator Board */
 #ifdef CONFIG_ARCH_CINTEGRATOR
gd-bd-bi_arch_number = MACH_TYPE_CINTEGRATOR;
@@ -73,6 +76,18 @@ extern void cm_remap(void);
cm_remap(); /* remaps writeable memory to 0x */
 #endif
 
+   /*
+* The system comes up with the flash memory non-writable and
+* configuration locked. If we want U-Boot to be used for flash
+* access we cannot have the flash memory locked.
+*/
+   writel(EBI_UNLOCK_MAGIC, EBI_BASE + EBI_LOCK_REG);
+   val = readl(EBI_BASE + EBI_CSR1_REG);
+   val = EBI_CSR_WREN_MASK;
+   val |= EBI_CSR_WREN_ENABLE;
+   writel(val, EBI_BASE + EBI_CSR1_REG);
+   writel(0, EBI_BASE + EBI_LOCK_REG);
+
icache_enable ();
 
return 0;
diff --git a/include/arm-ebi.h b/include/arm-ebi.h
new file mode 100644
index 000..2d85e3f
--- /dev/null
+++ b/include/arm-ebi.h
@@ -0,0 +1,62 @@
+/*
+ * (C) Copyright 2011
+ * Linaro
+ * Linus Walleij linus.wall...@linaro.org
+ * Register definitions for the External Bus Interface (EBI)
+ * found in the ARM Integrator AP and CP reference designs
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#ifndef __ARM_EBI_H
+#define __ARM_EBI_H
+
+#define EBI_BASE   0x1200
+
+#define EBI_CSR0_REG   0x00 /* CS0 = Boot ROM */
+#define EBI_CSR1_REG   0x04 /* CS1 = Flash */
+#define EBI_CSR2_REG   0x08 /* CS2 = SSRAM */
+#define EBI_CSR3_REG   0x0C /* CS3 = Expansion memory */
+/*
+ * The four upper bits are the waitstates for each chip select
+ * 0x00 = 2 cycles, 0x10 = 3 cycles, ... 0xe0 = 16 cycles, 0xf0 = 16 cycles
+ */
+#define EBI_CSR_WAIT_MASK  0xF0
+/* Whether memory is synchronous or asynchronous */
+#define EBI_CSR_SYNC_MASK  0xF7
+#define EBI_CSR_ASYNC  0x00
+#define EBI_CSR_SYNC   0x08
+/* Whether memory is write enabled or not */
+#define EBI_CSR_WREN_MASK  0xFB
+#define EBI_CSR_WREN_DISABLE   0x00
+#define EBI_CSR_WREN_ENABLE0x04
+/* Memory bit width for each chip select */
+#define EBI_CSR_MEMSIZE_MASK   0xFC
+#define EBI_CSR_MEMSIZE_8BIT   0x00
+#define EBI_CSR_MEMSIZE_16BIT  0x01
+#define EBI_CSR_MEMSIZE_32BIT  0x02
+
+/*
+ * The lock register need to be written with 0xa05f before anything in the
+ * EBI can be changed.
+ */
+#define EBI_LOCK_REG   0x20
+#define EBI_UNLOCK_MAGIC   0xA05F
+
+#endif
-- 
1.7.6

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


Re: [U-Boot] [PATCH] punt unused clean/distclean targets

2011-09-18 Thread Mike Frysinger
On Sunday, September 18, 2011 03:26:38 Wolfgang Denk wrote:
 Mike Frysinger wrote:
  The top level Makefile does not do any recursion into subdirs when
  cleaning, so these clean/distclean targets in random arch/board dirs
  never get used.  Punt them all.
 
 I think this is the wrong approach.  Would it not be better to get rid
 of the 60 lines of clean/clobber target in the top level Makefile,
 including it's brute force methods of find ... | xargs rm -f and
 actually remove the files from the Makefiles in the respective
 directories instead?
 
 This would for example allow that a board maintainer can fix the clean
 / clobber rules for his code without having to edit the top level
 Makefile.

yes  no.  i think we should have 1 clean/distclean target, but also have a 
way for board maintainers to inject their own custom clean files.  preferably 
via a .mk file in their board subdir.  this is moving in the direction of non-
recursive make like the kernel does -- the top level would source all the 
subfiles to figure out the master clean list.

however, the current build system has one advantage which i think we should 
retain in the short term: `make distclean` always cleans out the targets 
regardless of the current config.  for example, if you do `make bf537-stamp` 
followed by `make harmony` followed by `make distclean`, Blackfin-specific 
objects will still get cleaned out.
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 5/5 v1] integrator: make flash writeable on boot

2011-09-18 Thread Mike Frysinger
On Sunday, September 18, 2011 03:52:58 Linus Walleij wrote:
  board/armltd/integrator/integrator.c |   15 
  include/arm-ebi.h|   62
 ++ 2 files changed, 77 insertions(+), 0
 deletions(-)
  create mode 100644 include/arm-ebi.h

if the integrator board is the only one that cares about this header, then 
it's probably best to keep it in the board-specific dir rather than include/
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 5/5 v1] integrator: make flash writeable on boot

2011-09-18 Thread Albert ARIBAUD
Hi Linus,

Le 18/09/2011 09:52, Linus Walleij a écrit :
 This reconfigures the EBI (External Bus Interface) on the
 integrator so that chip select 1, handling the flash memory, is
 set to writeable. Without this it is not possible for U-Boot to
 access flash memory and it crashes on startup since CFI won't
 work properly.

Do you mean that U-Boot writes to the flash at each boot on this board?

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


Re: [U-Boot] [PATCH] punt unused clean/distclean targets

2011-09-18 Thread Graeme Russ
On 18/09/11 18:22, Mike Frysinger wrote:
 On Sunday, September 18, 2011 03:26:38 Wolfgang Denk wrote:
 Mike Frysinger wrote:
 The top level Makefile does not do any recursion into subdirs when
 cleaning, so these clean/distclean targets in random arch/board dirs
 never get used.  Punt them all.

 I think this is the wrong approach.  Would it not be better to get rid
 of the 60 lines of clean/clobber target in the top level Makefile,
 including it's brute force methods of find ... | xargs rm -f and
 actually remove the files from the Makefiles in the respective
 directories instead?

 This would for example allow that a board maintainer can fix the clean
 / clobber rules for his code without having to edit the top level
 Makefile.
 
 yes  no.  i think we should have 1 clean/distclean target, but also have a 
 way for board maintainers to inject their own custom clean files.  preferably 
 via a .mk file in their board subdir.  this is moving in the direction of non-
 recursive make like the kernel does -- the top level would source all the 
 subfiles to figure out the master clean list.
 
 however, the current build system has one advantage which i think we should 
 retain in the short term: `make distclean` always cleans out the targets 
 regardless of the current config.  for example, if you do `make bf537-stamp` 
 followed by `make harmony` followed by `make distclean`, Blackfin-specific 
 objects will still get cleaned out.

Can we not have make distclean/mrproper traverse ALL arch/SoC/board
directories and call their distclean/mrproper? Or have distclean/mrproper
read the .mk file for all arch/SoC/board directories?

Sure, it would be a little slower, but IMHO one would expect a speed
penalty from distclean/mrproper

I think that over the course of the next few releases, we will see more and
more granulation of the code - more distinct boundaries put in place around
'arches', 'SoCs', 'boards', etc - making each less dependent on each other.
My nirvana is for the ability to create an entirely new
arch/SoC/board/driver/lib/whatever and have bare minimal (ideally zero)
impact on anyone else.

I mean, it irks me to no end that /common/serial.c, /drivers/serial.c and
/include/serial.h are such an ugly mess of #ifdef's - I'm working on a new
SoC at the moment, and it just plain weird that I have to touch these :(

Regards,

Graeme


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


Re: [U-Boot] [PATCH 5/5 v1] integrator: make flash writeable on boot

2011-09-18 Thread Wolfgang Denk
Dear Albert ARIBAUD,

In message 4e75c4a4.20...@aribaud.net you wrote:
 
 Le 18/09/2011 09:52, Linus Walleij a =E9crit :
  This reconfigures the EBI (External Bus Interface) on the
  integrator so that chip select 1, handling the flash memory, is
  set to writeable. Without this it is not possible for U-Boot to
  access flash memory and it crashes on startup since CFI won't
  work properly.
 
 Do you mean that U-Boot writes to the flash at each boot on this board?

I think this is a misunderstanding of terms.  When we try to
identify the flash type and geomentry in the CFI driver, we do send
certain commands to the flash, and read the returned data.  This
sending commands includes write cycles to the flash address space,
so it is necessary that the memory controller setup allows write
cycles on the bus.

This does however NOT mean that any data are programmed into the
flash.

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
Anarchy may not be the best form of government, but it's better  than
no government at all.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 5/5 v1] integrator: make flash writeable on boot

2011-09-18 Thread Albert ARIBAUD
Le 18/09/2011 15:24, Wolfgang Denk a écrit :
 Dear Albert ARIBAUD,

 In message4e75c4a4.20...@aribaud.net  you wrote:

 Le 18/09/2011 09:52, Linus Walleij a =E9crit :
 This reconfigures the EBI (External Bus Interface) on the
 integrator so that chip select 1, handling the flash memory, is
 set to writeable. Without this it is not possible for U-Boot to
 access flash memory and it crashes on startup since CFI won't
 work properly.

 Do you mean that U-Boot writes to the flash at each boot on this board?

 I think this is a misunderstanding of terms.  When we try to
 identify the flash type and geomentry in the CFI driver, we do send
 certain commands to the flash, and read the returned data.  This
 sending commands includes write cycles to the flash address space,
 so it is necessary that the memory controller setup allows write
 cycles on the bus.

 This does however NOT mean that any data are programmed into the
 flash.

Indeed, I had misunderstood the commit message. Apologies.

 Best regards,

 Wolfgang Denk

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


Re: [U-Boot] [PATCH v7] dreamplug: initial board support.

2011-09-18 Thread Albert ARIBAUD
(Please do not use my @free.fr address to copy me on U-boot matters...)

Le 14/09/2011 08:39, Prafulla Wadaskar a écrit :


 -Original Message-
 From: Jason [mailto:u-b...@lakedaemon.net]
 Sent: Tuesday, September 13, 2011 7:47 PM
 To: Wolfgang Denk
 Cc: Prafulla Wadaskar; Albert Aribaud; u-boot@lists.denx.de
 Subject: Re: [U-Boot] [PATCH v7] dreamplug: initial board support.

 Albert,

 On Tue, Sep 13, 2011 at 03:00:59PM +0200, Wolfgang Denk wrote:
 Dear Prafulla,

 In messageF766E4F80769BD478052FB6533FA745D1A114670B3@SC-
 VEXCH4.marvell.com  you wrote:

 Let's have Wolfgang's opinion on this, since this not aligned with
 current
 u-boot development strategy.

 May be we can create a separate header file for tracking
 (unsupported/tobe
 supported) arm machine-types.

 Actually this is for Albert to comment.  He is the ARM custodian and
 has to live with the results.

 Wolfgang, Marek Vasut, and I discussed this here [1].  To summarize, by
 declaring non-mainlined mach_types in the respective board config, an
 error will be thrown at compile time after mach-types.h is updated to
 include the mach_type.

 The other idea is to have a separate file, say mach-types-local.h where
 all non-mainlined mach-types would be defined.

 I will vote for this second approach so that it becomes independent change 
 and anyone can update it in future.

 Let's get Albert's opinion on this.

My opinion on the whole mach-type question is if a board needs a 
mach-type it's because it will run Linux, so its mach-type should 
eventually be in the Linux mach-type list. As I understand it, the only 
case when is not there is because U-Boot support is submitted before 
Linux mainline support. Thus I second the idea of defining it in the 
board config header file, possibly even testing for it first and if it 
already exists, throwing a #error to remind the board maintainer to 
remove the now useless define from the config file.

 Regards..
 Prafulla . .

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


Re: [U-Boot] [PATCH v7] dreamplug: initial board support.

2011-09-18 Thread Albert ARIBAUD
Le 18/09/2011 19:58, Albert ARIBAUD a écrit :

 eventually be in the Linux mach-type list. As I understand it, the only
 case when is not there is because U-Boot support is submitted before

make that ... when *it* is not there...

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


Re: [U-Boot] [PATCH v7] dreamplug: initial board support.

2011-09-18 Thread Jason
Albert, Prafulla, Wolfgang,

On Sun, Sep 18, 2011 at 07:58:14PM +0200, Albert ARIBAUD wrote:
 Le 14/09/2011 08:39, Prafulla Wadaskar a écrit :
 On Tue, Sep 13, 2011 at 03:00:59PM +0200, Wolfgang Denk wrote:
 In 
 messagef766e4f80769bd478052fb6533fa745d1a11467...@sc-vexch4.marvell.com  
 you wrote:

 Let's have Wolfgang's opinion on this, since this not aligned with
 current u-boot development strategy.

 May be we can create a separate header file for tracking
 (unsupported/tobe supported) arm machine-types.

 Actually this is for Albert to comment.  He is the ARM custodian and
 has to live with the results.

 Wolfgang, Marek Vasut, and I discussed this here [1].  To summarize, by
 declaring non-mainlined mach_types in the respective board config, an
 error will be thrown at compile time after mach-types.h is updated to
 include the mach_type.

 The other idea is to have a separate file, say mach-types-local.h where
 all non-mainlined mach-types would be defined.

 I will vote for this second approach so that it becomes independent
 change and anyone can update it in future.

 Let's get Albert's opinion on this.

 My opinion on the whole mach-type question is if a board needs a  
 mach-type it's because it will run Linux, so its mach-type should  
 eventually be in the Linux mach-type list. As I understand it, the only  
 case when is not there is because U-Boot support is submitted before  
 Linux mainline support.

Yes, this is true.  There is also the corner case where the developer
motivated to do the work (me) is still learning devicetree, and Linux
won't take new boards for arm unless they are clearly devicetree. :-)

 Thus I second the idea of defining it in the  board config header
 file, possibly even testing for it first and if it  already exists,
 throwing a #error to remind the board maintainer to  remove the now
 useless define from the config file.

Sounds good, I should have a new version up in a few hours.  

As for my original question, since this patch series has had several
versions on the mailinglist [1] prior to the close of the merge window,
is it still possible to get it in for 2011.09?

thx,

Jason.

[1] http://lists.denx.de/pipermail/u-boot/2011-June/094056.html
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v8] dreamplug: initial board support.

2011-09-18 Thread Jason Cooper
Copied wholeheartedly from board/Marvell/guruplug and modified to add support
for SPI NOR flash.

CONFIG_MACH_DREAMPLUG defined in include/configs/dreamplug.h until Linus's
kernel.org tree adds it to mach-types.h.  Once it trickles down, the definition
can be removed from include/configs/dreamplug.h.

Signed-off-by: Jason Cooper u-b...@lakedaemon.net
---
Changes from v1 to v2:

- resorted series to move 'make all' support last.

Changes from v2 to v3:

- Use MACH_TYPE_GURUPLUG for now until dreamplug support is in
  Linux.
- Update MAINTAINERS.
- Collapse into one patch.

Changes from v3 to v4:

- update copyright info as recommended by Prafulla Wadaskar.
- maintain proper order in boards.cfg, MAINTAINERS, etc.
- label MPP's
- change back to MACH_TYPE_DREAMPLUG.  This patch is just RFC
  until the Dreamplug is supported in Linux (and MACH_TYPE_
  added).

Changes from v4 to v5:

  - Complete rewrite due to receiving u-boot source indirectly
from Global Scale Tech.
- Added driver for integrated RTC. (thx GST!)
- Added support for displaying CPU frequencies at boot. (thx
  GST!)
- Adjust USB timeout to handle dreamplug EHCI chipset.
- Cleaned up MPP registers based on Global Scale code. (thx
  GST!)
- broke out MACH_TYPE_DREAMPLUG changes since it's going to be a
  while until the Linux arm tree gets sorted and accepts new
  boards again.  Since all Dreamplugs currently on the market
  set r1 to MACH_TYPE_GURUPLUG, this allows the board to be
  added to u-boot while waiting for Linux mainline.  Once it's
  in Linux mainline, then the last patch can be integrated to use
  MACH_TYPE_DREAMPLUG.

Changes from v5 to v6:

- Define MACH_TYPE_DREAMPLUG in includes/configs/dreamplug.h until
  Linus's kernel.org tree includes assigned machine id.  This is on
  Wolfgang's recommendation [1].
- Removed dcache disabling as it is no longer enabled by default.
- USB timeout fix was merged.
- Marvell Integrated RTC was merged.
- Dropped CPU frequency printout as I'm not familiar enough with all
  flavors of kirkwood SoCs to do it correctly.
- Labelled MPP*_GPIO pins that are broken out as gpio pins for the
  user.
- Fixed function name mv_phy_88e1121_init() - mv_phy_88e1116_init().

Changes from v6 to v7:

- Use CONFIG_MACH_TYPE in dreamplug.c and define it to
  MACH_TYPE_DREAMPLUG in include/configs/dreamplug.h

Changes from v7 to v8:

- #error MACH_TYPE_DREAMPLUG once it is defined in mach-types.h.  On
  Albert Aribaud's recommendation.

[1] http://www.mail-archive.com/u-boot@lists.denx.de/msg60921.html

 MAINTAINERS   |4 +
 board/Marvell/dreamplug/Makefile  |   54 
 board/Marvell/dreamplug/dreamplug.c   |  151 +++
 board/Marvell/dreamplug/dreamplug.h   |   42 +++
 board/Marvell/dreamplug/kwbimage.cfg  |  163 +
 boards.cfg|1 +
 include/configs/dreamplug.h   |  151 +++
 7 files changed, 566 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/cpu/arm926ejs/kirkwood/asm-offsets.s
 create mode 100644 board/Marvell/dreamplug/Makefile
 create mode 100644 board/Marvell/dreamplug/dreamplug.c
 create mode 100644 board/Marvell/dreamplug/dreamplug.h
 create mode 100644 board/Marvell/dreamplug/kwbimage.cfg
 create mode 100644 include/configs/dreamplug.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 2f60a60..88d5637 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -70,6 +70,10 @@ Conn Clark cl...@esteem.com
 
ESTEEM192E  MPC8xx
 
+Jason Cooper u-b...@lakedaemon.net
+
+   dreamplug   ARM926EJS (Kirkwood SoC)
+
 Joe D'Abbraccio ljd...@freescale.com
 
MPC837xERDB MPC837x
diff --git a/arch/arm/cpu/arm926ejs/kirkwood/asm-offsets.s 
b/arch/arm/cpu/arm926ejs/kirkwood/asm-offsets.s
new file mode 100644
index 000..e69de29
diff --git a/board/Marvell/dreamplug/Makefile b/board/Marvell/dreamplug/Makefile
new file mode 100644
index 000..9ee5406
--- /dev/null
+++ b/board/Marvell/dreamplug/Makefile
@@ -0,0 +1,54 @@
+#
+# (C) Copyright 2011
+# Jason Cooper u-b...@lakedaemon.net
+#
+# Based on work by:
+# Marvell Semiconductor www.marvell.com
+# Written-by: Siddarth Gore go...@marvell.com
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# 

Re: [U-Boot] [PATCH v7] dreamplug: initial board support.

2011-09-18 Thread Wolfgang Denk
Dear Jason,

In message 20110918183913.ga32...@titan.lakedaemon.net you wrote:
 
 As for my original question, since this patch series has had several
 versions on the mailinglist [1] prior to the close of the merge window,
 is it still possible to get it in for 2011.09?

I cannot promise this.  We are already pretty much late behind
schedule, and close to the (shifted) release date.

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
Either one of us, by himself, is expendable.  Both of us are not.
-- Kirk, The Devil in the Dark, stardate 3196.1
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v7] dreamplug: initial board support.

2011-09-18 Thread Jason
Wolfgang,

On Sun, Sep 18, 2011 at 10:28:47PM +0200, Wolfgang Denk wrote:
 In message 20110918183913.ga32...@titan.lakedaemon.net you wrote:
  As for my original question, since this patch series has had several
  versions on the mailinglist [1] prior to the close of the merge window,
  is it still possible to get it in for 2011.09?
 
 I cannot promise this.  We are already pretty much late behind
 schedule, and close to the (shifted) release date.

Ok, I hope it makes it in.  If not, I understand.  We didn't get the
mach-types workaround hammered out until late.

thx,

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


Re: [U-Boot] [PATCH] devkit8000: Fix build break

2011-09-18 Thread Paulraj, Sandeep
  I believe this only exists with the SPL patches merged which I thought
  was only in your next branch atm...
 
 Confirm, from current u-boot-arm/master:
 
 uboot@lilith:~/src/u-boot-arm$ ./MAKEALL devkit8000
 Configuring for devkit8000 board...
 textdata bss dec hex filename
   2772007540  216140  500880   7a490 ./u-boot
 
 - SUMMARY 
 Boards compiled: 1
 --
 uboot@lilith:~/src/u-boot-arm$
 

That is correct.

I intend to send a pull request for ti/next on Monday.

Without this patch, I would have generated a new build error, hence the patch. 
You will get this as part of my next pull request.

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


[U-Boot] Please pull u-boot-ti/next

2011-09-18 Thread s-paulraj
Please pull u-boot-ti/next.
I checked all the patches for checkpatch errors.
Also all OMAP3 and OMAP4 built with no issues.

Thanks,
Sandeep

The following changes since commit 3522ad62864669b335b85f5abcd136a84bbb7519:
  Ajay Bhargav (1):
Armada100: Enable 88E3015 PHY support for GplugD

are available in the git repository at:

  git://git.denx.de/u-boot-ti.git next

Philip Balister (2):
  OMAP3: Overo: Update GPMC timing for ethernet chip
  overo: Set IEN on GPMC_CLK to support synchronous clocking.

Sandeep Paulraj (1):
  devkit8000: Fix build break

Simon Schwarz (9):
  omap-common/omap4: relocate early UART clock setup
  omap3: Configure RAM bank 0 if in SPL
  omap-common: add nand spl support
  spl: add NAND Library to new SPL
  spl: Add POWER library to new spl
  omap3: new SPL structure support
  devkit8000: Add nand-spl support for new SPL
  omap3: implement boot parameter saving
  omap-common: reorganize spl.c

 arch/arm/cpu/armv7/omap-common/Makefile |6 +
 arch/arm/cpu/armv7/omap-common/spl.c|  165 +++---
 arch/arm/cpu/armv7/omap-common/spl_mmc.c|  150 
 arch/arm/cpu/armv7/omap-common/spl_nand.c   |   71 
 arch/arm/cpu/armv7/omap3/board.c|   50 ++-
 arch/arm/cpu/armv7/omap3/config.mk  |   30 
 arch/arm/cpu/armv7/omap3/lowlevel_init.S|   10 +
 arch/arm/cpu/armv7/omap3/sdrc.c |   32 -
 arch/arm/cpu/armv7/omap4/board.c|1 +
 arch/arm/include/asm/arch-omap3/mem.h   |   36 
 arch/arm/include/asm/arch-omap3/omap_gpmc.h |9 +
 arch/arm/include/asm/arch-omap3/sys_proto.h |1 +
 arch/arm/include/asm/omap_common.h  |   31 
 board/isee/igep0020/igep0020.c  |1 +
 board/isee/igep0020/igep0020.h  |9 -
 board/overo/overo.c |1 +
 board/overo/overo.h |   11 +-
 board/timll/devkit8000/devkit8000.c |2 +-
 doc/README.SPL  |2 +
 drivers/mtd/nand/Makefile   |   10 +-
 drivers/mtd/nand/nand_base.c|4 +-
 drivers/mtd/nand/nand_spl_simple.c  |  245 +++
 drivers/mtd/nand/omap_gpmc.c|   27 +++
 include/configs/devkit8000.h|   46 +
 include/nand.h  |6 +
 spl/Makefile|2 +
 26 files changed, 794 insertions(+), 164 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/omap-common/spl_mmc.c
 create mode 100644 arch/arm/cpu/armv7/omap-common/spl_nand.c
 create mode 100644 arch/arm/cpu/armv7/omap3/config.mk
 create mode 100644 drivers/mtd/nand/nand_spl_simple.c
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] devkit8000: Fix build break

2011-09-18 Thread Tom Rini
On Sunday, September 18, 2011, Paulraj, Sandeep s-paul...@ti.com wrote:
  I believe this only exists with the SPL patches merged which I thought
  was only in your next branch atm...

 Confirm, from current u-boot-arm/master:

 uboot@lilith:~/src/u-boot-arm$ ./MAKEALL devkit8000
 Configuring for devkit8000 board...
 textdata bss dec hex filename
   2772007540  216140  500880   7a490 ./u-boot

 - SUMMARY 
 Boards compiled: 1
 --
 uboot@lilith:~/src/u-boot-arm$


 That is correct.

 I intend to send a pull request for ti/next on Monday.

 Without this patch, I would have generated a new build error, hence the
patch. You will get this as part of my next pull request.

I'm working on a v11 once NAND boot is working on omap3evm and beagle once
that's working and getting these boards going required a little rework of
the omap3 bits so I would like to hold on merging these for a little if we
can.

-- 
Tom

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


Re: [U-Boot] [PATCH] punt unused clean/distclean targets

2011-09-18 Thread Mike Frysinger
On Sunday, September 18, 2011 09:08:35 Graeme Russ wrote:
 On 18/09/11 18:22, Mike Frysinger wrote:
  On Sunday, September 18, 2011 03:26:38 Wolfgang Denk wrote:
  Mike Frysinger wrote:
  The top level Makefile does not do any recursion into subdirs when
  cleaning, so these clean/distclean targets in random arch/board dirs
  never get used.  Punt them all.
  
  I think this is the wrong approach.  Would it not be better to get rid
  of the 60 lines of clean/clobber target in the top level Makefile,
  including it's brute force methods of find ... | xargs rm -f and
  actually remove the files from the Makefiles in the respective
  directories instead?
  
  This would for example allow that a board maintainer can fix the clean
  / clobber rules for his code without having to edit the top level
  Makefile.
  
  yes  no.  i think we should have 1 clean/distclean target, but also have
  a way for board maintainers to inject their own custom clean files. 
  preferably via a .mk file in their board subdir.  this is moving in the
  direction of non- recursive make like the kernel does -- the top level
  would source all the subfiles to figure out the master clean list.
  
  however, the current build system has one advantage which i think we
  should retain in the short term: `make distclean` always cleans out the
  targets regardless of the current config.  for example, if you do `make
  bf537-stamp` followed by `make harmony` followed by `make distclean`,
  Blackfin-specific objects will still get cleaned out.
 
 Can we not have make distclean/mrproper traverse ALL arch/SoC/board
 directories and call their distclean/mrproper? Or have distclean/mrproper
 read the .mk file for all arch/SoC/board directories?

if it wasn't clear in my last e-mail, i want to move in the direction of .mk 
files that the top level would include them and thus all the specific cruft 
would be kept there

after all, the list of things to clean should be obvious once we have more 
kbuild style system: if it's listed as a file to build, then it should get 
cleaned.
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] punt unused clean/distclean targets

2011-09-18 Thread Marek Vasut
On Monday, September 19, 2011 06:59:52 AM Mike Frysinger wrote:
 On Sunday, September 18, 2011 09:08:35 Graeme Russ wrote:
  On 18/09/11 18:22, Mike Frysinger wrote:
   On Sunday, September 18, 2011 03:26:38 Wolfgang Denk wrote:
   Mike Frysinger wrote:
   The top level Makefile does not do any recursion into subdirs when
   cleaning, so these clean/distclean targets in random arch/board dirs
   never get used.  Punt them all.
   
   I think this is the wrong approach.  Would it not be better to get rid
   of the 60 lines of clean/clobber target in the top level Makefile,
   including it's brute force methods of find ... | xargs rm -f and
   actually remove the files from the Makefiles in the respective
   directories instead?
   
   This would for example allow that a board maintainer can fix the clean
   / clobber rules for his code without having to edit the top level
   Makefile.
   
   yes  no.  i think we should have 1 clean/distclean target, but also
   have a way for board maintainers to inject their own custom clean
   files. preferably via a .mk file in their board subdir.  this is
   moving in the direction of non- recursive make like the kernel does --
   the top level would source all the subfiles to figure out the master
   clean list.
   
   however, the current build system has one advantage which i think we
   should retain in the short term: `make distclean` always cleans out the
   targets regardless of the current config.  for example, if you do `make
   bf537-stamp` followed by `make harmony` followed by `make distclean`,
   Blackfin-specific objects will still get cleaned out.
  
  Can we not have make distclean/mrproper traverse ALL arch/SoC/board
  directories and call their distclean/mrproper? Or have distclean/mrproper
  read the .mk file for all arch/SoC/board directories?
 
 if it wasn't clear in my last e-mail, i want to move in the direction of
 .mk files that the top level would include them and thus all the specific
 cruft would be kept there
 
 after all, the list of things to clean should be obvious once we have more
 kbuild style system: if it's listed as a file to build, then it should get
 cleaned.

And who's porting the kbuild style system to uboot, is there something like 
that 
going on already ?

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


Re: [U-Boot] [PATCH] punt unused clean/distclean targets

2011-09-18 Thread Graeme Russ
Hi Mike

On Mon, Sep 19, 2011 at 2:59 PM, Mike Frysinger vap...@gentoo.org wrote:
 On Sunday, September 18, 2011 09:08:35 Graeme Russ wrote:
 On 18/09/11 18:22, Mike Frysinger wrote:
  On Sunday, September 18, 2011 03:26:38 Wolfgang Denk wrote:
  Mike Frysinger wrote:
  The top level Makefile does not do any recursion into subdirs when
  cleaning, so these clean/distclean targets in random arch/board dirs
  never get used.  Punt them all.

[snip]

 Can we not have make distclean/mrproper traverse ALL arch/SoC/board
 directories and call their distclean/mrproper? Or have distclean/mrproper
 read the .mk file for all arch/SoC/board directories?

 if it wasn't clear in my last e-mail, i want to move in the direction of .mk
 files that the top level would include them and thus all the specific cruft
 would be kept there

 after all, the list of things to clean should be obvious once we have more
 kbuild style system: if it's listed as a file to build, then it should get
 cleaned.

'make distclean' and 'make mrproper' should delete ALL intermediate build
files and basically return the local git repository to the same state that
it would be in if you did a fresh git-clone regardless of what config
options git set. So if one does:

make board_x-config
make all
cp u-boot.bin somewhere
make board_y-config
make all
cp u-boot.bin somewhere else
make mrproper

nothing should be left over from the build of 'board_x', even if it is a
completely different arch that 'board_y'

The list of files to delete should be in the board_x and board_y config.mk
files. Similiarly for arches and SoCs

Regards,

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


Re: [U-Boot] [PATCH] punt unused clean/distclean targets

2011-09-18 Thread Mike Frysinger
On Monday, September 19, 2011 01:10:57 Marek Vasut wrote:
 On Monday, September 19, 2011 06:59:52 AM Mike Frysinger wrote:
  after all, the list of things to clean should be obvious once we have
  more kbuild style system: if it's listed as a file to build, then it
  should get cleaned.
 
 And who's porting the kbuild style system to uboot, is there something like
 that going on already ?

it's already being done in small steps.  witness include/autoconf.mk and the 
proliferation of COBJS-$(FOO) in Makefiles.

but there isnt anyone driving it strongly ... just as someone hits a piece 
that'd be helpful, they implement it.

i think the next itch i'll scratch is unifying board/*/Makefile into like 
board/board.mk ... then it'll be a lot easier to migrate these further.
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH] punt unused clean/distclean targets

2011-09-18 Thread Mike Frysinger
On Monday, September 19, 2011 01:11:17 Graeme Russ wrote:
 Hi Mike
 
 On Mon, Sep 19, 2011 at 2:59 PM, Mike Frysinger vap...@gentoo.org wrote:
  On Sunday, September 18, 2011 09:08:35 Graeme Russ wrote:
  On 18/09/11 18:22, Mike Frysinger wrote:
   On Sunday, September 18, 2011 03:26:38 Wolfgang Denk wrote:
   Mike Frysinger wrote:
   The top level Makefile does not do any recursion into subdirs when
   cleaning, so these clean/distclean targets in random arch/board dirs
   never get used.  Punt them all.
 
 [snip]
 
  Can we not have make distclean/mrproper traverse ALL arch/SoC/board
  directories and call their distclean/mrproper? Or have
  distclean/mrproper read the .mk file for all arch/SoC/board
  directories?
  
  if it wasn't clear in my last e-mail, i want to move in the direction of
  .mk files that the top level would include them and thus all the
  specific cruft would be kept there
  
  after all, the list of things to clean should be obvious once we have
  more kbuild style system: if it's listed as a file to build, then it
  should get cleaned.
 
 'make distclean' and 'make mrproper' should delete ALL intermediate build
 files and basically return the local git repository to the same state that
 it would be in if you did a fresh git-clone regardless of what config
 options git set.

yes.  i dont believe i said anything differently.

remember that just because you have COBJS-$(FOO) doesnt mean you need FOO to 
be defined to have access to that item.  you can just as easily do `rm -f 
$(COBJS-) $(COBJS-y)`.
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2] net, davinci_emac: add KSZ8864 switch

2011-09-18 Thread Heiko Schocher
Signed-off-by: Heiko Schocher h...@denx.de
Cc: Paulraj Sandeep s-paul...@ti.com
Cc: Albert ARIBAUD albert.u.b...@aribaud.net
Cc: Mike Frysinger vap...@gentoo.org
---
- changes for v2:
  - add comment from Mike Frysinger
remove check if CONFIG_DRIVER_TI_EMAC and CONFIG_CMD_NET
are defined.

 arch/arm/cpu/arm926ejs/davinci/Makefile   |2 +-
 arch/arm/cpu/arm926ejs/davinci/ksz8873.c  |   68 +
 arch/arm/include/asm/arch-davinci/emac_defs.h |6 ++
 drivers/net/davinci_emac.c|7 +++
 4 files changed, 82 insertions(+), 1 deletions(-)
 create mode 100644 arch/arm/cpu/arm926ejs/davinci/ksz8873.c

diff --git a/arch/arm/cpu/arm926ejs/davinci/Makefile 
b/arch/arm/cpu/arm926ejs/davinci/Makefile
index 3183e6a..b38623a 100644
--- a/arch/arm/cpu/arm926ejs/davinci/Makefile
+++ b/arch/arm/cpu/arm926ejs/davinci/Makefile
@@ -32,7 +32,7 @@ COBJS-$(CONFIG_SOC_DM355) += dm355.o
 COBJS-$(CONFIG_SOC_DM365)  += dm365.o
 COBJS-$(CONFIG_SOC_DM644X) += dm644x.o
 COBJS-$(CONFIG_SOC_DM646X) += dm646x.o
-COBJS-$(CONFIG_DRIVER_TI_EMAC) += lxt972.o dp83848.o et1011c.o
+COBJS-$(CONFIG_DRIVER_TI_EMAC) += lxt972.o dp83848.o et1011c.o ksz8873.o
 
 SOBJS  = reset.o
 
diff --git a/arch/arm/cpu/arm926ejs/davinci/ksz8873.c 
b/arch/arm/cpu/arm926ejs/davinci/ksz8873.c
new file mode 100644
index 000..634eda0
--- /dev/null
+++ b/arch/arm/cpu/arm926ejs/davinci/ksz8873.c
@@ -0,0 +1,68 @@
+/*
+ * Micrel KSZ8873 PHY Driver for TI DaVinci
+ * (TMS320DM644x) based boards.
+ *
+ * Copyright (C) 2011 Heiko Schocher hsdenx.de
+ *
+ * based on:
+ * National Semiconductor DP83848 PHY Driver for TI DaVinci
+ * (TMS320DM644x) based boards.
+ *
+ * Copyright (C) 2007 Sergey Kubushyn k...@koi8.net
+ *
+ * 
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include common.h
+#include miiphy.h
+#include net.h
+#include asm/arch/emac_defs.h
+#include asm/io.h
+
+int ksz8873_is_phy_connected(int phy_addr)
+{
+   u_int16_t   dummy;
+
+   return davinci_eth_phy_read(phy_addr, MII_PHYSID1, dummy);
+}
+
+int ksz8873_get_link_speed(int phy_addr)
+{
+   emac_regs *emac = (emac_regs *)EMAC_BASE_ADDR;
+
+   /* we always have a link to the switch, 100 FD */
+   writel((EMAC_MACCONTROL_MIIEN_ENABLE |
+   EMAC_MACCONTROL_FULLDUPLEX_ENABLE),
+  emac-MACCONTROL);
+   return 1;
+}
+
+
+int ksz8873_init_phy(int phy_addr)
+{
+   return 1;
+}
+
+
+int ksz8873_auto_negotiate(int phy_addr)
+{
+   return dp83848_get_link_speed(phy_addr);
+}
diff --git a/arch/arm/include/asm/arch-davinci/emac_defs.h 
b/arch/arm/include/asm/arch-davinci/emac_defs.h
index 4a4ee04..294a9a8 100644
--- a/arch/arm/include/asm/arch-davinci/emac_defs.h
+++ b/arch/arm/include/asm/arch-davinci/emac_defs.h
@@ -377,6 +377,12 @@ typedef struct
int (*auto_negotiate)(int phy_addr);
 } phy_t;
 
+#define PHY_KSZ8873(0x00221450)
+int ksz8873_is_phy_connected(int phy_addr);
+int ksz8873_get_link_speed(int phy_addr);
+int ksz8873_init_phy(int phy_addr);
+int ksz8873_auto_negotiate(int phy_addr);
+
 #define PHY_LXT972 (0x001378e2)
 int lxt972_is_phy_connected(int phy_addr);
 int lxt972_get_link_speed(int phy_addr);
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c
index 5b8ab2d..d58c28b 100644
--- a/drivers/net/davinci_emac.c
+++ b/drivers/net/davinci_emac.c
@@ -711,6 +711,13 @@ int davinci_emac_initialize(void)
phy_id |= tmp  0x;
 
switch (phy_id) {
+   case PHY_KSZ8873:
+   sprintf(phy.name, KSZ8873 @ 0x%02x, active_phy_addr);
+   phy.init = ksz8873_init_phy;
+   phy.is_phy_connected = ksz8873_is_phy_connected;
+   phy.get_link_speed = ksz8873_get_link_speed;
+   phy.auto_negotiate = ksz8873_auto_negotiate;
+   break;
case PHY_LXT972:
sprintf(phy.name, LXT972 @ 0x%02x, active_phy_addr);
phy.init = lxt972_init_phy;
-- 
1.7.6

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


[U-Boot] [PATCH v2 8/8] arm, davinci: add support for am1808 based enbw_cmc board

2011-09-18 Thread Heiko Schocher
- booting from NOR Flash with direct boot method
- POST support
- LOGBUF support

Signed-off-by: Heiko Schocher h...@denx.de
Cc: Paulraj Sandeep s-paul...@ti.com
Cc: Albert ARIBAUD albert.u.b...@aribaud.net
Cc: Igor Grinberg grinb...@compulab.co.il
---
- changes for v2
  - use CONFIG_MACH_TYPE instead setting the MACH_TYPE in
board specific code, as Igor Grinberg suggested.
  - add logversion=2 to default Environment

 board/enbw/enbw_cmc/Makefile   |   51 
 board/enbw/enbw_cmc/enbw_cmc.c |  570 
 boards.cfg |1 +
 include/configs/enbw_cmc.h |  443 +++
 4 files changed, 1065 insertions(+), 0 deletions(-)
 create mode 100644 board/enbw/enbw_cmc/Makefile
 create mode 100644 board/enbw/enbw_cmc/enbw_cmc.c
 create mode 100644 include/configs/enbw_cmc.h

diff --git a/board/enbw/enbw_cmc/Makefile b/board/enbw/enbw_cmc/Makefile
new file mode 100644
index 000..bdba069
--- /dev/null
+++ b/board/enbw/enbw_cmc/Makefile
@@ -0,0 +1,51 @@
+#
+# (C) Copyright 2000, 2001, 2002
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# Copyright (C) 2007 Sergey Kubushyn k...@koi8.net
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+COBJS   := $(BOARD).o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+clean:
+   rm -f $(SOBJS) $(OBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak *~ .depend
+
+#
+# This is for $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/enbw/enbw_cmc/enbw_cmc.c b/board/enbw/enbw_cmc/enbw_cmc.c
new file mode 100644
index 000..8947a2a
--- /dev/null
+++ b/board/enbw/enbw_cmc/enbw_cmc.c
@@ -0,0 +1,570 @@
+/*
+ * (C) Copyright 2011
+ * Heiko Schocher, DENX Software Engineering, h...@denx.de.
+ *
+ * Based on:
+ * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ * Based on da830evm.c. Original Copyrights follow:
+ *
+ * Copyright (C) 2009 Nick Thompson, GE Fanuc, Ltd. nick.thomp...@gefanuc.com
+ * Copyright (C) 2007 Sergey Kubushyn k...@koi8.net
+ *
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include common.h
+#include command.h
+#include environment.h
+#include hwconfig.h
+#include i2c.h
+#include malloc.h
+#include miiphy.h
+#include net.h
+#include netdev.h
+#include asm/arch/hardware.h
+#include asm/arch/emif_defs.h
+#include asm/arch/emac_defs.h
+#include asm/arch/gpio.h
+#include asm/arch/davinci_misc.h
+#include asm/arch/timer_defs.h
+#include asm/io.h
+
+DECLARE_GLOBAL_DATA_PTR;
+
+static const struct lpsc_resource lpsc[] = {
+   { DAVINCI_LPSC_AEMIF }, /* NAND, NOR */
+   { DAVINCI_LPSC_EMAC },  /* image download */
+   { DAVINCI_LPSC_UART2 }, /* console */
+   { DAVINCI_LPSC_GPIO },
+};
+
+/* missing functions from board/davinci/common/misc.c */
+#ifndef CONFIG_USE_IRQ
+void irq_init(void)
+{
+   /*
+* Mask all IRQs by clearing the global enable and setting
+* the enable clear for all the 90 interrupts.
+*/
+
+   writel(0, davinci_aintc_regs-ger);
+
+   writel(0, davinci_aintc_regs-hier);
+
+   writel(0x, davinci_aintc_regs-ecr1);
+