From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50753) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qa9rK-0007aS-HO for qemu-devel@nongnu.org; Fri, 24 Jun 2011 13:07:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qa9rJ-0003oo-76 for qemu-devel@nongnu.org; Fri, 24 Jun 2011 13:07:58 -0400 Received: from mail-bw0-f45.google.com ([209.85.214.45]:37808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qa9rI-0003oU-6T for qemu-devel@nongnu.org; Fri, 24 Jun 2011 13:07:56 -0400 Received: by bwz16 with SMTP id 16so2699761bwz.4 for ; Fri, 24 Jun 2011 10:07:55 -0700 (PDT) From: Vasily Khoruzhick Date: Fri, 24 Jun 2011 20:06:58 +0300 References: <201106081422.42682.anarsoul@gmail.com> <1308305077-21503-2-git-send-email-anarsoul@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201106242006.58883.anarsoul@gmail.com> Subject: Re: [Qemu-devel] [PATCH v4 2/2] Add support for Zipit Z2 machine List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: "qemu-devel@nongnu.org" On Friday 24 June 2011 17:45:06 Peter Maydell wrote: > On 17 June 2011 11:04, Vasily Khoruzhick wrote: > > Zipit Z2 is small PXA270 based handheld. > > > > Signed-off-by: Vasily Khoruzhick > > 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