mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] mvebu: create bbu handler for kwb images and use it on cubox
@ 2018-06-08  8:42 Uwe Kleine-König
  2018-06-11  6:43 ` Sascha Hauer
  2018-06-11 20:38 ` Sascha Hauer
  0 siblings, 2 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2018-06-08  8:42 UTC (permalink / raw)
  To: barebox

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
Hello,

together with the fixup for write_file_flash to not use O_TRUNC and
O_CREAT, this was tested on top of next.

Best regards
Uwe

 arch/arm/boards/solidrun-cubox/board.c | 15 ++++++-
 arch/arm/mach-mvebu/Makefile           |  1 +
 arch/arm/mach-mvebu/include/mach/bbu.h |  3 ++
 arch/arm/mach-mvebu/kwb_bbu.c          | 54 ++++++++++++++++++++++++++
 4 files changed, 72 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/mach-mvebu/include/mach/bbu.h
 create mode 100644 arch/arm/mach-mvebu/kwb_bbu.c

diff --git a/arch/arm/boards/solidrun-cubox/board.c b/arch/arm/boards/solidrun-cubox/board.c
index a28f4197dfd4..aac93afb0c89 100644
--- a/arch/arm/boards/solidrun-cubox/board.c
+++ b/arch/arm/boards/solidrun-cubox/board.c
@@ -14,4 +14,17 @@
  *
  */
 
-/* empty */
+#include <common.h>
+#include <init.h>
+#include <mach/bbu.h>
+
+static int cubox_devices_init(void)
+{
+	if (!of_machine_is_compatible("solidrun,cubox"))
+		return 0;
+
+	mvebu_bbu_flash_register_handler("flash", "/dev/m25p0", 0, true);
+
+	return 0;
+}
+device_initcall(cubox_devices_init);
diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
index 87a85119193e..cc2b926438e4 100644
--- a/arch/arm/mach-mvebu/Makefile
+++ b/arch/arm/mach-mvebu/Makefile
@@ -1,4 +1,5 @@
 obj-pbl-y			+= common.o
+obj-y				+= kwb_bbu.o
 obj-$(CONFIG_ARCH_ARMADA_370)	+= armada-370-xp.o
 obj-$(CONFIG_ARCH_ARMADA_XP)	+= armada-370-xp.o
 obj-$(CONFIG_ARCH_ARMADA_38X)	+= armada-370-xp.o
diff --git a/arch/arm/mach-mvebu/include/mach/bbu.h b/arch/arm/mach-mvebu/include/mach/bbu.h
new file mode 100644
index 000000000000..f1021e52ce9f
--- /dev/null
+++ b/arch/arm/mach-mvebu/include/mach/bbu.h
@@ -0,0 +1,3 @@
+int mvebu_bbu_flash_register_handler(const char *name,
+				     char *devicefile, int version,
+				     bool isdefault);
diff --git a/arch/arm/mach-mvebu/kwb_bbu.c b/arch/arm/mach-mvebu/kwb_bbu.c
new file mode 100644
index 000000000000..f79464fe53e4
--- /dev/null
+++ b/arch/arm/mach-mvebu/kwb_bbu.c
@@ -0,0 +1,54 @@
+#include <bbu.h>
+#include <libfile.h>
+#include <printk.h>
+
+#include <mach/bbu.h>
+
+struct mvebu_bbu_handler {
+	struct bbu_handler bbuh;
+	int version;
+};
+
+static int mvebu_bbu_flash_update_handler(struct bbu_handler *bbuh,
+					  struct bbu_data *data)
+{
+	struct mvebu_bbu_handler *mbbuh =
+		container_of(bbuh, struct mvebu_bbu_handler, bbuh);
+	const void *image = data->image;
+	size_t size = data->len;
+	enum filetype ft = file_detect_type(image, size);
+
+	if ((mbbuh->version == 0 && ft == filetype_kwbimage_v0) ||
+	    (mbbuh->version == 1 && ft == filetype_kwbimage_v1) ||
+	    data->flags & BBU_FLAG_FORCE) {
+		int ret = bbu_confirm(data);
+		if (ret)
+			return ret;
+
+		return write_file_flash(bbuh->devicefile, image, size);
+	} else {
+		pr_err("%s is not a valid kwbimage\n", data->imagefile);
+		return -EINVAL;
+	}
+}
+
+int mvebu_bbu_flash_register_handler(const char *name,
+				     char *devicefile, int version,
+				     bool isdefault)
+{
+	struct mvebu_bbu_handler *mbbuh;
+	int ret;
+
+	mbbuh = xzalloc(sizeof(*mbbuh));
+	mbbuh->bbuh.devicefile = devicefile;
+	mbbuh->bbuh.handler = mvebu_bbu_flash_update_handler;
+	mbbuh->bbuh.flags = isdefault ? BBU_HANDLER_FLAG_DEFAULT : 0;
+	mbbuh->bbuh.name = name;
+	mbbuh->version = version;
+
+	ret = bbu_register_handler(&mbbuh->bbuh);
+	if (ret)
+		free(mbbuh);
+
+	return ret;
+}
-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH] mvebu: create bbu handler for kwb images and use it on cubox
  2018-06-08  8:42 [PATCH] mvebu: create bbu handler for kwb images and use it on cubox Uwe Kleine-König
