summaryrefslogtreecommitdiff
path: root/board/keymile/km_arm/km_arm.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-07-11 18:09:38 -0400
committerTom Rini <trini@konsulko.com>2019-07-11 18:09:38 -0400
commit68deea2308141c26707da44654b273d7b072ab0d (patch)
tree1af260ebb9b053457bd6bf388510fa0475c3be16 /board/keymile/km_arm/km_arm.c
parent79b8d3c285f4f1c2ee4b27367f2ca3ecb76ed9ce (diff)
parentcc66ebdeeca5c4ed095bbd521b748bb009d99728 (diff)
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
- SPL SATA enhancements to allow booting from RAW SATA device needed for Clearfog (Baruch) - Enable SATA booting on Clearfog (Baruch) - Misc changes to Turris Omnia (Marek) - Enable CMD_BOOTZ and increase SYS_BOOTM_LEN on crs305-1g-4s (Luka) - Enable FIT support for db-xc3-24g4xg (Chris) - Enable DM_SPI on Keymile Kirkwood board with necessary changes for this (Pascal) - Set 38x and 39x AVS on lower frequency (Baruch)
Diffstat (limited to 'board/keymile/km_arm/km_arm.c')
-rw-r--r--board/keymile/km_arm/km_arm.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c
index ea03be9eb3..3db80615ef 100644
--- a/board/keymile/km_arm/km_arm.c
+++ b/board/keymile/km_arm/km_arm.c
@@ -310,16 +310,35 @@ int board_late_init(void)
return 0;
}
-int board_spi_claim_bus(struct spi_slave *slave)
+static const u32 spi_mpp_config[] = {
+ MPP1_SPI_MOSI,
+ MPP2_SPI_SCK,
+ MPP3_SPI_MISO,
+ 0
+};
+
+static u32 spi_mpp_backup[4];
+
+int mvebu_board_spi_claim_bus(struct udevice *dev)
{
+ spi_mpp_backup[3] = 0;
+
+ /* set new spi mpp config and save current one */
+ kirkwood_mpp_conf(spi_mpp_config, spi_mpp_backup);
+
kw_gpio_set_value(KM_FLASH_GPIO_PIN, 0);
return 0;
}
-void board_spi_release_bus(struct spi_slave *slave)
+int mvebu_board_spi_release_bus(struct udevice *dev)
{
+ /* restore saved mpp config */
+ kirkwood_mpp_conf(spi_mpp_backup, NULL);
+
kw_gpio_set_value(KM_FLASH_GPIO_PIN, 1);
+
+ return 0;
}
#if (defined(CONFIG_KM_PIGGY4_88E6061))