All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Add a MTD driver for OpenPower PNOR flash
@ 2015-04-01  6:05 Jeremy Kerr
  2015-04-01  6:05 ` [PATCH 1/2] powerpc/powernv: Add interfaces for flash device access Jeremy Kerr
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jeremy Kerr @ 2015-04-01  6:05 UTC (permalink / raw)
  To: linux-mtd, linuxppc-dev; +Cc: Cyril Bur, Joel Stanley

Hi all,

This series implements a simple mtd device to allow access to the PNOR
flash on OpenPower machines. The flash is accessed through firmware
calls.

Patch 1/2 adds the Linux interface to these calls. Patch 2/2 adds a mtd
driver that uses these calls.

Because there's two subsystems involved here, there are a couple of
methods to merge this:

 1) The powerpc folks take 1/2, and the mtd folks take 2/2, to be
    applied once 1/2 is available (Michael has created a topic branch for
    this in the past, which can make things a little easier), or

 2) One of the maintainers takes both patches, once the other has acked
    their patch. I'd suggest that it goes through the powerpc tree in
    this case, as that will be less likely to conflict.

Either way, I'm happy.

Cheers,

	
Jeremy

---
Cyril Bur (2):
      powerpc/powernv: Add interfaces for flash device access
      drivers/mtd: add powernv flash MTD abstraction driver

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] powerpc/powernv: Add interfaces for flash device access
  2015-04-01  6:05 [PATCH 0/2] Add a MTD driver for OpenPower PNOR flash Jeremy Kerr
@ 2015-04-01  6:05 ` Jeremy Kerr
  2015-04-02  2:16   ` Stewart Smith
  2015-04-01  6:05 ` [PATCH 2/2] drivers/mtd: add powernv flash MTD abstraction driver Jeremy Kerr
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Jeremy Kerr @ 2015-04-01  6:05 UTC (permalink / raw)
  To: linux-mtd, linuxppc-dev; +Cc: Cyril Bur, Joel Stanley

From: Cyril Bur <cyrilbur@gmail.com>

This change adds the OPAL interface definitions to allow Linux to read,
write and erase from system flash devices. We register platform devices
for the flash devices exported by firmware.

We clash with the existing opal_flash_init function, which is really for
the FSP flash update functionality, so we rename that initcall to
opal_flash_update_init().

A future change will add an mtd driver that uses this interface.

Changes from Joel Stanley and Jeremy Kerr.

Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Joel Stanley <joel@jms.id.au>

---
 arch/powerpc/include/asm/opal-api.h            |    5 ++++-
 arch/powerpc/include/asm/opal.h                |    9 ++++++++-
 arch/powerpc/platforms/powernv/opal-flash.c    |    2 +-
 arch/powerpc/platforms/powernv/opal-wrappers.S |    3 +++
 arch/powerpc/platforms/powernv/opal.c          |   16 +++++++++++++++-
 5 files changed, 31 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/include/asm/opal-api.h b/arch/powerpc/include/asm/opal-api.h
index e8a6baf..0321a90 100644
--- a/arch/powerpc/include/asm/opal-api.h
+++ b/arch/powerpc/include/asm/opal-api.h
@@ -150,7 +150,10 @@
 #define OPAL_IPMI_SEND				107
 #define OPAL_IPMI_RECV				108
 #define OPAL_I2C_REQUEST			109
-#define OPAL_LAST				109
+#define OPAL_FLASH_READ				110
+#define OPAL_FLASH_WRITE			111
+#define OPAL_FLASH_ERASE			112
+#define OPAL_LAST				112
 
 /* Device tree flags */
 
diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h
index c08de77..7c6d7ea 100644
--- a/arch/powerpc/include/asm/opal.h
+++ b/arch/powerpc/include/asm/opal.h
@@ -194,6 +194,13 @@ int64_t opal_ipmi_recv(uint64_t interface, struct opal_ipmi_msg *msg,
 int64_t opal_i2c_request(uint64_t async_token, uint32_t bus_id,
 			 struct opal_i2c_request *oreq);
 
+int64_t opal_flash_read(uint64_t id, uint64_t offset, uint64_t buf,
+		uint64_t size, uint64_t token);
+int64_t opal_flash_write(uint64_t id, uint64_t offset, uint64_t buf,
+		uint64_t size, uint64_t token);
+int64_t opal_flash_erase(uint64_t id, uint64_t offset, uint64_t size,
+		uint64_t token);
+
 /* Internal functions */
 extern int early_init_dt_scan_opal(unsigned long node, const char *uname,
 				   int depth, void *data);
@@ -226,7 +233,7 @@ extern int opal_get_sensor_data(u32 sensor_hndl, u32 *sensor_data);
 struct rtc_time;
 extern unsigned long opal_get_boot_time(void);
 extern void opal_nvram_init(void);
-extern void opal_flash_init(void);
+extern void opal_flash_update_init(void);
 extern void opal_flash_term_callback(void);
 extern int opal_elog_init(void);
 extern void opal_platform_dump_init(void);
diff --git a/arch/powerpc/platforms/powernv/opal-flash.c b/arch/powerpc/platforms/powernv/opal-flash.c
index 0ff07ff..4ec6219 100644
--- a/arch/powerpc/platforms/powernv/opal-flash.c
+++ b/arch/powerpc/platforms/powernv/opal-flash.c
@@ -546,7 +546,7 @@ static struct attribute_group image_op_attr_group = {
 	.attrs = image_op_attrs,
 };
 
-void __init opal_flash_init(void)
+void __init opal_flash_update_init(void)
 {
 	int ret;
 
diff --git a/arch/powerpc/platforms/powernv/opal-wrappers.S b/arch/powerpc/platforms/powernv/opal-wrappers.S
index b23fe7c..4e74037 100644
--- a/arch/powerpc/platforms/powernv/opal-wrappers.S
+++ b/arch/powerpc/platforms/powernv/opal-wrappers.S
@@ -292,3 +292,6 @@ OPAL_CALL(opal_tpo_read,			OPAL_READ_TPO);
 OPAL_CALL(opal_ipmi_send,			OPAL_IPMI_SEND);
 OPAL_CALL(opal_ipmi_recv,			OPAL_IPMI_RECV);
 OPAL_CALL(opal_i2c_request,			OPAL_I2C_REQUEST);
+OPAL_CALL(opal_flash_read,			OPAL_FLASH_READ);
+OPAL_CALL(opal_flash_write,			OPAL_FLASH_WRITE);
+OPAL_CALL(opal_flash_erase,			OPAL_FLASH_ERASE);
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index d403b2b..e95342b 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -693,6 +693,15 @@ static void __init opal_dump_region_init(void)
 			"rc = %d\n", rc);
 }
 
+static void opal_flash_init(struct device_node *opal_node)
+{
+	struct device_node *np;
+
+	for_each_child_of_node(opal_node, np)
+		if (of_device_is_compatible(np, "ibm,opal-flash"))
+			of_platform_device_create(np, NULL, NULL);
+}
+
 static void opal_ipmi_init(struct device_node *opal_node)
 {
 	struct device_node *np;
@@ -817,7 +826,7 @@ static int __init opal_init(void)
 		/* Setup error log interface */
 		rc = opal_elog_init();
 		/* Setup code update interface */
-		opal_flash_init();
+		opal_flash_update_init();
 		/* Setup platform dump extract interface */
 		opal_platform_dump_init();
 		/* Setup system parameters interface */
@@ -829,6 +838,8 @@ static int __init opal_init(void)
 	/* Initialize OPAL IPMI backend */
 	opal_ipmi_init(opal_node);
 
+	opal_flash_init(opal_node);
+
 	return 0;
 }
 machine_subsys_initcall(powernv, opal_init);
@@ -867,6 +878,9 @@ void opal_shutdown(void)
 EXPORT_SYMBOL_GPL(opal_invalid_call);
 EXPORT_SYMBOL_GPL(opal_ipmi_send);
 EXPORT_SYMBOL_GPL(opal_ipmi_recv);
+EXPORT_SYMBOL_GPL(opal_flash_read);
+EXPORT_SYMBOL_GPL(opal_flash_write);
+EXPORT_SYMBOL_GPL(opal_flash_erase);
 
 /* Convert a region of vmalloc memory to an opal sg list */
 struct opal_sg_list *opal_vmalloc_to_sg_list(void *vmalloc_addr,

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] drivers/mtd: add powernv flash MTD abstraction driver
  2015-04-01  6:05 [PATCH 0/2] Add a MTD driver for OpenPower PNOR flash Jeremy Kerr
  2015-04-01  6:05 ` [PATCH 1/2] powerpc/powernv: Add interfaces for flash device access Jeremy Kerr
@ 2015-04-01  6:05 ` Jeremy Kerr
  2015-04-03  8:50 ` [PATCH 0/2] Add a MTD driver for OpenPower PNOR flash Michael Ellerman
  2015-04-13  4:22 ` Cyril Bur
  3 siblings, 0 replies; 7+ messages in thread
