sconfig: Add a new "SPI" device type

Update sconfig lex and yacc files to add support for a new "SPI" device
type in the devicetree. SPI device takes only parameter i.e. chip select
number for the device on the SPI bus.

Re-generate the shipped files for sconfig using flex 2.6.0 and bison
3.0.4 (make CONFIG_SCONFIG_GENPARSER=1). Clean up local paths that leak
into generated files.

BUG=chrome-os-partner:59832
BRANCH=None
TEST=Compiles successfully.

Change-Id: If0831e25b3e4ed87827ad92356d7bf47b6387884
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/18339
Tested-by: build bot (Jenkins)
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
This commit is contained in:
Furquan Shaikh 2017-02-11 00:50:38 -08:00 committed by Furquan Shaikh
parent dc1b294bfb
commit e67002968b
6 changed files with 144 additions and 128 deletions

View File

@ -208,7 +208,7 @@ struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
int yy_n_chars;
yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@ -278,7 +278,7 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
/* yy_hold_char holds the character lost when yytext is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
yy_size_t yyleng;
/* Points to current character in buffer. */
@ -373,8 +373,8 @@ static void yy_fatal_error (yyconst char msg[] );
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
#define YY_NUM_RULES 33
#define YY_END_OF_BUFFER 34
#define YY_NUM_RULES 34
#define YY_END_OF_BUFFER 35
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
@ -382,22 +382,23 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
static yyconst flex_int16_t yy_accept[130] =
static yyconst flex_int16_t yy_accept[132] =
{ 0,
0, 0, 34, 32, 1, 3, 32, 32, 32, 27,
27, 25, 28, 32, 28, 28, 28, 32, 32, 32,
32, 32, 32, 32, 32, 1, 3, 32, 0, 32,
32, 0, 2, 27, 28, 32, 32, 32, 32, 28,
32, 32, 32, 32, 32, 32, 20, 32, 32, 32,
7, 32, 32, 32, 32, 31, 31, 32, 0, 26,
32, 32, 15, 32, 32, 19, 24, 32, 12, 32,
32, 18, 32, 8, 9, 11, 32, 32, 32, 0,
29, 4, 32, 32, 32, 32, 32, 32, 32, 32,
32, 30, 30, 32, 32, 32, 32, 32, 32, 13,
0, 0, 35, 33, 1, 3, 33, 33, 33, 28,
28, 26, 29, 33, 29, 29, 29, 33, 33, 33,
33, 33, 33, 33, 33, 1, 3, 33, 0, 33,
33, 0, 2, 28, 29, 33, 33, 33, 33, 29,
33, 33, 33, 33, 33, 33, 21, 33, 33, 33,
7, 33, 33, 33, 33, 33, 32, 32, 33, 0,
27, 33, 33, 15, 33, 33, 20, 25, 33, 12,
33, 33, 19, 33, 8, 9, 11, 33, 18, 33,
33, 0, 30, 4, 33, 33, 33, 33, 33, 33,
33, 33, 33, 31, 31, 33, 33, 33, 33, 33,
32, 32, 32, 5, 16, 32, 32, 10, 32, 32,
32, 17, 22, 32, 32, 32, 32, 32, 6, 32,
32, 32, 32, 32, 21, 32, 14, 23, 0
33, 13, 33, 33, 33, 5, 16, 33, 33, 10,
33, 33, 33, 17, 23, 33, 33, 33, 33, 33,
6, 33, 33, 33, 33, 33, 22, 33, 14, 24,
0
} ;
static yyconst YY_CHAR yy_ec[256] =
@ -440,102 +441,104 @@ static yyconst YY_CHAR yy_meta[39] =
1, 1, 1, 1, 1, 1, 1, 1
} ;
static yyconst flex_uint16_t yy_base[137] =
static yyconst flex_uint16_t yy_base[139] =
{ 0,
0, 0, 200, 0, 197, 201, 195, 37, 41, 38,
160, 0, 44, 182, 54, 78, 60, 174, 45, 177,
42, 47, 172, 157, 0, 189, 201, 77, 185, 87,
69, 186, 201, 0, 86, 104, 173, 162, 151, 93,
158, 153, 163, 154, 162, 156, 162, 147, 147, 154,
0, 150, 144, 150, 154, 0, 201, 101, 166, 0,
159, 139, 152, 142, 149, 0, 0, 144, 0, 143,
133, 0, 137, 0, 0, 0, 136, 127, 154, 153,
0, 0, 138, 137, 130, 122, 121, 127, 132, 117,
111, 0, 201, 122, 126, 118, 120, 119, 124, 0,
0, 0, 202, 0, 199, 203, 197, 37, 41, 38,
162, 0, 44, 184, 54, 78, 60, 176, 45, 179,
42, 47, 174, 41, 0, 192, 203, 77, 188, 87,
91, 189, 203, 0, 88, 104, 176, 165, 154, 93,
161, 156, 166, 157, 165, 159, 165, 150, 150, 157,
0, 153, 147, 153, 150, 156, 0, 203, 101, 168,
0, 161, 141, 154, 144, 151, 0, 0, 146, 0,
145, 135, 0, 139, 0, 0, 0, 138, 0, 129,
156, 155, 0, 0, 140, 139, 132, 124, 123, 129,
134, 119, 113, 0, 203, 124, 128, 120, 122, 121,
108, 95, 92, 0, 0, 101, 85, 102, 96, 80,
76, 0, 0, 83, 73, 77, 63, 64, 0, 64,
62, 50, 51, 33, 0, 28, 0, 0, 201, 40,
129, 131, 133, 135, 137, 139
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,
203, 40, 129, 131, 133, 135, 137, 139
} ;
static yyconst flex_int16_t yy_def[137] =
static yyconst flex_int16_t yy_def[139] =
{ 0,
129, 1, 129, 130, 129, 129, 130, 131, 132, 130,
10, 130, 10, 130, 10, 10, 10, 130, 130, 130,
130, 130, 130, 130, 130, 129, 129, 131, 133, 134,
132, 135, 129, 10, 10, 10, 130, 130, 130, 10,
130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
130, 130, 130, 130, 130, 130, 129, 134, 136, 36,
130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
130, 130, 130, 130, 130, 130, 130, 130, 130, 129,
130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
130, 130, 129, 130, 130, 130, 130, 130, 130, 130,
131, 1, 131, 132, 131, 131, 132, 133, 134, 132,
10, 132, 10, 132, 10, 10, 10, 132, 132, 132,
132, 132, 132, 132, 132, 131, 131, 133, 135, 136,
134, 137, 131, 10, 10, 10, 132, 132, 132, 10,
132, 132, 132, 132, 132, 132, 132, 132, 132, 132,
132, 132, 132, 132, 132, 132, 132, 131, 136, 138,
36, 132, 132, 132, 132, 132, 132, 132, 132, 132,
132, 132, 132, 132, 132, 132, 132, 132, 132, 132,
132, 131, 132, 132, 132, 132, 132, 132, 132, 132,
132, 132, 132, 132, 131, 132, 132, 132, 132, 132,
130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
130, 130, 130, 130, 130, 130, 130, 130, 0, 129,
129, 129, 129, 129, 129, 129
132, 132, 132, 132, 132, 132, 132, 132, 132, 132,
132, 132, 132, 132, 132, 132, 132, 132, 132, 132,
132, 132, 132, 132, 132, 132, 132, 132, 132, 132,
0, 131, 131, 131, 131, 131, 131, 131
} ;
static yyconst flex_uint16_t yy_nxt[240] =
static yyconst flex_uint16_t yy_nxt[242] =
{ 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, 4, 4, 21, 22,
4, 23, 24, 4, 4, 4, 4, 4, 29, 29,
25, 30, 32, 33, 34, 34, 34, 128, 35, 35,
25, 30, 32, 33, 34, 34, 34, 130, 35, 35,
35, 35, 35, 45, 35, 35, 35, 35, 35, 35,
35, 35, 35, 50, 127, 52, 35, 35, 35, 51,
32, 33, 46, 47, 53, 126, 48, 38, 29, 29,
125, 56, 124, 39, 35, 35, 35, 43, 59, 59,
123, 25, 35, 35, 35, 122, 121, 120, 40, 35,
35, 35, 35, 50, 129, 52, 35, 35, 35, 51,
55, 128, 46, 47, 53, 56, 48, 38, 29, 29,
127, 57, 126, 39, 35, 35, 35, 43, 60, 60,
125, 25, 32, 33, 35, 35, 35, 124, 40, 35,
35, 35, 59, 59, 119, 79, 41, 118, 117, 42,
60, 60, 60, 116, 60, 60, 115, 114, 113, 112,
60, 60, 60, 60, 60, 60, 111, 110, 64, 28,
28, 31, 31, 29, 29, 58, 58, 32, 32, 59,
59, 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, 84, 83, 82, 81,
80, 78, 77, 76, 75, 74, 73, 72, 71, 70,
69, 68, 67, 66, 65, 63, 62, 61, 33, 57,
26, 55, 54, 49, 44, 37, 36, 27, 26, 129,
35, 35, 60, 60, 123, 81, 41, 122, 121, 42,
61, 61, 61, 120, 61, 61, 119, 118, 117, 116,
61, 61, 61, 61, 61, 61, 115, 114, 65, 28,
28, 31, 31, 29, 29, 59, 59, 32, 32, 60,
60, 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,
84, 83, 82, 80, 79, 78, 77, 76, 75, 74,
73, 72, 71, 70, 69, 68, 67, 66, 64, 63,
62, 33, 58, 26, 54, 49, 44, 37, 36, 27,
3, 129, 129, 129, 129, 129, 129, 129, 129, 129,
129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
129, 129, 129, 129, 129, 129, 129, 129, 129
26, 131, 3, 131, 131, 131, 131, 131, 131, 131,
131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
131
} ;
static yyconst flex_int16_t yy_chk[240] =
static yyconst flex_int16_t yy_chk[242] =
{ 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,
130, 8, 9, 9, 10, 10, 10, 126, 10, 10,
132, 8, 9, 9, 10, 10, 10, 128, 10, 10,
13, 13, 13, 19, 10, 10, 10, 10, 10, 10,
15, 15, 15, 21, 124, 22, 17, 17, 17, 21,
31, 31, 19, 19, 22, 123, 19, 15, 28, 28,
122, 28, 121, 15, 16, 16, 16, 17, 30, 30,
120, 30, 35, 35, 35, 118, 117, 116, 16, 40,
15, 15, 15, 21, 126, 22, 17, 17, 17, 21,
24, 125, 19, 19, 22, 24, 19, 15, 28, 28,
124, 28, 123, 15, 16, 16, 16, 17, 30, 30,
122, 30, 31, 31, 35, 35, 35, 120, 16, 40,
40, 40, 58, 58, 115, 58, 16, 114, 111, 16,
36, 36, 36, 110, 36, 36, 109, 108, 107, 106,
36, 36, 36, 36, 36, 36, 103, 102, 40, 131,
131, 132, 132, 133, 133, 134, 134, 135, 135, 136,
136, 101, 99, 98, 97, 96, 95, 94, 91, 90,
89, 88, 87, 86, 85, 84, 83, 80, 79, 78,
77, 73, 71, 70, 68, 65, 64, 63, 62, 61,
59, 55, 54, 53, 52, 50, 49, 48, 47, 46,
45, 44, 43, 42, 41, 39, 38, 37, 32, 29,
26, 24, 23, 20, 18, 14, 11, 7, 5, 3,
40, 40, 59, 59, 119, 59, 16, 118, 117, 16,
36, 36, 36, 116, 36, 36, 113, 112, 111, 110,
36, 36, 36, 36, 36, 36, 109, 108, 40, 133,
133, 134, 134, 135, 135, 136, 136, 137, 137, 138,
138, 105, 104, 103, 101, 100, 99, 98, 97, 96,
93, 92, 91, 90, 89, 88, 87, 86, 85, 82,
81, 80, 78, 74, 72, 71, 69, 66, 65, 64,
63, 62, 60, 56, 55, 54, 53, 52, 50, 49,
48, 47, 46, 45, 44, 43, 42, 41, 39, 38,
37, 32, 29, 26, 23, 20, 18, 14, 11, 7,
129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
129, 129, 129, 129, 129, 129, 129, 129, 129
5, 3, 131, 131, 131, 131, 131, 131, 131, 131,
131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
131
} ;
static yy_state_type yy_last_accepting_state;
@ -814,13 +817,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 >= 130 )
if ( yy_current_state >= 132 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
while ( yy_base[yy_current_state] != 201 );
while ( yy_base[yy_current_state] != 203 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
@ -916,39 +919,39 @@ YY_RULE_SETUP
YY_BREAK
case 18:
YY_RULE_SETUP
{yylval.number=IRQ; return(RESOURCE);}
{yylval.number=SPI; return(BUS);}
YY_BREAK
case 19:
YY_RULE_SETUP
{yylval.number=DRQ; return(RESOURCE);}
{yylval.number=IRQ; return(RESOURCE);}
YY_BREAK
case 20:
YY_RULE_SETUP
{yylval.number=IO; return(RESOURCE);}
{yylval.number=DRQ; return(RESOURCE);}
YY_BREAK
case 21:
YY_RULE_SETUP
{return(IOAPIC_IRQ);}
{yylval.number=IO; return(RESOURCE);}
YY_BREAK
case 22:
YY_RULE_SETUP
{return(INHERIT);}
{return(IOAPIC_IRQ);}
YY_BREAK
case 23:
YY_RULE_SETUP
{return(SUBSYSTEMID);}
{return(INHERIT);}
YY_BREAK
case 24:
YY_RULE_SETUP
{return(END);}
{return(SUBSYSTEMID);}
YY_BREAK
case 25:
YY_RULE_SETUP
{return(EQUALS);}
{return(END);}
YY_BREAK
case 26:
YY_RULE_SETUP
{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(NUMBER);}
{return(EQUALS);}
YY_BREAK
case 27:
YY_RULE_SETUP
@ -960,12 +963,11 @@ YY_RULE_SETUP
YY_BREAK
case 29:
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 30:
/* rule 30 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 31:
/* rule 31 can match eol */
@ -973,10 +975,15 @@ 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 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);}
YY_BREAK
case 33:
YY_RULE_SETUP
{yylval.string = malloc(yyleng+1); strncpy(yylval.string, yytext, yyleng); yylval.string[yyleng]='\0'; return(STRING);}
YY_BREAK
case 33:
case 34:
YY_RULE_SETUP
ECHO;
YY_BREAK
@ -1235,9 +1242,9 @@ static int yy_get_next_buffer (void)
else
ret_val = EOB_ACT_CONTINUE_SCAN;
if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
/* Extend the array by 50%, plus the number we really need. */
int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
@ -1272,7 +1279,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 >= 130 )
if ( yy_current_state >= 132 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@ -1300,11 +1307,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 >= 130 )
if ( yy_current_state >= 132 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 129);
yy_is_jam = (yy_current_state == 131);
return yy_is_jam ? 0 : yy_current_state;
}
@ -1654,7 +1661,7 @@ static void yyensure_buffer_stack (void)
* scanner will even need a stack. We use 2 instead of 1 to avoid an
* immediate realloc on the next call.
*/
num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
(num_to_alloc * sizeof(struct yy_buffer_state*)
);

