Skip to contentSkip to conversation

Independent collection of patches

PATCH In review Sam Ravnborg 2 participants 10 messages Dec 31, 2018 – Jan 7, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover Independent collection of patches

Random collection of patches that accumulated the last weeks. They are done on top of the next branch.

No dependencies between the patches.

Sam

Sam Ravnborg (5):
2d-primitives: fix no previous prototype warning
images: fix force rebuild of piggy.o
arm: fix no prototype for barebox_arm_reset_vector()
at91sam9263ek: fix build of of_init
video: mtl017: fix driver name variable

 arch/arm/boards/at91sam9263ek/Makefile | 2 +-
 arch/arm/include/asm/barebox-arm.h     | 2 ++
 drivers/video/mtl017.c                 | 4 ++--
 images/Makefile                        | 9 ++++-----
 lib/gui/2d-primitives.c                | 2 ++
 5 files changed, 11 insertions(+), 8 deletions(-)

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#1 lore raw

PATCH 1/5 2d-primitives: fix no previous prototype warning

Fix the following warnings:

lib/gui/2d-primitives.c:88:6: warning: no
previous prototype for ‘gu_draw_line’ [-Wmissing-prototypes]
void gu_draw_line(struct screen *sc,

      ^~~~~~~~~~~~
lib/gui/2d-primitives.c:174:6: warning: no
previous prototype for ‘gu_draw_circle’ [-Wmissing-prototypes]
 void gu_draw_circle(struct screen *sc,
      ^~~~~~~~~~~~~~
---
 lib/gui/2d-primitives.c | 2 ++
 1 file changed, 2 insertions(+)
lib/gui/2d-primitives.c +2 -0
index 82e59d9a6..940e82b7d 100644
@@ -7,6 +7,8 @@
 #include <fs.h>
 #include <malloc.h>
 
+#include <gui/2d-primitives.h>
+
 static void __illuminate(struct fb_info *info,
 			 int x, int y,
 			 u8 r, u8 g, u8 b, u8 a)
Signature · 7 lines
2.12.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw

PATCH 2/5 images: fix force rebuild of piggy.o

In reply to Sam Ravnborg

piggy.o would be build for every time barebox was built This had the sideeffect that the image(s) would always be rebuilt despite no changes

Fix this by adding piggy.o to targets
and avoid an extra command in the rule to create .pblb files

The patch includes the removal of a stray assignment

Fixes 2078438662 ("Add multi images support")
---
 images/Makefile | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
images/Makefile +4 -5
index 8271a0d24..dfdc89811 100644
@@ -43,7 +43,9 @@
 #
 
 quiet_cmd_objcopy_bin = OBJCOPYB $@
-      cmd_objcopy_bin = $(OBJCOPY) -O binary $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
+      cmd_objcopy_bin = \
+		$(OBJCOPY) -O binary $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ && \
+		$(objtree)/scripts/fix_size -f $@
 
 pbl-lds := $(obj)/pbl.lds
 extra-y += $(pbl-lds)
@@ -59,14 +61,11 @@ quiet_cmd_elf__ ?= LD      $@
 
 PBL_CPPFLAGS	+= -fdata-sections -ffunction-sections
 
-piggy_o := piggy.$(suffix_y).o
-
 $(obj)/%.pbl: $(pbl-lds) $(barebox-pbl-common) $(obj)/piggy.o FORCE
 	$(call if_changed,elf__,$(*F))
 
 $(obj)/%.pblb: $(obj)/%.pbl FORCE
 	$(call if_changed,objcopy_bin,$(*F))
-	$(Q)$(objtree)/scripts/fix_size -f $@
 
 $(obj)/%.s: $(obj)/% FORCE
 	$(call if_changed,disasm)
@@ -114,7 +113,7 @@ include $(srctree)/images/Makefile.xburst
 include $(srctree)/images/Makefile.at91
 include $(srctree)/images/Makefile.zynqmp
 
-targets += $(image-y) pbl.lds barebox.x barebox.z
+targets += $(image-y) pbl.lds barebox.x barebox.z piggy.o
 targets += $(patsubst %,%.pblb,$(pblb-y))
 targets += $(patsubst %,%.pbl,$(pblb-y))
 targets += $(patsubst %,%.s,$(pblb-y))
Signature · 7 lines
2.12.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw

Re: [PATCH v1 2/5] images: fix force rebuild of piggy.o

Quoted 10 lines · Sam Ravnborg

piggy.o would be build for every time barebox was built This had the sideeffect that the image(s) would always be rebuilt despite no changes

Fix this by adding piggy.o to targets
and avoid an extra command in the rule to create .pblb files

The patch includes the removal of a stray assignment

Fixes 2078438662 ("Add multi images support")

This adds multi images support, but the actual change that this patch fixes came with 5a1a5ed253 ("ARM: images: use piggydata").

I changed that while applying.

Thanks,
Sascha

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#4 lore raw

PATCH 3/5 arm: fix no prototype for barebox_arm_reset_vector()

In reply to Sam Ravnborg

Fix the following warning:

PBLCC arch/arm/boards/at91sam9261ek/pbl-lowlevel_init.o
arch/arm/boards/at91sam9261ek/lowlevel_init.c:120:26:
warning: no previous prototype for ‘barebox_arm_reset_vector’ [-Wmissing-prototypes]

Prototype added so it covers machs with their own definition and the machs using the arm general variant

---
 arch/arm/include/asm/barebox-arm.h | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/include/asm/barebox-arm.h +2 -0
index e065b479e..312685486 100644
@@ -25,6 +25,7 @@
 #ifndef _BAREBOX_ARM_H_
 #define _BAREBOX_ARM_H_
 
+#include <init.h>
 #include <linux/sizes.h>
 #include <asm-generic/memory_layout.h>
 #include <linux/kernel.h>
@@ -58,6 +59,7 @@ void setup_c(void);
 void relocate_to_current_adr(void);
 void relocate_to_adr(unsigned long target);
 void __noreturn barebox_arm_entry(unsigned long membase, unsigned long memsize, void *boarddata);
+void __naked __bare_init barebox_arm_reset_vector(void);
 
 struct barebox_arm_boarddata {
 #define BAREBOX_ARM_BOARDDATA_MAGIC	0xabe742c3
Signature · 7 lines
2.12.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#5 lore raw

Re: [PATCH v1 3/5] arm: fix no prototype for barebox_arm_reset_vector()

Quoted 27 lines · Sam Ravnborg

Fix the following warning:

PBLCC arch/arm/boards/at91sam9261ek/pbl-lowlevel_init.o
arch/arm/boards/at91sam9261ek/lowlevel_init.c:120:26:
warning: no previous prototype for ‘barebox_arm_reset_vector’ [-Wmissing-prototypes]

Prototype added so it covers machs with their own definition and the machs using the arm general variant

---
 arch/arm/include/asm/barebox-arm.h | 2 ++
 1 file changed, 2 insertions(+)
arch/arm/include/asm/barebox-arm.h +1 -0
index e065b479e..312685486 100644
@@ -25,6 +25,7 @@
 #ifndef _BAREBOX_ARM_H_
 #define _BAREBOX_ARM_H_
 
+#include <init.h>
 #include <linux/sizes.h>
 #include <asm-generic/memory_layout.h>
 #include <linux/kernel.h>

arch/arm/include/asm/barebox-arm.h void setup_c(void); · line 62

Quoted 4 lines
arch/arm/include/asm/barebox-arm.h +1 -0
@@ -58,6 +59,7 @@ void setup_c(void);
 void relocate_to_current_adr(void);
 void relocate_to_adr(unsigned long target);
 void __noreturn barebox_arm_entry(unsigned long membase, unsigned long memsize, void *boarddata);
+void __naked __bare_init barebox_arm_reset_vector(void);

I had to drop this one as it breaks compilation on some boards. Some boards need r0 from the ROM so they have:

void __naked __bare_init barebox_arm_reset_vector(uint32_t *data)

We have to harmonize these first. I suggest to use

void __naked __bare_init barebox_arm_reset_vector(uint32_t r0, uint32_t r1, uint32_t r2)

Sascha

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#6 lore raw

Re: [PATCH v1 3/5] arm: fix no prototype for barebox_arm_reset_vector()

Hi Sasha.

Quoted 8 lines
Quoted 1 line

+void __naked __bare_init barebox_arm_reset_vector(void);

I had to drop this one as it breaks compilation on some boards. Some boards need r0 from the ROM so they have:

void __naked __bare_init barebox_arm_reset_vector(uint32_t *data)

We have to harmonize these first.

Sorry - I did not test more than a few boards.

Quoted 3 lines

I suggest to use

void __naked __bare_init barebox_arm_reset_vector(uint32_t r0, uint32_t r1, uint32_t r2)

Like the prototype we have for the multi images. I added this to the TODO list in the doc I just posted.

Sam

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#7 lore raw

Re: [PATCH v1 3/5] arm: fix no prototype for barebox_arm_reset_vector()

Quoted 11 lines · Sam Ravnborg

Hi Sasha.

Quoted 8 lines
Quoted 1 line

+void __naked __bare_init barebox_arm_reset_vector(void);

I had to drop this one as it breaks compilation on some boards. Some boards need r0 from the ROM so they have:

void __naked __bare_init barebox_arm_reset_vector(uint32_t *data)

We have to harmonize these first.

Sorry - I did not test more than a few boards.

Don't worry, that's what my compile tests are good for.

Sascha

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#8 lore raw

PATCH 4/5 at91sam9263ek: fix build of of_init

In reply to Sam Ravnborg

Fix mistake in Makefile that prevented build of
of_init.o

With this fix smc shows up in iomem like this:

0xffffe400 - 0xffffe5ff (size 0x00000200) at91sam9-smc0 0xffffea00 - 0xffffebff (size 0x00000200) at91sam9-smc1

And we get access to the files from defaultenv provided by the board

Fixes b467c262b5a7 (at91sam9263ek: enable DT support)
---
 arch/arm/boards/at91sam9263ek/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boards/at91sam9263ek/Makefile +1 -1
index 66083a239..d4d5e7639 100644
@@ -1,7 +1,7 @@
 ifeq ($(CONFIG_OFDEVICE),)
 obj-y += init.o
 endif
-obj-$(CONFIG_OF_DEVICE) += of_init.o
+obj-$(CONFIG_OFDEVICE) += of_init.o
 
 lwl-y += lowlevel_init.o
 
Signature · 7 lines
2.12.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#9 lore raw

PATCH 5/5 video: mtl017: fix driver name variable

In reply to Sam Ravnborg

It look like a copy-paste bug that the twl_driver name was used.
Rename to the more sensible mtl_driver

---
 drivers/video/mtl017.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/video/mtl017.c +2 -2
index 423fb8e4f..c04875cd0 100644
@@ -268,8 +268,8 @@ static int mtl017_probe(struct device_d *dev)
 	return 0;
 }
 
-static struct driver_d twl_driver = {
+static struct driver_d mtl_driver = {
 	.name  = "mtl017",
 	.probe = mtl017_probe,
 };
-device_i2c_driver(twl_driver);
+device_i2c_driver(mtl_driver);
Signature · 7 lines
2.12.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox