mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 06:00:43 +00:00
DW SPI: Allow to overload the management of the external CS
On some platforms, as the Ocelot ones, when wanting to control the CS through software, it is not possible to do it through the GPIO controller. Indeed, this signal is managed through a dedicated range of registers inside the SoC.. By declaring the external_cs_manage function as weak, it is possible to manage the CS at platform level and then using the appropriate registers. Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
This commit is contained in:
parent
9766a9c653
commit
bea91b0c9b
1 changed files with 7 additions and 1 deletions
|
@ -369,7 +369,13 @@ static int poll_transfer(struct dw_spi_priv *priv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void external_cs_manage(struct udevice *dev, bool on)
|
||||
/*
|
||||
* We define external_cs_manage function as 'weak' as some targets
|
||||
* (like MSCC Ocelot) don't control the external CS pin using a GPIO
|
||||
* controller. These SoCs use specific registers to control by
|
||||
* software the SPI pins (and especially the CS).
|
||||
*/
|
||||
__weak void external_cs_manage(struct udevice *dev, bool on)
|
||||
{
|
||||
#if defined(CONFIG_DM_GPIO) && !defined(CONFIG_SPL_BUILD)
|
||||
struct dw_spi_priv *priv = dev_get_priv(dev->parent);
|
||||
|
|
Loading…
Reference in a new issue