summaryrefslogtreecommitdiffstats
path: root/configs/platform-v7a/patches/barebox-2017.08.0/0006-ARM-vexpress-switch-to-DT-probe-and-multi-image-buil.patch
blob: dc21ddf0adaeb704da799ec2ebfa0ffdcbe9ad13 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
From: Lucas Stach <l.stach@pengutronix.de>
Date: Fri, 1 Sep 2017 14:07:05 +0200
Subject: [PATCH] ARM: vexpress: switch to DT probe and multi-image build

This switches the VExpress support to use an internal DT, instead
of probing the peripherals from a board file. It also switches to
a multi-iamge build with both CA9 and CA15 variants of the VExpress
board being supported.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 arch/arm/boards/vexpress/Makefile                  |   2 -
 .../arm/boards/vexpress/defaultenv-vexpress/config |  38 -------
 arch/arm/boards/vexpress/init.c                    | 115 +--------------------
 arch/arm/boards/vexpress/lowlevel.c                |  20 +++-
 arch/arm/dts/Makefile                              |   2 +
 arch/arm/dts/vexpress-v2p-ca15.dts                 |  27 +++++
 arch/arm/dts/vexpress-v2p-ca9.dts                  |  27 +++++
 arch/arm/mach-vexpress/Kconfig                     |   4 +
 arch/arm/mach-vexpress/Makefile                    |   1 -
 arch/arm/mach-vexpress/devices.c                   |  83 ---------------
 arch/arm/mach-vexpress/include/mach/devices.h      |   9 --
 arch/arm/mach-vexpress/v2m.c                       |  38 -------
 images/Makefile                                    |   1 +
 images/Makefile.vexpress                           |  11 ++
 14 files changed, 93 insertions(+), 285 deletions(-)
 delete mode 100644 arch/arm/boards/vexpress/defaultenv-vexpress/config
 create mode 100644 arch/arm/dts/vexpress-v2p-ca15.dts
 create mode 100644 arch/arm/dts/vexpress-v2p-ca9.dts
 delete mode 100644 arch/arm/mach-vexpress/devices.c
 create mode 100644 images/Makefile.vexpress

diff --git a/arch/arm/boards/vexpress/Makefile b/arch/arm/boards/vexpress/Makefile
index c89d7bf182d0..2da0494d49b3 100644
--- a/arch/arm/boards/vexpress/Makefile
+++ b/arch/arm/boards/vexpress/Makefile
@@ -1,4 +1,2 @@
 obj-y += init.o
-
 lwl-y += lowlevel.o
-bbenv-$(CONFIG_DEFAULT_ENVIRONMENT_GENERIC) += defaultenv-vexpress
diff --git a/arch/arm/boards/vexpress/defaultenv-vexpress/config b/arch/arm/boards/vexpress/defaultenv-vexpress/config
deleted file mode 100644
index 6c0abda40c12..000000000000
--- a/arch/arm/boards/vexpress/defaultenv-vexpress/config
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-# use 'dhcp' to do dhcp in barebox and in kernel
-# use 'none' if you want to skip kernel ip autoconfiguration
-ip=dhcp
-global.dhcp.vendor_id=barebox-${global.hostname}
-
-# or set your networking parameters here
-#eth0.ipaddr=a.b.c.d
-#eth0.netmask=a.b.c.d
-#eth0.gateway=a.b.c.d
-#eth0.serverip=a.b.c.d
-
-# can be either 'nfs', 'tftp' or 'nor'
-kernel_loc=tftp
-# can be either 'net', 'nor' or 'initrd'
-rootfs_loc=initrd
-
-# can be either 'jffs2' or 'ubifs'
-rootfs_type=ubifs
-rootfsimage=root.$rootfs_type
-
-kernelimage=zImage
-#kernelimage=uImage
-#kernelimage=Image
-#kernelimage=Image.lzo
-
-nfsroot="$eth0.serverip:/opt/work/busybox/arm9/rootfs_arm"
-
-nor_parts="256k(barebox)ro,64k(bareboxenv),1536k(kernel),-(root)"
-rootfs_mtdblock_nor=3
-
-autoboot_timeout=3
-
-bootargs="console=ttyAMA0,115200n8 CONSOLE=/dev/ttyAMA0"
-
-# set a fancy prompt (if support is compiled in)
-PS1="\e[1;31m[barebox@\h]:\w\e[0m\n# "
diff --git a/arch/arm/boards/vexpress/init.c b/arch/arm/boards/vexpress/init.c
index f89dff939231..1bbc8c347638 100644
--- a/arch/arm/boards/vexpress/init.c
+++ b/arch/arm/boards/vexpress/init.c
@@ -11,129 +11,23 @@
 #include <generated/mach-types.h>
 #include <mach/devices.h>
 #include <environment.h>
