summaryrefslogtreecommitdiffstats
path: root/op-flasher
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2016-11-03 12:49:57 +1030
committerJoel Stanley <joel@jms.id.au>2016-11-04 11:08:15 +1030
commit29eaf4d4143056d271ee65f1c6126c533b87a49d (patch)
tree39f592d97c847b36a575feb2d0a369868aa072bd /op-flasher
parent848143857eb101a72375d32e001dd2aba1cd00bd (diff)
downloadtalos-skeleton-29eaf4d4143056d271ee65f1c6126c533b87a49d.tar.gz
talos-skeleton-29eaf4d4143056d271ee65f1c6126c533b87a49d.zip
flasher: BMC partition addresses are relative to start of flash
These numbers were the physical address that the flash was mapped to when we were using MMIO access. With MTD access the addresses are relative to the start of the flash device. Change-Id: I7cba8df46fe3cf12ea100072ea77f30c1ecc6e2a Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'op-flasher')
-rw-r--r--op-flasher/flasher_obj.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/op-flasher/flasher_obj.c b/op-flasher/flasher_obj.c
index 00e3ff1..0a8a50f 100644
--- a/op-flasher/flasher_obj.c
+++ b/op-flasher/flasher_obj.c
@@ -258,16 +258,21 @@ on_bus_acquired(GDBusConnection *connection,
g_dbus_object_manager_server_set_connection(manager, connection);
enum bmc_access chip = PNOR_MTD;
uint32_t address = 0;
+
+ /* TODO: Look up all partitions from the device tree or /proc/mtd */
if(strcmp(cmd->argv[1],"bmc")==0) {
chip = BMC_MTD;
+ address = 0;
}
if(strcmp(cmd->argv[1],"bmc_ramdisk")==0) {
chip = BMC_MTD;
- address = 0x20300000;
+ /* TODO: Look up from device tree or similar */
+ address = 0x300000;
}
if(strcmp(cmd->argv[1],"bmc_kernel")==0) {
chip = BMC_MTD;
- address = 0x20080000;
+ /* TODO: Look up from device tree or similar */
+ address = 0x80000;
}
int rc = flash(flash_control, chip, address, cmd->argv[2], cmd->argv[3]);
OpenPOWER on IntegriCloud