From 9c71c67140feacfa7b3c5b27bcfa1eda122ba590 Mon Sep 17 00:00:00 2001 From: "Ithamar R. Adema" Date: Sat, 25 Oct 2014 14:46:37 -0700 Subject: [PATCH] ARM: Fix OMAP3 framebuffer divider setting QEMU was crashing since when setting the DSS divider we were _clearing_ the TV divider, and QEMU did not check for a divide by zero. This "fixes" the QEMU crash and gets us a working framebuffer on Beagle ;) --- src/system/boot/arch/arm/arch_framebuffer_omap3.cpp | 2 +- src/system/boot/platform/u-boot/video.cpp | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/system/boot/arch/arm/arch_framebuffer_omap3.cpp b/src/system/boot/arch/arm/arch_framebuffer_omap3.cpp index 976cace382..0fab14e2c7 100644 --- a/src/system/boot/arch/arm/arch_framebuffer_omap3.cpp +++ b/src/system/boot/arch/arm/arch_framebuffer_omap3.cpp @@ -262,7 +262,7 @@ found: setreg(DISPC, DISPC_TIMING_V, m->dispc_timing_v); modreg(DISPC, DISPC_DIVISOR, 0xffff, m->dispc_divisor); - modaddr(CM_CLKSEL_DSS, 0xffff, m->dss_divisor); + modaddr(CM_CLKSEL_DSS, 0x3f, m->dss_divisor); // Tell hardware to update, and wait for it modreg(DISPC, DISPC_CONTROL, diff --git a/src/system/boot/platform/u-boot/video.cpp b/src/system/boot/platform/u-boot/video.cpp index 1faabe13a0..72f94166b4 100644 --- a/src/system/boot/platform/u-boot/video.cpp +++ b/src/system/boot/platform/u-boot/video.cpp @@ -110,11 +110,7 @@ platform_init_video(void) gFramebuffer = arch_get_fb_arm_920(0x88000000); #elif defined(BOARD_CPU_OMAP3) extern ArchFramebuffer *arch_get_fb_arm_omap3(addr_t base); - //FIXME: This is disabled because writing to CM_CLKSEL_DSS during the initialisation - //of the framebuffer driver on OMAP3 triggers a floating point exception - //(tested in qemu-linaro from git at commit ac0bfdb9c310276521e5b089d7f36c1f610ca60b) - //gFramebuffer = arch_get_fb_arm_omap3(FB_BASE); - gFramebuffer = NULL; + gFramebuffer = arch_get_fb_arm_omap3(FB_BASE); #elif defined(BOARD_CPU_PXA270) ArchFramebuffer *arch_get_fb_arm_pxa270(addr_t base); gFramebuffer = arch_get_fb_arm_pxa270(0xA3000000);