View | Details | Raw Unified | Return to bug 254004
Collapse All | Expand All

(-)b/sysutils/u-boot-arty-z7/Makefile (+19 lines)
Added Link Here
1
MASTERDIR=	${.CURDIR}/../u-boot-master
2
3
MODEL=		arty-z7
4
BOARD_CONFIG=	xilinx_zynq_virt_defconfig
5
FAMILY=		zynq_7000
6
7
EXTRA_PATCHES=  ${.CURDIR}/files/
8
BUILD_DEPENDS=	gdd:sysutils/coreutils
9
10
UBOOT_PLIST=	boot.bin u-boot.img arch/arm/dts/zynq-artyz7.dtb
11
12
COMMENT=	ported by Christopher R. Bowman <my_initials>@ChrisBowman.com
13
14
DISABLE_VULNERABILITIES=yes
15
16
#BUILD_DEPENDS+= coreutils:sysutils/coreutils
17
18
19
.include "${MASTERDIR}/Makefile"
(-)b/sysutils/u-boot-arty-z7/files/patch-arch_arm_dts_Makefile (+10 lines)
Added Link Here
1
--- arch/arm/dts/Makefile.orig	2021-02-12 20:55:50.786305000 -0800
2
+++ arch/arm/dts/Makefile	2021-02-12 20:56:27.077969000 -0800
3
@@ -256,6 +256,7 @@
4
 
5
 dtb-$(CONFIG_ARCH_ZYNQ) += \
6
 	bitmain-antminer-s9.dtb \
7
+	zynq-artyz7.dtb \
8
 	zynq-cc108.dtb \
9
 	zynq-cse-nand.dtb \
10
 	zynq-cse-nor.dtb \
