diff options
Diffstat (limited to 'arch/avr32/boards/atstk1000/setup.c')
-rw-r--r-- | arch/avr32/boards/atstk1000/setup.c | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/arch/avr32/boards/atstk1000/setup.c b/arch/avr32/boards/atstk1000/setup.c new file mode 100644 index 000000000000..191ab85de9a3 --- /dev/null +++ b/arch/avr32/boards/atstk1000/setup.c | |||
@@ -0,0 +1,59 @@ | |||
1 | /* | ||
2 | * ATSTK1000 board-specific setup code. | ||
3 | * | ||
4 | * Copyright (C) 2005-2006 Atmel Corporation | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #include <linux/bootmem.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/types.h> | ||
13 | #include <linux/linkage.h> | ||
14 | |||
15 | #include <asm/setup.h> | ||
16 | |||
17 | #include <asm/arch/board.h> | ||
18 | |||
19 | /* Initialized by bootloader-specific startup code. */ | ||
20 | struct tag *bootloader_tags __initdata; | ||
21 | |||
22 | struct lcdc_platform_data __initdata atstk1000_fb0_data; | ||
23 | |||
24 | asmlinkage void __init board_early_init(void) | ||
25 | { | ||
26 | extern void sdram_init(void); | ||
27 | |||
28 | #ifdef CONFIG_LOADER_STANDALONE | ||
29 | sdram_init(); | ||
30 | #endif | ||
31 | } | ||
32 | |||
33 | void __init board_setup_fbmem(unsigned long fbmem_start, | ||
34 | unsigned long fbmem_size) | ||
35 | { | ||
36 | if (!fbmem_size) | ||
37 | return; | ||
38 | |||
39 | if (!fbmem_start) { | ||
40 | void *fbmem; | ||
41 | |||
42 | fbmem = alloc_bootmem_low_pages(fbmem_size); | ||
43 | fbmem_start = __pa(fbmem); | ||
44 | } else { | ||
45 | pg_data_t *pgdat; | ||
46 | |||
47 | for_each_online_pgdat(pgdat) { | ||
48 | if (fbmem_start >= pgdat->bdata->node_boot_start | ||
49 | && fbmem_start <= pgdat->bdata->node_low_pfn) | ||
50 | reserve_bootmem_node(pgdat, fbmem_start, | ||
51 | fbmem_size); | ||
52 | } | ||
53 | } | ||
54 | |||
55 | printk("%luKiB framebuffer memory at address 0x%08lx\n", | ||
56 | fbmem_size >> 10, fbmem_start); | ||
57 | atstk1000_fb0_data.fbmem_start = fbmem_start; | ||
58 | atstk1000_fb0_data.fbmem_size = fbmem_size; | ||
59 | } | ||