From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqPxK-0000vs-HH for qemu-devel@nongnu.org; Thu, 26 Jan 2012 09:05:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RqPxE-0005bd-M6 for qemu-devel@nongnu.org; Thu, 26 Jan 2012 09:05:38 -0500 Received: from mel.act-europe.fr ([194.98.77.210]:33782) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqPxE-0005bU-FM for qemu-devel@nongnu.org; Thu, 26 Jan 2012 09:05:32 -0500 Message-ID: <4F215DAB.2030407@adacore.com> Date: Thu, 26 Jan 2012 15:05:31 +0100 From: Fabien Chouteau MIME-Version: 1.0 References: <1327585538-26367-1-git-send-email-chouteau@adacore.com> <4F215B3C.7080003@redhat.com> In-Reply-To: <4F215B3C.7080003@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] GRLIB UART: Add RX channel List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: blauwirbel@gmail.com, qemu-devel@nongnu.org, atar4qemu@gmail.com On 26/01/2012 14:55, Avi Kivity wrote: > On 01/26/2012 03:45 PM, Fabien Chouteau wrote: >> @@ -141,18 +219,19 @@ grlib_apbuart_write(void *opaque, target_phys_addr_t addr, >> static bool grlib_apbuart_accepts(void *opaque, target_phys_addr_t addr, >> unsigned size, bool is_write) >> { >> - return is_write && size == 4; >> + return size <= 4; >> } > > Please drop this function. > >> >> static const MemoryRegionOps grlib_apbuart_ops = { >> .write = grlib_apbuart_write, >> + .read = grlib_apbuart_read, >> .valid.accepts = grlib_apbuart_accepts, > > The default is to accept sizes 1-4, so you can just drop .valid.accepts > and need not replace it with anything. OK, thanks. -- Fabien Chouteau