From: Russell King - ARM Linux Subject: Re: [PATCH] ARM: PL011: add support for extended FIFO-size of PL011-r1p5 Date: Fri, 19 Apr 2013 13:58:58 +0100 Message-ID: <20130419125858.GL14496@n2100.arm.linux.org.uk> References: <007301ce375e$bcf6d6b0$36e48410$@lge.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from caramon.arm.linux.org.uk ([78.32.30.218]:34746 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030222Ab3DSM7w (ORCPT ); Fri, 19 Apr 2013 08:59:52 -0400 Content-Disposition: inline In-Reply-To: <007301ce375e$bcf6d6b0$36e48410$@lge.com> Sender: linux-serial-owner@vger.kernel.org List-Id: linux-serial@vger.kernel.org To: Jongsung Kim Cc: Greg Kroah-Hartman , jslaby@suse.cz, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org On Fri, Apr 12, 2013 at 06:18:47PM +0900, Jongsung Kim wrote: > +static unsigned int get_fifosize_arm(unsigned int periphid) > +{ > + unsigned int rev = (periphid >> 20) & 0xf; > + return rev < 3 ? 16 : 32; Don't we have a macro to get the revision given the amba device? amba_rev().