[uboot] create uboot from github:

repo: https://github.com/u-boot/u-boot
	commit: d80bb749fab53da72c4a0e09b8c2d2aaa3103c91

Change-Id: Ie6434426e1ec15bc08bb1832798e371f3fd5fb29
This commit is contained in:
sam.xiang
2023-02-22 11:43:42 +08:00
parent 2e8190643f
commit f8fc109960
17772 changed files with 3741777 additions and 0 deletions

View File

@ -0,0 +1,32 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (c) Vaisala Oyj.
*/
#ifndef REBOOT_MODE_REBOOT_MODE_GPIO_H_
#define REBOOT_MODE_REBOOT_MODE_GPIO_H_
#include <asm/gpio.h>
/*
* In case of initializing the driver statically (using U_BOOT_DEVICE macro),
* we can use this struct to declare the pins used.
*/
#if !CONFIG_IS_ENABLED(OF_CONTROL)
struct reboot_mode_gpio_config {
int gpio_dev_offset;
int gpio_offset;
int flags;
};
#endif
struct reboot_mode_gpio_platdata {
struct gpio_desc *gpio_desc;
#if !CONFIG_IS_ENABLED(OF_CONTROL)
struct reboot_mode_gpio_config *gpios_config;
#endif
int gpio_count;
};
#endif /* REBOOT_MODE_REBOOT_MODE_GPIO_H_ */

View File

@ -0,0 +1,16 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (c), Vaisala Oyj
*/
#ifndef REBOOT_MODE_REBOOT_MODE_RTC_H_
#define REBOOT_MODE_REBOOT_MODE_RTC_H_
struct reboot_mode_rtc_platdata {
struct udevice *rtc;
bool is_big_endian;
int addr;
size_t size;
};
#endif /* REBOOT_MODE_REBOOT_MODE_RTC_H_ */

View File

@ -0,0 +1,56 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (c), Vaisala Oyj
*/
#ifndef REBOOT_MODE_REBOOT_MODE_H__
#define REBOOT_MODE_REBOOT_MODE_H__
#include <asm/types.h>
#include <dm/device.h>
struct reboot_mode_mode {
const char *mode_name;
u32 mode_id;
};
struct reboot_mode_uclass_platdata {
struct reboot_mode_mode *modes;
u8 count;
const char *env_variable;
};
struct reboot_mode_ops {
/**
* get() - get the current reboot mode value
*
* Returns the current value from the reboot mode backing store.
*
* @dev: Device to read from
* @rebootmode: Address to save the current reboot mode value
*/
int (*get)(struct udevice *dev, u32 *rebootmode);
/**
* set() - set a reboot mode value
*
* Sets the value in the reboot mode backing store.
*
* @dev: Device to read from
* @rebootmode: New reboot mode value to store
*/
int (*set)(struct udevice *dev, u32 rebootmode);
};
/* Access the operations for a reboot mode device */
#define reboot_mode_get_ops(dev) ((struct reboot_mode_ops *)(dev)->driver->ops)
/**
* dm_reboot_mode_update() - Update the reboot mode env variable.
*
* @dev: Device to read from
* @return 0 if OK, -ve on error
*/
int dm_reboot_mode_update(struct udevice *dev);
#endif /* REBOOT_MODE_REBOOT_MODE_H__ */