[PATCH v2] Make list of flash images and fix link all single image cases

2015-10-26 Thread Trent Piepho
Create a new file named 'barebox-flash-images' in the top level output
directory that lists each image generated, one per line.  Paths will
be relative to the top level output directory.  This works if multiple
images are generated as well as for a single image.

Also update the existing barebox-flash-image symlink to point to the
image in all cases where there is a single image generated.  If
multiple images are generated, it will point to the non-existent file
'multi-image-build'.

Signed-off-by: Trent Piepho 
---

This version makes a list, and thus works in a multiple images case
and presents a way forward for build systems like buildroot.

It also updates the link.  While a symlink is no longer ideal, if you
consider the two possibilities:
A) A link is made in all single image builds.
B) A link is made in some single image builds but not others, based
on an obscure detail in the internal build system that few barebox 
users are aware of.

It seems clear that A is more sensible than B.

In a multiple image build, the link is made but points to a non-existent
file whose name should clue the user in as to why it doesn't point to
an image.  This has the nice effect that with the current buildroot,
one gets an error in a multiple image build rather than buildroot silently
using the incorrect image file.

 Makefile|  5 -
 images/Makefile | 18 +-
 2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 9b10077..b067b00 100644
--- a/Makefile
+++ b/Makefile
@@ -484,6 +484,9 @@ export KBUILD_BINARY ?= barebox.bin
 barebox-flash-image: $(KBUILD_IMAGE) FORCE
$(call if_changed,ln)
 
+barebox-flash-images: $(KBUILD_IMAGE)
+   @echo $^ > $@
+
 images: barebox.bin FORCE
$(Q)$(MAKE) $(build)=images $@
 images/%.s: barebox.bin FORCE
@@ -492,7 +495,7 @@ images/%.s: barebox.bin FORCE
 ifdef CONFIG_PBL_MULTI_IMAGES
 all: barebox.bin images
 else
-all: barebox-flash-image
+all: barebox-flash-image barebox-flash-images
 endif
 
 common-$(CONFIG_PBL_IMAGE) += pbl/
diff --git a/images/Makefile b/images/Makefile
index a5f589b..6a44511 100644
--- a/images/Makefile
+++ b/images/Makefile
@@ -121,10 +121,26 @@ targets += $(foreach m, $(image-y), $(FILE_$(m)))
 
 SECONDARY: $(addprefix $(obj)/,$(targets))
 
-images: $(addprefix $(obj)/, $(image-y)) FORCE
+# Images with full paths
+image-y-path := $(addprefix $(obj)/,$(image-y))
+# File will have a list of images generated
+flash-list := $(obj)/../barebox-flash-images
+# Symlink, which will point to non-existent 'multi-image-build' if there are
+# multiple images
+flash-link := $(obj)/../barebox-flash-image
+link-dest := $(if $(filter 1,$(words 
$(image-y))),$(image-y-path),multi-image-build)
+multi-image-build:
+
+images: $(image-y-path) $(flash-link) $(flash-list) FORCE
@echo "images built:"
@for i in $(image-y); do echo $$i; done
 
+$(flash-link): $(link-dest) FORCE
+   $(call if_changed,ln)
+
+$(flash-list): $(image-y-path)
+   @for i in $^; do echo $$i; done > $@
+
 clean-files := *.pbl *.pblb *.pblx *.map start_*.imximg *.img barebox.z 
start_*.kwbimg \
start_*.kwbuartimg *.socfpgaimg *.mlo *.t20img *.t20img.cfg *.t30img \
*.t30img.cfg *.t124img *.t124img.cfg *.mlospi *.mlo *.mxsbs *.mxssd
-- 
1.8.3.1


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


[PATCH 2/3] checkpatch: fix left brace warning

2015-10-26 Thread Alexander Aring
Running checkpatch with perl version 5.22 occur the following warnings:

