blob: e66b45983fe2f5d81f83642c01502a72773213b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (C) 2016 BayLibre, SAS
* Author: Neil Armstrong <[email protected]>
*/
#ifndef __MESON_BOOT_H__
#define __MESON_BOOT_H__
#include <linux/types.h>
/* Boot device */
#define BOOT_DEVICE_RESERVED 0
#define BOOT_DEVICE_EMMC 1
#define BOOT_DEVICE_NAND 2
#define BOOT_DEVICE_SPI 3
#define BOOT_DEVICE_SD 4
#define BOOT_DEVICE_USB 5
int meson_get_boot_device(void);
int meson_get_soc_rev(char *buff, size_t buff_len);
void meson_setup_capsule(void);
/**
* meson_get_socinfo - retrieve cpu_id of the Amlogic SoC
*
* The value in the following format is read from register:
* +-----------+------------+------------+------------+
* | family_id | package_id | chip_rev | layout_rev |
* +-----------+------------+------------+------------+
* | 31 24 | 23 16 | 15 8 | 7 0 |
* +-----------+------------+------------+------------+
*
* Return: 4 bytes value of cpu_id on success or 0 on failure.
*/
u32 meson_get_socinfo(void);
#endif /* __MESON_BOOT_H__ */
|