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>
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 @@
 	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]);