@ 2018-06-11  6:43 ` Sascha Hauer
  2018-06-11  6:49   ` Uwe Kleine-König
  2018-06-11  6:58   ` Sascha Hauer
  2018-06-11 20:38 ` Sascha Hauer
  1 sibling, 2 replies; 7+ messages in thread
From: Sascha Hauer @ 2018-06-11  6:43 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: barebox

On Fri, Jun 08, 2018 at 10:42:44AM +0200, Uwe Kleine-König wrote:
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> Hello,
> 
> together with the fixup for write_file_flash to not use O_TRUNC and
> O_CREAT, this was tested on top of next.
> 
> Best regards
> Uwe
> 
>  arch/arm/boards/solidrun-cubox/board.c | 15 ++++++-
>  arch/arm/mach-mvebu/Makefile           |  1 +
>  arch/arm/mach-mvebu/include/mach/bbu.h |  3 ++
>  arch/arm/mach-mvebu/kwb_bbu.c          | 54 ++++++++++++++++++++++++++
>  4 files changed, 72 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/mach-mvebu/include/mach/bbu.h
>  create mode 100644 arch/arm/mach-mvebu/kwb_bbu.c
> 
> diff --git a/arch/arm/boards/solidrun-cubox/board.c b/arch/arm/boards/solidrun-cubox/board.c
> index a28f4197dfd4..aac93afb0c89 100644
> --- a/arch/arm/boards/solidrun-cubox/board.c
> +++ b/arch/arm/boards/solidrun-cubox/board.c
> @@ -14,4 +14,17 @@
>   *
>   */
>  
> -/* empty */
> +#include <common.h>
> +#include <init.h>
> +#include <mach/bbu.h>
> +
> +static int cubox_devices_init(void)
> +{
> +	if (!of_machine_is_compatible("solidrun,cubox"))
> +		return 0;
> +
> +	mvebu_bbu_flash_register_handler("flash", "/dev/m25p0", 0, true);
> +
> +	return 0;
> +}
> +device_initcall(cubox_devices_init);
> diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
> index 87a85119193e..cc2b926438e4 100644
> --- a/arch/arm/mach-mvebu/Makefile
> +++ b/arch/arm/mach-mvebu/Makefile
> @@ -1,4 +1,5 @@
>  obj-pbl-y			+= common.o
> +obj-y				+= kwb_bbu.o
>  obj-$(CONFIG_ARCH_ARMADA_370)	+= armada-370-xp.o
>  obj-$(CONFIG_ARCH_ARMADA_XP)	+= armada-370-xp.o
>  obj-$(CONFIG_ARCH_ARMADA_38X)	+= armada-370-xp.o
> diff --git a/arch/arm/mach-mvebu/include/mach/bbu.h b/arch/arm/mach-mvebu/include/mach/bbu.h
> new file mode 100644
> index 000000000000..f1021e52ce9f
> --- /dev/null
> +++ b/arch/arm/mach-mvebu/include/mach/bbu.h
> @@ -0,0 +1,3 @@
> +int mvebu_bbu_flash_register_handler(const char *name,
> +				     char *devicefile, int version,
> +				     bool isdefault);
> diff --git a/arch/arm/mach-mvebu/kwb_bbu.c b/arch/arm/mach-mvebu/kwb_bbu.c
> new file mode 100644
> index 000000000000..f79464fe53e4
> --- /dev/null
> +++ b/arch/arm/mach-mvebu/kwb_bbu.c
> @@ -0,0 +1,54 @@
> +#include <bbu.h>
> +#include <libfile.h>
> +#include <printk.h>
> +
> +#include <mach/bbu.h>
> +
> +struct mvebu_bbu_handler {
> +	struct bbu_handler bbuh;
> +	int version;
> +};
> +
> +static int mvebu_bbu_flash_update_handler(struct bbu_handler *bbuh,
> +					  struct bbu_data *data)
> +{
> +	struct mvebu_bbu_handler *mbbuh =
> +		container_of(bbuh, struct mvebu_bbu_handler, bbuh);
> +	const void *image = data->image;
> +	size_t size = data->len;
> +	enum filetype ft = file_detect_type(image, size);
> +
> +	if ((mbbuh->version == 0 && ft == filetype_kwbimage_v0) ||
> +	    (mbbuh->version == 1 && ft == filetype_kwbimage_v1) ||
> +	    data->flags & BBU_FLAG_FORCE) {
> +		int ret = bbu_confirm(data);
> +		if (ret)
> +			return ret;
> +
> +		return write_file_flash(bbuh->devicefile, image, size);
> +	} else {
> +		pr_err("%s is not a valid kwbimage\n", data->imagefile);
> +		return -EINVAL;
> +	}
> +}