From: Jeremy Kerr @ 2015-04-01  6:05 UTC (permalink / raw)
  To: linux-mtd, linuxppc-dev; +Cc: Cyril Bur, Joel Stanley

From: Cyril Bur <cyrilbur@gmail.com>

Powerpc powernv platforms allow access to certain system flash devices
through a firmwarwe interface. This change adds an mtd driver for these
flash devices.

Minor updates from Jeremy Kerr and Joel Stanley.

Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>

---
 drivers/mtd/devices/Kconfig         |    6 
 drivers/mtd/devices/Makefile        |    1 
 drivers/mtd/devices/powernv_flash.c |  288 ++++++++++++++++++++++++++++
 3 files changed, 295 insertions(+)

diff --git a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig
index c49d0b1..5065e7c 100644
--- a/drivers/mtd/devices/Kconfig
+++ b/drivers/mtd/devices/Kconfig
@@ -195,6 +195,12 @@ config MTD_BLOCK2MTD
 	  Testing MTD users (eg JFFS2) on large media and media that might
 	  be removed during a write (using the floppy drive).
 
+config MTD_POWERNV_FLASH
+	tristate "powernv flash MTD driver"
+	depends on PPC_POWERNV
+	help
+	  This provides an MTD device for flash on powernv OPAL platforms
+
 comment "Disk-On-Chip Device Drivers"
 
 config MTD_DOCG3
diff --git a/drivers/mtd/devices/Makefile b/drivers/mtd/devices/Makefile
index f0b0e61..7912d3a 100644
--- a/drivers/mtd/devices/Makefile
+++ b/drivers/mtd/devices/Makefile
@@ -16,6 +16,7 @@ obj-$(CONFIG_MTD_SPEAR_SMI)	+= spear_smi.o
 obj-$(CONFIG_MTD_SST25L)	+= sst25l.o
 obj-$(CONFIG_MTD_BCM47XXSFLASH)	+= bcm47xxsflash.o
 obj-$(CONFIG_MTD_ST_SPI_FSM)    += st_spi_fsm.o
+obj-$(CONFIG_MTD_POWERNV_FLASH)	+= powernv_flash.o
 
 
 CFLAGS_docg3.o			+= -I$(src)
