diff options
| author | Stefan Roese <[email protected]> | 2016-10-25 18:12:40 +0200 |
|---|---|---|
| committer | Stefan Roese <[email protected]> | 2016-12-05 13:28:23 +0100 |
| commit | d7dd358f93c03004ba42e054c95e21596a909de6 (patch) | |
| tree | 0ca4780f2640be5eb1e5c89ddf36532915e2d516 | |
| parent | af4c271c33d25ff3e6fe9fe998d703ee9a2f3f29 (diff) | |
arm64: mvebu: Init COMPHY from the slave-CP on the A8k
The Armada8k implements 2 CPs (communication processors) and the 2nd
CP also is equipped with a COMPHY controller. This patch now loops
over all enabled MISC devices (CP110) enabled in the DT to initialize
all CPs.
Signed-off-by: Stefan Roese <[email protected]>
Cc: Nadav Haklai <[email protected]>
Cc: Neta Zur Hershkovits <[email protected]>
Cc: Kostya Porotchkin <[email protected]>
Cc: Omri Itach <[email protected]>
Cc: Igal Liberman <[email protected]>
Cc: Haim Boot <[email protected]>
Cc: Hanna Hawa <[email protected]>
| -rw-r--r-- | arch/arm/mach-mvebu/arm64-common.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/arm/mach-mvebu/arm64-common.c b/arch/arm/mach-mvebu/arm64-common.c index 7055a81de32..1fc2ff2f7cf 100644 --- a/arch/arm/mach-mvebu/arm64-common.c +++ b/arch/arm/mach-mvebu/arm64-common.c @@ -109,12 +109,20 @@ int arch_early_init_r(void) { struct udevice *dev; int ret; + int i; - /* Call the comphy code via the MISC uclass driver */ - ret = uclass_get_device(UCLASS_MISC, 0, &dev); - if (ret) { - debug("COMPHY init failed: %d\n", ret); - return -ENODEV; + /* + * Loop over all MISC uclass drivers to call the comphy code + * and init all CP110 devices enabled in the DT + */ + i = 0; + while (1) { + /* Call the comphy code via the MISC uclass driver */ + ret = uclass_get_device(UCLASS_MISC, i++, &dev); + + /* We're done, once no further CP110 device is found */ + if (ret) + break; } /* Cause the SATA device to do its early init */ |