Could this code be shared with other boards?

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH] mvebu: create bbu handler for kwb images and use it on cubox
  2018-06-11  6:43 ` Sascha Hauer
@ 2018-06-11  6:49   ` Uwe Kleine-König
  2018-06-11  6:58   ` Sascha Hauer
  1 sibling, 0 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2018-06-11  6:49 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Hallo Sascha,

On Mon, Jun 11, 2018 at 08:43:26AM +0200, Sascha Hauer wrote:
> On Fri, Jun 08, 2018 at 10:42:44AM +0200, Uwe Kleine-König wrote:
> > +static int mvebu_bbu_flash_update_handler(struct bbu_handler *bbuh,
> > +					  struct bbu_data *data)
> > +{
> > +	struct mvebu_bbu_handler *mbbuh =
> > +		container_of(bbuh, struct mvebu_bbu_handler, bbuh);
> > +	const void *image = data->image;
> > +	size_t size = data->len;
> > +	enum filetype ft = file_detect_type(image, size);
> > +
> > +	if ((mbbuh->version == 0 && ft == filetype_kwbimage_v0) ||
> > +	    (mbbuh->version == 1 && ft == filetype_kwbimage_v1) ||
> > +	    data->flags & BBU_FLAG_FORCE) {
> > +		int ret = bbu_confirm(data);
> > +		if (ret)
> > +			return ret;
> > +
> > +		return write_file_flash(bbuh->devicefile, image, size);
> > +	} else {
> > +		pr_err("%s is not a valid kwbimage\n", data->imagefile);
> > +		return -EINVAL;
> > +	}
> > +}
> 
> Could this code be shared with other boards?

Sure. It should work on all mvebu targets that boot from a flash memory.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH] mvebu: create bbu handler for kwb images and use it on cubox
  2018-06-11  6:43 ` Sascha Hauer
  2018-06-11  6:49   ` Uwe Kleine-König
@ 2018-06-11  6:58   ` Sascha Hauer
  1 sibling, 0 replies; 7+ messages in thread
From: Sascha Hauer @ 2018-06-11  6:58 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: barebox

