Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965602Ab2J3S7T (ORCPT ); Tue, 30 Oct 2012 14:59:19 -0400 Received: from li42-95.members.linode.com ([209.123.162.95]:40535 "EHLO li42-95.members.linode.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965233Ab2J3S7O (ORCPT ); Tue, 30 Oct 2012 14:59:14 -0400 From: Pantelis Antoniou To: Tony Lindgren Cc: Pantelis Antoniou , linux-arm-kernel@lists.infradead.org, devicetree-discuss@lists.ozlabs.org, linux-kernel@vger.kernel.org, Koen Kooi , Matt Porter , Russ Dill , linux-omap@vger.kernel.org Subject: [RFC 2/7] capebus: Add beaglebone board support Date: Wed, 31 Oct 2012 18:52:08 +0200 Message-Id: <1351702333-8456-3-git-send-email-panto@antoniou-consulting.com> X-Mailer: git-send-email 1.7.12 In-Reply-To: <1351702333-8456-1-git-send-email-panto@antoniou-consulting.com> References: <1351702333-8456-1-git-send-email-panto@antoniou-consulting.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 52616 Lines: 1971 Introduce beaglebone capebus board support. This patch creates the beaglebone's board cape bus controller. The board controller is responsible for the probing of capes at the well defined I2C address for capes, parsing the EEPROM info and matching them to specific cape drivers. On top of that, adapter DT enabled devices are created for am33xx devices that have no DT bindings yet, as well as generic devices that can be used as building blocks for the cape drivers. Signed-off-by: Pantelis Antoniou --- drivers/capebus/boards/Kconfig | 6 + drivers/capebus/boards/Makefile | 3 + drivers/capebus/boards/capebus-bone-generic.c | 237 +++++++ drivers/capebus/boards/capebus-bone-pdevs.c | 602 +++++++++++++++++ drivers/capebus/boards/capebus-bone.c | 931 ++++++++++++++++++++++++++ include/linux/capebus/capebus-bone.h | 120 ++++ 6 files changed, 1899 insertions(+) create mode 100644 drivers/capebus/boards/Kconfig create mode 100644 drivers/capebus/boards/Makefile create mode 100644 drivers/capebus/boards/capebus-bone-generic.c create mode 100644 drivers/capebus/boards/capebus-bone-pdevs.c create mode 100644 drivers/capebus/boards/capebus-bone.c create mode 100644 include/linux/capebus/capebus-bone.h diff --git a/drivers/capebus/boards/Kconfig b/drivers/capebus/boards/Kconfig new file mode 100644 index 0000000..76b0f94 --- /dev/null +++ b/drivers/capebus/boards/Kconfig @@ -0,0 +1,6 @@ +config CAPEBUS_BONE_CONTROLLER + bool "Beaglebone capebus board controller" + depends on CAPEBUS && ARCH_OMAP2PLUS && OF && I2C + default n + help + "Select this to enable the beaglebone capebus board controller" diff --git a/drivers/capebus/boards/Makefile b/drivers/capebus/boards/Makefile new file mode 100644 index 0000000..9048231 --- /dev/null +++ b/drivers/capebus/boards/Makefile @@ -0,0 +1,3 @@ +obj-$(CONFIG_CAPEBUS_BONE_CONTROLLER) += capebus-bone.o \ + capebus-bone-pdevs.o \ + capebus-bone-generic.o \ diff --git a/drivers/capebus/boards/capebus-bone-generic.c b/drivers/capebus/boards/capebus-bone-generic.c new file mode 100644 index 0000000..b1b79eb --- /dev/null +++ b/drivers/capebus/boards/capebus-bone-generic.c @@ -0,0 +1,237 @@ +/* + * TI Beaglebone capebus controller - Generic devices + * + * Copyright (C) 2012 Pantelis Antoniou + * Copyright (C) 2012 Texas Instruments Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include