aboutsummaryrefslogtreecommitdiff
path: root/hw/etraxfs.c
diff options
context:
space:
mode:
authoredgar_igl <edgar_igl@c046a42c-6fe2-441c-8c8c-71466251a162>2008-03-14 01:50:49 +0000
committeredgar_igl <edgar_igl@c046a42c-6fe2-441c-8c8c-71466251a162>2008-03-14 01:50:49 +0000
commitca87d03b77aade91926972b7e20b5382b59d1c77 (patch)
treee3849cdee7f002d70416a18183ef4861d1804bc8 /hw/etraxfs.c
parent05ba7d5f3476de8b573aed43229bbcf0ffda4b69 (diff)
Made the etrax timers and serial-ports base address relocatable. Use target_phys_addr_t instead of target_ulong.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4058 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/etraxfs.c')
-rw-r--r--hw/etraxfs.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/hw/etraxfs.c b/hw/etraxfs.c
index 2c3c5541c1..7c3f59edcf 100644
--- a/hw/etraxfs.c
+++ b/hw/etraxfs.c
@@ -35,10 +35,10 @@ static void main_cpu_reset(void *opaque)
}
/* Init functions for different blocks. */
-extern qemu_irq *etraxfs_pic_init(CPUState *env, target_ulong base);
-/* TODO: Make these blocks relocate:able. */
-extern void etraxfs_timer_init(CPUState *env, qemu_irq *irqs);
-extern void etraxfs_ser_init(CPUState *env, qemu_irq *irqs);
+extern qemu_irq *etraxfs_pic_init(CPUState *env, target_phys_addr_t base);
+void etraxfs_timer_init(CPUState *env, qemu_irq *irqs,
+ target_phys_addr_t base);
+void etraxfs_ser_init(CPUState *env, qemu_irq *irqs, target_phys_addr_t base);
static
void bareetraxfs_init (int ram_size, int vga_ram_size,
@@ -84,8 +84,14 @@ void bareetraxfs_init (int ram_size, int vga_ram_size,
4, 0x0000, 0x0000, 0x0000, 0x0000);
pic = etraxfs_pic_init(env, 0xb001c000);
- etraxfs_timer_init(env, pic);
- etraxfs_ser_init(env, pic);
+ /* 2 timers. */
+ etraxfs_timer_init(env, pic, 0xb001e000);
+ etraxfs_timer_init(env, pic, 0xb005e000);
+ /* 4 serial ports. */
+ etraxfs_ser_init(env, pic, 0xb0026000);
+ etraxfs_ser_init(env, pic, 0xb0028000);
+ etraxfs_ser_init(env, pic, 0xb002a000);
+ etraxfs_ser_init(env, pic, 0xb002c000);
kernel_size = load_image(kernel_filename, phys_ram_base + 0x4000);
/* magic for boot. */