diff --git a/drivers/mtd/devices/powernv_flash.c b/drivers/mtd/devices/powernv_flash.c
new file mode 100644
index 0000000..18f8a19
--- /dev/null
+++ b/drivers/mtd/devices/powernv_flash.c
@@ -0,0 +1,288 @@
+/*
+ * OPAL PNOR flash MTD abstraction
+ *
+ * IBM 2015
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/errno.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
+#include <linux/platform_device.h>
+#include <linux/string.h>
+#include <linux/slab.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+
+#include <linux/debugfs.h>
+#include <linux/seq_file.h>
+
+#include <asm/opal.h>
+
+
+/*
+ * This driver creates the a Linux MTD abstraction for platform PNOR flash
+ * backed by OPAL calls
+ */
+
+struct powernv_flash {
+	struct mtd_info	mtd;
+	uint64_t	id;
+};
+
+enum flash_op {
+	FLASH_OP_READ,
+	FLASH_OP_WRITE,
+	FLASH_OP_ERASE,
+};
+
+static int powernv_flash_async_op(struct mtd_info *mtd, enum flash_op op,
+		loff_t offset, size_t len, size_t *retlen, u_char *buf)
+{
+	struct powernv_flash *info = (struct powernv_flash *)mtd->priv;
+	struct device *dev = &mtd->dev;
+	int token;
+	struct opal_msg msg;
+	int rc;
+
+	dev_dbg(dev, "%s(op=%d, offset=0x%llx, len=%zu)\n",
+			__func__, op, offset, len);
+
+	token = opal_async_get_token_interruptible();
+	if (token < 0) {
+		dev_err(dev, "Failed to get an async token\n");
+		return -ENOMEM;
+	}
+
+	switch (op) {
+	case FLASH_OP_READ:
+		rc = opal_flash_read(info->id, offset, __pa(buf), len, token);
+		break;
+	case FLASH_OP_WRITE:
+		rc = opal_flash_write(info->id, offset, __pa(buf), len, token);
+		break;
+	case FLASH_OP_ERASE:
+		rc = opal_flash_erase(info->id, offset, len, token);
+		break;
+	default:
+		BUG_ON(1);
+	}
+
+	if (rc != OPAL_ASYNC_COMPLETION) {
+		dev_err(dev, "opal_flash_async_op(op=%d) failed (rc %d)\n",
+				op, rc);
+		return -EIO;
+	}
+
+	rc = opal_async_wait_response(token, &msg);
+	opal_async_release_token(token);
+	if (rc) {
+		dev_err(dev, "opal async wait failed (rc %d)\n", rc);
+		return -EIO;
+	}
+
+	rc = be64_to_cpu(msg.params[1]);
+	if (rc == OPAL_SUCCESS) {
+		rc = 0;
+		if (retlen)
+			*retlen = len;
+	} else {
+		rc = -EIO;
+	}
+
+	return 0;
+}
+
+/**
+ * @mtd: the device
+ * @from: the offset to read from
+ * @len: the number of bytes to read
+ * @retlen: the number of bytes actually read
+ * @buf: the filled in buffer
+ *
+ * Returns 0 if read successful, or -ERRNO if an error occurred
+ */
+static int powernv_flash_read(struct mtd_info *mtd, loff_t from, size_t len,
+	     size_t *retlen, u_char *buf)
+{
+	return powernv_flash_async_op(mtd, FLASH_OP_READ, from,
+			len, retlen, buf);
+}
+
+/**
+ * @mtd: the device
+ * @to: the offset to write to
+ * @len: the number of bytes to write
+ * @retlen: the number of bytes actually written
+ * @buf: the buffer to get bytes from
+ *
+ * Returns 0 if write successful, -ERRNO if error occured
+ */
+static int powernv_flash_write(struct mtd_info *mtd, loff_t to, size_t len,
+		     size_t *retlen, const u_char *buf)
+{
+	return powernv_flash_async_op(mtd, FLASH_OP_WRITE, to,
+			len, retlen, (u_char *)buf);
+}
+
+/**
+ * @mtd: the device
+ * @erase: the erase info
+ * Returns 0 if erase successful or -ERRNO if an error occured
+ */
+static int powernv_flash_erase(struct mtd_info *mtd, struct erase_info *erase)
+{
+	int rc;
+
+	erase->state = MTD_ERASING;
+
+	/* todo: register our own notifier to do a true async implementation */
+	rc =  powernv_flash_async_op(mtd, FLASH_OP_ERASE, erase->addr,
+			erase->len, NULL, NULL);
+
+	if (rc) {
+		erase->fail_addr = erase->addr;
+		erase->state = MTD_ERASE_FAILED;
+	} else {
+		erase->state = MTD_ERASE_DONE;
+	}
+	mtd_erase_callback(erase);
+	return 0;
+}
+
+/**
+ * powernv_flash_set_driver_info - Fill the mtd_info structure and docg3
+ * structure @pdev: The platform device
+ * @mtd: The structure to fill
+ */
+static int __init powernv_flash_set_driver_info(struct device *dev,
+		struct mtd_info *mtd)
+{
+	const __be32 *reg, *erase_size;
+	int count;
+
+	erase_size = of_get_property(dev->of_node,
+			"ibm,flash-block-size", NULL);
+	if (!erase_size) {
+		dev_err(dev, "no device property 'ibm,flash-block-size'\n");
+		return 1;
+	}
+
+	reg = of_get_property(dev->of_node, "reg", &count);
+	if (count / sizeof(__be32) != 2) {
+		dev_err(dev, "couldn't get resource information count=%d\n",
+				count);
+		return 1;
+	}
+
+	/* Going to have to check what details I need to set and how to
+	 * get them */
+	mtd->name = of_get_property(dev->of_node, "name", NULL);
+	mtd->type = MTD_NANDFLASH;
+	mtd->flags = MTD_CAP_NANDFLASH;
+	mtd->size = of_read_number(reg, 2);
+	mtd->erasesize = of_read_number(erase_size, 1);
+	mtd->writebufsize = mtd->writesize = 1;
+	mtd->owner = THIS_MODULE;
+	mtd->_erase = powernv_flash_erase;
+	mtd->_read = powernv_flash_read;
+	mtd->_write = powernv_flash_write;
+	mtd->dev.parent = dev;
+	return 0;
+}
+
+/**
+ * powernv_flash_probe
+ * @pdev: platform device
+ *
+ * Returns 0 on success, -ENOMEM, -ENXIO on error
+ */
+static int __init powernv_flash_probe(struct platform_device *pdev)
+{
+	struct device *dev = &pdev->dev;
+	struct powernv_flash *data;
+	const __be32 *prop;
+	int ret;
+
+	ret = -ENOMEM;
+	data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
+	if (!data) {
+		dev_err(dev, "couldn't allocate memory\n");
+		goto out;
+	}
+	data->mtd.priv = data;
+
+	ret = -EIO;
+	prop = of_get_property(dev->of_node, "ibm,opal-id", NULL);
+	if (!prop) {
+		dev_err(dev, "no device property 'ibm,opal-id\n");
+		goto out;
+	}
+	data->id = of_read_number(prop, 1);
+
+	if (powernv_flash_set_driver_info(dev, &data->mtd))
+		goto out;
+
+	/*
+	 * Skiboot does expose the partitioning information via OF and the
+	 * ofpart parser could partition it all nicely.
+	 *
+	 * The current flash that skiboot exposes is one contiguous flash chip
+	 * with an ffs partition at the start, it should prove easier for users
+	 * to deal with partitions or not as they see fit
+	 */
+	ret = mtd_device_parse_register(&data->mtd, NULL , NULL, NULL, 0);
+
+out:
+	return ret;
+}
+
+/**
+ * op_release - Release the driver
+ * @pdev: the platform device
+ *
+ * Returns 0
+ */
+static int __exit powernv_flash_release(struct platform_device *pdev)
+{
+	/* All resources should be freed automatically */
+	return 0;
+}
+
+static struct of_device_id powernv_flash_match[] = {
+	{ .compatible = "ibm,opal-flash" },
+	{}
+};
+
+static struct platform_driver powernv_flash_driver = {
+	.driver		= {
+		.name		= "powernv_flash",
+		.owner		= THIS_MODULE,
+		.of_match_table	= powernv_flash_match,
+	},
+	.remove		= powernv_flash_release,
+	.probe		= powernv_flash_probe,
+};
+
+module_platform_driver(powernv_flash_driver);
+
+MODULE_DEVICE_TABLE(of, powernv_flash_match);
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Cyril Bur <cyril.bur@au1.ibm.com>");
+MODULE_DESCRIPTION("MTD abstraction for OPAL flash");

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] powerpc/powernv: Add interfaces for flash device access
  2015-04-01  6:05 ` [PATCH 1/2] powerpc/powernv: Add interfaces for flash device access Jeremy Kerr
@ 2015-04-02  2:16   ` Stewart Smith
  0 siblings, 0 replies; 7+ messages in thread
