Re: [U-Boot] {Spam?} u-boot relocation

2010-12-26 Thread Reinhard Meyer
Dear Marcel,
> Hi,
>
> I updated my u-boot-usb to continue my work on the SAM9 USB parts, but got
> stuck with the following issue :
>
> There seems to be a new relocation scheme. I also added some stuff to make it
> detect the SDRAM, but than I get stuck.
>
>   int dram_init(void)
> {
>  gd->bd->bi_dram[0].start = PHYS_SDRAM;
>  gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
This is accessing bss before relocation. BSS does not exist then.
>  /* dram_init must store complete ramsize in gd->ram_size */
>  gd->ram_size = get_ram_size((volatile void *)PHYS_SDRAM,
> PHYS_SDRAM_SIZE);
>  dram_init_banksize();
This function, if defined, is called automagically. Normally, with single
DRAM bank AT91SAM9 designs the default weak function provided by u-boot is
sufficient:
void __dram_init_banksize(void)
{
gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
gd->bd->bi_dram[0].size =  gd->ram_size;
}
void dram_init_banksize(void)
__attribute__((weak, alias("__dram_init_banksize")));

Don't define this function in your board file!!!
>  return 0;
> }
Please have a look at the emk/top9000 board for what is needed:

int dram_init(void)
{
gd->ram_size = get_ram_size(
(void *)CONFIG_SYS_SDRAM_BASE,
CONFIG_SYS_SDRAM_SIZE);
return 0;
}

/* NO dram_init_banksize() !!! */

Note also that the defines have changed to have a CONFIG_SYS_ prefix.
Change your board definition accordingly.

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


Re: [U-Boot] [PATCH 1/2 for 2010.12 ] Add support PLATFORM_LDFLAGS to cmd_link_o_target

2010-12-26 Thread Mike Frysinger
On Saturday, December 25, 2010 18:02:26 Nobuhiro Iwamatsu wrote:
> Current cmd_link_o_target function in config.mk does not support the set
> of the endian.
> 
> Some architecture is bi-endian (e.g. mips and sh).
> Therefore, there is case supporting big endian and little endian
> with one toolchain.
> For example, when user builds target of big endian in host of little
> endian, they need set endian.
> 
>  # If the list of objects to link is empty, just create an empty built-in.o
>  cmd_link_o_target = $(if $(strip $1),\
> -   $(LD) -r -o $@ $1 ,\
> +   $(LD) $(ENDIANNESS) -r -o $@ $1 ,\

i dont think we should start declaring random new variables with specific 
purposes.  better to split the "u-boot final" LDFLAGS out into their own 
variable (LDFLAGS_u-boot) and keep LDFLAGS as a "these are the flags that need 
to be used with $(LD)".
-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] {Spam?} u-boot relocation

2010-12-26 Thread Reinhard Meyer
Dear Marcel,
> On Sunday, December 26, 2010 02:38:04 pm Reinhard Meyer wrote:
>> Dear Marcel,
>>
>>> Hi,
>>>
>>> I updated my u-boot-usb to continue my work on the SAM9 USB parts, but
>>> got stuck with the following issue :
>>>
>>> There seems to be a new relocation scheme. I also added some stuff to
>>> make it detect the SDRAM, but than I get stuck.
>>>
>>>int dram_init(void)
>>>
>>> {
>>>
>>>   gd->bd->bi_dram[0].start = PHYS_SDRAM;
>>>   gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
>>
>> This is accessing bss before relocation. BSS does not exist then.
>
> At what point bss does exist ?
After Relocation.
> Forgive me for not having a clue on this. I started working on u-boot to make
> USB working a while ago. I almost had that working but unfortunately had to go
> away for a while for business. Now that I can continue I usually first update
> to keep up with the latest things, but this is not always easy if things break
> completely.
>
>>>   /* dram_init must store complete ramsize in gd->ram_size */
>>>   gd->ram_size = get_ram_size((volatile void *)PHYS_SDRAM,
>>>
>>> PHYS_SDRAM_SIZE);
>>>
>>>   dram_init_banksize();
>>
>> This function, if defined, is called automagically. Normally, with single
>> DRAM bank AT91SAM9 designs the default weak function provided by u-boot is
>> sufficient:
>> void __dram_init_banksize(void)
>> {
>>  gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
>>  gd->bd->bi_dram[0].size =  gd->ram_size;
>> }
>> void dram_init_banksize(void)
>>  __attribute__((weak, alias("__dram_init_banksize")));
>>
>> Don't define this function in your board file!!!
>
> I got rid of the call in my board file.
>
>>>   return 0;
>>>
>>> }
>>
>> Please have a look at the emk/top9000 board for what is needed:
>>
>> int dram_init(void)
>> {
>>  gd->ram_size = get_ram_size(
>>  (void *)CONFIG_SYS_SDRAM_BASE,
>>  CONFIG_SYS_SDRAM_SIZE);
>>  return 0;
>> }
>>
>> /* NO dram_init_banksize() !!! */
>>
>> Note also that the defines have changed to have a CONFIG_SYS_ prefix.
>> Change your board definition accordingly.
>>
>> Best Regards,
>> Reinhard
>
> I currently only have this :
> int dram_init(void)
> {
>   gd->ram_size = get_ram_size(
>   (void *)CONFIG_SYS_SDRAM_BASE,
>   CONFIG_SYS_SDRAM_SIZE);
>   return 0;
> }
>
> I defined CONFIG_SYS_SDRAM_BASE and CONFIG_SYS_SDRAM_SIZE but I gave them the
> same address and size as my previous PHYS_SDRAM and PHYS_SDRAM_SIZE.
Give them the *correct* values; however I assume they are correct.

CONFIG_SYS_TEXT_BASE must be set to the address u-boot is loaded to by the 
initial
bootstrap (or directly the NOR address if it is starting from there).

U-boot will relocate itself to top of RAM. Therefore CONFIG_SYS_TEXT_BASE should
not be near top of RAM to avoid overlap.
>
> It doesn't change anything so far, so I must have missed some things I guess.
> I'll continue reading and hope I find something. I do however feel  like I'm
> wasting my time on this one.

I have the same frustration sometimes, however changes are not done to frustrate
people but to make things better and more straightforward. Progress sometimes
means making significant changes to get rid of ballast...

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


[U-Boot] [PATCH] altera_spi: add spi_set_speed

2010-12-26 Thread Thomas Chou
Added this for mmc_spi driver. Though altera spi core does not
support programmable speed. It is fixed when configured in
sopc-builder.

Signed-off-by: Thomas Chou 
---
 drivers/spi/altera_spi.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/spi/altera_spi.c b/drivers/spi/altera_spi.c
index 918b223..138d6f4 100644
--- a/drivers/spi/altera_spi.c
+++ b/drivers/spi/altera_spi.c
@@ -70,6 +70,11 @@ void spi_init(void)
 {
 }
 
+void spi_set_speed(struct spi_slave *slave, uint hz)
+{
+   /* altera spi core does not support programmable speed */
+}
+
 struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
  unsigned int max_hz, unsigned int mode)
 {
-- 
1.7.3.4

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


[U-Boot] U-boot 1.1.2 CONFIG_COMMANDS

2010-12-26 Thread sohu
Hi,i am using u-boot 1.1.2,for some reasons,i have no time to port to new 
revision code of u-boot.And now i met one problem
in my include/configs/myboards3c44b0.h
#define CONFIG_COMMANDS( CONFIG_CMD_DFL | \
CFG_CMD_DATE | \
CFG_CMD_ELF| \
CFG_CMD_NET | \
CFG_CMD_PING | \
CFG_CMD_ENV | \
CFG_CMD_FLASH)
The form above is default, and i move CONFIG_CMD_DFL option out,and now 
something wrong with my u-boot.bin
when i power on my board,The message seems this:
U-Boot 1.1.2 (Dec 27 2010 - 08:54:13)


U-Boot code: 0C30 -> 0C315310  BSS: -> 0C319000

RAM Configuration:

Bank #0: 0c00 32 MB

Flash:  4 MB


And stop here,i wonder if i omit some options of CONFIG_COMMANDS macro?but 
which one it should be?Thanks for any suggestion !
MrGates

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


[U-Boot] [PATCH] nios2: use long for ssize_t

2010-12-26 Thread Thomas Chou
This is consistent with nios2-linux. And resolved the warning,

