From patchwork Thu Nov 1 15:32:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pantelis Antoniou X-Patchwork-Id: 1680781 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 8C9D1DFB80 for ; Wed, 31 Oct 2012 17:42:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933908Ab2JaRji (ORCPT ); Wed, 31 Oct 2012 13:39:38 -0400 Received: from li42-95.members.linode.com ([209.123.162.95]:34564 "EHLO li42-95.members.linode.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965559Ab2JaRje (ORCPT ); Wed, 31 Oct 2012 13:39:34 -0400 Received: from sles11esa.localdomain (unknown [195.97.110.117]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: panto) by li42-95.members.linode.com (Postfix) with ESMTPSA id B2A859C1D4; Wed, 31 Oct 2012 17:39:31 +0000 (UTC) From: Pantelis Antoniou To: Tony Lindgren Cc: Pantelis Antoniou , Paul Walmsley , "Hiremath, Vaibhav" , devicetree-discuss@lists.ozlabs.org, linux-kernel@vger.kernel.org, Koen Kooi , Matt Porter , Russ Dill , linux-omap@vger.kernel.org Subject: [RFC-v2 2/7] capebus: Add beaglebone board support Date: Thu, 1 Nov 2012 17:32:27 +0200 Message-Id: <1351783952-11804-3-git-send-email-panto@antoniou-consulting.com> X-Mailer: git-send-email 1.7.12 In-Reply-To: <1351783952-11804-1-git-send-email-panto@antoniou-consulting.com> References: <1351783952-11804-1-git-send-email-panto@antoniou-consulting.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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 | 328 +++++++++ drivers/capebus/boards/capebus-bone.c | 931 ++++++++++++++++++++++++++ include/linux/capebus/capebus-bone.h | 120 ++++ 6 files changed, 1625 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