(-)b/sysutils/u-boot-arty-z7/files/patch-arch_arm_dts_zynq-artyz7.dts (+106 lines)
Added Link Here
1
--- arch/arm/dts/zynq-artyz7.dts.orig	2021-03-01 11:48:09.238162000 -0800
2
+++ arch/arm/dts/zynq-artyz7.dts	2021-03-01 12:12:25.626315000 -0800
3
@@ -0,0 +1,103 @@
4
+/*
5
+ * Digilent ARTY Z7 board DTS
6
+ *
7
+ *  Copyright (C) 2016 Digilent
8
+ *
9
+ * SPDX-License-Identifier:	GPL-2.0+
10
+ */
11
+/dts-v1/;
12
+#include "zynq-7000.dtsi"
13
+
14
+/ {
15
+	model = "Zynq ARTY Z7 Development Board";
16
+	compatible = "digilent,zynq-artyz7", "xlnx,zynq-7000";
17
+
18
+	aliases {
19
+		ethernet0 = &gem0;
20
+		serial0 = &uart0;
21
+		spi0 = &qspi;
22
+		mmc0 = &sdhci0;
23
+	};
24
+
25
+	memory@0 {
26
+		device_type = "memory";
27
+		reg = <0x0 0x20000000>;
28
+	};
29
+
30
+	chosen {
31
+		bootargs = "";
32
+		stdout-path = "serial0:115200n8";
33
+	};
34
+
35
+	usb_phy0: phy0 {
36
+		#phy-cells = <0>;
37
+		compatible = "usb-nop-xceiv";
38
+		reset-gpios = <&gpio0 46 1>;
39
+	};
40
+};
41
+
42
+&clkc {
43
+	ps-clk-frequency = <50000000>;
44
+	clock-frequency = <50000000>;
45
+};
46
+
47
+&global_timer {
48
+	clock-frequency = <50000000>;
49
+};
50
+
51
+&ttc0 {
52
+	clock-frequency = <50000000>;
53
+};
54
+
55
+&ttc1 {
56
+	clock-frequency = <50000000>;
57
+};
58
+
59
+&scutimer {
60
+	clock-frequency = <50000000>;
61
+};
62
+
63
+&cpu0 {
64
+	clock-frequency = <50000000>;
65
+};
66
+
67
+&cpu1 {
68
+	clock-frequency = <50000000>;
69
+};
70
+
71
+&gem0 {
72
+	compatible = "cdns,zynq-gem", "cdns,gem", "cadence,gem";
73
+
74
+	status = "okay";
75
+	phy-mode = "rgmii-id";
76
+	phy-handle = <&ethernet_phy>;
77
+
78
+	ethernet_phy: ethernet-phy@0 { /* rtl8211e-vl */
79
+		reg = <1>;
80
+		device_type = "ethernet-phy";
81
+	};
82
+};
83
+
84
+&qspi {
85
+	u-boot,dm-pre-reloc;
86
+	status = "okay";
87
+};
88
+
89
+&sdhci0 {
90
+	u-boot,dm-pre-reloc;
91
+	compatible = "arasan,sdhci-8.9a", "xlnx,zy7_sdhci";
92
+
93
+	status = "okay";
94
+        max-frequency = <0x2faf080>;
95
+};
96
+
97
+&uart0 {
98
+	u-boot,dm-pre-reloc;
99
+	status = "okay";
100
+};
101
+
102
+&usb0 {
103
+	status = "okay";
104
+	dr_mode = "host";
105
+	usb-phy = <&usb_phy0>;
106
+};
(-)b/sysutils/u-boot-arty-z7/files/patch-board_xilinx_zynq_zynq-artyz7_ps7__init__gpl.c (+925 lines)
Added Link Here
1
--- board/xilinx/zynq/zynq-artyz7/ps7_init_gpl.c.orig	2020-07-26 06:58:01 UTC
2
+++ board/xilinx/zynq/zynq-artyz7/ps7_init_gpl.c
3
@@ -0,0 +1,922 @@
4
+/******************************************************************************
5
+* (c) Copyright 2010-2014 Xilinx, Inc. All rights reserved.
6
+*
7
+*  This program is free software; you can redistribute it and/or modify
8
+*  it under the terms of the GNU General Public License as published by
9
+*  the Free Software Foundation; either version 2 of the License, or
10
+*  (at your option) any later version.
11
+*
12
+*  This program is distributed in the hope that it will be useful,
13
+*  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
+*  GNU General Public License for more details.
16
+*
17
+*  You should have received a copy of the GNU General Public License along
18
+*  with this program; if not, see <http://www.gnu.org/licenses/>
19
+*
20
+*
21
+******************************************************************************/
22
+/****************************************************************************/
23
+/**
24
+*
25
+* @file ps7_init_gpl.c
26
+*
27
+* This file is automatically generated
28
+*
29
+*****************************************************************************/
30
+
31
+#include <asm/arch/ps7_init_gpl.h>
32
+
33
+unsigned long ps7_pll_init_data_3_0[] = {
34
+    EMIT_MASKWRITE(0XF8000008, 0x0000FFFFU ,0x0000DF0DU),
35
+    EMIT_MASKWRITE(0XF8000110, 0x003FFFF0U ,0x001772C0U),
36
+    EMIT_MASKWRITE(0XF8000100, 0x0007F000U ,0x0001A000U),
37
+    EMIT_MASKWRITE(0XF8000100, 0x00000010U ,0x00000010U),
38
+    EMIT_MASKWRITE(0XF8000100, 0x00000001U ,0x00000001U),
39
+    EMIT_MASKWRITE(0XF8000100, 0x00000001U ,0x00000000U),
40
+    EMIT_MASKPOLL(0XF800010C, 0x00000001U),
41
+    EMIT_MASKWRITE(0XF8000100, 0x00000010U ,0x00000000U),
42
+    EMIT_MASKWRITE(0XF8000120, 0x1F003F30U ,0x1F000200U),
43
+    EMIT_MASKWRITE(0XF8000114, 0x003FFFF0U ,0x001DB2C0U),
44
+    EMIT_MASKWRITE(0XF8000104, 0x0007F000U ,0x00015000U),
45
+    EMIT_MASKWRITE(0XF8000104, 0x00000010U ,0x00000010U),
46
+    EMIT_MASKWRITE(0XF8000104, 0x00000001U ,0x00000001U),
47
+    EMIT_MASKWRITE(0XF8000104, 0x00000001U ,0x00000000U),
48
+    EMIT_MASKPOLL(0XF800010C, 0x00000002U),
49
+    EMIT_MASKWRITE(0XF8000104, 0x00000010U ,0x00000000U),
50
+    EMIT_MASKWRITE(0XF8000124, 0xFFF00003U ,0x0C200003U),
51
+    EMIT_MASKWRITE(0XF8000118, 0x003FFFF0U ,0x001F42C0U),
52
+    EMIT_MASKWRITE(0XF8000108, 0x0007F000U ,0x00014000U),
53
+    EMIT_MASKWRITE(0XF8000108, 0x00000010U ,0x00000010U),
54
+    EMIT_MASKWRITE(0XF8000108, 0x00000001U ,0x00000001U),
55
+    EMIT_MASKWRITE(0XF8000108, 0x00000001U ,0x00000000U),
56
+    EMIT_MASKPOLL(0XF800010C, 0x00000004U),
57
+    EMIT_MASKWRITE(0XF8000108, 0x00000010U ,0x00000000U),
58
+    EMIT_MASKWRITE(0XF8000004, 0x0000FFFFU ,0x0000767BU),
59
+    EMIT_EXIT(),
60
+
61
+};
62
+
63
+unsigned long ps7_clock_init_data_3_0[] = {
64
+    EMIT_MASKWRITE(0XF8000008, 0x0000FFFFU ,0x0000DF0DU),
65
+    EMIT_MASKWRITE(0XF8000128, 0x03F03F01U ,0x00203401U),
66
+    EMIT_MASKWRITE(0XF8000138, 0x00000011U ,0x00000001U),
67
+    EMIT_MASKWRITE(0XF8000140, 0x03F03F71U ,0x00100801U),
68
+    EMIT_MASKWRITE(0XF800014C, 0x00003F31U ,0x00000501U),
69
+    EMIT_MASKWRITE(0XF8000150, 0x00003F33U ,0x00001401U),
70
+    EMIT_MASKWRITE(0XF8000154, 0x00003F33U ,0x00000A01U),
71
+    EMIT_MASKWRITE(0XF8000158, 0x00003F33U ,0x00000601U),
72
+    EMIT_MASKWRITE(0XF8000168, 0x00003F31U ,0x00000501U),
73
+    EMIT_MASKWRITE(0XF8000170, 0x03F03F30U ,0x00200500U),
74
+    EMIT_MASKWRITE(0XF8000180, 0x03F03F30U ,0x00100700U),
75
+    EMIT_MASKWRITE(0XF80001C4, 0x00000001U ,0x00000001U),
76
+    EMIT_MASKWRITE(0XF800012C, 0x01FFCCCDU ,0x01DC444DU),
77
+    EMIT_MASKWRITE(0XF8000004, 0x0000FFFFU ,0x0000767BU),
78
+    EMIT_EXIT(),
79
+
80
+};
81
+
82
+unsigned long ps7_ddr_init_data_3_0[] = {
83
+    EMIT_MASKWRITE(0XF8006000, 0x0001FFFFU ,0x00000084U),
84
+    EMIT_MASKWRITE(0XF8006004, 0x0007FFFFU ,0x0000107FU),
85
+    EMIT_MASKWRITE(0XF8006008, 0x03FFFFFFU ,0x03C0780FU),
86
+    EMIT_MASKWRITE(0XF800600C, 0x03FFFFFFU ,0x02001001U),
87
+    EMIT_MASKWRITE(0XF8006010, 0x03FFFFFFU ,0x00014001U),
88
+    EMIT_MASKWRITE(0XF8006014, 0x001FFFFFU ,0x0004279AU),
89
+    EMIT_MASKWRITE(0XF8006018, 0xF7FFFFFFU ,0x44E354D2U),
90
+    EMIT_MASKWRITE(0XF800601C, 0xFFFFFFFFU ,0x720238E5U),
91
+    EMIT_MASKWRITE(0XF8006020, 0x7FDFFFFCU ,0x270872D0U),
92
+    EMIT_MASKWRITE(0XF8006024, 0x0FFFFFC3U ,0x00000000U),
93
+    EMIT_MASKWRITE(0XF8006028, 0x00003FFFU ,0x00002007U),
94
+    EMIT_MASKWRITE(0XF800602C, 0xFFFFFFFFU ,0x00000008U),
95
+    EMIT_MASKWRITE(0XF8006030, 0xFFFFFFFFU ,0x00040930U),
96
+    EMIT_MASKWRITE(0XF8006034, 0x13FF3FFFU ,0x00011674U),
97
+    EMIT_MASKWRITE(0XF8006038, 0x00000003U ,0x00000000U),
98
+    EMIT_MASKWRITE(0XF800603C, 0x000FFFFFU ,0x00000666U),
99
+    EMIT_MASKWRITE(0XF8006040, 0xFFFFFFFFU ,0xFFFF0000U),
100
+    EMIT_MASKWRITE(0XF8006044, 0x0FFFFFFFU ,0x0F555555U),
101
+    EMIT_MASKWRITE(0XF8006048, 0x0003F03FU ,0x0003C008U),
102
+    EMIT_MASKWRITE(0XF8006050, 0xFF0F8FFFU ,0x77010800U),
103
+    EMIT_MASKWRITE(0XF8006058, 0x00010000U ,0x00000000U),
104
+    EMIT_MASKWRITE(0XF800605C, 0x0000FFFFU ,0x00005003U),
105
+    EMIT_MASKWRITE(0XF8006060, 0x000017FFU ,0x0000003EU),
106
+    EMIT_MASKWRITE(0XF8006064, 0x00021FE0U ,0x00020000U),
107
+    EMIT_MASKWRITE(0XF8006068, 0x03FFFFFFU ,0x00284141U),
108
+    EMIT_MASKWRITE(0XF800606C, 0x0000FFFFU ,0x00001610U),
109
+    EMIT_MASKWRITE(0XF8006078, 0x03FFFFFFU ,0x00466111U),
110
+    EMIT_MASKWRITE(0XF800607C, 0x000FFFFFU ,0x00032222U),
111
+    EMIT_MASKWRITE(0XF80060A4, 0xFFFFFFFFU ,0x10200802U),
112
+    EMIT_MASKWRITE(0XF80060A8, 0x0FFFFFFFU ,0x0670C845U),
113
+    EMIT_MASKWRITE(0XF80060AC, 0x000001FFU ,0x000001FEU),
114
+    EMIT_MASKWRITE(0XF80060B0, 0x1FFFFFFFU ,0x1CFFFFFFU),
115
+    EMIT_MASKWRITE(0XF80060B4, 0x00000200U ,0x00000200U),
116
+    EMIT_MASKWRITE(0XF80060B8, 0x01FFFFFFU ,0x00200066U),
117
+    EMIT_MASKWRITE(0XF80060C4, 0x00000003U ,0x00000003U),
118
+    EMIT_MASKWRITE(0XF80060C4, 0x00000003U ,0x00000000U),
119
+    EMIT_MASKWRITE(0XF80060C8, 0x000000FFU ,0x00000000U),
120
+    EMIT_MASKWRITE(0XF80060DC, 0x00000001U ,0x00000000U),
121
+    EMIT_MASKWRITE(0XF80060F0, 0x0000FFFFU ,0x00000000U),
122
+    EMIT_MASKWRITE(0XF80060F4, 0x0000000FU ,0x00000008U),
123
+    EMIT_MASKWRITE(0XF8006114, 0x000000FFU ,0x00000000U),
124
+    EMIT_MASKWRITE(0XF8006118, 0x7FFFFFCFU ,0x40000001U),
125
+    EMIT_MASKWRITE(0XF800611C, 0x7FFFFFCFU ,0x40000001U),
126
+    EMIT_MASKWRITE(0XF8006120, 0x7FFFFFCFU ,0x40000000U),
127
+    EMIT_MASKWRITE(0XF8006124, 0x7FFFFFCFU ,0x40000000U),
128
+    EMIT_MASKWRITE(0XF800612C, 0x000FFFFFU ,0x00026C05U),
129
+    EMIT_MASKWRITE(0XF8006130, 0x000FFFFFU ,0x00026007U),
130
+    EMIT_MASKWRITE(0XF8006134, 0x000FFFFFU ,0x0001D800U),
131
+    EMIT_MASKWRITE(0XF8006138, 0x000FFFFFU ,0x0001E000U),
132
+    EMIT_MASKWRITE(0XF8006140, 0x000FFFFFU ,0x00000035U),
133
+    EMIT_MASKWRITE(0XF8006144, 0x000FFFFFU ,0x00000035U),
134
+    EMIT_MASKWRITE(0XF8006148, 0x000FFFFFU ,0x00000035U),
135
+    EMIT_MASKWRITE(0XF800614C, 0x000FFFFFU ,0x00000035U),
136
+    EMIT_MASKWRITE(0XF8006154, 0x000FFFFFU ,0x00000085U),
137
+    EMIT_MASKWRITE(0XF8006158, 0x000FFFFFU ,0x00000087U),
138
+    EMIT_MASKWRITE(0XF800615C, 0x000FFFFFU ,0x0000007FU),
139
+    EMIT_MASKWRITE(0XF8006160, 0x000FFFFFU ,0x0000007CU),
140
+    EMIT_MASKWRITE(0XF8006168, 0x001FFFFFU ,0x000000F0U),
141
+    EMIT_MASKWRITE(0XF800616C, 0x001FFFFFU ,0x000000EDU),
142
+    EMIT_MASKWRITE(0XF8006170, 0x001FFFFFU ,0x000000CBU),
143
+    EMIT_MASKWRITE(0XF8006174, 0x001FFFFFU ,0x000000CDU),
144
+    EMIT_MASKWRITE(0XF800617C, 0x000FFFFFU ,0x000000C5U),
145
+    EMIT_MASKWRITE(0XF8006180, 0x000FFFFFU ,0x000000C7U),
146
+    EMIT_MASKWRITE(0XF8006184, 0x000FFFFFU ,0x000000BFU),
147
+    EMIT_MASKWRITE(0XF8006188, 0x000FFFFFU ,0x000000BCU),
148
+    EMIT_MASKWRITE(0XF8006190, 0x6FFFFEFEU ,0x00040080U),
149
+    EMIT_MASKWRITE(0XF8006194, 0x000FFFFFU ,0x0001FC82U),
150
+    EMIT_MASKWRITE(0XF8006204, 0xFFFFFFFFU ,0x00000000U),
151
+    EMIT_MASKWRITE(0XF8006208, 0x000703FFU ,0x000003FFU),
152
+    EMIT_MASKWRITE(0XF800620C, 0x000703FFU ,0x000003FFU),
153
+    EMIT_MASKWRITE(0XF8006210, 0x000703FFU ,0x000003FFU),
154
+    EMIT_MASKWRITE(0XF8006214, 0x000703FFU ,0x000003FFU),
155
+    EMIT_MASKWRITE(0XF8006218, 0x000F03FFU ,0x000003FFU),
156
+    EMIT_MASKWRITE(0XF800621C, 0x000F03FFU ,0x000003FFU),
157
+    EMIT_MASKWRITE(0XF8006220, 0x000F03FFU ,0x000003FFU),
158
+    EMIT_MASKWRITE(0XF8006224, 0x000F03FFU ,0x000003FFU),
159
+    EMIT_MASKWRITE(0XF80062A8, 0x00000FF5U ,0x00000000U),
160
+    EMIT_MASKWRITE(0XF80062AC, 0xFFFFFFFFU ,0x00000000U),
161
+    EMIT_MASKWRITE(0XF80062B0, 0x003FFFFFU ,0x00005125U),
162
+    EMIT_MASKWRITE(0XF80062B4, 0x0003FFFFU ,0x000012A6U),
163
+    EMIT_MASKPOLL(0XF8000B74, 0x00002000U),
164
+    EMIT_MASKWRITE(0XF8006000, 0x0001FFFFU ,0x00000085U),
165
+    EMIT_MASKPOLL(0XF8006054, 0x00000007U),
166
+    EMIT_EXIT(),
167
+
168
+};
169
+
170
+unsigned long ps7_mio_init_data_3_0[] = {
171
+    EMIT_MASKWRITE(0XF8000008, 0x0000FFFFU ,0x0000DF0DU),
172
+    EMIT_MASKWRITE(0XF8000B40, 0x00000FFFU ,0x00000600U),
173
+    EMIT_MASKWRITE(0XF8000B44, 0x00000FFFU ,0x00000600U),
174
+    EMIT_MASKWRITE(0XF8000B48, 0x00000FFFU ,0x00000672U),
175
+    EMIT_MASKWRITE(0XF8000B4C, 0x00000FFFU ,0x00000800U),
176
+    EMIT_MASKWRITE(0XF8000B50, 0x00000FFFU ,0x00000674U),
177
+    EMIT_MASKWRITE(0XF8000B54, 0x00000FFFU ,0x00000800U),
178
+    EMIT_MASKWRITE(0XF8000B58, 0x00000FFFU ,0x00000600U),
179
+    EMIT_MASKWRITE(0XF8000B5C, 0xFFFFFFFFU ,0x0018C61CU),
180
+    EMIT_MASKWRITE(0XF8000B60, 0xFFFFFFFFU ,0x00F9861CU),
181
+    EMIT_MASKWRITE(0XF8000B64, 0xFFFFFFFFU ,0x00F9861CU),
182
+    EMIT_MASKWRITE(0XF8000B68, 0xFFFFFFFFU ,0x00F9861CU),
183
+    EMIT_MASKWRITE(0XF8000B6C, 0x00007FFFU ,0x00000220U),
184
+    EMIT_MASKWRITE(0XF8000B70, 0x00000001U ,0x00000001U),
185
+    EMIT_MASKWRITE(0XF8000B70, 0x00000021U ,0x00000020U),
186
+    EMIT_MASKWRITE(0XF8000B70, 0x07FEFFFFU ,0x00000823U),
187
+    EMIT_MASKWRITE(0XF8000700, 0x00003FFFU ,0x00001600U),
188
+    EMIT_MASKWRITE(0XF8000704, 0x00003FFFU ,0x00001602U),
189
+    EMIT_MASKWRITE(0XF8000708, 0x00003FFFU ,0x00000602U),
190
+    EMIT_MASKWRITE(0XF800070C, 0x00003FFFU ,0x00000602U),
191
+    EMIT_MASKWRITE(0XF8000710, 0x00003FFFU ,0x00000602U),
192
+    EMIT_MASKWRITE(0XF8000714, 0x00003FFFU ,0x00000602U),
193
+    EMIT_MASKWRITE(0XF8000718, 0x00003FFFU ,0x00000602U),
194
+    EMIT_MASKWRITE(0XF800071C, 0x00003FFFU ,0x00000600U),
195
+    EMIT_MASKWRITE(0XF8000720, 0x00003FFFU ,0x00000602U),
196
+    EMIT_MASKWRITE(0XF8000724, 0x00003FFFU ,0x00001600U),
197
+    EMIT_MASKWRITE(0XF8000728, 0x00003FFFU ,0x00001600U),
198
+    EMIT_MASKWRITE(0XF800072C, 0x00003FFFU ,0x00001600U),
199
+    EMIT_MASKWRITE(0XF8000730, 0x00003FFFU ,0x00001600U),
200
+    EMIT_MASKWRITE(0XF8000734, 0x00003FFFU ,0x00001600U),
201
+    EMIT_MASKWRITE(0XF8000738, 0x00003FFFU ,0x000016E1U),
202
+    EMIT_MASKWRITE(0XF800073C, 0x00003FFFU ,0x000016E0U),
203
+    EMIT_MASKWRITE(0XF8000740, 0x00003FFFU ,0x00001202U),
204
+    EMIT_MASKWRITE(0XF8000744, 0x00003FFFU ,0x00001202U),
205
+    EMIT_MASKWRITE(0XF8000748, 0x00003FFFU ,0x00001202U),
206
+    EMIT_MASKWRITE(0XF800074C, 0x00003FFFU ,0x00001202U),
207
+    EMIT_MASKWRITE(0XF8000750, 0x00003FFFU ,0x00001202U),
208
+    EMIT_MASKWRITE(0XF8000754, 0x00003FFFU ,0x00001202U),
209
+    EMIT_MASKWRITE(0XF8000758, 0x00003FFFU ,0x00001203U),
210
+    EMIT_MASKWRITE(0XF800075C, 0x00003FFFU ,0x00001203U),
211
+    EMIT_MASKWRITE(0XF8000760, 0x00003FFFU ,0x00001203U),
212
+    EMIT_MASKWRITE(0XF8000764, 0x00003FFFU ,0x00001203U),
213
+    EMIT_MASKWRITE(0XF8000768, 0x00003FFFU ,0x00001203U),
214
+    EMIT_MASKWRITE(0XF800076C, 0x00003FFFU ,0x00001203U),
215
+    EMIT_MASKWRITE(0XF8000770, 0x00003FFFU ,0x00001204U),
216
+    EMIT_MASKWRITE(0XF8000774, 0x00003FFFU ,0x00001205U),
217
+    EMIT_MASKWRITE(0XF8000778, 0x00003FFFU ,0x00001204U),
218
+    EMIT_MASKWRITE(0XF800077C, 0x00003FFFU ,0x00001205U),
219
+    EMIT_MASKWRITE(0XF8000780, 0x00003FFFU ,0x00001204U),
220
+    EMIT_MASKWRITE(0XF8000784, 0x00003FFFU ,0x00001204U),
221
+    EMIT_MASKWRITE(0XF8000788, 0x00003FFFU ,0x00001204U),
222
+    EMIT_MASKWRITE(0XF800078C, 0x00003FFFU ,0x00001204U),
223
+    EMIT_MASKWRITE(0XF8000790, 0x00003FFFU ,0x00001205U),
224
+    EMIT_MASKWRITE(0XF8000794, 0x00003FFFU ,0x00001204U),
225
+    EMIT_MASKWRITE(0XF8000798, 0x00003FFFU ,0x00001204U),
226
+    EMIT_MASKWRITE(0XF800079C, 0x00003FFFU ,0x00001204U),
227
+    EMIT_MASKWRITE(0XF80007A0, 0x00003FFFU ,0x00001280U),
228
+    EMIT_MASKWRITE(0XF80007A4, 0x00003FFFU ,0x00001280U),
229
+    EMIT_MASKWRITE(0XF80007A8, 0x00003FFFU ,0x00001280U),
230
+    EMIT_MASKWRITE(0XF80007AC, 0x00003FFFU ,0x00001280U),
231
+    EMIT_MASKWRITE(0XF80007B0, 0x00003FFFU ,0x00001280U),
232
+    EMIT_MASKWRITE(0XF80007B4, 0x00003FFFU ,0x00001280U),
233
+    EMIT_MASKWRITE(0XF80007B8, 0x00003FFFU ,0x00001200U),
234
+    EMIT_MASKWRITE(0XF80007BC, 0x00003F01U ,0x00001201U),
235
+    EMIT_MASKWRITE(0XF80007C0, 0x00003FFFU ,0x00001200U),
236
+    EMIT_MASKWRITE(0XF80007C4, 0x00003FFFU ,0x00001200U),
237
+    EMIT_MASKWRITE(0XF80007C8, 0x00003FFFU ,0x00001200U),
238
+    EMIT_MASKWRITE(0XF80007CC, 0x00003FFFU ,0x00001200U),
239
+    EMIT_MASKWRITE(0XF80007D0, 0x00003FFFU ,0x00001280U),
240
+    EMIT_MASKWRITE(0XF80007D4, 0x00003FFFU ,0x00001280U),
241
+    EMIT_MASKWRITE(0XF8000830, 0x003F003FU ,0x002F0037U),
242
+    EMIT_MASKWRITE(0XF8000004, 0x0000FFFFU ,0x0000767BU),
243
+    EMIT_EXIT(),
244
+
245
+};
246
+
247
+unsigned long ps7_peripherals_init_data_3_0[] = {
248
+    EMIT_MASKWRITE(0XF8000008, 0x0000FFFFU ,0x0000DF0DU),
249
+    EMIT_MASKWRITE(0XF8000B48, 0x00000180U ,0x00000180U),
250
+    EMIT_MASKWRITE(0XF8000B4C, 0x00000180U ,0x00000000U),
251
+    EMIT_MASKWRITE(0XF8000B50, 0x00000180U ,0x00000180U),
252
+    EMIT_MASKWRITE(0XF8000B54, 0x00000180U ,0x00000000U),
253
+    EMIT_MASKWRITE(0XF8000004, 0x0000FFFFU ,0x0000767BU),
254
+    EMIT_MASKWRITE(0XE0000034, 0x000000FFU ,0x00000006U),
255
+    EMIT_MASKWRITE(0XE0000018, 0x0000FFFFU ,0x0000007CU),
256
+    EMIT_MASKWRITE(0XE0000000, 0x000001FFU ,0x00000017U),
257
+    EMIT_MASKWRITE(0XE0000004, 0x000003FFU ,0x00000020U),
258
+    EMIT_MASKWRITE(0XE000D000, 0x00080000U ,0x00080000U),
259
+    EMIT_MASKWRITE(0XF8007000, 0x20000000U ,0x00000000U),
260
+    EMIT_MASKWRITE(0XE000A244, 0x003FFFFFU ,0x00004000U),
261
+    EMIT_MASKWRITE(0XE000A008, 0xFFFFFFFFU ,0xBFFF4000U),
262
+    EMIT_MASKWRITE(0XE000A248, 0x003FFFFFU ,0x00004000U),
263
+    EMIT_MASKWRITE(0XE000A008, 0xFFFFFFFFU ,0xBFFF0000U),
264
+    EMIT_MASKDELAY(0XF8F00200, 1),
265
+    EMIT_MASKWRITE(0XE000A008, 0xFFFFFFFFU ,0xBFFF4000U),
266
+    EMIT_MASKDELAY(0XF8F00200, 1),
267
+    EMIT_MASKWRITE(0XE000A204, 0xFFFFFFFFU ,0x00000200U),
268
+    EMIT_MASKWRITE(0XE000A000, 0xFFFFFFFFU ,0xFDFF0200U),
269
+    EMIT_MASKWRITE(0XE000A208, 0xFFFFFFFFU ,0x00000200U),
270
+    EMIT_MASKWRITE(0XE000A000, 0xFFFFFFFFU ,0xFDFF0000U),
271
+    EMIT_MASKDELAY(0XF8F00200, 1),
272
+    EMIT_MASKWRITE(0XE000A000, 0xFFFFFFFFU ,0xFDFF0200U),
273
+    EMIT_MASKDELAY(0XF8F00200, 1),
274
+    EMIT_MASKDELAY(0XF8F00200, 1),
275
+    EMIT_MASKDELAY(0XF8F00200, 1),
276
+    EMIT_EXIT(),
277
+
278
+};
279
+
280
+unsigned long ps7_post_config_3_0[] = {
281
+    EMIT_MASKWRITE(0XF8000008, 0x0000FFFFU ,0x0000DF0DU),
282
+    EMIT_MASKWRITE(0XF8000900, 0x0000000FU ,0x0000000FU),
283
+    EMIT_MASKWRITE(0XF8000240, 0xFFFFFFFFU ,0x00000000U),
284
+    EMIT_MASKWRITE(0XF8000004, 0x0000FFFFU ,0x0000767BU),
285
+    EMIT_EXIT(),
286
+
287
+};
288
+
289
+unsigned long ps7_debug_3_0[] = {
290
+    EMIT_MASKWRITE(0XF8898FB0, 0xFFFFFFFFU ,0xC5ACCE55U),
291
+    EMIT_MASKWRITE(0XF8899FB0, 0xFFFFFFFFU ,0xC5ACCE55U),
292
+    EMIT_MASKWRITE(0XF8809FB0, 0xFFFFFFFFU ,0xC5ACCE55U),
293
+    EMIT_EXIT(),
294
+
295
+};
296
+
297
+unsigned long ps7_pll_init_data_2_0[] = {
298
+    EMIT_MASKWRITE(0XF8000008, 0x0000FFFFU ,0x0000DF0DU),
299
+    EMIT_MASKWRITE(0XF8000110, 0x003FFFF0U ,0x001772C0U),
300
+    EMIT_MASKWRITE(0XF8000100, 0x0007F000U ,0x0001A000U),
301
+    EMIT_MASKWRITE(0XF8000100, 0x00000010U ,0x00000010U),
302
+    EMIT_MASKWRITE(0XF8000100, 0x00000001U ,0x00000001U),
303
+    EMIT_MASKWRITE(0XF8000100, 0x00000001U ,0x00000000U),
304
+    EMIT_MASKPOLL(0XF800010C, 0x00000001U),
305
+    EMIT_MASKWRITE(0XF8000100, 0x00000010U ,0x00000000U),
306
+    EMIT_MASKWRITE(0XF8000120, 0x1F003F30U ,0x1F000200U),
307
+    EMIT_MASKWRITE(0XF8000114, 0x003FFFF0U ,0x001DB2C0U),
308
+    EMIT_MASKWRITE(0XF8000104, 0x0007F000U ,0x00015000U),
309
+    EMIT_MASKWRITE(0XF8000104, 0x00000010U ,0x00000010U),
310
+    EMIT_MASKWRITE(0XF8000104, 0x00000001U ,0x00000001U),
311
+    EMIT_MASKWRITE(0XF8000104, 0x00000001U ,0x00000000U),
312
+    EMIT_MASKPOLL(0XF800010C, 0x00000002U),
313
+    EMIT_MASKWRITE(0XF8000104, 0x00000010U ,0x00000000U),
314
+    EMIT_MASKWRITE(0XF8000124, 0xFFF00003U ,0x0C200003U),
315
+    EMIT_MASKWRITE(0XF8000118, 0x003FFFF0U ,0x001F42C0U),
316
+    EMIT_MASKWRITE(0XF8000108, 0x0007F000U ,0x00014000U),
317
+    EMIT_MASKWRITE(0XF8000108, 0x00000010U ,0x00000010U),
318
+    EMIT_MASKWRITE(0XF8000108, 0x00000001U ,0x00000001U),
319
+    EMIT_MASKWRITE(0XF8000108, 0x00000001U ,0x00000000U),
320
+    EMIT_MASKPOLL(0XF800010C, 0x00000004U),
321
+    EMIT_MASKWRITE(0XF8000108, 0x00000010U ,0x00000000U),
322
+    EMIT_MASKWRITE(0XF8000004, 0x0000FFFFU ,0x0000767BU),
323
+    EMIT_EXIT(),
324
+
325
+};
326
+
327
+unsigned long ps7_clock_init_data_2_0[] = {
328
+    EMIT_MASKWRITE(0XF8000008, 0x0000FFFFU ,0x0000DF0DU),
329
+    EMIT_MASKWRITE(0XF8000128, 0x03F03F01U ,0x00203401U),
330
+    EMIT_MASKWRITE(0XF8000138, 0x00000011U ,0x00000001U),
331
+    EMIT_MASKWRITE(0XF8000140, 0x03F03F71U ,0x00100801U),
332
+    EMIT_MASKWRITE(0XF800014C, 0x00003F31U ,0x00000501U),
333
+    EMIT_MASKWRITE(0XF8000150, 0x00003F33U ,0x00001401U),
334
+    EMIT_MASKWRITE(0XF8000154, 0x00003F33U ,0x00000A01U),
335
+    EMIT_MASKWRITE(0XF8000158, 0x00003F33U ,0x00000601U),
336
+    EMIT_MASKWRITE(0XF8000168, 0x00003F31U ,0x00000501U),
337
+    EMIT_MASKWRITE(0XF8000170, 0x03F03F30U ,0x00200500U),
338
+    EMIT_MASKWRITE(0XF8000180, 0x03F03F30U ,0x00100700U),
339
+    EMIT_MASKWRITE(0XF80001C4, 0x00000001U ,0x00000001U),
340
+    EMIT_MASKWRITE(0XF800012C, 0x01FFCCCDU ,0x01DC444DU),
341
+    EMIT_MASKWRITE(0XF8000004, 0x0000FFFFU ,0x0000767BU),
342
+    EMIT_EXIT(),
343
+
344
+};
345
+
346
+unsigned long ps7_ddr_init_data_2_0[] = {
347
+    EMIT_MASKWRITE(0XF8006000, 0x0001FFFFU ,0x00000084U),
348
+    EMIT_MASKWRITE(0XF8006004, 0x1FFFFFFFU ,0x0008107FU),
349
+    EMIT_MASKWRITE(0XF8006008, 0x03FFFFFFU ,0x03C0780FU),
350
+    EMIT_MASKWRITE(0XF800600C, 0x03FFFFFFU ,0x02001001U),
351
+    EMIT_MASKWRITE(0XF8006010, 0x03FFFFFFU ,0x00014001U),
352
+    EMIT_MASKWRITE(0XF8006014, 0x001FFFFFU ,0x0004279AU),
353
+    EMIT_MASKWRITE(0XF8006018, 0xF7FFFFFFU ,0x44E354D2U),
354
+    EMIT_MASKWRITE(0XF800601C, 0xFFFFFFFFU ,0x720238E5U),
355
+    EMIT_MASKWRITE(0XF8006020, 0xFFFFFFFCU ,0x272872D0U),
356
+    EMIT_MASKWRITE(0XF8006024, 0x0FFFFFFFU ,0x0000003CU),
357
+    EMIT_MASKWRITE(0XF8006028, 0x00003FFFU ,0x00002007U),
358
+    EMIT_MASKWRITE(0XF800602C, 0xFFFFFFFFU ,0x00000008U),
359
+    EMIT_MASKWRITE(0XF8006030, 0xFFFFFFFFU ,0x00040930U),
360
+    EMIT_MASKWRITE(0XF8006034, 0x13FF3FFFU ,0x00011674U),
361
+    EMIT_MASKWRITE(0XF8006038, 0x00001FC3U ,0x00000000U),
362
+    EMIT_MASKWRITE(0XF800603C, 0x000FFFFFU ,0x00000666U),
363
+    EMIT_MASKWRITE(0XF8006040, 0xFFFFFFFFU ,0xFFFF0000U),
364
+    EMIT_MASKWRITE(0XF8006044, 0x0FFFFFFFU ,0x0F555555U),
365
+    EMIT_MASKWRITE(0XF8006048, 0x3FFFFFFFU ,0x0003C248U),
366
+    EMIT_MASKWRITE(0XF8006050, 0xFF0F8FFFU ,0x77010800U),
367
+    EMIT_MASKWRITE(0XF8006058, 0x0001FFFFU ,0x00000101U),
368
+    EMIT_MASKWRITE(0XF800605C, 0x0000FFFFU ,0x00005003U),
369
+    EMIT_MASKWRITE(0XF8006060, 0x000017FFU ,0x0000003EU),
370
+    EMIT_MASKWRITE(0XF8006064, 0x00021FE0U ,0x00020000U),
371
+    EMIT_MASKWRITE(0XF8006068, 0x03FFFFFFU ,0x00284141U),
372
+    EMIT_MASKWRITE(0XF800606C, 0x0000FFFFU ,0x00001610U),
373
+    EMIT_MASKWRITE(0XF8006078, 0x03FFFFFFU ,0x00466111U),
374
+    EMIT_MASKWRITE(0XF800607C, 0x000FFFFFU ,0x00032222U),
375
+    EMIT_MASKWRITE(0XF80060A0, 0x00FFFFFFU ,0x00008000U),
376
+    EMIT_MASKWRITE(0XF80060A4, 0xFFFFFFFFU ,0x10200802U),
377
+    EMIT_MASKWRITE(0XF80060A8, 0x0FFFFFFFU ,0x0670C845U),
378
+    EMIT_MASKWRITE(0XF80060AC, 0x000001FFU ,0x000001FEU),
379
+    EMIT_MASKWRITE(0XF80060B0, 0x1FFFFFFFU ,0x1CFFFFFFU),
380
+    EMIT_MASKWRITE(0XF80060B4, 0x000007FFU ,0x00000200U),
381
+    EMIT_MASKWRITE(0XF80060B8, 0x01FFFFFFU ,0x00200066U),
382
+    EMIT_MASKWRITE(0XF80060C4, 0x00000003U ,0x00000003U),
383
+    EMIT_MASKWRITE(0XF80060C4, 0x00000003U ,0x00000000U),
384
+    EMIT_MASKWRITE(0XF80060C8, 0x000000FFU ,0x00000000U),
385
+    EMIT_MASKWRITE(0XF80060DC, 0x00000001U ,0x00000000U),
386
+    EMIT_MASKWRITE(0XF80060F0, 0x0000FFFFU ,0x00000000U),
387
+    EMIT_MASKWRITE(0XF80060F4, 0x0000000FU ,0x00000008U),
388
+    EMIT_MASKWRITE(0XF8006114, 0x000000FFU ,0x00000000U),
389
+    EMIT_MASKWRITE(0XF8006118, 0x7FFFFFFFU ,0x40000001U),
390
+    EMIT_MASKWRITE(0XF800611C, 0x7FFFFFFFU ,0x40000001U),
391
+    EMIT_MASKWRITE(0XF8006120, 0x7FFFFFFFU ,0x40000000U),
392
+    EMIT_MASKWRITE(0XF8006124, 0x7FFFFFFFU ,0x40000000U),
393
+    EMIT_MASKWRITE(0XF800612C, 0x000FFFFFU ,0x00026C05U),
394
+    EMIT_MASKWRITE(0XF8006130, 0x000FFFFFU ,0x00026007U),
395
+    EMIT_MASKWRITE(0XF8006134, 0x000FFFFFU ,0x0001D800U),
396
+    EMIT_MASKWRITE(0XF8006138, 0x000FFFFFU ,0x0001E000U),
397
+    EMIT_MASKWRITE(0XF8006140, 0x000FFFFFU ,0x00000035U),
398
+    EMIT_MASKWRITE(0XF8006144, 0x000FFFFFU ,0x00000035U),
399
+    EMIT_MASKWRITE(0XF8006148, 0x000FFFFFU ,0x00000035U),
400
+    EMIT_MASKWRITE(0XF800614C, 0x000FFFFFU ,0x00000035U),
401
+    EMIT_MASKWRITE(0XF8006154, 0x000FFFFFU ,0x00000085U),
402
+    EMIT_MASKWRITE(0XF8006158, 0x000FFFFFU ,0x00000087U),
403
+    EMIT_MASKWRITE(0XF800615C, 0x000FFFFFU ,0x0000007FU),
404
+    EMIT_MASKWRITE(0XF8006160, 0x000FFFFFU ,0x0000007CU),
405
+    EMIT_MASKWRITE(0XF8006168, 0x001FFFFFU ,0x000000F0U),
406
+    EMIT_MASKWRITE(0XF800616C, 0x001FFFFFU ,0x000000EDU),
407
+    EMIT_MASKWRITE(0XF8006170, 0x001FFFFFU ,0x000000CBU),
408
+    EMIT_MASKWRITE(0XF8006174, 0x001FFFFFU ,0x000000CDU),
409
+    EMIT_MASKWRITE(0XF800617C, 0x000FFFFFU ,0x000000C5U),
410
+    EMIT_MASKWRITE(0XF8006180, 0x000FFFFFU ,0x000000C7U),
411
+    EMIT_MASKWRITE(0XF8006184, 0x000FFFFFU ,0x000000BFU),
412
+    EMIT_MASKWRITE(0XF8006188, 0x000FFFFFU ,0x000000BCU),
413
+    EMIT_MASKWRITE(0XF8006190, 0xFFFFFFFFU ,0x10040080U),
414
+    EMIT_MASKWRITE(0XF8006194, 0x000FFFFFU ,0x0001FC82U),
415
+    EMIT_MASKWRITE(0XF8006204, 0xFFFFFFFFU ,0x00000000U),
416
+    EMIT_MASKWRITE(0XF8006208, 0x000F03FFU ,0x000803FFU),
417
+    EMIT_MASKWRITE(0XF800620C, 0x000F03FFU ,0x000803FFU),
418
+    EMIT_MASKWRITE(0XF8006210, 0x000F03FFU ,0x000803FFU),
419
+    EMIT_MASKWRITE(0XF8006214, 0x000F03FFU ,0x000803FFU),
420
+    EMIT_MASKWRITE(0XF8006218, 0x000F03FFU ,0x000003FFU),
421
+    EMIT_MASKWRITE(0XF800621C, 0x000F03FFU ,0x000003FFU),
422
+    EMIT_MASKWRITE(0XF8006220, 0x000F03FFU ,0x000003FFU),
423
+    EMIT_MASKWRITE(0XF8006224, 0x000F03FFU ,0x000003FFU),
424
+    EMIT_MASKWRITE(0XF80062A8, 0x00000FF7U ,0x00000000U),
425
+    EMIT_MASKWRITE(0XF80062AC, 0xFFFFFFFFU ,0x00000000U),
426
+    EMIT_MASKWRITE(0XF80062B0, 0x003FFFFFU ,0x00005125U),
427
+    EMIT_MASKWRITE(0XF80062B4, 0x0003FFFFU ,0x000012A6U),
428
+    EMIT_MASKPOLL(0XF8000B74, 0x00002000U),
429
+    EMIT_MASKWRITE(0XF8006000, 0x0001FFFFU ,0x00000085U),
430
+    EMIT_MASKPOLL(0XF8006054, 0x00000007U),
431
+    EMIT_EXIT(),
432
+
433
+};
434
+
435
+unsigned long ps7_mio_init_data_2_0[] = {
436
+    EMIT_MASKWRITE(0XF8000008, 0x0000FFFFU ,0x0000DF0DU),
437
+    EMIT_MASKWRITE(0XF8000B40, 0x00000FFFU ,0x00000600U),
438
+    EMIT_MASKWRITE(0XF8000B44, 0x00000FFFU ,0x00000600U),
439
+    EMIT_MASKWRITE(0XF8000B48, 0x00000FFFU ,0x00000672U),
440
+    EMIT_MASKWRITE(0XF8000B4C, 0x00000FFFU ,0x00000800U),
441
+    EMIT_MASKWRITE(0XF8000B50, 0x00000FFFU ,0x00000674U),
442
+    EMIT_MASKWRITE(0XF8000B54, 0x00000FFFU ,0x00000800U),
443
+    EMIT_MASKWRITE(0XF8000B58, 0x00000FFFU ,0x00000600U),
444
+    EMIT_MASKWRITE(0XF8000B5C, 0xFFFFFFFFU ,0x0018C61CU),
445
+    EMIT_MASKWRITE(0XF8000B60, 0xFFFFFFFFU ,0x00F9861CU),
446
+    EMIT_MASKWRITE(0XF8000B64, 0xFFFFFFFFU ,0x00F9861CU),
447
+    EMIT_MASKWRITE(0XF8000B68, 0xFFFFFFFFU ,0x00F9861CU),
448
+    EMIT_MASKWRITE(0XF8000B6C, 0x00007FFFU ,0x00000220U),
449
+    EMIT_MASKWRITE(0XF8000B70, 0x00000021U ,0x00000021U),
450
+    EMIT_MASKWRITE(0XF8000B70, 0x00000021U ,0x00000020U),
451
+    EMIT_MASKWRITE(0XF8000B70, 0x07FFFFFFU ,0x00000823U),
452
+    EMIT_MASKWRITE(0XF8000700, 0x00003FFFU ,0x00001600U),
453
+    EMIT_MASKWRITE(0XF8000704, 0x00003FFFU ,0x00001602U),
454
+    EMIT_MASKWRITE(0XF8000708, 0x00003FFFU ,0x00000602U),
455
+    EMIT_MASKWRITE(0XF800070C, 0x00003FFFU ,0x00000602U),
456
+    EMIT_MASKWRITE(0XF8000710, 0x00003FFFU ,0x00000602U),
457
+    EMIT_MASKWRITE(0XF8000714, 0x00003FFFU ,0x00000602U),
458
+    EMIT_MASKWRITE(0XF8000718, 0x00003FFFU ,0x00000602U),
459
+    EMIT_MASKWRITE(0XF800071C, 0x00003FFFU ,0x00000600U),
460
+    EMIT_MASKWRITE(0XF8000720, 0x00003FFFU ,0x00000602U),
461
+    EMIT_MASKWRITE(0XF8000724, 0x00003FFFU ,0x00001600U),
462
+    EMIT_MASKWRITE(0XF8000728, 0x00003FFFU ,0x00001600U),
463
+    EMIT_MASKWRITE(0XF800072C, 0x00003FFFU ,0x00001600U),
464
+    EMIT_MASKWRITE(0XF8000730, 0x00003FFFU ,0x00001600U),
465
+    EMIT_MASKWRITE(0XF8000734, 0x00003FFFU ,0x00001600U),
466
+    EMIT_MASKWRITE(0XF8000738, 0x00003FFFU ,0x000016E1U),
467
+    EMIT_MASKWRITE(0XF800073C, 0x00003FFFU ,0x000016E0U),
468
+    EMIT_MASKWRITE(0XF8000740, 0x00003FFFU ,0x00001202U),
469
+    EMIT_MASKWRITE(0XF8000744, 0x00003FFFU ,0x00001202U),
470
+    EMIT_MASKWRITE(0XF8000748, 0x00003FFFU ,0x00001202U),
471
+    EMIT_MASKWRITE(0XF800074C, 0x00003FFFU ,0x00001202U),
472
+    EMIT_MASKWRITE(0XF8000750, 0x00003FFFU ,0x00001202U),
473
+    EMIT_MASKWRITE(0XF8000754, 0x00003FFFU ,0x00001202U),
474
+    EMIT_MASKWRITE(0XF8000758, 0x00003FFFU ,0x00001203U),
475
+    EMIT_MASKWRITE(0XF800075C, 0x00003FFFU ,0x00001203U),
476
+    EMIT_MASKWRITE(0XF8000760, 0x00003FFFU ,0x00001203U),
477
+    EMIT_MASKWRITE(0XF8000764, 0x00003FFFU ,0x00001203U),
478
+    EMIT_MASKWRITE(0XF8000768, 0x00003FFFU ,0x00001203U),
479
+    EMIT_MASKWRITE(0XF800076C, 0x00003FFFU ,0x00001203U),
480
+    EMIT_MASKWRITE(0XF8000770, 0x00003FFFU ,0x00001204U),
481
+    EMIT_MASKWRITE(0XF8000774, 0x00003FFFU ,0x00001205U),
482
+    EMIT_MASKWRITE(0XF8000778, 0x00003FFFU ,0x00001204U),
483
+    EMIT_MASKWRITE(0XF800077C, 0x00003FFFU ,0x00001205U),
484
+    EMIT_MASKWRITE(0XF8000780, 0x00003FFFU ,0x00001204U),
485
+    EMIT_MASKWRITE(0XF8000784, 0x00003FFFU ,0x00001204U),
486
+    EMIT_MASKWRITE(0XF8000788, 0x00003FFFU ,0x00001204U),
487
+    EMIT_MASKWRITE(0XF800078C, 0x00003FFFU ,0x00001204U),
488
+    EMIT_MASKWRITE(0XF8000790, 0x00003FFFU ,0x00001205U),
489
+    EMIT_MASKWRITE(0XF8000794, 0x00003FFFU ,0x00001204U),
490
+    EMIT_MASKWRITE(0XF8000798, 0x00003FFFU ,0x00001204U),
491
+    EMIT_MASKWRITE(0XF800079C, 0x00003FFFU ,0x00001204U),
492
+    EMIT_MASKWRITE(0XF80007A0, 0x00003FFFU ,0x00001280U),
493
+    EMIT_MASKWRITE(0XF80007A4, 0x00003FFFU ,0x00001280U),
494
+    EMIT_MASKWRITE(0XF80007A8, 0x00003FFFU ,0x00001280U),
495
+    EMIT_MASKWRITE(0XF80007AC, 0x00003FFFU ,0x00001280U),
496
+    EMIT_MASKWRITE(0XF80007B0, 0x00003FFFU ,0x00001280U),
497
+    EMIT_MASKWRITE(0XF80007B4, 0x00003FFFU ,0x00001280U),
498
+    EMIT_MASKWRITE(0XF80007B8, 0x00003FFFU ,0x00001200U),
499
+    EMIT_MASKWRITE(0XF80007BC, 0x00003F01U ,0x00001201U),
500
+    EMIT_MASKWRITE(0XF80007C0, 0x00003FFFU ,0x00001200U),
501
+    EMIT_MASKWRITE(0XF80007C4, 0x00003FFFU ,0x00001200U),
502
+    EMIT_MASKWRITE(0XF80007C8, 0x00003FFFU ,0x00001200U),
503
+    EMIT_MASKWRITE(0XF80007CC, 0x00003FFFU ,0x00001200U),
504
+    EMIT_MASKWRITE(0XF80007D0, 0x00003FFFU ,0x00001280U),
505
+    EMIT_MASKWRITE(0XF80007D4, 0x00003FFFU ,0x00001280U),
506
+    EMIT_MASKWRITE(0XF8000830, 0x003F003FU ,0x002F0037U),
507
+    EMIT_MASKWRITE(0XF8000004, 0x0000FFFFU ,0x0000767BU),
508
+    EMIT_EXIT(),
509
+
510
+};
511
+
512
+unsigned long ps7_peripherals_init_data_2_0[] = {
513
+    EMIT_MASKWRITE(0XF8000008, 0x0000FFFFU ,0x0000DF0DU),
514
+    EMIT_MASKWRITE(0XF8000B48, 0x00000180U ,0x00000180U),
515
+    EMIT_MASKWRITE(0XF8000B4C, 0x00000180U ,0x00000000U),
516
+    EMIT_MASKWRITE(0XF8000B50, 0x00000180U ,0x00000180U),
517
+    EMIT_MASKWRITE(0XF8000B54, 0x00000180U ,0x00000000U),
518
+    EMIT_MASKWRITE(0XF8000004, 0x0000FFFFU ,0x0000767BU),
519
+    EMIT_MASKWRITE(0XE0000034, 0x000000FFU ,0x00000006U),
520
+    EMIT_MASKWRITE(0XE0000018, 0x0000FFFFU ,0x0000007CU),
521
+    EMIT_MASKWRITE(0XE0000000, 0x000001FFU ,0x00000017U),
522
+    EMIT_MASKWRITE(0XE0000004, 0x00000FFFU ,0x00000020U),
523
+    EMIT_MASKWRITE(0XE000D000, 0x00080000U ,0x00080000U),
524
+    EMIT_MASKWRITE(0XF8007000, 0x20000000U ,0x00000000U),
525
+    EMIT_MASKWRITE(0XE000A244, 0x003FFFFFU ,0x00004000U),
526
+    EMIT_MASKWRITE(0XE000A008, 0xFFFFFFFFU ,0xBFFF4000U),
527
+    EMIT_MASKWRITE(0XE000A248, 0x003FFFFFU ,0x00004000U),
528
+    EMIT_MASKWRITE(0XE000A008, 0xFFFFFFFFU ,0xBFFF0000U),
529
+    EMIT_MASKDELAY(0XF8F00200, 1),
530
+    EMIT_MASKWRITE(0XE000A008, 0xFFFFFFFFU ,0xBFFF4000U),
531
+    EMIT_MASKDELAY(0XF8F00200, 1),
532
+    EMIT_MASKWRITE(0XE000A204, 0xFFFFFFFFU ,0x00000200U),
533
+    EMIT_MASKWRITE(0XE000A000, 0xFFFFFFFFU ,0xFDFF0200U),
534
+    EMIT_MASKWRITE(0XE000A208, 0xFFFFFFFFU ,0x00000200U),
535
+    EMIT_MASKWRITE(0XE000A000, 0xFFFFFFFFU ,0xFDFF0000U),
536
+    EMIT_MASKDELAY(0XF8F00200, 1),
537
+    EMIT_MASKWRITE(0XE000A000, 0xFFFFFFFFU ,0xFDFF0200U),
538
+    EMIT_MASKDELAY(0XF8F00200, 1),
539
+    EMIT_MASKDELAY(0XF8F00200, 1),
540
+    EMIT_MASKDELAY(0XF8F00200, 1),
541
+    EMIT_EXIT(),
542
+
543
+};
544
+
545
+unsigned long ps7_post_config_2_0[] = {
546
+    EMIT_MASKWRITE(0XF8000008, 0x0000FFFFU ,0x0000DF0DU),
547
+    EMIT_MASKWRITE(0XF8000900, 0x0000000FU ,0x0000000FU),
548
+    EMIT_MASKWRITE(0XF8000240, 0xFFFFFFFFU ,0x00000000U),
549
+    EMIT_MASKWRITE(0XF8000004, 0x0000FFFFU ,0x0000767BU),
550
+    EMIT_EXIT(),
551
+
552
+};
553
+
554
+unsigned long ps7_debug_2_0[] = {
555
+    EMIT_MASKWRITE(0XF8898FB0, 0xFFFFFFFFU ,0xC5ACCE55U),
556
+    EMIT_MASKWRITE(0XF8899FB0, 0xFFFFFFFFU ,0xC5ACCE55U),
557
+    EMIT_MASKWRITE(0XF8809FB0, 0xFFFFFFFFU ,0xC5ACCE55U),
558
+    EMIT_EXIT(),
559
+
560
+};
561
+
562
+unsigned long ps7_pll_init_data_1_0[] = {
563
+    EMIT_MASKWRITE(0XF8000008, 0x0000FFFFU ,0x0000DF0DU),
564
+    EMIT_MASKWRITE(0XF8000110, 0x003FFFF0U ,0x001772C0U),
565
+    EMIT_MASKWRITE(0XF8000100, 0x0007F000U ,0x0001A000U),
566
+    EMIT_MASKWRITE(0XF8000100, 0x00000010U ,0x00000010U),
567
+    EMIT_MASKWRITE(0XF8000100, 0x00000001U ,0x00000001U),
568
+    EMIT_MASKWRITE(0XF8000100, 0x00000001U ,0x00000000U),
569
+    EMIT_MASKPOLL(0XF800010C, 0x00000001U),
570
+    EMIT_MASKWRITE(0XF8000100, 0x00000010U ,0x00000000U),
571
+    EMIT_MASKWRITE(0XF8000120, 0x1F003F30U ,0x1F000200U),
572
+    EMIT_MASKWRITE(0XF8000114, 0x003FFFF0U ,0x001DB2C0U),
573
+    EMIT_MASKWRITE(0XF8000104, 0x0007F000U ,0x00015000U),
574
+    EMIT_MASKWRITE(0XF8000104, 0x00000010U ,0x00000010U),
575
+    EMIT_MASKWRITE(0XF8000104, 0x00000001U ,0x00000001U),
576
+    EMIT_MASKWRITE(0XF8000104, 0x00000001U ,0x00000000U),
577
+    EMIT_MASKPOLL(0XF800010C, 0x00000002U),
578
+    EMIT_MASKWRITE(0XF8000104, 0x00000010U ,0x00000000U),
579
+    EMIT_MASKWRITE(0XF8000124, 0xFFF00003U ,0x0C200003U),
580
+    EMIT_MASKWRITE(0XF8000118, 0x003FFFF0U ,0x001F42C0U),
581
+    EMIT_MASKWRITE(0XF8000108, 0x0007F000U ,0x00014000U),
582
+    EMIT_MASKWRITE(0XF8000108, 0x00000010U ,0x00000010U),
583
+    EMIT_MASKWRITE(0XF8000108, 0x00000001U ,0x00000001U),
584
+    EMIT_MASKWRITE(0XF8000108, 0x00000001U ,0x00000000U),
585
+    EMIT_MASKPOLL(0XF800010C, 0x00000004U),
586
+    EMIT_MASKWRITE(0XF8000108, 0x00000010U ,0x00000000U),
587
+    EMIT_MASKWRITE(0XF8000004, 0x0000FFFFU ,0x0000767BU),
588
+    EMIT_EXIT(),
589
+
590
+};
591
+
592
+unsigned long ps7_clock_init_data_1_0[] = {
593
+    EMIT_MASKWRITE(0XF8000008, 0x0000FFFFU ,0x0000DF0DU),
594
+    EMIT_MASKWRITE(0XF8000128, 0x03F03F01U ,0x00203401U),
595
+    EMIT_MASKWRITE(0XF8000138, 0x00000011U ,0x00000001U),
596
+    EMIT_MASKWRITE(0XF8000140, 0x03F03F71U ,0x00100801U),
597
+    EMIT_MASKWRITE(0XF800014C, 0x00003F31U ,0x00000501U),
598
+    EMIT_MASKWRITE(0XF8000150, 0x00003F33U ,0x00001401U),
599
+    EMIT_MASKWRITE(0XF8000154, 0x00003F33U ,0x00000A01U),
600
+    EMIT_MASKWRITE(0XF8000158, 0x00003F33U ,0x00000601U),
601
+    EMIT_MASKWRITE(0XF8000168, 0x00003F31U ,0x00000501U),
602
+    EMIT_MASKWRITE(0XF8000170, 0x03F03F30U ,0x00200500U),
603
+    EMIT_MASKWRITE(0XF8000180, 0x03F03F30U ,0x00100700U),
604
+    EMIT_MASKWRITE(0XF80001C4, 0x00000001U ,0x00000001U),
605
+    EMIT_MASKWRITE(0XF800012C, 0x01FFCCCDU ,0x01DC444DU),
606
+    EMIT_MASKWRITE(0XF8000004, 0x0000FFFFU ,0x0000767BU),
607
+    EMIT_EXIT(),
608
+
609
+};
610
+
611
+unsigned long ps7_ddr_init_data_1_0[] = {
612
+    EMIT_MASKWRITE(0XF8006000, 0x0001FFFFU ,0x00000084U),
613
+    EMIT_MASKWRITE(0XF8006004, 0x1FFFFFFFU ,0x0008107FU),
614
+    EMIT_MASKWRITE(0XF8006008, 0x03FFFFFFU ,0x03C0780FU),
615
+    EMIT_MASKWRITE(0XF800600C, 0x03FFFFFFU ,0x02001001U),
616
+    EMIT_MASKWRITE(0XF8006010, 0x03FFFFFFU ,0x00014001U),
617
+    EMIT_MASKWRITE(0XF8006014, 0x001FFFFFU ,0x0004279AU),
618
+    EMIT_MASKWRITE(0XF8006018, 0xF7FFFFFFU ,0x44E354D2U),
619
+    EMIT_MASKWRITE(0XF800601C, 0xFFFFFFFFU ,0x720238E5U),
620
+    EMIT_MASKWRITE(0XF8006020, 0xFFFFFFFCU ,0x272872D0U),
621
+    EMIT_MASKWRITE(0XF8006024, 0x0FFFFFFFU ,0x0000003CU),
622
+    EMIT_MASKWRITE(0XF8006028, 0x00003FFFU ,0x00002007U),
623
+    EMIT_MASKWRITE(0XF800602C, 0xFFFFFFFFU ,0x00000008U),
624
+    EMIT_MASKWRITE(0XF8006030, 0xFFFFFFFFU ,0x00040930U),
625
+    EMIT_MASKWRITE(0XF8006034, 0x13FF3FFFU ,0x00011674U),
626
+    EMIT_MASKWRITE(0XF8006038, 0x00001FC3U ,0x00000000U),
627
+    EMIT_MASKWRITE(0XF800603C, 0x000FFFFFU ,0x00000666U),
628
+    EMIT_MASKWRITE(0XF8006040, 0xFFFFFFFFU ,0xFFFF0000U),
629
+    EMIT_MASKWRITE(0XF8006044, 0x0FFFFFFFU ,0x0F555555U),
630
+    EMIT_MASKWRITE(0XF8006048, 0x3FFFFFFFU ,0x0003C248U),
631
+    EMIT_MASKWRITE(0XF8006050, 0xFF0F8FFFU ,0x77010800U),
632
+    EMIT_MASKWRITE(0XF8006058, 0x0001FFFFU ,0x00000101U),
633
+    EMIT_MASKWRITE(0XF800605C, 0x0000FFFFU ,0x00005003U),
634
+    EMIT_MASKWRITE(0XF8006060, 0x000017FFU ,0x0000003EU),
635
+    EMIT_MASKWRITE(0XF8006064, 0x00021FE0U ,0x00020000U),
636
+    EMIT_MASKWRITE(0XF8006068, 0x03FFFFFFU ,0x00284141U),
637
+    EMIT_MASKWRITE(0XF800606C, 0x0000FFFFU ,0x00001610U),
638
+    EMIT_MASKWRITE(0XF80060A0, 0x00FFFFFFU ,0x00008000U),
639
+    EMIT_MASKWRITE(0XF80060A4, 0xFFFFFFFFU ,0x10200802U),
640
+    EMIT_MASKWRITE(0XF80060A8, 0x0FFFFFFFU ,0x0670C845U),
641
+    EMIT_MASKWRITE(0XF80060AC, 0x000001FFU ,0x000001FEU),
642
+    EMIT_MASKWRITE(0XF80060B0, 0x1FFFFFFFU ,0x1CFFFFFFU),
643
+    EMIT_MASKWRITE(0XF80060B4, 0x000007FFU ,0x00000200U),
644
+    EMIT_MASKWRITE(0XF80060B8, 0x01FFFFFFU ,0x00200066U),
645
+    EMIT_MASKWRITE(0XF80060C4, 0x00000003U ,0x00000003U),
646
+    EMIT_MASKWRITE(0XF80060C4, 0x00000003U ,0x00000000U),
647
+    EMIT_MASKWRITE(0XF80060C8, 0x000000FFU ,0x00000000U),
648
+    EMIT_MASKWRITE(0XF80060DC, 0x00000001U ,0x00000000U),
649
+    EMIT_MASKWRITE(0XF80060F0, 0x0000FFFFU ,0x00000000U),
650
+    EMIT_MASKWRITE(0XF80060F4, 0x0000000FU ,0x00000008U),
651
+    EMIT_MASKWRITE(0XF8006114, 0x000000FFU ,0x00000000U),
652
+    EMIT_MASKWRITE(0XF8006118, 0x7FFFFFFFU ,0x40000001U),
653
+    EMIT_MASKWRITE(0XF800611C, 0x7FFFFFFFU ,0x40000001U),
654
+    EMIT_MASKWRITE(0XF8006120, 0x7FFFFFFFU ,0x40000000U),
655
+    EMIT_MASKWRITE(0XF8006124, 0x7FFFFFFFU ,0x40000000U),
656
+    EMIT_MASKWRITE(0XF800612C, 0x000FFFFFU ,0x00026C05U),
657
+    EMIT_MASKWRITE(0XF8006130, 0x000FFFFFU ,0x00026007U),
658
+    EMIT_MASKWRITE(0XF8006134, 0x000FFFFFU ,0x0001D800U),
659
+    EMIT_MASKWRITE(0XF8006138, 0x000FFFFFU ,0x0001E000U),
660
+    EMIT_MASKWRITE(0XF8006140, 0x000FFFFFU ,0x00000035U),
661
+    EMIT_MASKWRITE(0XF8006144, 0x000FFFFFU ,0x00000035U),
662
+    EMIT_MASKWRITE(0XF8006148, 0x000FFFFFU ,0x00000035U),
663
+    EMIT_MASKWRITE(0XF800614C, 0x000FFFFFU ,0x00000035U),
664
+    EMIT_MASKWRITE(0XF8006154, 0x000FFFFFU ,0x00000085U),
665
+    EMIT_MASKWRITE(0XF8006158, 0x000FFFFFU ,0x00000087U),
666
+    EMIT_MASKWRITE(0XF800615C, 0x000FFFFFU ,0x0000007FU),
667
+    EMIT_MASKWRITE(0XF8006160, 0x000FFFFFU ,0x0000007CU),
668
+    EMIT_MASKWRITE(0XF8006168, 0x001FFFFFU ,0x000000F0U),
669
+    EMIT_MASKWRITE(0XF800616C, 0x001FFFFFU ,0x000000EDU),
670
+    EMIT_MASKWRITE(0XF8006170, 0x001FFFFFU ,0x000000CBU),
671
+    EMIT_MASKWRITE(0XF8006174, 0x001FFFFFU ,0x000000CDU),
672
+    EMIT_MASKWRITE(0XF800617C, 0x000FFFFFU ,0x000000C5U),
673
+    EMIT_MASKWRITE(0XF8006180, 0x000FFFFFU ,0x000000C7U),
674
+    EMIT_MASKWRITE(0XF8006184, 0x000FFFFFU ,0x000000BFU),
675
+    EMIT_MASKWRITE(0XF8006188, 0x000FFFFFU ,0x000000BCU),
676
+    EMIT_MASKWRITE(0XF8006190, 0xFFFFFFFFU ,0x10040080U),
677
+    EMIT_MASKWRITE(0XF8006194, 0x000FFFFFU ,0x0001FC82U),
678
+    EMIT_MASKWRITE(0XF8006204, 0xFFFFFFFFU ,0x00000000U),
679
+    EMIT_MASKWRITE(0XF8006208, 0x000F03FFU ,0x000803FFU),
680
+    EMIT_MASKWRITE(0XF800620C, 0x000F03FFU ,0x000803FFU),
681
+    EMIT_MASKWRITE(0XF8006210, 0x000F03FFU ,0x000803FFU),
682
+    EMIT_MASKWRITE(0XF8006214, 0x000F03FFU ,0x000803FFU),
683
+    EMIT_MASKWRITE(0XF8006218, 0x000F03FFU ,0x000003FFU),
684
+    EMIT_MASKWRITE(0XF800621C, 0x000F03FFU ,0x000003FFU),
685
+    EMIT_MASKWRITE(0XF8006220, 0x000F03FFU ,0x000003FFU),
686
+    EMIT_MASKWRITE(0XF8006224, 0x000F03FFU ,0x000003FFU),
687
+    EMIT_MASKWRITE(0XF80062A8, 0x00000FF7U ,0x00000000U),
688
+    EMIT_MASKWRITE(0XF80062AC, 0xFFFFFFFFU ,0x00000000U),
689
+    EMIT_MASKWRITE(0XF80062B0, 0x003FFFFFU ,0x00005125U),
690
+    EMIT_MASKWRITE(0XF80062B4, 0x0003FFFFU ,0x000012A6U),
691
+    EMIT_MASKPOLL(0XF8000B74, 0x00002000U),
692
+    EMIT_MASKWRITE(0XF8006000, 0x0001FFFFU ,0x00000085U),
693
+    EMIT_MASKPOLL(0XF8006054, 0x00000007U),
694
+    EMIT_EXIT(),
695
+
696
+};
697
+
698
+unsigned long ps7_mio_init_data_1_0[] = {
699
+    EMIT_MASKWRITE(0XF8000008, 0x0000FFFFU ,0x0000DF0DU),
700
+    EMIT_MASKWRITE(0XF8000B40, 0x00000FFFU ,0x00000600U),
701
+    EMIT_MASKWRITE(0XF8000B44, 0x00000FFFU ,0x00000600U),
702
+    EMIT_MASKWRITE(0XF8000B48, 0x00000FFFU ,0x00000672U),
703
+    EMIT_MASKWRITE(0XF8000B4C, 0x00000FFFU ,0x00000800U),
704
+    EMIT_MASKWRITE(0XF8000B50, 0x00000FFFU ,0x00000674U),
705
+    EMIT_MASKWRITE(0XF8000B54, 0x00000FFFU ,0x00000800U),
706
+    EMIT_MASKWRITE(0XF8000B58, 0x00000FFFU ,0x00000600U),
707
+    EMIT_MASKWRITE(0XF8000B5C, 0xFFFFFFFFU ,0x0018C61CU),
708
+    EMIT_MASKWRITE(0XF8000B60, 0xFFFFFFFFU ,0x00F9861CU),
709
+    EMIT_MASKWRITE(0XF8000B64, 0xFFFFFFFFU ,0x00F9861CU),
710
+    EMIT_MASKWRITE(0XF8000B68, 0xFFFFFFFFU ,0x00F9861CU),
711
+    EMIT_MASKWRITE(0XF8000B6C, 0x000073FFU ,0x00000220U),
712
+    EMIT_MASKWRITE(0XF8000B70, 0x00000021U ,0x00000021U),
713
+    EMIT_MASKWRITE(0XF8000B70, 0x00000021U ,0x00000020U),
714
+    EMIT_MASKWRITE(0XF8000B70, 0x07FFFFFFU ,0x00000823U),
715
+    EMIT_MASKWRITE(0XF8000700, 0x00003FFFU ,0x00001600U),
716
+    EMIT_MASKWRITE(0XF8000704, 0x00003FFFU ,0x00001602U),
717
+    EMIT_MASKWRITE(0XF8000708, 0x00003FFFU ,0x00000602U),
718
+    EMIT_MASKWRITE(0XF800070C, 0x00003FFFU ,0x00000602U),
719
+    EMIT_MASKWRITE(0XF8000710, 0x00003FFFU ,0x00000602U),
720
+    EMIT_MASKWRITE(0XF8000714, 0x00003FFFU ,0x00000602U),
721
+    EMIT_MASKWRITE(0XF8000718, 0x00003FFFU ,0x00000602U),
722
+    EMIT_MASKWRITE(0XF800071C, 0x00003FFFU ,0x00000600U),
723
+    EMIT_MASKWRITE(0XF8000720, 0x00003FFFU ,0x00000602U),
724
+    EMIT_MASKWRITE(0XF8000724, 0x00003FFFU ,0x00001600U),
725
+    EMIT_MASKWRITE(0XF8000728, 0x00003FFFU ,0x00001600U),
726
+    EMIT_MASKWRITE(0XF800072C, 0x00003FFFU ,0x00001600U),
727
+    EMIT_MASKWRITE(0XF8000730, 0x00003FFFU ,0x00001600U),
728
+    EMIT_MASKWRITE(0XF8000734, 0x00003FFFU ,0x00001600U),
729
+    EMIT_MASKWRITE(0XF8000738, 0x00003FFFU ,0x000016E1U),
730
+    EMIT_MASKWRITE(0XF800073C, 0x00003FFFU ,0x000016E0U),
731
+    EMIT_MASKWRITE(0XF8000740, 0x00003FFFU ,0x00001202U),
732
+    EMIT_MASKWRITE(0XF8000744, 0x00003FFFU ,0x00001202U),
733
+    EMIT_MASKWRITE(0XF8000748, 0x00003FFFU ,0x00001202U),
734
+    EMIT_MASKWRITE(0XF800074C, 0x00003FFFU ,0x00001202U),
735
+    EMIT_MASKWRITE(0XF8000750, 0x00003FFFU ,0x00001202U),
736
+    EMIT_MASKWRITE(0XF8000754, 0x00003FFFU ,0x00001202U),
737
+    EMIT_MASKWRITE(0XF8000758, 0x00003FFFU ,0x00001203U),
738
+    EMIT_MASKWRITE(0XF800075C, 0x00003FFFU ,0x00001203U),
739
+    EMIT_MASKWRITE(0XF8000760, 0x00003FFFU ,0x00001203U),
740
+    EMIT_MASKWRITE(0XF8000764, 0x00003FFFU ,0x00001203U),
741
+    EMIT_MASKWRITE(0XF8000768, 0x00003FFFU ,0x00001203U),
742
+    EMIT_MASKWRITE(0XF800076C, 0x00003FFFU ,0x00001203U),
743
+    EMIT_MASKWRITE(0XF8000770, 0x00003FFFU ,0x00001204U),
744
+    EMIT_MASKWRITE(0XF8000774, 0x00003FFFU ,0x00001205U),
745
+    EMIT_MASKWRITE(0XF8000778, 0x00003FFFU ,0x00001204U),
746
+    EMIT_MASKWRITE(0XF800077C, 0x00003FFFU ,0x00001205U),
747
+    EMIT_MASKWRITE(0XF8000780, 0x00003FFFU ,0x00001204U),
748
+    EMIT_MASKWRITE(0XF8000784, 0x00003FFFU ,0x00001204U),
749
+    EMIT_MASKWRITE(0XF8000788, 0x00003FFFU ,0x00001204U),
750
+    EMIT_MASKWRITE(0XF800078C, 0x00003FFFU ,0x00001204U),
751
+    EMIT_MASKWRITE(0XF8000790, 0x00003FFFU ,0x00001205U),
752
+    EMIT_MASKWRITE(0XF8000794, 0x00003FFFU ,0x00001204U),
753
+    EMIT_MASKWRITE(0XF8000798, 0x00003FFFU ,0x00001204U),
754
+    EMIT_MASKWRITE(0XF800079C, 0x00003FFFU ,0x00001204U),
755
+    EMIT_MASKWRITE(0XF80007A0, 0x00003FFFU ,0x00001280U),
756
+    EMIT_MASKWRITE(0XF80007A4, 0x00003FFFU ,0x00001280U),
757
+    EMIT_MASKWRITE(0XF80007A8, 0x00003FFFU ,0x00001280U),
758
+    EMIT_MASKWRITE(0XF80007AC, 0x00003FFFU ,0x00001280U),
759
+    EMIT_MASKWRITE(0XF80007B0, 0x00003FFFU ,0x00001280U),
760
+    EMIT_MASKWRITE(0XF80007B4, 0x00003FFFU ,0x00001280U),
761
+    EMIT_MASKWRITE(0XF80007B8, 0x00003FFFU ,0x00001200U),
762
+    EMIT_MASKWRITE(0XF80007BC, 0x00003F01U ,0x00001201U),
763
+    EMIT_MASKWRITE(0XF80007C0, 0x00003FFFU ,0x00001200U),
764
+    EMIT_MASKWRITE(0XF80007C4, 0x00003FFFU ,0x00001200U),
765
+    EMIT_MASKWRITE(0XF80007C8, 0x00003FFFU ,0x00001200U),
766
+    EMIT_MASKWRITE(0XF80007CC, 0x00003FFFU ,0x00001200U),
767
+    EMIT_MASKWRITE(0XF80007D0, 0x00003FFFU ,0x00001280U),
768
+    EMIT_MASKWRITE(0XF80007D4, 0x00003FFFU ,0x00001280U),
769
+    EMIT_MASKWRITE(0XF8000830, 0x003F003FU ,0x002F0037U),
770
+    EMIT_MASKWRITE(0XF8000004, 0x0000FFFFU ,0x0000767BU),
771
+    EMIT_EXIT(),
772
+
773
+};
774
+
775
+unsigned long ps7_peripherals_init_data_1_0[] = {
776
+    EMIT_MASKWRITE(0XF8000008, 0x0000FFFFU ,0x0000DF0DU),
777
+    EMIT_MASKWRITE(0XF8000B48, 0x00000180U ,0x00000180U),
778
+    EMIT_MASKWRITE(0XF8000B4C, 0x00000180U ,0x00000000U),
779
+    EMIT_MASKWRITE(0XF8000B50, 0x00000180U ,0x00000180U),
780
+    EMIT_MASKWRITE(0XF8000B54, 0x00000180U ,0x00000000U),
781
+    EMIT_MASKWRITE(0XF8000004, 0x0000FFFFU ,0x0000767BU),
782
+    EMIT_MASKWRITE(0XE0000034, 0x000000FFU ,0x00000006U),
783
+    EMIT_MASKWRITE(0XE0000018, 0x0000FFFFU ,0x0000007CU),
784
+    EMIT_MASKWRITE(0XE0000000, 0x000001FFU ,0x00000017U),
785
+    EMIT_MASKWRITE(0XE0000004, 0x00000FFFU ,0x00000020U),
786
+    EMIT_MASKWRITE(0XE000D000, 0x00080000U ,0x00080000U),
787
+    EMIT_MASKWRITE(0XF8007000, 0x20000000U ,0x00000000U),
788
+    EMIT_MASKWRITE(0XE000A244, 0x003FFFFFU ,0x00004000U),
789
+    EMIT_MASKWRITE(0XE000A008, 0xFFFFFFFFU ,0xBFFF4000U),
790
+    EMIT_MASKWRITE(0XE000A248, 0x003FFFFFU ,0x00004000U),
791
+    EMIT_MASKWRITE(0XE000A008, 0xFFFFFFFFU ,0xBFFF0000U),
792
+    EMIT_MASKDELAY(0XF8F00200, 1),
793
+    EMIT_MASKWRITE(0XE000A008, 0xFFFFFFFFU ,0xBFFF4000U),
794
+    EMIT_MASKDELAY(0XF8F00200, 1),
795
+    EMIT_MASKWRITE(0XE000A204, 0xFFFFFFFFU ,0x00000200U),
796
+    EMIT_MASKWRITE(0XE000A000, 0xFFFFFFFFU ,0xFDFF0200U),
797
+    EMIT_MASKWRITE(0XE000A208, 0xFFFFFFFFU ,0x00000200U),
798
+    EMIT_MASKWRITE(0XE000A000, 0xFFFFFFFFU ,0xFDFF0000U),
799
+    EMIT_MASKDELAY(0XF8F00200, 1),
800
+    EMIT_MASKWRITE(0XE000A000, 0xFFFFFFFFU ,0xFDFF0200U),
801
+    EMIT_MASKDELAY(0XF8F00200, 1),
802
+    EMIT_MASKDELAY(0XF8F00200, 1),
803
+    EMIT_MASKDELAY(0XF8F00200, 1),
804
+    EMIT_EXIT(),
805
+
806
+};
807
+
808
+unsigned long ps7_post_config_1_0[] = {
809
+    EMIT_MASKWRITE(0XF8000008, 0x0000FFFFU ,0x0000DF0DU),
810
+    EMIT_MASKWRITE(0XF8000900, 0x0000000FU ,0x0000000FU),
811
+    EMIT_MASKWRITE(0XF8000240, 0xFFFFFFFFU ,0x00000000U),
812
+    EMIT_MASKWRITE(0XF8000004, 0x0000FFFFU ,0x0000767BU),
813
+    EMIT_EXIT(),
814
+
815
+};
816
+
817
+unsigned long ps7_debug_1_0[] = {
818
+    EMIT_MASKWRITE(0XF8898FB0, 0xFFFFFFFFU ,0xC5ACCE55U),
819
+    EMIT_MASKWRITE(0XF8899FB0, 0xFFFFFFFFU ,0xC5ACCE55U),
820
+    EMIT_MASKWRITE(0XF8809FB0, 0xFFFFFFFFU ,0xC5ACCE55U),
821
+    EMIT_EXIT(),
822
+
823
+};
824
+
825
+
826
+#include "xil_io.h"
827
+
828
+unsigned long *ps7_mio_init_data = ps7_mio_init_data_3_0;
829
+unsigned long *ps7_pll_init_data = ps7_pll_init_data_3_0;
830
+unsigned long *ps7_clock_init_data = ps7_clock_init_data_3_0;
831
+unsigned long *ps7_ddr_init_data = ps7_ddr_init_data_3_0;
832
+unsigned long *ps7_peripherals_init_data = ps7_peripherals_init_data_3_0;
833
+
834
+int
835
+ps7_post_config()
836
+{
837
+  // Get the PS_VERSION on run time
838
+  unsigned long si_ver = ps7GetSiliconVersion ();
839
+  int ret = -1;
840
+  if (si_ver == PCW_SILICON_VERSION_1) {
841
+      ret = ps7_config (ps7_post_config_1_0);
842
+      if (ret != PS7_INIT_SUCCESS) return ret;
843
+  } else if (si_ver == PCW_SILICON_VERSION_2) {
844
+      ret = ps7_config (ps7_post_config_2_0);
845
+      if (ret != PS7_INIT_SUCCESS) return ret;
846
+  } else {
847
+      ret = ps7_config (ps7_post_config_3_0);
848
+      if (ret != PS7_INIT_SUCCESS) return ret;
849
+  }
850
+  return PS7_INIT_SUCCESS;
851
+}
852
+
853
+int
854
+ps7_debug()
855
+{
856
+  // Get the PS_VERSION on run time
857
+  unsigned long si_ver = ps7GetSiliconVersion ();
858
+  int ret = -1;
859
+  if (si_ver == PCW_SILICON_VERSION_1) {
860
+      ret = ps7_config (ps7_debug_1_0);
861
+      if (ret != PS7_INIT_SUCCESS) return ret;
862
+  } else if (si_ver == PCW_SILICON_VERSION_2) {
863
+      ret = ps7_config (ps7_debug_2_0);
864
+      if (ret != PS7_INIT_SUCCESS) return ret;
865
+  } else {
866
+      ret = ps7_config (ps7_debug_3_0);
867
+      if (ret != PS7_INIT_SUCCESS) return ret;
868
+  }
869
+  return PS7_INIT_SUCCESS;
870
+}
871
+
872
+int
873
+ps7_init()
874
+{
875
+  // Get the PS_VERSION on run time
876
+  unsigned long si_ver = ps7GetSiliconVersion ();
877
+  int ret;
878
+  //int pcw_ver = 0;
879
+
880
+  if (si_ver == PCW_SILICON_VERSION_1) {
881
+    ps7_mio_init_data = ps7_mio_init_data_1_0;
882
+    ps7_pll_init_data = ps7_pll_init_data_1_0;
883
+    ps7_clock_init_data = ps7_clock_init_data_1_0;
884
+    ps7_ddr_init_data = ps7_ddr_init_data_1_0;
885
+    ps7_peripherals_init_data = ps7_peripherals_init_data_1_0;
886
+
887
+  } else if (si_ver == PCW_SILICON_VERSION_2) {
888
+    ps7_mio_init_data = ps7_mio_init_data_2_0;
889
+    ps7_pll_init_data = ps7_pll_init_data_2_0;
890
+    ps7_clock_init_data = ps7_clock_init_data_2_0;
891
+    ps7_ddr_init_data = ps7_ddr_init_data_2_0;
892
+    ps7_peripherals_init_data = ps7_peripherals_init_data_2_0;
893
+
894
+  } else {
895
+    ps7_mio_init_data = ps7_mio_init_data_3_0;
896
+    ps7_pll_init_data = ps7_pll_init_data_3_0;
897
+    ps7_clock_init_data = ps7_clock_init_data_3_0;
898
+    ps7_ddr_init_data = ps7_ddr_init_data_3_0;
899
+    ps7_peripherals_init_data = ps7_peripherals_init_data_3_0;
900
+  }
901
+
902
+  // MIO init
903
+  ret = ps7_config (ps7_mio_init_data);
904
+  if (ret != PS7_INIT_SUCCESS) return ret;
905
+
906
+  // PLL init
907
+  ret = ps7_config (ps7_pll_init_data);
908
+  if (ret != PS7_INIT_SUCCESS) return ret;
909
+
910
+  // Clock init
911
+  ret = ps7_config (ps7_clock_init_data);
912
+  if (ret != PS7_INIT_SUCCESS) return ret;
913
+
914
+  // DDR init
915
+  ret = ps7_config (ps7_ddr_init_data);
916
+  if (ret != PS7_INIT_SUCCESS) return ret;
917
+
918
+  // Peripherals init
919
+  ret = ps7_config (ps7_peripherals_init_data);
920
+  if (ret != PS7_INIT_SUCCESS) return ret;
921
+  //xil_printf ("\n PCW Silicon Version : %d.0", pcw_ver);
922
+  return PS7_INIT_SUCCESS;
923
+}
924
+
925
+
(-)b/sysutils/u-boot-arty-z7/files/patch-configs_xilinx__zynq__virt__defconfig (+27 lines)
Added Link Here
1
--- configs/xilinx_zynq_virt_defconfig.orig	2020-10-05 08:15:32.000000000 -0700
2
+++ configs/xilinx_zynq_virt_defconfig	2021-02-16 22:00:57.509749000 -0800
3
@@ -6,7 +6,7 @@
4
 CONFIG_DM_GPIO=y
