diff options
author | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2007-03-21 11:23:41 -0400 |
---|---|---|
committer | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2007-04-27 07:44:15 -0400 |
commit | d80e2bb12606906fd0b5b5592f519852de8b0113 (patch) | |
tree | 37f751e0c020d50abf92eae9dca8ae01c2eba492 /arch/avr32 | |
parent | f9692b9501c339ec90647d8cd6ee5c106f072f9f (diff) |
[AVR32] Get rid of board_setup_fbmem()
Since the core setup code takes care of both allocation and
reservation of framebuffer memory, there's no need for this board-
specific hook anymore. Replace it with two global variables,
fbmem_start and fbmem_size, which can be used directly.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Diffstat (limited to 'arch/avr32')
-rw-r--r-- | arch/avr32/boards/atstk1000/atstk1002.c | 4 | ||||
-rw-r--r-- | arch/avr32/boards/atstk1000/setup.c | 30 | ||||
-rw-r--r-- | arch/avr32/kernel/setup.c | 7 |
3 files changed, 5 insertions, 36 deletions
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c index 5974768a59e5..abe6ca203fa7 100644 --- a/arch/avr32/boards/atstk1000/atstk1002.c +++ b/arch/avr32/boards/atstk1000/atstk1002.c | |||
@@ -33,7 +33,7 @@ struct eth_addr { | |||
33 | static struct eth_addr __initdata hw_addr[2]; | 33 | static struct eth_addr __initdata hw_addr[2]; |
34 | 34 | ||
35 | static struct eth_platform_data __initdata eth_data[2]; | 35 | static struct eth_platform_data __initdata eth_data[2]; |
36 | extern struct lcdc_platform_data atstk1000_fb0_data; | 36 | static struct lcdc_platform_data atstk1000_fb0_data; |
37 | 37 | ||
38 | static struct spi_board_info spi0_board_info[] __initdata = { | 38 | static struct spi_board_info spi0_board_info[] __initdata = { |
39 | { | 39 | { |
@@ -148,6 +148,8 @@ static int __init atstk1002_init(void) | |||
148 | set_hw_addr(at32_add_device_eth(0, ð_data[0])); | 148 | set_hw_addr(at32_add_device_eth(0, ð_data[0])); |
149 | 149 | ||
150 | at32_add_device_spi(0, spi0_board_info, ARRAY_SIZE(spi0_board_info)); | 150 | at32_add_device_spi(0, spi0_board_info, ARRAY_SIZE(spi0_board_info)); |
151 | atstk1000_fb0_data.fbmem_start = fbmem_start; | ||
152 | atstk1000_fb0_data.fbmem_size = fbmem_size; | ||
151 | at32_add_device_lcdc(0, &atstk1000_fb0_data); | 153 | at32_add_device_lcdc(0, &atstk1000_fb0_data); |
152 | 154 | ||
153 | return 0; | 155 | return 0; |
diff --git a/arch/avr32/boards/atstk1000/setup.c b/arch/avr32/boards/atstk1000/setup.c index 272c011802a7..2bc4b88d7edb 100644 --- a/arch/avr32/boards/atstk1000/setup.c +++ b/arch/avr32/boards/atstk1000/setup.c | |||
@@ -18,33 +18,3 @@ | |||
18 | 18 | ||
19 | /* Initialized by bootloader-specific startup code. */ | 19 | /* Initialized by bootloader-specific startup code. */ |
20 | struct tag *bootloader_tags __initdata; | 20 | struct tag *bootloader_tags __initdata; |
21 | |||
22 | struct lcdc_platform_data __initdata atstk1000_fb0_data; | ||
23 | |||
24 | void __init board_setup_fbmem(unsigned long fbmem_start, | ||
25 | unsigned long fbmem_size) | ||
26 | { | ||
27 | if (!fbmem_size) | ||
28 | return; | ||
29 | |||
30 | if (!fbmem_start) { | ||
31 | void *fbmem; | ||
32 | |||
33 | fbmem = alloc_bootmem_low_pages(fbmem_size); | ||
34 | fbmem_start = __pa(fbmem); | ||
35 | } else { | ||
36 | pg_data_t *pgdat; | ||
37 | |||
38 | for_each_online_pgdat(pgdat) { | ||
39 | if (fbmem_start >= pgdat->bdata->node_boot_start | ||
40 | && fbmem_start <= pgdat->bdata->node_low_pfn) | ||
41 | reserve_bootmem_node(pgdat, fbmem_start, | ||
42 | fbmem_size); | ||
43 | } | ||
44 | } | ||
45 | |||
46 | printk("%luKiB framebuffer memory at address 0x%08lx\n", | ||
47 | fbmem_size >> 10, fbmem_start); | ||
48 | atstk1000_fb0_data.fbmem_start = fbmem_start; | ||
49 | atstk1000_fb0_data.fbmem_size = fbmem_size; | ||
50 | } | ||
diff --git a/arch/avr32/kernel/setup.c b/arch/avr32/kernel/setup.c index 1682e2d61cf3..b279d66acf5f 100644 --- a/arch/avr32/kernel/setup.c +++ b/arch/avr32/kernel/setup.c | |||
@@ -228,8 +228,8 @@ alloc_reserved_region(resource_size_t *start, resource_size_t size, | |||
228 | * Board-specific code may use these variables to set up platform data | 228 | * Board-specific code may use these variables to set up platform data |
229 | * for the framebuffer driver if fbmem_size is nonzero. | 229 | * for the framebuffer driver if fbmem_size is nonzero. |
230 | */ | 230 | */ |
231 | static resource_size_t __initdata fbmem_start; | 231 | resource_size_t __initdata fbmem_start; |
232 | static resource_size_t __initdata fbmem_size; | 232 | resource_size_t __initdata fbmem_size; |
233 | 233 | ||
234 | /* | 234 | /* |
235 | * "fbmem=xxx[kKmM]" allocates the specified amount of boot memory for | 235 | * "fbmem=xxx[kKmM]" allocates the specified amount of boot memory for |
@@ -561,13 +561,10 @@ void __init setup_arch (char **cmdline_p) | |||
561 | 561 | ||
562 | setup_bootmem(); | 562 | setup_bootmem(); |
563 | 563 | ||
564 | board_setup_fbmem(fbmem_start, fbmem_size); | ||
565 | |||
566 | #ifdef CONFIG_VT | 564 | #ifdef CONFIG_VT |
567 | conswitchp = &dummy_con; | 565 | conswitchp = &dummy_con; |
568 | #endif | 566 | #endif |
569 | 567 | ||
570 | paging_init(); | 568 | paging_init(); |
571 | |||
572 | resource_init(); | 569 | resource_init(); |
573 | } | 570 | } |