cmd_nvedit.c: In function `do_env_export':
cmd_nvedit.c:660: warning: size_t format, ssize_t arg (arg 3)

Signed-off-by: Thomas Chou 
---
 arch/nios2/include/asm/posix_types.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/nios2/include/asm/posix_types.h 
b/arch/nios2/include/asm/posix_types.h
index c2deea6..6733640 100644
--- a/arch/nios2/include/asm/posix_types.h
+++ b/arch/nios2/include/asm/posix_types.h
@@ -17,7 +17,7 @@ typedef unsigned short__kernel_ipc_pid_t;
 typedef unsigned short __kernel_uid_t;
 typedef unsigned short __kernel_gid_t;
 typedef unsigned long  __kernel_size_t;
-typedef int__kernel_ssize_t;
+typedef long   __kernel_ssize_t;
 typedef int__kernel_ptrdiff_t;
 typedef long   __kernel_time_t;
 typedef long   __kernel_suseconds_t;
-- 
1.7.3.4

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


[U-Boot] [PATCH] nios2: add gpio_is_valid

2010-12-26 Thread Thomas Chou
Signed-off-by: Thomas Chou 
---
 arch/nios2/include/asm/gpio.h|6 ++
 board/altera/nios2-generic/custom_fpga.h |1 +
 board/altera/nios2-generic/gpio.c|6 ++
 3 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/arch/nios2/include/asm/gpio.h b/arch/nios2/include/asm/gpio.h
index 36a7132..4b21c8f 100644
--- a/arch/nios2/include/asm/gpio.h
+++ b/arch/nios2/include/asm/gpio.h
@@ -52,6 +52,11 @@ static inline void gpio_set_value(unsigned gpio, int value)
 {
writel(value ? 3 : 2, CONFIG_SYS_GPIO_BASE + (gpio << 2));
 }
+
+static inline int gpio_is_valid(int number)
+{
+   return ((unsigned)number) < CONFIG_SYS_GPIO_WIDTH;
+}
 #else
 extern int gpio_request(unsigned gpio, const char *label);
 extern int gpio_free(unsigned gpio);
@@ -59,6 +64,7 @@ extern int gpio_direction_input(unsigned gpio);
 extern int gpio_direction_output(unsigned gpio, int value);
 extern int gpio_get_value(unsigned gpio);
 extern void gpio_set_value(unsigned gpio, int value);
+extern int gpio_is_valid(int number);
 #endif /* CONFIG_SYS_GPIO_BASE */
 
 #endif /* _ASM_NIOS2_GPIO_H_ */
diff --git a/board/altera/nios2-generic/custom_fpga.h 
b/board/altera/nios2-generic/custom_fpga.h
index a11add5..f7f3853 100644
--- a/board/altera/nios2-generic/custom_fpga.h
+++ b/board/altera/nios2-generic/custom_fpga.h
@@ -50,6 +50,7 @@
 
 /* led_pio.s1 is a altera_avalon_pio */
 #define LED_PIO_BASE 0x82120870
+#define LED_PIO_WIDTH 8
 
 /* high_res_timer.s1 is a altera_avalon_timer */
 #define CONFIG_SYS_TIMER_BASE 0x82120820
diff --git a/board/altera/nios2-generic/gpio.c 
b/board/altera/nios2-generic/gpio.c
index 8c639ce..4a30564 100644
--- a/board/altera/nios2-generic/gpio.c
+++ b/board/altera/nios2-generic/gpio.c
@@ -10,6 +10,7 @@
 #ifndef CONFIG_SYS_GPIO_BASE
 
 #define ALTERA_PIO_BASE LED_PIO_BASE
+#define ALTERA_PIO_WIDTH LED_PIO_WIDTH
 #define ALTERA_PIO_DATA (ALTERA_PIO_BASE + 0)
 #define ALTERA_PIO_DIR (ALTERA_PIO_BASE + 4)
 static u32 pio_data_reg;
@@ -62,4 +63,9 @@ void gpio_set_value(unsigned gpio, int value)
pio_data_reg &= ~mask;
writel(pio_data_reg, ALTERA_PIO_DATA);
 }
+
+int gpio_is_valid(int number)
+{
+   return ((unsigned)number) < ALTERA_PIO_WIDTH;
+}
 #endif
-- 
1.7.3.4

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


Re: [U-Boot] [PATCH 1/2 for 2010.12 ] Add support PLATFORM_LDFLAGS to cmd_link_o_target

2010-12-26 Thread Nobuhiro Iwamatsu
Hi, mike.

2010/12/27 Mike Frysinger :
> On Saturday, December 25, 2010 18:02:26 Nobuhiro Iwamatsu wrote:
>> Current cmd_link_o_target function in config.mk does not support the set
>> of the endian.
>>
>> Some architecture is bi-endian (e.g. mips and sh).
>> Therefore, there is case supporting big endian and little endian
>> with one toolchain.
>> For example, when user builds target of big endian in host of little
>> endian, they need set endian.
>>
>>  # If the list of objects to link is empty, just create an empty built-in.o
>>  cmd_link_o_target = $(if $(strip $1),\
>> -                   $(LD) -r -o $@ $1 ,\
>> +                   $(LD) $(ENDIANNESS) -r -o $@ $1 ,\
>
> i dont think we should start declaring random new variables with specific
> purposes.

I agree. But

> better to split the "u-boot final" LDFLAGS out into their own
> variable (LDFLAGS_u-boot) and keep LDFLAGS as a "these are the flags that need
> to be used with $(LD)".

cmd_link_o_target is not used in the last of u-boot  (u-boot final) .
But this is used in the middle of build.
For example, when we make libstubs.o in examples/standalone/Makefile.

: examples/standalone/Makefile
-
 89
 90 all:$(obj).depend $(OBJS) $(LIB) $(SREC) $(BIN) $(ELF)
 91
 92 #
 93 $(LIB): $(obj).depend $(LIBOBJS)
 94 $(call cmd_link_o_target, $(LIBOBJS))
 95
 96 $(ELF):
-

Therefore, I think that we have to add a new variable to this.

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


[U-Boot] [PATCH 02/28] Blackfin: bf518f-ezbrd: don't require SPI logic all the time

2010-12-26 Thread Mike Frysinger
Only the first run of boards had a ksz switch on it, so if building for a
newer silicon rev or SPI is disabled, don't bother checking for the ksz.

Signed-off-by: Mike Frysinger 
---
 board/bf518f-ezbrd/bf518f-ezbrd.c |   30 +-
 1 files changed, 21 insertions(+), 9 deletions(-)

diff --git a/board/bf518f-ezbrd/bf518f-ezbrd.c 
b/board/bf518f-ezbrd/bf518f-ezbrd.c
index ff1ac4c..6b455de 100644
--- a/board/bf518f-ezbrd/bf518f-ezbrd.c
+++ b/board/bf518f-ezbrd/bf518f-ezbrd.c
@@ -57,6 +57,13 @@ static void board_init_enetaddr(uchar *mac_addr)
eth_setenv_enetaddr("ethaddr", mac_addr);
 }
 
+/* Only the first run of boards had a KSZ switch */
+#if defined(CONFIG_BFIN_SPI) && __SILICON_REVISION__ == 0
+# define KSZ_POSSIBLE 1
+#else
+# define KSZ_POSSIBLE 0
+#endif
+
 #define KSZ_MAX_HZ500
 
 #define KSZ_WRITE 0x02
@@ -109,17 +116,16 @@ static int ksz8893m_reset(struct spi_slave *slave)
return ret;
 }
 
-int board_eth_init(bd_t *bis)
+static bool board_ksz_init(void)
 {
-   static bool switch_is_alive = false, phy_is_ksz = true;
-   int ret;
+   static bool switch_is_alive = false;
 
if (!switch_is_alive) {
struct spi_slave *slave = spi_setup_slave(0, 1, KSZ_MAX_HZ, 
SPI_MODE_3);
if (slave) {
if (!spi_claim_bus(slave)) {
-   phy_is_ksz = (ksz8893m_reg_read(slave, 
KSZ_REG_CHID) == 0x88);
-   ret = phy_is_ksz ? ksz8893m_reset(slave) : 0;
+   bool phy_is_ksz = (ksz8893m_reg_read(slave, 
KSZ_REG_CHID) == 0x88);
+   int ret = phy_is_ksz ? ksz8893m_reset(slave) : 
0;
switch_is_alive = (ret == 0);
spi_release_bus(slave);
}
@@ -127,10 +133,16 @@ int board_eth_init(bd_t *bis)
}
}
 
-   if (switch_is_alive)
-   return bfin_EMAC_initialize(bis);
-   else
-   return -1;
+   return switch_is_alive;
+}
+
+int board_eth_init(bd_t *bis)
+{
+   if (KSZ_POSSIBLE) {
+   if (!board_ksz_init())
+   return 0;
+   }
+   return bfin_EMAC_initialize(bis);
 }
 #endif
 
-- 
1.7.3.4

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


[U-Boot] [PATCH 03/28] Blackfin: skip RAM display for 0 mem systems

2010-12-26 Thread Mike Frysinger
Signed-off-by: Mike Frysinger 
---
 arch/blackfin/lib/board.c |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/blackfin/lib/board.c b/arch/blackfin/lib/board.c
index 8eca7d6..59a0810 100644
--- a/arch/blackfin/lib/board.c
+++ b/arch/blackfin/lib/board.c
@@ -283,8 +283,11 @@ void board_init_f(ulong bootflag)
printf("Core: %s MHz, ", strmhz(buf, get_cclk()));
printf("System: %s MHz\n", strmhz(buf, get_sclk()));
 
-   printf("RAM:   ");
-   print_size(bd->bi_memsize, "\n");
+   if (CONFIG_MEM_SIZE) {
+   printf("RAM:   ");
+   print_size(bd->bi_memsize, "\n");
+   }
+
 #if defined(CONFIG_POST)
post_init_f();
post_bootmode_init();
-- 
1.7.3.4

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


[U-Boot] [PATCH 01/28] MAINTAINERS: sort Blackfin entries

2010-12-26 Thread Mike Frysinger
Signed-off-by: Mike Frysinger 
---
 MAINTAINERS |   49 ++---
 1 files changed, 22 insertions(+), 27 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index ba83f71..553930a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1033,6 +1033,7 @@ Blackfin Team 
 
BF518F-EZBRDBF518
BF526-EZBRD BF526
+   BF527-AD7160-EVAL   BF527
BF527-EZKIT BF527
BF527-EZKIT-V2  BF527
BF527-SDP   BF527
@@ -1044,52 +1045,46 @@ Blackfin Team 
BF548-EZKIT BF548
BF561-EZKIT BF561
 
-   BF527-AD7160-EVAL   BF527
+Brent Kandetzki 
 
-Bluetechnix Tinyboards 
-Blackfin Team 
+   IP04BF532
 
-   CM-BF527BF527
-   CM-BF533BF533
-   CM-BF537E   BF537
-   CM-BF537U   BF537
-   CM-BF548BF548
-   CM-BF561BF561
-   TCM-BF518   BF518
-   TCM-BF537   BF537
+Peter Meerwald 
 
-Martin Strubel 
-Blackfin Team 
+   bct-brettl2 BF536
 
-   BF537-minotaur  BF537
-   BF537-srv1  BF537
+I-SYST Micromodule 
+
+   IBF-DSP561  BF561
 
 Wojtek Skulski 
 Wojtek Skulski 
-Blackfin Team 
 Benjamin Matthews 
 
BlackStamp  BF533
BlackVMEBF561
 
-I-SYST Micromodule 
-Blackfin Team 
+Martin Strubel 
 
-   IBF-DSP561  BF561
+   BF537-minotaur  BF537
+   BF537-srv1  BF537
+
+Bluetechnix Tinyboards 
+
+   CM-BF527BF527
+   CM-BF533BF533
+   CM-BF537E   BF537
+   CM-BF537U   BF537
+   CM-BF548BF548
+   CM-BF561BF561
+   TCM-BF518   BF518
+   TCM-BF537   BF537
 
 Valentin Yakovenkov 
 Anton Shurpin 
 
BF561-ACVILON   BF561
 
-Brent Kandetzki 
-
-   IP04BF532
-
-Peter Meerwald 
-
-   bct-brettl2 BF536
-
 #
 # End of MAINTAINERS list  #
 #
-- 
1.7.3.4

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


[U-Boot] [PATCH 00/28] Blackfin updates for v2011.03

2010-12-26 Thread Mike Frysinger
More processor header cleanups, board config.mk unification and removal,
a few new board ports, and random bug fixes.  Most clean up work is to
address complaints from Wolfgang since he won't pull patches otherwise.

The processor header updates are too large for the list, but you can of
course find them in my git tree:
git://git.denx.de/u-boot-blackfin.git

Andreas Schallenberg (1):
  Blackfin: dnp5370: new board port

Chong Huang (1):
  Blackfin: bf525-ucr2: new board port

Mike Frysinger (26):
  MAINTAINERS: sort Blackfin entries
  Blackfin: bf518f-ezbrd: don't require SPI logic all the time
  Blackfin: skip RAM display for 0 mem systems
  Blackfin: drop CONFIG_SYS_TEXT_BASE from boards
  Blackfin: unify bootmode based LDR_FLAGS setup
  Blackfin: move CONFIG_BFIN_CPU back to board config.h
  Blackfin: bf527-sdp: update custom CFLAGS paths
  Blackfin: bf537-pnav/blackstamp/blackvme: drop empty config.mk files
  Blackfin: serial: clean up muxing a bit
  Blackfin: bf537-minotaur/bf537-srv1: undefine nfs when net is
disabled
  Blackfin: bf537: fix L1 data defines
  Blackfin: bf561-ezkit/ibf-dsp561: invert env offset/addr logic
  Blackfin: fix bd_t handling
  Blackfin: BF50x: new processor port
  Blackfin: drop duplicate system mmr and L1 scratch defines
  Blackfin: BF52x: unify duplicated headers
  Blackfin: BF537: unify duplicated headers
  Blackfin: only check for os log when we have external memory
  Blackfin: turn off caches when self initializing
  Blackfin: default to L1 bank A when L1 bank B does not exist
  Blackfin: bf506f-ezkit: new board port
  Blackfin: adi boards: drop old ELF define
  Blackfin: bootrom.h: sync with toolchain
  Blackfin: bootldr: use common defines
  Blackfin: ldrinfo: new command
  Blackfin: adi boards: enable ldrinfo

 MAINTAINERS|   54 +-
 arch/blackfin/config.mk|   15 +-
 arch/blackfin/cpu/gpio.c   |8 +-
 arch/blackfin/cpu/initcode.c   |   25 +-
 arch/blackfin/cpu/serial.h |   72 +-
 arch/blackfin/cpu/start.S  |   45 +-
 arch/blackfin/include/asm/blackfin_cdef.h  |6 +
 arch/blackfin/include/asm/blackfin_def.h   |   10 +
 arch/blackfin/include/asm/config.h |   10 +-
 arch/blackfin/include/asm/mach-bf506/BF504_cdef.h  | 1782 
 arch/blackfin/include/asm/mach-bf506/BF504_def.h   |  944 +++
 arch/blackfin/include/asm/mach-bf506/BF506_cdef.h  |   11 +
 arch/blackfin/include/asm/mach-bf506/BF506_def.h   |   11 +
 arch/blackfin/include/asm/mach-bf506/anomaly.h |  128 ++
 arch/blackfin/include/asm/mach-bf506/def_local.h   |5 +
 arch/blackfin/include/asm/mach-bf506/gpio.h|   52 +
 arch/blackfin/include/asm/mach-bf506/portmux.h |  148 ++
 arch/blackfin/include/asm/mach-bf506/ports.h   |   59 +
 arch/blackfin/include/asm/mach-bf518/BF512_def.h   |6 -
 .../asm/mach-bf527/ADSP-EDN-BF52x-extended_cdef.h  |  994 ---
 .../asm/mach-bf527/ADSP-EDN-BF52x-extended_def.h   |  503 --
 arch/blackfin/include/asm/mach-bf527/BF522_cdef.h  |  986 +++-
 arch/blackfin/include/asm/mach-bf527/BF522_def.h   |  495 ++-
 arch/blackfin/include/asm/mach-bf527/BF524_cdef.h  |   20 +-
 arch/blackfin/include/asm/mach-bf527/BF524_def.h   |   12 +-
 arch/blackfin/include/asm/mach-bf527/BF526_cdef.h  |  358 +
 arch/blackfin/include/asm/mach-bf527/BF526_def.h   |  181 +--
 arch/blackfin/include/asm/mach-bf533/BF531_def.h   |6 -
 arch/blackfin/include/asm/mach-bf533/BF532_def.h   |6 -
 arch/blackfin/include/asm/mach-bf533/BF533_def.h   |6 -
 .../asm/mach-bf537/ADSP-EDN-BF534-extended_cdef.h  | 1624 --
 .../asm/mach-bf537/ADSP-EDN-BF534-extended_def.h   |  819 -
 arch/blackfin/include/asm/mach-bf537/BF534_cdef.h  | 1614 ++-
 arch/blackfin/include/asm/mach-bf537/BF534_def.h   |  816 +-
 arch/blackfin/include/asm/mach-bf538/BF538_def.h   |6 -
 arch/blackfin/include/asm/mach-bf561/BF561_def.h   |7 +-
 .../include/asm/mach-common/bits/bootrom.h |   86 +-
 arch/blackfin/lib/board.c  |   21 +-
 arch/blackfin/lib/u-boot.lds.S |   10 +-
 board/bct-brettl2/config.mk|8 -
 board/bf506f-ezkit/Makefile|   54 +
 board/bf506f-ezkit/bf506f-ezkit.c  |   27 +
 board/bf518f-ezbrd/bf518f-ezbrd.c  |   30 +-
 board/bf518f-ezbrd/config.mk   |8 -
 board/bf525-ucr2/Makefile  |   54 +
 board/bf525-ucr2/bf525-ucr2.c  |   16 +
 board/bf526-ezbrd/config.mk|8 -
 board/bf527-ad7160-eval/config.mk  |8 -
 board/bf527-ezkit/config.mk|8 -
 board/bf527-sdp/config.mk  |   10 +-
 board/bf533-ezkit/con

[U-Boot] [PATCH 04/28] Blackfin: drop CONFIG_SYS_TEXT_BASE from boards

2010-12-26 Thread Mike Frysinger
We don't want/use this value for Blackfin boards, so punt it and have the
common code error out when people try to use it.

Signed-off-by: Mike Frysinger 
---
 arch/blackfin/config.mk   |4 
 board/bct-brettl2/config.mk   |3 ---
 board/bf518f-ezbrd/config.mk  |3 ---
 board/bf526-ezbrd/config.mk   |3 ---
 board/bf527-ad7160-eval/config.mk |3 ---
 board/bf527-ezkit/config.mk   |3 ---
 board/bf527-sdp/config.mk |3 ---
 board/bf533-ezkit/config.mk   |3 ---
 board/bf533-stamp/config.mk   |3 ---
 board/bf537-minotaur/config.mk|3 ---
 board/bf537-pnav/config.mk|3 ---
 board/bf537-srv1/config.mk|3 ---
 board/bf537-stamp/config.mk   |3 ---
 board/bf538f-ezkit/config.mk  |3 ---
 board/bf548-ezkit/config.mk   |3 ---
 board/bf561-acvilon/config.mk |3 ---
 board/bf561-ezkit/config.mk   |3 ---
 board/blackstamp/config.mk|3 ---
 board/blackvme/config.mk  |3 ---
 board/cm-bf527/config.mk  |3 ---
 board/cm-bf533/config.mk  |3 ---
 board/cm-bf537e/config.mk |3 ---
 board/cm-bf537u/config.mk |3 ---
 board/cm-bf548/config.mk  |3 ---
 board/cm-bf561/config.mk  |3 ---
 board/ibf-dsp561/config.mk|3 ---
 board/ip04/config.mk  |3 ---
 board/tcm-bf518/config.mk |3 ---
 board/tcm-bf537/config.mk |3 ---
 29 files changed, 4 insertions(+), 84 deletions(-)

diff --git a/arch/blackfin/config.mk b/arch/blackfin/config.mk
index ab117ca..ae9d987 100644
--- a/arch/blackfin/config.mk
+++ b/arch/blackfin/config.mk
@@ -69,3 +69,7 @@ LDR_FLAGS += $(LDR_FLAGS-y)
 ifeq ($(wildcard $(TOPDIR)/board/$(BOARD)/u-boot.lds*),)
 LDSCRIPT = $(obj)arch/$(ARCH)/lib/u-boot.lds.S
 endif
+
+ifneq ($(CONFIG_SYS_TEXT_BASE),)
+$(error do not set CONFIG_SYS_TEXT_BASE for Blackfin boards)
+endif
diff --git a/board/bct-brettl2/config.mk b/board/bct-brettl2/config.mk
index 0c02d44..df11d61 100644
--- a/board/bct-brettl2/config.mk
+++ b/board/bct-brettl2/config.mk
@@ -23,9 +23,6 @@
 # MA 02111-1307 USA
 #
 
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
 CONFIG_BFIN_CPU = bf536-0.3
 
 CFLAGS_lib += -O2
diff --git a/board/bf518f-ezbrd/config.mk b/board/bf518f-ezbrd/config.mk
index 9a54dbf..7664261 100644
--- a/board/bf518f-ezbrd/config.mk
+++ b/board/bf518f-ezbrd/config.mk
@@ -23,9 +23,6 @@
 # MA 02111-1307 USA
 #
 
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
 CONFIG_BFIN_CPU = bf518-0.0
 
 CFLAGS_lib += -O2
diff --git a/board/bf526-ezbrd/config.mk b/board/bf526-ezbrd/config.mk
index 46c09ea..60f6f9c 100644
--- a/board/bf526-ezbrd/config.mk
+++ b/board/bf526-ezbrd/config.mk
@@ -23,9 +23,6 @@
 # MA 02111-1307 USA
 #
 
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
 CONFIG_BFIN_CPU = bf526-0.0
 
 CFLAGS_lib += -O2
diff --git a/board/bf527-ad7160-eval/config.mk 
b/board/bf527-ad7160-eval/config.mk
index a6c272a..ecb31bf 100644
--- a/board/bf527-ad7160-eval/config.mk
+++ b/board/bf527-ad7160-eval/config.mk
@@ -23,9 +23,6 @@
 # MA 02111-1307 USA
 #
 
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
 CONFIG_BFIN_CPU = bf527-0.2
 
 CFLAGS_lib += -O2
diff --git a/board/bf527-ezkit/config.mk b/board/bf527-ezkit/config.mk
index 790fe99..436a7b3 100644
--- a/board/bf527-ezkit/config.mk
+++ b/board/bf527-ezkit/config.mk
@@ -23,9 +23,6 @@
 # MA 02111-1307 USA
 #
 
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
 CONFIG_BFIN_CPU = bf527-0.0
 
 CFLAGS_lib += -O2
diff --git a/board/bf527-sdp/config.mk b/board/bf527-sdp/config.mk
index 7cb935a..8eff4fd 100644
--- a/board/bf527-sdp/config.mk
+++ b/board/bf527-sdp/config.mk
@@ -23,9 +23,6 @@
 # MA 02111-1307 USA
 #
 
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
 CONFIG_BFIN_CPU = bf527-0.2
 
 CFLAGS_lib_generic += -O2
diff --git a/board/bf533-ezkit/config.mk b/board/bf533-ezkit/config.mk
index a0d1749..c775398 100644
--- a/board/bf533-ezkit/config.mk
+++ b/board/bf533-ezkit/config.mk
@@ -23,9 +23,6 @@
 # MA 02111-1307 USA
 #
 
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
 CONFIG_BFIN_CPU = bf533-0.3
 
 CFLAGS_lib += -O2
diff --git a/board/bf533-stamp/config.mk b/board/bf533-stamp/config.mk
index a0d1749..c775398 100644
--- a/board/bf533-stamp/config.mk
+++ b/board/bf533-stamp/config.mk
@@ -23,9 +23,6 @@
 # MA 02111-1307 USA
 #
 
-# This is not actually used for Blackfin boards so do not change it
-#CONFIG_SYS_TEXT_BASE = do-not-use-me
-
 CONFIG_BFIN_CPU = bf533-0.3
 
 CFLAGS_lib += -O2
diff --git a/board/bf5

[U-Boot] [PATCH 08/28] Blackfin: bf537-pnav/blackstamp/blackvme: drop empty config.mk files

2010-12-26 Thread Mike Frysinger
Signed-off-by: Mike Frysinger 
---
 board/bf537-pnav/config.mk |   25 -
 board/blackstamp/config.mk |   25 -
 board/blackvme/config.mk   |   24 
 3 files changed, 0 insertions(+), 74 deletions(-)
 delete mode 100644 board/bf537-pnav/config.mk
 delete mode 100644 board/blackstamp/config.mk
 delete mode 100644 board/blackvme/config.mk

diff --git a/board/bf537-pnav/config.mk b/board/bf537-pnav/config.mk
deleted file mode 100644
index 25f4c15..000
--- a/board/bf537-pnav/config.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# Copyright (c) 2005-2008 Analog Device Inc.
-#
-# (C) Copyright 2001
-# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
-#
-# See file CREDITS for list of people who contributed to this
-# project.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA 02111-1307 USA
-#
-
diff --git a/board/blackstamp/config.mk b/board/blackstamp/config.mk
deleted file mode 100644
index 25f4c15..000
--- a/board/blackstamp/config.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# Copyright (c) 2005-2008 Analog Device Inc.
-#
-# (C) Copyright 2001
-# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
-#
-# See file CREDITS for list of people who contributed to this
-# project.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA 02111-1307 USA
-#
-
diff --git a/board/blackvme/config.mk b/board/blackvme/config.mk
deleted file mode 100644
index dfcba5c..000
--- a/board/blackvme/config.mk
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Copyright (c) 2005-2008 Analog Device Inc.
-#
-# (C) Copyright 2001
-# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
-#
-# See file CREDITS for list of people who contributed to this
-# project.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
-# MA 02111-1307 USA
-#
-- 
1.7.3.4

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


[U-Boot] [PATCH 07/28] Blackfin: bf527-sdp: update custom CFLAGS paths

2010-12-26 Thread Mike Frysinger
Looks like the filesystem shuffling missed the SDP board.

Signed-off-by: Mike Frysinger 
---
 board/bf527-sdp/config.mk |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/board/bf527-sdp/config.mk b/board/bf527-sdp/config.mk
index ce8f75c..7271774 100644
--- a/board/bf527-sdp/config.mk
+++ b/board/bf527-sdp/config.mk
@@ -23,8 +23,8 @@
 # MA 02111-1307 USA
 #
 
-CFLAGS_lib_generic += -O2
-CFLAGS_lzma += -O2
+CFLAGS_lib += -O2
+CFLAGS_lib/lzma += -O2
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 6
-- 
1.7.3.4

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


[U-Boot] [PATCH 05/28] Blackfin: unify bootmode based LDR_FLAGS setup

2010-12-26 Thread Mike Frysinger
Unify this convention for all Blackfin boards.

Signed-off-by: Mike Frysinger 
---
 arch/blackfin/config.mk   |3 +++
 board/bct-brettl2/config.mk   |3 ---
 board/bf518f-ezbrd/config.mk  |3 ---
 board/bf526-ezbrd/config.mk   |3 ---
 board/bf527-ad7160-eval/config.mk |3 ---
 board/bf527-ezkit/config.mk   |3 ---
 board/bf527-sdp/config.mk |1 -
 board/bf533-ezkit/config.mk   |1 -
 board/bf533-stamp/config.mk   |1 -
 board/bf537-minotaur/config.mk|3 +--
 board/bf537-pnav/config.mk|3 ---
 board/bf537-srv1/config.mk|3 +--
 board/bf537-stamp/config.mk   |1 -
 board/bf538f-ezkit/config.mk  |1 -
 board/bf548-ezkit/config.mk   |1 -
 board/bf561-acvilon/config.mk |1 -
 board/bf561-ezkit/config.mk   |1 -
 board/blackstamp/config.mk|3 ---
 board/blackvme/config.mk  |3 ---
 board/cm-bf527/config.mk  |3 ---
 board/cm-bf533/config.mk  |1 -
 board/cm-bf537e/config.mk |1 -
 board/cm-bf537u/config.mk |1 -
 board/cm-bf548/config.mk  |1 -
 board/cm-bf561/config.mk  |1 -
 board/ibf-dsp561/config.mk|1 -
 board/ip04/config.mk  |1 -
 board/tcm-bf518/config.mk |3 ---
 board/tcm-bf537/config.mk |1 -
 29 files changed, 5 insertions(+), 50 deletions(-)

diff --git a/arch/blackfin/config.mk b/arch/blackfin/config.mk
index ae9d987..fbacdda 100644
--- a/arch/blackfin/config.mk
+++ b/arch/blackfin/config.mk
@@ -66,6 +66,9 @@ endif
 
 LDR_FLAGS += $(LDR_FLAGS-y)
 
+# Set some default LDR flags based on boot mode.
+LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
+
 ifeq ($(wildcard $(TOPDIR)/board/$(BOARD)/u-boot.lds*),)
 LDSCRIPT = $(obj)arch/$(ARCH)/lib/u-boot.lds.S
 endif
diff --git a/board/bct-brettl2/config.mk b/board/bct-brettl2/config.mk
index df11d61..6e7e543 100644
--- a/board/bct-brettl2/config.mk
+++ b/board/bct-brettl2/config.mk
@@ -27,6 +27,3 @@ CONFIG_BFIN_CPU = bf536-0.3
 
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
-
-# Set some default LDR flags based on boot mode.
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/bf518f-ezbrd/config.mk b/board/bf518f-ezbrd/config.mk
index 7664261..d941092 100644
--- a/board/bf518f-ezbrd/config.mk
+++ b/board/bf518f-ezbrd/config.mk
@@ -27,6 +27,3 @@ CONFIG_BFIN_CPU = bf518-0.0
 
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
-
-# Set some default LDR flags based on boot mode.
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/bf526-ezbrd/config.mk b/board/bf526-ezbrd/config.mk
index 60f6f9c..83fd42e 100644
--- a/board/bf526-ezbrd/config.mk
+++ b/board/bf526-ezbrd/config.mk
@@ -27,6 +27,3 @@ CONFIG_BFIN_CPU = bf526-0.0
 
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
-
-# Set some default LDR flags based on boot mode.
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/bf527-ad7160-eval/config.mk 
b/board/bf527-ad7160-eval/config.mk
index ecb31bf..05c7d3b 100644
--- a/board/bf527-ad7160-eval/config.mk
+++ b/board/bf527-ad7160-eval/config.mk
@@ -27,6 +27,3 @@ CONFIG_BFIN_CPU = bf527-0.2
 
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
-
-# Set some default LDR flags based on boot mode.
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/bf527-ezkit/config.mk b/board/bf527-ezkit/config.mk
index 436a7b3..b10c3d2 100644
--- a/board/bf527-ezkit/config.mk
+++ b/board/bf527-ezkit/config.mk
@@ -27,6 +27,3 @@ CONFIG_BFIN_CPU = bf527-0.0
 
 CFLAGS_lib += -O2
 CFLAGS_lib/lzma += -O2
-
-# Set some default LDR flags based on boot mode.
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/bf527-sdp/config.mk b/board/bf527-sdp/config.mk
index 8eff4fd..47c2989 100644
--- a/board/bf527-sdp/config.mk
+++ b/board/bf527-sdp/config.mk
@@ -30,4 +30,3 @@ CFLAGS_lzma += -O2
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 6
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/bf533-ezkit/config.mk b/board/bf533-ezkit/config.mk
index c775398..c45a197 100644
--- a/board/bf533-ezkit/config.mk
+++ b/board/bf533-ezkit/config.mk
@@ -30,4 +30,3 @@ CFLAGS_lib/lzma += -O2
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/bf533-stamp/config.mk b/board/bf533-stamp/config.mk
index c775398..c45a197 100644
--- a/board/bf533-stamp/config.mk
+++ b/board/bf533-stamp/config.mk
@@ -30,4 +30,3 @@ CFLAGS_lib/lzma += -O2
 
 # Set some default LDR flags based on boot mode.
 LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8
-LDR_FLAGS += $(LDR_FLAGS-$(CONFIG_BFIN_BOOT_MODE))
diff --git a/board/bf537-minotaur/config.mk b/board/bf537-minotaur/config.mk
index 0f0ed48..f7aa8ef 100644
--- a/board/bf537-minotaur/config.mk
+++ b/board/bf537-minotaur/config.mk
@@ -26,5 +26,4 @@
 CONFIG_BFIN_CP

[U-Boot] [PATCH 09/28] Blackfin: dnp5370: new board port

2010-12-26 Thread Mike Frysinger
From: Andreas Schallenberg 

Info about the hardware can be found here:
http://www.dilnetpc.com/dnp0086.htm

Signed-off-by: Andreas Schallenberg 
Signed-off-by: Mike Frysinger 
---
 MAINTAINERS   |4 ++
 board/dnp5370/Makefile|   54 +++
 board/dnp5370/dnp5370.c   |  104 
 boards.cfg|1 +
 doc/README.dnp5370|   67 +++
 include/configs/dnp5370.h |  128 +
 6 files changed, 358 insertions(+), 0 deletions(-)
 create mode 100644 board/dnp5370/Makefile
 create mode 100644 board/dnp5370/dnp5370.c
 create mode 100644 doc/README.dnp5370
 create mode 100644 include/configs/dnp5370.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 553930a..04dea46 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1045,6 +1045,10 @@ Blackfin Team 
BF548-EZKIT BF548
BF561-EZKIT BF561
 
+M.Hasewinkel (MHA) 
+
+   dnp5370 BF537
+
 Brent Kandetzki 
 
IP04BF532
diff --git a/board/dnp5370/Makefile b/board/dnp5370/Makefile
new file mode 100644
index 000..0d17676
--- /dev/null
+++ b/board/dnp5370/Makefile
@@ -0,0 +1,54 @@
+#
+# U-boot - Makefile
+#
+# Copyright (c) 2005-2007 Analog Device Inc.
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+COBJS-y:= $(BOARD).o
+
+SRCS   := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS-y))
+SOBJS  := $(addprefix $(obj),$(SOBJS-y))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+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/dnp5370/dnp5370.c b/board/dnp5370/dnp5370.c
new file mode 100644
index 000..da9eb5f
--- /dev/null
+++ b/board/dnp5370/dnp5370.c
@@ -0,0 +1,104 @@
+/*
+ * U-boot - main board file
+ *
+ * (C) Copyright 2010 3ality Digital Systems
+ *
+ * Copyright (c) 2005-2008 Analog Devices Inc.
+ *
+ * (C) Copyright 2000-2004
+ * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+ * MA 02110-1301 USA
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+static void disable_external_watchdog(void)
+{
+#ifdef CONFIG_DNP5370_EXT_WD_DISABLE
+   /* disable external HW watchdog with PH13 = WD1 = 1 */
+   gpio_request(GPIO_PH13, "ext_wd");
+   gpio_direction_output(GPIO_PH13, 1);
+#endif
+}
+
+int checkboard(void)
+{
+   printf("Board: SSV DilNet DNP5370\n");
+   return 0;
+}
+
+#ifdef CONFIG_BFIN_MAC
+static void board_init_enetaddr(uchar *mac_addr)
+{
+#ifdef CONFIG_SYS_NO_FLASH
+# define USE_MAC_IN_FLASH 0
+#else
+# define USE_MAC_IN_FLASH 1
+#endif
+   bool valid_mac = false;
+
+   if (USE_MAC_IN_FLASH) {
+   /* we cram the MAC in the last flash sector */
+   uchar *board_mac_addr = (uchar *)0x202F;
+   if (is_valid_ether_addr(board_mac_addr)) {
+   memcpy(mac_addr, board_mac_addr, 6);
+   

[U-Boot] [PATCH 06/28] Blackfin: move CONFIG_BFIN_CPU back to board config.h

2010-12-26 Thread Mike Frysinger
This is a revert of 821ad16fa9900c as Wolfgang doesn't like the new code.

Signed-off-by: Mike Frysinger 
---
 arch/blackfin/config.mk |8 +++-
 arch/blackfin/include/asm/config.h  |5 +
 arch/blackfin/lib/board.c   |2 +-
 board/bct-brettl2/config.mk |2 --
 board/bf518f-ezbrd/config.mk|2 --
 board/bf526-ezbrd/config.mk |2 --
 board/bf527-ad7160-eval/config.mk   |2 --
 board/bf527-ezkit/config.mk |2 --
 board/bf527-sdp/config.mk   |2 --
 board/bf533-ezkit/config.mk |2 --
 board/bf533-stamp/config.mk |2 --
 board/bf537-minotaur/config.mk  |2 --
 board/bf537-pnav/config.mk  |1 -
 board/bf537-srv1/config.mk  |2 --
 board/bf537-stamp/config.mk |2 --
 board/bf538f-ezkit/config.mk|2 --
 board/bf548-ezkit/config.mk |2 --
 board/bf561-acvilon/config.mk   |2 --
 board/bf561-ezkit/config.mk |2 --
 board/blackstamp/config.mk  |1 -
 board/blackvme/config.mk|2 --
 board/cm-bf527/config.mk|2 --
 board/cm-bf533/config.mk|2 --
 board/cm-bf537e/config.mk   |2 --
 board/cm-bf537u/config.mk   |2 --
 board/cm-bf548/config.mk|2 --
 board/cm-bf561/config.mk|2 --
 board/ibf-dsp561/config.mk  |2 --
 board/ip04/config.mk|2 --
 board/tcm-bf518/config.mk   |2 --
 board/tcm-bf537/config.mk   |2 --
 include/configs/bct-brettl2.h   |3 ++-
 include/configs/bf518f-ezbrd.h  |1 +
 include/configs/bf526-ezbrd.h   |1 +
 include/configs/bf527-ad7160-eval.h |1 +
 include/configs/bf527-ezkit.h   |1 +
 include/configs/bf527-sdp.h |1 +
 include/configs/bf533-ezkit.h   |1 +
 include/configs/bf533-stamp.h   |1 +
 include/configs/bf537-minotaur.h|1 +
 include/configs/bf537-pnav.h|1 +
 include/configs/bf537-srv1.h|1 +
 include/configs/bf537-stamp.h   |1 +
 include/configs/bf538f-ezkit.h  |1 +
 include/configs/bf548-ezkit.h   |1 +
 include/configs/bf561-acvilon.h |3 ++-
 include/configs/bf561-ezkit.h   |1 +
 include/configs/blackstamp.h|1 +
 include/configs/blackvme.h  |3 ++-
 include/configs/cm-bf527.h  |1 +
 include/configs/cm-bf533.h  |1 +
 include/configs/cm-bf537e.h |1 +
 include/configs/cm-bf537u.h |1 +
 include/configs/cm-bf548.h  |1 +
 include/configs/cm-bf561.h  |1 +
 include/configs/ibf-dsp561.h|1 +
 include/configs/ip04.h  |1 +
 include/configs/tcm-bf518.h |1 +
 include/configs/tcm-bf537.h |1 +
 59 files changed, 44 insertions(+), 59 deletions(-)

diff --git a/arch/blackfin/config.mk b/arch/blackfin/config.mk
index fbacdda..3a43bfc 100644
--- a/arch/blackfin/config.mk
+++ b/arch/blackfin/config.mk
@@ -25,6 +25,13 @@ CROSS_COMPILE ?= bfin-uclinux-
 
 STANDALONE_LOAD_ADDR = 0x1000 -m elf32bfin
 
+ifeq ($(CONFIG_BFIN_CPU),)
+CONFIG_BFIN_CPU := \
+   $(shell awk '$$2 == "CONFIG_BFIN_CPU" { print $$3 }' \
+   $(src)include/configs/$(BOARD).h)
+else
+CONFIG_BFIN_CPU := $(strip $(subst ",,$(CONFIG_BFIN_CPU)))
+endif
 CONFIG_BFIN_BOOT_MODE := $(strip $(subst ",,$(CONFIG_BFIN_BOOT_MODE)))
 
 PLATFORM_RELFLAGS += -ffixed-P3 -fomit-frame-pointer -mno-fdpic
@@ -33,7 +40,6 @@ PLATFORM_CPPFLAGS += -DCONFIG_BLACKFIN
 LDFLAGS += --gc-sections -m elf32bfin
 PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
 
-PLATFORM_CPPFLAGS += -DBFIN_CPU='"$(CONFIG_BFIN_CPU)"'
 PLATFORM_RELFLAGS += -mcpu=$(CONFIG_BFIN_CPU)
 
 ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS)
diff --git a/arch/blackfin/include/asm/config.h 
b/arch/blackfin/include/asm/config.h
index 0437252..f0f3a39 100644
--- a/arch/blackfin/include/asm/config.h
+++ b/arch/blackfin/include/asm/config.h
@@ -12,6 +12,11 @@
 /* Some of our defines use this (like CONFIG_SYS_GBL_DATA_ADDR) */
 #include 
 
+/* Sanity check CONFIG_BFIN_CPU */
+#ifndef CONFIG_BFIN_CPU
+# error CONFIG_BFIN_CPU: your board config needs to define this
+#endif
+
 #ifndef CONFIG_BFIN_SCRATCH_REG
 # define CONFIG_BFIN_SCRATCH_REG retn
 #endif
diff --git a/arch/blackfin/lib/board.c b/arch/blackfin/lib/board.c
index 59a0810..2b1f78c 100644
--- a/arch/blackfin/lib/board.c
+++ b/arch/blackfin/lib/board.c
@@ -254,7 +254,7 @@ void board_init_f(ulong bootflag)
memset((void *)bd, 0, sizeof(bd_t));
 
bd->bi_r_version = version_string;
-   bd->bi_cpu = BFIN_CPU;
+   bd->bi_cpu = MK_STR(CONFIG_BFIN_CPU);
bd->bi_board_name = BFIN_BOARD_NAME;
bd->bi_vco = get_vco();
bd->bi_cclk = get_cclk();
diff --git a/board/bct-brettl2/config.mk b/board/bct-brettl2/config.mk
index 6e7e543..799a682 100644
--- a/board/bct-brettl2/config.

[U-Boot] [PATCH 10/28] Blackfin: bf525-ucr2: new board port

2010-12-26 Thread Mike Frysinger
From: Chong Huang 

Signed-off-by: Chong Huang 
Signed-off-by: Haitao Zhang 
Signed-off-by: Mike Frysinger 
---
 MAINTAINERS   |5 ++
 board/bf525-ucr2/Makefile |   54 +
 board/bf525-ucr2/bf525-ucr2.c |   16 ++
 boards.cfg|1 +
 include/configs/bf525-ucr2.h  |  102 +
 5 files changed, 178 insertions(+), 0 deletions(-)
 create mode 100644 board/bf525-ucr2/Makefile
 create mode 100644 board/bf525-ucr2/bf525-ucr2.c
 create mode 100644 include/configs/bf525-ucr2.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 04dea46..3a68bed 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1089,6 +1089,11 @@ Anton Shurpin 
 
BF561-ACVILON   BF561
 
+Haitao Zhang 
+Chong Huang 
+
+   bf525-ucr2  BF525
+
 #
 # End of MAINTAINERS list  #
 #
diff --git a/board/bf525-ucr2/Makefile b/board/bf525-ucr2/Makefile
new file mode 100644
index 000..cde8168
--- /dev/null
+++ b/board/bf525-ucr2/Makefile
@@ -0,0 +1,54 @@
+#
+# U-boot - Makefile
+#
+# Copyright (c) 2005-2008 Analog Device Inc.
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+COBJS-y:= $(BOARD).o
+
+SRCS   := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS-y))
+SOBJS  := $(addprefix $(obj),$(SOBJS-y))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+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/bf525-ucr2/bf525-ucr2.c b/board/bf525-ucr2/bf525-ucr2.c
new file mode 100644
index 000..3e6df1f
--- /dev/null
+++ b/board/bf525-ucr2/bf525-ucr2.c
@@ -0,0 +1,16 @@
+/* U-boot - bf525-ucr2.c  board specific routines
+ *
+ * (C) Copyright 2000-2004
+ * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
+#include 
+
+int checkboard(void)
+{
+   printf("Board: bf525-ucr2\n");
+   printf("Support: http://www.ucrobotics.com/\n";);
+   return 0;
+}
diff --git a/boards.cfg b/boards.cfg
index 9a327d5..b8d077f 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -167,6 +167,7 @@ mimc200  avr32   at32ap  -  
 mimc
 hammerhead   avr32   at32ap  -   
miromico   at32ap700x
 bct-brettl2  blackfinblackfin
 bf518f-ezbrd blackfinblackfin
+bf525-ucr2   blackfinblackfin
 bf526-ezbrd  blackfinblackfin
 bf527-ad7160-evalblackfinblackfin
 bf527-ezkit  blackfinblackfin
diff --git a/include/configs/bf525-ucr2.h b/include/configs/bf525-ucr2.h
new file mode 100644
index 000..1f65130
--- /dev/null
+++ b/include/configs/bf525-ucr2.h
@@ -0,0 +1,102 @@
+/*
+ * U-boot - Configuration file for bf525-ucr2 board
+ * The board includes ADSP-BF525 rev. 0.2,
+ * 32-bit SDRAM (SAMSUNG K4S561632H-UC75),
+ * USB 2.0 High Speed OTG USB WIFI,
+ * SPI flash (cFeon EN25Q128 16 MB),
+ * Support PPI and ITU-R656,
+ * See http://www.ucrobotics.com/?q=cn/ucr2
+ */
+
+#ifndef __CONFIG_BF525_UCR2_H__
+#define __CONFIG_BF525_UCR2_H__
+
+#include 
+
+/*
+ * Processor Settings
+ */
+#define CONFIG_BFIN_CPU bf525-0.2
+#define CONFIG_BFIN_BOOT_MODE   BFIN_BOOT_SPI_MASTER
+
+/*
+ * Clock Settings
+ * CCLK = (CLKIN * VCO_MULT) / CCLK_DIV
+ * SCLK = (CLKIN * VCO_MULT) / SCLK_DIV
+ */
+/* CONFIG_CLKIN_HZ is any value in Hz  */
+#define CONFIG_CLKIN_HZ2400
+/* CLKIN_HALF controls the DF bit in PLL_CTL 

[U-Boot] [PATCH 11/28] Blackfin: serial: clean up muxing a bit

2010-12-26 Thread Mike Frysinger
Signed-off-by: Mike Frysinger 
---
 arch/blackfin/cpu/serial.h |   51 +--
 1 files changed, 20 insertions(+), 31 deletions(-)

diff --git a/arch/blackfin/cpu/serial.h b/arch/blackfin/cpu/serial.h
index f9e311f..b0cf09a 100644
--- a/arch/blackfin/cpu/serial.h
+++ b/arch/blackfin/cpu/serial.h
@@ -74,23 +74,19 @@ struct bfin_mmr_serial {
 };
 #undef __BFP
 
-#ifndef UART_LSR
-# if (CONFIG_UART_CONSOLE == 3)
-#  define UART_BASE UART3_DLL
-# elif (CONFIG_UART_CONSOLE == 2)
-#  define UART_BASE UART2_DLL
-# elif (CONFIG_UART_CONSOLE == 1)
-#  define UART_BASE UART1_DLL
-# elif (CONFIG_UART_CONSOLE == 0)
-#  define UART_BASE UART0_DLL
-# endif
+#define __PASTE_UART(num, pfx, sfx) pfx##num##_##sfx
+#define _PASTE_UART(num, pfx, sfx) __PASTE_UART(num, pfx, sfx)
+#define MMR_UART(mmr) _PASTE_UART(CONFIG_UART_CONSOLE, UART, DLL)
+#define P_UART(pin) _PASTE_UART(CONFIG_UART_CONSOLE, P_UART, pin)
+
+#ifndef UART_DLL
+# define UART_DLL MMR_UART(DLL)
 #else
 # if CONFIG_UART_CONSOLE != 0
 #  error CONFIG_UART_CONSOLE must be 0 on parts with only one UART
 # endif
-# define UART_BASE UART_DLL
 #endif
-#define pUART ((volatile struct bfin_mmr_serial *)UART_BASE)
+#define pUART ((volatile struct bfin_mmr_serial *)UART_DLL)
 
 #ifdef __ADSPBF54x__
 # define ACCESS_LATCH()
@@ -106,18 +102,7 @@ __attribute__((always_inline))
 static inline void serial_do_portmux(void)
 {
if (!BFIN_DEBUG_EARLY_SERIAL) {
-   const unsigned short pins[] = {
-#if CONFIG_UART_CONSOLE == 0
-   P_UART0_TX, P_UART0_RX,
-#elif CONFIG_UART_CONSOLE == 1
-   P_UART1_TX, P_UART1_RX,
-#elif CONFIG_UART_CONSOLE == 2
-   P_UART2_TX, P_UART2_RX,
-#elif CONFIG_UART_CONSOLE == 3
-   P_UART3_TX, P_UART3_RX,
-#endif
-   0,
-   };
+   const unsigned short pins[] = { P_UART(RX), P_UART(TX), 0, };
peripheral_request_list(pins, "bfin-uart");
return;
}
@@ -141,13 +126,11 @@ static inline void serial_do_portmux(void)
}
SSYNC();
 #elif defined(__ADSPBF537__) || defined(__ADSPBF536__) || 
defined(__ADSPBF534__)
-# define DO_MUX(func, tx, rx) \
-   bfin_write_PORT_MUX(bfin_read_PORT_MUX() & ~(func)); \
-   bfin_write_PORTF_FER(bfin_read_PORTF_FER() | PF##tx | PF##rx);
-   switch (CONFIG_UART_CONSOLE) {
-   case 0: DO_MUX(PFDE, 0, 1); break;
-   case 1: DO_MUX(PFTE, 2, 3); break;
-   }
+   const uint16_t func[] = { PFDE, PFTE, };
+   bfin_write_PORT_MUX(bfin_read_PORT_MUX() & ~func[CONFIG_UART_CONSOLE]);
+   bfin_write_PORTF_FER(bfin_read_PORTF_FER() |
+(1 << P_IDENT(P_UART(RX))) |
+(1 << P_IDENT(P_UART(TX;
SSYNC();
 #elif defined(__ADSPBF54x__)
 # define DO_MUX(port, tx, rx) \
@@ -160,6 +143,12 @@ static inline void serial_do_portmux(void)
case 3: DO_MUX(B, 6, 7); break; /* Port B; PB6 and PB7 */
}
SSYNC();
+#elif defined(__ADSPBF561__)
+   /* UART pins could be GPIO, but they aren't pin muxed.  */
+#else
+# if (P_UART(RX) & P_DEFINED) || (P_UART(TX) & P_DEFINED)
+#  error "missing portmux logic for UART"
+# endif
 #endif
 }
 
-- 
1.7.3.4

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


[U-Boot] [PATCH 14/28] Blackfin: bf561-ezkit/ibf-dsp561: invert env offset/addr logic

2010-12-26 Thread Mike Frysinger
Have CONFIG_ENV_ADDR be based on CONFIG_ENV_OFFSET rather than the other
way around so that we can use CONFIG_ENV_OFFSET during build.  It also
avoids a little address duplication.

Signed-off-by: Mike Frysinger 
---
 include/configs/bf561-ezkit.h |4 ++--
 include/configs/ibf-dsp561.h  |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/configs/bf561-ezkit.h b/include/configs/bf561-ezkit.h
index 7081d5f..33c7e18 100644
--- a/include/configs/bf561-ezkit.h
+++ b/include/configs/bf561-ezkit.h
@@ -80,8 +80,8 @@
 #define CONFIG_SYS_MAX_FLASH_SECT  135
 /* The BF561-EZKIT uses a top boot flash */
 #define CONFIG_ENV_IS_IN_FLASH 1
-#define CONFIG_ENV_ADDR0x20004000
-#define CONFIG_ENV_OFFSET  (CONFIG_ENV_ADDR - CONFIG_SYS_FLASH_BASE)
+#define CONFIG_ENV_OFFSET  0x4000
+#define CONFIG_ENV_ADDR(CONFIG_SYS_FLASH_BASE + 
CONFIG_ENV_OFFSET)
 #define CONFIG_ENV_SIZE0x2000
 #define CONFIG_ENV_SECT_SIZE   0x1
 #if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)
diff --git a/include/configs/ibf-dsp561.h b/include/configs/ibf-dsp561.h
index f3d6c8b..055f8a0 100644
--- a/include/configs/ibf-dsp561.h
+++ b/include/configs/ibf-dsp561.h
@@ -80,8 +80,8 @@
 #define CONFIG_SYS_MAX_FLASH_SECT  135 /* max number of sectors on one 
chip */
 /* The BF561-EZKIT uses a top boot flash */
 #define CONFIG_ENV_IS_IN_FLASH 1
-#define CONFIG_ENV_ADDR0x20004000
-#define CONFIG_ENV_OFFSET  (CONFIG_ENV_ADDR - 
CONFIG_SYS_FLASH_BASE)
+#define CONFIG_ENV_OFFSET  0x4000
+#define CONFIG_ENV_ADDR(CONFIG_SYS_FLASH_BASE + 
CONFIG_ENV_OFFSET)
 #define CONFIG_ENV_SIZE0x2000
 #define CONFIG_ENV_SECT_SIZE   0x1 /* Total Size of Environment Sector */
 #if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_BYPASS)
-- 
1.7.3.4

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


[U-Boot] [PATCH 12/28] Blackfin: bf537-minotaur/bf537-srv1: undefine nfs when net is disabled

2010-12-26 Thread Mike Frysinger
Fixes a build error due to new partial linking logic.

Signed-off-by: Mike Frysinger 
---
 include/configs/bf537-minotaur.h |1 +
 include/configs/bf537-srv1.h |1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/configs/bf537-minotaur.h b/include/configs/bf537-minotaur.h
index 86aa1f6..11929c7 100644
--- a/include/configs/bf537-minotaur.h
+++ b/include/configs/bf537-minotaur.h
@@ -156,6 +156,7 @@
 # define CONFIG_CMD_PING
 #else
 # undef CONFIG_CMD_NET
+# undef CONFIG_CMD_NFS
 #endif
 
 #define CONFIG_CMD_BOOTLDR
diff --git a/include/configs/bf537-srv1.h b/include/configs/bf537-srv1.h
index 7e9dd36..e8024d7 100644
--- a/include/configs/bf537-srv1.h
+++ b/include/configs/bf537-srv1.h
@@ -156,6 +156,7 @@
 # define CONFIG_CMD_PING
 #else
 # undef CONFIG_CMD_NET
+# undef CONFIG_CMD_NFS
 #endif
 
 #define CONFIG_CMD_BOOTLDR
-- 
1.7.3.4

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


[U-Boot] [PATCH 15/28] Blackfin: fix bd_t handling

2010-12-26 Thread Mike Frysinger
The recent global data changes (making the size autogenerated) broke the
board info handling on Blackfin ports as we were lying and lumping the
bd_t size in with the gd_t size.  So use the new dedicated bd_t size to
setup its own address in memory.

Signed-off-by: Mike Frysinger 
---
 arch/blackfin/include/asm/config.h |5 -
 arch/blackfin/lib/board.c  |   10 ++
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/arch/blackfin/include/asm/config.h 
b/arch/blackfin/include/asm/config.h
index f0f3a39..89814cd 100644
--- a/arch/blackfin/include/asm/config.h
+++ b/arch/blackfin/include/asm/config.h
@@ -109,8 +109,11 @@
 #ifndef CONFIG_SYS_GBL_DATA_ADDR
 # define CONFIG_SYS_GBL_DATA_ADDR (CONFIG_SYS_MALLOC_BASE - 
GENERATED_GBL_DATA_SIZE)
 #endif
+#ifndef CONFIG_SYS_BD_INFO_ADDR
+# define CONFIG_SYS_BD_INFO_ADDR (CONFIG_SYS_GBL_DATA_ADDR - 
GENERATED_BD_INFO_SIZE)
+#endif
 #ifndef CONFIG_STACKBASE
-# define CONFIG_STACKBASE (CONFIG_SYS_GBL_DATA_ADDR - 4)
+# define CONFIG_STACKBASE (CONFIG_SYS_BD_INFO_ADDR - 4)
 #endif
 #ifndef CONFIG_SYS_MEMTEST_START
 # define CONFIG_SYS_MEMTEST_START 0
diff --git a/arch/blackfin/lib/board.c b/arch/blackfin/lib/board.c
index 2b1f78c..47d487f 100644
--- a/arch/blackfin/lib/board.c
+++ b/arch/blackfin/lib/board.c
@@ -207,7 +207,6 @@ extern int timer_init(void);
 
 void board_init_f(ulong bootflag)
 {
-   ulong addr;
bd_t *bd;
char buf[32];
 
@@ -244,14 +243,9 @@ void board_init_f(ulong bootflag)
gd = (gd_t *) (CONFIG_SYS_GBL_DATA_ADDR);
memset((void *)gd, 0, GENERATED_GBL_DATA_SIZE);
 
-   /* Board data initialization */
-   addr = (CONFIG_SYS_GBL_DATA_ADDR + sizeof(gd_t));
-
-   /* Align to 4 byte boundary */
-   addr &= ~(4 - 1);
-   bd = (bd_t *) addr;
+   bd = (bd_t *) (CONFIG_SYS_BD_INFO_ADDR);
gd->bd = bd;
-   memset((void *)bd, 0, sizeof(bd_t));
+   memset((void *)bd, 0, GENERATED_BD_INFO_SIZE);
 
bd->bi_r_version = version_string;
bd->bi_cpu = MK_STR(CONFIG_BFIN_CPU);
-- 
1.7.3.4

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


[U-Boot] [PATCH 13/28] Blackfin: bf537: fix L1 data defines

2010-12-26 Thread Mike Frysinger
The __BFIN_DEF_ADSP_BF537_proc__ define isn't setup anymore, so use
the one coming from the compiler.

Signed-off-by: Mike Frysinger 
---
 arch/blackfin/include/asm/mach-bf537/BF534_def.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/blackfin/include/asm/mach-bf537/BF534_def.h 
b/arch/blackfin/include/asm/mach-bf537/BF534_def.h
index e04676c..e854eed 100644
--- a/arch/blackfin/include/asm/mach-bf537/BF534_def.h
+++ b/arch/blackfin/include/asm/mach-bf537/BF534_def.h
@@ -10,7 +10,7 @@
 
 #include "ADSP-EDN-BF534-extended_def.h"
 
-#if defined(__BFIN_DEF_ADSP_BF537_proc__) || 
!defined(__BFIN_DEF_ADSP_BF536_proc__)
+#if !defined(__ADSPBF536__)
 #define L1_DATA_A_SRAM 0xFF80 /* 0xFF80 -> 0xFF803FFF Data Bank A SRAM 
*/
 #define L1_DATA_A_SRAM_SIZE (0xFF803FFF - 0xFF80 + 1)
 #define L1_DATA_A_SRAM_END (L1_DATA_A_SRAM + L1_DATA_A_SRAM_SIZE)
-- 
1.7.3.4

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


[U-Boot] [PATCH 17/28] Blackfin: drop duplicate system mmr and L1 scratch defines

2010-12-26 Thread Mike Frysinger
Common code already takes care of setting up these defines when a port
hasn't specified them, so punt the duplicate values.

Signed-off-by: Mike Frysinger 
---
 arch/blackfin/include/asm/mach-bf518/BF512_def.h |6 --
 arch/blackfin/include/asm/mach-bf533/BF531_def.h |6 --
 arch/blackfin/include/asm/mach-bf533/BF532_def.h |6 --
 arch/blackfin/include/asm/mach-bf533/BF533_def.h |6 --
 arch/blackfin/include/asm/mach-bf537/BF534_def.h |6 --
 arch/blackfin/include/asm/mach-bf538/BF538_def.h |6 --
 arch/blackfin/include/asm/mach-bf561/BF561_def.h |7 +--
 7 files changed, 1 insertions(+), 42 deletions(-)

diff --git a/arch/blackfin/include/asm/mach-bf518/BF512_def.h 
b/arch/blackfin/include/asm/mach-bf518/BF512_def.h
index abc88ca..bbaf22f 100644
--- a/arch/blackfin/include/asm/mach-bf518/BF512_def.h
+++ b/arch/blackfin/include/asm/mach-bf518/BF512_def.h
@@ -513,11 +513,5 @@
 #define L1_INST_SRAM 0xFFA0 /* 0xFFA0 -> 0xFFA07FFF Instruction Bank A 
SRAM */
 #define L1_INST_SRAM_SIZE (0xFFA07FFF - 0xFFA0 + 1)
 #define L1_INST_SRAM_END (L1_INST_SRAM + L1_INST_SRAM_SIZE)
-#define L1_SRAM_SCRATCH 0xFFB0 /* 0xFFB0 -> 0xFFB00FFF Scratchpad SRAM 
*/
-#define L1_SRAM_SCRATCH_SIZE (0xFFB00FFF - 0xFFB0 + 1)
-#define L1_SRAM_SCRATCH_END (L1_SRAM_SCRATCH + L1_SRAM_SCRATCH_SIZE)
-#define SYSMMR_BASE 0xFFC0 /* 0xFFC0 -> 0x MMR registers */
-#define SYSMMR_BASE_SIZE (0x - 0xFFC0 + 1)
-#define SYSMMR_BASE_END (SYSMMR_BASE + SYSMMR_BASE_SIZE)
 
 #endif /* __BFIN_DEF_ADSP_BF512_proc__ */
diff --git a/arch/blackfin/include/asm/mach-bf533/BF531_def.h 
b/arch/blackfin/include/asm/mach-bf533/BF531_def.h
index 5d61972..3b61aaf 100644
--- a/arch/blackfin/include/asm/mach-bf533/BF531_def.h
+++ b/arch/blackfin/include/asm/mach-bf533/BF531_def.h
@@ -438,12 +438,6 @@
 #define L1_INST_SRAM 0xFFA08000 /* 0xFFA08000 -> 0xFFA0BFFF Instruction Bank A 
SRAM */
 #define L1_INST_SRAM_SIZE (0xFFA0BFFF - 0xFFA08000 + 1)
 #define L1_INST_SRAM_END (L1_INST_SRAM + L1_INST_SRAM_SIZE)
-#define L1_SRAM_SCRATCH 0xFFB0 /* 0xFFB0 -> 0xFFB00FFF Scratchpad SRAM 
*/
-#define L1_SRAM_SCRATCH_SIZE (0xFFB00FFF - 0xFFB0 + 1)
-#define L1_SRAM_SCRATCH_END (L1_SRAM_SCRATCH + L1_SRAM_SCRATCH_SIZE)
-#define SYSMMR_BASE 0xFFC0 /* 0xFFC0 -> 0x MMR registers */
-#define SYSMMR_BASE_SIZE (0x - 0xFFC0 + 1)
-#define SYSMMR_BASE_END (SYSMMR_BASE + SYSMMR_BASE_SIZE)
 #endif
 
 #endif /* __BFIN_DEF_ADSP_BF531_proc__ */
diff --git a/arch/blackfin/include/asm/mach-bf533/BF532_def.h 
b/arch/blackfin/include/asm/mach-bf533/BF532_def.h
index f7378b7..64f55f5 100644
--- a/arch/blackfin/include/asm/mach-bf533/BF532_def.h
+++ b/arch/blackfin/include/asm/mach-bf533/BF532_def.h
@@ -12,12 +12,6 @@
 #define L1_INST_SRAM 0xFFA08000 /* 0xFFA08000 -> 0xFFA0BFFF Instruction Bank A 
SRAM */
 #define L1_INST_SRAM_SIZE (0xFFA0BFFF - 0xFFA08000 + 1)
 #define L1_INST_SRAM_END (L1_INST_SRAM + L1_INST_SRAM_SIZE)
-#define L1_SRAM_SCRATCH 0xFFB0 /* 0xFFB0 -> 0xFFB00FFF Scratchpad SRAM 
*/
-#define L1_SRAM_SCRATCH_SIZE (0xFFB00FFF - 0xFFB0 + 1)
-#define L1_SRAM_SCRATCH_END (L1_SRAM_SCRATCH + L1_SRAM_SCRATCH_SIZE)
-#define SYSMMR_BASE 0xFFC0 /* 0xFFC0 -> 0x MMR registers */
-#define SYSMMR_BASE_SIZE (0x - 0xFFC0 + 1)
-#define SYSMMR_BASE_END (SYSMMR_BASE + SYSMMR_BASE_SIZE)
 #endif
 
 #endif /* __BFIN_DEF_ADSP_BF532_proc__ */
diff --git a/arch/blackfin/include/asm/mach-bf533/BF533_def.h 
b/arch/blackfin/include/asm/mach-bf533/BF533_def.h
index b77efe0..3c0595f 100644
--- a/arch/blackfin/include/asm/mach-bf533/BF533_def.h
+++ b/arch/blackfin/include/asm/mach-bf533/BF533_def.h
@@ -17,11 +17,5 @@
 #define L1_INST_SRAM 0xFFA0 /* 0xFFA0 -> 0xFFA07FFF Instruction Bank A 
SRAM */
 #define L1_INST_SRAM_SIZE (0xFFA07FFF - 0xFFA0 + 1)
 #define L1_INST_SRAM_END (L1_INST_SRAM + L1_INST_SRAM_SIZE)
-#define L1_SRAM_SCRATCH 0xFFB0 /* 0xFFB0 -> 0xFFB00FFF Scratchpad SRAM 
*/
-#define L1_SRAM_SCRATCH_SIZE (0xFFB00FFF - 0xFFB0 + 1)
-#define L1_SRAM_SCRATCH_END (L1_SRAM_SCRATCH + L1_SRAM_SCRATCH_SIZE)
-#define SYSMMR_BASE 0xFFC0 /* 0xFFC0 -> 0x MMR registers */
-#define SYSMMR_BASE_SIZE (0x - 0xFFC0 + 1)
-#define SYSMMR_BASE_END (SYSMMR_BASE + SYSMMR_BASE_SIZE)
 
 #endif /* __BFIN_DEF_ADSP_BF533_proc__ */
diff --git a/arch/blackfin/include/asm/mach-bf537/BF534_def.h 
b/arch/blackfin/include/asm/mach-bf537/BF534_def.h
index e854eed..c388eef 100644
--- a/arch/blackfin/include/asm/mach-bf537/BF534_def.h
+++ b/arch/blackfin/include/asm/mach-bf537/BF534_def.h
@@ -21,11 +21,5 @@
 #define L1_INST_SRAM 0xFFA0 /* 0xFFA0 -> 0xFFA07FFF Instruction Bank A 
SRAM */
 #define L1_INST_SRAM_SIZE (0xFFA07FFF - 0xFFA0 + 1)
 #define L1_INST_SRAM_END (L1_INST_SRAM + L1_INST_SRAM_SIZE)
-#define L1_SRAM_SCRATCH 0xFFB0 /* 0xFFB0 -> 0xFFB00FFF Scratchpad SRAM 
*/
-#define L1_SRAM_SCRATCH_SIZE (0xF

[U-Boot] [PATCH 20/28] Blackfin: only check for os log when we have external memory

2010-12-26 Thread Mike Frysinger
If the part has no external memory configured, then there will be no os
log for us to check, and any attempt to access that memory will trigger
hardware errors.

Signed-off-by: Mike Frysinger 
---
 arch/blackfin/lib/board.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/blackfin/lib/board.c b/arch/blackfin/lib/board.c
index 47d487f..362b8c4 100644
--- a/arch/blackfin/lib/board.c
+++ b/arch/blackfin/lib/board.c
@@ -390,7 +390,7 @@ void board_init_r(gd_t * id, ulong dest_addr)
post_run(NULL, POST_RAM | post_bootmode_get(0));
 #endif
 
-   if (bfin_os_log_check()) {
+   if (CONFIG_MEM_SIZE && bfin_os_log_check()) {
puts("\nLog buffer from operating system:\n");
bfin_os_log_dump();
puts("\n");
-- 
1.7.3.4

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


[U-Boot] [PATCH 21/28] Blackfin: turn off caches when self initializing

2010-12-26 Thread Mike Frysinger
When bootstrapping ourselves on the fly at runtime (via "go"), we need to
turn off the caches to avoid taking software exceptions.  Since caches
need CPLBs and CPLBs need exception handlers, but we're about to rewrite
the code in memory where those exception handlers live, we need to turn
off caches first.

This new code also encourages a slight code optimization by storing the
MMR bases in dedicated registers so we don't have to fully load up the
pointer regs multiple times.

Signed-off-by: Mike Frysinger 
---
 arch/blackfin/cpu/start.S |   45 +
 1 files changed, 33 insertions(+), 12 deletions(-)

diff --git a/arch/blackfin/cpu/start.S b/arch/blackfin/cpu/start.S
index 7a3abba..15ecb1e 100644
--- a/arch/blackfin/cpu/start.S
+++ b/arch/blackfin/cpu/start.S
@@ -52,6 +52,19 @@ ENTRY(_start)
sp.l = LO(L1_SRAM_SCRATCH_END - 20);
sp.h = HI(L1_SRAM_SCRATCH_END - 20);
 
+   /* Optimization register tricks: keep a base value in the
+* reserved P registers so we use the load/store with an
+* offset syntax.  R0 = [P5 + ];
+*   P4 - system MMR base
+*   P5 - core MMR base
+*/
+#ifdef CONFIG_HW_WATCHDOG
+   p4.l = 0;
+   p4.h = HI(SYSMMR_BASE);
+#endif
+   p5.l = 0;
+   p5.h = HI(COREMMR_BASE);
+
 #ifdef CONFIG_HW_WATCHDOG
 # ifndef CONFIG_HW_WATCHDOG_TIMEOUT_START
 #  define CONFIG_HW_WATCHDOG_TIMEOUT_START 5000
@@ -60,13 +73,11 @@ ENTRY(_start)
 * That should be long enough to bootstrap ourselves up and
 * then the common u-boot code can take over.
 */
-   P0.L = LO(WDOG_CNT);
-   P0.H = HI(WDOG_CNT);
-   R0.L = 0;
-   R0.H = HI(MSEC_TO_SCLK(CONFIG_HW_WATCHDOG_TIMEOUT_START));
-   [P0] = R0;
+   r0 = 0;
+   r0.h = HI(MSEC_TO_SCLK(CONFIG_HW_WATCHDOG_TIMEOUT_START));
+   [p4 + (WDOG_CNT - SYSMMR_BASE)] = r0;
/* fire up the watchdog - R0.L above needs to be 0x */
-   W[P0 + (WDOG_CTL - WDOG_CNT)] = R0;
+   W[p4 + (WDOG_CTL - SYSMMR_BASE)] = r0;
 #endif
 
/* Turn on the serial for debugging the init process */
@@ -121,6 +132,18 @@ ENTRY(_start)
if cc jump .Lnorelocate;
r6 = 0 (x);
 
+   /* Turn off caches as they require CPLBs and a CPLB miss requires
+* a software exception handler to process it.  But we're about to
+* clobber any previous executing software (like U-Boot that just
+* launched a new U-Boot via 'go'), so any handler state will be
+* unreliable after the memcpy below.
+*/
+   serial_early_puts("Kill Caches");
+   r0 = 0;
+   [p5 + (IMEM_CONTROL - COREMMR_BASE)] = r0;
+   [p5 + (DMEM_CONTROL - COREMMR_BASE)] = r0;
+   ssync;
+
/* In bypass mode, we don't have an LDR with an init block
 * so we need to explicitly call it ourselves.  This will
 * reprogram our clocks, memory, and setup our async banks.
@@ -204,17 +227,15 @@ ENTRY(_start)
serial_early_puts("Lower to 15");
r0 = r7;
r1 = r6;
-   p0.l = LO(EVT15);
-   p0.h = HI(EVT15);
p1.l = .Lenable_nested;
p1.h = .Lenable_nested;
-   [p0] = p1;
+   [p5 + (EVT15 - COREMMR_BASE)] = p1;
r7 = EVT_IVG15 (z);
sti r7;
raise 15;
-   p4.l = .LWAIT_HERE;
-   p4.h = .LWAIT_HERE;
-   reti = p4;
+   p3.l = .LWAIT_HERE;
+   p3.h = .LWAIT_HERE;
+   reti = p3;
rti;
 
/* Enable nested interrupts before continuing with cpu init */
-- 
1.7.3.4

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


[U-Boot] [PATCH 23/28] Blackfin: bf506f-ezkit: new board port

2010-12-26 Thread Mike Frysinger
Signed-off-by: Mike Frysinger 
---
 board/bf506f-ezkit/Makefile   |   54 +++
 board/bf506f-ezkit/bf506f-ezkit.c |   27 +
 boards.cfg|1 +
 include/configs/bf506f-ezkit.h|  106 +
 4 files changed, 188 insertions(+), 0 deletions(-)
 create mode 100644 board/bf506f-ezkit/Makefile
 create mode 100644 board/bf506f-ezkit/bf506f-ezkit.c
 create mode 100644 include/configs/bf506f-ezkit.h

diff --git a/board/bf506f-ezkit/Makefile b/board/bf506f-ezkit/Makefile
new file mode 100644
index 000..cde8168
--- /dev/null
+++ b/board/bf506f-ezkit/Makefile
@@ -0,0 +1,54 @@
+#
+# U-boot - Makefile
+#
+# Copyright (c) 2005-2008 Analog Device Inc.
+#
+# (C) Copyright 2000-2006
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+COBJS-y:= $(BOARD).o
+
+SRCS   := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS-y))
+SOBJS  := $(addprefix $(obj),$(SOBJS-y))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+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/bf506f-ezkit/bf506f-ezkit.c 
b/board/bf506f-ezkit/bf506f-ezkit.c
new file mode 100644
index 000..638500d
--- /dev/null
+++ b/board/bf506f-ezkit/bf506f-ezkit.c
@@ -0,0 +1,27 @@
+/*
+ * U-boot - main board file
+ *
+ * Copyright (c) 2008-2010 Analog Devices Inc.
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
+#include 
+#include 
+
+int checkboard(void)
+{
+   printf("Board: ADI BF506F EZ-Kit board\n");
+   printf("   Support: http://blackfin.uclinux.org/\n";);
+   return 0;
+}
+
+int board_early_init_f(void)
+{
+   bfin_write_EBIU_MODE(1);
+   SSYNC();
+   bfin_write_FLASH_CONTROL_CLEAR(1);
+   udelay(1);
+   bfin_write_FLASH_CONTROL_SET(1);
+   return 0;
+}
diff --git a/boards.cfg b/boards.cfg
index b8d077f..ded9880 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -166,6 +166,7 @@ favr-32-ezkitavr32   at32ap  -  
 earthlc
 mimc200  avr32   at32ap  -   mimc  
 at32ap700x
 hammerhead   avr32   at32ap  -   
miromico   at32ap700x
 bct-brettl2  blackfinblackfin
+bf506f-ezkit blackfinblackfin
 bf518f-ezbrd blackfinblackfin
 bf525-ucr2   blackfinblackfin
 bf526-ezbrd  blackfinblackfin
diff --git a/include/configs/bf506f-ezkit.h b/include/configs/bf506f-ezkit.h
new file mode 100644
index 000..9464029
--- /dev/null
+++ b/include/configs/bf506f-ezkit.h
@@ -0,0 +1,106 @@
+/*
+ * U-boot - Configuration file for BF506F EZ-Kit board
+ */
+
+#ifndef __CONFIG_BF506F_EZKIT_H__
+#define __CONFIG_BF506F_EZKIT_H__
+
+#include 
+
+
+/*
+ * Processor Settings
+ */
+#define CONFIG_BFIN_CPU bf506-0.0
+#define CONFIG_BFIN_BOOT_MODE   BFIN_BOOT_PARA
+
+
+/*
+ * Clock Settings
+ * CCLK = (CLKIN * VCO_MULT) / CCLK_DIV
+ * SCLK = (CLKIN * VCO_MULT) / SCLK_DIV
+ */
+/* CONFIG_CLKIN_HZ is any value in Hz  */
+#define CONFIG_CLKIN_HZ2500
+/* CLKIN_HALF controls the DF bit in PLL_CTL  0 = CLKIN*/
+/*1 = CLKIN / 2
*/
+#define CONFIG_CLKIN_HALF  0
+/* PLL_BYPASS controls the BYPASS bit in PLL_CTL  0 = do not bypass*/
+/*1 = bypass PLL   */
+#define CONFIG_PLL_BYPASS  0
+/* VCO_MULT controls the MSEL (multiplier) bits in PLL_CTL */
+/* Values can range from 0-63 (where 0 means 64)   */
+#define CONFIG_VCO_MULT   

[U-Boot] [PATCH 25/28] Blackfin: bootrom.h: sync with toolchain

2010-12-26 Thread Mike Frysinger
We need the updated LDR bit defines for our LDR utils.

Signed-off-by: Mike Frysinger 
---
 .../include/asm/mach-common/bits/bootrom.h |   86 +--
 1 files changed, 59 insertions(+), 27 deletions(-)

diff --git a/arch/blackfin/include/asm/mach-common/bits/bootrom.h 
b/arch/blackfin/include/asm/mach-common/bits/bootrom.h
index f537e93..0e2cacb 100644
--- a/arch/blackfin/include/asm/mach-common/bits/bootrom.h
+++ b/arch/blackfin/include/asm/mach-common/bits/bootrom.h
@@ -229,33 +229,65 @@ static uint32_t (* const bfrom_NandBoot)(int32_t 
dNandAddress, int32_t dFlags, i
 
 #endif /* __ASSEMBLY__ */
 
+/* Bit defines for BF53x block flags */
+#define BFLAG_53X_ZEROFILL 0x0001
+#define BFLAG_53X_RESVECT  0x0002
+#define BFLAG_53X_INIT 0x0008
+#define BFLAG_53X_IGNORE   0x0010
+#define BFLAG_53X_PFLAG_MASK   0x01E0
+#define BFLAG_53X_PFLAG_SHIFT  5
+#define BFLAG_53X_PPORT_MASK   0x0600
+#define BFLAG_53X_PPORT_SHIFT  9
+#define BFLAG_53X_COMPRESSED   0x2000
+#define BFLAG_53X_FINAL0x8000
+
+/* Bit defines for BF56x global header */
+#define GFLAG_56X_16BIT_FLASH  0x0001
+#define GFLAG_56X_WAIT_MASK0x001E
+#define GFLAG_56X_WAIT_SHIFT   1
+#define GFLAG_56X_HOLD_MASK0x00C0
+#define GFLAG_56X_HOLD_SHIFT   6
+#define GFLAG_56X_SPI_MASK 0x0700
+#define GFLAG_56X_SPI_SHIFT8
+#define GFLAG_56X_SPI_500K 0x0
+#define GFLAG_56X_SPI_1M   0x1
+#define GFLAG_56X_SPI_2M   0x2
+#define GFLAG_56X_SIGN_MASK0xFF00
+#define GFLAG_56X_SIGN_SHIFT   28
+#define GFLAG_56X_SIGN_MAGIC   0xA
+
 /* Bit defines for ADI_BOOT_DATA->dFlags */
-#define BFLAG_DMACODE_MASK 0x000F
-#define BFLAG_SAFE 0x0010
-#define BFLAG_AUX  0x0020
-#define BFLAG_FILL 0x0100
-#define BFLAG_QUICKBOOT0x0200
-#define BFLAG_CALLBACK 0x0400
-#define BFLAG_INIT 0x0800
-#define BFLAG_IGNORE   0x1000
-#define BFLAG_INDIRECT 0x2000
-#define BFLAG_FIRST0x4000
-#define BFLAG_FINAL0x8000
-#define BFLAG_HOOK 0x0040
-#define BFLAG_HDRINDIRECT  0x0080
-#define BFLAG_TYPE_MASK0x0030
-#define BFLAG_TYPE_1   0x
-#define BFLAG_TYPE_2   0x0010
-#define BFLAG_TYPE_3   0x0020
-#define BFLAG_TYPE_4   0x0030
-#define BFLAG_FASTREAD 0x0040
-#define BFLAG_NOAUTO   0x0100
-#define BFLAG_PERIPHERAL   0x0200
-#define BFLAG_SLAVE0x0400
-#define BFLAG_WAKEUP   0x0800
-#define BFLAG_NEXTDXE  0x1000
-#define BFLAG_RETURN   0x2000
-#define BFLAG_RESET0x4000
-#define BFLAG_NONRESTORE   0x8000
+#define BFLAG_DMACODE_MASK 0x000F
+#define BFLAG_SAFE 0x0010
+#define BFLAG_AUX  0x0020
+#define BFLAG_FILL 0x0100
+#define BFLAG_QUICKBOOT0x0200
+#define BFLAG_CALLBACK 0x0400
+#define BFLAG_INIT 0x0800
+#define BFLAG_IGNORE   0x1000
+#define BFLAG_INDIRECT 0x2000
+#define BFLAG_FIRST0x4000
+#define BFLAG_FINAL0x8000
+#define BFLAG_HDRSIGN_MASK 0xFF00
+#define BFLAG_HDRSIGN_SHIFT24
+#define BFLAG_HDRSIGN_MAGIC0xAD
+#define BFLAG_HDRCHK_MASK  0x00FF
+#define BFLAG_HDRCHK_SHIFT 16
+#define BFLAG_HOOK 0x0040
+#define BFLAG_HDRINDIRECT  0x0080
+#define BFLAG_TYPE_MASK0x0030
+#define BFLAG_TYPE_1   0x
+#define BFLAG_TYPE_2   0x0010
+#define BFLAG_TYPE_3   0x0020
+#define BFLAG_TYPE_4   0x0030
+#define BFLAG_FASTREAD 0x0040
+#define BFLAG_NOAUTO   0x0100
+#define BFLAG_PERIPHERAL   0x0200
+#define BFLAG_SLAVE0x0400
+#define BFLAG_WAKEUP   0x0800
+#define BFLAG_NEXTDXE  0x1000
+#define BFLAG_RETURN   0x2000
+#define BFLAG_RESET0x4000
+#define BFLAG_NONRESTORE   0x8000
 
 #endif
-- 
1.7.3.4

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


[U-Boot] [PATCH 24/28] Blackfin: adi boards: drop old ELF define

2010-12-26 Thread Mike Frysinger
This define isn't used anywhere anymore, so punt it.

Signed-off-by: Mike Frysinger 
---
 include/configs/bfin_adi_common.h |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/include/configs/bfin_adi_common.h 
b/include/configs/bfin_adi_common.h
index 03c6433..b86ca68 100644
--- a/include/configs/bfin_adi_common.h
+++ b/include/configs/bfin_adi_common.h
@@ -85,7 +85,6 @@
 # define CONFIG_CMD_CACHE
 # define CONFIG_CMD_CPLBINFO
 # define CONFIG_CMD_ELF
-# define CONFIG_ELF_SIMPLE_LOAD
 # define CONFIG_CMD_GPIO
 # define CONFIG_CMD_KGDB
 # define CONFIG_CMD_REGINFO
-- 
1.7.3.4

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


[U-Boot] [PATCH 28/28] Blackfin: adi boards: enable ldrinfo

2010-12-26 Thread Mike Frysinger
Signed-off-by: Mike Frysinger 
---
 include/configs/bfin_adi_common.h |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/configs/bfin_adi_common.h 
b/include/configs/bfin_adi_common.h
index b86ca68..9016a26 100644
--- a/include/configs/bfin_adi_common.h
+++ b/include/configs/bfin_adi_common.h
@@ -87,6 +87,7 @@
 # define CONFIG_CMD_ELF
 # define CONFIG_CMD_GPIO
 # define CONFIG_CMD_KGDB
+# define CONFIG_CMD_LDRINFO
 # define CONFIG_CMD_REGINFO
 # define CONFIG_CMD_STRINGS
 # if defined(__ADSPBF51x__) || defined(__ADSPBF52x__) || defined(__ADSPBF54x__)
-- 
1.7.3.4

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


[U-Boot] [PATCH 27/28] Blackfin: ldrinfo: new command

2010-12-26 Thread Mike Frysinger
Simple command to decode/check an LDR image before we try to boot it.

Signed-off-by: Mike Frysinger 
---
 common/Makefile  |1 +
 common/cmd_ldrinfo.c |  192 ++
 2 files changed, 193 insertions(+), 0 deletions(-)
 create mode 100644 common/cmd_ldrinfo.c

diff --git a/common/Makefile b/common/Makefile
index abea91c..9cc8dd1 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -105,6 +105,7 @@ COBJS-$(CONFIG_CMD_IRQ) += cmd_irq.o
 COBJS-$(CONFIG_CMD_ITEST) += cmd_itest.o
 COBJS-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o
 COBJS-$(CONFIG_CMD_CRAMFS) += cmd_cramfs.o
+COBJS-$(CONFIG_CMD_LDRINFO) += cmd_ldrinfo.o
 COBJS-$(CONFIG_CMD_LICENSE) += cmd_license.o
 COBJS-y += cmd_load.o
 COBJS-$(CONFIG_LOGBUFFER) += cmd_log.o
diff --git a/common/cmd_ldrinfo.c b/common/cmd_ldrinfo.c
new file mode 100644
index 000..2aa56bd
--- /dev/null
+++ b/common/cmd_ldrinfo.c
@@ -0,0 +1,192 @@
+/*
+ * U-boot - ldrinfo
+ *
+ * Copyright (c) 2010 Analog Devices Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * Licensed under the GPL-2 or later.
+ */
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+static uint32_t ldrinfo_header(const void *addr)
+{
+   uint32_t skip = 0;
+
+#if defined(__ADSPBF561__)
+   /* BF56x has a 4 byte global header */
+   uint32_t header, sign;
+   static const char * const spi_speed[] = {
+   "500K", "1M", "2M", "??",
+   };
+
+   memcpy(&header, addr, sizeof(header));
+
+   sign = (header & GFLAG_56X_SIGN_MASK) >> GFLAG_56X_SIGN_SHIFT;
+   printf("Header: %08X ( %s-bit-flash wait:%i hold:%i spi:%s %s)\n",
+   header,
+   (header & GFLAG_56X_16BIT_FLASH) ? "16" : "8",
+   (header & GFLAG_56X_WAIT_MASK) >> GFLAG_56X_WAIT_SHIFT,
+   (header & GFLAG_56X_HOLD_MASK) >> GFLAG_56X_HOLD_SHIFT,
+   spi_speed[(header & GFLAG_56X_SPI_MASK) >> GFLAG_56X_SPI_SHIFT],
+   sign == GFLAG_56X_SIGN_MAGIC ? "" : "!!hdrsign!! ");
+
+   skip = 4;
+#endif
+
+   /* |Block @ 12345678: 12345678 12345678 12345678 12345678 | */
+#if defined(__ADSPBF531__) || defined(__ADSPBF532__) || defined(__ADSPBF533__) 
|| \
+defined(__ADSPBF534__) || defined(__ADSPBF536__) || defined(__ADSPBF537__) 
|| \
+defined(__ADSPBF538__) || defined(__ADSPBF539__) || defined(__ADSPBF561__)
+   printf("  Address  CountFlags\n");
+#else
+   printf("  BCodeAddress  CountArgument\n");
+#endif
+
+   return skip;
+}
+
+struct ldr_flag {
+   uint16_t flag;
+   const char *desc;
+};
+
+static uint32_t ldrinfo_block(const void *base_addr)
+{
+   uint32_t count;
+
+   printf("Block @ %08X: ", (uint32_t)base_addr);
+
+#if defined(__ADSPBF531__) || defined(__ADSPBF532__) || defined(__ADSPBF533__) 
|| \
+defined(__ADSPBF534__) || defined(__ADSPBF536__) || defined(__ADSPBF537__) 
|| \
+defined(__ADSPBF538__) || defined(__ADSPBF539__) || defined(__ADSPBF561__)
+
+   uint32_t addr, pval;
+   uint16_t flags;
+   int i;
+   static const struct ldr_flag ldr_flags[] = {
+   { BFLAG_53X_ZEROFILL,"zerofill"  },
+   { BFLAG_53X_RESVECT, "resvect"   },
+   { BFLAG_53X_INIT,"init"  },
+   { BFLAG_53X_IGNORE,  "ignore"},
+   { BFLAG_53X_COMPRESSED,  "compressed"},
+   { BFLAG_53X_FINAL,   "final" },
+   };
+
+   memcpy(&addr, base_addr, sizeof(addr));
+   memcpy(&count, base_addr+4, sizeof(count));
+   memcpy(&flags, base_addr+8, sizeof(flags));
+
+   printf("%08X %08X %04X ( ", addr, count, flags);
+
+   for (i = 0; i < ARRAY_SIZE(ldr_flags); ++i)
+   if (flags & ldr_flags[i].flag)
+   printf("%s ", ldr_flags[i].desc);
+
+   pval = (flags & BFLAG_53X_PFLAG_MASK) >> BFLAG_53X_PFLAG_SHIFT;
+   if (pval)
+   printf("gpio%i ", pval);
+   pval = (flags & BFLAG_53X_PPORT_MASK) >> BFLAG_53X_PPORT_SHIFT;
+   if (pval)
+   printf("port%c ", 'e' + pval);
+
+   if (flags & BFLAG_53X_ZEROFILL)
+   count = 0;
+   if (flags & BFLAG_53X_FINAL)
+   count = 0;
+   else
+   count += sizeof(addr) + sizeof(count) + sizeof(flags);
+
+#else
+
+   const uint8_t *raw8 = base_addr;
+   uint32_t bcode, addr, arg, sign, chk;
+   int i;
+   static const struct ldr_flag ldr_flags[] = {
+   { BFLAG_SAFE,"safe"  },
+   { BFLAG_AUX, "aux"   },
+   { BFLAG_FILL,"fill"  },
+   { BFLAG_QUICKBOOT,   "quickboot" },
+   { BFLAG_CALLBACK,"callback"  },
+   { BFLAG_INIT,"init"  },
+   { BFLAG_IGNORE,  "ignore"},
+   { BFLAG_INDIRECT,"indirect"  },
+   { BFL

[U-Boot] [PATCH 22/28] Blackfin: default to L1 bank A when L1 bank B does not exist

2010-12-26 Thread Mike Frysinger
Some parts lack Bank B in L1 data, so have the linker script fall back to
Bank A when that happens.  This way we can still leverage L1 data.

Signed-off-by: Mike Frysinger 
---
 arch/blackfin/lib/u-boot.lds.S |   10 +++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/blackfin/lib/u-boot.lds.S b/arch/blackfin/lib/u-boot.lds.S
index f15c97e..2b8d285 100644
--- a/arch/blackfin/lib/u-boot.lds.S
+++ b/arch/blackfin/lib/u-boot.lds.S
@@ -40,9 +40,13 @@
  * This is here in the first place so we can quickly test building
  * for different CPU's which may lack non-cache L1 data.
  */
+#ifndef L1_DATA_A_SRAM
+# define L1_DATA_A_SRAM  0
+# define L1_DATA_A_SRAM_SIZE 0
+#endif
 #ifndef L1_DATA_B_SRAM
-# define L1_DATA_B_SRAM  CONFIG_SYS_MONITOR_BASE
-# define L1_DATA_B_SRAM_SIZE 0
+# define L1_DATA_B_SRAM  L1_DATA_A_SRAM
+# define L1_DATA_B_SRAM_SIZE L1_DATA_A_SRAM_SIZE
 #endif
 
 /* The 0xC offset is so we don't clobber the tiny LDR jump block. */
@@ -138,7 +142,7 @@ SECTIONS
} >l1_data AT>ram_data
__data_l1_lma = LOADADDR(.data_l1);
__data_l1_len = SIZEOF(.data_l1);
-   ASSERT (__data_l1_len <= L1_DATA_B_SRAM_SIZE, "L1 data B overflow!")
+   ASSERT (__data_l1_len <= L1_DATA_B_SRAM_SIZE, "L1 data overflow!")
 
.bss :
{
-- 
1.7.3.4

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


[U-Boot] [PATCH 26/28] Blackfin: bootldr: use common defines

2010-12-26 Thread Mike Frysinger
Now that the common bootrom.h sets up defines for us, switch to them
rather than our own local set.

Signed-off-by: Mike Frysinger 
---
 common/cmd_bootldr.c |   21 -
 1 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/common/cmd_bootldr.c b/common/cmd_bootldr.c
index 535b931..bc5c1f9 100644
--- a/common/cmd_bootldr.c
+++ b/common/cmd_bootldr.c
@@ -24,7 +24,7 @@ static bool ldr_valid_signature(uint8_t *data)
 #if defined(__ADSPBF561__)
 
/* BF56x has a 4 byte global header */
-   if (data[3] == 0xA0)
+   if (data[3] == (GFLAG_56X_SIGN_MAGIC << (GFLAG_56X_SIGN_SHIFT - 24)))
return true;
 
 #elif defined(__ADSPBF531__) || defined(__ADSPBF532__) || 
defined(__ADSPBF533__) || \
@@ -53,11 +53,6 @@ static bool ldr_valid_signature(uint8_t *data)
  * LDRs from random memory addresses.  So whenever possible, use that.  In
  * the older cases (BF53x/BF561), parse the LDR format ourselves.
  */
-#define ZEROFILL  0x0001
-#define RESVECT   0x0002
-#define INIT  0x0008
-#define IGNORE0x0010
-#define FINAL 0x8000
 static void ldr_load(uint8_t *base_addr)
 {
 #if defined(__ADSPBF531__) || defined(__ADSPBF532__) || defined(__ADSPBF533__) 
|| \
@@ -76,7 +71,7 @@ static void ldr_load(uint8_t *base_addr)
 # endif
 
memmove(&flags, base_addr + 8, sizeof(flags));
-   bfin_write_EVT1(flags & RESVECT ? 0xFFA0 : 0xFFA08000);
+   bfin_write_EVT1(flags & BFLAG_53X_RESVECT ? 0xFFA0 : 0xFFA08000);
 
do {
/* block header may not be aligned */
@@ -85,24 +80,24 @@ static void ldr_load(uint8_t *base_addr)
memmove(&flags, base_addr+8, sizeof(flags));
base_addr += sizeof(addr) + sizeof(count) + sizeof(flags);
 
-   printf("loading to 0x%08x (0x%x bytes) flags: 0x%04x\n",
+   printf("loading to 0x%08x (%#x bytes) flags: 0x%04x\n",
addr, count, flags);
 
-   if (!(flags & IGNORE)) {
-   if (flags & ZEROFILL)
+   if (!(flags & BFLAG_53X_IGNORE)) {
+   if (flags & BFLAG_53X_ZEROFILL)
memset((void *)addr, 0x00, count);
else
memcpy((void *)addr, base_addr, count);
 
-   if (flags & INIT) {
+   if (flags & BFLAG_53X_INIT) {
void (*init)(void) = (void *)addr;
init();
}
}
 
-   if (!(flags & ZEROFILL))
+   if (!(flags & BFLAG_53X_ZEROFILL))
base_addr += count;
-   } while (!(flags & FINAL));
+   } while (!(flags & BFLAG_53X_FINAL));
 
 #endif
 }
-- 
1.7.3.4

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


Re: [U-Boot] [PATCH 1/2 for 2010.12 ] Add support PLATFORM_LDFLAGS to cmd_link_o_target

2010-12-26 Thread Mike Frysinger
On Sunday, December 26, 2010 23:17:39 Nobuhiro Iwamatsu wrote:
> 2010/12/27 Mike Frysinger :
> > On Saturday, December 25, 2010 18:02:26 Nobuhiro Iwamatsu wrote:
> >> Current cmd_link_o_target function in config.mk does not support the set
> >> of the endian.
> >> 
> >> Some architecture is bi-endian (e.g. mips and sh).
> >> Therefore, there is case supporting big endian and little endian
> >> with one toolchain.
> >> For example, when user builds target of big endian in host of little
> >> endian, they need set endian.
> >> 
> >>  # If the list of objects to link is empty, just create an empty
> >> built-in.o cmd_link_o_target = $(if $(strip $1),\
> >> -   $(LD) -r -o $@ $1 ,\
> >> +   $(LD) $(ENDIANNESS) -r -o $@ $1 ,\
> > 
> > i dont think we should start declaring random new variables with specific
> > purposes.
> 
> I agree. But
> 
> > better to split the "u-boot final" LDFLAGS out into their own
> > variable (LDFLAGS_u-boot) and keep LDFLAGS as a "these are the flags that
> > need to be used with $(LD)".
> 
> cmd_link_o_target is not used in the last of u-boot  (u-boot final) .

this is irrelevant to what i suggested

> But this is used in the middle of build.
> For example, when we make libstubs.o in examples/standalone/Makefile.
> 
> : examples/standalone/Makefile
> 
> -
>  89
>  90 all:$(obj).depend $(OBJS) $(LIB) $(SREC) $(BIN) $(ELF)
>  91
>  92
> #
> 93 $(LIB): $(obj).depend $(LIBOBJS)
>  94 $(call cmd_link_o_target, $(LIBOBJS))
>  95
>  96 $(ELF):
> -
> 
> Therefore, I think that we have to add a new variable to this.

no, we dont.  do as i suggested:
 - add $(LDFLAGS_$(@F)) to Makefile:GEN_UBOOT
 - move -T/-B flags from Makefile:LDFLAGS to Makefile:LDFLAGS_u-boot
 - move --gc-sections from LDFLAGS to LDFLAGS_u-boot in arch/*/config.mk
 - add $(LDFLAGS) to cmd_link_o_target

your patch doesnt scale to address all problems
-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] Fashion Challenge

2010-12-26 Thread Shilpa G
 
Hi


Visit my site http://shilpasbeautyworld.com  An 
exclusive coverage on various topics related to fashion, beauty, makeup, Skin 
care, hair care and many more topics. Do visit, its really interesting.

 

Accept the fashion Challenge now !!!

 

Regards ….


Regards ...

Shilpa
```
 
