diff options
| author | Tom Rini <[email protected]> | 2023-05-07 09:44:27 -0400 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-05-07 09:44:27 -0400 |
| commit | 1917a1a8a8bad28170cd464e5ea61ff0d738310b (patch) | |
| tree | 2dab7a37f9e7274e7ecdc7cc6f3e6fd19e90c54b /drivers/spi | |
| parent | ae0772f333a7e76c4fb3771a77117b2f740d7c93 (diff) | |
| parent | 0ec8ebef87d78529d1b4f3e7beaced0b9fbea629 (diff) | |
Merge branch 'for-2023.07-2' of https://source.denx.de/u-boot/custodians/u-boot-mpc8xx
This pull request adds misc fixes for cssi boards and activates
CPM relocation in order to enable the use of SCC4 in
QMC (QUICC Multi-Channel) mode.
Diffstat (limited to 'drivers/spi')
| -rw-r--r-- | drivers/spi/mpc8xx_spi.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/spi/mpc8xx_spi.c b/drivers/spi/mpc8xx_spi.c index d84d7aea888..5c8d7609351 100644 --- a/drivers/spi/mpc8xx_spi.c +++ b/drivers/spi/mpc8xx_spi.c @@ -51,11 +51,13 @@ static int mpc8xx_spi_probe(struct udevice *dev) { immap_t __iomem *immr = (immap_t __iomem *)CONFIG_SYS_IMMR; cpm8xx_t __iomem *cp = &immr->im_cpm; - spi_t __iomem *spi = (spi_t __iomem *)&cp->cp_dparam[PROFF_SPI]; + spi_t __iomem *spi = (spi_t __iomem *)&cp->cp_dpmem[PROFF_SPI]; + u16 spi_rpbase; cbd_t __iomem *tbdf, *rbdf; - /* Disable relocation */ - out_be16(&spi->spi_rpbase, 0x1d80); + spi_rpbase = in_be16(&spi->spi_rpbase); + if (spi_rpbase) + spi = (spi_t __iomem *)&cp->cp_dpmem[spi_rpbase]; /* 1 */ /* Initialize the parameter ram. |
