diff options
author | Duncan Laurie <dlaurie@google.com> | 2018-05-07 14:18:13 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2018-05-11 08:59:51 +0000 |
commit | bae9f85ddbd2e62af1b47169cbfeb10b06d45e04 (patch) | |
tree | 7d02393aa9a757ffaaf33fd4ffc841ddc239e4a7 /util/sconfig/lex.yy.c_shipped | |
parent | 57df0888169a2622e37dfad3694e3de544b8b6fb (diff) | |
download | coreboot-bae9f85ddbd2e62af1b47169cbfeb10b06d45e04.tar.xz |
devicetree: Add USB device type
This commit adds support for describing USB ports in devicetree.cb.
It allows a USB port location to be described in the tree with
configuration information, and ACPI code to be generated that
provides this information to the OS.
A new scan_usb_bus() is added that will scan bridges for devices so
a tree of ports and hubs can be created.
The device address is computed with a 'port type' and a 'port id'
which is flexible for SOC to handle depending on their specific USB
setup and allows USB2 and USB3 ports to be described separately.
For example a board may have devices on two ports, one with a USB2
device and one with a USB3 device, both of which are connected to an
xHCI controller with a root hub:
xHCI
|
RootHub
| |
USB2[0] USB3[2]
device pci 14.0 on
chip drivers/usb/acpi
register "name" = ""Root Hub""
device usb 0.0 on
chip drivers/usb/acpi
register "name" = ""USB 2.0 Port 0""
device usb 2.0 on end
end
chip drivers/usb/acpi
register "name" = ""USB 3.0 Port 2""
device usb 3.2 on end
end
end
end
end
Change-Id: I64e6eba503cdab49be393465b535e139a8c90ef4
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/26169
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'util/sconfig/lex.yy.c_shipped')
-rw-r--r-- | util/sconfig/lex.yy.c_shipped | 240 |
1 files changed, 122 insertions, 118 deletions
diff --git a/util/sconfig/lex.yy.c_shipped b/util/sconfig/lex.yy.c_shipped index cde6f9f93d..dbdd8e6a29 100644 --- a/util/sconfig/lex.yy.c_shipped +++ b/util/sconfig/lex.yy.c_shipped @@ -358,8 +358,8 @@ static void yynoreturn yy_fatal_error (yyconst char* msg ); *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 35 -#define YY_END_OF_BUFFER 36 +#define YY_NUM_RULES 36 +#define YY_END_OF_BUFFER 37 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -367,23 +367,23 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[136] = +static yyconst flex_int16_t yy_accept[139] = { 0, - 0, 0, 36, 34, 1, 3, 34, 34, 34, 29, - 29, 27, 30, 34, 30, 30, 30, 34, 34, 34, - 34, 34, 34, 34, 34, 34, 1, 3, 34, 0, - 34, 34, 0, 2, 29, 30, 34, 34, 34, 34, - 30, 34, 34, 34, 34, 34, 34, 22, 34, 34, - 34, 34, 7, 34, 34, 34, 34, 34, 33, 33, - 34, 0, 28, 34, 34, 15, 34, 34, 21, 26, - 34, 12, 34, 34, 20, 34, 34, 8, 9, 11, - 34, 19, 34, 34, 0, 31, 4, 34, 34, 34, - 34, 34, 34, 34, 18, 34, 34, 32, 32, 34, - - 34, 34, 34, 34, 34, 13, 34, 34, 34, 5, - 16, 34, 34, 10, 34, 34, 34, 17, 24, 34, - 34, 34, 34, 34, 6, 34, 34, 34, 34, 34, - 23, 34, 14, 25, 0 + 0, 0, 37, 35, 1, 3, 35, 35, 35, 30, + 30, 28, 31, 35, 31, 31, 31, 35, 35, 35, + 35, 35, 35, 35, 35, 35, 35, 1, 3, 35, + 0, 35, 35, 0, 2, 30, 31, 35, 35, 35, + 35, 31, 35, 35, 35, 35, 35, 35, 23, 35, + 35, 35, 35, 7, 35, 35, 35, 35, 35, 35, + 34, 34, 35, 0, 29, 35, 35, 15, 35, 35, + 22, 27, 35, 12, 35, 35, 21, 35, 35, 8, + 9, 11, 35, 19, 35, 20, 35, 0, 32, 4, + 35, 35, 35, 35, 35, 35, 35, 18, 35, 35, + + 33, 33, 35, 35, 35, 35, 35, 35, 13, 35, + 35, 35, 5, 16, 35, 35, 10, 35, 35, 35, + 17, 25, 35, 35, 35, 35, 35, 6, 35, 35, + 35, 35, 35, 24, 35, 14, 26, 0 } ; static yyconst YY_CHAR yy_ec[256] = @@ -426,106 +426,106 @@ static yyconst YY_CHAR yy_meta[39] = 1, 1, 1, 1, 1, 1, 1, 1 } ; -static yyconst flex_uint16_t yy_base[143] = +static yyconst flex_uint16_t yy_base[146] = { 0, - 0, 0, 205, 0, 202, 206, 200, 37, 41, 38, - 165, 0, 44, 187, 54, 78, 60, 179, 45, 182, - 171, 42, 47, 176, 41, 0, 194, 206, 77, 190, - 87, 91, 191, 206, 0, 88, 104, 178, 167, 156, - 93, 163, 158, 168, 159, 167, 161, 167, 152, 152, - 156, 158, 0, 154, 148, 154, 151, 157, 0, 206, - 101, 169, 0, 162, 142, 155, 145, 152, 0, 0, - 147, 0, 146, 136, 0, 140, 135, 0, 0, 0, - 138, 0, 129, 156, 155, 0, 0, 140, 139, 132, - 124, 123, 129, 134, 0, 119, 113, 0, 206, 124, - - 128, 120, 122, 121, 126, 0, 110, 110, 107, 0, - 0, 109, 93, 104, 98, 84, 84, 0, 0, 89, - 77, 87, 71, 66, 0, 64, 62, 50, 47, 33, - 0, 28, 0, 0, 206, 40, 129, 131, 133, 135, - 137, 139 + 0, 0, 207, 0, 204, 208, 202, 37, 41, 38, + 167, 0, 44, 189, 54, 78, 60, 181, 45, 184, + 173, 42, 47, 178, 41, 165, 0, 195, 208, 77, + 191, 87, 91, 192, 208, 0, 88, 104, 179, 168, + 157, 93, 164, 159, 169, 160, 168, 162, 168, 153, + 153, 157, 159, 0, 155, 149, 155, 152, 158, 157, + 0, 208, 101, 169, 0, 162, 142, 155, 145, 152, + 0, 0, 147, 0, 146, 136, 0, 140, 135, 0, + 0, 0, 138, 0, 129, 0, 156, 155, 0, 0, + 140, 139, 132, 124, 123, 129, 134, 0, 119, 113, + + 0, 208, 124, 128, 120, 122, 121, 126, 0, 110, + 110, 107, 0, 0, 109, 93, 104, 98, 84, 84, + 0, 0, 89, 77, 87, 71, 66, 0, 64, 62, + 50, 47, 33, 0, 28, 0, 0, 208, 40, 129, + 131, 133, 135, 137, 139 } ; -static yyconst flex_int16_t yy_def[143] = +static yyconst flex_int16_t yy_def[146] = { 0, - 135, 1, 135, 136, 135, 135, 136, 137, 138, 136, - 10, 136, 10, 136, 10, 10, 10, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 135, 135, 137, 139, - 140, 138, 141, 135, 10, 10, 10, 136, 136, 136, - 10, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 135, - 140, 142, 37, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 135, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 135, 136, - - 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, - 136, 136, 136, 136, 0, 135, 135, 135, 135, 135, - 135, 135 + 138, 1, 138, 139, 138, 138, 139, 140, 141, 139, + 10, 139, 10, 139, 10, 10, 10, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 138, 138, 140, + 142, 143, 141, 144, 138, 10, 10, 10, 139, 139, + 139, 10, 139, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, + 139, 138, 143, 145, 38, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 138, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, + + 139, 138, 139, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, + 139, 139, 139, 139, 139, 139, 139, 0, 138, 138, + 138, 138, 138, 138, 138 } ; -static yyconst flex_uint16_t yy_nxt[245] = +static yyconst flex_uint16_t yy_nxt[247] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 10, 12, 13, 13, 14, 4, 4, 4, 13, 13, 15, 16, 17, 13, 18, 4, 19, 20, 21, 4, 22, 23, - 4, 24, 25, 4, 4, 4, 4, 4, 30, 30, - 26, 31, 33, 34, 35, 35, 35, 134, 36, 36, - 36, 36, 36, 46, 36, 36, 36, 36, 36, 36, - 36, 36, 36, 52, 133, 54, 36, 36, 36, 53, - 57, 132, 47, 48, 55, 58, 49, 39, 30, 30, - 131, 59, 130, 40, 36, 36, 36, 44, 62, 62, - 129, 26, 33, 34, 36, 36, 36, 128, 41, 36, - - 36, 36, 62, 62, 127, 84, 42, 126, 125, 43, - 63, 63, 63, 124, 63, 63, 123, 122, 121, 120, - 63, 63, 63, 63, 63, 63, 119, 118, 67, 29, - 29, 32, 32, 30, 30, 61, 61, 33, 33, 62, - 62, 117, 116, 115, 114, 113, 112, 111, 110, 109, - 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, - 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, - 88, 87, 86, 85, 83, 82, 81, 80, 79, 78, - 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, - 66, 65, 64, 34, 60, 27, 56, 51, 50, 45, - - 38, 37, 28, 27, 135, 3, 135, 135, 135, 135, - 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, - 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, - 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, - 135, 135, 135, 135 + 4, 24, 25, 4, 26, 4, 4, 4, 31, 31, + 27, 32, 34, 35, 36, 36, 36, 137, 37, 37, + 37, 37, 37, 47, 37, 37, 37, 37, 37, 37, + 37, 37, 37, 53, 136, 55, 37, 37, 37, 54, + 58, 135, 48, 49, 56, 59, 50, 40, 31, 31, + 134, 61, 133, 41, 37, 37, 37, 45, 64, 64, + 132, 27, 34, 35, 37, 37, 37, 131, 42, 37, + + 37, 37, 64, 64, 130, 87, 43, 129, 128, 44, + 65, 65, 65, 127, 65, 65, 126, 125, 124, 123, + 65, 65, 65, 65, 65, 65, 122, 121, 69, 30, + 30, 33, 33, 31, 31, 63, 63, 34, 34, 64, + 64, 120, 119, 118, 117, 116, 115, 114, 113, 112, + 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, + 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, + 91, 90, 89, 88, 86, 85, 84, 83, 82, 81, + 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, + 70, 68, 67, 66, 35, 62, 28, 60, 57, 52, + + 51, 46, 39, 38, 29, 28, 138, 3, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138 } ; -static yyconst flex_int16_t yy_chk[245] = +static yyconst flex_int16_t yy_chk[247] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 8, - 136, 8, 9, 9, 10, 10, 10, 132, 10, 10, + 139, 8, 9, 9, 10, 10, 10, 135, 10, 10, 13, 13, 13, 19, 10, 10, 10, 10, 10, 10, - 15, 15, 15, 22, 130, 23, 17, 17, 17, 22, - 25, 129, 19, 19, 23, 25, 19, 15, 29, 29, - 128, 29, 127, 15, 16, 16, 16, 17, 31, 31, - 126, 31, 32, 32, 36, 36, 36, 124, 16, 41, - - 41, 41, 61, 61, 123, 61, 16, 122, 121, 16, - 37, 37, 37, 120, 37, 37, 117, 116, 115, 114, - 37, 37, 37, 37, 37, 37, 113, 112, 41, 137, - 137, 138, 138, 139, 139, 140, 140, 141, 141, 142, - 142, 109, 108, 107, 105, 104, 103, 102, 101, 100, - 97, 96, 94, 93, 92, 91, 90, 89, 88, 85, - 84, 83, 81, 77, 76, 74, 73, 71, 68, 67, - 66, 65, 64, 62, 58, 57, 56, 55, 54, 52, - 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, - 40, 39, 38, 33, 30, 27, 24, 21, 20, 18, - - 14, 11, 7, 5, 3, 135, 135, 135, 135, 135, - 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, - 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, - 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, - 135, 135, 135, 135 + 15, 15, 15, 22, 133, 23, 17, 17, 17, 22, + 25, 132, 19, 19, 23, 25, 19, 15, 30, 30, + 131, 30, 130, 15, 16, 16, 16, 17, 32, 32, + 129, 32, 33, 33, 37, 37, 37, 127, 16, 42, + + 42, 42, 63, 63, 126, 63, 16, 125, 124, 16, + 38, 38, 38, 123, 38, 38, 120, 119, 118, 117, + 38, 38, 38, 38, 38, 38, 116, 115, 42, 140, + 140, 141, 141, 142, 142, 143, 143, 144, 144, 145, + 145, 112, 111, 110, 108, 107, 106, 105, 104, 103, + 100, 99, 97, 96, 95, 94, 93, 92, 91, 88, + 87, 85, 83, 79, 78, 76, 75, 73, 70, 69, + 68, 67, 66, 64, 60, 59, 58, 57, 56, 55, + 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, + 43, 41, 40, 39, 34, 31, 28, 26, 24, 21, + + 20, 18, 14, 11, 7, 5, 3, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138, 138, 138, 138, 138, + 138, 138, 138, 138, 138, 138 } ; static yy_state_type yy_last_accepting_state; @@ -804,13 +804,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 136 ) + if ( yy_current_state >= 139 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 206 ); + while ( yy_base[yy_current_state] != 208 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -914,39 +914,39 @@ YY_RULE_SETUP YY_BREAK case 20: YY_RULE_SETUP -{yylval.number=IRQ; return(RESOURCE);} +{yylval.number=USB; return(BUS);} YY_BREAK case 21: YY_RULE_SETUP -{yylval.number=DRQ; return(RESOURCE);} +{yylval.number=IRQ; return(RESOURCE);} YY_BREAK case 22: YY_RULE_SETUP -{yylval.number=IO; return(RESOURCE);} +{yylval.number=DRQ; return(RESOURCE);} YY_BREAK case 23: YY_RULE_SETUP -{return(IOAPIC_IRQ);} +{yylval.number=IO; return(RESOURCE);} YY_BREAK case 24: YY_RULE_SETUP -{return(INHERIT);} +{return(IOAPIC_IRQ);} YY_BREAK case 25: YY_RULE_SETUP -{return(SUBSYSTEMID);} +{return(INHERIT);} YY_BREAK case 26: YY_RULE_SETUP -{return(END);} +{return(SUBSYSTEMID);} YY_BREAK case 27: YY_RULE_SETUP -{return(EQUALS);} +{return(END);} YY_BREAK case 28: YY_RULE_SETUP -{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);} +{return(EQUALS);} YY_BREAK case 29: YY_RULE_SETUP @@ -958,12 +958,11 @@ YY_RULE_SETUP YY_BREAK case 31: YY_RULE_SETUP -{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(PCIINT);} +{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);} YY_BREAK case 32: -/* rule 32 can match eol */ YY_RULE_SETUP -{yylval.string = malloc(yyleng-1); strncpy(yylval.string, yytext+1, yyleng-2); yylval.string[yyleng-2]='\0'; return(STRING);} +{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(PCIINT);} YY_BREAK case 33: /* rule 33 can match eol */ @@ -971,11 +970,16 @@ YY_RULE_SETUP {yylval.string = malloc(yyleng-1); strncpy(yylval.string, yytext+1, yyleng-2); yylval.string[yyleng-2]='\0'; return(STRING);} YY_BREAK case 34: +/* rule 34 can match eol */ YY_RULE_SETUP -{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(STRING);} +{yylval.string = malloc(yyleng-1); strncpy(yylval.string, yytext+1, yyleng-2); yylval.string[yyleng-2]='\0'; return(STRING);} YY_BREAK case 35: YY_RULE_SETUP +{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(STRING);} + YY_BREAK +case 36: +YY_RULE_SETUP ECHO; YY_BREAK case YY_STATE_EOF(INITIAL): @@ -1270,7 +1274,7 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 136 ) + if ( yy_current_state >= 139 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; @@ -1298,11 +1302,11 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 136 ) + if ( yy_current_state >= 139 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; - yy_is_jam = (yy_current_state == 135); + yy_is_jam = (yy_current_state == 138); return yy_is_jam ? 0 : yy_current_state; } |