Disclaimer Policy

The message was sent to   u-boot@lists.denx.de  Dated 25/12/2010

Unsubscribe Now  or forward a copy of this mail to unsubscr...@shilpasbeautyworld.com 
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH] mpq101: initial support for Mercury Computer Systems MPQ101 board

2010-12-26 Thread Alex Dubov
Mpq101 is a RapidIO development board in AMC form factor, featuring MPC8548
processor, 512MB of hardwired DDR2 RAM and 128MB of hardwired NAND flash
memory. USB controller is available, but not presently enabled.

Additional board information is available at:
http://www.mc.com/products/boards/ensemble_mpq101_rapidio_powerquicc_iii.aspx

Signed-off-by: Alex Dubov 
---
 board/mercury/mpq101/Makefile  |   53 ++
 board/mercury/mpq101/config.mk |7 +
 board/mercury/mpq101/law.c |   54 ++
 board/mercury/mpq101/mpq101.c  |  167 ++
 board/mercury/mpq101/tlb.c |   82 +
 boards.cfg |1 +
 include/configs/mpq101.h   |  381 
 7 files changed, 745 insertions(+), 0 deletions(-)
 create mode 100644 board/mercury/mpq101/Makefile
 create mode 100644 board/mercury/mpq101/config.mk
 create mode 100644 board/mercury/mpq101/law.c
 create mode 100644 board/mercury/mpq101/mpq101.c
 create mode 100644 board/mercury/mpq101/tlb.c
 create mode 100644 include/configs/mpq101.h