5
 CONFIG_SPL_STACK_R_ADDR=0x200000
6
 CONFIG_SPL=y
7
-CONFIG_DEFAULT_DEVICE_TREE="zynq-zc706"
8
+CONFIG_DEFAULT_DEVICE_TREE="zynq-artyz7"
9
 CONFIG_DISTRO_DEFAULTS=y
10
 CONFIG_SYS_CUSTOM_LDSCRIPT=y
11
 CONFIG_SYS_LDSCRIPT="arch/arm/mach-zynq/u-boot.lds"
12
@@ -49,7 +49,7 @@
13
 CONFIG_CMD_MTDPARTS_SPREAD=y
14
 CONFIG_CMD_MTDPARTS_SHOW_NET_SIZES=y
15
 CONFIG_CMD_UBI=y
16
-CONFIG_OF_LIST="zynq-zc702 zynq-zc706 zynq-zc770-xm010 zynq-zc770-xm011 zynq-zc770-xm011-x16 zynq-zc770-xm012 zynq-zc770-xm013 zynq-cc108 zynq-microzed zynq-minized zynq-picozed zynq-zed zynq-zturn zynq-zybo zynq-zybo-z7 zynq-dlc20-rev1.0"
17
+CONFIG_OF_LIST="zynq-artyz7 zynq-zc702 zynq-zc706 zynq-zc770-xm010 zynq-zc770-xm011 zynq-zc770-xm011-x16 zynq-zc770-xm012 zynq-zc770-xm013 zynq-cc108 zynq-microzed zynq-minized zynq-picozed zynq-zed zynq-zturn zynq-zybo zynq-zybo-z7 zynq-dlc20-rev1.0"
18
 CONFIG_ENV_OVERWRITE=y
