summaryrefslogtreecommitdiff
path: root/hw/r2d.c
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-19 09:15:50 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-19 09:15:50 +0000
commit1836a2cc5e693dd55ee8311abfff81bd066a9bfb (patch)
tree56b2f16eefbd8fbb3f8f8fc1df468458291313ff /hw/r2d.c
parent8edce2de626a6a03ca964ce13a789e0de6892940 (diff)
downloadqemu-1836a2cc5e693dd55ee8311abfff81bd066a9bfb.tar.gz
qemu-1836a2cc5e693dd55ee8311abfff81bd066a9bfb.tar.bz2
qemu-1836a2cc5e693dd55ee8311abfff81bd066a9bfb.zip
Adds SM501 usb host emulation feature.
It makes usb keyboard available for sh4/r2d system emulation. The changes for "hw/usb-ohci.c" are as follows. - 'localmem_base' is introduced as OHCIState struct member. SM501 has a local memory, and it is used to pass and receive data with OHCI driver. OHCI driver accesses it with SH4 physical memory address, and SM501 accesses it with SM501 local address. 'localmem_base' holds where the SM501 local memory is mapped into SH4 physical address space. - Memory access functions modified to adjust address with 'localmem_base'. The functions are, ohci_read_*(), ohci_put_*(), and ohci_copy_*(). - ohci_read_hcca() and ohci_put_hcca() are introduced for more consistent implementation. For other source files, it does, - introduces usb_ohci_init_sm501(). - adds irq argument for SM501 initialization, to emulate USB interrupts. Signed-off-by: Shin-ichiro KAWASAKI <kawasaki@juno.dti.ne.jp> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7188 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/r2d.c')
-rw-r--r--hw/r2d.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/r2d.c b/hw/r2d.c
index 4684296b7a..950576c5ec 100644
--- a/hw/r2d.c
+++ b/hw/r2d.c
@@ -222,7 +222,7 @@ static void r2d_init(ram_addr_t ram_size, int vga_ram_size,
irq = r2d_fpga_init(0x04000000, sh7750_irl(s));
pci = sh_pci_register_bus(r2d_pci_set_irq, r2d_pci_map_irq, irq, 0, 4);
- sm501_init(0x10000000, SM501_VRAM_SIZE, serial_hds[2]);
+ sm501_init(0x10000000, SM501_VRAM_SIZE, irq[SM501], serial_hds[2]);
/* onboard CF (True IDE mode, Master only). */
if ((i = drive_get_index(IF_IDE, 0, 0)) != -1)