On Mon, Jun 11, 2018 at 08:43:26AM +0200, Sascha Hauer wrote:
> On Fri, Jun 08, 2018 at 10:42:44AM +0200, Uwe Kleine-König wrote:
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > ---
> > Hello,
> > 
> > together with the fixup for write_file_flash to not use O_TRUNC and
> > O_CREAT, this was tested on top of next.
> > 
> > Best regards
> > Uwe
> > 
> >  arch/arm/boards/solidrun-cubox/board.c | 15 ++++++-
> >  arch/arm/mach-mvebu/Makefile           |  1 +
> >  arch/arm/mach-mvebu/include/mach/bbu.h |  3 ++
> >  arch/arm/mach-mvebu/kwb_bbu.c          | 54 ++++++++++++++++++++++++++
> >  4 files changed, 72 insertions(+), 1 deletion(-)
> >  create mode 100644 arch/arm/mach-mvebu/include/mach/bbu.h
> >  create mode 100644 arch/arm/mach-mvebu/kwb_bbu.c
> > 
> > diff --git a/arch/arm/boards/solidrun-cubox/board.c b/arch/arm/boards/solidrun-cubox/board.c
> > index a28f4197dfd4..aac93afb0c89 100644
> > --- a/arch/arm/boards/solidrun-cubox/board.c
> > +++ b/arch/arm/boards/solidrun-cubox/board.c
> > @@ -14,4 +14,17 @@
> >   *
> >   */
> >  
> > -/* empty */
> > +#include <common.h>
> > +#include <init.h>
> > +#include <mach/bbu.h>
> > +
> > +static int cubox_devices_init(void)
> > +{
> > +	if (!of_machine_is_compatible("solidrun,cubox"))
> > +		return 0;
> > +
> > +	mvebu_bbu_flash_register_handler("flash", "/dev/m25p0", 0, true);
> > +
> > +	return 0;
> > +}
> > +device_initcall(cubox_devices_init);
> > diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
> > index 87a85119193e..cc2b926438e4 100644
> > --- a/arch/arm/mach-mvebu/Makefile
> > +++ b/arch/arm/mach-mvebu/Makefile
> > @@ -1,4 +1,5 @@
> >  obj-pbl-y			+= common.o
> > +obj-y				+= kwb_bbu.o
> >  obj-$(CONFIG_ARCH_ARMADA_370)	+= armada-370-xp.o
> >  obj-$(CONFIG_ARCH_ARMADA_XP)	+= armada-370-xp.o
> >  obj-$(CONFIG_ARCH_ARMADA_38X)	+= armada-370-xp.o
> > diff --git a/arch/arm/mach-mvebu/include/mach/bbu.h b/arch/arm/mach-mvebu/include/mach/bbu.h
> > new file mode 100644
> > index 000000000000..f1021e52ce9f
> > --- /dev/null
> > +++ b/arch/arm/mach-mvebu/include/mach/bbu.h
> > @@ -0,0 +1,3 @@
> > +int mvebu_bbu_flash_register_handler(const char *name,
> > +				     char *devicefile, int version,
> > +				     bool isdefault);
> > diff --git a/arch/arm/mach-mvebu/kwb_bbu.c b/arch/arm/mach-mvebu/kwb_bbu.c
> > new file mode 100644
> > index 000000000000..f79464fe53e4
> > --- /dev/null
> > +++ b/arch/arm/mach-mvebu/kwb_bbu.c
> > @@ -0,0 +1,54 @@
> > +#include <bbu.h>
> > +#include <libfile.h>
> > +#include <printk.h>
> > +
> > +#include <mach/bbu.h>
> > +
> > +struct mvebu_bbu_handler {
> > +	struct bbu_handler bbuh;
> > +	int version;
> > +};
> > +
> > +static int mvebu_bbu_flash_update_handler(struct bbu_handler *bbuh,
> > +					  struct bbu_data *data)
> > +{
> > +	struct mvebu_bbu_handler *mbbuh =
> > +		container_of(bbuh, struct mvebu_bbu_handler, bbuh);
> > +	const void *image = data->image;
> > +	size_t size = data->len;
> > +	enum filetype ft = file_detect_type(image, size);
> > +
> > +	if ((mbbuh->version == 0 && ft == filetype_kwbimage_v0) ||
> > +	    (mbbuh->version == 1 && ft == filetype_kwbimage_v1) ||
> > +	    data->flags & BBU_FLAG_FORCE) {
> > +		int ret = bbu_confirm(data);
> > +		if (ret)
> > +			return ret;
> > +
> > +		return write_file_flash(bbuh->devicefile, image, size);
> > +	} else {
> > +		pr_err("%s is not a valid kwbimage\n", data->imagefile);
> > +		return -EINVAL;
> > +	}
> > +}
> 
> Could this code be shared with other boards?