19
 CONFIG_ENV_IS_IN_SPI_FLASH=y
20
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
21
@@ -109,3 +109,6 @@
22
 CONFIG_USB_FUNCTION_THOR=y
23
 CONFIG_DISPLAY=y
24
 CONFIG_SPL_GZIP=y
25
+CONFIG_CMD_BOOTEFI=y
26
+CONFIG_EFI_LOADER=y
27
+CONFIG_OF_SEPARATE=y
(-)b/sysutils/u-boot-arty-z7/files/patch-lib_efi__loader_efi__disk.c (+13 lines)
Added Link Here
1
--- lib/efi_loader/efi_disk.c.orig	2020-10-05 08:15:32.000000000 -0700
2
+++ lib/efi_loader/efi_disk.c	2021-02-16 18:44:56.135722000 -0800
3
@@ -143,8 +143,8 @@
4
 	if (!this->media->media_present)
5
 		return EFI_NO_MEDIA;
6
 	/* media->io_align is a power of 2 */
7
-	if ((uintptr_t)buffer & (this->media->io_align - 1))
8
-		return EFI_INVALID_PARAMETER;
9
+//	if ((uintptr_t)buffer & (this->media->io_align - 1))
10
+//		return EFI_INVALID_PARAMETER;
11
 	if (lba * this->media->block_size + buffer_size >
12
 	    this->media->last_block * this->media->block_size)
