X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=hw%2Fspitz.c;h=aca244ee2f87381cb6e2f4f82d7574846d62ffd3;hb=cd346349b45ef056f138a184f660b8c34c3213cc;hp=c6fb598f49be4321c50dc5e9a52134cb6084dff3;hpb=611d7189e7dc58cdd8e770924677161f72149922;p=qemu diff --git a/hw/spitz.c b/hw/spitz.c index c6fb598..aca244e 100644 --- a/hw/spitz.c +++ b/hw/spitz.c @@ -78,6 +78,18 @@ static uint32_t sl_readb(void *opaque, target_phys_addr_t addr) return 0; } +static uint32_t sl_readl(void *opaque, target_phys_addr_t addr) +{ + struct sl_nand_s *s = (struct sl_nand_s *) opaque; + addr -= s->target_base; + + if (addr == FLASH_FLASHIO) + return ecc_digest(&s->ecc, nand_getio(s->nand)) | + (ecc_digest(&s->ecc, nand_getio(s->nand)) << 16); + + return sl_readb(opaque, addr); +} + static void sl_writeb(void *opaque, target_phys_addr_t addr, uint32_t value) { @@ -139,7 +151,7 @@ static void sl_flash_register(struct pxa2xx_state_s *cpu, int size) CPUReadMemoryFunc *sl_readfn[] = { sl_readb, sl_readb, - sl_readb, + sl_readl, }; CPUWriteMemoryFunc *sl_writefn[] = { sl_writeb, @@ -182,8 +194,8 @@ static int spitz_keymap[SPITZ_KEY_SENSE_NUM + 1][SPITZ_KEY_STROBE_NUM] = { { 0x0f, 0x10, 0x12, 0x14, 0x22, 0x16, 0x24, 0x25, -1 , -1 , -1 }, { 0x3c, 0x11, 0x1f, 0x21, 0x2f, 0x23, 0x32, 0x26, -1 , 0x36, -1 }, { 0x3b, 0x1e, 0x20, 0x2e, 0x30, 0x31, 0x34, -1 , 0x1c, 0x2a, -1 }, - { 0x44, 0x2c, 0x2d, 0x0c, 0x39, 0x33, -1 , 0x48, -1 , -1 , 0x3d }, - { 0x37, 0x38, -1 , 0x45, 0x57, 0x58, 0x4b, 0x50, 0x4d, -1 , -1 }, + { 0x44, 0x2c, 0x2d, 0x0c, 0x39, 0x33, -1 , 0x48, -1 , -1 , 0x38 }, + { 0x37, 0x3d, -1 , 0x45, 0x57, 0x58, 0x4b, 0x50, 0x4d, -1 , -1 }, { 0x52, 0x43, 0x01, 0x47, 0x49, -1 , -1 , -1 , -1 , -1 , -1 }, }; @@ -403,13 +415,17 @@ static void spitz_keyboard_pre_map(struct spitz_keyboard_s *s) s->pre_map[0x0d | SHIFT ] = 0x13 | FN; /* plus */ s->pre_map[0x1a ] = 0x14 | FN; /* bracketleft */ s->pre_map[0x1b ] = 0x15 | FN; /* bracketright */ + s->pre_map[0x1a | SHIFT ] = 0x16 | FN; /* braceleft */ + s->pre_map[0x1b | SHIFT ] = 0x17 | FN; /* braceright */ s->pre_map[0x27 ] = 0x22 | FN; /* semicolon */ s->pre_map[0x27 | SHIFT ] = 0x23 | FN; /* colon */ s->pre_map[0x09 | SHIFT ] = 0x24 | FN; /* asterisk */ s->pre_map[0x2b ] = 0x25 | FN; /* backslash */ s->pre_map[0x2b | SHIFT ] = 0x26 | FN; /* bar */ s->pre_map[0x0c | SHIFT ] = 0x30 | FN; /* underscore */ + s->pre_map[0x33 | SHIFT ] = 0x33 | FN; /* less */ s->pre_map[0x35 ] = 0x33 | SHIFT; /* slash */ + s->pre_map[0x34 | SHIFT ] = 0x34 | FN; /* greater */ s->pre_map[0x35 | SHIFT ] = 0x34 | SHIFT; /* question */ s->pre_map[0x49 ] = 0x48 | FN; /* Page_Up */ s->pre_map[0x51 ] = 0x50 | FN; /* Page_Down */ @@ -912,7 +928,7 @@ static void spitz_microdrive_attach(struct pxa2xx_state_s *cpu) if (bs && bdrv_is_inserted(bs) && !bdrv_is_removable(bs)) { md = dscm1xxxx_init(bs); - pxa2xx_pcmcia_attach(cpu->pcmcia[0], md); + pxa2xx_pcmcia_attach(cpu->pcmcia[1], md); } } @@ -1198,10 +1214,10 @@ static void spitz_common_init(int ram_size, int vga_ram_size, spitz_akita_i2c_setup(cpu); if (model == terrier) - /* A 6.0 GB microdrive is permanently sitting in CF slot 0. */ + /* A 6.0 GB microdrive is permanently sitting in CF slot 1. */ spitz_microdrive_attach(cpu); else if (model != akita) - /* A 4.0 GB microdrive is permanently sitting in CF slot 0. */ + /* A 4.0 GB microdrive is permanently sitting in CF slot 1. */ spitz_microdrive_attach(cpu); /* Setup initial (reset) machine state */