void write_to_strongly_ordered_memory(void) { #if defined(CONFIG_ARCH_MSM7X27) if (!strongly_ordered_page) { if (!in_interrupt()) map_page_strongly_ordered(); else { printk(KERN_ALERT "Cannot map strongly ordered page in " "Interrupt Context\n"); /* capture it here before the allocation fails later */ BUG(); } } *(int *)strongly_ordered_page = 0; #endif }
void __init msm_add_kgsl_device(void) { /* Initialize the page for barriers and cache ops */ map_page_strongly_ordered(); /* This value has been set to 160000 for power savings. */ /* OEMs may modify the value at their discretion for performance */ /* The appropriate maximum replacement for 160000 is: */ /* clk_get_max_axi_khz() */ kgsl_pdata.high_axi_3d = 160000; /* 7x27 doesn't allow graphics clocks to be run asynchronously to */ /* the AXI bus */ kgsl_pdata.max_grp2d_freq = 0; kgsl_pdata.min_grp2d_freq = 0; kgsl_pdata.set_grp2d_async = NULL; kgsl_pdata.max_grp3d_freq = 0; kgsl_pdata.min_grp3d_freq = 0; kgsl_pdata.set_grp3d_async = NULL; kgsl_pdata.imem_clk_name = "imem_clk"; kgsl_pdata.grp3d_clk_name = "grp_clk"; kgsl_pdata.grp3d_pclk_name = "grp_pclk"; kgsl_pdata.grp2d0_clk_name = NULL; kgsl_pdata.idle_timeout_3d = HZ/5; kgsl_pdata.idle_timeout_2d = 0; #ifdef CONFIG_KGSL_PER_PROCESS_PAGE_TABLE kgsl_pdata.pt_va_size = SZ_32M; /* Maximum of 32 concurrent processes */ kgsl_pdata.pt_max_count = 32; #else kgsl_pdata.pt_va_size = SZ_128M; /* We only ever have one pagetable for everybody */ kgsl_pdata.pt_max_count = 1; #endif platform_device_register(&msm_device_kgsl); }