13
 		return EFI_INVALID_PARAMETER;
(-)b/sysutils/u-boot-arty-z7/files/patch-scripts_Makefile.lib (+11 lines)
Added Link Here
1
--- scripts/Makefile.lib.orig	2021-02-12 22:41:08.686406000 -0800
2
+++ scripts/Makefile.lib	2021-02-12 22:44:30.159107000 -0800
3
@@ -327,7 +327,7 @@
4
 		(echo "Check $(shell pwd)/$(pre-tmp) for errors" && false) \
5
 		; \
6
 	cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) ; \
7
-	sed -i "s:$(pre-tmp):$(<):" $(depfile)
8
+	gsed -i "s:$(pre-tmp):$(<):" $(depfile)
9
 
10
 $(obj)/%.dtb: $(src)/%.dts FORCE
11
 	$(call if_changed_dep,dtc)
(-)b/sysutils/u-boot-arty-z7/files/patch-scripts_Makefile.spl (+11 lines)
Added Link Here
1
--- scripts/Makefile.spl.orig	2021-02-12 23:19:53.824746000 -0800
2
+++ scripts/Makefile.spl	2021-02-12 23:20:11.607062000 -0800
3
@@ -207,7 +207,7 @@
4
 endif
5
 
6
 $(obj)/$(SPL_BIN)-align.bin: $(obj)/$(SPL_BIN).bin
7
-	@dd if=$< of=$@ conv=block,sync bs=4 2>/dev/null;
8
+	@gdd if=$< of=$@ conv=block,sync bs=4 2>/dev/null;
9
 
10
 spl/boot.bin: $(obj)/$(SPL_BIN)-align.bin FORCE
11
 	$(call if_changed,mkimage)
(-)b/sysutils/u-boot-arty-z7/pkg-descr (+11 lines)
Added Link Here
1
U-Boot loader for the Xilinx Zynq-based Digilent Arty Z7 board.
2
3
To install this bootloader, copy the files in the share/u-boot/u-boot-arty-z7
4
directory to the first partition, formatted as FAT16 or FAT32, on an SD card.
5
6
This version boots via EFI
7
8
For information about running FreeBSD on Xilinx Zynq SoCs, see
9
https://wiki.freebsd.org/FreeBSD/arm/Zedboard
10
11
WWW: https://www.denx.de/wiki/U-Boot

Return to bug 254004