diff options
author | Hannes Schmelzer <oe5hpm@oevsv.at> | 2018-07-06 15:41:28 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-07-19 17:03:35 -0400 |
commit | fbc7c7decf47b22717d3aad13358f4d7440e7055 (patch) | |
tree | 3af4a1f749b091f4b8f1fb979bc732b37fc12602 /board/BuR/brppt1 | |
parent | 19aa4ac09db91c07bc0e6c9a5a90fd501a97e1a3 (diff) | |
download | u-boot-fbc7c7decf47b22717d3aad13358f4d7440e7055.tar.gz u-boot-fbc7c7decf47b22717d3aad13358f4d7440e7055.tar.xz u-boot-fbc7c7decf47b22717d3aad13358f4d7440e7055.zip |
board/BuR/brppt1: convert brppt1 boards to driver model
- add a devicetree for each variant (mmc, spi, nand)
- drop unneeded code from board and bur/common
- drop unneeded stuff from config header files
- minor adaptions to be compliant with driver model (requesting gpio,..)
- harmonize the commandset over all brppt1 targets
Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Diffstat (limited to 'board/BuR/brppt1')
-rw-r--r-- | board/BuR/brppt1/board.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/board/BuR/brppt1/board.c b/board/BuR/brppt1/board.c index 87b76a660c..d2e7c72242 100644 --- a/board/BuR/brppt1/board.c +++ b/board/BuR/brppt1/board.c @@ -77,6 +77,8 @@ static const struct dpll_params dpll_ddr3 = { 400, OSC-1, 1, -1, -1, -1, -1}; void am33xx_spl_board_init(void) { + int rc; + struct cm_perpll *const cmper = (struct cm_perpll *)CM_PER; /*struct cm_wkuppll *const cmwkup = (struct cm_wkuppll *)CM_WKUP;*/ struct cm_dpll *const cmdpll = (struct cm_dpll *)CM_DPLL; @@ -108,8 +110,21 @@ void am33xx_spl_board_init(void) i2c_init(CONFIG_SYS_OMAP24_I2C_SPEED, CONFIG_SYS_OMAP24_I2C_SLAVE); pmicsetup(0); - gpio_direction_output(64+29, 1); /* switch NAND_RnB to GPMC_WAIT1 */ - gpio_direction_output(64+28, 1); /* switch MII2_CRS to GPMC_WAIT0 */ + /* peripheral reset */ + rc = gpio_request(64 + 29, "GPMC_WAIT1"); + if (rc != 0) + printf("cannot request GPMC_WAIT1 GPIO!\n"); + rc = gpio_direction_output(64 + 29, 1); + if (rc != 0) + printf("cannot set GPMC_WAIT1 GPIO!\n"); + + rc = gpio_request(64 + 28, "GPMC_WAIT0"); + if (rc != 0) + printf("cannot request GPMC_WAIT0 GPIO!\n"); + rc = gpio_direction_output(64 + 28, 1); + if (rc != 0) + printf("cannot set GPMC_WAIT0 GPIO!\n"); + } const struct dpll_params *get_dpll_ddr_params(void) @@ -151,10 +166,13 @@ int board_late_init(void) { unsigned char bmode = 0; ulong bootcount = 0; + int rc; bootcount = bootcount_load() & 0xF; - if (gpio_get_value(REPSWITCH) == 0 || bootcount == 12) + rc = gpio_request(REPSWITCH, "REPSWITCH"); + + if (rc != 0 || gpio_get_value(REPSWITCH) == 0 || bootcount == 12) bmode = 12; else if (bootcount > 0) bmode = 0; |