void __init msm_add_kgsl_device(void) { #ifdef CONFIG_ARCH_MSM7X27 /* Initialize the zero page for barriers and cache ops */ map_zero_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.grp2d_clk_name = NULL; #endif platform_device_register(&msm_device_kgsl); }
void write_to_strongly_ordered_memory(void) { #if defined(CONFIG_ARCH_MSM7X27) if (!zero_page_strongly_ordered) { if (!in_interrupt()) map_zero_page_strongly_ordered(); else { printk(KERN_ALERT "Cannot map zero page in " "Interrupt Context\n"); /* capture it here before the allocation fails later */ BUG(); } } *(int *)zero_page_strongly_ordered = 0; #endif }
void write_to_strongly_ordered_memory(void) { map_zero_page_strongly_ordered(); *(int *)zero_page_strongly_ordered = 0; }