[Sound-open-firmware] [PATCH] platform: separate common API duplicated in platform headers.
Liam Girdwood
liam.r.girdwood at linux.intel.com
Mon Jun 4 14:36:45 CEST 2018
On Mon, 2018-06-04 at 13:33 +0100, Liam Girdwood wrote:
> From: Marcin Maka <marcin.maka at linux.intel.com>
>
> Common platform API separated to avoid duplicated declarations
> and indicate public functions implemented by all platforms.
>
> Signed-off-by: Marcin Maka <marcin.maka at linux.intel.com>
>
> # Conflicts:
> # src/platform/apollolake/include/platform/platform.h
> # src/platform/baytrail/include/platform/platform.h
> # src/platform/cannonlake/include/platform/platform.h
> # src/platform/haswell/include/platform/platform.h
Marcin, can you resent on top of master. I had to manually merge and have likely
made some errors.
> ---
> src/include/sof/panic.h | 4 +-
> src/include/sof/platform.h | 60 +++++++++++++++++++
> .../apollolake/include/platform/platform.h | 15 ++---
> .../baytrail/include/platform/platform.h | 8 ++-
> .../cannonlake/include/platform/platform.h | 14 ++---
> .../haswell/include/platform/platform.h | 6 +-
> 6 files changed, 82 insertions(+), 25 deletions(-)
> create mode 100644 src/include/sof/platform.h
>
>
snip
>
> /* Platform defined trace code */
> -#define platform_panic(__x) { \
> - mailbox_sw_reg_write(SRAM_REG_FW_STATUS, \
> - (0xdead000 | (__x)) & 0x3fffffff); \
> - ipc_write(IPC_DIPCIDD, MAILBOX_EXCEPTION_OFFSET + 2 * 0x20000); \
> - ipc_write(IPC_DIPCIDR, 0x80000000 | \
> - ((0xdead000 | (__x)) & 0x3fffffff)); \
> +static inline void platform_panic(uint32_t p)
> +{
> + sw_reg_write(SRAM_REG_FW_STATUS, p & 0x3fffffff);
> + ipc_write(IPC_DIPCIDR, 0x80000000 | (p & 0x3fffffff));
> }
>
>
Btw, will we still get the 0xdead code in the IPC registers on a FW crash ? The
driver uses this to determine if it has to take any further recovery action.
Thanks
Liam
More information about the Sound-open-firmware
mailing list