Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753435AbbBSSlb (ORCPT ); Thu, 19 Feb 2015 13:41:31 -0500 Received: from pmta2.delivery1.ore.mailhop.org ([54.149.155.156]:39040 "EHLO pmta2.delivery1.ore.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752107AbbBSSl3 (ORCPT ); Thu, 19 Feb 2015 13:41:29 -0500 X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 104.193.169.186 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX18dmALHOpGC75VIxOL2cFPF Date: Thu, 19 Feb 2015 10:16:57 -0800 From: Tony Lindgren To: Pantelis Antoniou Cc: Grant Likely , Matt Porter , Koen Kooi , Guenter Roeck , Ludovic Desroches , Rob Herring , Nicolas Ferre , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Pantelis Antoniou Subject: Re: [PATCH 3/4] arm: am33xx: DT quirks for am33xx based beaglebone variants Message-ID: <20150219181656.GF32521@atomide.com> References: <1424271576-1952-1-git-send-email-pantelis.antoniou@konsulko.com> <1424271576-1952-4-git-send-email-pantelis.antoniou@konsulko.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1424271576-1952-4-git-send-email-pantelis.antoniou@konsulko.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1847 Lines: 45 * Pantelis Antoniou [150218 07:03]: > Implement DT quirks for the am33xx beaglebone boards. > --- /dev/null > +++ b/arch/arm/mach-omap2/am33xx-dt-quirks.c ... > + > +/* > + * The board IDs for am33xx board are in an I2C EEPROM > + * We are very early in the boot process so we have to > + * read the EEPROM directly without using the I2C layer. > + * > + * Note that we rely on the bootloader setting up the muxes > + * (which is the case for u-boot). > + */ > + > +/* I2C Status Register (OMAP_I2C_STAT): */ > +#define OMAP_I2C_STAT_XDR (1 << 14) /* TX Buffer draining */ > +#define OMAP_I2C_STAT_RDR (1 << 13) /* RX Buffer draining */ > +#define OMAP_I2C_STAT_BB (1 << 12) /* Bus busy */ > +#define OMAP_I2C_STAT_ROVR (1 << 11) /* Receive overrun */ > +#define OMAP_I2C_STAT_XUDF (1 << 10) /* Transmit underflow */ > +#define OMAP_I2C_STAT_AAS (1 << 9) /* Address as slave */ > +#define OMAP_I2C_STAT_BF (1 << 8) /* Bus Free */ > +#define OMAP_I2C_STAT_XRDY (1 << 4) /* Transmit data ready */ > +#define OMAP_I2C_STAT_RRDY (1 << 3) /* Receive data ready */ > +#define OMAP_I2C_STAT_ARDY (1 << 2) /* Register access ready */ > +#define OMAP_I2C_STAT_NACK (1 << 1) /* No ack interrupt enable */ > +#define OMAP_I2C_STAT_AL (1 << 0) /* Arbitration lost int ena */ ... Uhh I don't like the idea of duplicating the i2c-omap.c driver under arch/arm.. And in general we should initialize things later rather than earlier. What's stopping doing these quirk checks later on time with just a regular device driver, something like drivers/misc/bbone-quirks.c? Regards, Tony -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/