Commit 8ef6367ea928725652bde4cbde0a94d0b29fe773
1 parent
1f587329
Scale TSC2102 touchscreen pressure value more realistically (still could be better).
PalmOS 5.2.1 now fully boots. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3741 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
4 changed files
with
11 additions
and
8 deletions
hw/mainstone.c
@@ -11,7 +11,6 @@ | @@ -11,7 +11,6 @@ | ||
11 | #include "hw.h" | 11 | #include "hw.h" |
12 | #include "pxa.h" | 12 | #include "pxa.h" |
13 | #include "arm-misc.h" | 13 | #include "arm-misc.h" |
14 | -#include "sysemu.h" | ||
15 | #include "net.h" | 14 | #include "net.h" |
16 | #include "devices.h" | 15 | #include "devices.h" |
17 | #include "boards.h" | 16 | #include "boards.h" |
hw/omap.c
@@ -4809,7 +4809,6 @@ static void omap_mpu_reset(void *opaque) | @@ -4809,7 +4809,6 @@ static void omap_mpu_reset(void *opaque) | ||
4809 | { | 4809 | { |
4810 | struct omap_mpu_state_s *mpu = (struct omap_mpu_state_s *) opaque; | 4810 | struct omap_mpu_state_s *mpu = (struct omap_mpu_state_s *) opaque; |
4811 | 4811 | ||
4812 | - omap_clkm_reset(mpu); | ||
4813 | omap_inth_reset(mpu->ih[0]); | 4812 | omap_inth_reset(mpu->ih[0]); |
4814 | omap_inth_reset(mpu->ih[1]); | 4813 | omap_inth_reset(mpu->ih[1]); |
4815 | omap_dma_reset(mpu->dma); | 4814 | omap_dma_reset(mpu->dma); |
@@ -4843,6 +4842,7 @@ static void omap_mpu_reset(void *opaque) | @@ -4843,6 +4842,7 @@ static void omap_mpu_reset(void *opaque) | ||
4843 | omap_mcbsp_reset(mpu->mcbsp3); | 4842 | omap_mcbsp_reset(mpu->mcbsp3); |
4844 | omap_lpg_reset(mpu->led[0]); | 4843 | omap_lpg_reset(mpu->led[0]); |
4845 | omap_lpg_reset(mpu->led[1]); | 4844 | omap_lpg_reset(mpu->led[1]); |
4845 | + omap_clkm_reset(mpu); | ||
4846 | cpu_reset(mpu->env); | 4846 | cpu_reset(mpu->env); |
4847 | } | 4847 | } |
4848 | 4848 |
hw/sd.c
@@ -397,7 +397,7 @@ static void sd_cardchange(void *opaque) | @@ -397,7 +397,7 @@ static void sd_cardchange(void *opaque) | ||
397 | } | 397 | } |
398 | 398 | ||
399 | /* We do not model the chip select pin, so allow the board to select | 399 | /* We do not model the chip select pin, so allow the board to select |
400 | - whether card should be in SSI ot MMC/SD mode. It is also up to the | 400 | + whether card should be in SSI or MMC/SD mode. It is also up to the |
401 | board to ensure that ssi transfers only occur when the chip select | 401 | board to ensure that ssi transfers only occur when the chip select |
402 | is asserted. */ | 402 | is asserted. */ |
403 | SDState *sd_init(BlockDriverState *bs, int is_spi) | 403 | SDState *sd_init(BlockDriverState *bs, int is_spi) |
hw/tsc210x.c
@@ -130,9 +130,10 @@ static const uint16_t mode_regs[16] = { | @@ -130,9 +130,10 @@ static const uint16_t mode_regs[16] = { | ||
130 | #define Y_TRANSFORM(value) \ | 130 | #define Y_TRANSFORM(value) \ |
131 | ((150 + ((int) (value) * (3037 - 150) / 32768)) << 4) | 131 | ((150 + ((int) (value) * (3037 - 150) / 32768)) << 4) |
132 | #define Z1_TRANSFORM(s) \ | 132 | #define Z1_TRANSFORM(s) \ |
133 | - ((400 - (s)->x + ((s)->pressure << 9)) << 4) | 133 | + ((400 - ((s)->x >> 7) + ((s)->pressure << 10)) << 4) |
134 | #define Z2_TRANSFORM(s) \ | 134 | #define Z2_TRANSFORM(s) \ |
135 | - ((4000 + (s)->y - ((s)->pressure << 10)) << 4) | 135 | + ((4000 + ((s)->y >> 7) - ((s)->pressure << 10)) << 4) |
136 | + | ||
136 | #define BAT1_VAL 0x8660 | 137 | #define BAT1_VAL 0x8660 |
137 | #define BAT2_VAL 0x0000 | 138 | #define BAT2_VAL 0x0000 |
138 | #define AUX1_VAL 0x35c0 | 139 | #define AUX1_VAL 0x35c0 |
@@ -367,7 +368,8 @@ static uint16_t tsc2102_data_register_read(struct tsc210x_state_s *s, int reg) | @@ -367,7 +368,8 @@ static uint16_t tsc2102_data_register_read(struct tsc210x_state_s *s, int reg) | ||
367 | 368 | ||
368 | case 0x05: /* BAT1 */ | 369 | case 0x05: /* BAT1 */ |
369 | s->dav &= 0xffbf; | 370 | s->dav &= 0xffbf; |
370 | - return TSC_CUT_RESOLUTION(BAT1_VAL, s->precision); | 371 | + return TSC_CUT_RESOLUTION(BAT1_VAL, s->precision) + |
372 | + (s->noise & 6); | ||
371 | 373 | ||
372 | case 0x06: /* BAT2 */ | 374 | case 0x06: /* BAT2 */ |
373 | s->dav &= 0xffdf; | 375 | s->dav &= 0xffdf; |
@@ -383,11 +385,13 @@ static uint16_t tsc2102_data_register_read(struct tsc210x_state_s *s, int reg) | @@ -383,11 +385,13 @@ static uint16_t tsc2102_data_register_read(struct tsc210x_state_s *s, int reg) | ||
383 | 385 | ||
384 | case 0x09: /* TEMP1 */ | 386 | case 0x09: /* TEMP1 */ |
385 | s->dav &= 0xfffb; | 387 | s->dav &= 0xfffb; |
386 | - return TSC_CUT_RESOLUTION(TEMP1_VAL, s->precision); | 388 | + return TSC_CUT_RESOLUTION(TEMP1_VAL, s->precision) - |
389 | + (s->noise & 5); | ||
387 | 390 | ||
388 | case 0x0a: /* TEMP2 */ | 391 | case 0x0a: /* TEMP2 */ |
389 | s->dav &= 0xfffd; | 392 | s->dav &= 0xfffd; |
390 | - return TSC_CUT_RESOLUTION(TEMP2_VAL, s->precision); | 393 | + return TSC_CUT_RESOLUTION(TEMP2_VAL, s->precision) ^ |
394 | + (s->noise & 3); | ||
391 | 395 | ||
392 | case 0x0b: /* DAC */ | 396 | case 0x0b: /* DAC */ |
393 | s->dav &= 0xfffe; | 397 | s->dav &= 0xfffe; |