-#include <partition.h>
 #include <linux/sizes.h>
 #include <io.h>
 #include <envfs.h>
 #include <globalvar.h>
 #include <linux/amba/sp804.h>
-#include <mci.h>
-
-struct vexpress_init {
-	void (*core_init)(void);
-	void (*mem_init)(void);
-	void (*console_init)(void);
-	void (*devices_init)(void);
-};
-
-struct mmci_platform_data mmci_plat = {
-	.ocr_mask	= MMC_VDD_32_33 | MMC_VDD_33_34,
-	.clkdiv_init	= SDI_CLKCR_CLKDIV_INIT,
-};
-
-struct vexpress_init *v2m_init;
-
-static void vexpress_ax_mem_init(void)
-{
-	vexpress_add_ddram(SZ_512M);
-}
 
 #define V2M_SYS_FLASH	0x03c
 
-static void vexpress_ax_devices_init(void)
-{
-	add_cfi_flash_device(0, 0x08000000, SZ_64M, 0);
-	add_cfi_flash_device(1, 0x0c000000, SZ_64M, 0);
-	vexpress_register_mmc(&mmci_plat);
-	add_generic_device("smc911x", DEVICE_ID_DYNAMIC, NULL, 0x1a000000,
-			64 * 1024, IORESOURCE_MEM, NULL);
-}
-
-static void vexpress_ax_console_init(void)
-{
-	vexpress_register_uart(0);
-	vexpress_register_uart(1);
-	vexpress_register_uart(2);
-	vexpress_register_uart(3);
-}
-
-struct vexpress_init vexpress_init_ax = {
-	.core_init = vexpress_init,
-	.mem_init = vexpress_ax_mem_init,
-	.console_init = vexpress_ax_console_init,
-	.devices_init = vexpress_ax_devices_init,
-};
-
-static void vexpress_a9_legacy_mem_init(void)
-{
-	vexpress_a9_legacy_add_ddram(SZ_512M, SZ_512M);
-}
-
-static void vexpress_a9_legacy_devices_init(void)
-{
-	add_cfi_flash_device(0, 0x40000000, SZ_64M, 0);
-	add_cfi_flash_device(1, 0x44000000, SZ_64M, 0);
-	add_generic_device("smc911x", DEVICE_ID_DYNAMIC, NULL, 0x4e000000,
-			64 * 1024, IORESOURCE_MEM, NULL);
-	vexpress_a9_legacy_register_mmc(&mmci_plat);
-	armlinux_set_architecture(MACH_TYPE_VEXPRESS);
-}
-
-static void vexpress_a9_legacy_console_init(void)
-{
-	vexpress_a9_legacy_register_uart(0);
-	vexpress_a9_legacy_register_uart(1);
-	vexpress_a9_legacy_register_uart(2);
-	vexpress_a9_legacy_register_uart(3);
-}
-
-struct vexpress_init vexpress_init_a9_legacy = {
-	.core_init = vexpress_a9_legacy_init,
-	.mem_init = vexpress_a9_legacy_mem_init,
-	.console_init = vexpress_a9_legacy_console_init,
-	.devices_init = vexpress_a9_legacy_devices_init,
-};
-
-static int vexpress_mem_init(void)
-{
-	v2m_init->mem_init();
-
-	return 0;
-}
-mem_initcall(vexpress_mem_init);
-
-static int vexpress_devices_init(void)
-{
-	writel(1, v2m_sysreg_base + V2M_SYS_FLASH);
-	v2m_init->devices_init();
-
-	devfs_add_partition("nor0", 0x00000, 0x40000, DEVFS_PARTITION_FIXED, "self");
-	devfs_add_partition("nor0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env0");
-
-	if (IS_ENABLED(CONFIG_DEFAULT_ENVIRONMENT_GENERIC))
-		defaultenv_append_directory(defaultenv_vexpress);
-
-	return 0;
-}
-device_initcall(vexpress_devices_init);
-
-static int vexpress_console_init(void)
-{
-	v2m_init->console_init();
-
-	return 0;
-}
-console_initcall(vexpress_console_init);
-
 static int vexpress_core_init(void)
 {
 	char *hostname = "vexpress-unknown";
 
 	if (amba_is_arm_sp804(IOMEM(0x10011000))) {
-		v2m_init = &vexpress_init_a9_legacy;
+		vexpress_a9_legacy_init();
 		hostname = "vexpress-a9-legacy";
 	} else {
-		v2m_init = &vexpress_init_ax;
+		vexpress_init();
 		if (cpu_is_cortex_a5())
 			hostname = "vexpress-a5";
 		else if (cpu_is_cortex_a7())
@@ -144,10 +38,9 @@ static int vexpress_core_init(void)
 			hostname = "vexpress-a15";
 	}
 
-	barebox_set_model("ARM Vexpress");
-	barebox_set_hostname(hostname);
+	writel(1, v2m_sysreg_base + V2M_SYS_FLASH);
 
-	v2m_init->core_init();
+	barebox_set_hostname(hostname);
 
 	return 0;
 }
