From: Stephen Rothwell Date: Wed, 25 Jul 2012 02:24:11 +0000 (+1000) Subject: Merge remote-tracking branch 'remoteproc/for-next' X-Git-Tag: next-20120725~14 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d3a3102336b5ae2db839e86bc368ef7973e6915d;p=karo-tx-linux.git Merge remote-tracking branch 'remoteproc/for-next' Conflicts: drivers/remoteproc/remoteproc_core.c --- d3a3102336b5ae2db839e86bc368ef7973e6915d diff --cc drivers/remoteproc/remoteproc_core.c index 66324ee4678f,f4d6f7bb91fd..d5c2dbfc7443 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@@ -1018,9 -784,7 +784,7 @@@ static int rproc_fw_boot(struct rproc * if (ret) return ret; - ehdr = (struct elf32_hdr *)fw->data; - - dev_info(dev, "Booting fw image %s, size %d\n", name, fw->size); + dev_info(dev, "Booting fw image %s, size %zd\n", name, fw->size); /* * if enabling an IOMMU isn't relevant for this rproc, this is @@@ -1032,19 -796,12 +796,14 @@@ return ret; } - /* - * The ELF entry point is the rproc's boot addr (though this is not - * a configurable property of all remote processors: some will always - * boot at a specific hardcoded address). - */ - rproc->bootaddr = ehdr->e_entry; + rproc->bootaddr = rproc_get_boot_addr(rproc, fw); /* look for the resource table */ - table = rproc_find_rsc_table(rproc, fw->data, fw->size, &tablesz); + table = rproc_find_rsc_table(rproc, fw, &tablesz); - if (!table) + if (!table) { + ret = -EINVAL; goto clean_up; + } /* handle fw resources which are required to boot rproc */ ret = rproc_handle_boot_rsc(rproc, table, tablesz);