| OLD | NEW |
| 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. |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 update_num_param_sets(build_image_context *context, u_int32_t index) | 365 update_num_param_sets(build_image_context *context, u_int32_t index) |
| 366 { | 366 { |
| 367 u_int32_t num_params; | 367 u_int32_t num_params; |
| 368 | 368 |
| 369 GET_VALUE(num_param_sets, &num_params); | 369 GET_VALUE(num_param_sets, &num_params); |
| 370 num_params = NV_MAX(num_params, index + 1); | 370 num_params = NV_MAX(num_params, index + 1); |
| 371 SET_VALUE(num_param_sets, num_params); | 371 SET_VALUE(num_param_sets, num_params); |
| 372 } | 372 } |
| 373 | 373 |
| 374 /* | 374 /* |
| 375 * set_nand_param(): Processes commands to set Nand parameters. |
| 376 */ |
| 377 int |
| 378 set_nand_param(build_image_context *context, |
| 379 u_int32_t index, |
| 380 parse_token token, |
| 381 u_int32_t value) |
| 382 { |
| 383 assert(context != NULL); |
| 384 assert(context->bct != NULL); |
| 385 |
| 386 update_num_param_sets(context, index); |
| 387 |
| 388 switch (token) { |
| 389 CASE_DEVICE_VALUE(nand, clock_divider); |
| 390 CASE_DEVICE_VALUE(nand, nand_timing); |
| 391 CASE_DEVICE_VALUE(nand, nand_timing2); |
| 392 CASE_DEVICE_VALUE(nand, block_size_log2); |
| 393 CASE_DEVICE_VALUE(nand, page_size_log2); |
| 394 DEFAULT(); |
| 395 } |
| 396 |
| 397 return 0; |
| 398 } |
| 399 |
| 400 /* |
| 375 * set_sdmmc_param(): Processes commands to set MoviNand parameters. | 401 * set_sdmmc_param(): Processes commands to set MoviNand parameters. |
| 376 */ | 402 */ |
| 377 int | 403 int |
| 378 set_sdmmc_param(build_image_context *context, | 404 set_sdmmc_param(build_image_context *context, |
| 379 u_int32_t index, | 405 u_int32_t index, |
| 380 parse_token token, | 406 parse_token token, |
| 381 u_int32_t value) | 407 u_int32_t value) |
| 382 { | 408 { |
| 383 assert(context != NULL); | 409 assert(context != NULL); |
| 384 assert(context->bct != NULL); | 410 assert(context->bct != NULL); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 411 | 437 |
| 412 switch (token) { | 438 switch (token) { |
| 413 CASE_DEVICE_VALUE(spiflash, clock_divider); | 439 CASE_DEVICE_VALUE(spiflash, clock_divider); |
| 414 CASE_DEVICE_VALUE(spiflash, clock_source); | 440 CASE_DEVICE_VALUE(spiflash, clock_source); |
| 415 CASE_DEVICE_VALUE(spiflash, read_command_type_fast); | 441 CASE_DEVICE_VALUE(spiflash, read_command_type_fast); |
| 416 DEFAULT(); | 442 DEFAULT(); |
| 417 } | 443 } |
| 418 | 444 |
| 419 return 0; | 445 return 0; |
| 420 } | 446 } |
| OLD | NEW |