Yes it can. I haven't seen this is not in the board file but already in
a location which could be used by others.

Applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH] mvebu: create bbu handler for kwb images and use it on cubox
  2018-06-08  8:42 [PATCH] mvebu: create bbu handler for kwb images and use it on cubox Uwe Kleine-König
  2018-06-11  6:43 ` Sascha Hauer
@ 2018-06-11 20:38 ` Sascha Hauer
  2018-06-12  5:42   ` [PATCH] fixup! " Uwe Kleine-König
  1 sibling, 1 reply; 7+ messages in thread
From: Sascha Hauer @ 2018-06-11 20:38 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: barebox

On Fri, Jun 08, 2018 at 10:42:44AM +0200, Uwe Kleine-König wrote:
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> Hello,
> 
> together with the fixup for write_file_flash to not use O_TRUNC and
> O_CREAT, this was tested on top of next.
> 
> Best regards
> Uwe
> 
>  arch/arm/boards/solidrun-cubox/board.c | 15 ++++++-
>  arch/arm/mach-mvebu/Makefile           |  1 +
>  arch/arm/mach-mvebu/include/mach/bbu.h |  3 ++
>  arch/arm/mach-mvebu/kwb_bbu.c          | 54 ++++++++++++++++++++++++++
>  4 files changed, 72 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/mach-mvebu/include/mach/bbu.h
>  create mode 100644 arch/arm/mach-mvebu/kwb_bbu.c
> 
> diff --git a/arch/arm/boards/solidrun-cubox/board.c b/arch/arm/boards/solidrun-cubox/board.c
> index a28f4197dfd4..aac93afb0c89 100644
> --- a/arch/arm/boards/solidrun-cubox/board.c
> +++ b/arch/arm/boards/solidrun-cubox/board.c
> @@ -14,4 +14,17 @@
>   *
>   */
>  
> -/* empty */
> +#include <common.h>
> +#include <init.h>
> +#include <mach/bbu.h>
> +
> +static int cubox_devices_init(void)
> +{
> +	if (!of_machine_is_compatible("solidrun,cubox"))
> +		return 0;
> +
> +	mvebu_bbu_flash_register_handler("flash", "/dev/m25p0", 0, true);

This breaks linking when bbu support is disabled. You'll have to
provide some static inline wrapper for this case.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH] fixup! mvebu: create bbu handler for kwb images and use it on cubox
  2018-06-11 20:38 ` Sascha Hauer
@ 2018-06-12  5:42   ` Uwe Kleine-König
  2018-06-13  8:28     ` Sascha Hauer
  0 siblings, 1 reply; 7+ messages in thread
From: Uwe Kleine-König @ 2018-06-12  5:42 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

---
 arch/arm/mach-mvebu/Makefile           | 2 +-
 arch/arm/mach-mvebu/include/mach/bbu.h | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
index cc2b926438e4..6079403b83dd 100644
--- a/arch/arm/mach-mvebu/Makefile
+++ b/arch/arm/mach-mvebu/Makefile
@@ -1,8 +1,8 @@
 obj-pbl-y			+= common.o
-obj-y				+= kwb_bbu.o
 obj-$(CONFIG_ARCH_ARMADA_370)	+= armada-370-xp.o
 obj-$(CONFIG_ARCH_ARMADA_XP)	+= armada-370-xp.o
 obj-$(CONFIG_ARCH_ARMADA_38X)	+= armada-370-xp.o
 obj-$(CONFIG_ARCH_DOVE)		+= dove.o
 obj-$(CONFIG_ARCH_KIRKWOOD)	+= kirkwood.o