From: Stewart Smith @ 2015-04-02  2:16 UTC (permalink / raw)
  To: Jeremy Kerr, linux-mtd, linuxppc-dev; +Cc: Cyril Bur, Joel Stanley

Jeremy Kerr <jk@ozlabs.org> writes:

> From: Cyril Bur <cyrilbur@gmail.com>
>
> This change adds the OPAL interface definitions to allow Linux to read,
> write and erase from system flash devices. We register platform devices
> for the flash devices exported by firmware.
>
> We clash with the existing opal_flash_init function, which is really for
> the FSP flash update functionality, so we rename that initcall to
> opal_flash_update_init().
>
> A future change will add an mtd driver that uses this interface.
>
> Changes from Joel Stanley and Jeremy Kerr.
>
> Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
> Signed-off-by: Joel Stanley <joel@jms.id.au>

Acking that firmware calls are merged into skiboot.

Acked-by: Stewart Smith <stewart@linux.vnet.ibm.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/2] Add a MTD driver for OpenPower PNOR flash
  2015-04-01  6:05 [PATCH 0/2] Add a MTD driver for OpenPower PNOR flash Jeremy Kerr
  2015-04-01  6:05 ` [PATCH 1/2] powerpc/powernv: Add interfaces for flash device access Jeremy Kerr
  2015-04-01  6:05 ` [PATCH 2/2] drivers/mtd: add powernv flash MTD abstraction driver Jeremy Kerr
@ 2015-04-03  8:50 ` Michael Ellerman
  2015-04-07  2:55   ` Jeremy Kerr
  2015-04-13  4:22 ` Cyril Bur
  3 siblings, 1 reply; 7+ messages in thread
From: Michael Ellerman @ 2015-04-03  8:50 UTC (permalink / raw)
  To: Jeremy Kerr; +Cc: linuxppc-dev, linux-mtd, Cyril Bur, Joel Stanley

On Wed, 2015-04-01 at 14:05 +0800, Jeremy Kerr wrote:
> Hi all,
> 
> This series implements a simple mtd device to allow access to the PNOR
> flash on OpenPower machines. The flash is accessed through firmware
> calls.
> 
> Patch 1/2 adds the Linux interface to these calls. Patch 2/2 adds a mtd
> driver that uses these calls.
> 
> Because there's two subsystems involved here, there are a couple of
> methods to merge this:
> 
>  1) The powerpc folks take 1/2, and the mtd folks take 2/2, to be
>     applied once 1/2 is available (Michael has created a topic branch for
>     this in the past, which can make things a little easier), or

Unfortunately the topic branch approach is problematic for this series, because
we already have changes to opal.h in powerpc-next that clash.

I can still make a topic branch, but it would have to include ~10 powerpc
commits prior to this patch.

>  2) One of the maintainers takes both patches, once the other has acked
>     their patch. I'd suggest that it goes through the powerpc tree in
>     this case, as that will be less likely to conflict.

If the mtd maintainers are happy with it this would be the easier approach in
this instance.

cheers

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/2] Add a MTD driver for OpenPower PNOR flash
  2015-04-03  8:50 ` [PATCH 0/2] Add a MTD driver for OpenPower PNOR flash Michael Ellerman
@ 2015-04-07  2:55   ` Jeremy Kerr
  0 siblings, 0 replies; 7+ messages in thread
From: Jeremy Kerr @ 2015-04-07  2:55 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linux-mtd, linuxppc-dev, Cyril Bur, Joel Stanley

Hi all,

> If the mtd maintainers are happy with it this would be the easier approach in
> this instance.

OK, sounds good to me.

MTD folks: any objections to this process? If not, is this patch good to
go in, or any changes we should make?

Cheers,


Jeremy

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/2] Add a MTD driver for OpenPower PNOR flash
  2015-04-01  6:05 [PATCH 0/2] Add a MTD driver for OpenPower PNOR flash Jeremy Kerr
                   ` (2 preceding siblings ...)
  2015-04-03  8:50 ` [PATCH 0/2] Add a MTD driver for OpenPower PNOR flash Michael Ellerman
@ 2015-04-13  4:22 ` Cyril Bur
  3 siblings, 0 replies; 7+ messages in thread
From: Cyril Bur @ 2015-04-13  4:22 UTC (permalink / raw)
  To: linux-mtd, David Woodhouse; +Cc: linuxppc-dev, Joel Stanley, Jeremy Kerr

On Wed, 2015-04-01 at 14:05 +0800, Jeremy Kerr wrote:
> Hi all,
> 
> This series implements a simple mtd device to allow access to the PNOR
> flash on OpenPower machines. The flash is accessed through firmware
> calls.
> 
> Patch 1/2 adds the Linux interface to these calls. Patch 2/2 adds a mtd
> driver that uses these calls.
> 
> Because there's two subsystems involved here, there are a couple of
> methods to merge this:
> 
>  1) The powerpc folks take 1/2, and the mtd folks take 2/2, to be
>     applied once 1/2 is available (Michael has created a topic branch for
>     this in the past, which can make things a little easier), or
> 
>  2) One of the maintainers takes both patches, once the other has acked
>     their patch. I'd suggest that it goes through the powerpc tree in
>     this case, as that will be less likely to conflict.
> 
Ping about this patchset. What do the MTD maintainers think?

Hi David,

Jeremy mentioned you might be interested in seeing these.


Thanks,

Cyril

> Either way, I'm happy.
> 
> Cheers,
> 
> 	
> Jeremy
> 
> ---
> Cyril Bur (2):
>       powerpc/powernv: Add interfaces for flash device access
>       drivers/mtd: add powernv flash MTD abstraction driver
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-04-13  4:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-01  6:05 [PATCH 0/2] Add a MTD driver for OpenPower PNOR flash Jeremy Kerr
2015-04-01  6:05 ` [PATCH 1/2] powerpc/powernv: Add interfaces for flash device access Jeremy Kerr
2015-04-02  2:16   ` Stewart Smith
2015-04-01  6:05 ` [PATCH 2/2] drivers/mtd: add powernv flash MTD abstraction driver Jeremy Kerr
2015-04-03  8:50 ` [PATCH 0/2] Add a MTD driver for OpenPower PNOR flash Michael Ellerman
2015-04-07  2:55   ` Jeremy Kerr
2015-04-13  4:22 ` Cyril Bur

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.