atom.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
  2. /*
  3. * This file is provided under a dual BSD/GPLv2 license. When using or
  4. * redistributing this file, you may do so under either license.
  5. *
  6. * Copyright(c) 2017-2021 Intel Corporation. All rights reserved.
  7. *
  8. * Author: Liam Girdwood <[email protected]>
  9. */
  10. #ifndef __SOF_INTEL_ATOM_H
  11. #define __SOF_INTEL_ATOM_H
  12. /* DSP memories */
  13. #define IRAM_OFFSET 0x0C0000
  14. #define IRAM_SIZE (80 * 1024)
  15. #define DRAM_OFFSET 0x100000
  16. #define DRAM_SIZE (160 * 1024)
  17. #define SHIM_OFFSET 0x140000
  18. #define SHIM_SIZE_BYT 0x100
  19. #define SHIM_SIZE_CHT 0x118
  20. #define MBOX_OFFSET 0x144000
  21. #define MBOX_SIZE 0x1000
  22. #define EXCEPT_OFFSET 0x800
  23. #define EXCEPT_MAX_HDR_SIZE 0x400
  24. /* DSP peripherals */
  25. #define DMAC0_OFFSET 0x098000
  26. #define DMAC1_OFFSET 0x09c000
  27. #define DMAC2_OFFSET 0x094000
  28. #define DMAC_SIZE 0x420
  29. #define SSP0_OFFSET 0x0a0000
  30. #define SSP1_OFFSET 0x0a1000
  31. #define SSP2_OFFSET 0x0a2000
  32. #define SSP3_OFFSET 0x0a4000
  33. #define SSP4_OFFSET 0x0a5000
  34. #define SSP5_OFFSET 0x0a6000
  35. #define SSP_SIZE 0x100
  36. #define STACK_DUMP_SIZE 32
  37. #define PCI_BAR_SIZE 0x200000
  38. #define PANIC_OFFSET(x) (((x) & GENMASK_ULL(47, 32)) >> 32)
  39. /*
  40. * Debug
  41. */
  42. #define MBOX_DUMP_SIZE 0x30
  43. /* BARs */
  44. #define DSP_BAR 0
  45. #define PCI_BAR 1
  46. #define IMR_BAR 2
  47. irqreturn_t atom_irq_handler(int irq, void *context);
  48. irqreturn_t atom_irq_thread(int irq, void *context);
  49. int atom_send_msg(struct snd_sof_dev *sdev, struct snd_sof_ipc_msg *msg);
  50. int atom_get_mailbox_offset(struct snd_sof_dev *sdev);
  51. int atom_get_window_offset(struct snd_sof_dev *sdev, u32 id);
  52. int atom_run(struct snd_sof_dev *sdev);
  53. int atom_reset(struct snd_sof_dev *sdev);
  54. void atom_dump(struct snd_sof_dev *sdev, u32 flags);
  55. struct snd_soc_acpi_mach *atom_machine_select(struct snd_sof_dev *sdev);
  56. void atom_set_mach_params(struct snd_soc_acpi_mach *mach,
  57. struct snd_sof_dev *sdev);
  58. extern struct snd_soc_dai_driver atom_dai[];
  59. #endif