From fc3241feb9d76fc88a2794b2fc8f82555f2be8b8 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 16 Dec 2020 20:51:53 -0700 Subject: video: Drop unprintable characters from video_font_data.h This file contains characters which are not valid in utf-8. This confuses dtoc which wants to parse it. They don't really serve any purpose anyway, so drop them. To: U-Boot Mailing List Cc: Tom Rini Signed-off-by: Simon Glass --- include/video_font_data.h | 258 +++++++++++++++++++++++----------------------- 1 file changed, 129 insertions(+), 129 deletions(-) diff --git a/include/video_font_data.h b/include/video_font_data.h index ed5fd640a8..6e64198d1a 100644 --- a/include/video_font_data.h +++ b/include/video_font_data.h @@ -2302,7 +2302,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 127 0x7f '' */ + /* 127 0x7f */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -2320,7 +2320,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 128 0x80 '' */ + /* 128 0x80 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x3c, /* 00111100 */ @@ -2338,7 +2338,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 129 0x81 '' */ + /* 129 0x81 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xcc, /* 11001100 */ @@ -2356,7 +2356,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 130 0x82 '' */ + /* 130 0x82 */ 0x00, /* 00000000 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ @@ -2374,7 +2374,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 131 0x83 '' */ + /* 131 0x83 */ 0x00, /* 00000000 */ 0x10, /* 00010000 */ 0x38, /* 00111000 */ @@ -2392,7 +2392,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 132 0x84 '' */ + /* 132 0x84 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xcc, /* 11001100 */ @@ -2410,7 +2410,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 133 0x85 '' */ + /* 133 0x85 */ 0x00, /* 00000000 */ 0x60, /* 01100000 */ 0x30, /* 00110000 */ @@ -2428,7 +2428,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 134 0x86 '' */ + /* 134 0x86 */ 0x00, /* 00000000 */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ @@ -2446,7 +2446,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 135 0x87 '' */ + /* 135 0x87 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -2464,7 +2464,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 136 0x88 '' */ + /* 136 0x88 */ 0x00, /* 00000000 */ 0x10, /* 00010000 */ 0x38, /* 00111000 */ @@ -2482,7 +2482,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 137 0x89 '' */ + /* 137 0x89 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ @@ -2500,7 +2500,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 138 0x8a '' */ + /* 138 0x8a */ 0x00, /* 00000000 */ 0x60, /* 01100000 */ 0x30, /* 00110000 */ @@ -2518,7 +2518,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 139 0x8b '' */ + /* 139 0x8b */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x66, /* 01100110 */ @@ -2536,7 +2536,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 140 0x8c '' */ + /* 140 0x8c */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x3c, /* 00111100 */ @@ -2554,7 +2554,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 141 0x8d '' */ + /* 141 0x8d */ 0x00, /* 00000000 */ 0x60, /* 01100000 */ 0x30, /* 00110000 */ @@ -2572,7 +2572,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 142 0x8e '' */ + /* 142 0x8e */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ @@ -2590,7 +2590,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 143 0x8f '' */ + /* 143 0x8f */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ 0x38, /* 00111000 */ @@ -2608,7 +2608,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 144 0x90 '' */ + /* 144 0x90 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ 0x00, /* 00000000 */ @@ -2626,7 +2626,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 145 0x91 '' */ + /* 145 0x91 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -2644,7 +2644,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 146 0x92 '' */ + /* 146 0x92 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x3e, /* 00111110 */ @@ -2662,7 +2662,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 147 0x93 '' */ + /* 147 0x93 */ 0x00, /* 00000000 */ 0x10, /* 00010000 */ 0x38, /* 00111000 */ @@ -2680,7 +2680,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 148 0x94 '' */ + /* 148 0x94 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ @@ -2698,7 +2698,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 149 0x95 '' */ + /* 149 0x95 */ 0x00, /* 00000000 */ 0x60, /* 01100000 */ 0x30, /* 00110000 */ @@ -2716,7 +2716,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 150 0x96 '' */ + /* 150 0x96 */ 0x00, /* 00000000 */ 0x30, /* 00110000 */ 0x78, /* 01111000 */ @@ -2734,7 +2734,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 151 0x97 '' */ + /* 151 0x97 */ 0x00, /* 00000000 */ 0x60, /* 01100000 */ 0x30, /* 00110000 */ @@ -2752,7 +2752,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 152 0x98 '' */ + /* 152 0x98 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ @@ -2770,7 +2770,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x78, /* 01111000 */ 0x00, /* 00000000 */ - /* 153 0x99 '' */ + /* 153 0x99 */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ @@ -2788,7 +2788,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 154 0x9a '' */ + /* 154 0x9a */ 0x00, /* 00000000 */ 0xc6, /* 11000110 */ 0x00, /* 00000000 */ @@ -2806,7 +2806,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 155 0x9b '' */ + /* 155 0x9b */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ @@ -2824,7 +2824,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 156 0x9c '' */ + /* 156 0x9c */ 0x00, /* 00000000 */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ @@ -2842,7 +2842,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 157 0x9d '' */ + /* 157 0x9d */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x66, /* 01100110 */ @@ -2860,7 +2860,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 158 0x9e '' */ + /* 158 0x9e */ 0x00, /* 00000000 */ 0xf8, /* 11111000 */ 0xcc, /* 11001100 */ @@ -2878,7 +2878,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 159 0x9f '' */ + /* 159 0x9f */ 0x00, /* 00000000 */ 0x0e, /* 00001110 */ 0x1b, /* 00011011 */ @@ -2896,7 +2896,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 160 0xa0 '' */ + /* 160 0xa0 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ @@ -2914,7 +2914,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 161 0xa1 '' */ + /* 161 0xa1 */ 0x00, /* 00000000 */ 0x0c, /* 00001100 */ 0x18, /* 00011000 */ @@ -2932,7 +2932,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 162 0xa2 '' */ + /* 162 0xa2 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ @@ -2950,7 +2950,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 163 0xa3 '' */ + /* 163 0xa3 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ 0x30, /* 00110000 */ @@ -2968,7 +2968,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 164 0xa4 '' */ + /* 164 0xa4 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x76, /* 01110110 */ @@ -2986,7 +2986,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 165 0xa5 '' */ + /* 165 0xa5 */ 0x76, /* 01110110 */ 0xdc, /* 11011100 */ 0x00, /* 00000000 */ @@ -3004,7 +3004,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 166 0xa6 '' */ + /* 166 0xa6 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x3c, /* 00111100 */ @@ -3022,7 +3022,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 167 0xa7 '' */ + /* 167 0xa7 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x38, /* 00111000 */ @@ -3040,7 +3040,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 168 0xa8 '' */ + /* 168 0xa8 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x30, /* 00110000 */ @@ -3058,7 +3058,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 169 0xa9 '' */ + /* 169 0xa9 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -3076,7 +3076,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 170 0xaa '' */ + /* 170 0xaa */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -3094,7 +3094,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 171 0xab '' */ + /* 171 0xab */ 0x00, /* 00000000 */ 0x60, /* 01100000 */ 0xe0, /* 11100000 */ @@ -3112,7 +3112,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 172 0xac '' */ + /* 172 0xac */ 0x00, /* 00000000 */ 0x60, /* 01100000 */ 0xe0, /* 11100000 */ @@ -3130,7 +3130,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 173 0xad '' */ + /* 173 0xad */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x18, /* 00011000 */ @@ -3148,7 +3148,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 174 0xae '' */ + /* 174 0xae */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -3166,7 +3166,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 175 0xaf '' */ + /* 175 0xaf */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -3184,7 +3184,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 176 0xb0 '' */ + /* 176 0xb0 */ 0x11, /* 00010001 */ 0x44, /* 01000100 */ 0x11, /* 00010001 */ @@ -3202,7 +3202,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x11, /* 00010001 */ 0x44, /* 01000100 */ - /* 177 0xb1 '' */ + /* 177 0xb1 */ 0x55, /* 01010101 */ 0xaa, /* 10101010 */ 0x55, /* 01010101 */ @@ -3220,7 +3220,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x55, /* 01010101 */ 0xaa, /* 10101010 */ - /* 178 0xb2 '' */ + /* 178 0xb2 */ 0xdd, /* 11011101 */ 0x77, /* 01110111 */ 0xdd, /* 11011101 */ @@ -3238,7 +3238,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0xdd, /* 11011101 */ 0x77, /* 01110111 */ - /* 179 0xb3 '' */ + /* 179 0xb3 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ @@ -3256,7 +3256,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x18, /* 00011000 */ 0x18, /* 00011000 */ - /* 180 0xb4 '' */ + /* 180 0xb4 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ @@ -3274,7 +3274,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x18, /* 00011000 */ 0x18, /* 00011000 */ - /* 181 0xb5 '' */ + /* 181 0xb5 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ @@ -3292,7 +3292,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x18, /* 00011000 */ 0x18, /* 00011000 */ - /* 182 0xb6 '' */ + /* 182 0xb6 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ @@ -3310,7 +3310,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x36, /* 00110110 */ 0x36, /* 00110110 */ - /* 183 0xb7 '' */ + /* 183 0xb7 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -3328,7 +3328,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x36, /* 00110110 */ 0x36, /* 00110110 */ - /* 184 0xb8 '' */ + /* 184 0xb8 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -3346,7 +3346,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x18, /* 00011000 */ 0x18, /* 00011000 */ - /* 185 0xb9 '' */ + /* 185 0xb9 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ @@ -3364,7 +3364,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x36, /* 00110110 */ 0x36, /* 00110110 */ - /* 186 0xba '' */ + /* 186 0xba */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ @@ -3382,7 +3382,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x36, /* 00110110 */ 0x36, /* 00110110 */ - /* 187 0xbb '' */ + /* 187 0xbb */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -3400,7 +3400,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x36, /* 00110110 */ 0x36, /* 00110110 */ - /* 188 0xbc '' */ + /* 188 0xbc */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ @@ -3418,7 +3418,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 189 0xbd '' */ + /* 189 0xbd */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ @@ -3436,7 +3436,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 190 0xbe '' */ + /* 190 0xbe */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ @@ -3454,7 +3454,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 191 0xbf '' */ + /* 191 0xbf */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -3472,7 +3472,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x18, /* 00011000 */ 0x18, /* 00011000 */ - /* 192 0xc0 '' */ + /* 192 0xc0 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ @@ -3490,7 +3490,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 193 0xc1 '' */ + /* 193 0xc1 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ @@ -3508,7 +3508,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 194 0xc2 '' */ + /* 194 0xc2 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -3526,7 +3526,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x18, /* 00011000 */ 0x18, /* 00011000 */ - /* 195 0xc3 '' */ + /* 195 0xc3 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ @@ -3544,7 +3544,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x18, /* 00011000 */ 0x18, /* 00011000 */ - /* 196 0xc4 '' */ + /* 196 0xc4 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -3562,7 +3562,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 197 0xc5 '' */ + /* 197 0xc5 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ @@ -3580,7 +3580,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x18, /* 00011000 */ 0x18, /* 00011000 */ - /* 198 0xc6 '' */ + /* 198 0xc6 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ @@ -3598,7 +3598,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x18, /* 00011000 */ 0x18, /* 00011000 */ - /* 199 0xc7 '' */ + /* 199 0xc7 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ @@ -3616,7 +3616,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x36, /* 00110110 */ 0x36, /* 00110110 */ - /* 200 0xc8 '' */ + /* 200 0xc8 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ @@ -3634,7 +3634,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 201 0xc9 '' */ + /* 201 0xc9 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -3652,7 +3652,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x36, /* 00110110 */ 0x36, /* 00110110 */ - /* 202 0xca '' */ + /* 202 0xca */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ @@ -3670,7 +3670,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 203 0xcb '' */ + /* 203 0xcb */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -3688,7 +3688,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x36, /* 00110110 */ 0x36, /* 00110110 */ - /* 204 0xcc '' */ + /* 204 0xcc */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ @@ -3706,7 +3706,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x36, /* 00110110 */ 0x36, /* 00110110 */ - /* 205 0xcd '' */ + /* 205 0xcd */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -3724,7 +3724,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 206 0xce '' */ + /* 206 0xce */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ @@ -3742,7 +3742,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x36, /* 00110110 */ 0x36, /* 00110110 */ - /* 207 0xcf '' */ + /* 207 0xcf */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ @@ -3760,7 +3760,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 208 0xd0 '' */ + /* 208 0xd0 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ @@ -3778,7 +3778,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 209 0xd1 '' */ + /* 209 0xd1 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -3796,7 +3796,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x18, /* 00011000 */ 0x18, /* 00011000 */ - /* 210 0xd2 '' */ + /* 210 0xd2 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -3814,7 +3814,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x36, /* 00110110 */ 0x36, /* 00110110 */ - /* 211 0xd3 '' */ + /* 211 0xd3 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ @@ -3832,7 +3832,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 212 0xd4 '' */ + /* 212 0xd4 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ @@ -3850,7 +3850,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 213 0xd5 '' */ + /* 213 0xd5 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -3868,7 +3868,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x18, /* 00011000 */ 0x18, /* 00011000 */ - /* 214 0xd6 '' */ + /* 214 0xd6 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -3886,7 +3886,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x36, /* 00110110 */ 0x36, /* 00110110 */ - /* 215 0xd7 '' */ + /* 215 0xd7 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ 0x36, /* 00110110 */ @@ -3904,7 +3904,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x36, /* 00110110 */ 0x36, /* 00110110 */ - /* 216 0xd8 '' */ + /* 216 0xd8 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ @@ -3922,7 +3922,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x18, /* 00011000 */ 0x18, /* 00011000 */ - /* 217 0xd9 '' */ + /* 217 0xd9 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ @@ -3940,7 +3940,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 218 0xda '' */ + /* 218 0xda */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -3958,7 +3958,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x18, /* 00011000 */ 0x18, /* 00011000 */ - /* 219 0xdb '' */ + /* 219 0xdb */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ @@ -3976,7 +3976,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0xff, /* 11111111 */ 0xff, /* 11111111 */ - /* 220 0xdc '' */ + /* 220 0xdc */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -3994,7 +3994,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0xff, /* 11111111 */ 0xff, /* 11111111 */ - /* 221 0xdd '' */ + /* 221 0xdd */ 0xf0, /* 11110000 */ 0xf0, /* 11110000 */ 0xf0, /* 11110000 */ @@ -4012,7 +4012,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0xf0, /* 11110000 */ 0xf0, /* 11110000 */ - /* 222 0xde '' */ + /* 222 0xde */ 0x0f, /* 00001111 */ 0x0f, /* 00001111 */ 0x0f, /* 00001111 */ @@ -4030,7 +4030,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x0f, /* 00001111 */ 0x0f, /* 00001111 */ - /* 223 0xdf '' */ + /* 223 0xdf */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ 0xff, /* 11111111 */ @@ -4048,7 +4048,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 224 0xe0 '' */ + /* 224 0xe0 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -4066,7 +4066,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 225 0xe1 '' */ + /* 225 0xe1 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x78, /* 01111000 */ @@ -4084,7 +4084,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 226 0xe2 '' */ + /* 226 0xe2 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ @@ -4102,7 +4102,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 227 0xe3 '' */ + /* 227 0xe3 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -4120,7 +4120,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 228 0xe4 '' */ + /* 228 0xe4 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0xfe, /* 11111110 */ @@ -4138,7 +4138,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 229 0xe5 '' */ + /* 229 0xe5 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -4156,7 +4156,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 230 0xe6 '' */ + /* 230 0xe6 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -4174,7 +4174,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0xc0, /* 11000000 */ 0x00, /* 00000000 */ - /* 231 0xe7 '' */ + /* 231 0xe7 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -4192,7 +4192,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 232 0xe8 '' */ + /* 232 0xe8 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x7e, /* 01111110 */ @@ -4210,7 +4210,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 233 0xe9 '' */ + /* 233 0xe9 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x38, /* 00111000 */ @@ -4228,7 +4228,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 234 0xea '' */ + /* 234 0xea */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x38, /* 00111000 */ @@ -4246,7 +4246,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 235 0xeb '' */ + /* 235 0xeb */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x1e, /* 00011110 */ @@ -4264,7 +4264,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 236 0xec '' */ + /* 236 0xec */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -4282,7 +4282,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 237 0xed '' */ + /* 237 0xed */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -4300,7 +4300,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 238 0xee '' */ + /* 238 0xee */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x1c, /* 00011100 */ @@ -4318,7 +4318,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 239 0xef '' */ + /* 239 0xef */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -4336,7 +4336,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 240 0xf0 '' */ + /* 240 0xf0 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -4354,7 +4354,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 241 0xf1 '' */ + /* 241 0xf1 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -4372,7 +4372,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 242 0xf2 '' */ + /* 242 0xf2 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -4390,7 +4390,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 243 0xf3 '' */ + /* 243 0xf3 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -4408,7 +4408,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 244 0xf4 '' */ + /* 244 0xf4 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x0e, /* 00001110 */ @@ -4426,7 +4426,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x18, /* 00011000 */ 0x18, /* 00011000 */ - /* 245 0xf5 '' */ + /* 245 0xf5 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ 0x18, /* 00011000 */ @@ -4444,7 +4444,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 246 0xf6 '' */ + /* 246 0xf6 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -4462,7 +4462,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 247 0xf7 '' */ + /* 247 0xf7 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -4480,7 +4480,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 248 0xf8 '' */ + /* 248 0xf8 */ 0x00, /* 00000000 */ 0x38, /* 00111000 */ 0x6c, /* 01101100 */ @@ -4498,7 +4498,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 249 0xf9 '' */ + /* 249 0xf9 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -4516,7 +4516,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 250 0xfa '' */ + /* 250 0xfa */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -4534,7 +4534,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 251 0xfb '' */ + /* 251 0xfb */ 0x00, /* 00000000 */ 0x0f, /* 00001111 */ 0x0c, /* 00001100 */ @@ -4552,7 +4552,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 252 0xfc '' */ + /* 252 0xfc */ 0x00, /* 00000000 */ 0x6c, /* 01101100 */ 0x36, /* 00110110 */ @@ -4570,7 +4570,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 253 0xfd '' */ + /* 253 0xfd */ 0x00, /* 00000000 */ 0x3c, /* 00111100 */ 0x66, /* 01100110 */ @@ -4588,7 +4588,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 254 0xfe '' */ + /* 254 0xfe */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -4606,7 +4606,7 @@ static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ - /* 255 0xff '' */ + /* 255 0xff */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ -- cgit v1.2.1 From 8b5dea33584261cc5d600614970d1cbed6d99f91 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Wed, 3 Mar 2021 14:05:05 +0100 Subject: efi_loader: disable GRUB_ARM32_WORKAROUND on ARCH_SUNXI GRUB_ARM32_WORKAROUND can be disabled on ARCH_SUNXI as the Allwinner SoCs only have a level 2 cache controlled via CP15 and not an architecturally defined cache. Having the cache available speeds up booting Linux. On ARCH_BCM283X it is already disabled via rpi_2_defconfig. But let's move this setting to Kconfig. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index e729f727df..634d3b1ff4 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -281,7 +281,7 @@ config EFI_HAVE_RUNTIME_RESET config EFI_GRUB_ARM32_WORKAROUND bool "Workaround for GRUB on 32bit ARM" - default n if ARCH_QEMU + default n if ARCH_BCM283X || ARCH_SUNXI || ARCH_QEMU default y depends on ARM && !ARM64 help -- cgit v1.2.1 From 9ff9f4b4268946f3b73d9759766ccfcc599da004 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sun, 14 Mar 2021 20:04:24 +0100 Subject: efi_loader: fix memory type for memory reservation block The (yet unreleased version of the) devicetree specification clearly states that: As with the /reserved-memory node, when booting via UEFI entries in the Memory Reservation Block must also be listed in the system memory map obtained via the GetMemoryMap() toi protect against allocations by UEFI applications. The memory reservation block entries should be listed with type EfiReservedMemoryType. This restores the behaviour that was changed by commit 4cbb2930bd8c ("efi_loader: consider no-map property of reserved memory"). Fixes: 4cbb2930bd8c ("efi_loader: consider no-map property of reserved memory") Signed-off-by: Mark Kettenis Reviewed-by: Heinrich Schuchardt --- lib/efi_loader/efi_dt_fixup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_dt_fixup.c b/lib/efi_loader/efi_dt_fixup.c index a4529ee3ef..b6fe5d2e5a 100644 --- a/lib/efi_loader/efi_dt_fixup.c +++ b/lib/efi_loader/efi_dt_fixup.c @@ -61,7 +61,7 @@ void efi_carve_out_dt_rsv(void *fdt) for (i = 0; i < nr_rsv; i++) { if (fdt_get_mem_rsv(fdt, i, &addr, &size) != 0) continue; - efi_reserve_memory(addr, size, false); + efi_reserve_memory(addr, size, true); } /* process reserved-memory */ -- cgit v1.2.1 From fbc6ceae6f0d97672d11bef8df406ea31c49c0fe Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sun, 14 Mar 2021 10:12:01 +0100 Subject: efi_selftest: illegal cast to pointer in initrddump On 32bit systems u64 cannot directly be cast to void *. Signed-off-by: Heinrich Schuchardt --- lib/efi_selftest/initrddump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/efi_selftest/initrddump.c b/lib/efi_selftest/initrddump.c index c23a05c718..325951b498 100644 --- a/lib/efi_selftest/initrddump.c +++ b/lib/efi_selftest/initrddump.c @@ -272,7 +272,7 @@ static efi_status_t get_initrd(void **initrd, efi_uintn_t *initrd_size) error(L"Out of memory\r\n"); return ret; } - *initrd = (void *)buffer; + *initrd = (void *)(uintptr_t)buffer; ret = load_file2_prot->load_file(load_file2_prot, dp, false, initrd_size, *initrd); if (ret != EFI_SUCCESS) { -- cgit v1.2.1 From ad09004ac472dedeb6e72f703035e76efa9810ca Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 7 Feb 2021 14:27:01 -0700 Subject: mkeficapsule: Correct printf() strings Use %z when printing size_t values. This avoids errors on 32-bit machines. Signed-off-by: Simon Glass Use a conversion to size_t for printing stat.st_size. Reviewed-by: Heinrich Schuchardt Signed-off-by: Heinrich Schuchardt --- tools/mkeficapsule.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/mkeficapsule.c b/tools/mkeficapsule.c index 1613e74ca7..f272512451 100644 --- a/tools/mkeficapsule.c +++ b/tools/mkeficapsule.c @@ -278,7 +278,7 @@ static int create_fwbin(char *path, char *bin, efi_guid_t *guid, } data = malloc(bin_stat.st_size); if (!data) { - printf("cannot allocate memory: %lx\n", bin_stat.st_size); + printf("cannot allocate memory: %zx\n", (size_t)bin_stat.st_size); goto err_1; } f = fopen(path, "w"); @@ -297,7 +297,7 @@ static int create_fwbin(char *path, char *bin, efi_guid_t *guid, size = fwrite(&header, 1, sizeof(header), f); if (size < sizeof(header)) { - printf("write failed (%lx)\n", size); + printf("write failed (%zx)\n", size); goto err_3; } @@ -306,13 +306,13 @@ static int create_fwbin(char *path, char *bin, efi_guid_t *guid, capsule.payload_item_count = 1; size = fwrite(&capsule, 1, sizeof(capsule), f); if (size < (sizeof(capsule))) { - printf("write failed (%lx)\n", size); + printf("write failed (%zx)\n", size); goto err_3; } offset = sizeof(capsule) + sizeof(u64); size = fwrite(&offset, 1, sizeof(offset), f); if (size < sizeof(offset)) { - printf("write failed (%lx)\n", size); + printf("write failed (%zx)\n", size); goto err_3; } @@ -329,17 +329,17 @@ static int create_fwbin(char *path, char *bin, efi_guid_t *guid, size = fwrite(&image, 1, sizeof(image), f); if (size < sizeof(image)) { - printf("write failed (%lx)\n", size); + printf("write failed (%zx)\n", size); goto err_3; } size = fread(data, 1, bin_stat.st_size, g); if (size < bin_stat.st_size) { - printf("read failed (%lx)\n", size); + printf("read failed (%zx)\n", size); goto err_3; } size = fwrite(data, 1, bin_stat.st_size, f); if (size < bin_stat.st_size) { - printf("write failed (%lx)\n", size); + printf("write failed (%zx)\n", size); goto err_3; } -- cgit v1.2.1 From d2ac8af95b690b490e1f336acc13037102c8828e Mon Sep 17 00:00:00 2001 From: Ilias Apalodimas Date: Sat, 13 Mar 2021 23:47:32 +0200 Subject: efi_selftest: Remove loadfile2 for initrd selftests We are redefining how u-boot locates the initrd to load via the kernel LoadFile2 protocol. This selftest is not relevant any more, so remove it. A new one will be added later Signed-off-by: Ilias Apalodimas Reviewed-by: Heinrich Schuchardt Signed-off-by: Heinrich Schuchardt --- lib/efi_selftest/Makefile | 1 - lib/efi_selftest/efi_selftest_load_initrd.c | 221 ---------------------------- 2 files changed, 222 deletions(-) delete mode 100644 lib/efi_selftest/efi_selftest_load_initrd.c diff --git a/lib/efi_selftest/Makefile b/lib/efi_selftest/Makefile index b02fd56e0a..50de581b77 100644 --- a/lib/efi_selftest/Makefile +++ b/lib/efi_selftest/Makefile @@ -61,7 +61,6 @@ obj-$(CONFIG_CPU_V7) += efi_selftest_unaligned.o obj-$(CONFIG_EFI_LOADER_HII) += efi_selftest_hii.o obj-$(CONFIG_EFI_RNG_PROTOCOL) += efi_selftest_rng.o obj-$(CONFIG_EFI_GET_TIME) += efi_selftest_rtc.o -obj-$(CONFIG_EFI_LOAD_FILE2_INITRD) += efi_selftest_load_initrd.o obj-$(CONFIG_EFI_TCG2_PROTOCOL) += efi_selftest_tcg2.o ifeq ($(CONFIG_GENERATE_ACPI_TABLE),) diff --git a/lib/efi_selftest/efi_selftest_load_initrd.c b/lib/efi_selftest/efi_selftest_load_initrd.c deleted file mode 100644 index f591dcd211..0000000000 --- a/lib/efi_selftest/efi_selftest_load_initrd.c +++ /dev/null @@ -1,221 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * efi_selftest_load_initrd - * - * Copyright (c) 2020 Ilias Apalodimas - * - * This test checks the FileLoad2 protocol. - * A known file is read from the file system and verified. - * - * An example usage - given a file image with a file system in partition 1 - * holding file initrd - is: - * - * * Configure the sandbox with - * - * CONFIG_EFI_SELFTEST=y - * CONFIG_EFI_LOAD_FILE2_INITRD=y - * CONFIG_EFI_INITRD_FILESPEC="host 0:1 initrd" - * - * * Run ./u-boot and execute - * - * host bind 0 image - * setenv efi_selftest load initrd - * bootefi selftest - * - * This would provide a test output like: - * - * Testing EFI API implementation - * - * Selected test: 'load initrd' - * - * Setting up 'load initrd' - * Setting up 'load initrd' succeeded - * - * Executing 'load initrd' - * Loaded 12378613 bytes - * CRC32 2997478465 - * - * Now the size and CRC32 can be compared to the provided file. - */ - -#include -#include -#include - -static struct efi_boot_services *boottime; - -static struct efi_initrd_dp dp = { - .vendor = { - { - DEVICE_PATH_TYPE_MEDIA_DEVICE, - DEVICE_PATH_SUB_TYPE_VENDOR_PATH, - sizeof(dp.vendor), - }, - EFI_INITRD_MEDIA_GUID, - }, - .end = { - DEVICE_PATH_TYPE_END, - DEVICE_PATH_SUB_TYPE_END, - sizeof(dp.end), - } -}; - -static struct efi_initrd_dp dp_invalid = { - .vendor = { - { - DEVICE_PATH_TYPE_MEDIA_DEVICE, - DEVICE_PATH_SUB_TYPE_VENDOR_PATH, - sizeof(dp.vendor), - }, - EFI_INITRD_MEDIA_GUID, - }, - .end = { - 0x8f, /* invalid */ - 0xfe, /* invalid */ - sizeof(dp.end), - } -}; - -static int setup(const efi_handle_t handle, - const struct efi_system_table *systable) -{ - boottime = systable->boottime; - - return EFI_ST_SUCCESS; -} - -static int execute(void) -{ - struct efi_load_file_protocol *lf2; - struct efi_device_path *dp2, *dp2_invalid; - efi_status_t status; - efi_handle_t handle; - char buffer[64]; - efi_uintn_t buffer_size; - void *buf; - u32 crc32; - - memset(buffer, 0, sizeof(buffer)); - - dp2 = (struct efi_device_path *)&dp; - status = boottime->locate_device_path(&efi_guid_load_file2_protocol, - &dp2, &handle); - if (status != EFI_SUCCESS) { - efi_st_error("Unable to locate device path\n"); - return EFI_ST_FAILURE; - } - - status = boottime->handle_protocol(handle, - &efi_guid_load_file2_protocol, - (void **)&lf2); - if (status != EFI_SUCCESS) { - efi_st_error("Unable to locate protocol\n"); - return EFI_ST_FAILURE; - } - - /* Case 1: - * buffer_size can't be NULL - * protocol can't be NULL - */ - status = lf2->load_file(lf2, dp2, false, NULL, &buffer); - if (status != EFI_INVALID_PARAMETER) { - efi_st_error("Buffer size can't be NULL\n"); - return EFI_ST_FAILURE; - } - buffer_size = sizeof(buffer); - status = lf2->load_file(NULL, dp2, false, &buffer_size, &buffer); - if (status != EFI_INVALID_PARAMETER) { - efi_st_error("Protocol can't be NULL\n"); - return EFI_ST_FAILURE; - } - - /* - * Case 2: Match end node type/sub-type on device path - */ - dp2_invalid = (struct efi_device_path *)&dp_invalid; - buffer_size = sizeof(buffer); - status = lf2->load_file(lf2, dp2_invalid, false, &buffer_size, &buffer); - if (status != EFI_INVALID_PARAMETER) { - efi_st_error("Invalid device path type must return EFI_INVALID_PARAMETER\n"); - return EFI_ST_FAILURE; - } - - status = lf2->load_file(lf2, dp2_invalid, false, &buffer_size, &buffer); - if (status != EFI_INVALID_PARAMETER) { - efi_st_error("Invalid device path sub-type must return EFI_INVALID_PARAMETER\n"); - return EFI_ST_FAILURE; - } - - /* - * Case 3: - * BootPolicy 'true' must return EFI_UNSUPPORTED - */ - buffer_size = sizeof(buffer); - status = lf2->load_file(lf2, dp2, true, &buffer_size, &buffer); - if (status != EFI_UNSUPPORTED) { - efi_st_error("BootPolicy true must return EFI_UNSUPPORTED\n"); - return EFI_ST_FAILURE; - } - - /* - * Case: Pass buffer size as zero, firmware must return - * EFI_BUFFER_TOO_SMALL and an appropriate size - */ - buffer_size = 0; - status = lf2->load_file(lf2, dp2, false, &buffer_size, NULL); - if (status != EFI_BUFFER_TOO_SMALL || !buffer_size) { - efi_st_printf("buffer_size: %u\n", (unsigned int)buffer_size); - efi_st_printf("status: %x\n", (unsigned int)status); - efi_st_error("Buffer size not updated\n"); - return EFI_ST_FAILURE; - } - - /* - * Case: Pass buffer size as smaller than the file_size, - * firmware must return * EFI_BUFFER_TOO_SMALL and an appropriate size - */ - buffer_size = 1; - status = lf2->load_file(lf2, dp2, false, &buffer_size, &buffer); - if (status != EFI_BUFFER_TOO_SMALL || buffer_size <= 1) { - efi_st_error("Buffer size not updated\n"); - return EFI_ST_FAILURE; - } - - status = boottime->allocate_pool(EFI_BOOT_SERVICES_DATA, buffer_size, - &buf); - if (status != EFI_SUCCESS) { - efi_st_error("Cannot allocate buffer\n"); - return EFI_ST_FAILURE; - } - - /* Case: Pass correct buffer, load the file and verify checksum*/ - status = lf2->load_file(lf2, dp2, false, &buffer_size, buf); - if (status != EFI_SUCCESS) { - efi_st_error("Loading initrd failed\n"); - return EFI_ST_FAILURE; - } - - efi_st_printf("Loaded %u bytes\n", (unsigned int)buffer_size); - status = boottime->calculate_crc32(buf, buffer_size, &crc32); - if (status != EFI_SUCCESS) { - efi_st_error("Could not determine CRC32\n"); - return EFI_ST_FAILURE; - } - efi_st_printf("CRC32 %.8x\n", (unsigned int)crc32); - - status = boottime->free_pool(buf); - if (status != EFI_SUCCESS) { - efi_st_error("Cannot free buffer\n"); - return EFI_ST_FAILURE; - } - - return EFI_ST_SUCCESS; -} - -EFI_UNIT_TEST(load_initrd) = { - .name = "load initrd", - .phase = EFI_EXECUTE_BEFORE_BOOTTIME_EXIT, - .setup = setup, - .execute = execute, - .on_request = true, -}; -- cgit v1.2.1 From 64d809b4cbecd2d767b1c51d1107e40d25fd174e Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 7 Feb 2021 14:27:02 -0700 Subject: efi: Fix compiler warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This occur when building on Raspberry Pi 400 (32-bit ARM). Fix them. Examples: cmd/efidebug.c: In function ‘do_efi_capsule_update’: cmd/efidebug.c:75:49: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ret = EFI_CALL(RT->update_capsule(&capsule, 1, (u64)NULL)); ^ include/efi_loader.h:104:9: note: in definition of macro ‘EFI_CALL’ typeof(exp) _r = exp; \ ^~~ cmd/efidebug.c:75:49: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] ret = EFI_CALL(RT->update_capsule(&capsule, 1, (u64)NULL)); ^ include/efi_loader.h:104:19: note: in definition of macro ‘EFI_CALL’ typeof(exp) _r = exp; \ ^~~ In file included from include/common.h:20, from lib/efi_loader/efi_capsule.c:9: lib/efi_loader/efi_capsule.c: In function ‘efi_update_capsule’: include/efi_loader.h:83:8: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 10 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=] debug("%sEFI: Entry %s(" format ")\n", __efi_nesting_inc(), \ ^~~~~~~~~~~~~~~~~~ include/linux/printk.h:37:21: note: in definition of macro ‘pr_fmt’ #define pr_fmt(fmt) fmt ^~~ include/log.h:229:2: note: in expansion of macro ‘log’ log(LOG_CATEGORY, LOGL_DEBUG, fmt, ##args); \ ^~~ include/log.h:249:2: note: in expansion of macro ‘debug_cond’ debug_cond(_DEBUG, fmt, ##args) ^~~~~~~~~~ include/efi_loader.h:83:2: note: in expansion of macro ‘debug’ debug("%sEFI: Entry %s(" format ")\n", __efi_nesting_inc(), \ ^~~~~ lib/efi_loader/efi_capsule.c:444:2: note: in expansion of macro ‘EFI_ENTRY’ EFI_ENTRY("%p, %lu, %llu\n", capsule_header_array, capsule_count, ^~~~~~~~~ lib/efi_loader/efi_capsule.c:444:19: note: format string is defined here EFI_ENTRY("%p, %lu, %llu\n", capsule_header_array, capsule_count, ~~^ %u Signed-off-by: Simon Glass Replace (uintptr_t)NULL by 0. Reviewed-by: Heinrich Schuchardt --- cmd/efidebug.c | 2 +- lib/efi_loader/efi_capsule.c | 4 ++-- lib/efi_loader/efi_firmware.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/efidebug.c b/cmd/efidebug.c index e4030f514a..55c7abe3d0 100644 --- a/cmd/efidebug.c +++ b/cmd/efidebug.c @@ -72,7 +72,7 @@ static int do_efi_capsule_update(struct cmd_tbl *cmdtp, int flag, capsule->capsule_image_size); } - ret = EFI_CALL(RT->update_capsule(&capsule, 1, (u64)NULL)); + ret = EFI_CALL(RT->update_capsule(&capsule, 1, 0)); if (ret) { printf("Cannot handle a capsule at %p", capsule); return CMD_RET_FAILURE; diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c index b57f0302c5..7ba1ced0a0 100644 --- a/lib/efi_loader/efi_capsule.c +++ b/lib/efi_loader/efi_capsule.c @@ -449,7 +449,7 @@ efi_status_t EFIAPI efi_update_capsule( unsigned int i; efi_status_t ret; - EFI_ENTRY("%p, %lu, %llu\n", capsule_header_array, capsule_count, + EFI_ENTRY("%p, %zu, %llu\n", capsule_header_array, capsule_count, scatter_gather_list); if (!capsule_count) { @@ -509,7 +509,7 @@ efi_status_t EFIAPI efi_query_capsule_caps( unsigned int i; efi_status_t ret; - EFI_ENTRY("%p, %lu, %p, %p\n", capsule_header_array, capsule_count, + EFI_ENTRY("%p, %zu, %p, %p\n", capsule_header_array, capsule_count, maximum_capsule_size, reset_type); if (!maximum_capsule_size) { diff --git a/lib/efi_loader/efi_firmware.c b/lib/efi_loader/efi_firmware.c index 5e401bbca2..7a3cca2793 100644 --- a/lib/efi_loader/efi_firmware.c +++ b/lib/efi_loader/efi_firmware.c @@ -299,7 +299,7 @@ efi_status_t EFIAPI efi_firmware_fit_set_image( efi_status_t (*progress)(efi_uintn_t completion), u16 **abort_reason) { - EFI_ENTRY("%p %d %p %ld %p %p %p\n", this, image_index, image, + EFI_ENTRY("%p %d %p %zd %p %p %p\n", this, image_index, image, image_size, vendor_code, progress, abort_reason); if (!image || image_index != 1) @@ -414,7 +414,7 @@ efi_status_t EFIAPI efi_firmware_raw_set_image( efi_status_t status; efi_uintn_t capsule_payload_size; - EFI_ENTRY("%p %d %p %ld %p %p %p\n", this, image_index, image, + EFI_ENTRY("%p %d %p %zd %p %p %p\n", this, image_index, image, image_size, vendor_code, progress, abort_reason); if (!image) -- cgit v1.2.1 From 75d48d11db2e2f07659abbbf2dc0483e929b3fc2 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 5 Mar 2021 12:58:37 +0100 Subject: doc: move README.dfu to HTML documentation Move README.dfu to doc/usage/dfu.rst and convert to reStructured text. In the long run this page should be split into two. One for the overview and one for the dfu command. UEFI capsule updates and dfutftp should be integrated into the overview page. Signed-off-by: Heinrich Schuchardt --- MAINTAINERS | 1 + doc/README.dfu | 311 ---------------------------------------- doc/usage/dfu.rst | 404 ++++++++++++++++++++++++++++++++++++++++++++++++++++ doc/usage/index.rst | 1 + 4 files changed, 406 insertions(+), 311 deletions(-) delete mode 100644 doc/README.dfu create mode 100644 doc/usage/dfu.rst diff --git a/MAINTAINERS b/MAINTAINERS index de499940e5..c6dd9bf838 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -670,6 +670,7 @@ F: common/dfu.c F: common/update.c F: common/usb_storage.c F: doc/api/dfu.rst +F: doc/usage/dfu.rst F: drivers/dfu/ F: drivers/usb/gadget/ F: include/dfu.h diff --git a/doc/README.dfu b/doc/README.dfu deleted file mode 100644 index eacd5bbfb4..0000000000 --- a/doc/README.dfu +++ /dev/null @@ -1,311 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ - -Device Firmware Upgrade (DFU) - -Overview: - - The Device Firmware Upgrade (DFU) allows to download and upload firmware - to/from U-Boot connected over USB. - - U-boot follows the Universal Serial Bus Device Class Specification for - Device Firmware Upgrade Version 1.1 the USB forum (DFU v1.1 in www.usb.org). - - U-Boot implements this DFU capability (CONFIG_DFU) with the command dfu - (cmd/dfu.c / CONFIG_CMD_DFU) based on: - - the DFU stack (common/dfu.c and common/spl/spl_dfu.c), based on the - USB DFU download gadget (drivers/usb/gadget/f_dfu.c) - - The access to mediums is done in DFU backends (driver/dfu) - - Today the supported DFU backends are: - - MMC (RAW or FAT / EXT2 / EXT3 / EXT4 file system / SKIP / SCRIPT) - - NAND - - RAM - - SF (serial flash) - - MTD (all MTD device: NAND, SPI-NOR, SPI-NAND,...) - - virtual - - These DFU backends are also used by - - the dfutftp (see README.dfutftp) - - the thordown command (cmd/thordown.c and gadget/f_thor.c) - - The "virtual" backend is a generic DFU backend to support a board specific - target (for example OTP), only based on the weak functions: - - dfu_write_medium_virt - - dfu_get_medium_size_virt - - dfu_read_medium_virt - -Configuration Options: - CONFIG_DFU - CONFIG_DFU_OVER_USB - CONFIG_DFU_MMC - CONFIG_DFU_MTD - CONFIG_DFU_NAND - CONFIG_DFU_RAM - CONFIG_DFU_SF - CONFIG_DFU_SF_PART - CONFIG_DFU_TIMEOUT - CONFIG_DFU_VIRTUAL - CONFIG_CMD_DFU - -Environment variables: - the dfu command uses 3 environments variables: - "dfu_alt_info" : the DFU setting for the USB download gadget with a semicolon - separated string of information on each alternate: - dfu_alt_info=";;....;" - - when several devices are used, the format is: - - '='alternate list (';' separated) - - each interface is separated by '&' - dfu_alt_info=\ - " =;....;&"\ - " =;....;&"\ - ...\ - " =;....;&" - - "dfu_bufsiz" : size of the DFU buffer, when absent, use - CONFIG_SYS_DFU_DATA_BUF_SIZE (8 MiB by default) - - "dfu_hash_algo" : name of the hash algorithm to use - -Commands: - dfu [ ] list - list the alternate device defined in "dfu_alt_info" - - dfu [ ] [] - start the dfu stack on the USB instance with the selected medium - backend and use the "dfu_alt_info" variable to configure the - alternate setting and link each one with the medium - The dfu command continue until receive a ^C in console or - a DFU detach transaction from HOST. If CONFIG_DFU_TIMEOUT option - is enabled and parameter is present in the command line, - the DFU operation will be aborted automatically after - seconds of waiting remote to initiate DFU session. - - The possible values of are : - (with = 0 in the dfu command example) - - "mmc" (for eMMC and SD card) - cmd: dfu 0 mmc - each element in "dfu_alt_info" = - raw [mmcpart ] raw access to mmc device - part [mmcpart ] raw access to partition - fat [mmcpart ] file in FAT partition - ext4 [mmcpart ] file in EXT4 partition - skip 0 0 ignore flashed data - script 0 0 execute commands in shell - - with being the GPT or DOS partition index, - with being the eMMC hardware partition number. - - A value of environment variable dfu_alt_info for eMMC could be: - - "u-boot raw 0x3e 0x800 mmcpart 1;bl2 raw 0x1e 0x1d mmcpart 1" - - A value of environment variable dfu_alt_info for SD card could be: - - "u-boot raw 0x80 0x800;uImage ext4 0 2" - - If don't want to flash given image file to storage, use "skip" type - entity. - - It can be used to protect flashing wrong image for the specific board. - - Especailly, this layout will be useful when thor protocol is used, - which performs flashing in batch mode, where more than one file is - processed. - For example, if one makes a single tar file with support for the two - boards with u-boot-.bin and u-boot-.bin files, one - can use it to flash a proper u-boot image on both without a failure: - - "u-boot-.bin raw 0x80 0x800; u-boot-.bin skip 0 0" - - When flashing new system image requires do some more complex things - than just writing data to the storage medium, one can use 'script' - type. Data written to such entity will be executed as a command list - in the u-boot's shell. This for example allows to re-create partition - layout and even set new dfu_alt_info for the newly created paritions. - Such script would look like: - --->8--- - setenv dfu_alt_info ... - setenv mbr_parts ... - mbr write ... - --->8--- - Please note that this means that user will be able to execute any - arbitrary commands just like in the u-boot's shell. - - "nand" (raw slc nand device) - cmd: dfu 0 nand - each element in "dfu_alt_info" = - raw raw access to mmc device - part raw acces to partition - partubi raw acces to ubi partition - - with is the MTD partition index - - "ram" - cmd: dfu 0 ram - ( is not used for RAM target) - each element in "dfu_alt_info" = - ram raw access to ram - - "sf" (serial flash : NOR) - cmd: dfu 0 sf - each element in "dfu_alt_info" = - raw raw access to sf device - part raw acces to partition - partubi raw acces to ubi partition - - with is the MTD partition index - - "mtd" (all MTD device: NAND, SPI-NOR, SPI-NAND,...) - cmd: dfu 0 mtd - with the mtd identifier as defined in mtd command - (nand0, nor0, spi-nand0,...) - each element in "dfu_alt_info" = - raw raw access to mtd device - part raw acces to partition - partubi raw acces to ubi partition - - with is the MTD partition index - - "virt" - cmd: dfu 0 virt - each element in "dfu_alt_info" = - - - and are absent: - the dfu command to use multiple devices - cmd: dfu 0 list - cmd: dfu 0 - "dfu_alt_info" variable provides the list of with - alternate list separated by '&' with the same format for each - mmc =;....; - nand =;....; - ram =;....; - sf =;....; - mtd =;....; - virt =;....; - -Callbacks: - The weak callback functions can be implemented to manage specific behavior - - dfu_initiated_callback : called when the DFU transaction is started, - used to initiase the device - - dfu_flush_callback : called at the end of the DFU write after DFU - manifestation, used to manage the device when - DFU transaction is closed - -Host tools: - When U-Boot runs the dfu stack, the DFU host tools can be used - to send/receive firmwares on each configurated alternate. - - For example dfu-util is a host side implementation of the DFU 1.1 - specifications(http://dfu-util.sourceforge.net/) which works with U-Boot. - -Usage: - Example 1: firmware located in eMMC or SD card, with: - - alternate 1 (alt=1) for SPL partition (GPT partition 1) - - alternate 2 (alt=2) for U-Boot partition (GPT partition 2) - - The U-Boot configuration is: - - U-Boot> env set dfu_alt_info "spl part 0 1;u-boot part 0 2" - - U-Boot> dfu 0 mmc 0 list - DFU alt settings list: - dev: eMMC alt: 0 name: spl layout: RAW_ADDR - dev: eMMC alt: 1 name: u-boot layout: RAW_ADDR - - Boot> dfu 0 mmc 0 - - On the Host side: - - list the available alternate setting: - - $> dfu-util -l - dfu-util 0.9 - - Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. - Copyright 2010-2016 Tormod Volden and Stefan Schmidt - This program is Free Software and has ABSOLUTELY NO WARRANTY - Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ - - Found DFU: [0483:5720] ver=0200, devnum=45, cfg=1, intf=0, path="3-1.3.1", \ - alt=1, name="u-boot", serial="003A00203438510D36383238" - Found DFU: [0483:5720] ver=0200, devnum=45, cfg=1, intf=0, path="3-1.3.1", \ - alt=0, name="spl", serial="003A00203438510D36383238" - - To download to U-Boot, use -D option - - $> dfu-util -a 0 -D u-boot-spl.bin - $> dfu-util -a 1 -D u-boot.bin - - To upload from U-Boot, use -U option - - $> dfu-util -a 0 -U u-boot-spl.bin - $> dfu-util -a 1 -U u-boot.bin - - To request a DFU detach and reset the USB connection: - $> dfu-util -a 0 -e -R - - - Example 2: firmware located in NOR (sf) and NAND, with: - - alternate 1 (alt=1) for SPL partition (NOR GPT partition 1) - - alternate 2 (alt=2) for U-Boot partition (NOR GPT partition 2) - - alternate 3 (alt=3) for U-Boot-env partition (NOR GPT partition 3) - - alternate 4 (alt=4) for UBI partition (NAND GPT partition 1) - - U-Boot> env set dfu_alt_info \ - "sf 0:0:10000000:0=spl part 0 1;u-boot part 0 2; \ - u-boot-env part 0 3&nand 0=UBI partubi 0,1" - - U-Boot> dfu 0 list - - DFU alt settings list: - dev: SF alt: 0 name: spl layout: RAW_ADDR - dev: SF alt: 1 name: ssbl layout: RAW_ADDR - dev: SF alt: 2 name: u-boot-env layout: RAW_ADDR - dev: NAND alt: 3 name: UBI layout: RAW_ADDR - - U-Boot> dfu 0 - - $> dfu-util -l - Found DFU: [0483:5720] ver=9999, devnum=96, cfg=1,\ - intf=0, alt=3, name="UBI", serial="002700333338511934383330" - Found DFU: [0483:5720] ver=9999, devnum=96, cfg=1,\ - intf=0, alt=2, name="u-boot-env", serial="002700333338511934383330" - Found DFU: [0483:5720] ver=9999, devnum=96, cfg=1,\ - intf=0, alt=1, name="u-boot", serial="002700333338511934383330" - Found DFU: [0483:5720] ver=9999, devnum=96, cfg=1,\ - intf=0, alt=0, name="spl", serial="002700333338511934383330" - - Same example with MTD backend - - U-Boot> env set dfu_alt_info \ - "mtd nor0=spl part 1;u-boot part 2;u-boot-env part 3&"\ - "mtd nand0=UBI partubi 1" - - U-Boot> dfu 0 list - using id 'nor0,0' - using id 'nor0,1' - using id 'nor0,2' - using id 'nand0,0' - DFU alt settings list: - dev: MTD alt: 0 name: spl layout: RAW_ADDR - dev: MTD alt: 1 name: u-boot layout: RAW_ADDR - dev: MTD alt: 2 name: u-boot-env layout: RAW_ADDR - dev: MTD alt: 3 name: UBI layout: RAW_ADDR - - Example 3: firmware located in SD Card (mmc) and virtual partition on - OTP and PMIC not volatile memory - - alternate 1 (alt=1) for scard - - alternate 2 (alt=2) for OTP (virtual) - - alternate 3 (alt=3) for PMIC NVM (virtual) - - U-Boot> env set dfu_alt_info \ - "mmc 0=sdcard raw 0 0x100000&"\ - "virt 0=otp" \ - "virt 1=pmic" - - U-Boot> dfu 0 list - DFU alt settings list: - dev: eMMC alt: 0 name: sdcard layout: RAW_ADDR - dev: VIRT alt: 1 name: otp layout: RAW_ADDR - dev: VIRT alt: 2 name: pmic layout: RAW_ADDR diff --git a/doc/usage/dfu.rst b/doc/usage/dfu.rst new file mode 100644 index 0000000000..11c88072b8 --- /dev/null +++ b/doc/usage/dfu.rst @@ -0,0 +1,404 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +Device Firmware Upgrade (DFU) +============================= + +Overview +-------- + +The Device Firmware Upgrade (DFU) allows to download and upload firmware +to/from U-Boot connected over USB. + +U-boot follows the Universal Serial Bus Device Class Specification for +Device Firmware Upgrade Version 1.1 the USB forum (DFU v1.1 in www.usb.org). + +U-Boot implements this DFU capability (CONFIG_DFU) with the command dfu +(cmd/dfu.c / CONFIG_CMD_DFU) based on: + +- the DFU stack (common/dfu.c and common/spl/spl_dfu.c), based on the + USB DFU download gadget (drivers/usb/gadget/f_dfu.c) +- The access to mediums is done in DFU backends (driver/dfu) + +Today the supported DFU backends are: + +- MMC (RAW or FAT / EXT2 / EXT3 / EXT4 file system / SKIP / SCRIPT) +- NAND +- RAM +- SF (serial flash) +- MTD (all MTD device: NAND, SPI-NOR, SPI-NAND,...) +- virtual + +These DFU backends are also used by + +- the dfutftp (see README.dfutftp) +- the thordown command (cmd/thordown.c and gadget/f_thor.c) + +The "virtual" backend is a generic DFU backend to support a board specific +target (for example OTP), only based on the weak functions: + +- dfu_write_medium_virt +- dfu_get_medium_size_virt +- dfu_read_medium_virt + +Configuration Options +--------------------- + +The following configuration option are relevant for device firmware upgrade: + +* CONFIG_DFU +* CONFIG_DFU_OVER_USB +* CONFIG_DFU_MMC +* CONFIG_DFU_MTD +* CONFIG_DFU_NAND +* CONFIG_DFU_RAM +* CONFIG_DFU_SF +* CONFIG_DFU_SF_PART +* CONFIG_DFU_TIMEOUT +* CONFIG_DFU_VIRTUAL +* CONFIG_CMD_DFU + +Environment variables +--------------------- + +The dfu command uses 3 environments variables: + +dfu_alt_info + The DFU setting for the USB download gadget with a semicolon separated + string of information on each alternate:: + + dfu_alt_info=";;....;" + + When several devices are used, the format is: + + - '='alternate list (';' separated) + - each interface is separated by '&':: + + dfu_alt_info=\ + " =;....;&"\ + " =;....;&"\ + ...\ + " =;....;&" + +dfu_bufsiz + size of the DFU buffer, when absent, defaults to + CONFIG_SYS_DFU_DATA_BUF_SIZE (8 MiB by default) + +dfu_hash_algo + name of the hash algorithm to use + +Commands +-------- + +dfu [ ] list + list the alternate device defined in *dfu_alt_info* + +dfu [ ] [] + start the dfu stack on the USB instance with the selected medium + backend and use the *dfu_alt_info* variable to configure the + alternate setting and link each one with the medium + The dfu command continue until receive a ^C in console or + a DFU detach transaction from HOST. If CONFIG_DFU_TIMEOUT option + is enabled and parameter is present in the command line, + the DFU operation will be aborted automatically after + seconds of waiting remote to initiate DFU session. + +The possible values of are (with = 0 in the dfu +command example) + +mmc + for eMMC and SD card:: + + dfu 0 mmc + + each element in *dfu_alt_info* being + + * raw [mmcpart ] raw access to mmc device + * part [mmcpart ] raw access to partition + * fat [mmcpart ] file in FAT partition + * ext4 [mmcpart ] file in EXT4 partition + * skip 0 0 ignore flashed data + * script 0 0 execute commands in shell + + with + + partid + being the GPT or DOS partition index, + num + being the eMMC hardware partition number. + + A value of environment variable *dfu_alt_info* for eMMC could be:: + + u-boot raw 0x3e 0x800 mmcpart 1;bl2 raw 0x1e 0x1d mmcpart 1 + + A value of environment variable *dfu_alt_info* for SD card could be:: + + u-boot raw 0x80 0x800;uImage ext4 0 2 + + If don't want to flash given image file to storage, use "skip" type + entity. + + - It can be used to protect flashing wrong image for the specific board. + - Especailly, this layout will be useful when thor protocol is used, + which performs flashing in batch mode, where more than one file is + processed. + + For example, if one makes a single tar file with support for the two + boards with u-boot-.bin and u-boot-.bin files, one + can use it to flash a proper u-boot image on both without a failure:: + + u-boot-.bin raw 0x80 0x800; u-boot-.bin skip 0 0 + + When flashing new system image requires do some more complex things + than just writing data to the storage medium, one can use 'script' + type. Data written to such entity will be executed as a command list + in the u-boot's shell. This for example allows to re-create partition + layout and even set new *dfu_alt_info* for the newly created paritions. + Such script would look like:: + + setenv dfu_alt_info ... + setenv mbr_parts ... + mbr write ... + + Please note that this means that user will be able to execute any + arbitrary commands just like in the u-boot's shell. + +nand + raw slc nand device:: + + dfu 0 nand + + each element in *dfu_alt_info* being either of + + * raw raw access to mmc device + * part raw acces to partition + * partubi raw acces to ubi partition + + with + + partid + is the MTD partition index + +ram + raw access to ram:: + + dfu 0 ram + + dev + is not used for RAM target + + each element in *dfu_alt_info* being:: + + ram raw access to ram + +sf + serial flash : NOR:: + + cmd: dfu 0 sf + + each element in *dfu_alt_info* being either of: + + * raw raw access to sf device + * part raw acces to partition + * partubi raw acces to ubi partition + + with + + partid + is the MTD partition index + +mtd + all MTD device: NAND, SPI-NOR, SPI-NAND,...:: + + cmd: dfu 0 mtd + + with + + dev + the mtd identifier as defined in mtd command + (nand0, nor0, spi-nand0,...) + + each element in *dfu_alt_info* being either of: + + * raw forraw access to mtd device + * part for raw acces to partition + * partubi for raw acces to ubi partition + + with + + partid + is the MTD partition index + +virt + virtual flash back end for DFU + + :: + + cmd: dfu 0 virt + + each element in *dfu_alt_info* being: + + * + + and are absent, the dfu command to use multiple devices:: + + cmd: dfu 0 list + cmd: dfu 0 + +*dfu_alt_info* variable provides the list of with +alternate list separated by '&' with the same format for each :: + + mmc =;....; + nand =;....; + ram =;....; + sf =;....; + mtd =;....; + virt =;....; + +Callbacks +--------- + +The weak callback functions can be implemented to manage specific behavior + +dfu_initiated_callback + called when the DFU transaction is started, used to initiase the device + +dfu_flush_callback + called at the end of the DFU write after DFU manifestation, used to manage + the device when DFU transaction is closed + +Host tools +---------- + +When U-Boot runs the dfu stack, the DFU host tools can be used +to send/receive firmwares on each configurated alternate. + +For example dfu-util is a host side implementation of the DFU 1.1 +specifications(http://dfu-util.sourceforge.net/) which works with U-Boot. + +Usage +----- + +Example 1: firmware located in eMMC or SD card, with: + +- alternate 1 (alt=1) for SPL partition (GPT partition 1) +- alternate 2 (alt=2) for U-Boot partition (GPT partition 2) + +The U-Boot configuration is:: + + U-Boot> env set dfu_alt_info "spl part 0 1;u-boot part 0 2" + + U-Boot> dfu 0 mmc 0 list + DFU alt settings list: + dev: eMMC alt: 0 name: spl layout: RAW_ADDR + dev: eMMC alt: 1 name: u-boot layout: RAW_ADDR + + Boot> dfu 0 mmc 0 + +On the Host side: + +list the available alternate setting:: + + $> dfu-util -l + dfu-util 0.9 + + Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. + Copyright 2010-2016 Tormod Volden and Stefan Schmidt + This program is Free Software and has ABSOLUTELY NO WARRANTY + Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ + + Found DFU: [0483:5720] ver=0200, devnum=45, cfg=1, intf=0, path="3-1.3.1", \ + alt=1, name="u-boot", serial="003A00203438510D36383238" + Found DFU: [0483:5720] ver=0200, devnum=45, cfg=1, intf=0, path="3-1.3.1", \ + alt=0, name="spl", serial="003A00203438510D36383238" + + To download to U-Boot, use -D option + + $> dfu-util -a 0 -D u-boot-spl.bin + $> dfu-util -a 1 -D u-boot.bin + + To upload from U-Boot, use -U option + + $> dfu-util -a 0 -U u-boot-spl.bin + $> dfu-util -a 1 -U u-boot.bin + + To request a DFU detach and reset the USB connection: + $> dfu-util -a 0 -e -R + + +Example 2: firmware located in NOR (sf) and NAND, with: + +- alternate 1 (alt=1) for SPL partition (NOR GPT partition 1) +- alternate 2 (alt=2) for U-Boot partition (NOR GPT partition 2) +- alternate 3 (alt=3) for U-Boot-env partition (NOR GPT partition 3) +- alternate 4 (alt=4) for UBI partition (NAND GPT partition 1) + +:: + + U-Boot> env set dfu_alt_info \ + "sf 0:0:10000000:0=spl part 0 1;u-boot part 0 2; \ + u-boot-env part 0 3&nand 0=UBI partubi 0,1" + + U-Boot> dfu 0 list + + DFU alt settings list: + dev: SF alt: 0 name: spl layout: RAW_ADDR + dev: SF alt: 1 name: ssbl layout: RAW_ADDR + dev: SF alt: 2 name: u-boot-env layout: RAW_ADDR + dev: NAND alt: 3 name: UBI layout: RAW_ADDR + + U-Boot> dfu 0 + +:: + + $> dfu-util -l + Found DFU: [0483:5720] ver=9999, devnum=96, cfg=1,\ + intf=0, alt=3, name="UBI", serial="002700333338511934383330" + Found DFU: [0483:5720] ver=9999, devnum=96, cfg=1,\ + intf=0, alt=2, name="u-boot-env", serial="002700333338511934383330" + Found DFU: [0483:5720] ver=9999, devnum=96, cfg=1,\ + intf=0, alt=1, name="u-boot", serial="002700333338511934383330" + Found DFU: [0483:5720] ver=9999, devnum=96, cfg=1,\ + intf=0, alt=0, name="spl", serial="002700333338511934383330" + +Same example with MTD backend + +:: + + U-Boot> env set dfu_alt_info \ + "mtd nor0=spl part 1;u-boot part 2;u-boot-env part 3&"\ + "mtd nand0=UBI partubi 1" + + U-Boot> dfu 0 list + using id 'nor0,0' + using id 'nor0,1' + using id 'nor0,2' + using id 'nand0,0' + DFU alt settings list: + dev: MTD alt: 0 name: spl layout: RAW_ADDR + dev: MTD alt: 1 name: u-boot layout: RAW_ADDR + dev: MTD alt: 2 name: u-boot-env layout: RAW_ADDR + dev: MTD alt: 3 name: UBI layout: RAW_ADDR + +Example 3 + +firmware located in SD Card (mmc) and virtual partition on OTP and PMIC not +volatile memory + +- alternate 1 (alt=1) for scard +- alternate 2 (alt=2) for OTP (virtual) +- alternate 3 (alt=3) for PMIC NVM (virtual) + +:: + + U-Boot> env set dfu_alt_info \ + "mmc 0=sdcard raw 0 0x100000&"\ + "virt 0=otp" \ + "virt 1=pmic" + +:: + + U-Boot> dfu 0 list + DFU alt settings list: + dev: eMMC alt: 0 name: sdcard layout: RAW_ADDR + dev: VIRT alt: 1 name: otp layout: RAW_ADDR + dev: VIRT alt: 2 name: pmic layout: RAW_ADDR diff --git a/doc/usage/index.rst b/doc/usage/index.rst index 9169fff0be..6c59bbadab 100644 --- a/doc/usage/index.rst +++ b/doc/usage/index.rst @@ -4,6 +4,7 @@ Use U-Boot .. toctree:: :maxdepth: 1 + dfu fdt_overlays netconsole partitions -- cgit v1.2.1 From 30e76b755b2a52e74bf916716a83deaf775664bb Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 15 Mar 2021 15:31:11 +0000 Subject: mmc: mtk-sd: don't ignore max-frequency from device tree commit e58e68d9 ("mmc: mtk-sd: assign plat->cfg.f_max with a correct value") wrongly assumed that plat->cfg.f_max is always unset at the time mscd_drv_probe() is run. This is not true in case max-frequency being defined in device tree, as it is then already set by mmc_of_parse() in msdc_of_to_plat(). Only set plat->cfg.f_max to the default maximum value in case it is not already set to a sane value. Fixes: e58e68d93e ("mmc: mtk-sd: assign plat->cfg.f_max with a correct value") Cc: Stefan Roese Cc: Weijie Gao Signed-off-by: Daniel Golle --- drivers/mmc/mtk-sd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/mtk-sd.c b/drivers/mmc/mtk-sd.c index 3b9c12266a..48a764be82 100644 --- a/drivers/mmc/mtk-sd.c +++ b/drivers/mmc/mtk-sd.c @@ -1639,7 +1639,8 @@ static int msdc_drv_probe(struct udevice *dev) else cfg->f_min = host->src_clk_freq / (4 * 4095); - cfg->f_max = host->src_clk_freq; + if (cfg->f_max < cfg->f_min || cfg->f_max > host->src_clk_freq) + cfg->f_max = host->src_clk_freq; cfg->b_max = 1024; cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34; -- cgit v1.2.1 From 29cbc4babf0a971986cccd73986908d1b8f07bda Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 24 Feb 2021 08:50:32 -0500 Subject: image: Avoid -ENODATA in host tools Unfortunately -ENODATA is not available in OpenBSD. Use -EBADMSG instead, to indicate a missing timestamp. Fixes: c5819701a3d image: Adjust the workings of fit_check_format() Signed-off-by: Simon Glass Reviewed-by: Mark Kettenis --- common/image-fit.c | 2 +- include/image.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/image-fit.c b/common/image-fit.c index 28b3d2b191..94501b1071 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -1651,7 +1651,7 @@ int fit_check_format(const void *fit, ulong size) /* mandatory / node 'timestamp' property */ if (!fdt_getprop(fit, 0, FIT_TIMESTAMP_PROP, NULL)) { log_debug("Wrong FIT format: no timestamp\n"); - return -ENODATA; + return -EBADMSG; } } diff --git a/include/image.h b/include/image.h index 138c83dd28..b4b284d52b 100644 --- a/include/image.h +++ b/include/image.h @@ -1158,7 +1158,7 @@ int fit_image_check_comp(const void *fit, int noffset, uint8_t comp); * @fit: pointer to the FIT format image header * @return 0 if OK, -ENOEXEC if not an FDT file, -EINVAL if the full FDT check * failed (e.g. due to bad structure), -ENOMSG if the description is - * missing, -ENODATA if the timestamp is missing, -ENOENT if the /images + * missing, -EBADMSG if the timestamp is missing, -ENOENT if the /images * path is missing */ int fit_check_format(const void *fit, ulong size); -- cgit v1.2.1 From 0453411998ed4425c5c1543de53ff7474bd42eea Mon Sep 17 00:00:00 2001 From: schspa Date: Fri, 26 Feb 2021 00:19:10 +0800 Subject: avb: Fix error when partition not found part_get_info_by_name will return -1 on error, and >0 on success. Signed-off-by: schspa Cc: Igor Opaniuk Reviewed-by: Igor Opaniuk --- common/avb_verify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/avb_verify.c b/common/avb_verify.c index db10d0f21f..0520a71455 100644 --- a/common/avb_verify.c +++ b/common/avb_verify.c @@ -369,7 +369,7 @@ static struct mmc_part *get_partition(AvbOps *ops, const char *partition) } ret = part_get_info_by_name(mmc_blk, partition, &part->info); - if (!ret) { + if (ret < 0) { printf("Can't find partition '%s'\n", partition); goto err; } -- cgit v1.2.1 From 9262fe15599a388e365cca3091e4852be8f23f11 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Thu, 11 Feb 2021 16:40:09 +0200 Subject: test: Include /sbin to the PATH when creating ext4 disk image On some distributions the mkfs.ext4 is under /sbin and /sbin is not set for mere users. Include /sbin to the PATH when creating ext4 disk image, so that users won't get a scary traceback from Python. Cc: Patrick Delaunay Signed-off-by: Andy Shevchenko Reviewed-by: Simon Glass --- test/py/tests/test_env.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/py/tests/test_env.py b/test/py/tests/test_env.py index 940279651d..9bed2f48d7 100644 --- a/test/py/tests/test_env.py +++ b/test/py/tests/test_env.py @@ -414,6 +414,8 @@ def mk_env_ext4(state_test_env): if os.path.exists(persistent): c.log.action('Disk image file ' + persistent + ' already exists') else: + # Some distributions do not add /sbin to the default PATH, where mkfs.ext4 lives + os.environ["PATH"] += os.pathsep + '/sbin' try: u_boot_utils.run_and_log(c, 'dd if=/dev/zero of=%s bs=1M count=16' % persistent) u_boot_utils.run_and_log(c, 'mkfs.ext4 %s' % persistent) -- cgit v1.2.1 From 93cac85d78d9f105ff2e4651c558607acef93b64 Mon Sep 17 00:00:00 2001 From: Frank Wunderlich Date: Tue, 16 Mar 2021 19:05:33 +0100 Subject: ahci: mediatek: fix undefined reference of dev_err building with MTK_AHCI enabled results in implicit declaration and undefined reference of dev_err followed by a segfault of gcc drivers/ata/mtk_ahci.c: In function 'mtk_ahci_parse_property': drivers/ata/mtk_ahci.c:65:4: warning: implicit declaration of function 'dev_err' drivers/ata/mtk_ahci.c:65: undefined reference to `dev_err' in function `mtk_ahci_probe': drivers/ata/mtk_ahci.c:92: undefined reference to `dev_err' Segmentation fault fix this by adding the dm/device_compat.h to includes Signed-off-by: Frank Wunderlich --- drivers/ata/mtk_ahci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/ata/mtk_ahci.c b/drivers/ata/mtk_ahci.c index 554175bc00..2c5227df30 100644 --- a/drivers/ata/mtk_ahci.c +++ b/drivers/ata/mtk_ahci.c @@ -21,6 +21,7 @@ #include #include #include +#include #define SYS_CFG 0x14 #define SYS_CFG_SATA_MSK GENMASK(31, 30) -- cgit v1.2.1 From 73e553a280b1b0464c44dc912c8e47e5ba379208 Mon Sep 17 00:00:00 2001 From: Michael Walle Date: Wed, 17 Mar 2021 15:01:35 +0100 Subject: board: sl28: disable HS400 mode Since commit 8ee802f899ef ("mmc: fsl_esdhc: make sure delay chain locked for HS400") HS400 mode is unreliable on LS1028A SoCs. Some workarounds are missing for this SoC. Disable HS400 mode for now. Signed-off-by: Michael Walle --- configs/kontron_sl28_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/kontron_sl28_defconfig b/configs/kontron_sl28_defconfig index 1c781e091c..0c6c1911d9 100644 --- a/configs/kontron_sl28_defconfig +++ b/configs/kontron_sl28_defconfig @@ -70,7 +70,7 @@ CONFIG_I2C_SET_DEFAULT_BUS_NUM=y CONFIG_I2C_DEFAULT_BUS_NUMBER=0 CONFIG_I2C_MUX=y CONFIG_DM_MMC=y -CONFIG_MMC_HS400_SUPPORT=y +CONFIG_MMC_HS200_SUPPORT=y CONFIG_FSL_ESDHC=y CONFIG_FSL_ESDHC_SUPPORT_ADMA2=y CONFIG_DM_SPI_FLASH=y -- cgit v1.2.1 From ccc58b4d324b768d1d629890a218ab32cde5b378 Mon Sep 17 00:00:00 2001 From: Dario Binacchi Date: Tue, 16 Mar 2021 21:51:44 +0100 Subject: bus: ti-sysc: change in a normal driver The module defines a duplicate uclass driver for UCLASS_SIMPLE_BUS, but it is not allowed. This breaks of-platdata and makes the result non-deterministic. The driver does not need to be an uclass driver, so lets remove it. I had turned it into an uclass driver because I thought wrongly it had to call the dm_scan_fdt_dev routine to work properly, but some tests on the board have shown otherwise. Signed-off-by: Dario Binacchi Reviewed-by: Simon Glass --- drivers/bus/ti-sysc.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index 4e3d610300..778c0654f6 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -148,12 +148,6 @@ clocks_err: return err; } -UCLASS_DRIVER(ti_sysc) = { - .id = UCLASS_SIMPLE_BUS, - .name = "ti_sysc", - .post_bind = dm_scan_fdt_dev -}; - U_BOOT_DRIVER(ti_sysc) = { .name = "ti_sysc", .id = UCLASS_SIMPLE_BUS, -- cgit v1.2.1 From d32211ee95a2fd4a322599346e572fc91c1ba9b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Beh=C3=BAn?= Date: Sat, 6 Mar 2021 23:43:22 +0100 Subject: api: fix a potential serious bug caused by undef CONFIG_SYS_64BIT_LBA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The api_public.h header file undefined macro CONFIG_SYS_64BIT_LBA. But api/api_storage.c includes this header before including part.h, causing the type of lbaint_t and subsequently the type signature of blk_dread() and blk_dwrite() functions to change from the rest of U-Boot (if CONFIG_SYS_64BIT_LBA is defined for the board). This is of course wrong, because the call to blk_dread() / blk_dwrite() will receive mangled arguments. Fix this by removing the undef of macro CONFIG_SYS_64BIT_LBA and instead make the immediate code do what it would do as if the macro was not defined. Add a FIXME to whoever is maintaining this code. CI managed to trigger this bug when compiling for lsxhl_defconfig, which has CONFIG_API selected. The compiler complained about blk_dwrite() and blk_dread() not matching original declarations: include/blk.h:280:15: warning: type of ‘blk_dwrite’ does not match original declaration [-Wlto-type-mismatch] 280 | unsigned long blk_dwrite(struct blk_desc *block_dev, lbaint_t st | ^ drivers/block/blk-uclass.c:456:15: note: type mismatch in parameter 2 456 | unsigned long blk_dwrite(struct blk_desc *block_dev, lbaint_t st | ^ Signed-off-by: Marek Behún Reviewed-by: Simon Glass --- include/api_public.h | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/include/api_public.h b/include/api_public.h index def103ce22..5a4465ea89 100644 --- a/include/api_public.h +++ b/include/api_public.h @@ -70,12 +70,25 @@ struct sys_info { int mr_no; /* number of memory regions */ }; -#undef CONFIG_SYS_64BIT_LBA -#ifdef CONFIG_SYS_64BIT_LBA -typedef u_int64_t lbasize_t; -#else +/* + * FIXME: Previously this code was: + * + * #undef CONFIG_SYS_64BIT_LBA + * #ifdef CONFIG_SYS_64BIT_LBA + * typedef u_int64_t lbasize_t; + * #else + * typedef unsigned long lbasize_t; + * #endif + * + * But we cannot just undefine CONFIG_SYS_64BIT_LBA, because then in + * api/api_storage.c the type signature of lbaint_t will be different if + * CONFIG_SYS_64BIT_LBA is enabled for the board, which can result in various + * bugs. + * So simply define lbasize_t as an unsigned long, since this was what was done + * anyway for at least 13 years, but don't undefine CONFIG_SYS_64BIT_LBA. + */ typedef unsigned long lbasize_t; -#endif + typedef unsigned long lbastart_t; #define DEV_TYP_NONE 0x0000 -- cgit v1.2.1 From d0c04926cd054cf7360ec15913ac17a465f32603 Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Mon, 8 Feb 2021 13:31:54 +0000 Subject: nvme: Always invalidate whole cqes[] array At the moment nvme_read_completion_status() tries to invalidate a single member of the cqes[] array, which is shady as just a single entry is not cache line aligned. The structure is dictated by hardware, and with 16 bytes is smaller than any cache line we usually deal with. Also multiple entries need to be consecutive in memory, so we can't pad them to cover a whole cache line. As a consequence we can only always invalidate all of them - U-Boot just uses two of them anyway. This is fine, as they are only ever read by the CPU (apart from the initial zeroing), so they can't become dirty. Make this obvious by always invalidating the whole array, regardless of the entry number we are about to read. Also blow up the allocation size to cover whole cache lines, to avoid other heap allocations to sneak in. Signed-off-by: Andre Przywara Reviewed-by: Bin Meng Reviewed-by: Michael Trimarchi Tested-by: Neil Armstrong --- drivers/nvme/nvme.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c index 5d6331ad34..c9efeff4bc 100644 --- a/drivers/nvme/nvme.c +++ b/drivers/nvme/nvme.c @@ -22,6 +22,8 @@ #define NVME_AQ_DEPTH 2 #define NVME_SQ_SIZE(depth) (depth * sizeof(struct nvme_command)) #define NVME_CQ_SIZE(depth) (depth * sizeof(struct nvme_completion)) +#define NVME_CQ_ALLOCATION ALIGN(NVME_CQ_SIZE(NVME_Q_DEPTH), \ + ARCH_DMA_MINALIGN) #define ADMIN_TIMEOUT 60 #define IO_TIMEOUT 30 #define MAX_PRP_POOL 512 @@ -144,8 +146,14 @@ static __le16 nvme_get_cmd_id(void) static u16 nvme_read_completion_status(struct nvme_queue *nvmeq, u16 index) { - u64 start = (ulong)&nvmeq->cqes[index]; - u64 stop = start + sizeof(struct nvme_completion); + /* + * Single CQ entries are always smaller than a cache line, so we + * can't invalidate them individually. However CQ entries are + * read only by the CPU, so it's safe to always invalidate all of them, + * as the cache line should never become dirty. + */ + ulong start = (ulong)&nvmeq->cqes[0]; + ulong stop = start + NVME_CQ_ALLOCATION; invalidate_dcache_range(start, stop); @@ -241,7 +249,7 @@ static struct nvme_queue *nvme_alloc_queue(struct nvme_dev *dev, return NULL; memset(nvmeq, 0, sizeof(*nvmeq)); - nvmeq->cqes = (void *)memalign(4096, NVME_CQ_SIZE(depth)); + nvmeq->cqes = (void *)memalign(4096, NVME_CQ_ALLOCATION); if (!nvmeq->cqes) goto free_nvmeq; memset((void *)nvmeq->cqes, 0, NVME_CQ_SIZE(depth)); @@ -339,7 +347,7 @@ static void nvme_init_queue(struct nvme_queue *nvmeq, u16 qid) nvmeq->q_db = &dev->dbs[qid * 2 * dev->db_stride]; memset((void *)nvmeq->cqes, 0, NVME_CQ_SIZE(nvmeq->q_depth)); flush_dcache_range((ulong)nvmeq->cqes, - (ulong)nvmeq->cqes + NVME_CQ_SIZE(nvmeq->q_depth)); + (ulong)nvmeq->cqes + NVME_CQ_ALLOCATION); dev->online_queues++; } -- cgit v1.2.1 From 4c498796891a26a7283130f367a346096a6ccce7 Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Tue, 2 Mar 2021 15:43:43 +0000 Subject: nvme: Elaborate on cache maintenance operation in get/set_features At the moment the nvme_get_features() and nvme_set_features() functions carry a (somewhat misleading) comment about missing cache maintenance. As it turns out, nvme_get_features() has no caller at all in the tree, and nvme_set_features' only user doesn't use a DMA buffer. Mention that in the comment, and leave some breadcrumbs for the future, should those functions attract more users. Signed-off-by: Andre Przywara Reviewed-by: Michael Trimarchi Reviewed-by: Bin Meng --- drivers/nvme/nvme.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c index c9efeff4bc..c61dab20c5 100644 --- a/drivers/nvme/nvme.c +++ b/drivers/nvme/nvme.c @@ -489,6 +489,7 @@ int nvme_get_features(struct nvme_dev *dev, unsigned fid, unsigned nsid, dma_addr_t dma_addr, u32 *result) { struct nvme_command c; + int ret; memset(&c, 0, sizeof(c)); c.features.opcode = nvme_admin_get_features; @@ -496,12 +497,20 @@ int nvme_get_features(struct nvme_dev *dev, unsigned fid, unsigned nsid, c.features.prp1 = cpu_to_le64(dma_addr); c.features.fid = cpu_to_le32(fid); + ret = nvme_submit_admin_cmd(dev, &c, result); + /* - * TODO: add cache invalidate operation when the size of - * the DMA buffer is known + * TODO: Add some cache invalidation when a DMA buffer is involved + * in the request, here and before the command gets submitted. The + * buffer size varies by feature, also some features use a different + * field in the command packet to hold the buffer address. + * Section 5.21.1 (Set Features command) in the NVMe specification + * details the buffer requirements for each feature. + * + * At the moment there is no user of this function. */ - return nvme_submit_admin_cmd(dev, &c, result); + return ret; } int nvme_set_features(struct nvme_dev *dev, unsigned fid, unsigned dword11, @@ -516,8 +525,14 @@ int nvme_set_features(struct nvme_dev *dev, unsigned fid, unsigned dword11, c.features.dword11 = cpu_to_le32(dword11); /* - * TODO: add cache flush operation when the size of - * the DMA buffer is known + * TODO: Add a cache clean (aka flush) operation when a DMA buffer is + * involved in the request. The buffer size varies by feature, also + * some features use a different field in the command packet to hold + * the buffer address. Section 5.21.1 (Set Features command) in the + * NVMe specification details the buffer requirements for each + * feature. + * At the moment the only user of this function is not using + * any DMA buffer at all. */ return nvme_submit_admin_cmd(dev, &c, result); -- cgit v1.2.1 From a95f4c88599176d9a88dc19c02fa8dd95003eebf Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Tue, 16 Mar 2021 12:56:57 +0100 Subject: efi_loader: NULL dereference in EFI console Even if CONFIG_DM_VIDEO=y and stdout="vidconsole", a video device may not be available. Check the return values of the relevant functions. If no video output device is available, assume that the serial console is in use. Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_console.c | 51 +++++++++++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 13 deletions(-) diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c index c4003554c2..6040f3a99a 100644 --- a/lib/efi_loader/efi_console.c +++ b/lib/efi_loader/efi_console.c @@ -254,7 +254,7 @@ static bool cout_mode_matches(struct cout_mode *mode, int rows, int cols) } /** - * query_console_serial() - query console size + * query_console_serial() - query serial console size * * When using a serial console or the net console we can only devise the * terminal size by querying the terminal using ECMA-48 control sequences. @@ -299,6 +299,37 @@ out: return ret; } +/** + * query_vidconsole() - query video console size + * + * + * @rows: pointer to return number of rows + * @cols: pointer to return number of columns + * Returns: 0 on success + */ +static int __maybe_unused query_vidconsole(int *rows, int *cols) +{ + const char *stdout_name = env_get("stdout"); + struct stdio_dev *stdout_dev; + struct udevice *dev; + struct vidconsole_priv *priv; + + if (!stdout_name || strncmp(stdout_name, "vidconsole", 10)) + return -ENODEV; + stdout_dev = stdio_get_by_name("vidconsole"); + if (!stdout_dev) + return -ENODEV; + dev = stdout_dev->priv; + if (!dev) + return -ENODEV; + priv = dev_get_uclass_priv(dev); + if (!priv) + return -ENODEV; + *rows = priv->rows; + *cols = priv->cols; + return 0; +} + /** * query_console_size() - update the mode table. * @@ -308,21 +339,15 @@ out: */ static void query_console_size(void) { - const char *stdout_name = env_get("stdout"); int rows = 25, cols = 80; + int ret = -ENODEV; - if (stdout_name && !strncmp(stdout_name, "vidconsole", 10) && - IS_ENABLED(CONFIG_DM_VIDEO)) { - struct stdio_dev *stdout_dev = - stdio_get_by_name("vidconsole"); - struct udevice *dev = stdout_dev->priv; - struct vidconsole_priv *priv = - dev_get_uclass_priv(dev); - rows = priv->rows; - cols = priv->cols; - } else if (query_console_serial(&rows, &cols)) { + if IS_ENABLED(CONFIG_DM_VIDEO) + ret = query_vidconsole(&rows, &cols); + if (ret) + ret = query_console_serial(&rows, &cols); + if (ret) return; - } /* Test if we can have Mode 1 */ if (cols >= 80 && rows >= 50) { -- cgit v1.2.1 From 62df6e9c9994c66efd34afe710a64de27dd120bc Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 19 Mar 2021 02:49:54 +0100 Subject: efi_loader: Uart device path When uploading an EFI binary via the UART we need to assign a device path. * Provide devicepath node to text conversion for Uart() node. * Provide function to create Uart() device path. * Add UART support to efi_dp_from_name(). Signed-off-by: Heinrich Schuchardt --- include/efi_api.h | 10 ++++++++ lib/efi_loader/efi_device_path.c | 41 +++++++++++++++++++++++++------- lib/efi_loader/efi_device_path_to_text.c | 13 ++++++++++ 3 files changed, 55 insertions(+), 9 deletions(-) diff --git a/include/efi_api.h b/include/efi_api.h index 48e48a6263..4ccde1d24d 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -523,6 +523,7 @@ struct efi_device_path_acpi_path { # define DEVICE_PATH_SUB_TYPE_MSG_SCSI 0x02 # define DEVICE_PATH_SUB_TYPE_MSG_USB 0x05 # define DEVICE_PATH_SUB_TYPE_MSG_MAC_ADDR 0x0b +# define DEVICE_PATH_SUB_TYPE_MSG_UART 0x0e # define DEVICE_PATH_SUB_TYPE_MSG_USB_CLASS 0x0f # define DEVICE_PATH_SUB_TYPE_MSG_SATA 0x12 # define DEVICE_PATH_SUB_TYPE_MSG_NVME 0x17 @@ -542,6 +543,15 @@ struct efi_device_path_scsi { u16 logical_unit_number; } __packed; +struct efi_device_path_uart { + struct efi_device_path dp; + u32 reserved; + u64 baud_rate; + u8 data_bits; + u8 parity; + u8 stop_bits; +} __packed; + struct efi_device_path_usb { struct efi_device_path dp; u8 parent_port_number; diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c index c9315dd458..398dbc699b 100644 --- a/lib/efi_loader/efi_device_path.c +++ b/lib/efi_loader/efi_device_path.c @@ -960,6 +960,28 @@ struct efi_device_path *efi_dp_from_file(struct blk_desc *desc, int part, return start; } +struct efi_device_path *efi_dp_from_uart(void) +{ + void *buf, *pos; + struct efi_device_path_uart *uart; + size_t dpsize = sizeof(ROOT) + sizeof(*uart) + sizeof(END); + + buf = dp_alloc(dpsize); + if (!buf) + return NULL; + pos = buf; + memcpy(pos, &ROOT, sizeof(ROOT)); + pos += sizeof(ROOT); + uart = pos; + uart->dp.type = DEVICE_PATH_TYPE_MESSAGING_DEVICE; + uart->dp.sub_type = DEVICE_PATH_SUB_TYPE_MSG_UART; + uart->dp.length = sizeof(*uart); + pos += sizeof(*uart); + memcpy(pos, &END, sizeof(END)); + + return buf; +} + #ifdef CONFIG_NET struct efi_device_path *efi_dp_from_eth(void) { @@ -1086,7 +1108,6 @@ efi_status_t efi_dp_from_name(const char *dev, const char *devnr, struct efi_device_path **device, struct efi_device_path **file) { - int is_net; struct blk_desc *desc = NULL; struct disk_partition fs_partition; int part = 0; @@ -1096,8 +1117,15 @@ efi_status_t efi_dp_from_name(const char *dev, const char *devnr, if (path && !file) return EFI_INVALID_PARAMETER; - is_net = !strcmp(dev, "Net"); - if (!is_net) { + if (!strcmp(dev, "Net")) { +#ifdef CONFIG_NET + if (device) + *device = efi_dp_from_eth(); +#endif + } else if (!strcmp(dev, "Uart")) { + if (device) + *device = efi_dp_from_uart(); + } else { part = blk_get_device_part_str(dev, devnr, &desc, &fs_partition, 1); if (part < 0 || !desc) @@ -1105,11 +1133,6 @@ efi_status_t efi_dp_from_name(const char *dev, const char *devnr, if (device) *device = efi_dp_from_part(desc, part); - } else { -#ifdef CONFIG_NET - if (device) - *device = efi_dp_from_eth(); -#endif } if (!path) @@ -1120,7 +1143,7 @@ efi_status_t efi_dp_from_name(const char *dev, const char *devnr, s = filename; while ((s = strchr(s, '/'))) *s++ = '\\'; - *file = efi_dp_from_file(is_net ? NULL : desc, part, filename); + *file = efi_dp_from_file(desc, part, filename); if (!*file) return EFI_INVALID_PARAMETER; diff --git a/lib/efi_loader/efi_device_path_to_text.c b/lib/efi_loader/efi_device_path_to_text.c index edc9fdc387..43554cd771 100644 --- a/lib/efi_loader/efi_device_path_to_text.c +++ b/lib/efi_loader/efi_device_path_to_text.c @@ -118,6 +118,19 @@ static char *dp_msging(char *s, struct efi_device_path *dp) ide->logical_unit_number); break; } + case DEVICE_PATH_SUB_TYPE_MSG_UART: { + struct efi_device_path_uart *uart = + (struct efi_device_path_uart *)dp; + s += sprintf(s, "Uart(%lld,%d,%d,", uart->baud_rate, + uart->data_bits, uart->parity); + switch (uart->stop_bits) { + case 2: + s += sprintf(s, "1.5)"); + default: + s += sprintf(s, "%d)", uart->stop_bits); + } + break; + } case DEVICE_PATH_SUB_TYPE_MSG_USB: { struct efi_device_path_usb *udp = (struct efi_device_path_usb *)dp; -- cgit v1.2.1 From 76b0a19022e22a5bbb84cd76d516bdb625a70417 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 19 Mar 2021 02:50:57 +0000 Subject: cmd/load: support uploading EFI binary via UART When uploading an EFI binary via the UART we have to call efi_set_bootdev() or we won't be able to execute it. Put the includes into alphabetic order. Fixes: 5f59518a7b1a ("efi_loader: setting boot device") Signed-off-by: Heinrich Schuchardt --- cmd/load.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cmd/load.c b/cmd/load.c index 5bbc39baea..b7894d7db0 100644 --- a/cmd/load.c +++ b/cmd/load.c @@ -11,12 +11,14 @@ #include #include #include +#include #include +#include #include #include -#include +#include #include -#include +#include #include #include #include @@ -996,6 +998,10 @@ static ulong load_serial_ymodem(ulong offset, int mode) } } + if (IS_ENABLED(CONFIG_CMD_BOOTEFI)) + efi_set_bootdev("Uart", "", "", + map_sysmem(offset, 0), size); + } else { printf("%s\n", xyzModem_error(err)); } -- cgit v1.2.1 From 2dbcc037ccf3a16a2a0225133f8721b87ae7fffb Mon Sep 17 00:00:00 2001 From: Siew Chin Lim Date: Mon, 22 Mar 2021 18:04:52 +0800 Subject: arm: socfpga: Only do 'is OS booted from FIT' checking when VAB is enabled Check CONFIG_SOCFPGA_SECURE_VAB_AUTH before perform 'is OS booted from FIT' checking in board_prep_linux function. And, fix typo of CONFIG_SOCFPGA_SECURE_VAB_AUTH_ALLOW_NON_FIT_IMAGE. CONFIG_FIT will be enabled in both ATF and VAB boot flow, thus, board_prep_linux function will always be called by both ATF and VAB boot flow. board_pre_linux function will do 'is OS booted from FIT' checking, and it will be called before board_fit_image_post_process function. VAB boot flow expects the OS is always booted from FIT and with VAB signed cerfiticate because the VAB authentication is implemented in board_fit_image_post_process function. So, VAB needs the 'is OS booted from FIT' checking in board_pre_linux function. However, for ATF boot flow, it is not a requirement that the OS must always booted from FIT. The OS can be booted from individual Image and kernel dtb file. Thus, we should not do 'if OS is booted from FIT' checking in board_prep_linux function. Signed-off-by: Siew Chin Lim Reviewed-by: Ley Foon Tan --- arch/arm/mach-socfpga/board.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach-socfpga/board.c index 81aa07c902..650122fcd4 100644 --- a/arch/arm/mach-socfpga/board.c +++ b/arch/arm/mach-socfpga/board.c @@ -115,7 +115,8 @@ void board_fit_image_post_process(void **p_image, size_t *p_size) #if !IS_ENABLED(CONFIG_SPL_BUILD) && IS_ENABLED(CONFIG_FIT) void board_prep_linux(bootm_headers_t *images) { - if (!IS_ENABLED(CONFIG_SECURE_VAB_AUTH_ALLOW_NON_FIT_IMAGE)) { + if (IS_ENABLED(CONFIG_SOCFPGA_SECURE_VAB_AUTH) && + !IS_ENABLED(CONFIG_SOCFPGA_SECURE_VAB_AUTH_ALLOW_NON_FIT_IMAGE)) { /* * Ensure the OS is always booted from FIT and with * VAB signed certificate -- cgit v1.2.1 From fc37c7a9318c9e36c1b62a8589f2fc22c41da096 Mon Sep 17 00:00:00 2001 From: Aleksandar Gerasimovski Date: Mon, 22 Feb 2021 18:15:58 +0000 Subject: fsl_ifc: fix typo in the NOR CSOR register definition The name of the define must indicate 'Asynchronous', so 'ASYNC' is more appropriate. AYSNC is probably a typo, and checkpatch script is throwing a warning if this is set in the board include files. It is save to change this now as none of the existing designs is using it so far, but we will use it in our design it help to make IFC settings more transparent. Signed-off-by: Aleksandar Gerasimovski Reviewed-by: Priyanka Jain --- include/fsl_ifc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fsl_ifc.h b/include/fsl_ifc.h index e1e6214b0f..9f243cd945 100644 --- a/include/fsl_ifc.h +++ b/include/fsl_ifc.h @@ -140,7 +140,7 @@ #define CSOR_NOR_ADM_SHIFT_SHIFT 13 #define CSOR_NOR_ADM_SHIFT(n) ((n) << CSOR_NOR_ADM_SHIFT_SHIFT) /* Type of the NOR device hooked */ -#define CSOR_NOR_NOR_MODE_AYSNC_NOR 0x00000000 +#define CSOR_NOR_NOR_MODE_ASYNC_NOR 0x00000000 #define CSOR_NOR_NOR_MODE_AVD_NOR 0x00000020 /* Time for Read Enable High to Output High Impedance */ #define CSOR_NOR_TRHZ_MASK 0x0000001C -- cgit v1.2.1 From f65774e1f6a0f48bcb52eb3581675e478365f2fa Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Wed, 3 Mar 2021 14:09:44 +1300 Subject: rtc: ds1307: Add ds1339 compatible As far as u-boot is concerned the ds1339 is compatible with the other devices supported by the ds1307 driver. The Linux driver does expose some additional functionality but as far as u-boot is concerned just adding the compatible string is enough. Signed-off-by: Chris Packham Reviewed-by: Simon Glass Reviewed-by: Priyanka Jain --- drivers/rtc/ds1307.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/rtc/ds1307.c b/drivers/rtc/ds1307.c index 17344d4d4f..2015ce9bbc 100644 --- a/drivers/rtc/ds1307.c +++ b/drivers/rtc/ds1307.c @@ -23,6 +23,7 @@ enum ds_type { ds_1307, ds_1337, + ds_1339, ds_1340, m41t11, mcp794xx, @@ -344,6 +345,7 @@ static const struct rtc_ops ds1307_rtc_ops = { static const struct udevice_id ds1307_rtc_ids[] = { { .compatible = "dallas,ds1307", .data = ds_1307 }, { .compatible = "dallas,ds1337", .data = ds_1337 }, + { .compatible = "dallas,ds1339", .data = ds_1339 }, { .compatible = "dallas,ds1340", .data = ds_1340 }, { .compatible = "microchip,mcp7941x", .data = mcp794xx }, { .compatible = "st,m41t11", .data = m41t11 }, -- cgit v1.2.1 From 805c525b082bc24616960527a6d640e6a923141a Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Wed, 3 Mar 2021 14:09:45 +1300 Subject: powerpc: t2080rdb: Enable RTC support The T2080RDB has a ds1339 on i2c0. Add this to the devicetree and enable the relevant support in the configs. Signed-off-by: Chris Packham Reviewed-by: Priyanka Jain --- arch/powerpc/dts/t2080rdb.dts | 8 ++++++++ configs/T2080RDB_NAND_defconfig | 2 ++ configs/T2080RDB_SDCARD_defconfig | 2 ++ configs/T2080RDB_SPIFLASH_defconfig | 2 ++ configs/T2080RDB_defconfig | 2 ++ 5 files changed, 16 insertions(+) diff --git a/arch/powerpc/dts/t2080rdb.dts b/arch/powerpc/dts/t2080rdb.dts index 34ec6a74cb..74bbb20e2a 100644 --- a/arch/powerpc/dts/t2080rdb.dts +++ b/arch/powerpc/dts/t2080rdb.dts @@ -30,3 +30,11 @@ spi-max-frequency = <10000000>; /* input clock */ }; }; + +&i2c0 { + status = "okay"; + rtc@68 { + compatible = "dallas,ds1339"; + reg = <0x68>; + }; +}; diff --git a/configs/T2080RDB_NAND_defconfig b/configs/T2080RDB_NAND_defconfig index d7ccee2559..543d34e249 100644 --- a/configs/T2080RDB_NAND_defconfig +++ b/configs/T2080RDB_NAND_defconfig @@ -77,6 +77,8 @@ CONFIG_DM_PCI=y CONFIG_DM_PCI_COMPAT=y CONFIG_PCIE_FSL=y CONFIG_SYS_QE_FMAN_FW_IN_NAND=y +CONFIG_DM_RTC=y +CONFIG_RTC_DS1307=y CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_DM_SPI=y diff --git a/configs/T2080RDB_SDCARD_defconfig b/configs/T2080RDB_SDCARD_defconfig index 99ea925df8..d947846e64 100644 --- a/configs/T2080RDB_SDCARD_defconfig +++ b/configs/T2080RDB_SDCARD_defconfig @@ -74,6 +74,8 @@ CONFIG_DM_PCI=y CONFIG_DM_PCI_COMPAT=y CONFIG_PCIE_FSL=y CONFIG_SYS_QE_FMAN_FW_IN_MMC=y +CONFIG_DM_RTC=y +CONFIG_RTC_DS1307=y CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_DM_SPI=y diff --git a/configs/T2080RDB_SPIFLASH_defconfig b/configs/T2080RDB_SPIFLASH_defconfig index c820c2bf5a..6f7b083bc6 100644 --- a/configs/T2080RDB_SPIFLASH_defconfig +++ b/configs/T2080RDB_SPIFLASH_defconfig @@ -76,6 +76,8 @@ CONFIG_DM_PCI=y CONFIG_DM_PCI_COMPAT=y CONFIG_PCIE_FSL=y CONFIG_SYS_QE_FMAN_FW_IN_SPIFLASH=y +CONFIG_DM_RTC=y +CONFIG_RTC_DS1307=y CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_DM_SPI=y diff --git a/configs/T2080RDB_defconfig b/configs/T2080RDB_defconfig index d20de349de..9dd01bbe50 100644 --- a/configs/T2080RDB_defconfig +++ b/configs/T2080RDB_defconfig @@ -61,6 +61,8 @@ CONFIG_DM_PCI=y CONFIG_DM_PCI_COMPAT=y CONFIG_PCIE_FSL=y CONFIG_SYS_QE_FMAN_FW_IN_NOR=y +CONFIG_DM_RTC=y +CONFIG_RTC_DS1307=y CONFIG_SYS_NS16550=y CONFIG_SPI=y CONFIG_DM_SPI=y -- cgit v1.2.1 From b4f8ffb6e87534ff596911d1df930bc688ce0e16 Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Wed, 3 Mar 2021 14:09:46 +1300 Subject: board: freescale: t208xrdb: Add link to User Guide The User Guide contains handy things like block diagrams and DIP switch settings and it's even available on the public web. Add a link to it in the README. Signed-off-by: Chris Packham Reviewed-by: Priyanka Jain --- board/freescale/t208xrdb/README | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/board/freescale/t208xrdb/README b/board/freescale/t208xrdb/README index 9e4b28faf4..ec47c96f2b 100644 --- a/board/freescale/t208xrdb/README +++ b/board/freescale/t208xrdb/README @@ -34,6 +34,11 @@ T2080 includes the following functions and features: - Support for hardware virtualization and partitioning enforcement - QorIQ Platform's Trust Architecture 2.0 +User Guide +---------- +The T2080RDB User Guide is available on the web at +https://www.nxp.com/docs/en/user-guide/T2080RDBPCUG.pdf + Differences between T2080 and T2081 ----------------------------------- Feature T2080 T2081 -- cgit v1.2.1 From 3fadc80cd4f86810f629d83a591ddc585954fb98 Mon Sep 17 00:00:00 2001 From: Kuldeep Singh Date: Wed, 3 Mar 2021 17:04:19 +0530 Subject: configs: lx2160a: Unset CONFIG_SPI_FLASH_SPANSION There is no Spansion flash on LX2160A-RDB/QDS boards. Unset CONFIG_SPI_FLASH_SPANSION option for both the boards. Signed-off-by: Kuldeep Singh Reviewed-by: Priyanka Jain --- configs/lx2160aqds_tfa_SECURE_BOOT_defconfig | 1 - configs/lx2160aqds_tfa_defconfig | 1 - configs/lx2160ardb_tfa_SECURE_BOOT_defconfig | 1 - configs/lx2160ardb_tfa_defconfig | 1 - configs/lx2160ardb_tfa_stmm_defconfig | 1 - 5 files changed, 5 deletions(-) diff --git a/configs/lx2160aqds_tfa_SECURE_BOOT_defconfig b/configs/lx2160aqds_tfa_SECURE_BOOT_defconfig index 7d6b74db18..5a7ffe9c4a 100644 --- a/configs/lx2160aqds_tfa_SECURE_BOOT_defconfig +++ b/configs/lx2160aqds_tfa_SECURE_BOOT_defconfig @@ -50,7 +50,6 @@ CONFIG_FSL_ESDHC=y CONFIG_MTD=y CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH_EON=y -CONFIG_SPI_FLASH_SPANSION=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_SST=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set diff --git a/configs/lx2160aqds_tfa_defconfig b/configs/lx2160aqds_tfa_defconfig index 4390b0d928..ed6f78b099 100644 --- a/configs/lx2160aqds_tfa_defconfig +++ b/configs/lx2160aqds_tfa_defconfig @@ -57,7 +57,6 @@ CONFIG_FSL_ESDHC=y CONFIG_MTD=y CONFIG_DM_SPI_FLASH=y CONFIG_SPI_FLASH_EON=y -CONFIG_SPI_FLASH_SPANSION=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_SST=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set diff --git a/configs/lx2160ardb_tfa_SECURE_BOOT_defconfig b/configs/lx2160ardb_tfa_SECURE_BOOT_defconfig index f5da144e54..bb92fcb6c5 100644 --- a/configs/lx2160ardb_tfa_SECURE_BOOT_defconfig +++ b/configs/lx2160ardb_tfa_SECURE_BOOT_defconfig @@ -46,7 +46,6 @@ CONFIG_MMC_HS400_SUPPORT=y CONFIG_FSL_ESDHC=y CONFIG_MTD=y CONFIG_DM_SPI_FLASH=y -CONFIG_SPI_FLASH_SPANSION=y CONFIG_SPI_FLASH_STMICRO=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_PHYLIB=y diff --git a/configs/lx2160ardb_tfa_defconfig b/configs/lx2160ardb_tfa_defconfig index c5a0410161..1d3b59c849 100644 --- a/configs/lx2160ardb_tfa_defconfig +++ b/configs/lx2160ardb_tfa_defconfig @@ -55,7 +55,6 @@ CONFIG_MMC_HS400_SUPPORT=y CONFIG_FSL_ESDHC=y CONFIG_MTD=y CONFIG_DM_SPI_FLASH=y -CONFIG_SPI_FLASH_SPANSION=y CONFIG_SPI_FLASH_STMICRO=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_PHYLIB=y diff --git a/configs/lx2160ardb_tfa_stmm_defconfig b/configs/lx2160ardb_tfa_stmm_defconfig index ca1d5cbad9..1b06124269 100644 --- a/configs/lx2160ardb_tfa_stmm_defconfig +++ b/configs/lx2160ardb_tfa_stmm_defconfig @@ -55,7 +55,6 @@ CONFIG_MMC_HS400_SUPPORT=y CONFIG_FSL_ESDHC=y CONFIG_MTD=y CONFIG_DM_SPI_FLASH=y -CONFIG_SPI_FLASH_SPANSION=y CONFIG_SPI_FLASH_STMICRO=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_PHYLIB=y -- cgit v1.2.1 From 43ec24be9bf918f81582bfe7fc3d66d43bda4a04 Mon Sep 17 00:00:00 2001 From: Kuldeep Singh Date: Wed, 3 Mar 2021 17:04:20 +0530 Subject: configs: lx2160a: Remove unused Flexspi config options It is now safe to remove Flexspi configs NXP_FSPI_FLASH_SIZE and NXP_FSPI_FLASH_NUM options from headers as they are no longer used by driver anymore. Signed-off-by: Kuldeep Singh Reviewed-by: Priyanka Jain --- include/configs/lx2160a_common.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/configs/lx2160a_common.h b/include/configs/lx2160a_common.h index 466484c199..9f2b8999cd 100644 --- a/include/configs/lx2160a_common.h +++ b/include/configs/lx2160a_common.h @@ -154,12 +154,6 @@ #endif #endif -/* FlexSPI */ -#ifdef CONFIG_NXP_FSPI -#define NXP_FSPI_FLASH_SIZE SZ_64M -#define NXP_FSPI_FLASH_NUM 1 -#endif - /* GPIO */ #ifdef CONFIG_DM_GPIO #ifndef CONFIG_MPC8XXX_GPIO -- cgit v1.2.1 From 72655b254b81958a5820536a41ab1630bbf8255f Mon Sep 17 00:00:00 2001 From: Kuldeep Singh Date: Wed, 3 Mar 2021 17:04:21 +0530 Subject: configs: ls1028a: Unset CONFIG_SPI_FLASH_SPANSION There is no Spansion flash on LS1028A-RDB/QDS boards. Unset CONFIG_SPI_FLASH_SPANSION option for both the boards. Signed-off-by: Kuldeep Singh Reviewed-by: Priyanka Jain --- configs/ls1028aqds_tfa_SECURE_BOOT_defconfig | 1 - configs/ls1028aqds_tfa_defconfig | 1 - configs/ls1028aqds_tfa_lpuart_defconfig | 1 - configs/ls1028ardb_tfa_SECURE_BOOT_defconfig | 1 - configs/ls1028ardb_tfa_defconfig | 1 - 5 files changed, 5 deletions(-) diff --git a/configs/ls1028aqds_tfa_SECURE_BOOT_defconfig b/configs/ls1028aqds_tfa_SECURE_BOOT_defconfig index a2bc6c6e6b..47dfa3e847 100644 --- a/configs/ls1028aqds_tfa_SECURE_BOOT_defconfig +++ b/configs/ls1028aqds_tfa_SECURE_BOOT_defconfig @@ -49,7 +49,6 @@ CONFIG_DM_MMC=y CONFIG_FSL_ESDHC=y CONFIG_MTD=y CONFIG_DM_SPI_FLASH=y -CONFIG_SPI_FLASH_SPANSION=y CONFIG_SPI_FLASH_STMICRO=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_PHYLIB=y diff --git a/configs/ls1028aqds_tfa_defconfig b/configs/ls1028aqds_tfa_defconfig index 66e008b8ce..21408bd732 100644 --- a/configs/ls1028aqds_tfa_defconfig +++ b/configs/ls1028aqds_tfa_defconfig @@ -55,7 +55,6 @@ CONFIG_DM_MMC=y CONFIG_FSL_ESDHC=y CONFIG_MTD=y CONFIG_DM_SPI_FLASH=y -CONFIG_SPI_FLASH_SPANSION=y CONFIG_SPI_FLASH_STMICRO=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_PHYLIB=y diff --git a/configs/ls1028aqds_tfa_lpuart_defconfig b/configs/ls1028aqds_tfa_lpuart_defconfig index cc82ed74b0..d016202a24 100644 --- a/configs/ls1028aqds_tfa_lpuart_defconfig +++ b/configs/ls1028aqds_tfa_lpuart_defconfig @@ -55,7 +55,6 @@ CONFIG_DM_MMC=y CONFIG_FSL_ESDHC=y CONFIG_MTD=y CONFIG_DM_SPI_FLASH=y -CONFIG_SPI_FLASH_SPANSION=y CONFIG_SPI_FLASH_STMICRO=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_PHYLIB=y diff --git a/configs/ls1028ardb_tfa_SECURE_BOOT_defconfig b/configs/ls1028ardb_tfa_SECURE_BOOT_defconfig index dd189188d2..794632a6c9 100644 --- a/configs/ls1028ardb_tfa_SECURE_BOOT_defconfig +++ b/configs/ls1028ardb_tfa_SECURE_BOOT_defconfig @@ -48,7 +48,6 @@ CONFIG_DM_MMC=y CONFIG_FSL_ESDHC=y CONFIG_MTD=y CONFIG_DM_SPI_FLASH=y -CONFIG_SPI_FLASH_SPANSION=y CONFIG_SPI_FLASH_STMICRO=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_PHYLIB=y diff --git a/configs/ls1028ardb_tfa_defconfig b/configs/ls1028ardb_tfa_defconfig index 9f5116b364..801552c602 100644 --- a/configs/ls1028ardb_tfa_defconfig +++ b/configs/ls1028ardb_tfa_defconfig @@ -54,7 +54,6 @@ CONFIG_DM_MMC=y CONFIG_FSL_ESDHC=y CONFIG_MTD=y CONFIG_DM_SPI_FLASH=y -CONFIG_SPI_FLASH_SPANSION=y CONFIG_SPI_FLASH_STMICRO=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_PHYLIB=y -- cgit v1.2.1 From 6712856469a233217f7458edb12bb295cc46b3aa Mon Sep 17 00:00:00 2001 From: Kuldeep Singh Date: Wed, 3 Mar 2021 17:04:22 +0530 Subject: configs: ls1028aqds: Move CONFIG_SPI_FLASH_* definitions to defconfig LS1028A-QDS has CONFIG_SPI_FLASH_SST and CONFIG_SPI_FLASH_EON defines present in header. Move these entries from header to defconfigs. Signed-off-by: Kuldeep Singh Reviewed-by: Priyanka Jain --- configs/ls1028aqds_tfa_SECURE_BOOT_defconfig | 2 ++ configs/ls1028aqds_tfa_defconfig | 2 ++ configs/ls1028aqds_tfa_lpuart_defconfig | 2 ++ include/configs/ls1028aqds.h | 6 ------ 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/configs/ls1028aqds_tfa_SECURE_BOOT_defconfig b/configs/ls1028aqds_tfa_SECURE_BOOT_defconfig index 47dfa3e847..17daef8d74 100644 --- a/configs/ls1028aqds_tfa_SECURE_BOOT_defconfig +++ b/configs/ls1028aqds_tfa_SECURE_BOOT_defconfig @@ -49,7 +49,9 @@ CONFIG_DM_MMC=y CONFIG_FSL_ESDHC=y CONFIG_MTD=y CONFIG_DM_SPI_FLASH=y +CONFIG_SPI_FLASH_EON=y CONFIG_SPI_FLASH_STMICRO=y +CONFIG_SPI_FLASH_SST=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_PHYLIB=y CONFIG_PHY_AQUANTIA=y diff --git a/configs/ls1028aqds_tfa_defconfig b/configs/ls1028aqds_tfa_defconfig index 21408bd732..1913f4f135 100644 --- a/configs/ls1028aqds_tfa_defconfig +++ b/configs/ls1028aqds_tfa_defconfig @@ -55,7 +55,9 @@ CONFIG_DM_MMC=y CONFIG_FSL_ESDHC=y CONFIG_MTD=y CONFIG_DM_SPI_FLASH=y +CONFIG_SPI_FLASH_EON=y CONFIG_SPI_FLASH_STMICRO=y +CONFIG_SPI_FLASH_SST=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_PHYLIB=y CONFIG_PHY_AQUANTIA=y diff --git a/configs/ls1028aqds_tfa_lpuart_defconfig b/configs/ls1028aqds_tfa_lpuart_defconfig index d016202a24..60d515c9c6 100644 --- a/configs/ls1028aqds_tfa_lpuart_defconfig +++ b/configs/ls1028aqds_tfa_lpuart_defconfig @@ -55,7 +55,9 @@ CONFIG_DM_MMC=y CONFIG_FSL_ESDHC=y CONFIG_MTD=y CONFIG_DM_SPI_FLASH=y +CONFIG_SPI_FLASH_EON=y CONFIG_SPI_FLASH_STMICRO=y +CONFIG_SPI_FLASH_SST=y # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set CONFIG_PHYLIB=y CONFIG_PHY_AQUANTIA=y diff --git a/include/configs/ls1028aqds.h b/include/configs/ls1028aqds.h index 8ab943cc64..9ae37b96ce 100644 --- a/include/configs/ls1028aqds.h +++ b/include/configs/ls1028aqds.h @@ -81,12 +81,6 @@ #define CONFIG_SYS_SCSI_MAX_LUN 1 #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ CONFIG_SYS_SCSI_MAX_LUN) -/* DSPI */ -#ifdef CONFIG_FSL_DSPI -#define CONFIG_SPI_FLASH_SST -#define CONFIG_SPI_FLASH_EON -#endif - #ifndef SPL_NO_ENV #undef CONFIG_EXTRA_ENV_SETTINGS #define CONFIG_EXTRA_ENV_SETTINGS \ -- cgit v1.2.1 From a7c532f94c49ee9373ccd1f4e3601f5e828eccd5 Mon Sep 17 00:00:00 2001 From: Kuldeep Singh Date: Wed, 3 Mar 2021 17:04:23 +0530 Subject: configs: ls1028a: Correct CONFIG_ENV_SECT_SIZE LS1028A-RDB/QDS has Micron "mt35xu02g" nor flash of size 256M with 128K sector size. Correct CONFIG_ENV_SECT_SIZE value to 128K. Signed-off-by: Kuldeep Singh Reviewed-by: Priyanka Jain --- configs/ls1028aqds_tfa_defconfig | 2 +- configs/ls1028aqds_tfa_lpuart_defconfig | 2 +- configs/ls1028ardb_tfa_defconfig | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configs/ls1028aqds_tfa_defconfig b/configs/ls1028aqds_tfa_defconfig index 1913f4f135..cc38bd8957 100644 --- a/configs/ls1028aqds_tfa_defconfig +++ b/configs/ls1028aqds_tfa_defconfig @@ -8,7 +8,7 @@ CONFIG_SYS_MEMTEST_START=0x80000000 CONFIG_SYS_MEMTEST_END=0x9fffffff CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0x500000 -CONFIG_ENV_SECT_SIZE=0x40000 +CONFIG_ENV_SECT_SIZE=0x20000 CONFIG_DM_GPIO=y CONFIG_FSPI_AHB_EN_4BYTE=y CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y diff --git a/configs/ls1028aqds_tfa_lpuart_defconfig b/configs/ls1028aqds_tfa_lpuart_defconfig index 60d515c9c6..bc5f8f4f32 100644 --- a/configs/ls1028aqds_tfa_lpuart_defconfig +++ b/configs/ls1028aqds_tfa_lpuart_defconfig @@ -7,7 +7,7 @@ CONFIG_SYS_MEMTEST_START=0x80000000 CONFIG_SYS_MEMTEST_END=0x9fffffff CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0x500000 -CONFIG_ENV_SECT_SIZE=0x40000 +CONFIG_ENV_SECT_SIZE=0x20000 CONFIG_DM_GPIO=y CONFIG_FSPI_AHB_EN_4BYTE=y CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y diff --git a/configs/ls1028ardb_tfa_defconfig b/configs/ls1028ardb_tfa_defconfig index 801552c602..2ee57de839 100644 --- a/configs/ls1028ardb_tfa_defconfig +++ b/configs/ls1028ardb_tfa_defconfig @@ -8,7 +8,7 @@ CONFIG_SYS_MEMTEST_START=0x80000000 CONFIG_SYS_MEMTEST_END=0x9fffffff CONFIG_ENV_SIZE=0x2000 CONFIG_ENV_OFFSET=0x500000 -CONFIG_ENV_SECT_SIZE=0x40000 +CONFIG_ENV_SECT_SIZE=0x20000 CONFIG_DM_GPIO=y CONFIG_FSPI_AHB_EN_4BYTE=y CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT=y -- cgit v1.2.1 From ae5cbc43b361cc78040aa4fbb1cacd375eb2db04 Mon Sep 17 00:00:00 2001 From: Hou Zhiqiang Date: Thu, 11 Mar 2021 15:30:51 +0800 Subject: pci: layerscape: Change to allocate zeroed memery for struct ls_pcie As on some incipient Layerscape platforms (LS1043A series) there isn't separate PF control register block, these registers reside in the LUT register block, so when the driver detected there isn't 'ctrl', it will assign the 'lut' address to the ls_pcie->ctrl. The current code allocate memory for the struct ls_pcie with random contents, this can result in skipping to assign the ls_pcie->ctrl with the 'lut' address, then further crash with the incorrect address. Fixes: 118e58e26eba ("pci: layerscape: Split the EP and RC driver") Signed-off-by: Hou Zhiqiang Reviewed-by: Vladimir Oltean Reviewed-by: Priyanka Jain --- drivers/pci/pcie_layerscape_ep.c | 2 +- drivers/pci/pcie_layerscape_rc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/pcie_layerscape_ep.c b/drivers/pci/pcie_layerscape_ep.c index 14983cce4f..c7231635e4 100644 --- a/drivers/pci/pcie_layerscape_ep.c +++ b/drivers/pci/pcie_layerscape_ep.c @@ -244,7 +244,7 @@ static int ls_pcie_ep_probe(struct udevice *dev) int ret; u32 svr; - pcie = devm_kmalloc(dev, sizeof(*pcie), GFP_KERNEL); + pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL); if (!pcie) return -ENOMEM; diff --git a/drivers/pci/pcie_layerscape_rc.c b/drivers/pci/pcie_layerscape_rc.c index b055ed5165..bd2c19f7f0 100644 --- a/drivers/pci/pcie_layerscape_rc.c +++ b/drivers/pci/pcie_layerscape_rc.c @@ -254,7 +254,7 @@ static int ls_pcie_probe(struct udevice *dev) pcie_rc->bus = dev; - pcie = devm_kmalloc(dev, sizeof(*pcie), GFP_KERNEL); + pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL); if (!pcie) return -ENOMEM; -- cgit v1.2.1 From cad6ffa34d255692833576bc2c911d1ee39f2af0 Mon Sep 17 00:00:00 2001 From: Maxim Kochetkov Date: Fri, 12 Mar 2021 09:27:41 +0300 Subject: mtd: rawnand: fsl_ifc: fix FSL NAND driver to read all ONFI parameter pages Linux commit a75bbe71a27 ("mtd: rawnand: fsl_ifc: fix FSL NAND driver to read all ONFI parameter pages") Per ONFI specification (Rev. 4.0), if the CRC of the first parameter page read is not valid, the host should read redundant parameter page copies. Fix FSL NAND driver to read the two redundant copies which are mandatory in the specification. Signed-off-by: Jane Wan Signed-off-by: Boris Brezillon Signed-off-by: Maxim Kochetkov Reviewed-by: Priyanka Jain --- drivers/mtd/nand/raw/fsl_ifc_nand.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/nand/raw/fsl_ifc_nand.c b/drivers/mtd/nand/raw/fsl_ifc_nand.c index cf20238782..e5ff937872 100644 --- a/drivers/mtd/nand/raw/fsl_ifc_nand.c +++ b/drivers/mtd/nand/raw/fsl_ifc_nand.c @@ -411,9 +411,16 @@ static void fsl_ifc_cmdfunc(struct mtd_info *mtd, unsigned int command, /* READID must read all possible bytes while CEB is active */ case NAND_CMD_READID: case NAND_CMD_PARAM: { + /* + * For READID, read 8 bytes that are currently used. + * For PARAM, read all 3 copies of 256-bytes pages. + */ + int len = 8; int timing = IFC_FIR_OP_RB; - if (command == NAND_CMD_PARAM) + if (command == NAND_CMD_PARAM) { timing = IFC_FIR_OP_RBCD; + len = 256 * 3; + } ifc_out32(&ifc->ifc_nand.nand_fir0, (IFC_FIR_OP_CW0 << IFC_NAND_FIR0_OP0_SHIFT) | @@ -423,12 +430,8 @@ static void fsl_ifc_cmdfunc(struct mtd_info *mtd, unsigned int command, command << IFC_NAND_FCR0_CMD0_SHIFT); ifc_out32(&ifc->ifc_nand.row3, column); - /* - * although currently it's 8 bytes for READID, we always read - * the maximum 256 bytes(for PARAM) - */ - ifc_out32(&ifc->ifc_nand.nand_fbcr, 256); - ctrl->read_bytes = 256; + ifc_out32(&ifc->ifc_nand.nand_fbcr, len); + ctrl->read_bytes = len; set_addr(mtd, 0, 0, 0); fsl_ifc_run_command(mtd); -- cgit v1.2.1 From 06467e4652460f619f8be4bb4859e171d35cc258 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 25 Mar 2021 21:24:32 +1300 Subject: Makefile: Move non-DM migration messages to the top At present the driver model migration messages are mixed with the others. Collect them together before starting to refactor them. Signed-off-by: Simon Glass --- Makefile | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 3ebb38b113..64766e2029 100644 --- a/Makefile +++ b/Makefile @@ -1037,6 +1037,21 @@ ifneq ($(CONFIG_DM_SPI)$(CONFIG_OF_CONTROL),yy) endif endif endif +ifeq ($(CONFIG_OF_EMBED),y) + @echo >&2 "===================== WARNING ======================" + @echo >&2 "CONFIG_OF_EMBED is enabled. This option should only" + @echo >&2 "be used for debugging purposes. Please use" + @echo >&2 "CONFIG_OF_SEPARATE for boards in mainline." + @echo >&2 "See doc/README.fdt-control for more info." + @echo >&2 "====================================================" +endif +ifneq ($(CONFIG_SPL_FIT_GENERATOR),) + @echo >&2 "===================== WARNING ======================" + @echo >&2 "This board uses CONFIG_SPL_FIT_GENERATOR. Please migrate" + @echo >&2 "to binman instead, to avoid the proliferation of" + @echo >&2 "arch-specific scripts with no tests." + @echo >&2 "====================================================" +endif ifneq ($(CONFIG_DM),y) @echo >&2 "===================== WARNING ======================" @echo >&2 "This board does not use CONFIG_DM. CONFIG_DM will be" @@ -1106,14 +1121,6 @@ ifneq ($(CONFIG_DM_VIDEO),y) @echo >&2 "====================================================" endif endif -ifeq ($(CONFIG_OF_EMBED),y) - @echo >&2 "===================== WARNING ======================" - @echo >&2 "CONFIG_OF_EMBED is enabled. This option should only" - @echo >&2 "be used for debugging purposes. Please use" - @echo >&2 "CONFIG_OF_SEPARATE for boards in mainline." - @echo >&2 "See doc/README.fdt-control for more info." - @echo >&2 "====================================================" -endif ifeq ($(CONFIG_SPI_FLASH),y) ifneq ($(CONFIG_DM_SPI_FLASH)$(CONFIG_OF_CONTROL),yy) @echo >&2 "===================== WARNING ======================" @@ -1145,13 +1152,6 @@ ifneq ($(CONFIG_DM_ETH),y) @echo >&2 "See doc/driver-model/migration.rst for more info." @echo >&2 "====================================================" endif -endif -ifneq ($(CONFIG_SPL_FIT_GENERATOR),) - @echo >&2 "===================== WARNING ======================" - @echo >&2 "This board uses CONFIG_SPL_FIT_GENERATOR. Please migrate" - @echo >&2 "to binman instead, to avoid the proliferation of" - @echo >&2 "arch-specific scripts with no tests." - @echo >&2 "====================================================" endif @# Check that this build does not use CONFIG options that we do not @# know about unless they are in Kconfig. All the existing CONFIG -- cgit v1.2.1 From 13732528516d161ad52e878bdb6b5aec309cf0c0 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 25 Mar 2021 21:24:33 +1300 Subject: Makefile: Add common code to report deprecation Add a function which can be called to report a migration problem. This will make it easier to add new migration checks, since the logic and strings are not spread out over 8 lines of code. Signed-off-by: Simon Glass --- Makefile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Makefile b/Makefile index 64766e2029..a816ce74fb 100644 --- a/Makefile +++ b/Makefile @@ -1017,6 +1017,33 @@ quiet_cmd_cfgcheck = CFGCHK $2 cmd_cfgcheck = $(srctree)/scripts/check-config.sh $2 \ $(srctree)/scripts/config_whitelist.txt $(srctree) +# Concat the value of all the CONFIGs (result is 'y' or 'yy', etc. ) +got = $(foreach cfg,$(1),$($(cfg))) + +# expected value 'y for each one +expect = $(foreach cfg,$(1),y) + +# Show a deprecation message +# Args: +# 1: List of CONFIG_DM_... to migrate to (e.g. "CONFIG_DM_MMC CONFIG_BLK") +# 2: Name of component (e.g . "Ethernet drivers") +# 3: Release deadline (e.g. "v202.07") +# 4: Condition to require before checking (e.g. "$(CONFIG_NET)") +# Note: Script avoids bash construct, hence the strange double 'if' +# (patches welcome!) +define deprecated + if [ -n "$(strip $(4))" ]; then if [ "$(got)" != "$(expect)" ]; then \ + echo >&2 "===================== WARNING ======================"; \ + echo >&2 "This board does not use $(firstword $(1)) (Driver Model"; \ + echo >&2 "for $(2)). Please update the board to use"; \ + echo >&2 "$(firstword $(1)) before the $(3) release. Failure to"; \ + echo >&2 "update by the deadline may result in board removal."; \ + echo >&2 "See doc/driver-model/migration.rst for more info."; \ + echo >&2 "===================================================="; \ + fi; fi + +endef + PHONY += inputs inputs: $(INPUTS-y) -- cgit v1.2.1 From 77dc55ea39b3b6ec76bfa2dc32a66e22f1cc59cf Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 25 Mar 2021 21:24:34 +1300 Subject: Makefile: Use common code for MMC deprecation warning Update the MMC check to use the 'deprecated' function. Tested with zc5202 Old message: ===================== WARNING ====================== This board does not use CONFIG_DM_MMC. Please update the board to use CONFIG_DM_MMC before the v2019.04 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ==================================================== New message: ===================== WARNING ====================== This board does not use CONFIG_DM_MMC (Driver Model for MMC). Please update the board to use CONFIG_DM_MMC before the v2019.04 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ==================================================== Signed-off-by: Simon Glass --- Makefile | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Makefile b/Makefile index a816ce74fb..d166655bde 100644 --- a/Makefile +++ b/Makefile @@ -1087,16 +1087,7 @@ ifneq ($(CONFIG_DM),y) @echo >&2 "See doc/driver-model/migration.rst for more info." @echo >&2 "====================================================" endif -ifeq ($(CONFIG_MMC),y) -ifneq ($(CONFIG_DM_MMC)$(CONFIG_BLK),yy) - @echo >&2 "===================== WARNING ======================" - @echo >&2 "This board does not use CONFIG_DM_MMC. Please update" - @echo >&2 "the board to use CONFIG_DM_MMC before the v2019.04 release." - @echo >&2 "Failure to update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/migration.rst for more info." - @echo >&2 "====================================================" -endif -endif + $(call deprecated,CONFIG_DM_MMC CONFIG_BLK,MMC,v2019.04,$(CONFIG_MMC)) ifeq ($(CONFIG_USB),y) ifneq ($(CONFIG_DM_USB)$(CONFIG_OF_CONTROL)$(CONFIG_BLK),yyy) @echo >&2 "===================== WARNING ======================" -- cgit v1.2.1 From 9e035b8ee18e55ecda7c8d88ea03261f953baada Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 25 Mar 2021 21:24:35 +1300 Subject: Makefile: Use common code for USB deprecation warning Update the USB check to use the 'deprecated' function. Tested with xpress Old message: ===================== WARNING ====================== This board does not use CONFIG_DM_USB. Please update the board to use CONFIG_DM_USB before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ==================================================== New message: ===================== WARNING ====================== This board does not use CONFIG_DM_USB (Driver Model for USB). Please update the board to use CONFIG_DM_USB before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ==================================================== Signed-off-by: Simon Glass --- Makefile | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index d166655bde..800f6ccaa4 100644 --- a/Makefile +++ b/Makefile @@ -1088,16 +1088,8 @@ ifneq ($(CONFIG_DM),y) @echo >&2 "====================================================" endif $(call deprecated,CONFIG_DM_MMC CONFIG_BLK,MMC,v2019.04,$(CONFIG_MMC)) -ifeq ($(CONFIG_USB),y) -ifneq ($(CONFIG_DM_USB)$(CONFIG_OF_CONTROL)$(CONFIG_BLK),yyy) - @echo >&2 "===================== WARNING ======================" - @echo >&2 "This board does not use CONFIG_DM_USB. Please update" - @echo >&2 "the board to use CONFIG_DM_USB before the v2019.07 release." - @echo >&2 "Failure to update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/migration.rst for more info." - @echo >&2 "====================================================" -endif -endif + $(call deprecated,CONFIG_DM_USB CONFIG_OF_CONTROL CONFIG_BLK,\ + USB,v2019.07,$(CONFIG_USB)) ifeq ($(CONFIG_MVSATA_IDE),y) @echo >&2 "===================== WARNING ======================" @echo >&2 "This board does use CONFIG_MVSATA_IDE which is not" -- cgit v1.2.1 From a8834352982ac03b7e780b66fad944af46204250 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 25 Mar 2021 21:24:36 +1300 Subject: Makefile: Use common code for MVSATA_IDE deprecation warning Update the CONFIG_MVSATA_IDE check to use the 'deprecated' function. Tested with nas220 Old message: ===================== WARNING ====================== This board does use CONFIG_MVSATA_IDE which is not ported to driver-model (DM) yet. Please update the storage controller driver to use CONFIG_AHCI before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ==================================================== New message: ===================== WARNING ====================== This board does not use CONFIG_AHCI (Driver Model for AHCI instead of CONFIG_MVSATA_IDE). Please update the board to use CONFIG_AHCI before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ==================================================== Signed-off-by: Simon Glass --- Makefile | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 800f6ccaa4..d650a99fbe 100644 --- a/Makefile +++ b/Makefile @@ -1090,16 +1090,8 @@ endif $(call deprecated,CONFIG_DM_MMC CONFIG_BLK,MMC,v2019.04,$(CONFIG_MMC)) $(call deprecated,CONFIG_DM_USB CONFIG_OF_CONTROL CONFIG_BLK,\ USB,v2019.07,$(CONFIG_USB)) -ifeq ($(CONFIG_MVSATA_IDE),y) - @echo >&2 "===================== WARNING ======================" - @echo >&2 "This board does use CONFIG_MVSATA_IDE which is not" - @echo >&2 "ported to driver-model (DM) yet. Please update the storage" - @echo >&2 "controller driver to use CONFIG_AHCI before the v2019.07" - @echo >&2 "release." - @echo >&2 "Failure to update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/migration.rst for more info." - @echo >&2 "====================================================" -endif + $(call deprecated,CONFIG_AHCI,AHCI instead of CONFIG_MVSATA_IDE,v2019.07, \ + $(CONFIG_MVSATA_IDE)) ifeq ($(CONFIG_LIBATA),y) ifneq ($(CONFIG_AHCI),y) @echo >&2 "===================== WARNING ======================" -- cgit v1.2.1 From 099288bf78a5222e633badffc0f3ffeb40b8e376 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 25 Mar 2021 21:24:37 +1300 Subject: Makefile: Use common code for LIBATA deprecation warning Update the CONFIG_LIBATA check to use the 'deprecated' function. Tested with MPC8349ITX Old message: ===================== WARNING ====================== This board does use CONFIG_LIBATA but has CONFIG_AHCI not enabled. Please update the storage controller driver to use CONFIG_AHCI before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ==================================================== New message: ===================== WARNING ====================== This board does not use CONFIG_AHCI (Driver Model for AHCI). Please update the board to use CONFIG_AHCI before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ==================================================== Signed-off-by: Simon Glass --- Makefile | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/Makefile b/Makefile index d650a99fbe..8d275da7c6 100644 --- a/Makefile +++ b/Makefile @@ -1092,17 +1092,7 @@ endif USB,v2019.07,$(CONFIG_USB)) $(call deprecated,CONFIG_AHCI,AHCI instead of CONFIG_MVSATA_IDE,v2019.07, \ $(CONFIG_MVSATA_IDE)) -ifeq ($(CONFIG_LIBATA),y) -ifneq ($(CONFIG_AHCI),y) - @echo >&2 "===================== WARNING ======================" - @echo >&2 "This board does use CONFIG_LIBATA but has CONFIG_AHCI not" - @echo >&2 "enabled. Please update the storage controller driver to use" - @echo >&2 "CONFIG_AHCI before the v2019.07 release." - @echo >&2 "Failure to update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/migration.rst for more info." - @echo >&2 "====================================================" -endif -endif + $(call deprecated,CONFIG_AHCI,AHCI,v2019.07, $(CONFIG_LIBATA)) ifeq ($(CONFIG_PCI),y) ifneq ($(CONFIG_DM_PCI),y) @echo >&2 "===================== WARNING ======================" -- cgit v1.2.1 From 39e526a8ece5624f72c47abbcb2298ce940265f6 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 25 Mar 2021 21:24:38 +1300 Subject: Makefile: Use common code for PCI deprecation warning Update the CONFIG_DM_PCI check to use the 'deprecated' function. Tested with MPC8349ITX Old message: ===================== WARNING ====================== This board does not use CONFIG_DM_PCI Please update the board to use CONFIG_DM_PCI before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ==================================================== New message: ===================== WARNING ====================== This board does not use CONFIG_DM_PCI (Driver Model for PCI). Please update the board to use CONFIG_DM_PCI before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ==================================================== Signed-off-by: Simon Glass --- Makefile | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 8d275da7c6..d1a9b3e9e2 100644 --- a/Makefile +++ b/Makefile @@ -1093,16 +1093,7 @@ endif $(call deprecated,CONFIG_AHCI,AHCI instead of CONFIG_MVSATA_IDE,v2019.07, \ $(CONFIG_MVSATA_IDE)) $(call deprecated,CONFIG_AHCI,AHCI,v2019.07, $(CONFIG_LIBATA)) -ifeq ($(CONFIG_PCI),y) -ifneq ($(CONFIG_DM_PCI),y) - @echo >&2 "===================== WARNING ======================" - @echo >&2 "This board does not use CONFIG_DM_PCI Please update" - @echo >&2 "the board to use CONFIG_DM_PCI before the v2019.07 release." - @echo >&2 "Failure to update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/migration.rst for more info." - @echo >&2 "====================================================" -endif -endif + $(call deprecated,CONFIG_DM_PCI,PCI,v2019.07,$(CONFIG_PCI)) ifneq ($(CONFIG_LCD)$(CONFIG_VIDEO),) ifneq ($(CONFIG_DM_VIDEO),y) @echo >&2 "===================== WARNING ======================" -- cgit v1.2.1 From d13aee07fdaf81eb5c5b69336840d6a2753e1cd1 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 25 Mar 2021 21:24:39 +1300 Subject: Makefile: Use common code for DM_VIDEO deprecation warning Update the CONFIG_DM_VIDEO check to use the 'deprecated' function. Tested with pxm2 Old message: ===================== WARNING ====================== This board does not use CONFIG_DM_VIDEO Please update the board to use CONFIG_DM_VIDEO before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ==================================================== New message: ===================== WARNING ====================== This board does not use CONFIG_DM_VIDEO (Driver Model for video). Please update the board to use CONFIG_DM_VIDEO before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ================================================== Signed-off-by: Simon Glass --- Makefile | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index d1a9b3e9e2..0c2f0ab0cf 100644 --- a/Makefile +++ b/Makefile @@ -1094,16 +1094,8 @@ endif $(CONFIG_MVSATA_IDE)) $(call deprecated,CONFIG_AHCI,AHCI,v2019.07, $(CONFIG_LIBATA)) $(call deprecated,CONFIG_DM_PCI,PCI,v2019.07,$(CONFIG_PCI)) -ifneq ($(CONFIG_LCD)$(CONFIG_VIDEO),) -ifneq ($(CONFIG_DM_VIDEO),y) - @echo >&2 "===================== WARNING ======================" - @echo >&2 "This board does not use CONFIG_DM_VIDEO Please update" - @echo >&2 "the board to use CONFIG_DM_VIDEO before the v2019.07 release." - @echo >&2 "Failure to update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/migration.rst for more info." - @echo >&2 "====================================================" -endif -endif + $(call deprecated,CONFIG_DM_VIDEO,video,v2019.07,\ + $(CONFIG_LCD)$(CONFIG_VIDEO)) ifeq ($(CONFIG_SPI_FLASH),y) ifneq ($(CONFIG_DM_SPI_FLASH)$(CONFIG_OF_CONTROL),yy) @echo >&2 "===================== WARNING ======================" -- cgit v1.2.1 From ec384f9f1242039742e3955c774669e7d69a48ea Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 25 Mar 2021 21:24:40 +1300 Subject: Makefile: Use common code for SPI_FLASH deprecation warning Update the CONFIG_DM_SPI_FLASH check to use the 'deprecated' function. Tested with vinco Old message: ===================== WARNING ====================== This board does not use CONFIG_DM_SPI_FLASH. Please update the board to use CONFIG_SPI_FLASH before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ==================================================== New message: ===================== WARNING ====================== This board does not use CONFIG_DM_SPI_FLASH (Driver Model for SPI flash). Please update the board to use CONFIG_DM_SPI_FLASH before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ==================================================== Signed-off-by: Simon Glass --- Makefile | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 0c2f0ab0cf..c89547f6b7 100644 --- a/Makefile +++ b/Makefile @@ -1096,16 +1096,8 @@ endif $(call deprecated,CONFIG_DM_PCI,PCI,v2019.07,$(CONFIG_PCI)) $(call deprecated,CONFIG_DM_VIDEO,video,v2019.07,\ $(CONFIG_LCD)$(CONFIG_VIDEO)) -ifeq ($(CONFIG_SPI_FLASH),y) -ifneq ($(CONFIG_DM_SPI_FLASH)$(CONFIG_OF_CONTROL),yy) - @echo >&2 "===================== WARNING ======================" - @echo >&2 "This board does not use CONFIG_DM_SPI_FLASH. Please update" - @echo >&2 "the board to use CONFIG_SPI_FLASH before the v2019.07 release." - @echo >&2 "Failure to update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/migration.rst for more info." - @echo >&2 "====================================================" -endif -endif + $(call deprecated,CONFIG_DM_SPI_FLASH,SPI flash,v2019.07,\ + $(CONFIG_SPI_FLASH)) ifneq ($(CONFIG_WATCHDOG)$(CONFIG_HW_WATCHDOG),) ifneq ($(CONFIG_WDT),y) @echo >&2 "===================== WARNING ======================" -- cgit v1.2.1 From 78b4a564cb9ab75a2d298a731d05c600eb4400d9 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 25 Mar 2021 21:24:41 +1300 Subject: Makefile: Use common code for WDT deprecation warning Update the CONFIG_WDT check to use the 'deprecated' function. Tested with kmcent2 Old message: ===================== WARNING ====================== This board does not use CONFIG_WDT (DM watchdog support). Please update the board to use CONFIG_WDT before the v2019.10 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ==================================================== New message: ===================== WARNING ====================== This board does not use CONFIG_WDT (Driver Model for DM watchdog). Please update the board to use CONFIG_WDT before the v2019.10 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ==================================================== Signed-off-by: Simon Glass --- Makefile | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index c89547f6b7..31af66feb3 100644 --- a/Makefile +++ b/Makefile @@ -1098,17 +1098,8 @@ endif $(CONFIG_LCD)$(CONFIG_VIDEO)) $(call deprecated,CONFIG_DM_SPI_FLASH,SPI flash,v2019.07,\ $(CONFIG_SPI_FLASH)) -ifneq ($(CONFIG_WATCHDOG)$(CONFIG_HW_WATCHDOG),) -ifneq ($(CONFIG_WDT),y) - @echo >&2 "===================== WARNING ======================" - @echo >&2 "This board does not use CONFIG_WDT (DM watchdog support)." - @echo >&2 "Please update the board to use CONFIG_WDT before the" - @echo >&2 "v2019.10 release." - @echo >&2 "Failure to update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/migration.rst for more info." - @echo >&2 "====================================================" -endif -endif + $(call deprecated,CONFIG_WDT,DM watchdog,v2019.10,\ + $(CONFIG_WATCHDOG)$(CONFIG_HW_WATCHDOG)) ifneq ($(CONFIG_NET),) ifneq ($(CONFIG_DM_ETH),y) @echo >&2 "===================== WARNING ======================" -- cgit v1.2.1 From 8cd1874f4c0414c4d519d16a79d2bc8a0523523a Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 25 Mar 2021 21:24:42 +1300 Subject: Makefile: Use common code for DM_ETH deprecation warning Update the CONFIG_DM_ETH check to use the 'deprecated' function. Tested with snow Old message: ===================== WARNING ====================== This board does not use CONFIG_DM_ETH (Driver Model for Ethernet drivers). Please update the board to use CONFIG_DM_ETH before the v2020.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ==================================================== New message: ===================== WARNING ====================== This board does not use CONFIG_DM_ETH (Driver Model for Ethernet drivers). Please update the board to use CONFIG_DM_ETH before the v2020.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/migration.rst for more info. ==================================================== Signed-off-by: Simon Glass --- Makefile | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 31af66feb3..0613f6d68c 100644 --- a/Makefile +++ b/Makefile @@ -1100,17 +1100,7 @@ endif $(CONFIG_SPI_FLASH)) $(call deprecated,CONFIG_WDT,DM watchdog,v2019.10,\ $(CONFIG_WATCHDOG)$(CONFIG_HW_WATCHDOG)) -ifneq ($(CONFIG_NET),) -ifneq ($(CONFIG_DM_ETH),y) - @echo >&2 "===================== WARNING ======================" - @echo >&2 "This board does not use CONFIG_DM_ETH (Driver Model" - @echo >&2 "for Ethernet drivers). Please update the board to use" - @echo >&2 "CONFIG_DM_ETH before the v2020.07 release. Failure to" - @echo >&2 "update by the deadline may result in board removal." - @echo >&2 "See doc/driver-model/migration.rst for more info." - @echo >&2 "====================================================" -endif -endif + $(call deprecated,CONFIG_DM_ETH,Ethernet drivers,v2020.07,$(CONFIG_NET)) @# Check that this build does not use CONFIG options that we do not @# know about unless they are in Kconfig. All the existing CONFIG @# options are whitelisted, so new ones should not be added. -- cgit v1.2.1 From 782dac5b7d99506ab65276b923d4b2cdc7ff9d13 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 25 Mar 2021 21:24:43 +1300 Subject: Makefile: Drop the old SPI flash migration message This message does not seem to make sense. It may be out of date. Drop it. Signed-off-by: Simon Glass --- Makefile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Makefile b/Makefile index 0613f6d68c..c6a3983b8f 100644 --- a/Makefile +++ b/Makefile @@ -1058,11 +1058,6 @@ endif ifeq ($(CONFIG_DEPRECATED),y) $(warning "You have deprecated configuration options enabled in your .config! Please check your configuration.") -ifeq ($(CONFIG_SPI),y) -ifneq ($(CONFIG_DM_SPI)$(CONFIG_OF_CONTROL),yy) - $(warning "The relevant config item with associated code will remove in v2019.07 release.") -endif -endif endif ifeq ($(CONFIG_OF_EMBED),y) @echo >&2 "===================== WARNING ======================" -- cgit v1.2.1 From 65c8cdc72bca275334f01d1089aef0661f1bd468 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 25 Mar 2021 21:24:44 +1300 Subject: dm: i2c: Add a migration method for I2C This probably should have been done a while back since it is a core system. Add a migration deadline of later this year, to catch the stragglers. Signed-off-by: Simon Glass --- Makefile | 1 + doc/driver-model/migration.rst | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/Makefile b/Makefile index c6a3983b8f..e9b9c15808 100644 --- a/Makefile +++ b/Makefile @@ -1096,6 +1096,7 @@ endif $(call deprecated,CONFIG_WDT,DM watchdog,v2019.10,\ $(CONFIG_WATCHDOG)$(CONFIG_HW_WATCHDOG)) $(call deprecated,CONFIG_DM_ETH,Ethernet drivers,v2020.07,$(CONFIG_NET)) + $(call deprecated,CONFIG_DM_I2C,I2C drivers,v2022.04,$(CONFIG_I2C)) @# Check that this build does not use CONFIG options that we do not @# know about unless they are in Kconfig. All the existing CONFIG @# options are whitelisted, so new ones should not be added. diff --git a/doc/driver-model/migration.rst b/doc/driver-model/migration.rst index 2284e8a6f7..8d0bb7635b 100644 --- a/doc/driver-model/migration.rst +++ b/doc/driver-model/migration.rst @@ -99,3 +99,11 @@ Deadline: 2020.07 The network subsystem has supported the driver model since early 2015. Maintainers should submit patches switching over to using CONFIG_DM_ETH and other base driver model options in time for inclusion in the 2020.07 release. + +CONFIG_DM_I2C +------------- +Deadline: 2021.10 + +The I2C subsystem has supported the driver model since early 2015. +Maintainers should submit patches switching over to using CONFIG_DM_I2C and +other base driver model options in time for inclusion in the 2021.10 release. -- cgit v1.2.1 From 94d66d8b242b099e33cda4c27d1ff1e4bb9decf7 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Fri, 26 Mar 2021 15:14:14 -0400 Subject: Azure: Use "pacman -Sy" to install the toolchain We now see an error such as: warning: database file for 'ucrt64' does not exist (use '-Sy' to download) error: failed to prepare transaction (could not find database) So use -Sy as suggested. Signed-off-by: Tom Rini Reviewed-by: Bin Meng --- .azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 506e0c0618..a7e27fa5da 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -23,7 +23,7 @@ jobs: %CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm -Syyuu" displayName: 'Update MSYS2' - script: | - %CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm --needed -S make gcc bison flex diffutils openssl-devel" + %CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm --needed -Sy make gcc bison flex diffutils openssl-devel" displayName: 'Install Toolchain' - script: | echo make tools-only_defconfig tools-only NO_SDL=1 > build-tools.sh -- cgit v1.2.1 From 3c2503ee3327ea93a175768bafbaddff182c1c08 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 28 Mar 2021 06:53:08 +1300 Subject: test: Add udevice declaration to avoid build error When including this file on a board other than sandbox (e.g by enabling UNIT_TEST and CMD_SETEXPR) an results. Fix it by declaring struct udevice first. Signed-off-by: Simon Glass Reported-by: Heinrich Schuchardt --- include/dm/test.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/dm/test.h b/include/dm/test.h index 6ac6672cd6..c5a9610ec7 100644 --- a/include/dm/test.h +++ b/include/dm/test.h @@ -6,6 +6,8 @@ #ifndef __DM_TEST_H #define __DM_TEST_H +struct udevice; + /** * struct dm_test_cdata - configuration data for test instance * -- cgit v1.2.1 From 6863c7f1b633d50e025ce34ad249b59a14c99b2a Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Thu, 25 Mar 2021 22:02:28 -0400 Subject: dm: test: Always include command.h for print_ut We need this header for U_BOOT_CMD, which is always present even without EFI. Fixes: 82c468a049 ("dm: test: Update Makefile conditions") Signed-off-by: Sean Anderson Reviewed-by: Simon Glass --- test/print_ut.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/print_ut.c b/test/print_ut.c index a456a449ef..5b0a46de9c 100644 --- a/test/print_ut.c +++ b/test/print_ut.c @@ -6,10 +6,8 @@ #define DEBUG #include -#if CONFIG_IS_ENABLED(EFI_LOADER) && !defined(API_BUILD) #include #include -#endif #include #include #include -- cgit v1.2.1 From 3b142045e8a7f0ab17b6099e9226296af45967d0 Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Sat, 20 Mar 2021 20:43:05 +0000 Subject: Support building on macOS/arm64 On Arm-based Macs, -no_pie is ignored and gives a linker warning. Moreover, the build falls over with: ld: Absolute addressing not allowed in arm64 code but used in '_image_type_ptr_aisimage' referencing '_image_type_aisimage' for dumpimage and mkimage, since we put data structs in text sections not data sections and so cannot have dynamic relocations. Instead, move the sections to __DATA and drop disabling PIE. Signed-off-by: Jessica Clarke Reviewed-by: Tom Rini --- Makefile | 5 ----- tools/imagetool.h | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index e9b9c15808..7d73062df3 100644 --- a/Makefile +++ b/Makefile @@ -324,11 +324,6 @@ HOSTCC = $(call os_x_before, 10, 5, "cc", "gcc") KBUILD_HOSTCFLAGS += $(call os_x_before, 10, 4, "-traditional-cpp") KBUILD_HOSTLDFLAGS += $(call os_x_before, 10, 5, "-multiply_defined suppress") -# since Lion (10.7) ASLR is on by default, but we use linker generated lists -# in some host tools which is a problem then ... so disable ASLR for these -# tools -KBUILD_HOSTLDFLAGS += $(call os_x_before, 10, 7, "", "-Xlinker -no_pie") - # macOS Mojave (10.14.X) # Undefined symbols for architecture x86_64: "_PyArg_ParseTuple" KBUILD_HOSTLDFLAGS += $(call os_x_after, 10, 14, "-lpython -dynamclib", "") diff --git a/tools/imagetool.h b/tools/imagetool.h index 8726792c8c..2801ea9e9f 100644 --- a/tools/imagetool.h +++ b/tools/imagetool.h @@ -273,14 +273,14 @@ int rockchip_copy_image(int fd, struct image_tool_params *mparams); #define INIT_SECTION(name) do { \ unsigned long name ## _len; \ - char *__cat(pstart_, name) = getsectdata("__TEXT", \ + char *__cat(pstart_, name) = getsectdata("__DATA", \ #name, &__cat(name, _len)); \ char *__cat(pstop_, name) = __cat(pstart_, name) + \ __cat(name, _len); \ __cat(__start_, name) = (void *)__cat(pstart_, name); \ __cat(__stop_, name) = (void *)__cat(pstop_, name); \ } while (0) -#define SECTION(name) __attribute__((section("__TEXT, " #name))) +#define SECTION(name) __attribute__((section("__DATA, " #name))) struct image_type_params **__start_image_type, **__stop_image_type; #else -- cgit v1.2.1 From d8eafb16c85bc3b5d85d7ba8ebb1438cc0ae168f Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 29 Mar 2021 17:20:13 -0400 Subject: Prepare v2021.04-rc5 Signed-off-by: Tom Rini --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7d73062df3..e60717f7a2 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ VERSION = 2021 PATCHLEVEL = 04 SUBLEVEL = -EXTRAVERSION = -rc4 +EXTRAVERSION = -rc5 NAME = # *DOCUMENTATION* -- cgit v1.2.1