diff options
Diffstat (limited to 'meta/recipes-kernel/linux/linux-2.6.23/cm-x270/0006-ramdisk_load.patch')
-rw-r--r-- | meta/recipes-kernel/linux/linux-2.6.23/cm-x270/0006-ramdisk_load.patch | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/meta/recipes-kernel/linux/linux-2.6.23/cm-x270/0006-ramdisk_load.patch b/meta/recipes-kernel/linux/linux-2.6.23/cm-x270/0006-ramdisk_load.patch deleted file mode 100644 index aa25dd9bfc..0000000000 --- a/meta/recipes-kernel/linux/linux-2.6.23/cm-x270/0006-ramdisk_load.patch +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | From ca4508b1266109208f62e986b51397ce2788e255 Mon Sep 17 00:00:00 2001 | ||
2 | From: Cliff Brake <cbrake@happy.dev.bec-systems.com> | ||
3 | Date: Fri, 20 Jul 2007 19:01:50 -0400 | ||
4 | Subject: [PATCH] ramdisk_load | ||
5 | |||
6 | --- | ||
7 | arch/arm/mach-pxa/cm-x270.c | 6 ++++++ | ||
8 | include/asm-arm/arch-pxa/cm-x270.h | 2 ++ | ||
9 | init/initramfs.c | 16 ++++++++++++++++ | ||
10 | 3 files changed, 24 insertions(+), 0 deletions(-) | ||
11 | |||
12 | diff --git a/arch/arm/mach-pxa/cm-x270.c b/arch/arm/mach-pxa/cm-x270.c | ||
13 | index 88b080d..c6ec489 100644 | ||
14 | --- a/arch/arm/mach-pxa/cm-x270.c | ||
15 | +++ b/arch/arm/mach-pxa/cm-x270.c | ||
16 | @@ -308,6 +308,12 @@ static struct map_desc cmx270_io_desc[] __initdata = { | ||
17 | .length = PXA_CS_SIZE, | ||
18 | .type = MT_DEVICE | ||
19 | }, | ||
20 | + [2] = { /* NOR flash */ | ||
21 | + .virtual = CMX270_FLASH_VIRT, | ||
22 | + .pfn = __phys_to_pfn(PXA_CS0_PHYS), | ||
23 | + .length = (8<<20), /* up to 8 MByte flash */ | ||
24 | + .type = MT_DEVICE | ||
25 | + }, | ||
26 | }; | ||
27 | |||
28 | /* | ||
29 | diff --git a/include/asm-arm/arch-pxa/cm-x270.h b/include/asm-arm/arch-pxa/cm-x270.h | ||
30 | index 24613a5..aad152e 100644 | ||
31 | --- a/include/asm-arm/arch-pxa/cm-x270.h | ||
32 | +++ b/include/asm-arm/arch-pxa/cm-x270.h | ||
33 | @@ -20,7 +20,9 @@ | ||
34 | |||
35 | #define CMX270_IT8152_VIRT (CMX270_VIRT_BASE) | ||
36 | #define CMX270_IDE104_VIRT (CMX270_IT8152_VIRT + PXA_CS_SIZE) | ||
37 | +#define CMX270_FLASH_VIRT (CMX270_IDE104_VIRT + PXA_CS_SIZE) | ||
38 | |||
39 | +#define CMX270_FLASH_RAMDISK_VIRT (CMX270_FLASH_VIRT + 0x1c0000) | ||
40 | |||
41 | /* GPIO related definitions */ | ||
42 | #define GPIO_IT8152_IRQ (22) | ||
43 | diff --git a/init/initramfs.c b/init/initramfs.c | ||
44 | index 00eff7a..0ecd40b 100644 | ||
45 | --- a/init/initramfs.c | ||
46 | +++ b/init/initramfs.c | ||
47 | @@ -7,6 +7,9 @@ | ||
48 | #include <linux/string.h> | ||
49 | #include <linux/syscalls.h> | ||
50 | |||
51 | +// HACK for compulab cm-x270 | ||
52 | +#include <asm/arch/cm-x270.h> | ||
53 | + | ||
54 | static __initdata char *message; | ||
55 | static void __init error(char *x) | ||
56 | { | ||
57 | @@ -550,7 +553,20 @@ static int __init populate_rootfs(void) | ||
58 | #ifdef CONFIG_BLK_DEV_INITRD | ||
59 | if (initrd_start) { | ||
60 | #ifdef CONFIG_BLK_DEV_RAM | ||
61 | + | ||
62 | + /* hack to make initramfs work because the | ||
63 | + * compulab BL does not zero out the | ||
64 | + * initrd memory. This only seems to affect loading | ||
65 | + * initramfs (cpio.gz) archives. Does not seem to | ||
66 | + * affect ramdisks. | ||
67 | + */ | ||
68 | + int initrd_size = *(int *)(CMX270_FLASH_RAMDISK_VIRT); | ||
69 | int fd; | ||
70 | + | ||
71 | + initrd_end = initrd_start + initrd_size; | ||
72 | + //printk("CLIFF: initrd_start = 0x%x\n", initrd_start); | ||
73 | + //printk("CLIFF: initrd_end = 0x%x\n", initrd_end); | ||
74 | + | ||
75 | printk(KERN_INFO "checking if image is initramfs..."); | ||
76 | err = unpack_to_rootfs((char *)initrd_start, | ||
77 | initrd_end - initrd_start, 1); | ||
78 | -- | ||
79 | 1.5.1.6 | ||
80 | |||