On Friday 24 June 2011 17:45:06 Peter Maydell wrote: > On 17 June 2011 11:04, Vasily Khoruzhick <anars...@gmail.com> wrote: > > Zipit Z2 is small PXA270 based handheld. > > > > Signed-off-by: Vasily Khoruzhick <anars...@gmail.com> > > These patches are affected by the bug in current qemu master > which breaks cpu_physical_memory_map() so I haven't tested them yet. > > Some minor nitpicks (nearly there now): > > + if (z->cur_reg == 0x22 && val == 0x0000) { > > + z->enabled = 1; > > + printf("%s: LCD enabled\n", __func__); > > + } else if (z->cur_reg == 0x10 && val == 0x0000) { > > + z->enabled = 0; > > + printf("%s: LCD disabled\n", __func__); > > + } > > Drop or use DPRINTF for these printfs, please.
Hm, I'd like to keep them to see then software enables or disables LCD. > > + break; > > + default: > > + fprintf(stderr, "%s: unknown command!\n", __func__); > > Ditto. Ok > > +static VMStateDescription vmstate_zipit_lcd_state = { > > + .name = "zipit-lcd", > > + .version_id = 1, > > + .minimum_version_id = 1, > > + .minimum_version_id_old = 1, > > + .fields = (VMStateField[]) { > > + VMSTATE_INT32(enabled, ZipitLCD), > > + VMSTATE_END_OF_LIST(), > > + } > > +}; > > This is missing fields for selected, buf[] and cur_reg. > > > + if (s->len++ > 2) { > > + fprintf(stderr, "%s: message too long (%i bytes)\n", > > + __func__, s->len); > > + return 1; > > + } > > DPRINTF. Ok > > + case I2C_START_RECV: > > + if (s->len != 1) { > > + fprintf(stderr, "%s: short message!?\n", __func__); > > + } > > + break; > > Ditto. Ok > > +static VMStateDescription vmstate_aer915_state = { > > + .name = "aer915", > > + .version_id = 1, > > + .minimum_version_id = 1, > > + .minimum_version_id_old = 1, > > + .fields = (VMStateField[]) { > > + VMSTATE_END_OF_LIST(), > > + } > > +}; > > Missing fields for len and buf[]. > > Looks ok otherwise. (Patch 1 looks ok too.) > > Have you tried vmload/vmsave, by the way? (I don't know if all the > devices the pxa2xx uses have save/load support implemented, it > would be interesting to check if you haven't already.) Nope, how to try vmload/vmsave? > -- PMM Thanks for review. Regards Vasily