diff --git a/arch/arm/boards/vexpress/lowlevel.c b/arch/arm/boards/vexpress/lowlevel.c
index 204d29d8f098..0a226b295c2a 100644
--- a/arch/arm/boards/vexpress/lowlevel.c
+++ b/arch/arm/boards/vexpress/lowlevel.c
@@ -11,12 +11,26 @@
 #include <asm/system_info.h>
 #include <linux/amba/sp804.h>
 
-void __naked barebox_arm_reset_vector(void)
+static inline void start_vexpress_common(void *internal_dt)
 {
+	void *fdt = internal_dt - get_runtime_offset();
+
 	arm_cpu_lowlevel_init();
 
 	if (amba_is_arm_sp804(IOMEM(0x10011000)))
-		barebox_arm_entry(0x60000000, SZ_512M, NULL);
+		barebox_arm_entry(0x60000000, SZ_512M, fdt);
 	else
-		barebox_arm_entry(0x80000000, SZ_512M, NULL);
+		barebox_arm_entry(0x80000000, SZ_512M, fdt);
+}
+
+extern char __dtb_vexpress_v2p_ca9_start[];
+ENTRY_FUNCTION(start_vexpress_ca9, r0, r1, r2)
+{
+	start_vexpress_common(__dtb_vexpress_v2p_ca9_start);
+}
+
+extern char __dtb_vexpress_v2p_ca15_start[];
+ENTRY_FUNCTION(start_vexpress_ca15, r0, r1, r2)
+{
+	start_vexpress_common(__dtb_vexpress_v2p_ca15_start);
 }
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index d8abe452b40b..c5e48092d344 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -87,6 +87,8 @@ pbl-dtb-$(CONFIG_MACH_TURRIS_OMNIA) += armada-385-turris-omnia-bb.dtb.o
 pbl-dtb-$(CONFIG_MACH_UDOO) += imx6q-udoo.dtb.o
 pbl-dtb-$(CONFIG_MACH_USI_TOPKICK) += kirkwood-topkick-bb.dtb.o
 pbl-dtb-$(CONFIG_MACH_VARISCITE_MX6) += imx6q-var-custom.dtb.o
+pbl-dtb-$(CONFIG_MACH_VEXPRESS) += vexpress-v2p-ca9.dtb.o
+pbl-dtb-$(CONFIG_MACH_VEXPRESS) += vexpress-v2p-ca15.dtb.o
 pbl-dtb-$(CONFIG_MACH_VSCOM_BALTOS) += am335x-baltos-minimal.dtb.o
 pbl-dtb-$(CONFIG_MACH_WARP7) += imx7s-warp.dtb.o
 pbl-dtb-$(CONFIG_MACH_VF610_TWR) += vf610-twr.dtb.o
diff --git a/arch/arm/dts/vexpress-v2p-ca15.dts b/arch/arm/dts/vexpress-v2p-ca15.dts
new file mode 100644
index 000000000000..211eaccb6238
--- /dev/null
+++ b/arch/arm/dts/vexpress-v2p-ca15.dts
@@ -0,0 +1,27 @@
+#include <arm/vexpress-v2p-ca15_a7.dts>
+
+/ {
+	barebox_environment {
+		compatible = "barebox,environment";
+		device-path = &barebox_env;
+	};
+
+	smb@8000000 {
+		motherboard {
+			flash@0,00000000 {
+				#address-cells = <1>;
+				#size-cells = <1>;
+
+				partition@0 {
+					label = "barebox";
+					reg = <0x0 0x80000>;
+				};
+
+				barebox_env: partition@80000 {
+					label = "barebox-environment";
+					reg = <0x80000 0x80000>;
+				};
+			};
+		};
+	};
+};
diff --git a/arch/arm/dts/vexpress-v2p-ca9.dts b/arch/arm/dts/vexpress-v2p-ca9.dts
new file mode 100644
index 000000000000..541840ae22dc
--- /dev/null
+++ b/arch/arm/dts/vexpress-v2p-ca9.dts
@@ -0,0 +1,27 @@
+#include <arm/vexpress-v2p-ca9.dts>
+
+/ {
+	barebox_environment {
+		compatible = "barebox,environment";
+		device-path = &barebox_env;
+	};
+
+	smb@4000000 {
+		motherboard {
+			flash@0,00000000 {
+				#address-cells = <1>;
+				#size-cells = <1>;
+
+				partition@0 {
+					label = "barebox";
+					reg = <0x0 0x80000>;
+				};
+
+				barebox_env: partition@80000 {
+					label = "barebox-environment";
+					reg = <0x80000 0x80000>;
+				};
+			};
+		};
+	};
+};
diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
index 1d5e293602f6..aaa535f073a5 100644
--- a/arch/arm/mach-vexpress/Kconfig
+++ b/arch/arm/mach-vexpress/Kconfig
@@ -10,6 +10,10 @@ choice
 config MACH_VEXPRESS
 	bool "ARM Vexpress"
 	select RELOCATABLE
