Skip to content
Snippets Groups Projects
Select Git revision
  • db21f7f2e1d25c46bf7c2949f0c5d4d52eca2fb1
  • devel default
  • wenpeng-hot-fix
  • wenpeng-0905-mem
  • lk_debug_dialogs
  • asterisk_rdkb
  • lk_forking_revert
  • lk_em_update_new_design
  • wenpeng-jul8
  • gyang-devel
  • gyang-devel1
  • wenpeng-jul9
  • asterisk_rdkb_ipv6
  • 16916_rdkb_merge
  • lk_disable_registrar
  • wenpeng-100rel-ippbx
  • fix_multiple_dns_lookup
  • dev_fxs_no_wb
  • fix_fallback
  • 14666_fxs_no_wideband_codec
  • fix_srv_records
  • fix_deadlock_in_bridge_peer_functions
  • 22.0.0-pre1
  • 21.4.2
  • 20.9.2
  • 18.24.2
  • certified-20.7-cert2
  • certified-18.9-cert11
  • 21.4.1
  • 20.9.1
  • 18.24.1
  • 21.4.0
  • 20.9.0
  • 18.24.0
  • certified-20.7-cert1
  • certified-18.9-cert10
  • 21.4.0-rc1
  • 20.9.0-rc1
  • 18.24.0-rc1
  • 21.3.1
  • 20.8.1
  • 18.23.1
42 results

res_config_mysql.c

Blame
  • bootstd.h 2.48 KiB
    /* SPDX-License-Identifier: GPL-2.0+ */
    /*
     * Standard U-Boot boot framework
     *
     * Copyright 2021 Google LLC
     * Written by Simon Glass <sjg@chromium.org>
     */
    
    #ifndef __bootstd_h
    #define __bootstd_h
    
    struct udevice;
    
    /**
     * struct bootstd_priv - priv data for the bootstd driver
     *
     * This is attached to the (only) bootstd device, so there is only one instance
     * of this struct. It provides overall information about bootdevs and bootflows.
     *
     * @prefixes: NULL-terminated list of prefixes to use for bootflow filenames,
     *	e.g. "/", "/boot/"; NULL if none
     * @bootdev_order: Order to use for bootdevs (or NULL if none), with each item
     *	being a bootdev label, e.g. "mmc2", "mmc1";
     * @cur_bootdev: Currently selected bootdev (for commands)
     * @cur_bootflow: Currently selected bootflow (for commands)
     * @glob_head: Head for the global list of all bootflows across all bootdevs
     * @bootmeth_count: Number of bootmeth devices in @bootmeth_order
     * @bootmeth_order: List of bootmeth devices to use, in order, NULL-terminated
     */
    struct bootstd_priv {
    	const char **prefixes;
    	const char **bootdev_order;
    	struct udevice *cur_bootdev;
    	struct bootflow *cur_bootflow;
    	struct list_head glob_head;
    	int bootmeth_count;
    	struct udevice **bootmeth_order;
    };
    
    /**
     * bootstd_get_bootdev_order() - Get the boot-order list
     *
     * This reads the boot order, e.g. {"mmc0", "mmc2", NULL}
     *
     * The list is alloced by the bootstd driver so should not be freed. That is the
     * reason for all the const stuff in the function signature
     *
     * Return: list of string points, terminated by NULL; or NULL if no boot order
     */
    const char *const *const bootstd_get_bootdev_order(struct udevice *dev);
    
    /**
     * bootstd_get_prefixes() - Get the filename-prefixes list
     *
     * This reads the prefixes, e.g. {"/", "/bpot", NULL}
     *
     * The list is alloced by the bootstd driver so should not be freed. That is the
     * reason for all the const stuff in the function signature
     *
     * Return: list of string points, terminated by NULL; or NULL if no boot order
     */
    const char *const *const bootstd_get_prefixes(struct udevice *dev);
    
    /**
     * bootstd_get_priv() - Get the (single) state for the bootstd system
     *
     * The state holds a global list of all bootflows that have been found.
     *
     * Return: 0 if OK, -ve if the uclass does not exist
     */
    int bootstd_get_priv(struct bootstd_priv **stdp);
    
    /**
     * bootstd_clear_glob() - Clear the global list of bootflows
     *
     * This removes all bootflows globally and across all bootdevs.
     */
    void bootstd_clear_glob(void);
    
    #endif