+obj-$(CONFIG_BAREBOX_UPDATE)	+= kwb_bbu.o
 obj-$(CONFIG_BOOTM)		+= kwbootimage.o
diff --git a/arch/arm/mach-mvebu/include/mach/bbu.h b/arch/arm/mach-mvebu/include/mach/bbu.h
index f1021e52ce9f..a06db2b1442e 100644
--- a/arch/arm/mach-mvebu/include/mach/bbu.h
+++ b/arch/arm/mach-mvebu/include/mach/bbu.h
@@ -1,3 +1,12 @@
+#ifdef CONFIG_BAREBOX_UPDATE
 int mvebu_bbu_flash_register_handler(const char *name,
 				     char *devicefile, int version,
 				     bool isdefault);
+#else
+int mvebu_bbu_flash_register_handler(const char *name,
+                                     char *devicefile, int version,
+                                     bool isdefault)
+{
+	return -ENOSYS;
+}
+#endif
-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* Re: [PATCH] fixup! mvebu: create bbu handler for kwb images and use it on cubox
  2018-06-12  5:42   ` [PATCH] fixup! " Uwe Kleine-König
@ 2018-06-13  8:28     ` Sascha Hauer
  0 siblings, 0 replies; 7+ messages in thread
From: Sascha Hauer @ 2018-06-13  8:28 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: barebox

On Tue, Jun 12, 2018 at 07:42:14AM +0200, Uwe Kleine-König wrote:
> ---
>  arch/arm/mach-mvebu/Makefile           | 2 +-
>  arch/arm/mach-mvebu/include/mach/bbu.h | 9 +++++++++
>  2 files changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-mvebu/Makefile b/arch/arm/mach-mvebu/Makefile
> index cc2b926438e4..6079403b83dd 100644

Applied, thanks

Sascha

> --- a/arch/arm/mach-mvebu/Makefile
> +++ b/arch/arm/mach-mvebu/Makefile
> @@ -1,8 +1,8 @@
>  obj-pbl-y			+= common.o
> -obj-y				+= kwb_bbu.o
>  obj-$(CONFIG_ARCH_ARMADA_370)	+= armada-370-xp.o
>  obj-$(CONFIG_ARCH_ARMADA_XP)	+= armada-370-xp.o
>  obj-$(CONFIG_ARCH_ARMADA_38X)	+= armada-370-xp.o
>  obj-$(CONFIG_ARCH_DOVE)		+= dove.o
>  obj-$(CONFIG_ARCH_KIRKWOOD)	+= kirkwood.o
> +obj-$(CONFIG_BAREBOX_UPDATE)	+= kwb_bbu.o
>  obj-$(CONFIG_BOOTM)		+= kwbootimage.o
> diff --git a/arch/arm/mach-mvebu/include/mach/bbu.h b/arch/arm/mach-mvebu/include/mach/bbu.h
> index f1021e52ce9f..a06db2b1442e 100644
> --- a/arch/arm/mach-mvebu/include/mach/bbu.h
> +++ b/arch/arm/mach-mvebu/include/mach/bbu.h
> @@ -1,3 +1,12 @@
> +#ifdef CONFIG_BAREBOX_UPDATE
>  int mvebu_bbu_flash_register_handler(const char *name,
>  				     char *devicefile, int version,
>  				     bool isdefault);
> +#else
> +int mvebu_bbu_flash_register_handler(const char *name,
> +                                     char *devicefile, int version,
> +                                     bool isdefault)
> +{
> +	return -ENOSYS;
> +}
> +#endif
> -- 
> 2.17.1
> 
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2018-06-13  8:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-08  8:42 [PATCH] mvebu: create bbu handler for kwb images and use it on cubox Uwe Kleine-König
2018-06-11  6:43 ` Sascha Hauer
2018-06-11  6:49   ` Uwe Kleine-König
2018-06-11  6:58   ` Sascha Hauer
2018-06-11 20:38 ` Sascha Hauer
2018-06-12  5:42   ` [PATCH] fixup! " Uwe Kleine-König
2018-06-13  8:28     ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox