-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
soc/power9/istep_8_11.c: enable RI/DI for XBus
Change-Id: I8e1f18080ecf11caea23890a826969394eaa658d Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
- Loading branch information
1 parent
f6dda8b
commit 22ffee2
Showing
4 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* SPDX-License-Identifier: GPL-2.0-only */ | ||
|
||
#include <cpu/power/istep_8.h> | ||
|
||
#include <console/console.h> | ||
#include <cpu/power/scom.h> | ||
|
||
static void xbus_enable_ridi(uint8_t chip) | ||
{ | ||
enum { | ||
PERV_NET_CTRL0 = 0x060F0040, | ||
PERV_NET_CTRL0_WOR = 0x060F0042, | ||
}; | ||
|
||
/* Getting NET_CTRL0 register value and checking its CHIPLET_ENABLE bit */ | ||
if (get_scom(chip, PERV_NET_CTRL0) & PPC_BIT(0)) { | ||
/* Enable Recievers, Drivers DI1 & DI2 */ | ||
uint64_t val = 0; | ||
val |= PPC_BIT(19); // NET_CTRL0.RI_N = 1 | ||
val |= PPC_BIT(20); // NET_CTRL0.DI1_N = 1 | ||
val |= PPC_BIT(21); // NET_CTRL0.DI2_N = 1 | ||
put_scom(chip, PERV_NET_CTRL0_WOR, val); | ||
} | ||
} | ||
|
||
void istep_8_11(uint8_t chips) | ||
{ | ||
printk(BIOS_EMERG, "starting istep 8.11\n"); | ||
report_istep(8,11); | ||
|
||
if (chips != 0x01) { | ||
xbus_enable_ridi(/*chip=*/0); | ||
xbus_enable_ridi(/*chip=*/1); | ||
} | ||
|
||
printk(BIOS_EMERG, "ending istep 8.11\n"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters