Revision 88d2c950 hw/tosa.c

b/hw/tosa.c
12 12
#include "pxa.h"
13 13
#include "arm-misc.h"
14 14
#include "sysemu.h"
15
#include "devices.h"
15 16
#include "sharpsl.h"
16 17
#include "pcmcia.h"
17 18
#include "block.h"
......
31 32
#define TOSA_GPIO_SD_WP			(TOSA_SCOOP_GPIO_BASE + 3)
32 33
#define TOSA_GPIO_PWR_ON		(TOSA_SCOOP_GPIO_BASE + 4)
33 34

  
34
struct tc6393xb_s {
35
    target_phys_addr_t target_base;
36
};
37

  
38
static uint32_t tc6393xb_readb(void *opaque, target_phys_addr_t addr)
39
{
40
    return 3;
41
}
42
static void tc6393xb_writeb(void *opaque, target_phys_addr_t addr,
43
        uint32_t value)
44
{
45
}
46
static void tosa_tc6393xb_register(struct pxa2xx_state_s *cpu)
47
{
48
    int iomemtype;
49
    struct tc6393xb_s *s;
50
    CPUReadMemoryFunc *tc6393xb_readfn[] = {
51
        tc6393xb_readb,
52
        tc6393xb_readb,
53
        tc6393xb_readb,
54
    };
55
    CPUWriteMemoryFunc *tc6393xb_writefn[] = {
56
        tc6393xb_writeb,
57
        tc6393xb_writeb,
58
        tc6393xb_writeb,
59
    };
60

  
61
    s = (struct tc6393xb_s *) qemu_mallocz(sizeof(struct tc6393xb_s));
62
    s->target_base = 0x10000000;
63

  
64
    iomemtype = cpu_register_io_memory(0, tc6393xb_readfn,
65
                    tc6393xb_writefn, s);
66
    cpu_register_physical_memory(s->target_base, 0x200000, iomemtype);
67
}
68

  
69 35
static void tosa_microdrive_attach(struct pxa2xx_state_s *cpu)
70 36
{
71 37
    struct pcmcia_card_s *md;
......
132 98
    cpu_register_physical_memory(0, TOSA_ROM,
133 99
                    qemu_ram_alloc(TOSA_ROM) | IO_MEM_ROM);
134 100

  
135
    tosa_tc6393xb_register(cpu);
101
    tc6393xb_init(0x10000000, NULL);
136 102

  
137 103
    scp0 = scoop_init(cpu, 0, 0x08800000);
138 104
    scp1 = scoop_init(cpu, 1, 0x14800040);

Also available in: Unified diff