_mali_osk_errcode_t mali_platform_init(void) { mali_clk = clk_get_sys("mali", "pll_fixed"); if (mali_clk ) { if (!mali_init_flag) { #if defined(CONFIG_MALI_CLK_400M) clk_set_rate(mali_clk, 400000000); #elif defined(CONFIG_MALI_CLK_333M) clk_set_rate(mali_clk, 333000000); #else clk_set_rate(mali_clk, 250000000); #endif mali_clk->enable(mali_clk); malifix_init(); mali_meson_poweron(1); mali_init_flag = 1; } MALI_SUCCESS; } #ifdef CONFIG_ARCH_MESON6 MALI_PRINT_ERROR(("Failed to lookup mali clock")); MALI_ERROR(_MALI_OSK_ERR_FAULT); #else MALI_SUCCESS; #endif /* CONFIG_ARCH_MESON6 */ }
_mali_osk_errcode_t mali_platform_init(void) { mali_clk = clk_get_sys("mali", "pll_fixed"); if (mali_clk ) { if (!mali_init_flag) { clk_set_rate(mali_clk, 400000000); mali_clk->enable(mali_clk); malifix_init(); mali_meson_poweron(1); mali_init_flag = 1; } MALI_SUCCESS; } else panic("linux kernel should > 3.0\n"); #if MESON_CPU_TYPE >= MESON_CPU_TYPE_MESON6 MALI_PRINT_ERROR(("Failed to lookup mali clock")); MALI_ERROR(_MALI_OSK_ERR_FAULT); #else MALI_SUCCESS; #endif /* CONFIG_ARCH_MESON6 */ }