Re: [U-Boot-Users] 85xx: Not enough room for program headers

2008-08-07 Thread Rafal Jaworowski
Kumar Gala wrote:
 Can you try the following patch and see if works for you (make sure the
 resulting image actually boots the board).  If so I'll fixup all the .lds
 I changed to match.

Hi Kumar,

Thanks, the code works, although during compilation the following warning 
appears:

./MAKEALL MPC8555CDS
Configuring for MPC8555CDS board...
ppc_85xx-ld: u-boot: warning: allocated section `.bss' not in segment
   textdata bss dec hex filename
 194515   16028   26488  237031   39de7 ./u-boot

Rafal

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH v2][for 1.3.4] mpc85xx: workaround old binutils bug

2008-08-07 Thread Rafal Jaworowski
Kumar Gala wrote:
 The recent change to move the .bss outside of the image gives older
 binutils (ld from eldk4.1/binutils-2.16) some headache:
 
 ppc_85xx-ld: u-boot: Not enough room for program headers (allocated 3, need 4)
 ppc_85xx-ld: final link failed: Bad value
 
 We workaround it by being explicit about the program headers and not
 assigning the .bss to a program header.
 
 Signed-off-by: Kumar Gala [EMAIL PROTECTED]
 ---
 
 Fixes warning with older binutils

Looks fine now, thanks a lot!

Rafal

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] bootm support for netbsd question

2008-08-07 Thread Rafal Jaworowski
Kumar Gala wrote:
 Anyone know why we pass the image_header_t * to the netbsd loader?
 

*snip*

 this is some pretty tight coupling with u-boot.  Is the stage-2 loader  
 part of u-boot?

I believe this is meant to be NetBSD's last stage bootloader and not any
U-Boot piece. See for example their PREP loader variant:
http://fxr.watson.org/fxr/source/arch/prep/stand/

As I understand it, to boot NetBSD from U-Boot they produce a fat image (the
above stage2 loader + kernel as a multi-image file), which is booted via
bootm, but I never exercised the procedure myself.

Rafal

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] bootm support for netbsd question

2008-08-07 Thread Rafal Jaworowski
Rafal Jaworowski wrote:
 Kumar Gala wrote:
 Anyone know why we pass the image_header_t * to the netbsd loader?

 
 *snip*
 
 this is some pretty tight coupling with u-boot.  Is the stage-2 loader  
 part of u-boot?
 
 I believe this is meant to be NetBSD's last stage bootloader and not any
 U-Boot piece. See for example their PREP loader variant:
 http://fxr.watson.org/fxr/source/arch/prep/stand/

Ooops, I meant:
http://fxr.watson.org/fxr/source/arch/prep/stand/?v=NETBSD

Rafal

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] 85xx: Not enough room for program headers

2008-08-04 Thread Rafal Jaworowski
Hi,

With today's top of the tree U-Boot I'm getting this:

./MAKEALL MPC8555CDS
Configuring for MPC8555CDS board...
ppc_85xx-ld: u-boot: Not enough room for program headers (allocated 3, need 4)
ppc_85xx-ld: final link failed: Bad value
make: *** [u-boot] Błąd 1
ppc_85xx-size: './u-boot': No such file


Is this known, anyone working on fixing this perhaps?

kind regards,
Rafal

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] 85xx: Not enough room for program headers

2008-08-04 Thread Rafal Jaworowski
Wolfgang Denk wrote:
 With today's top of the tree U-Boot I'm getting this:

 ./MAKEALL MPC8555CDS
 Configuring for MPC8555CDS board...
 ppc_85xx-ld: u-boot: Not enough room for program headers (allocated 3, need=
  4)
 ppc_85xx-ld: final link failed: Bad value
 make: *** [u-boot] B=B3=B1d 1
 ppc_85xx-size: './u-boot': No such file
 
 Hm... using ELDK 4.2 I get this:
 
 - ./MAKEALL MPC8555CDS
 Configuring for MPC8555CDS board...
textdata bss dec hex filename
  196852   15284   26492  238628   3a424 ./u-boot
 
 Is this known, anyone working on fixing this perhaps?
 
 Which toolchain did you use?

Mine was ELDK 4.1; it seems the two gcc/linker versions lay out the binary
differently then..

kind regards,
Rafal

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] API: Optimize signature searching scheme in the glue layer.

2008-08-04 Thread Rafal Jaworowski
De-hard code the range in RAM we search for API signature, which might not be
uniform accross architectures and board configurations. Instead use current
global_data pointer as a hint to narrow down the range the [malloc'ed] signature
could reside.

Signed-off-by: Rafal Czubak [EMAIL PROTECTED]
Signed-off-by: Rafal Jaworowski [EMAIL PROTECTED]
---
 api_examples/crt0.S |   17 +++--
 api_examples/glue.c |   17 -
 api_examples/glue.h |6 +++---
 3 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/api_examples/crt0.S b/api_examples/crt0.S
index 8d4f706..80b7297 100644
--- a/api_examples/crt0.S
+++ b/api_examples/crt0.S
@@ -24,14 +24,16 @@
  */
 
 #if defined(CONFIG_PPC)
-
.text
 
.globl _start
 _start:
+   /* Store global data ptr as a hint for U-Boot address range */
+   lis %r11, [EMAIL PROTECTED]
+   addi%r11, %r11, [EMAIL PROTECTED]
+   stw %r2, 0(%r11)
b   main
 
-
.globl syscall
 syscall:
lis %r11, [EMAIL PROTECTED]
@@ -39,12 +41,15 @@ syscall:
lwz %r11, 0(%r11)
mtctr   %r11
bctr
-
+#else
+#error No support for this arch!
+#endif
 
.globl syscall_ptr
 syscall_ptr:
.align  4
.long   0
-#else
-#error No support for this arch!
-#endif
+
+   .globl gd_ptr
+gd_ptr:
+   .long   0
diff --git a/api_examples/glue.c b/api_examples/glue.c
index 2bf47ae..7218b86 100644
--- a/api_examples/glue.c
+++ b/api_examples/glue.c
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2007 Semihalf
+ * (C) Copyright 2007-2008 Semihalf
  *
  * Written by: Rafal Jaworowski [EMAIL PROTECTED]
  *
@@ -57,16 +57,23 @@ static int valid_sig(struct api_signature *sig)
  *
  * returns 1/0 depending on found/not found result
  */
-int api_search_sig(struct api_signature **sig) {
-
+int api_search_sig(struct api_signature **sig)
+{
unsigned char *sp;
+   uint32_t start = 0, end = 0;
 
if (sig == NULL)
return 0;
 
-   sp = (unsigned char *)API_SEARCH_START;
+   if (gd_ptr == NULL)
+   return 0;
+
+   /* Global data ptr helps to narrow down the search range */
+   start = (uint32_t)gd_ptr  ~(API_SEARCH_LEN - 1);
+   end = start + API_SEARCH_LEN - API_SIG_MAGLEN;
 
-   while ((sp + (int)API_SIG_MAGLEN)  (unsigned char *)API_SEARCH_END) {
+   sp = (unsigned char *)start;
+   while ((sp + API_SIG_MAGLEN)  (unsigned char *)end) {
if (!memcmp(sp, API_SIG_MAGIC, API_SIG_MAGLEN)) {
*sig = (struct api_signature *)sp;
if (valid_sig(*sig))
diff --git a/api_examples/glue.h b/api_examples/glue.h
index a82f783..76cb580 100644
--- a/api_examples/glue.h
+++ b/api_examples/glue.h
@@ -30,11 +30,11 @@
 #ifndef _API_GLUE_H_
 #define _API_GLUE_H_
 
-#define API_SEARCH_START   (255 * 1024 * 1024) /* start at 1MB below 
top RAM */
-#define API_SEARCH_END (256 * 1024 * 1024 - 1) /* ...and search to the 
end */
+#define API_SEARCH_LEN (2 * 1024 * 1024)   /* 2MB search range */
 
 intsyscall(int, int *, ...);
-void * syscall_ptr;
+extern void *syscall_ptr;
+extern gd_t *gd_ptr;
 
 intapi_search_sig(struct api_signature **sig);
 
-- 
1.5.2.2


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] API: Provide syscall entry point implementation for the ARM architecture.

2008-08-04 Thread Rafal Jaworowski
(Tested on ARM920-based EP93xx system)

Signed-off-by: Rafal Czubak [EMAIL PROTECTED]
Acked-by: Rafal Jaworowski [EMAIL PROTECTED]
---
 api_examples/Makefile |6 +++---
 api_examples/crt0.S   |   17 +++--
 lib_arm/board.c   |5 +
 3 files changed, 23 insertions(+), 5 deletions(-)

diff --git a/api_examples/Makefile b/api_examples/Makefile
index 5666f48..d09f8f8 100644
--- a/api_examples/Makefile
+++ b/api_examples/Makefile
@@ -24,9 +24,9 @@ ifeq ($(ARCH),ppc)
 LOAD_ADDR = 0x4
 endif
 
-#ifeq ($(ARCH),arm)
-#LOAD_ADDR = 0xc10
-#endif
+ifeq ($(ARCH),arm)
+LOAD_ADDR = 0x100
+endif
 
 include $(TOPDIR)/config.mk
 
diff --git a/api_examples/crt0.S b/api_examples/crt0.S
index 80b7297..a9e2dea 100644
--- a/api_examples/crt0.S
+++ b/api_examples/crt0.S
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2007 Semihalf
+ * (C) Copyright 2007-2008 Semihalf
  *
  * Written by: Rafal Jaworowski [EMAIL PROTECTED]
  *
@@ -25,7 +25,6 @@
 
 #if defined(CONFIG_PPC)
.text
-
.globl _start
 _start:
/* Store global data ptr as a hint for U-Boot address range */
@@ -41,6 +40,20 @@ syscall:
lwz %r11, 0(%r11)
mtctr   %r11
bctr
+
+#elif defined(CONFIG_ARM)
+   .text
+   .globl _start
+_start:
+   ldr ip, =gd_ptr
+   str r8, [ip]
+   b   main
+
+   .globl syscall
+syscall:
+   ldr ip, =syscall_ptr
+   ldr pc, [ip]
+
 #else
 #error No support for this arch!
 #endif
diff --git a/lib_arm/board.c b/lib_arm/board.c
index a093860..c47b52c 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -431,6 +431,11 @@ void start_armboot (void)
 
jumptable_init ();
 
+#if defined(CONFIG_API)
+   /* Initialize API */
+   api_init ();
+#endif
+
console_init_r ();  /* fully init console as a device */
 
 #if defined(CONFIG_MISC_INIT_R)
-- 
1.5.2.2


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] API: Fix compilation warnings in api_examples/demo.c.

2008-07-28 Thread Rafal Jaworowski
Signed-off-by: Rafal Czubak [EMAIL PROTECTED]
---
 api_examples/demo.c |   17 +
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/api_examples/demo.c b/api_examples/demo.c
index eae9712..7ccdb51 100644
--- a/api_examples/demo.c
+++ b/api_examples/demo.c
@@ -58,11 +58,12 @@ int main(int argc, char *argv[])
if (sig-version  API_SIG_VERSION)
return -3;
 
-   printf(API signature found @%x\n, sig);
+   printf(API signature found @%x\n, (unsigned int)sig);
test_dump_sig(sig);
 
printf(\n*** Consumer API test ***\n);
-   printf(syscall ptr [EMAIL PROTECTED], syscall_ptr, syscall_ptr);
+   printf(syscall ptr [EMAIL PROTECTED], (unsigned int)syscall_ptr,
+   (unsigned int)syscall_ptr);
 
/* console activities */
ub_putc('B');
@@ -180,7 +181,7 @@ void test_dump_sig(struct api_signature *sig)
printf(signature:\n);
printf(  version\t= %d\n, sig-version);
printf(  checksum\t= 0x%08x\n, sig-checksum);
-   printf(  sc entry\t= 0x%08x\n, sig-syscall);
+   printf(  sc entry\t= 0x%08x\n, (unsigned int)sig-syscall);
 }
 
 void test_dump_si(struct sys_info *si)
@@ -188,9 +189,9 @@ void test_dump_si(struct sys_info *si)
int i;
 
printf(sys info:\n);
-   printf(  clkbus\t= 0x%08x\n, si-clk_bus);
-   printf(  clkcpu\t= 0x%08x\n, si-clk_cpu);
-   printf(  bar\t\t= 0x%08x\n, si-bar);
+   printf(  clkbus\t= 0x%08x\n, (unsigned int)si-clk_bus);
+   printf(  clkcpu\t= 0x%08x\n, (unsigned int)si-clk_cpu);
+   printf(  bar\t\t= 0x%08x\n, (unsigned int)si-bar);
 
printf(---\n);
for (i = 0; i  si-mr_no; i++) {
@@ -252,7 +253,7 @@ void test_dump_di(int handle)
 
} else if (di-type  DEV_TYP_STOR) {
printf(  type\t\t= %s\n, test_stor_typ(di-type));
-   printf(  blk size\t\t= %d\n, di-di_stor.block_size);
-   printf(  blk count\t\t= %d\n, di-di_stor.block_count);
+   printf(  blk size\t\t= %d\n, (unsigned 
int)di-di_stor.block_size);
+   printf(  blk count\t\t= %d\n, (unsigned 
int)di-di_stor.block_count);
}
 }
-- 
1.5.2.2


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] API: Correct storage enumeration routine, other minor fixes in API storage area.

2008-07-28 Thread Rafal Jaworowski
Signed-off-by: Rafal Czubak [EMAIL PROTECTED]
Acked-by: Rafal Jaworowski [EMAIL PROTECTED]
---
 api/api_storage.c |   16 +++-
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/api/api_storage.c b/api/api_storage.c
index 7e63240..874c538 100644
--- a/api/api_storage.c
+++ b/api/api_storage.c
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2007 Semihalf
+ * (C) Copyright 2007-2008 Semihalf
  *
  * Written by: Rafal Jaworowski [EMAIL PROTECTED]
  *
@@ -53,7 +53,7 @@ struct stor_spec {
int enum_started;
int enum_ended;
int type;   /* external type: 
DT_STOR_{IDE,USB,etc} */
-   charname[4];
+   char*name;
 };
 
 static struct stor_spec specs[ENUM_MAX] = { { 0, 0, 0, 0,  }, };
@@ -108,7 +108,10 @@ static int dev_stor_get(int type, int first, int *more, 
struct device_info *di)
 
if (first) {
di-cookie = (void *)get_dev(specs[type].name, 0);
-   found = 1;
+   if (di-cookie == NULL)
+   return 0;
+   else
+   found = 1;
 
} else {
for (i = 0; i  specs[type].max_dev; i++)
@@ -123,7 +126,10 @@ static int dev_stor_get(int type, int first, int *more, 
struct device_info *di)
}
 
di-cookie = (void *)get_dev(specs[type].name, 
i);
-   found = 1;
+   if (di-cookie == NULL)
+   return 0;
+   else
+   found = 1;
 
/* provide hint if there are more devices in
 * this group to enumerate */
@@ -360,7 +366,7 @@ lbasize_t dev_read_stor(void *cookie, void *buf, lbasize_t 
len, lbastart_t start
return 0;
 
if ((dd-block_read) == NULL) {
-   debugf(no block_read() for device 0x%08x\n);
+   debugf(no block_read() for device 0x%08x\n, cookie);
return 0;
}
 
-- 
1.5.2.2


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] API: Dump contents of sector 0 in the demo application.

2008-07-28 Thread Rafal Jaworowski
Signed-off-by: Rafal Czubak [EMAIL PROTECTED]
Acked-by: Rafal Jaworowski [EMAIL PROTECTED]
---
 api_examples/demo.c |   50 --
 1 files changed, 44 insertions(+), 6 deletions(-)

diff --git a/api_examples/demo.c b/api_examples/demo.c
index 7ccdb51..a842448 100644
--- a/api_examples/demo.c
+++ b/api_examples/demo.c
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright 2007 Semihalf
+ * (C) Copyright 2007-2008 Semihalf
  *
  * Written by: Rafal Jaworowski [EMAIL PROTECTED]
  *
@@ -31,13 +31,15 @@
 
 #define errf(fmt, args...) do { printf(ERROR @ %s(): , __func__); 
printf(fmt, ##args); } while (0)
 
-void   test_dump_si(struct sys_info *);
+#define BUF_SZ 2048
+#define WAIT_SECS  5
+
+void   test_dump_buf(void *, int);
 void   test_dump_di(int);
+void   test_dump_si(struct sys_info *);
 void   test_dump_sig(struct api_signature *);
 
-char buf[2048];
-
-#define WAIT_SECS 5
+static char buf[BUF_SZ];
 
 int main(int argc, char *argv[])
 {
@@ -126,11 +128,17 @@ int main(int argc, char *argv[])
if (i == devs_no)
printf(No storage devices available\n);
else {
+   memset(buf, 0, BUF_SZ);
+
if ((rv = ub_dev_open(i)) != 0)
errf(open device %d error %d\n, i, rv);
-   else if ((rv = ub_dev_read(i, buf, 200, 20)) != 0)
+
+   else if ((rv = ub_dev_read(i, buf, 1, 0)) != 0)
errf(could not read from device %d, error %d\n, i, 
rv);
 
+   printf(Sector 0 dump (512B):\n);
+   test_dump_buf(buf, 512);
+
ub_dev_close(i);
}
 
@@ -235,6 +243,36 @@ static char * test_stor_typ(int type)
return Unknown;
 }
 
+void test_dump_buf(void *buf, int len)
+{
+   int i;
+   int line_counter = 0;
+   int sep_flag = 0;
+   int addr = 0;
+
+   printf(%07x:\t, addr);
+
+   for (i = 0; i  len; i++) {
+   if (line_counter++  15) {
+   line_counter = 0;
+   sep_flag = 0;
+   addr += 16;
+   i--;
+   printf(\n%07x:\t, addr);
+   continue;
+   }
+
+   if (sep_flag++  1) {
+   sep_flag = 1;
+   printf( );
+   }
+
+   printf(%02x, *((char *)buf++));
+   }
+
+   printf(\n);
+}
+
 void test_dump_di(int handle)
 {
int i;
-- 
1.5.2.2


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] API: Teach the storage layer about SATA and MMC options.

2008-07-28 Thread Rafal Jaworowski
Signed-off-by: Rafal Czubak [EMAIL PROTECTED]
Acked-by: Rafal Jaworowski [EMAIL PROTECTED]
---
 api/api_storage.c|   29 ++---
 api_examples/demo.c  |   11 +++
 include/api_public.h |1 +
 3 files changed, 30 insertions(+), 11 deletions(-)

diff --git a/api/api_storage.c b/api/api_storage.c
index 874c538..74391a5 100644
--- a/api/api_storage.c
+++ b/api/api_storage.c
@@ -46,7 +46,8 @@
 #define ENUM_USB   1
 #define ENUM_SCSI  2
 #define ENUM_MMC   3
-#define ENUM_MAX   4
+#define ENUM_SATA  4
+#define ENUM_MAX   5
 
 struct stor_spec {
int max_dev;
@@ -68,12 +69,19 @@ void dev_stor_init(void)
specs[ENUM_IDE].type = DEV_TYP_STOR | DT_STOR_IDE;
specs[ENUM_IDE].name = ide;
 #endif
-#if defined(CONFIG_CMD_USB)
-   specs[ENUM_USB].max_dev = USB_MAX_STOR_DEV;
-   specs[ENUM_USB].enum_started = 0;
-   specs[ENUM_USB].enum_ended = 0;
-   specs[ENUM_USB].type = DEV_TYP_STOR | DT_STOR_USB;
-   specs[ENUM_USB].name = usb;
+#if defined(CONFIG_CMD_MMC)
+   specs[ENUM_MMC].max_dev = CFG_MMC_MAX_DEVICE;
+   specs[ENUM_MMC].enum_started = 0;
+   specs[ENUM_MMC].enum_ended = 0;
+   specs[ENUM_MMC].type = DEV_TYP_STOR | DT_STOR_MMC;
+   specs[ENUM_MMC].name = mmc;
+#endif
+#if defined(CONFIG_CMD_SATA)
+   specs[ENUM_SATA].max_dev = CFG_SATA_MAX_DEVICE;
+   specs[ENUM_SATA].enum_started = 0;
+   specs[ENUM_SATA].enum_ended = 0;
+   specs[ENUM_SATA].type = DEV_TYP_STOR | DT_STOR_SATA;
+   specs[ENUM_SATA].name = sata;
 #endif
 #if defined(CONFIG_CMD_SCSI)
specs[ENUM_SCSI].max_dev = CFG_SCSI_MAX_DEVICE;
@@ -82,6 +90,13 @@ void dev_stor_init(void)
specs[ENUM_SCSI].type = DEV_TYP_STOR | DT_STOR_SCSI;
specs[ENUM_SCSI].name = scsi;
 #endif
+#if defined(CONFIG_CMD_USB)  defined(CONFIG_USB_STORAGE)
+   specs[ENUM_USB].max_dev = USB_MAX_STOR_DEV;
+   specs[ENUM_USB].enum_started = 0;
+   specs[ENUM_USB].enum_ended = 0;
+   specs[ENUM_USB].type = DEV_TYP_STOR | DT_STOR_USB;
+   specs[ENUM_USB].name = usb;
+#endif
 }
 
 /*
diff --git a/api_examples/demo.c b/api_examples/demo.c
index a842448..69ac318 100644
--- a/api_examples/demo.c
+++ b/api_examples/demo.c
@@ -226,20 +226,23 @@ void test_dump_si(struct sys_info *si)
}
 }
 
-static char * test_stor_typ(int type)
+static char *test_stor_typ(int type)
 {
if (type  DT_STOR_IDE)
return IDE;
 
+   if (type  DT_STOR_MMC)
+   return MMC;
+
+   if (type  DT_STOR_SATA)
+   return SATA;
+
if (type  DT_STOR_SCSI)
return SCSI;
 
if (type  DT_STOR_USB)
return USB;
 
-   if (type  DT_STOR_MMC);
-   return MMC;
-
return Unknown;
 }
 
diff --git a/include/api_public.h b/include/api_public.h
index 9bc0501..5b0c09e 100644
--- a/include/api_public.h
+++ b/include/api_public.h
@@ -126,6 +126,7 @@ typedef unsigned long lbastart_t;
 #define DT_STOR_SCSI   0x0020
 #define DT_STOR_USB0x0040
 #define DT_STOR_MMC0x0080
+#define DT_STOR_SATA   0x0100
 
 #define DEV_STA_CLOSED 0x  /* invalid, closed */
 #define DEV_STA_OPEN   0x0001  /* open i.e. active */
-- 
1.5.2.2


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] TFTP block size is too high

2008-04-24 Thread Rafal Jaworowski
Jared Holzman wrote:
 Does anyone else have problems with the new default tftp block size of 1468 
 (set 
 in tftp.c) being too large? I was getting corruption of the d/led images 
 until I 
 dropped it down to 1200. I'm afraid I don't have time to determine the real 
 maximum size before corruption occurs. Does someone else want to look into 
 this?

What exactly is your set-up i.e. what version of U-Boot, architecture,
platform etc. are you running? I recall problems with MPC5121e that sound
familiar, which were caused by a bug/misconfiguration in the FEC driver, but
in this case we fixed the issue a couple of months ago. Maybe that's something
 of that sort..

kind regards,
Rafal

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] Regarding Dcache Flush in MPC85xx

2008-03-04 Thread Rafal Jaworowski
Scott Wood wrote:
 On Fri, Feb 29, 2008 at 06:10:10PM +0100, Rafal Jaworowski wrote:
 Not really, unfortunatelly: the 85xx still lacks flushing the d-cache
 before disabling it. I was going to fix this by refactoring existing
 d-cache disabling/flushing routines into a common code that would sit in
 the lib_ppc/ppccache.S (as mostly exisiting implementations are just
 copy/paste of the same thing) and have 85xx use it too, but didn't have
 time yet to clean it up. If anyone is willing to do it sooner, I won't
 complain :)
 
 The implementations for other CPUs such as 86xx are a bit questionable
 (arbitrarily using the cache line times 65536 as the size to flush, and
 inefficiently iterating 4 bytes at a time rather than a cache line).
 
 Here's an 85xx implementation from an as-yet-unmerged Linux tree (replace
 KERNELBASE with something appropriate for U-boot) that dynamically figures
 out the cache and cache block sizes.  Note that it assumes at most 8 ways.
 

Hi Scott,

Thanks for this code. It's true that bulk of current U-Boot implementations of
the PPC flushing routines are not relevant to real parameters of the cache
they operate against. I thought about making this auto-discovery too, so your
code is a great hint. I don't know however when I'd be able to work on merging
it with U-Boot and testing..

Rafal

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] Regarding Dcache Flush in MPC85xx

2008-02-29 Thread Rafal Jaworowski
Kumar Gala wrote:
 We are using MPC8555 processor and uboot 1.1.4 both the uboot and  
 linux
 was up. Now we plan to port QNX, we are facing following issues.

 1. Qnx is not jumping to the startup location.  After giving go  
 command
 control is still in the uboot only.

 2.  When searching in the mailling list we came to know qnx required  
 to
 flush the Data Cache before disabling it in the uboot level
 (common/cmd_bootelf.c line no:59)

 3.  I checked other powerpc architecture like 7xx/74xx, 86xx and 4xx.
 These architecture  has seperate cache.S file ( cpu/mpc86xx/ 
 cache.S). That
 file contains flush_data_cache function to flush the cache before
 disabling it. But in the MPC85xx flushing the data cache was missing.

 4. This is a bug in the 85xx uboot code. Is there any work arround for
 this?
 
 1.1.4 is a fairly old u-boot at this point.  I believe we have  
 reworked the PPC cache ops and fixed the fact that 85xx was missing  
 flush_data_cache in the process.
 

Not really, unfortunatelly: the 85xx still lacks flushing the d-cache before
disabling it. I was going to fix this by refactoring existing d-cache
disabling/flushing routines into a common code that would sit in the
lib_ppc/ppccache.S (as mostly exisiting implementations are just copy/paste of
the same thing) and have 85xx use it too, but didn't have time yet to clean it
up. If anyone is willing to do it sooner, I won't complain :)

Rafal

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] Pull request: u-boot-freebsd

2008-02-21 Thread Rafal Jaworowski
The following changes since commit b6f29c84c208a091f95a10cbc9852d729659ba20:
  Jean-Christophe PLAGNIOL-VILLARD (1):
s3c24x0: Fix unused variable 'i' in function 'serial_init_dev'

are available in the git repository at:

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

Rafal Jaworowski (1):
  API: Add (c) and licensing notice to the public API header.

 include/api_public.h |   51 ++
 1 files changed, 51 insertions(+), 0 deletions(-)

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH] PPC: Use r2 instead of r29 as global data pointer

2008-02-17 Thread Rafal Jaworowski
Hello Wolfgang,
you wrote:
 R29 was an unlucky choice as with recent toolchains (gcc-4.2.x) gcc
 will refuse to use load/store multiple insns; instead, it issues a
 list of simple load/store instructions upon function entry and exit,
 resulting in bigger code size, which in turn makes the build for a
 few boards fail.
 
 Use r2 instead.
 

How about switching r14 (GOT ptr) to r13 in a similar way? Quite like the r2,
r13 is a dedicated register (small data area purposes) and it would let us
avoid using the -ffixed completely.

This would also resolve a general problem with standalone applications that is
lurking in the dark: the global data and GOT pointers are not saved/restored
upon exception/interrupt, so for example, upon a decrementer hit U-Boot code
starts using the dedicated regs blindly, but they could be scratched by the
app's code that was interrupted. This doesn't surface with the U-Boot in-tree
example applications, as they are built using system config.mk and contain
proper -ffixed tweaks and happen to be in sync, but this a general problem,
which should be addressed, as is biting applications built outside of U-Boot
tree..

If we used another dedicated register for GOT purposes, which applications
code would never use by definition, those issues dissapear. Otherwise we need
to provide explicit save/restore in the exception prologue/epilogue.

I can provide patches, but let me know your thoughts first.

kind regards,
Rafal

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [patch] disable caches before booting an app for Blackfin apps

2008-01-30 Thread Rafal Jaworowski
Hi Mike,

 It isn't generally save to execute applications outside of U-Boot with caches
 enabled due to the way the Blackfin processor handles caches (requires
 software assistance).  This patch disables caches before booting an ELF or
 just booting raw code.  The previous discussion on the patch was that we
 wanted to use weaks instead, but that proved to not be feasible when multiple
 symbols are involved, which puts us back at the ifdef solution.  I've
 minimized the ugliness by moving the setup step outside of the main function.
 
 Signed-off-by: Mike Frysinger [EMAIL PROTECTED]
 ---
 diff --git a/common/cmd_boot.c b/common/cmd_boot.c
 index e68f16f..9d4f026 100644
 --- a/common/cmd_boot.c
 +++ b/common/cmd_boot.c
 @@ -32,6 +32,23 @@
  DECLARE_GLOBAL_DATA_PTR;
  #endif
  
 +static inline void go_setup(int argc, char *argv[])
 +{
 +#if defined(CONFIG_I386)
 + /*
 +  * x86 does not use a dedicated register to pass the pointer
 +  * to the global_data
 +  */
 + argv[0] = (char *)gd;
 +
 +#elif defined(CONFIG_BLACKFIN)
 + if (dcache_status ())
 + dcache_disable ();
 + if (icache_status ())
 + icache_disable ();
 +#endif
 +}
 +
  int do_go (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
  {
   ulong   addr, rc;
 @@ -46,25 +63,20 @@ int do_go (cmd_tbl_t *cmdtp, int flag, int argc, char 
 *argv[])
  
   printf (## Starting application at 0x%08lX ...\n, addr);
  
 + go_setup(argc, argv);
 +
 +#if defined(CONFIG_NIOS)
   /*
 -  * pass address parameter as argv[0] (aka command name),
 -  * and all remaining args
 -  */
 -#if defined(CONFIG_I386)
 - /*
 -  * x86 does not use a dedicated register to pass the pointer
 -  * to the global_data
 +  * Nios function pointers are address  1
*/
 - argv[0] = (char *)gd;
 + addr = 1;
  #endif
 -#if !defined(CONFIG_NIOS)
 - rc = ((ulong (*)(int, char *[]))addr) (--argc, argv[1]);
 -#else
 +
   /*
 -  * Nios function pointers are address  1
 +  * pass address parameter as argv[0] (aka command name),
 +  * and all remaining args
*/
 - rc = ((ulong (*)(int, char *[]))(addr1)) (--argc, argv[1]);
 -#endif
 + rc = ((ulong (*)(int, char *[]))addr) (--argc, argv[1]);
   if (rc != 0) rcode = 1;
  
   printf (## Application terminated, rc = 0x%lX\n, rc);
 diff --git a/common/cmd_elf.c b/common/cmd_elf.c
 index 2eb7453..4683554 100644
 --- a/common/cmd_elf.c
 +++ b/common/cmd_elf.c
 @@ -27,6 +27,21 @@ DECLARE_GLOBAL_DATA_PTR;
  #define MAX(a,b) ((a)  (b) ? (a) : (b))
  #endif
  
 +static inline void bootelf_setup(int argc, char *argv[])
 +{
 + /*
 +  * QNX images require the data cache is disabled.
 +  * Data cache is already flushed, so just turn it off.
 +  */
 + if (dcache_status ())
 + dcache_disable ();
 +

Please re-formulate the comment, so it doesn't only refer to QNX, as per our
recent discussion disabling d-cache before running an external app is
considered a generic U-Boot operation, not platform specific, see this thread:

http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/34599

Also, I'm wondering if we shouldn't re-enable the cache after returning from
an external app (as they are allowed to do so)? Without doing it we end up
with degraded performance without any notice, require explicit reset to return
to previous state etc.

kind regards,
Rafal

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] Pull request: u-boot-freebsd

2008-01-29 Thread Rafal Jaworowski
Dear Wolfgang,

The following are two fixes which are needed in this release. Without these
the build breaks when CONFIG_API is enabled.

kind regards,
Rafal


The following changes since commit 98b742489c09780be6a832eeaa4e5eff824792bb:
  Wolfgang Denk (1):
inka4x0: remove dead code

are available in the git repository at:

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

Rafal Jaworowski (2):
  API: Convert conditional building to the new scheme.
  API: Provide dummy halt() in the glue layer.

 Makefile  |9 ++---
 api/Makefile  |5 ++---
 api_examples/Makefile |   20 +---
 api_examples/libgenwrap.c |7 ++-
 4 files changed, 23 insertions(+), 18 deletions(-)

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] API: Provide dummy halt() in the glue layer.

2008-01-29 Thread Rafal Jaworowski
This fixes a demo app link failure on platforms configured with 
CONFIG_PANIC_HANG.

Signed-off-by: Rafal Jaworowski [EMAIL PROTECTED]
---
 api_examples/libgenwrap.c |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/api_examples/libgenwrap.c b/api_examples/libgenwrap.c
index df62633..2b62bad 100644
--- a/api_examples/libgenwrap.c
+++ b/api_examples/libgenwrap.c
@@ -84,7 +84,12 @@ void do_reset (void)
ub_reset();
 }
 
-void *malloc(size_t len)
+void *malloc (size_t len)
 {
return NULL;
 }
+
+void hang (void)
+{
+   while (1) ;
+}
-- 
1.5.2.2


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH] API: Convert conditional building to the new scheme.

2008-01-29 Thread Rafal Jaworowski
This fixes a build breakage with CONFIG_API enabled, which appeared after
the recent changes in the U-Boot build system.

Signed-off-by: Rafal Jaworowski [EMAIL PROTECTED]
---

These patches should probably be sent before the pull request :) But here they 
are for review and reference.

 Makefile  |9 ++---
 api/Makefile  |5 ++---
 api_examples/Makefile |   20 +---
 3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/Makefile b/Makefile
index 0f6cc59..3e7cffc 100644
--- a/Makefile
+++ b/Makefile
@@ -253,9 +253,7 @@ LIBS += $(shell if [ -d post/board/$(BOARDDIR) ]; then echo 
\
post/board/$(BOARDDIR)/libpost$(BOARD).a; fi)
 LIBS += common/libcommon.a
 LIBS += libfdt/libfdt.a
-ifeq ($(CONFIG_API),y)
 LIBS += api/libapi.a
-endif
 
 LIBS := $(addprefix $(obj),$(LIBS))
 .PHONY : $(LIBS)
@@ -266,11 +264,8 @@ PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) 
-print-libgcc-file-name`) -
 # The tools are needed early, so put this first
 # Don't include stuff already done in $(LIBS)
 SUBDIRS= tools \
- examples
-
-ifeq ($(CONFIG_API),y)
-SUBDIRS += api_examples
-endif
+ examples \
+ api_examples
 
 .PHONY : $(SUBDIRS)
 
diff --git a/api/Makefile b/api/Makefile
index 94de3dc..4216892 100644
--- a/api/Makefile
+++ b/api/Makefile
@@ -24,13 +24,12 @@ include $(TOPDIR)/config.mk
 
 LIB= $(obj)libapi.a
 
-COBJS  = api.o api_net.o api_storage.o api_platform-$(ARCH).o
+COBJS-$(CONFIG_API) += api.o api_net.o api_storage.o api_platform-$(ARCH).o
 
+COBJS  := $(COBJS-y)
 SRCS   := $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS))
 
-all:   $(LIB)
-
 $(LIB):$(obj).depend $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
 
diff --git a/api_examples/Makefile b/api_examples/Makefile
index cb49a9e..5666f48 100644
--- a/api_examples/Makefile
+++ b/api_examples/Makefile
@@ -30,19 +30,25 @@ endif
 
 include $(TOPDIR)/config.mk
 
-ELF+= demo
-BIN+= demo.bin
+ELF-$(CONFIG_API) += demo
+BIN-$(CONFIG_API) += demo.bin
+ELF:= $(ELF-y)
+BIN:= $(BIN-y)
 
 #CFLAGS += -v
 