diff --git a/board/mercury/mpq101/Makefile b/board/mercury/mpq101/Makefile
new file mode 100644
index 000..58bc1b3
--- /dev/null
+++ b/board/mercury/mpq101/Makefile
@@ -0,0 +1,53 @@
+#
+# Copyright 2007 Freescale Semiconductor, Inc.
+# (C) Copyright 2001-2006
+# Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+include $(TOPDIR)/config.mk
+
+LIB= $(obj)lib$(BOARD).o
+
+COBJS-y+= $(BOARD).o
+COBJS-y+= law.o
+COBJS-y+= tlb.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS-y))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):$(obj).depend $(OBJS) $(SOBJS)
+   $(call cmd_link_o_target, $(OBJS))
+
+clean:
+   rm -f $(OBJS) $(SOBJS)
+
+distclean: clean
+   rm -f $(LIB) core *.bak .depend
+
+#
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#
diff --git a/board/mercury/mpq101/config.mk b/board/mercury/mpq101/config.mk
new file mode 100644
index 000..1870680
--- /dev/null
+++ b/board/mercury/mpq101/config.mk
@@ -0,0 +1,7 @@
+#
+# mpq101 board
+#
+
+# Make room for environment at the beginning of flash sector
+CONFIG_SYS_TEXT_BASE = 0xfffc0800
+LDFLAGS += --section-start=.ppcenv=$(CONFIG_ENV_ADDR)
diff --git a/board/mercury/mpq101/law.c b/board/mercury/mpq101/law.c
new file mode 100644
index 000..bc89bc5
--- /dev/null
+++ b/board/mercury/mpq101/law.c
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2008 Freescale Semiconductor, Inc.
+ *
+ * (C) Copyright 2000
+ * Wolfgang Denk, DENX Software Engineering, w...@denx.de.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include 
+#include 
+#include 
+
+/*
+ * LAW(Local Access Window) configuration:
+ *
+ * 0x_ 0x1fff_ DDR SYS_SDRAM_SIZE
+ * 0xc000_ 0xdfff_ RapidIO 512M
+ * 0xe000_ 0xe000_ CCSR1M
+ * 0xf000_ 0x_ LBC options + FLASH 256M
+ *
+ * Notes:
+ *CCSRBAR and L2-as-SRAM don't need a configured Local Access Window.
+ *If flash is 8M at default position (last 8M), no LAW needed.
+ *
+ * LAW 0 is reserved for boot mapping
+ */
+
+struct law_entry law_table[

Re: [U-Boot] [PATCH 1/2 for 2010.12 ] Add support PLATFORM_LDFLAGS to cmd_link_o_target

2010-12-26 Thread Nobuhiro Iwamatsu
2010/12/27 Mike Frysinger :
> On Sunday, December 26, 2010 23:17:39 Nobuhiro Iwamatsu wrote:
>> 2010/12/27 Mike Frysinger :
>> > On Saturday, December 25, 2010 18:02:26 Nobuhiro Iwamatsu wrote:
>> >> Current cmd_link_o_target function in config.mk does not support the set
>> >> of the endian.
>> >>
>> >> Some architecture is bi-endian (e.g. mips and sh).
>> >> Therefore, there is case supporting big endian and little endian
>> >> with one toolchain.
>> >> For example, when user builds target of big endian in host of little
>> >> endian, they need set endian.
>> >>
>> >>  # If the list of objects to link is empty, just create an empty
>> >> built-in.o cmd_link_o_target = $(if $(strip $1),\
>> >> -                   $(LD) -r -o $@ $1 ,\
>> >> +                   $(LD) $(ENDIANNESS) -r -o $@ $1 ,\
>> >
>> > i dont think we should start declaring random new variables with specific
>> > purposes.
>>
>> I agree. But
>>
>> > better to split the "u-boot final" LDFLAGS out into their own
>> > variable (LDFLAGS_u-boot) and keep LDFLAGS as a "these are the flags that
>> > need to be used with $(LD)".
>>
>> cmd_link_o_target is not used in the last of u-boot  (u-boot final) .
>
> this is irrelevant to what i suggested
>
>> But this is used in the middle of build.
>> For example, when we make libstubs.o in examples/standalone/Makefile.
>>
>> : examples/standalone/Makefile
>>
>> -
>>  89
>>  90 all:    $(obj).depend $(OBJS) $(LIB) $(SREC) $(BIN) $(ELF)
>>  91
>>  92
>> #
>> 93 $(LIB): $(obj).depend $(LIBOBJS)
>>  94     $(call cmd_link_o_target, $(LIBOBJS))
>>  95
>>  96 $(ELF):
>> -
>>
>> Therefore, I think that we have to add a new variable to this.
>
> no, we dont.  do as i suggested:
>  - add $(LDFLAGS_$(@F)) to Makefile:GEN_UBOOT
>  - move -T/-B flags from Makefile:LDFLAGS to Makefile:LDFLAGS_u-boot
>  - move --gc-sections from LDFLAGS to LDFLAGS_u-boot in arch/*/config.mk
>  - add $(LDFLAGS) to cmd_link_o_target
>
> your patch doesnt scale to address all problems

OK, I understood your indication.
I will send new patch.

Thanks!

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


[U-Boot] [PATCH] Add LDFLAGS-u-boot variable and move some linker option to this

2010-12-26 Thread Nobuhiro Iwamatsu
This move linker option used by the last of u-boot in LDFLAGS_u-boot variable.
And the option to use in ld uses LDFLAGS variable.

Signed-off-by: Nobuhiro Iwamatsu 
---
 Makefile  |2 +-
 arch/blackfin/config.mk   |3 ++-
 arch/i386/config.mk   |3 ++-
 arch/nios2/config.mk  |2 +-
 arch/powerpc/config.mk|4 ++--
 arch/sh/config.mk |2 +-
 arch/sh/cpu/sh2/config.mk |4 +++-
 config.mk |8 +---
 8 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/Makefile b/Makefile
index 9055028..d6884ea 100644
--- a/Makefile
+++ b/Makefile
@@ -369,7 +369,7 @@ $(obj)u-boot.dis:   $(obj)u-boot
 GEN_UBOOT = \
UNDEF_SYM=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \
sed  -n -e 
's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
-   cd $(LNDIR) && $(LD) $(LDFLAGS) $$UNDEF_SYM $(__OBJS) \
+   cd $(LNDIR) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) $$UNDEF_SYM 
$(__OBJS) \
--start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \
-Map u-boot.map -o u-boot
 $(obj)u-boot:  depend \
diff --git a/arch/blackfin/config.mk b/arch/blackfin/config.mk
index ab117ca..0cba294 100644
--- a/arch/blackfin/config.mk
+++ b/arch/blackfin/config.mk
@@ -30,7 +30,8 @@ CONFIG_BFIN_BOOT_MODE := $(strip $(subst 
",,$(CONFIG_BFIN_BOOT_MODE)))
 PLATFORM_RELFLAGS += -ffixed-P3 -fomit-frame-pointer -mno-fdpic
 PLATFORM_CPPFLAGS += -DCONFIG_BLACKFIN
 
-LDFLAGS += --gc-sections -m elf32bfin
+LDFLAGS_u-boot += --gc-sections
+LDFLAGS += -m elf32bfin
 PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
 
 PLATFORM_CPPFLAGS += -DBFIN_CPU='"$(CONFIG_BFIN_CPU)"'
diff --git a/arch/i386/config.mk b/arch/i386/config.mk
index 8743f1a..2da1666 100644
--- a/arch/i386/config.mk
+++ b/arch/i386/config.mk
@@ -35,5 +35,6 @@ PLATFORM_CPPFLAGS += $(call cc-option, -fno-stack-protector)
 PLATFORM_CPPFLAGS += $(call cc-option, -mpreferred-stack-boundary=2)
 PLATFORM_CPPFLAGS += -DCONFIG_I386 -D__I386__
 
-LDFLAGS += --cref --gc-sections
+LDFLAGS += --cref 
+LDFLAGS_u-boot += --gc-sections
 PLATFORM_RELFLAGS += -ffunction-sections
diff --git a/arch/nios2/config.mk b/arch/nios2/config.mk
index aba96b3..fa93180 100644
--- a/arch/nios2/config.mk
+++ b/arch/nios2/config.mk
@@ -31,5 +31,5 @@ PLATFORM_CPPFLAGS += -G0
 
 LDSCRIPT ?= $(SRCTREE)/$(CPUDIR)/u-boot.lds
 
-LDFLAGS += --gc-sections
+LDFLAGS_u-boot += --gc-sections
 PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections
diff --git a/arch/powerpc/config.mk b/arch/powerpc/config.mk
index 2912604..64191c7 100644
--- a/arch/powerpc/config.mk
+++ b/arch/powerpc/config.mk
@@ -24,10 +24,10 @@
 CROSS_COMPILE ?= ppc_8xx-
 
 STANDALONE_LOAD_ADDR = 0x4
-
+LDFLAGS_u-boot = --gc-sections
 PLATFORM_RELFLAGS += -mrelocatable -ffunction-sections -fdata-sections
 PLATFORM_CPPFLAGS += -DCONFIG_PPC -D__powerpc__
-PLATFORM_LDFLAGS  += -n --gc-sections
+PLATFORM_LDFLAGS  += -n
 
 ifdef CONFIG_SYS_LDSCRIPT
 # need to strip off double quotes
diff --git a/arch/sh/config.mk b/arch/sh/config.mk
index 415c949..4ef85e3 100644
--- a/arch/sh/config.mk
+++ b/arch/sh/config.mk
@@ -30,5 +30,5 @@ endif
 
 PLATFORM_CPPFLAGS += -DCONFIG_SH -D__SH__
 PLATFORM_LDFLAGS += -e $(CONFIG_SYS_TEXT_BASE) --defsym 
reloc_dst=$(CONFIG_SYS_TEXT_BASE)
-
+LDFLAGS_u-boot = --gc-sections
 LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds
diff --git a/arch/sh/cpu/sh2/config.mk b/arch/sh/cpu/sh2/config.mk
index 52d5a0f..f2d40aa 100644
--- a/arch/sh/cpu/sh2/config.mk
+++ b/arch/sh/cpu/sh2/config.mk
@@ -21,6 +21,8 @@
 # MA 02111-1307 USA
 #
 #
+ENDIANNESS += -EB
+
 PLATFORM_CPPFLAGS += -m3e -mb
 PLATFORM_RELFLAGS += -ffixed-r13
-PLATFORM_LDFLAGS += -EB
+PLATFORM_LDFLAGS += $(ENDIANNESS)
diff --git a/config.mk b/config.mk
index c6d6f7b..1666a48 100644
--- a/config.mk
+++ b/config.mk
@@ -204,9 +204,11 @@ endif
 
 AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS)
 
-LDFLAGS += -Bstatic -T $(obj)u-boot.lds $(PLATFORM_LDFLAGS)
+LDFLAGS += $(PLATFORM_LDFLAGS)
+
+LDFLAGS_u-boot += -Bstatic -T $(obj)u-boot.lds $(PLATFORM_LDFLAGS)
 ifneq ($(CONFIG_SYS_TEXT_BASE),)
-LDFLAGS += -Ttext $(CONFIG_SYS_TEXT_BASE)
+LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE)
 endif
 
 # Location of a usable BFD library, where we define "usable" as
@@ -262,7 +264,7 @@ $(obj)%.s:  %.c
 
 # If the list of objects to link is empty, just create an empty built-in.o
 cmd_link_o_target = $(if $(strip $1),\
- $(LD) -r -o $@ $1 ,\
+ $(LD) $(LDFLAGS) -r -o $@ $1,\
  rm -f $@; $(AR) rcs $@ )
 
 #
-- 
1.7.2.3

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


Re: [U-Boot] [PATCH 8/8] armv7: adapt s5pc1xx to the new cache maintenance framework

2010-12-26 Thread Minkyu Kang
Dear Aneesh V,

On 22 December 2010 20:54, Aneesh V  wrote:
> adapt s5pc1xx to the new layered cache maintenance framework
>
> Signed-off-by: Aneesh V 
> ---
>  arch/arm/cpu/armv7/s5pc1xx/cache.S            |   86 +---
>  arch/arm/cpu/armv7/s5pc1xx/clock.c            |   12 
>  arch/arm/include/asm/arch-s5pc1xx/sys_proto.h |    4 +-
>  3 files changed, 18 insertions(+), 84 deletions(-)
>
> diff --git a/arch/arm/cpu/armv7/s5pc1xx/clock.c 
> b/arch/arm/cpu/armv7/s5pc1xx/clock.c
> index 98a27e5..da8b2d7 100644
> --- a/arch/arm/cpu/armv7/s5pc1xx/clock.c
> +++ b/arch/arm/cpu/armv7/s5pc1xx/clock.c
> @@ -26,6 +26,8 @@
>  #include 
>  #include 
>  #include 
> +#include 
> +#include 
>
>  #define CLK_M  0
>  #define CLK_D  1
> @@ -328,3 +330,13 @@ void s5p_clock_init(void)
>        get_uart_clk = s5pc1xx_get_uart_clk;
>        get_pwm_clk = s5pc1xx_get_pwm_clk;
>  }
> +
> +#ifndef CONFIG_SYS_NO_DCACHE
> +void v7_setup_outer_cache_ops(void)
> +{
> +#ifndef CONFIG_L2_OFF
> +       v7_outer_cache.enable = ca8_l2_cache_enable;
> +       v7_outer_cache.disable = ca8_l2_cache_disable;
> +#endif
> +}
> +#endif

I don't agree with add this function at clock.c.
If need we can make new file as omap3/4 case.

Thanks
Minkyu Kang
-- 
from. prom.
www.promsoft.net
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot