Revision: 1282
http://hackndev.svn.sourceforge.net/hackndev/?rev=1282&view=rev
Author: marex_z71
Date: 2007-08-27 21:22:12 -0700 (Mon, 27 Aug 2007)
Log Message:
-----------
WhineHack: v1.2 - added OMAP support
Modified Paths:
--------------
whinehack/arm/arm.c
whinehack/include/regs.h
whinehack/include/whinehack.rcp
Modified: whinehack/arm/arm.c
===================================================================
--- whinehack/arm/arm.c 2007-08-27 22:33:18 UTC (rev 1281)
+++ whinehack/arm/arm.c 2007-08-28 04:22:12 UTC (rev 1282)
@@ -50,12 +50,17 @@
/* make sure we're being given a sensible divisor */
if (divisor > 4) return 0;
- /* make sure this an XScale CPU */
+ /* check if this is an XScale CPU */
asm("mrc p15, 0, %0, c0, c0, 0": "=r"(cpu_id));
if ((cpu_id & CPU_VENDOR_MASK) != CPUV_INTEL || (cpu_id & CPU_MODEL_MASK) == CPU_SA1100) {
- return 1;
+ /* it is OMAP */
+ reg = (UInt32*)LCD_TIMING2;
+ irq_off();
+ *reg = (*reg & ~0xff) | ((divisor+2) & 0xff);
+ irq_on();
+ return *reg;
}
-
+ /* it is XScale */
if (pref & ALTREGSFLAG) {
reg = (UInt32*)(LCCR3 - ALT_OFFSET);
} else {
Modified: whinehack/include/regs.h
===================================================================
--- whinehack/include/regs.h 2007-08-27 22:33:18 UTC (rev 1281)
+++ whinehack/include/regs.h 2007-08-28 04:22:12 UTC (rev 1282)
@@ -11,4 +11,12 @@
#define ALT_OFFSET 0x02000000
+/* OMAP LCD Control registers */
+#define LCD_CONTROL 0xfffec000
+#define LCD_TIMING0 0xfffec004
+#define LCD_TIMING1 0xfffec008
+#define LCD_TIMING2 0xfffec00c
+#define LCD_STATUS 0xfffec010
+#define LCD_SUBPANEL 0xfffec014
+
#endif
Modified: whinehack/include/whinehack.rcp
===================================================================
--- whinehack/include/whinehack.rcp 2007-08-27 22:33:18 UTC (rev 1281)
+++ whinehack/include/whinehack.rcp 2007-08-28 04:22:12 UTC (rev 1282)
@@ -1,7 +1,7 @@
#include "whinehack_r.h"
APPLICATIONICONNAME ID 1000 "WhineHack"
-VERSION "1.1"
+VERSION "1.2"
ICON
BEGIN
@@ -43,7 +43,7 @@
FORM ID MainForm AT (0 0 160 160) NOFRAME USABLE MENUID MainFormMenu HELPID GnuGpl MODAL
BEGIN
- TITLE "WhineHack v1.1"
+ TITLE "WhineHack v1.2"
LABEL "To get started:" AUTOID AT (2 12) FONT 0
LABEL "Select a hack level from the" AUTOID AT (12 22) FONT 0
LABEL "menu (say Ultra Violence)." AUTOID AT (12 32) FONT 0
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|