Unescaped left brace in regex is deprecated, ... checkpatch.pl line 2017.
Unescaped left brace in regex is deprecated, ... checkpatch.pl line 2267.
Unescaped left brace in regex is deprecated, ... checkpatch.pl line 2268.
...
lot of weird things
...
)\(.*\).*\s{ <-- HERE / at ./scripts/checkpatch.pl line 2016.

This patch fix these warning, an similar commit was done in linux kernel
commit: 4e5d56bdf892e18832a6540b63ebf709966bce2a ("checkpatch: fix left
brace warning").

Signed-off-by: Alexander Aring 
---
 scripts/checkpatch.pl | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 8d96434..f3fd339 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2013,8 +2013,8 @@ sub process {
 
 # function brace can't be on same line, except for #defines of do while,
 # or if closed on same line
-   if (($line=~/$Type\s*$Ident\(.*\).*\s{/) and
-   !($line=~/\#\s*define.*do\s{/) and !($line=~/}/)) {
+   if (($line=~/$Type\s*$Ident\(.*\).*\s\{/) and
+   !($line=~/\#\s*define.*do\s\{/) and !($line=~/}/)) {
ERROR("open brace '{' following function declarations 
go on the next line\n" . $herecurr);
}
 
@@ -2264,8 +2264,8 @@ sub process {
 ## }
 
 #need space before brace following if, while, etc
-   if (($line =~ /\(.*\){/ && $line !~ /\($Type\){/) ||
-   $line =~ /do{/) {
+   if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\){/) ||
+   $line =~ /do\{/) {
ERROR("space required before the open brace '{'\n" . 
$herecurr);
}
 
-- 
2.6.1


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


[PATCH 1/3] loadb: add missing brackets in help

2015-10-26 Thread Alexander Aring
This patch adds missing brackets in the help text of loadb command.

Signed-off-by: Alexander Aring 
---
 commands/loadb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/commands/loadb.c b/commands/loadb.c
index be5830d..aabb00a 100644
--- a/commands/loadb.c
+++ b/commands/loadb.c
@@ -681,9 +681,9 @@ static int do_load_serial_bin(int argc, char *argv[])
 BAREBOX_CMD_HELP_START(loadb)
 BAREBOX_CMD_HELP_TEXT("")
 BAREBOX_CMD_HELP_TEXT("Options:")
-BAREBOX_CMD_HELP_OPT("-f FILE", "download to FILE (default image.bin")
+BAREBOX_CMD_HELP_OPT("-f FILE", "download to FILE (default image.bin)")
 BAREBOX_CMD_HELP_OPT("-o OFFS", "destination file OFFSet (default 0)")
-BAREBOX_CMD_HELP_OPT("-b BAUD", "baudrate for download (default: console 
baudrate")
+BAREBOX_CMD_HELP_OPT("-b BAUD", "baudrate for download (default: console 
baudrate)")
 BAREBOX_CMD_HELP_END
 
 BAREBOX_CMD_START(loadb)
-- 
2.6.1


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


[PATCH 3/3] amba: check if on remove callback

2015-10-26 Thread Alexander Aring
Currently we get a null pointer dereference when booting linux on RPi
which use "uart-pl011" driver. This driver doesn't implement a remove
driver callback. This patch adds a check before calling the remove
callback if the driver which use the amba bus implement such
functionality.

Signed-off-by: Alexander Aring 
---
 drivers/amba/bus.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
index b934e11..ddd9661 100644
--- a/drivers/amba/bus.c
+++ b/drivers/amba/bus.c
@@ -70,7 +70,8 @@ static void amba_remove(struct device_d *dev)
struct amba_device *pcdev = to_amba_device(dev);
struct amba_driver *drv = to_amba_driver(dev->driver);
 
-   drv->remove(pcdev);
+   if (drv->remove)
+   drv->remove(pcdev);
 }
 
 struct bus_type amba_bustype = {
-- 
2.6.1


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


[PATCH] ARM: imx6: add OF fixup to delete nonexistent CPU cores

2015-10-26 Thread Lucas Stach
Make sure that the DT passed to Linux reflects the actual number of CPU
cores present in the system by reading the SCU configuration. As both
the Q and DL variants of the MX6 have versions with cores fused away,
but the DTs have the maximum number of cores specified, this just deletes
any nonexistent CPU core nodes.

Signed-off-by: Lucas Stach 
---
 arch/arm/mach-imx/imx6.c | 34 ++
 1 file changed, 34 insertions(+)

diff --git a/arch/arm/mach-imx/imx6.c b/arch/arm/mach-imx/imx6.c
index c49de49209f3..c2a4d62c51da 100644
--- a/arch/arm/mach-imx/imx6.c
+++ b/arch/arm/mach-imx/imx6.c
@@ -238,3 +238,37 @@ static int imx6_mmu_init(void)
return 0;
 }
 postmmu_initcall(imx6_mmu_init);
+
+#define SCU_CONFIG 0x04
+
+static int imx6_fixup_cpus(struct device_node *root, void *context)
+{
+   struct device_node *cpus_node, *np, *tmp;
+   unsigned long scu_phys_base;
+   unsigned int max_core_index;
+
+   cpus_node = of_find_node_by_name(root, "cpus");
+   if (!cpus_node)
+   return 0;
+
+   /* get actual number of available CPU cores from SCU */
+   asm("mrc p15, 4, %0, c15, c0, 0" : "=r" (scu_phys_base));
+   max_core_index = (readl(IOMEM(scu_phys_base) + SCU_CONFIG) & 0x03);
+
+   for_each_child_of_node_safe(cpus_node, tmp, np) {
+   u32 cpu_index;
+
+   if (of_property_read_u32(np, "reg", &cpu_index))
+   continue;
+
+   if (cpu_index > max_core_index)
+   of_delete_node(np);
+   }
+
+   return 0;
+}
+
+static int imx6_fixup_cpus_register(void) {
+   return of_register_fixup(imx6_fixup_cpus, NULL);
+}
+device_initcall(imx6_fixup_cpus_register);
-- 
2.6.1


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


Re: [PATCH] imx6-mmdc: restore RALAT/WALAT in MMDC0, not MMDC1

2015-10-26 Thread Eric Nelson
Hi Sascha,

On 10/25/2015 11:54 PM, Sascha Hauer wrote:
> On Fri, Oct 23, 2015 at 04:34:40PM -0700, Eric Nelson wrote:
>> Signed-off-by: Eric Nelson 
>> ---
>>  arch/arm/mach-imx/imx6-mmdc.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Applied, thanks
> 
> Sascha
> 
>>
>> diff --git a/arch/arm/mach-imx/imx6-mmdc.c b/arch/arm/mach-imx/imx6-mmdc.c
>> index 40fe0cf..7840c1a 100644
>> --- a/arch/arm/mach-imx/imx6-mmdc.c
>> +++ b/arch/arm/mach-imx/imx6-mmdc.c
>> @@ -474,7 +474,7 @@ int mmdc_do_dqs_calibration(void)
>>  writel(v, P0_IPS + MAPSR);
>>  
>>  /* restore MDMISC value (RALAT, WALAT) */
>> -writel(esdmisc_val, P1_IPS + MDMISC);
>> +writel(esdmisc_val, P0_IPS + MDMISC);
>>  
>>  /* clear DQS pull ups */
>>  v = readl(IOMUXC_SW_PAD_CTL_PAD_DRAM_SDQS0) & ~0x7000;
>> -- 
>> 2.6.2
>>
>>
> 

Note that this typo should have had an impact on performance
because RALAT and WALAT for MMDC0 would be left at their
max values.

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


Re: [PATCH] imx6-mmdc: fix automatic power down enable in write level calibration

2015-10-26 Thread Eric Nelson
Hi Sascha,

On 10/25/2015 11:53 PM, Sascha Hauer wrote:
> Hi Eric,
> 
> On Fri, Oct 23, 2015 at 12:49:44PM -0700, Eric Nelson wrote:
>> Bit 0 of the MAPSR register controls auto power down.
>>
>> Explicitly clear this bit instead of reserved bit when
>> exiting from mmdc_do_write_level_calibration().
>>
>> Signed-off-by: Eric Nelson 
> 
> Looks good, applied. Did this bug have any practical impacts?
> 

I found the mistake when reviewing the code and didn't run it.
>From the manual, bit 3 is listed as reserved with a default
value of zero, so that should have no effect.

Not clearing bit zero should only prevent the MMDC from
invoking self-refresh.

>From the RM:
Automatic Power Saving Disable. When the value of PSD is
"0" (i.e automatic power saving is enabled) then the PST is
activated and MMDC will enter automatically to self-refresh
while the number of idle cycle reached.

I'm reviewing this code for possible inclusion into a U-Boot
SPL-based DDR calibration routine and haven't run it.

> Sascha
> 
>> ---
>>  arch/arm/mach-imx/imx6-mmdc.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/mach-imx/imx6-mmdc.c b/arch/arm/mach-imx/imx6-mmdc.c
>> index 64fb624..40fe0cf 100644
>> --- a/arch/arm/mach-imx/imx6-mmdc.c
>> +++ b/arch/arm/mach-imx/imx6-mmdc.c
>> @@ -103,9 +103,9 @@ int mmdc_do_write_level_calibration(void)
>>  val |= 0x5500;
>>  writel(val, (P0_IPS + MDPDC));
>>  
>> -/* enable Adopt power down timer: */
>> +/* enable auto power down timer: */
>>  val = readl(P0_IPS + MAPSR);
>> -val &= 0xfff7;
>> +val &= ~1;
>>  writel(val, (P0_IPS + MAPSR));
>>  
>>  /* clear CON_REQ */
>> -- 
>> 2.6.2
>>
>>
> 


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


Re: [PATCH] ARM: imx: clocksource: add new DT compatible

2015-10-26 Thread Sascha Hauer
On Mon, Oct 26, 2015 at 03:03:08PM +0100, Lucas Stach wrote:
> The i.MX6 DL/S DT has been changed to use more specific compatibles as
> GPTv2 has a different programming model for modes used in Linux. This
> difference doesn't matter for Barebox, but the old mx31 compatible has
> been dropped from the DT, so we need to match on the one still present.
> 
> Signed-off-by: Lucas Stach 

I also just stumbled upon this, but you were faster sending it ;)

Applied, thanks

Sascha

> ---
> This fixes a "Warning: Using dummy clocksource" and resulting wrong
> delays present in -next on MX6DL/S.
> ---
>  arch/arm/mach-imx/clocksource.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm/mach-imx/clocksource.c b/arch/arm/mach-imx/clocksource.c
> index 06d2fba41299..a11b978bf4c8 100644
> --- a/arch/arm/mach-imx/clocksource.c
> +++ b/arch/arm/mach-imx/clocksource.c
> @@ -141,6 +141,9 @@ static __maybe_unused struct of_device_id 
> imx_gpt_dt_ids[] = {
>   .compatible = "fsl,imx31-gpt",
>   .data = ®s_imx31,
>   }, {
> + .compatible = "fsl,imx6q-gpt",
> + .data = ®s_imx31,
> + }, {
>   /* sentinel */
>   }
>  };
> -- 
> 2.6.1
> 
> 
> ___
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
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- |

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


[PATCH] ARM: imx: clocksource: add new DT compatible

2015-10-26 Thread Lucas Stach
The i.MX6 DL/S DT has been changed to use more specific compatibles as
GPTv2 has a different programming model for modes used in Linux. This
difference doesn't matter for Barebox, but the old mx31 compatible has
been dropped from the DT, so we need to match on the one still present.

Signed-off-by: Lucas Stach 
---
This fixes a "Warning: Using dummy clocksource" and resulting wrong
delays present in -next on MX6DL/S.
---
 arch/arm/mach-imx/clocksource.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-imx/clocksource.c b/arch/arm/mach-imx/clocksource.c
index 06d2fba41299..a11b978bf4c8 100644
--- a/arch/arm/mach-imx/clocksource.c
+++ b/arch/arm/mach-imx/clocksource.c
@@ -141,6 +141,9 @@ static __maybe_unused struct of_device_id imx_gpt_dt_ids[] 
= {
.compatible = "fsl,imx31-gpt",
.data = ®s_imx31,
}, {
+   .compatible = "fsl,imx6q-gpt",
+   .data = ®s_imx31,
+   }, {
/* sentinel */
}
 };
-- 
2.6.1


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


[PATCH] of_dump: Add option to print node names only

2015-10-26 Thread Sascha Hauer
Devicetrees tend to become very long and it is hard to find the
interesting nodes in a full tree output.
This patch adds the -n option to the of_node command. With this
option only the names of the nodes are printed, but not the properties.
The resulting output is much shorter and the node one is interested
in can be copy/pasted to a second call to of_node.

Signed-off-by: Sascha Hauer 
---
 commands/of_dump.c | 21 +++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/commands/of_dump.c b/commands/of_dump.c
index 513a4b8..b15f54a 100644
--- a/commands/of_dump.c
+++ b/commands/of_dump.c
@@ -31,6 +31,16 @@
 #include 
 #include 
 
+static void of_print_nodenames(struct device_node *node)
+{
+   struct device_node *n;
+
+   printf("%s\n", node->full_name);
+
+   list_for_each_entry(n, &node->children, parent_list)
+   of_print_nodenames(n);
+}
+
 static int do_of_dump(int argc, char *argv[])
 {
int opt;
@@ -40,8 +50,9 @@ static int do_of_dump(int argc, char *argv[])
char *dtbfile = NULL;
size_t size;
const char *nodename;
+   int names_only = 0;
 
-   while ((opt = getopt(argc, argv, "Ff:")) > 0) {
+   while ((opt = getopt(argc, argv, "Ff:n")) > 0) {
switch (opt) {
case 'f':
dtbfile = optarg;
@@ -49,6 +60,9 @@ static int do_of_dump(int argc, char *argv[])
case 'F':
fix = 1;
break;
+   case 'n':
+   names_only = 1;
+   break;
default:
return COMMAND_ERROR_USAGE;
}
@@ -111,7 +125,10 @@ static int do_of_dump(int argc, char *argv[])
goto out;
}
 
-   of_print_nodes(node, 0);
+   if (names_only)
+   of_print_nodenames(node);
+   else
+   of_print_nodes(node, 0);
 
 out:
if (of_free)
-- 
2.6.1


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


Re: [PATCH] fixup! commands: clk_dump: use COMMAND_SUCCESS instead of 0 return code

2015-10-26 Thread Sascha Hauer
On Thu, Oct 22, 2015 at 11:20:38AM +0300, Antony Pavlov wrote:
> Sorry, I have missed that occurence.
> So we can change original patch subject line to
> 
> 
>   commands: clk: use COMMAND_SUCCESS instead of 0

Did that.

Sascha

> 
> 
> ---
>  commands/clk.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/commands/clk.c b/commands/clk.c
> index 2bfdfdf..e9459a3 100644
> --- a/commands/clk.c
> +++ b/commands/clk.c
> @@ -40,7 +40,7 @@ static int do_clk_disable(int argc, char *argv[])
>  
>   clk_disable(clk);
>  
> - return 0;
> + return COMMAND_SUCCESS;
>  }
>  
>  BAREBOX_CMD_START(clk_disable)
> -- 
> 2.6.0
> 
> 

-- 
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- |

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


Re: [PATCH] lib:font:fbconsole: add custom font support for review

2015-10-26 Thread Sascha Hauer
On Sat, Oct 24, 2015 at 01:38:08PM +0300, Du Huanpeng wrote:
> Signed-off-by: Du Huanpeng 
> ---
>  drivers/video/fbconsole.c   |  39 -
>  include/linux/font.h|  11 ++-
>  lib/fonts/Kconfig   |   5 ++
>  lib/fonts/Makefile  |   4 +
>  lib/fonts/font_7x14.c   |   1 +
>  lib/fonts/font_8x16.c   |   1 +
>  lib/fonts/font_custom_16x.c | 206 
> 
>  lib/fonts/font_mini_4x6.c   |   1 +
>  lib/fonts/fonts.c   |  32 +++
>  9 files changed, 279 insertions(+), 21 deletions(-)
>  create mode 100644 lib/fonts/font_custom_16x.c
> 
> diff --git a/drivers/video/fbconsole.c b/drivers/video/fbconsole.c
> index b10503e..dad45c3 100644
> --- a/drivers/video/fbconsole.c
> +++ b/drivers/video/fbconsole.c
> @@ -22,8 +22,8 @@ struct fbc_priv {
>   struct param_d *par_font;
>   int par_font_val;
>  
> - int font_width, font_height;
> - const u8 *fontdata;
> + struct font_desc font;
> +
>   unsigned int cols, rows;
>   unsigned int x, y; /* cursor position */
>  
> @@ -84,7 +84,7 @@ static struct rgb colors[] = {
>   { 255, 255, 255 },
>  };
>  
> -static void drawchar(struct fbc_priv *priv, int x, int y, char c)
> +static void drawchar(struct fbc_priv *priv, int x, int y, int c)
>  {
>   void *buf;
>   int bpp = priv->fb->bits_per_pixel >> 3;
> @@ -97,7 +97,8 @@ static void drawchar(struct fbc_priv *priv, int x, int y, 
> char c)
>  
>   buf = gui_screen_render_buffer(priv->sc);
>  
> - inbuf = &priv->fontdata[c * priv->font_height];
> + i = find_font_index(&priv->font, c);
> + inbuf = priv->font.data + i;
>  
>   line_length = priv->fb->line_length;
>  
> @@ -113,13 +114,13 @@ static void drawchar(struct fbc_priv *priv, int x, int 
> y, char c)
>   rgb = &colors[bgcolor];
>   bgcolor = gu_rgb_to_pixel(priv->fb, rgb->r, rgb->g, rgb->b, 0xff);
>  
> - for (i = 0; i < priv->font_height; i++) {
> + for (i = 0; i < priv->font.height; i++) {
>   uint8_t t = inbuf[i];
>   int j;
>  
> - adr = buf + line_length * (y * priv->font_height + i) + x * 
> priv->font_width * bpp;
> + adr = buf + line_length * (y * priv->font.height + i) + x * 
> priv->font.width * bpp;
>  
> - for (j = 0; j < priv->font_width; j++) {
> + for (j = 0; j < priv->font.width; j++) {

This patch has several hunks without changes which makes it hard to look
at.

Somehow this looks like beginning unicode support. Wouldn't it be better
to pick the relevant parts we need from unicode and support them?

> +const struct font_index fontdata_custom_16x_index[] = {
> + { 0x, 0x },
> + { 0x54C0, 0x00E0 },
> + { 0x54CE, 0x00A0 },
> + { 0x554A, 0x0020 },
> + { 0x57C3, 0x0060 },
> + { 0x5509, 0x00C0 },
> + { 0x6328, 0x0080 },
> + { 0x769A, 0x0100 },
> + { 0x963F, 0x0040 },
> + { 0x, 0x0120 },
> +};
> +
> +const struct font_desc font_custom_16x = {
> + .name   = "CUSTOM-16x",
> + .width  = 16,
> + .height = 16,
> + .data   = fontdata_custom_16x,
> + .index  = fontdata_custom_16x_index,
> + .num_chars = 10,

.num_chars = ARRAY_SIZE(fontdata_custom_16x_index),

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- |

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