]> err.no Git - linux-2.6/blobdiff - arch/powerpc/boot/of.c
Merge branch 'drm-patches' of ssh://master.kernel.org/pub/scm/linux/kernel/git/airlie...
[linux-2.6] / arch / powerpc / boot / of.c
index 044f34770b9685633532bc716020e2cbe51a6ae0..d16ee3e3f868eb2592822d63ecff77e07faeccc9 100644 (file)
@@ -173,7 +173,7 @@ static void *claim(unsigned long virt, unsigned long size, unsigned long align)
        return (void *) virt;
 }
 
-static void *of_try_claim(u32 size)
+static void *of_try_claim(unsigned long size)
 {
        unsigned long addr = 0;
 
@@ -212,10 +212,9 @@ static void *of_vmlinux_alloc(unsigned long size)
 {
        void *p = malloc(size);
 
-       if (!p) {
-               printf("Can't allocate memory for kernel image!\n\r");
-               exit();
-       }
+       if (!p)
+               fatal("Can't allocate memory for kernel image!\n\r");
+
        return p;
 }
 
@@ -267,7 +266,7 @@ static void of_console_write(char *buf, int len)
        call_prom("write", 3, 1, of_stdout_handle, buf, len);
 }
 
-int platform_init(void *promptr, char *dt_blob_start, char *dt_blob_end)
+void platform_init(unsigned long a1, unsigned long a2, void *promptr)
 {
        platform_ops.image_hdr = of_image_hdr;
        platform_ops.malloc = of_try_claim;
@@ -282,5 +281,9 @@ int platform_init(void *promptr, char *dt_blob_start, char *dt_blob_end)
        console_ops.write = of_console_write;
 
        prom = (int (*)(void *))promptr;
-       return 0;
+       loader_info.promptr = promptr;
+       if (a1 && a2 && a2 != 0xdeadbeef) {
+               loader_info.initrd_addr = a1;
+               loader_info.initrd_size = a2;
+       }
 }