diff options
Diffstat (limited to 'arch/arm/mach-realview/core.c')
-rw-r--r-- | arch/arm/mach-realview/core.c | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index a2083b60e3f..9f293438e02 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
@@ -59,6 +59,25 @@ | |||
59 | /* used by entry-macro.S and platsmp.c */ | 59 | /* used by entry-macro.S and platsmp.c */ |
60 | void __iomem *gic_cpu_base_addr; | 60 | void __iomem *gic_cpu_base_addr; |
61 | 61 | ||
62 | #ifdef CONFIG_ZONE_DMA | ||
63 | /* | ||
64 | * Adjust the zones if there are restrictions for DMA access. | ||
65 | */ | ||
66 | void __init realview_adjust_zones(int node, unsigned long *size, | ||
67 | unsigned long *hole) | ||
68 | { | ||
69 | unsigned long dma_size = SZ_256M >> PAGE_SHIFT; | ||
70 | |||
71 | if (!machine_is_realview_pbx() || node || (size[0] <= dma_size)) | ||
72 | return; | ||
73 | |||
74 | size[ZONE_NORMAL] = size[0] - dma_size; | ||
75 | size[ZONE_DMA] = dma_size; | ||
76 | hole[ZONE_NORMAL] = hole[0]; | ||
77 | hole[ZONE_DMA] = 0; | ||
78 | } | ||
79 | #endif | ||
80 | |||
62 | /* | 81 | /* |
63 | * This is the RealView sched_clock implementation. This has | 82 | * This is the RealView sched_clock implementation. This has |
64 | * a resolution of 41.7ns, and a maximum value of about 179s. | 83 | * a resolution of 41.7ns, and a maximum value of about 179s. |
@@ -543,7 +562,7 @@ static int realview_clcd_setup(struct clcd_fb *fb) | |||
543 | fb->panel = realview_clcd_panel(); | 562 | fb->panel = realview_clcd_panel(); |
544 | 563 | ||
545 | fb->fb.screen_base = dma_alloc_writecombine(&fb->dev->dev, framesize, | 564 | fb->fb.screen_base = dma_alloc_writecombine(&fb->dev->dev, framesize, |
546 | &dma, GFP_KERNEL); | 565 | &dma, GFP_KERNEL | GFP_DMA); |
547 | if (!fb->fb.screen_base) { | 566 | if (!fb->fb.screen_base) { |
548 | printk(KERN_ERR "CLCD: unable to map framebuffer\n"); | 567 | printk(KERN_ERR "CLCD: unable to map framebuffer\n"); |
549 | return -ENOMEM; | 568 | return -ENOMEM; |
@@ -788,3 +807,24 @@ void __init realview_timer_init(unsigned int timer_irq) | |||
788 | realview_clocksource_init(); | 807 | realview_clocksource_init(); |
789 | realview_clockevents_init(timer_irq); | 808 | realview_clockevents_init(timer_irq); |
790 | } | 809 | } |
810 | |||
811 | /* | ||
812 | * Setup the memory banks. | ||
813 | */ | ||
814 | void realview_fixup(struct machine_desc *mdesc, struct tag *tags, char **from, | ||
815 | struct meminfo *meminfo) | ||
816 | { | ||
817 | /* | ||
818 | * Most RealView platforms have 512MB contiguous RAM at 0x70000000. | ||
819 | * Half of this is mirrored at 0. | ||
820 | */ | ||
821 | #ifdef CONFIG_REALVIEW_HIGH_PHYS_OFFSET | ||
822 | meminfo->bank[0].start = 0x70000000; | ||
823 | meminfo->bank[0].size = SZ_512M; | ||
824 | meminfo->nr_banks = 1; | ||
825 | #else | ||
826 | meminfo->bank[0].start = 0; | ||
827 | meminfo->bank[0].size = SZ_256M; | ||
828 | meminfo->nr_banks = 1; | ||
829 | #endif | ||
830 | } | ||