]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - examples/stubs.c
Merge git://www.denx.de/git/u-boot into uboot
[karo-tx-uboot.git] / examples / stubs.c
index 571c4d50a437e905a289a177b4a4721e24850b1d..b9dbcf9065b9a8e635f1c1b9f5bcb9b99b391145 100644 (file)
@@ -25,14 +25,14 @@ gd_t *global_data;
        : : "i"(XF_ ## x * sizeof(void *)) : "eax", "ecx");
 #elif defined(CONFIG_PPC)
 /*
- * r29 holds the pointer to the global_data, r11 is a call-clobbered
+ * r2 holds the pointer to the global_data, r11 is a call-clobbered
  * register
  */
 #define EXPORT_FUNC(x) \
        asm volatile (                  \
 "      .globl " #x "\n"                \
 #x ":\n"                               \
-"      lwz     %%r11, %0(%%r29)\n"     \
+"      lwz     %%r11, %0(%%r2)\n"      \
 "      lwz     %%r11, %1(%%r11)\n"     \
 "      mtctr   %%r11\n"                \
 "      bctr\n"                         \
@@ -190,10 +190,10 @@ extern unsigned long __bss_start, _end;
 
 void app_startup(char **argv)
 {
-       unsigned long * cp = &__bss_start;
+       unsigned char * cp = (unsigned char *) &__bss_start;
 
        /* Zero out BSS */
-       while (cp < &_end) {
+       while (cp < (unsigned char *)&_end) {
                *cp++ = 0;
        }