mb/google/brya/var/orisa: Update Type C DisplayPort HPD Configuration
[coreboot2.git] / src / commonlib / storage / storage.h
blob5f51ba950277adbdf4eeb519a30c940965368ad4
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #ifndef __COMMONLIB_STORAGE_STORAGE_H__
4 #define __COMMONLIB_STORAGE_STORAGE_H__
6 #include <stdint.h>
7 #include <commonlib/storage.h>
9 #define DMA_MINALIGN (64)
10 #define ROUND(a, b) (((a) + (b) - 1) & ~((b) - 1))
11 #define ALLOC_CACHE_ALIGN_BUFFER(type, name, size) \
12 char __##name[ROUND(size * sizeof(type), DMA_MINALIGN) + \
13 DMA_MINALIGN - 1]; \
14 type *name = (type *)ALIGN_UP((uintptr_t)__##name, DMA_MINALIGN)
16 /* NOOPs mirroring ARM's cache API, since x86 devices usually cache snoop */
17 #define dcache_invalidate_by_mva(addr, len)
18 #define dcache_clean_invalidate_by_mva(addr, len)
20 /* Storage support routines */
21 int storage_startup(struct storage_media *media);
22 int storage_block_setup(struct storage_media *media, uint64_t start,
23 uint64_t count, int is_read);
25 #endif /* __COMMONLIB_STORAGE_STORAGE_H__ */