-COBJS  := $(ELF:=.o)
-SOBJS  := crt0.o
+COBJS-$(CONFIG_API) += $(ELF:=.o)
+SOBJS-$(CONFIG_API) += crt0.o
 ifeq ($(ARCH),ppc)
-SOBJS  += ppcstring.o
+SOBJS-$(CONFIG_API) += ppcstring.o
 endif
+COBJS  := $(COBJS-y)
+SOBJS  := $(SOBJS-y)
 
 LIB= $(obj)libglue.a
-LIBCOBJS= glue.o crc32.o ctype.o string.o vsprintf.o libgenwrap.o
+LIBCOBJS-$(CONFIG_API) += glue.o crc32.o ctype.o string.o vsprintf.o \
+   libgenwrap.o
+LIBCOBJS := $(LIBCOBJS-y)
 
 LIBOBJS= $(addprefix $(obj),$(SOBJS) $(LIBCOBJS))
 
@@ -55,7 +61,7 @@ gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
 
 CPPFLAGS += -I..
 
-all:   $(obj).depend $(OBJS) $(LIB) $(BIN) $(ELF)
+all:   $(obj).depend $(OBJS) $(LIB) $(ELF) $(BIN)
 
 #
 $(LIB):$(obj).depend $(LIBOBJS)
-- 
1.5.2.2


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


[U-Boot-Users] [PATCH v2] ppc: Refactor cache routines, so there is only one common set.

2008-01-15 Thread Rafal Jaworowski
Signed-off-by: Rafal Jaworowski [EMAIL PROTECTED]
---
 cpu/mpc512x/start.S |   46 
 cpu/mpc83xx/start.S |   34 
 cpu/mpc85xx/start.S |   45 ---
 cpu/mpc86xx/start.S |   44 ---
 cpu/ppc4xx/start.S  |   33 ---
 lib_ppc/Makefile|2 +-
 lib_ppc/ppccache.S  |   72 +++
 7 files changed, 73 insertions(+), 203 deletions(-)
 create mode 100644 lib_ppc/ppccache.S

diff --git a/cpu/mpc512x/start.S b/cpu/mpc512x/start.S
index 244c69b..5a9d868 100644
--- a/cpu/mpc512x/start.S
+++ b/cpu/mpc512x/start.S
@@ -479,52 +479,6 @@ get_pvr:
mfspr   r3, PVR
blr
 
-/*---
 */
-/* Function:ppcDcbf */
-/* Description: Data Cache block flush */
-/* Input:   r3 = effective address */
-/* Output:  none. */
-/*---
 */
-   .globl  ppcDcbf
-ppcDcbf:
-   dcbfr0,r3
-   blr
-
-/*---
 */
