Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(449)

Side by Side Diff: set.c

Issue 6676023: Initialize the bad block table when create the bct file from scratch, (Closed) Base URL: http://git.chromium.org/git/cbootimage.git@master
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « data_layout.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * Copyright (c) 2011 NVIDIA Corporation. All rights reserved. 2 * Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
3 * 3 *
4 * See file CREDITS for list of people who contributed to this 4 * See file CREDITS for list of people who contributed to this
5 * project. 5 * project.
6 * 6 *
7 * This program is free software; you can redistribute it and/or 7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as 8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of 9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version. 10 * the License, or (at your option) any later version.
11 * 11 *
12 * This program is distributed in the hope that it will be useful, 12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details. 15 * GNU General Public License for more details.
16 * 16 *
17 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 * MA 02111-1307 USA 20 * MA 02111-1307 USA
21 */ 21 */
22 22
23 /* 23 /*
24 * set.c - State setting support for the cbootimage tool 24 * set.c - State setting support for the cbootimage tool
25 */ 25 */
26 26
27 #include <math.h>
28 #include "set.h" 27 #include "set.h"
29 #include "cbootimage.h" 28 #include "cbootimage.h"
30 #include "crypto.h" 29 #include "crypto.h"
31 #include "data_layout.h" 30 #include "data_layout.h"
32 31
33 /* 32 /*
34 * Function prototypes 33 * Function prototypes
35 * 34 *
36 * ParseXXX() parses XXX in the input 35 * ParseXXX() parses XXX in the input
37 * SetXXX() sets state based on the parsing results but does not perform 36 * SetXXX() sets state based on the parsing results but does not perform
38 * any parsing of its own 37 * any parsing of its own
39 * A ParseXXX() function may call other parse functions and set functions. 38 * A ParseXXX() function may call other parse functions and set functions.
40 * A SetXXX() function may not call any parseing functions. 39 * A SetXXX() function may not call any parseing functions.
41 */ 40 */
42 41
43 #define NV_MAX(a, b) (((a) > (b)) ? (a) : (b))
44
45 #define CASE_DEVICE_VALUE(prefix, id) \ 42 #define CASE_DEVICE_VALUE(prefix, id) \
46 case token_##id: \ 43 case token_##id: \
47 (void)context->bctlib.setdev_param(index, \ 44 (void)context->bctlib.setdev_param(index, \
48 nvbct_lib_id_##prefix##_##id, \ 45 nvbct_lib_id_##prefix##_##id, \
49 value, \ 46 value, \
50 context->bct); \ 47 context->bct); \
51 break 48 break
52 49
53 #define CASE_SDRAM_VALUE(id) \ 50 #define CASE_SDRAM_VALUE(id) \
54 case token_##id: \ 51 case token_##id: \
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 CASE_SDRAM_VALUE(apb_misc_gp_xm2cfgd_pad_ctrl); 567 CASE_SDRAM_VALUE(apb_misc_gp_xm2cfgd_pad_ctrl);
571 CASE_SDRAM_VALUE(apb_misc_gp_xm2cfgd_pad_ctrl2); 568 CASE_SDRAM_VALUE(apb_misc_gp_xm2cfgd_pad_ctrl2);
572 CASE_SDRAM_VALUE(apb_misc_gp_xm2clkcfg_Pad_ctrl); 569 CASE_SDRAM_VALUE(apb_misc_gp_xm2clkcfg_Pad_ctrl);
573 CASE_SDRAM_VALUE(apb_misc_gp_xm2comp_pad_ctrl); 570 CASE_SDRAM_VALUE(apb_misc_gp_xm2comp_pad_ctrl);
574 CASE_SDRAM_VALUE(apb_misc_gp_xm2vttgen_pad_ctrl); 571 CASE_SDRAM_VALUE(apb_misc_gp_xm2vttgen_pad_ctrl);
575 572
576 DEFAULT(); 573 DEFAULT();
577 } 574 }
578 return 0; 575 return 0;
579 } 576 }
OLDNEW
« no previous file with comments | « data_layout.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698