+	select HAVE_PBL_MULTI_IMAGES
+	select OFTREE
+	select OFDEVICE
+	select COMMON_CLK_OF_PROVIDER
 
 endchoice
 
diff --git a/arch/arm/mach-vexpress/Makefile b/arch/arm/mach-vexpress/Makefile
index 74b4a0feb2e2..9a06e648a6f1 100644
--- a/arch/arm/mach-vexpress/Makefile
+++ b/arch/arm/mach-vexpress/Makefile
@@ -1,3 +1,2 @@
 obj-y += v2m.o
-obj-y += devices.o
 obj-y += reset.o
diff --git a/arch/arm/mach-vexpress/devices.c b/arch/arm/mach-vexpress/devices.c
deleted file mode 100644
index 5b530119245d..000000000000
--- a/arch/arm/mach-vexpress/devices.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2013 Jean-Christophe PLAGNIOL-VILLARD <plagnio@jcrosoft.com>
- *
- * GPLv2 only
- */
-
-#include <common.h>
-
-#include <linux/amba/bus.h>
-
-#include <asm/memory.h>
-
-#include <mach/devices.h>
-
-void vexpress_a9_legacy_add_ddram(u32 ddr0_size, u32 ddr1_size)
-{
-	arm_add_mem_device("ram0", 0x60000000, ddr0_size);
-
-	if (ddr1_size)
-		arm_add_mem_device("ram1", 0x80000000, ddr1_size);
-}
-
-void vexpress_a9_legacy_register_uart(unsigned id)
-{
-	resource_size_t start;
-
-	switch (id) {
-	case 0:
-		start = 0x10009000;
-		break;
-	case 1:
-		start = 0x1000a000;
-		break;
-	case 2:
-		start = 0x1000b000;
-		break;
-	case 3:
-		start = 0x1000c000;
-		break;
-	default:
-		return;
-	}
-	amba_apb_device_add(NULL, "uart-pl011", id, start, 4096, NULL, 0);
-}
-
-void vexpress_a9_legacy_register_mmc(struct mmci_platform_data *plat)
-{
-	amba_apb_device_add(NULL, "mmci-pl18x", DEVICE_ID_SINGLE, 0x10005000,
-	4096, plat, 0);
-}
-
-void vexpress_add_ddram(u32 size)
-{
-	arm_add_mem_device("ram1", 0x80000000, size);
-}
-
-void vexpress_register_uart(unsigned id)
-{
-	resource_size_t start;
-
-	switch (id) {
-	case 0:
-		start = 0x1c090000;
-		break;
-	case 1:
-		start = 0x1c0a0000;
-		break;
-	case 2:
-		start = 0x1c0b0000;
-		break;
-	case 3:
-		start = 0x1c0c0000;
-		break;
-	default:
-		return;
-	}
-	amba_apb_device_add(NULL, "uart-pl011", id, start, 4096, NULL, 0);
-}
-
-void vexpress_register_mmc(struct mmci_platform_data *plat)
-{
-	amba_apb_device_add(NULL, "mmci-pl18x", DEVICE_ID_SINGLE, 0x1c050000, 4096, plat, 0);
-}
diff --git a/arch/arm/mach-vexpress/include/mach/devices.h b/arch/arm/mach-vexpress/include/mach/devices.h
index 96d14005017e..bef8c8b94fb9 100644
--- a/arch/arm/mach-vexpress/include/mach/devices.h
+++ b/arch/arm/mach-vexpress/include/mach/devices.h
@@ -9,18 +9,9 @@
 
 #include <linux/amba/mmci.h>
 