-/* Function:ppcDcbi */
-/* Description: Data Cache block Invalidate */
-/* Input:   r3 = effective address */
-/* Output:  none. */
-/*---
 */
-   .globl  ppcDcbi
-ppcDcbi:
-   dcbir0,r3
-   blr
-
-/*--
- * Function:ppcDcbz
- * Description: Data Cache block zero.
- * Input:   r3 = effective address
- * Output:  none.
- *-- */
-
-   .globl  ppcDcbz
-ppcDcbz:
-   dcbzr0,r3
-   blr
-
-   .globl  ppcDWstore
-ppcDWstore:
-   lfd 1, 0(r4)
-   stfd1, 0(r3)
-   blr
-
-   .globl  ppcDWload
-ppcDWload:
-   lfd 1, 0(r3)
-   stfd1, 0(r4)
-   blr
-
 /*---*/
 
 /*
diff --git a/cpu/mpc83xx/start.S b/cpu/mpc83xx/start.S
index 1dfbf62..309eb30 100644
--- a/cpu/mpc83xx/start.S
+++ b/cpu/mpc83xx/start.S
@@ -840,40 +840,6 @@ get_pvr:
mfspr   r3, PVR
blr
 
-/*---
 */
-/* Function:ppcDcbf */
-/* Description: Data Cache block flush */
-/* Input:   r3 = effective address */
-/* Output:  none. */
-/*---
 */
