xref: /linux/drivers/gpu/drm/i915/soc/intel_rom.h (revision 7f71507851fc7764b36a3221839607d3a45c2025)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2024 Intel Corporation
4  */
5 
6 #ifndef __INTEL_ROM_H__
7 #define __INTEL_ROM_H__
8 
9 #include <linux/types.h>
10 
11 struct drm_i915_private;
12 struct intel_rom;
13 
14 struct intel_rom *intel_rom_spi(struct drm_i915_private *i915);
15 struct intel_rom *intel_rom_pci(struct drm_i915_private *i915);
16 
17 u32 intel_rom_read32(struct intel_rom *rom, loff_t offset);
18 u16 intel_rom_read16(struct intel_rom *rom, loff_t offset);
19 void intel_rom_read_block(struct intel_rom *rom, void *data,
20 			  loff_t offset, size_t size);
21 loff_t intel_rom_find(struct intel_rom *rom, u32 needle);
22 size_t intel_rom_size(struct intel_rom *rom);
23 void intel_rom_free(struct intel_rom *rom);
24 
25 #endif /* __INTEL_ROM_H__ */
26