linux/drivers/staging/greybus/bootrom.c

// SPDX-License-Identifier: GPL-2.0
/*
 * BOOTROM Greybus driver.
 *
 * Copyright 2016 Google Inc.
 * Copyright 2016 Linaro Ltd.
 */

#include <linux/firmware.h>
#include <linux/jiffies.h>
#include <linux/mutex.h>
#include <linux/workqueue.h>
#include <linux/greybus.h>

#include "firmware.h"

/* Timeout, in jiffies, within which the next request must be received */
#define NEXT_REQ_TIMEOUT_MS

/*
 * FIXME: Reduce this timeout once svc core handles parallel processing of
 * events from the SVC, which are handled sequentially today.
 */
#define MODE_SWITCH_TIMEOUT_MS

enum next_request_type {};

struct gb_bootrom {};

static void free_firmware(struct gb_bootrom *bootrom)
{}

static void gb_bootrom_timedout(struct work_struct *work)
{}

static void gb_bootrom_set_timeout(struct gb_bootrom *bootrom,
				   enum next_request_type next,
				   unsigned long timeout)
{}

static void gb_bootrom_cancel_timeout(struct gb_bootrom *bootrom)
{}

/*
 * The es2 chip doesn't have VID/PID programmed into the hardware and we need to
 * hack that up to distinguish different modules and their firmware blobs.
 *
 * This fetches VID/PID (over bootrom protocol) for es2 chip only, when VID/PID
 * already sent during hotplug are 0.
 *
 * Otherwise, we keep intf->vendor_id/product_id same as what's passed
 * during hotplug.
 */
static void bootrom_es2_fixup_vid_pid(struct gb_bootrom *bootrom)
{}

/* This returns path of the firmware blob on the disk */
static int find_firmware(struct gb_bootrom *bootrom, u8 stage)
{}

static int gb_bootrom_firmware_size_request(struct gb_operation *op)
{}

static int gb_bootrom_get_firmware(struct gb_operation *op)
{}

static int gb_bootrom_ready_to_boot(struct gb_operation *op)
{}

static int gb_bootrom_request_handler(struct gb_operation *op)
{}

static int gb_bootrom_get_version(struct gb_bootrom *bootrom)
{}

static int gb_bootrom_probe(struct gb_bundle *bundle,
			    const struct greybus_bundle_id *id)
{}

static void gb_bootrom_disconnect(struct gb_bundle *bundle)
{}

static const struct greybus_bundle_id gb_bootrom_id_table[] =;

static struct greybus_driver gb_bootrom_driver =;

module_greybus_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();