-   .globl  ppcDcbf
-ppcDcbf:
-   dcbfr0,r3
-   blr
-
-/*---
 */
-/* Function:ppcDcbi */
-/* Description: Data Cache block Invalidate */
-/* Input:   r3 = effective address */
-/* Output:  none. */
-/*---
 */
-   .globl  ppcDcbi
-ppcDcbi:
-   dcbir0,r3
-   blr
-
-/*--
- * Function:ppcDcbz
- * Description: Data Cache block zero.
- * Input:   r3 = effective address
- * Output:  none.
- *-- */
-
-   .globl  ppcDcbz
-ppcDcbz:
-   dcbzr0,r3
-   blr
-
.globl  ppcDWstore
 ppcDWstore:
lfd 1, 0(r4)
diff --git a/cpu/mpc85xx/start.S b/cpu/mpc85xx/start.S
index b489d2f..44b2c7d 100644
--- a/cpu/mpc85xx/start.S
+++ b/cpu/mpc85xx/start.S
@@ -778,51 +778,6 @@ in32r:
lwbrx   r3,r0,r3
blr
 
-/*---
 */
-/* Function:ppcDcbf */
-/* Description: Data Cache block flush */
-/* Input:   r3 = effective address */
-/* Output:  none. */
-/*---
 */
-   .globl  ppcDcbf
-ppcDcbf:
-   dcbfr0,r3
-   blr
-
-/*---
 */
-/* Function:ppcDcbi */
-/* Description: Data Cache block Invalidate */
-/* Input:   r3 = effective address */
-/* Output:  none. */
-/*---
 */
-   .globl  ppcDcbi
-ppcDcbi:
-   dcbir0,r3
-   blr
-
-/*--
- * Function:ppcDcbz
- * Description: Data Cache block zero.
- * Input:   r3 = effective address
- * Output:  none.
- *-- */
-
-   .globl  ppcDcbz
-ppcDcbz:
-   dcbzr0,r3
-   blr