summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlistair Popple <alistair@popple.id.au>2016-12-13 17:36:34 +1100
committerAlistair Popple <alistair@popple.id.au>2016-12-13 17:41:50 +1100
commit013edf123b6ee17826cc172f3c4a47572c1f6ace (patch)
tree2fd91258ecdb41234022031b938e86f724b3de30
parent95b49e2d1e688c68f7cba10700175fc4320ce03f (diff)
downloadpdbg-013edf123b6ee17826cc172f3c4a47572c1f6ace.tar.gz
pdbg-013edf123b6ee17826cc172f3c4a47572c1f6ace.zip
libpdbg/bmcfsi.c: Add Romulus gpio pinout
Signed-off-by: Alistair Popple <alistair@popple.id.au>
-rw-r--r--libpdbg/bmcfsi.c14
-rw-r--r--libpdbg/operations.h2
-rw-r--r--src/main.c2
3 files changed, 17 insertions, 1 deletions
diff --git a/libpdbg/bmcfsi.c b/libpdbg/bmcfsi.c
index 0dde38f..c75bc06 100644
--- a/libpdbg/bmcfsi.c
+++ b/libpdbg/bmcfsi.c
@@ -72,6 +72,16 @@ struct gpio_pin p9w_gpio_pins[] = {
};
#define P9W_CLOCK_DELAY 20
+/* POWER9 Witherspoon mappings */
+struct gpio_pin p9r_gpio_pins[] = {
+ {0x1e0, 16}, /* FSI_CLK = AA0 */
+ {0x1e0, 18}, /* FSI_DAT = AA2 */
+ {0x80, 10}, /* FSI_DAT_EN = R2 */
+ {0, 24}, /* FSI_ENABLE = D0 */
+ {0, 6}, /* CRONUS_SEL = A6 */
+};
+#define P9R_CLOCK_DELAY 20
+
/* Pointer to the GPIO pins to use for this system */
static struct gpio_pin *gpio_pins;
#define FSI_CLK &gpio_pins[GPIO_FSI_CLK]
@@ -496,6 +506,10 @@ int fsi_target_init(struct target *target, const char *name, enum fsi_system_typ
gpio_pins = p9w_gpio_pins;
clock_delay = P9W_CLOCK_DELAY;
break;
+ case FSI_SYSTEM_P9R:
+ gpio_pins = p9r_gpio_pins;
+ clock_delay = P9R_CLOCK_DELAY;
+ break;
default:
PR_ERROR("Unrecognized system type specified\n");
exit(-1);
diff --git a/libpdbg/operations.h b/libpdbg/operations.h
index f698d40..666f58d 100644
--- a/libpdbg/operations.h
+++ b/libpdbg/operations.h
@@ -69,7 +69,7 @@ int ram_start_thread(struct target *thread);
/* GDB server functionality */
int gdbserver_start(uint16_t port);
-enum fsi_system_type {FSI_SYSTEM_P8, FSI_SYSTEM_P9W};
+enum fsi_system_type {FSI_SYSTEM_P8, FSI_SYSTEM_P9W, FSI_SYSTEM_P9R};
int fsi_target_init(struct target *target, const char *name, enum fsi_system_type tpye, struct target *next);
int fsi_target_probe(struct target *targets, int max_target_count);
int i2c_target_init(struct target *target, const char *name, struct target *next,
diff --git a/src/main.c b/src/main.c
index 55849fc..01550bd 100644
--- a/src/main.c
+++ b/src/main.c
@@ -381,6 +381,8 @@ static int fsi_backend_targets_init(void)
type = FSI_SYSTEM_P8;
else if (!strcmp(device_node, "p9w") || !strcmp(device_node, "witherspoon"))
type = FSI_SYSTEM_P9W;
+ else if (!strcmp(device_node, "p9r") || !strcmp(device_node, "romulus"))
+ type = FSI_SYSTEM_P9R;
else {
PR_ERROR("Unrecognized FSI system type %s\n", device_node);
return -1;
OpenPOWER on IntegriCloud