View File

@ -285,6 +285,11 @@ struct device *new_device(struct device *parent, struct device *busdev,
case GENERIC:
new_d->path = ".type=DEVICE_PATH_GENERIC,{.generic={ .id = 0x%x, .subid = 0x%x }}";
break;
case SPI:
new_d->path = ".type=DEVICE_PATH_SPI,{.spi={ .cs = 0x%x }}";
break;
}
return new_d;
}

View File

@ -38,6 +38,7 @@ cpu_cluster {yylval.number=CPU_CLUSTER; return(BUS);}
cpu {yylval.number=CPU; return(BUS);}
domain {yylval.number=DOMAIN; return(BUS);}
generic {yylval.number=GENERIC; return(BUS);}
spi {yylval.number=SPI; return(BUS);}
irq {yylval.number=IRQ; return(RESOURCE);}
drq {yylval.number=DRQ; return(RESOURCE);}
io {yylval.number=IO; return(RESOURCE);}

View File

@ -149,7 +149,8 @@ extern int yydebug;
IOAPIC_IRQ = 281,
IOAPIC = 282,
PCIINT = 283,
GENERIC = 284
GENERIC = 284,
SPI = 285
};
#endif
@ -426,7 +427,7 @@ union yyalloc
#define YYLAST 39
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 30
#define YYNTOKENS 31
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 13
/* YYNRULES -- Number of rules. */
@ -437,7 +438,7 @@ union yyalloc
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
by yylex, with out-of-bounds checking. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 284
#define YYMAXUTOK 285
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@ -474,7 +475,7 @@ static const yytype_uint8 yytranslate[] =
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29
25, 26, 27, 28, 29, 30
};
#if YYDEBUG
@ -496,8 +497,8 @@ static const char *const yytname[] =
"BUS", "RESOURCE", "END", "EQUALS", "HEX", "STRING", "PCI", "PNP", "I2C",
"APIC", "CPU_CLUSTER", "CPU", "DOMAIN", "IRQ", "DRQ", "IO", "NUMBER",
"SUBSYSTEMID", "INHERIT", "IOAPIC_IRQ", "IOAPIC", "PCIINT", "GENERIC",
"$accept", "devtree", "$@1", "chipchildren", "devicechildren", "chip",
"@2", "device", "@3", "resource", "registers", "subsystemid",
"SPI", "$accept", "devtree", "$@1", "chipchildren", "devicechildren",
"chip", "@2", "device", "@3", "resource", "registers", "subsystemid",
"ioapic_irq", YY_NULLPTR
};
#endif
@ -509,7 +510,8 @@ static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
275, 276, 277, 278, 279, 280, 281, 282, 283, 284
275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
285
};
# endif
@ -583,19 +585,19 @@ static const yytype_int8 yycheck[] =
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
0, 31, 32, 0, 3, 35, 12, 36, 33, 4,
5, 9, 35, 37, 40, 7, 12, 23, 10, 6,
12, 38, 34, 8, 9, 24, 26, 35, 37, 39,
41, 42, 23, 23, 23, 10, 23, 28, 23, 25,
0, 32, 33, 0, 3, 36, 12, 37, 34, 4,
5, 9, 36, 38, 41, 7, 12, 23, 10, 6,
12, 39, 35, 8, 9, 24, 26, 36, 38, 40,
42, 43, 23, 23, 23, 10, 23, 28, 23, 25,
23
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
0, 30, 32, 31, 33, 33, 33, 33, 34, 34,
34, 34, 34, 34, 36, 35, 38, 37, 39, 40,
41, 41, 42
0, 31, 33, 32, 34, 34, 34, 34, 35, 35,
35, 35, 35, 35, 37, 36, 39, 38, 40, 41,
42, 42, 43
};
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */

View File

@ -71,7 +71,8 @@ extern int yydebug;
IOAPIC_IRQ = 281,
IOAPIC = 282,
PCIINT = 283,
GENERIC = 284
GENERIC = 284,
SPI = 285
};
#endif

View File

@ -29,7 +29,7 @@ static struct device *cur_parent, *cur_bus;
int number;
}
%token CHIP DEVICE REGISTER BOOL BUS RESOURCE END EQUALS HEX STRING PCI PNP I2C APIC CPU_CLUSTER CPU DOMAIN IRQ DRQ IO NUMBER SUBSYSTEMID INHERIT IOAPIC_IRQ IOAPIC PCIINT GENERIC
%token CHIP DEVICE REGISTER BOOL BUS RESOURCE END EQUALS HEX STRING PCI PNP I2C APIC CPU_CLUSTER CPU DOMAIN IRQ DRQ IO NUMBER SUBSYSTEMID INHERIT IOAPIC_IRQ IOAPIC PCIINT GENERIC SPI
%%
devtree: { cur_parent = cur_bus = head; } chip { postprocess_devtree(); } ;