From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KxHzi-0004HU-FM for qemu-devel@nongnu.org; Tue, 04 Nov 2008 04:14:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KxHzf-0004Gb-PU for qemu-devel@nongnu.org; Tue, 04 Nov 2008 04:14:37 -0500 Received: from [199.232.76.173] (port=40731 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KxHzf-0004GM-7N for qemu-devel@nongnu.org; Tue, 04 Nov 2008 04:14:35 -0500 Received: from rv-out-0708.google.com ([209.85.198.241]:37179) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KxHze-00013s-Kk for qemu-devel@nongnu.org; Tue, 04 Nov 2008 04:14:34 -0500 Received: by rv-out-0708.google.com with SMTP id f25so2790909rvb.22 for ; Tue, 04 Nov 2008 01:14:33 -0800 (PST) Message-ID: Date: Tue, 4 Nov 2008 10:14:33 +0100 From: "andrzej zaborowski" Subject: Re: [Qemu-devel] [PATCH] tosa: basic lcd support In-Reply-To: <20081102171908.GA12967@doriath.ww600.siemens.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1225631790-15735-1-git-send-email-dbaryshkov@gmail.com> <1225631790-15735-2-git-send-email-dbaryshkov@gmail.com> <1225631790-15735-3-git-send-email-dbaryshkov@gmail.com> <1225631790-15735-4-git-send-email-dbaryshkov@gmail.com> <20081102171908.GA12967@doriath.ww600.siemens.net> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dmitry Baryshkov Cc: qemu-devel@nongnu.org 2008/11/2 Dmitry Baryshkov : > On Sun, Nov 02, 2008 at 05:09:04PM +0100, andrzej zaborowski wrote: >> 2008/11/2 Dmitry Baryshkov : >> > +static void tosa_tg_init(struct pxa2xx_state_s *cpu) >> > +{ >> > + struct i2c_bus *bus = pxa2xx_i2c_bus(cpu->i2c[0]); >> > + struct i2c_slave *dac = i2c_slave_init(bus, 0, sizeof(struct tosa_dac_i2c)); >> > + dac->send = tosa_dac_send; >> > + dac->event = tosa_dac_event; >> >> You should set also .recv to not leave the kernel a possibility to >> crash qemu. Other than this, looks okay, but does this code help >> emulation in anyway? I suppose the kernel wants to see some i2c >> device present? > > The kernel expects to have the DAC in place. Otherwise I see barfs from > it. So adding such simple i2c client is just a matter of preference. > Anyway, please check this patch with .recv callback set: Right, it expects a DAC. What I mean is that this implementation can equally well be a i2c framebuffer or a flux capacitor ;) But I assume you've tested that this already made the kernel happy. Regards