mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-16 14:54:25 +00:00
Abstract away the nuts and bolts of the SPI vs. PCI ROM
stuff, and hide it all in soc/intel_rom.c so that the
VBT code doesn't have to care about this stuff.
This leaves intel_bios.c with a single codepath that
can focus on the details related to the VBT layout.
This should have no functional changes.
v2: Rebase due to vbt_signature changes
Drop unnecessary cast (Jani)
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240923152453.11230-7-ville.syrjala@linux.intel.com
26 lines
723 B
C
26 lines
723 B
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2024 Intel Corporation
|
|
*/
|
|
|
|
#ifndef __INTEL_ROM_H__
|
|
#define __INTEL_ROM_H__
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct drm_i915_private;
|
|
struct intel_rom;
|
|
|
|
struct intel_rom *intel_rom_spi(struct drm_i915_private *i915);
|
|
struct intel_rom *intel_rom_pci(struct drm_i915_private *i915);
|
|
|
|
u32 intel_rom_read32(struct intel_rom *rom, loff_t offset);
|
|
u16 intel_rom_read16(struct intel_rom *rom, loff_t offset);
|
|
void intel_rom_read_block(struct intel_rom *rom, void *data,
|
|
loff_t offset, size_t size);
|
|
loff_t intel_rom_find(struct intel_rom *rom, u32 needle);
|
|
size_t intel_rom_size(struct intel_rom *rom);
|
|
void intel_rom_free(struct intel_rom *rom);
|
|
|
|
#endif /* __INTEL_ROM_H__ */
|