]> err.no Git - linux-2.6/commitdiff
[AVR32] Get rid of board_setup_fbmem()
authorHaavard Skinnemoen <hskinnemoen@atmel.com>
Wed, 21 Mar 2007 15:23:41 +0000 (16:23 +0100)
committerHaavard Skinnemoen <hskinnemoen@atmel.com>
Fri, 27 Apr 2007 11:44:15 +0000 (13:44 +0200)
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>
arch/avr32/boards/atstk1000/atstk1002.c
arch/avr32/boards/atstk1000/setup.c
arch/avr32/kernel/setup.c
include/asm-avr32/setup.h

index 5974768a59e58f182b32c52626c2daed58528b24..abe6ca203fa752c36be16b4b12bca9e2c4f9e49e 100644 (file)
@@ -33,7 +33,7 @@ struct eth_addr {
 static struct eth_addr __initdata hw_addr[2];
 
 static struct eth_platform_data __initdata eth_data[2];
-extern struct lcdc_platform_data atstk1000_fb0_data;
+static struct lcdc_platform_data atstk1000_fb0_data;
 
 static struct spi_board_info spi0_board_info[] __initdata = {
        {
@@ -148,6 +148,8 @@ static int __init atstk1002_init(void)
        set_hw_addr(at32_add_device_eth(0, &eth_data[0]));
 
        at32_add_device_spi(0, spi0_board_info, ARRAY_SIZE(spi0_board_info));
+       atstk1000_fb0_data.fbmem_start = fbmem_start;
+       atstk1000_fb0_data.fbmem_size = fbmem_size;
        at32_add_device_lcdc(0, &atstk1000_fb0_data);
 
        return 0;
index 272c011802a7ff4bf7135c53c6288654ed2d47ba..2bc4b88d7edb82925dd72db8d13dd1a554ac2ce8 100644 (file)
 
 /* Initialized by bootloader-specific startup code. */
 struct tag *bootloader_tags __initdata;
-
-struct lcdc_platform_data __initdata atstk1000_fb0_data;
-
-void __init board_setup_fbmem(unsigned long fbmem_start,
-                             unsigned long fbmem_size)
-{
-       if (!fbmem_size)
-               return;
-
-       if (!fbmem_start) {
-               void *fbmem;
-
-               fbmem = alloc_bootmem_low_pages(fbmem_size);
-               fbmem_start = __pa(fbmem);
-       } else {
-               pg_data_t *pgdat;
-
-               for_each_online_pgdat(pgdat) {
-                       if (fbmem_start >= pgdat->bdata->node_boot_start
-                           && fbmem_start <= pgdat->bdata->node_low_pfn)
-                               reserve_bootmem_node(pgdat, fbmem_start,
-                                                    fbmem_size);
-               }
-       }
-
-       printk("%luKiB framebuffer memory at address 0x%08lx\n",
-              fbmem_size >> 10, fbmem_start);
-       atstk1000_fb0_data.fbmem_start = fbmem_start;
-       atstk1000_fb0_data.fbmem_size = fbmem_size;
-}
index 1682e2d61cf310793ac7c0b57b30fef0f6070a88..b279d66acf5fa09600a3901fa83cfda18d2706a3 100644 (file)
@@ -228,8 +228,8 @@ alloc_reserved_region(resource_size_t *start, resource_size_t size,
  * Board-specific code may use these variables to set up platform data
  * for the framebuffer driver if fbmem_size is nonzero.
  */
-static resource_size_t __initdata fbmem_start;
-static resource_size_t __initdata fbmem_size;
+resource_size_t __initdata fbmem_start;
+resource_size_t __initdata fbmem_size;
 
 /*
  * "fbmem=xxx[kKmM]" allocates the specified amount of boot memory for
@@ -561,13 +561,10 @@ void __init setup_arch (char **cmdline_p)
 
        setup_bootmem();
 
-       board_setup_fbmem(fbmem_start, fbmem_size);
-
 #ifdef CONFIG_VT
        conswitchp = &dummy_con;
 #endif
 
        paging_init();
-
        resource_init();
 }
index bca2ee1fc607b9d426c60c78d16303e7146dbb58..1ff1a217015d85d2e6eaedf8bcc5af61acd0a41f 100644 (file)
@@ -126,10 +126,10 @@ struct tagtable {
 
 extern struct tag *bootloader_tags;
 
+extern resource_size_t fbmem_start;
+extern resource_size_t fbmem_size;
 
 void setup_processor(void);
-extern void board_setup_fbmem(unsigned long fbmem_start,
-                             unsigned long fbmem_size);
 
 #endif /* !__ASSEMBLY__ */