summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2024-03-15 13:15:24 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-03-15 13:15:24 +0100
commit4ddf024563216c284c7375a485a167c73e2eaed4 (patch)
tree0cf1fe711bbd95cb3488c9a40ada5e14e71ca43d /include
parent46149a0260cbe7ec86e7fabd83c6e68f1b900e54 (diff)
parentdc82ff225a9bf1e601b7091664769908aa78dcba (diff)
downloadbarebox-4ddf024563216c284c7375a485a167c73e2eaed4.tar.gz
barebox-4ddf024563216c284c7375a485a167c73e2eaed4.tar.xz
Merge branch 'for-next/misc'
Diffstat (limited to 'include')
-rw-r--r--include/boot.h1
-rw-r--r--include/ddr_spd.h34
-rw-r--r--include/driver.h1
-rw-r--r--include/fastboot.h5
-rw-r--r--include/gpio.h15
-rw-r--r--include/linux/printk.h2
-rw-r--r--include/net.h10
-rw-r--r--include/of.h8
8 files changed, 73 insertions, 3 deletions
diff --git a/include/boot.h b/include/boot.h
index c9e8c0fd0d..0f97901a9a 100644
--- a/include/boot.h
+++ b/include/boot.h
@@ -44,6 +44,7 @@ int bootentry_register_provider(int (*fn)(struct bootentries *bootentries, const
struct watchdog;
+void boot_set_default(const char *boot_default);
void boot_set_watchdog_timeout(unsigned int timeout);
struct watchdog *boot_get_enabled_watchdog(void);
struct bootentries *bootentries_alloc(void);
diff --git a/include/ddr_spd.h b/include/ddr_spd.h
index a96d01df85..415fc88f63 100644
--- a/include/ddr_spd.h
+++ b/include/ddr_spd.h
@@ -264,6 +264,40 @@ struct ddr3_spd_eeprom {
/* 69-76 RC1,3,5...15 (MS Nibble) / RC0,2,4...14 (LS Nibble) */
unsigned char rcw[8];
} registered;
+ struct {
+ /* 60 (Load Reduced) Module Nominal Height */
+ unsigned char mod_height;
+ /* 61 (Load Reduced) Module Maximum Thickness */
+ unsigned char mod_thickness;
+ /* 62 (Load Reduced) Reference Raw Card Used */
+ unsigned char ref_raw_card;
+ /* 63 Module Attributes */
+ unsigned char modu_attr;
+ /* 64 Memory Buffer Revision ID */
+ unsigned char buf_rev_id;
+ /* 65 Memory Buffer Manufacturer ID Code, Least Significant Byte */
+ unsigned char buf_id_lo;
+ /* 66 Memory Buffer Manufacturer ID Code, Most Significant Byte */
+ unsigned char buf_id_hi;
+ /* 67-89 FxRCy and MR1,2 Registers */
+ unsigned char fxrcy_mr1_2[23];
+ /* 90 Minimum Module Delay Time for 1.5 V */
+ unsigned char min_delay_1_5;
+ /* 91 Maximum Module Delay Time for 1.5 V */
+ unsigned char max_delay_1_5;
+ /* 92 Minimum Module Delay Time for 1.35 V */
+ unsigned char min_delay_1_35;
+ /* 93 Maximum Module Delay Time for 1.35 V */
+ unsigned char max_delay_1_35;
+ /* 94 Minimum Module Delay Time for 1.25 V */
+ unsigned char min_delay_1_25;
+ /* 95 Maximum Module Delay Time for 1.25 V */
+ unsigned char max_delay_1_25;
+ /* 96-101 Reserved */
+ unsigned char reserved[6];
+ /* 102-116 Memory Buffer Personality Bytes */
+ unsigned char mem_buf_personality[15];
+ } loadreduced;
unsigned char uc[57]; /* 60-116 Module-Specific Section */
} mod_section;
diff --git a/include/driver.h b/include/driver.h
index a61b9dca22..e02815d09b 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -651,6 +651,7 @@ extern struct list_head cdev_list;
#define DEVFS_PARTITION_NO_EXPORT (1U << 10)
#define DEVFS_PARTITION_BOOTABLE_LEGACY (1U << 11)
#define DEVFS_PARTITION_BOOTABLE_ESP (1U << 12)
+#define DEVFS_PARTITION_FOR_FIXUP (1U << 13)
static inline bool cdev_is_mbr_partitioned(const struct cdev *master)
{
diff --git a/include/fastboot.h b/include/fastboot.h
index 8a98b482fe..cd415847e3 100644
--- a/include/fastboot.h
+++ b/include/fastboot.h
@@ -60,6 +60,7 @@ enum fastboot_msg_type {
#ifdef CONFIG_FASTBOOT_BASE
bool get_fastboot_bbu(void);
+void set_fastboot_bbu(unsigned int enable);
struct file_list *get_fastboot_partitions(void);
#else
static inline int get_fastboot_bbu(void)
@@ -67,6 +68,10 @@ static inline int get_fastboot_bbu(void)
return false;
}
+static inline void set_fastboot_bbu(unsigned int enable)
+{
+}
+
static inline struct file_list *get_fastboot_partitions(void)
{
return file_list_parse("");
diff --git a/include/gpio.h b/include/gpio.h
index 9951532084..adc1eb39ac 100644
--- a/include/gpio.h
+++ b/include/gpio.h
@@ -2,6 +2,7 @@
#ifndef __GPIO_H
#define __GPIO_H
+#include <slice.h>
#include <linux/types.h>
#include <linux/list.h>
#include <linux/iopoll.h>
@@ -156,6 +157,12 @@ static inline int gpio_array_to_id(const struct gpio *array, size_t num, u32 *va
{
return -EINVAL;
}
+
+static inline bool gpio_slice_acquired(unsigned gpio)
+{
+ return false;
+}
+
#else
int gpio_request(unsigned gpio, const char *label);
int gpio_find_by_name(const char *name);
@@ -165,6 +172,7 @@ int gpio_request_one(unsigned gpio, unsigned long flags, const char *label);
int gpio_request_array(const struct gpio *array, size_t num);
void gpio_free_array(const struct gpio *array, size_t num);
int gpio_array_to_id(const struct gpio *array, size_t num, u32 *val);
+bool gpio_slice_acquired(unsigned gpio);
#endif
struct gpio_chip;
@@ -213,9 +221,16 @@ struct gpio_chip {
struct gpio_ops *ops;
+ struct slice slice;
+
struct list_head list;
};
+static inline struct slice *gpiochip_slice(struct gpio_chip *chip)
+{
+ return &chip->slice;
+}
+
int gpiochip_add(struct gpio_chip *chip);
void gpiochip_remove(struct gpio_chip *chip);
diff --git a/include/linux/printk.h b/include/linux/printk.h
index 0e9604bbe9..07403ea60c 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -189,7 +189,7 @@ extern void log_clean(unsigned int limit);
#define BAREBOX_LOG_PRINT_TIME BIT(0)
int log_writefile(const char *filepath);
-void log_print(unsigned flags, unsigned levels);
+int log_print(unsigned flags, unsigned levels);
struct va_format {
const char *fmt;
diff --git a/include/net.h b/include/net.h
index ffc1093ae6..5a6dd9ca7b 100644
--- a/include/net.h
+++ b/include/net.h
@@ -249,8 +249,6 @@ struct icmphdr {
* (big endian).
*/
-extern unsigned char *NetRxPackets[PKTBUFSRX];/* Receive packets */
-
void net_set_ip(struct eth_device *edev, IPaddr_t ip);
void net_set_serverip(IPaddr_t ip);
const char *net_get_server(void);
@@ -551,6 +549,14 @@ static inline char *net_alloc_packet(void)
return dma_alloc(PKTSIZE);
}
+static inline void net_free_packet(char *pkt)
+{
+ return dma_free(pkt);
+}
+
+int net_alloc_packets(void **packets, int count);
+void net_free_packets(void **packets, unsigned count);
+
struct net_connection *net_udp_new(IPaddr_t dest, uint16_t dport,
rx_handler_f *handler, void *ctx);
diff --git a/include/of.h b/include/of.h
index 3391403a34..9eef6d7f13 100644
--- a/include/of.h
+++ b/include/of.h
@@ -64,6 +64,9 @@ void of_clean_reserve_map(void);
void fdt_add_reserve_map(void *fdt);
void fdt_print_reserve_map(const void *fdt);
+int fdt_machine_is_compatible(const struct fdt_header *fdt, size_t fdt_size, const char *compat);
+
+
struct device;
struct driver;
struct resource;
@@ -1223,6 +1226,11 @@ static inline int of_property_write_u64(struct device_node *np,
return of_property_write_u64_array(np, propname, &value, 1);
}
+static inline void of_delete_property_by_name(struct device_node *np, const char *name)
+{
+ of_delete_property(of_find_property(np, name, NULL));
+}
+
extern const struct of_device_id of_default_bus_match_table[];
int of_device_enable(struct device_node *node);