blob: 726fffeb3e8e118769cd05d5dc687191077916bc [file] [log] [blame]
Abdellatif El Khlifif37af272023-04-17 10:11:52 +01001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright 2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
4 *
5 * Authors:
6 * Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
7 */
8
9#ifndef __DRIVER_NVMXIP_H__
10#define __DRIVER_NVMXIP_H__
11
12#include <blk.h>
13
14#define NVMXIP_BLKDRV_NAME "nvmxip-blk"
15#define NVMXIP_BLKDEV_NAME_SZ 20
16
17/**
18 * struct nvmxip_plat - the NVMXIP driver plat
19 *
20 * @phys_base: NVM XIP device base address
21 * @lba_shift: block size shift count
22 * @lba: number of blocks
23 *
24 * The NVMXIP information read from the DT.
25 */
26struct nvmxip_plat {
27 phys_addr_t phys_base;
28 u32 lba_shift;
29 lbaint_t lba;
30};
31
Marek Vasutd223dcf2023-08-23 02:18:17 +020032/**
33 * nvmxip_bind() - post binding treatments
34 * @dev: the NVMXIP device
35 *
36 * Create and probe a child block device.
37 *
38 * Return:
39 *
40 * 0 on success. Otherwise, failure
41 */
42int nvmxip_probe(struct udevice *udev);
43
Abdellatif El Khlifif37af272023-04-17 10:11:52 +010044#endif /* __DRIVER_NVMXIP_H__ */