-void vexpress_a9_legacy_add_ddram(u32 ddr0_size, u32 ddr1_size);
-void vexpress_add_ddram(u32 size);
-
-void vexpress_a9_legacy_register_uart(unsigned id);
-void vexpress_register_uart(unsigned id);
-
 void vexpress_a9_legacy_init(void);
 void vexpress_init(void);
 
-void vexpress_a9_legacy_register_mmc(struct mmci_platform_data *plat);
-void vexpress_register_mmc(struct mmci_platform_data *plat);
-
 extern void *v2m_wdt_base;
 extern void *v2m_sysreg_base;
 
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index 025bbb17fc6e..35352628482c 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -19,31 +19,6 @@
 
 void __iomem *v2m_sysreg_base;
 
-static const char *v2m_osc2_periphs[] = {
-	"mb:mmci",  "mmci-pl18x",	/* PL180 MMCI */
-	"mb:uart0", "uart-pl0110",	/* PL011 UART0 */
-	"mb:uart1", "uart-pl0111",	/* PL011 UART1 */
-	"mb:uart2", "uart-pl0112",	/* PL011 UART2 */
-	"mb:uart3", "uart-pl0113",	/* PL011 UART3 */
-};
-
-static void v2m_clk_init(void)
-{
-	struct clk *clk;
-	int i;
-
-	clk = clk_fixed("dummy_apb_pclk", 0);
-	clk_register_clkdev(clk, "apb_pclk", NULL);
-
-	clk = clk_fixed("mb:sp804_clk", 1000000);
-	clk_register_clkdev(clk, NULL, "sp804");
-
-	clk = clk_fixed("mb:osc2", 24000000);
-	for (i = 0; i < ARRAY_SIZE(v2m_osc2_periphs); i++)
-		clk_register_clkdev(clk, NULL, v2m_osc2_periphs[i]);
-
-}
-
 static void v2m_sysctl_init(void __iomem *base)
 {
 	u32 scctrl;
@@ -58,21 +33,11 @@ static void v2m_sysctl_init(void __iomem *base)
 	writel(scctrl, base + SCCTRL);
 }
 
-static void __init v2m_sp804_init(void __iomem *base)
-{
-	writel(0, base + TIMER_1_BASE + TIMER_CTRL);
-
-	amba_apb_device_add(NULL, "sp804", DEVICE_ID_SINGLE, (resource_size_t)base, 4096, NULL, 0);
-}
-
 void vexpress_a9_legacy_init(void)
 {
 	v2m_wdt_base = IOMEM(0x1000f000);
 	v2m_sysreg_base = IOMEM(0x10001000);
 	v2m_sysctl_init(IOMEM(0x10001000));
-	v2m_clk_init();
-
-	v2m_sp804_init(IOMEM(0x10011000));
 }
 
 void vexpress_init(void)
@@ -80,7 +45,4 @@ void vexpress_init(void)
 	v2m_wdt_base = IOMEM(0x1c0f0000);
 	v2m_sysreg_base = IOMEM(0x1c020000);
 	v2m_sysctl_init(IOMEM(0x1c020000));
-	v2m_clk_init();
-
-	v2m_sp804_init(IOMEM(0x1c110000));
 }
diff --git a/images/Makefile b/images/Makefile
index 705c8ad03eda..5c4d99ac5add 100644
--- a/images/Makefile
+++ b/images/Makefile
@@ -111,6 +111,7 @@ include $(srctree)/images/Makefile.omap3
 include $(srctree)/images/Makefile.rockchip
 include $(srctree)/images/Makefile.socfpga
 include $(srctree)/images/Makefile.tegra
+include $(srctree)/images/Makefile.vexpress
 include $(srctree)/images/Makefile.at91
 
 targets += $(image-y) pbl.lds barebox.x barebox.z
diff --git a/images/Makefile.vexpress b/images/Makefile.vexpress
new file mode 100644
index 000000000000..0f12dc12a534
--- /dev/null
+++ b/images/Makefile.vexpress
@@ -0,0 +1,11 @@
+#
+# barebox image generation Makefile for VExpress images
+#
+
+pblx-$(CONFIG_MACH_VEXPRESS) += start_vexpress_ca9
+FILE_barebox-vexpress-ca9.img = start_vexpress_ca9.pblx
+image-$(CONFIG_MACH_VEXPRESS) += barebox-vexpress-ca9.img
+
+pblx-$(CONFIG_MACH_VEXPRESS) += start_vexpress_ca15
+FILE_barebox-vexpress-ca15.img = start_vexpress_ca15.pblx
+image-$(CONFIG_MACH_VEXPRESS) += barebox-vexpress-ca15.img