Return-Path: Received: from mail-oi0-x243.google.com (mail-oi0-x243.google.com [IPv6:2607:f8b0:4003:c06::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3srtsy2KNczDrWS for ; Sun, 9 Oct 2016 04:39:02 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=lZ0BRM8U; dkim-atps=neutral Received: by mail-oi0-x243.google.com with SMTP id h186so5451289oia.3 for ; Sat, 08 Oct 2016 10:39:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=K3fTJrdyzT7h+kStPLVUlg/ayQvOw8y3pGZvpxmcrrM=; b=lZ0BRM8U15F9aXRa/AAQ1Kll9NMcZRZI0FBBp3y34gB0XoXWTqS7HlJyFDy+Kq/ACd yz3x5F2p0Y1tJBiFg3jjHLb3tjP2W5+ixhhUmVdO4i2P2qH8jEn6uPDnuPpj3kORN9ER WxXQCfy4klSEpc77DwW9cvIRVRsjvb0t7Fq7gLVQcSPf/pxxMPVRakifKHhYYxvKg7Ws 4/V2P+u2ivoMCBRPW4SGn7ZkmOmi3ZxYHnjxMnNKD2i9BSWbj9oOOGXvxKSLFEa/2Zk7 Txf41dnkETZk32l+bKw8AvO3qiO1ScUagpgmP6RVjMrk3bQfQGRUDqS2Qi2cvuj+RBHG iLFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=K3fTJrdyzT7h+kStPLVUlg/ayQvOw8y3pGZvpxmcrrM=; b=P0dbLjymPoj6yDkGKDnyVK1T/GbI5eTu8nfE+JuliiR/VQGMIVgipRxt1lxmyu7fIP XwGDwF46mpi6qhKYk5HOcnSMVPrvyq0JwbSViSMN25pOkSNvcebUMkJG7pchJO5Pj20+ uua5A2FmVfYp8GUKFn4mSESVGOuc0cv9AV7MO2LJAAdE378V+JdQXucbtB5C0NR+3+Zs I2JWeYLr8TGRz5FoX1lA5iaFeEgSR1v796EcakubH0+Ri3Cg7ayCV3HnONHySSH5gy81 WU60ViK5sJmscHVdr32zxmuO8gasD/BbUYdIOaK8LXymHFHkRqv2Z1Tef5g0EcydxJ9F wZHg== X-Gm-Message-State: AA6/9RmJBCi9N97eyhNCHhik/GaARAKxL7ecb10oRWcXhQxaE4AAB323l71h/Z65pVTJjg== X-Received: by 10.157.7.200 with SMTP id 66mr14603501oto.85.1475948340309; Sat, 08 Oct 2016 10:39:00 -0700 (PDT) Received: from Christophers-MacBook-Pro.local.com (45-20-192-79.lightspeed.austtx.sbcglobal.net. [45.20.192.79]) by smtp.gmail.com with ESMTPSA id g17sm8025290otd.38.2016.10.08.10.38.59 (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 08 Oct 2016 10:38:59 -0700 (PDT) From: christopher.lee.bostic@gmail.com To: openbmc@lists.ozlabs.org Cc: joel@jms.id.au, zahrens@us.ibm.com, xxpetri@de.ibm.com, Jeremy Kerr Subject: [PATCH linux v2 01/17] fsi: Add empty fsi bus definitions Date: Sat, 8 Oct 2016 12:38:37 -0500 Message-Id: <1475948333-55960-2-git-send-email-christopher.lee.bostic@gmail.com> X-Mailer: git-send-email 2.7.4 (Apple Git-66) In-Reply-To: <1475948333-55960-1-git-send-email-christopher.lee.bostic@gmail.com> References: <1475948333-55960-1-git-send-email-christopher.lee.bostic@gmail.com> X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Oct 2016 17:39:02 -0000 X-List-Received-Date: Sat, 08 Oct 2016 17:39:02 -0000 X-List-Received-Date: Sat, 08 Oct 2016 17:39:02 -0000 From: Jeremy Kerr This change adds the initial (empty) fsi bus definition, and introduces drivers/fsi/. Signed-off-by: Jeremy Kerr --- drivers/Kconfig | 2 ++ drivers/Makefile | 1 + drivers/fsi/Kconfig | 12 ++++++++++++ drivers/fsi/Makefile | 2 ++ drivers/fsi/fsi-core.c | 38 ++++++++++++++++++++++++++++++++++++++ include/linux/fsi.h | 23 +++++++++++++++++++++++ 6 files changed, 78 insertions(+) create mode 100644 drivers/fsi/Kconfig create mode 100644 drivers/fsi/Makefile create mode 100644 drivers/fsi/fsi-core.c create mode 100644 include/linux/fsi.h diff --git a/drivers/Kconfig b/drivers/Kconfig index e1e2066..117ca14c 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -202,4 +202,6 @@ source "drivers/hwtracing/intel_th/Kconfig" source "drivers/fpga/Kconfig" +source "drivers/fsi/Kconfig" + endmenu diff --git a/drivers/Makefile b/drivers/Makefile index 0b6f3d6..7a1c96f 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -173,3 +173,4 @@ obj-$(CONFIG_STM) += hwtracing/stm/ obj-$(CONFIG_ANDROID) += android/ obj-$(CONFIG_NVMEM) += nvmem/ obj-$(CONFIG_FPGA) += fpga/ +obj-$(CONFIG_FSI) += fsi/ diff --git a/drivers/fsi/Kconfig b/drivers/fsi/Kconfig new file mode 100644 index 0000000..04c1a0e --- /dev/null +++ b/drivers/fsi/Kconfig @@ -0,0 +1,12 @@ +# +# FSI subsystem +# + +menu "FSI support" + +config FSI + tristate "FSI support" + ---help--- + FSI - the FRU Support Interface - is a simple bus for low-level + access to POWER-based hardware. +endmenu diff --git a/drivers/fsi/Makefile b/drivers/fsi/Makefile new file mode 100644 index 0000000..db0e5e7 --- /dev/null +++ b/drivers/fsi/Makefile @@ -0,0 +1,2 @@ + +obj-$(CONFIG_FSI) += fsi-core.o diff --git a/drivers/fsi/fsi-core.c b/drivers/fsi/fsi-core.c new file mode 100644 index 0000000..3e45306 --- /dev/null +++ b/drivers/fsi/fsi-core.c @@ -0,0 +1,38 @@ +/* + * FSI core driver + * + * Copyright (C) IBM Corporation 2016 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * 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. + */ + +#include +#include +#include + +/* FSI core & Linux bus type definitions */ + +struct bus_type fsi_bus_type = { + .name = "fsi", +}; +EXPORT_SYMBOL_GPL(fsi_bus_type); + +static int fsi_init(void) +{ + return bus_register(&fsi_bus_type); +} + +static void fsi_exit(void) +{ + bus_unregister(&fsi_bus_type); +} + +module_init(fsi_init); +module_exit(fsi_exit); diff --git a/include/linux/fsi.h b/include/linux/fsi.h new file mode 100644 index 0000000..8e8bdea --- /dev/null +++ b/include/linux/fsi.h @@ -0,0 +1,23 @@ +/* + * FSI device & driver interfaces + * + * Copyright (C) IBM Corporation 2016 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * 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. + */ + +#ifndef LINUX_FSI_H +#define LINUX_FSI_H + +#include + +extern struct bus_type fsi_bus_type; + +#endif /* LINUX_FSI_H */ -- 1.8.2.2