Skip to contentSkip to conversation

[5934] SH: improve the way sh7750 registers io memory (Takashi YOSHII).

Qemu-devel Andrzej Zaborowski 1 participant 1 message Dec 7, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 5934

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5934
Author:   balrog
Date:     2008-12-07 19:33:15 +0000 (Sun, 07 Dec 2008)

Log Message:
-----------
SH: improve the way sh7750 registers io memory (Takashi YOSHII).

Fixes to be needed for commit #5849 "Change MMIO callbacks..."
hw/sh7750.c:
- Divide region of CPU control registers to avoid overlapping to peripheral modules.
- Delete unused var "icr", which had moved to hw/sh_intc.c.
hw/sm501.c:
- Merge non page aligned palette registers into the region of control registers.

Modified Paths:
--------------

    trunk/hw/sh7750.c
    trunk/hw/sm501.c

Modified: trunk/hw/sh7750.c
===================================================================

hw/sh7750.c +6 -8
@@ -60,7 +60,6 @@
     uint16_t periph_portdirb;	/* Direction seen from the peripherals */
     sh7750_io_device *devices[NB_DEVICES];	/* External peripherals */
 
-    uint16_t icr;
     /* Cache */
     uint32_t ccr;
 
@@ -222,8 +221,6 @@
 	return porta_lines(s);
     case SH7750_PDTRB_A7:
 	return portb_lines(s);
-    case 0x1fd00000:
-        return s->icr;
     default:
 	error_access("word read", addr);
 	assert(0);
@@ -328,9 +325,6 @@
 	    assert(0);
 	}
 	return;
-    case 0x1fd00000:
-        s->icr = mem_value;
-	return;
     default:
 	error_access("word write", addr);
 	assert(0);
@@ -687,8 +681,12 @@
     sh7750_io_memory = cpu_register_io_memory(0,
 					      sh7750_mem_read,
 					      sh7750_mem_write, s);
-    cpu_register_physical_memory_offset(0x1c000000, 0x04000000,
-                                        sh7750_io_memory, 0x1c000000);
+    cpu_register_physical_memory_offset(0x1f000000, 0x1000,
+                                        sh7750_io_memory, 0x1f000000);
+    cpu_register_physical_memory_offset(0x1f800000, 0x1000,
+                                        sh7750_io_memory, 0x1f800000);
+    cpu_register_physical_memory_offset(0x1fc00000, 0x1000,
+                                        sh7750_io_memory, 0x1fc00000);
 
     sh7750_mm_cache_and_tlb = cpu_register_io_memory(0,
 						     sh7750_mmct_read,

Modified: trunk/hw/sm501.c
===================================================================

hw/sm501.c +35 -47

119 lines not on this page · raw message