[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>
This commit is contained in:
Родитель
f9692b9501
Коммит
d80e2bb126
|
@ -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, ð_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;
|
||||
|
|
|
@ -18,33 +18,3 @@
|
|||
|
||||
/* 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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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__ */
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче