[5924] sh4: mmio based CF support on r2d board (Takashi YOSHII).
Revision: 5924
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5924 Author: balrog Date: 2008-12-07 18:41:42 +0000 (Sun, 07 Dec 2008)
Log Message:
-----------
sh4: mmio based CF support on r2d board (Takashi YOSHII).
This patch adds emulation for a CompactFlash on sh4/r2d board. The device is CF, but wired to be worked as True-IDE mode, and connected directly to SH bus. So, this code is to support generally mmio based IDEs which are supported by "pata_platform" driver in linux kernel.
Modified Paths:
--------------
trunk/Makefile.target
trunk/hw/ide.c
trunk/hw/r2d.c
trunk/hw/sh.hModified: trunk/Makefile.target
===================================================================
Makefile.target +1 -0
@@ -711,6 +711,7 @@ ifeq ($(TARGET_BASE_ARCH), sh4) OBJS+= shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o OBJS+= sh_timer.o ptimer.o sh_serial.o sh_intc.o sm501.o serial.o +OBJS+= ide.o endif ifeq ($(TARGET_BASE_ARCH), m68k) OBJS+= an5206.o mcf5206.o ptimer.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o
Modified: trunk/hw/ide.c
===================================================================
hw/ide.c +92 -0
98 lines not on this page · raw message
Modified: trunk/hw/r2d.c
===================================================================
hw/r2d.c +5 -0
@@ -149,6 +149,11 @@ sm501_vga_ram_addr =qemu_ram_alloc (SM501_VRAM_SIZE );sm501_init (ds,0x10000000 , sm501_vga_ram_addr,SM501_VRAM_SIZE , serial_hds[2 ]); + +/* onboard CF (True IDE mode, Master only). */ +mmio_ide_init (0x14001000 ,0x1400080c ,NULL ,1 , + drives_table[drive_get_index (IF_IDE ,0 ,0 )].bdrv,NULL ); +/* Todo: register on board registers */ {int kernel_size;
Modified: trunk/hw/sh.h
===================================================================
hw/sh.h +4 -0
@@ -45,4 +45,8 @@/* tc58128.c */ int tc58128_init (struct SH7750State *s,const char *zone1,const char *zone2); +/* ide.c */ +void mmio_ide_init (target_phys_addr_t membase,target_phys_addr_t membase2, +qemu_irq irq,int shift, +BlockDriverState *hd0,BlockDriverState *hd1);#endif