aboutsummaryrefslogtreecommitdiff
path: root/hw/tosa.c
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-06-09 00:03:13 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-06-09 00:03:13 +0000
commit88d2c950b002a3976cd5673b0214006e72cae191 (patch)
treea165d43e40fa2d6d98fe9e9139cd809f13f5b426 /hw/tosa.c
parentc8256f9d23bba4fac3b0b6a9e6e3dc12362cbe0b (diff)
TC6393XB system features (Dmitry Baryshkov).
Add basic support for TC6393XB system features. No support for GPIO input though. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4702 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/tosa.c')
-rw-r--r--hw/tosa.c38
1 files changed, 2 insertions, 36 deletions
diff --git a/hw/tosa.c b/hw/tosa.c
index 97d41ece8c..f67d67e199 100644
--- a/hw/tosa.c
+++ b/hw/tosa.c
@@ -12,6 +12,7 @@
#include "pxa.h"
#include "arm-misc.h"
#include "sysemu.h"
+#include "devices.h"
#include "sharpsl.h"
#include "pcmcia.h"
#include "block.h"
@@ -31,41 +32,6 @@
#define TOSA_GPIO_SD_WP (TOSA_SCOOP_GPIO_BASE + 3)
#define TOSA_GPIO_PWR_ON (TOSA_SCOOP_GPIO_BASE + 4)
-struct tc6393xb_s {
- target_phys_addr_t target_base;
-};
-
-static uint32_t tc6393xb_readb(void *opaque, target_phys_addr_t addr)
-{
- return 3;
-}
-static void tc6393xb_writeb(void *opaque, target_phys_addr_t addr,
- uint32_t value)
-{
-}
-static void tosa_tc6393xb_register(struct pxa2xx_state_s *cpu)
-{
- int iomemtype;
- struct tc6393xb_s *s;
- CPUReadMemoryFunc *tc6393xb_readfn[] = {
- tc6393xb_readb,
- tc6393xb_readb,
- tc6393xb_readb,
- };
- CPUWriteMemoryFunc *tc6393xb_writefn[] = {
- tc6393xb_writeb,
- tc6393xb_writeb,
- tc6393xb_writeb,
- };
-
- s = (struct tc6393xb_s *) qemu_mallocz(sizeof(struct tc6393xb_s));
- s->target_base = 0x10000000;
-
- iomemtype = cpu_register_io_memory(0, tc6393xb_readfn,
- tc6393xb_writefn, s);
- cpu_register_physical_memory(s->target_base, 0x200000, iomemtype);
-}
-
static void tosa_microdrive_attach(struct pxa2xx_state_s *cpu)
{
struct pcmcia_card_s *md;
@@ -132,7 +98,7 @@ static void tosa_init(ram_addr_t ram_size, int vga_ram_size,
cpu_register_physical_memory(0, TOSA_ROM,
qemu_ram_alloc(TOSA_ROM) | IO_MEM_ROM);
- tosa_tc6393xb_register(cpu);
+ tc6393xb_init(0x10000000, NULL);
scp0 = scoop_init(cpu, 0, 0x08800000);
scp1 = scoop_init(cpu, 1, 0x14800040);