Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linuxkpi/common/include/linux/firmware.h
- This file was added.
/*- | |||||
* SPDX-License-Identifier: BSD-2-Clause | |||||
* | |||||
* Copyright (c) 2020 The FreeBSD Foundation | |||||
* | |||||
* This software was developed by Björn Zeeb under sponsorship from | |||||
* the FreeBSD Foundation. | |||||
* | |||||
* Redistribution and use in source and binary forms, with or without | |||||
* modification, are permitted provided that the following conditions | |||||
* are met: | |||||
* 1. Redistributions of source code must retain the above copyright | |||||
* notice, this list of conditions and the following disclaimer. | |||||
* 2. Redistributions in binary form must reproduce the above copyright | |||||
* notice, this list of conditions and the following disclaimer in the | |||||
* documentation and/or other materials provided with the distribution. | |||||
* | |||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | |||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |||||
* SUCH DAMAGE. | |||||
* | |||||
* $FreeBSD$ | |||||
*/ | |||||
#ifndef _LINUX_FIRMWARE_H | |||||
#define _LINUX_FIRMWARE_H | |||||
#include <sys/types.h> | |||||
#include <linux/types.h> | |||||
#include <linux/device.h> | |||||
/* Keep in sync with implementation. */ | |||||
struct firmware { | |||||
size_t size; | |||||
const uint8_t *data; | |||||
/* XXX Does Linux expose anything else? */ | |||||
const void *fbdfw; | |||||
}; | |||||
#if 0 | |||||
#define firmware linux_firmware | |||||
#endif | |||||
int request_firmware_nowait(struct module *, bool, const char *, | |||||
manu: Function should be named linux_ in linuxkpi. | |||||
bzAuthorUnsubmitted Done Inline ActionsWhy should it? Linux calls it this way. the entire purpose of linuxkpi is to not touch upstream code where avoidable. bz: Why should it? Linux calls it this way. the entire purpose of linuxkpi is to not touch… | |||||
manuUnsubmitted Not Done Inline ActionsUse a function macro to change the name, but the function symbol should be linux_XXX manu: Use a function macro to change the name, but the function symbol should be linux_XXX | |||||
bzAuthorUnsubmitted Done Inline ActionsWhy? Most of the linuxkpi functions don't do this. See linux/pci.h for just one example. Do you want to macrofize and change all of it to linux_? or actually better linuxkpi_* then as linux_ is the linuxolator I'd assume? bz: Why? Most of the linuxkpi functions don't do this. See linux/pci.h for just one example. Do… | |||||
manuUnsubmitted Not Done Inline Actionsmanu: See https://svnweb.freebsd.org/base/head/sys/compat/linuxkpi/common/include/linux/wait.h? | |||||
struct device *, gfp_t, void *, | |||||
void(*cont)(const struct firmware *, void *)); | |||||
int request_firmware(const struct firmware **, const char *, struct device *); | |||||
void release_firmware(const struct firmware *); | |||||
#endif /* _LINUX_FIRMWARE_H */ | |||||
/* end */ |
Function should be named linux_ in linuxkpi.