linux/drivers/mtd/maps/amd76xrom.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * amd76xrom.c
 *
 * Normal mappings of chips in physical memory
 */

#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <asm/io.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/map.h>
#include <linux/mtd/cfi.h>
#include <linux/mtd/flashchip.h>
#include <linux/pci.h>
#include <linux/pci_ids.h>
#include <linux/list.h>


#define xstr(s)
#define str(s)
#define MOD_NAME

#define ADDRESS_NAME_LEN

#define ROM_PROBE_STEP_SIZE

struct amd76xrom_window {};

struct amd76xrom_map_info {};

/* The 2 bits controlling the window size are often set to allow reading
 * the BIOS, but too small to allow writing, since the lock registers are
 * 4MiB lower in the address space than the data.
 *
 * This is intended to prevent flashing the bios, perhaps accidentally.
 *
 * This parameter allows the normal driver to over-ride the BIOS settings.
 *
 * The bits are 6 and 7.  If both bits are set, it is a 5MiB window.
 * If only the 7 Bit is set, it is a 4MiB window.  Otherwise, a
 * 64KiB window.
 *
 */
static uint win_size_bits;
module_param(win_size_bits, uint, 0);
MODULE_PARM_DESC();

static struct amd76xrom_window amd76xrom_window =;

static void amd76xrom_cleanup(struct amd76xrom_window *window)
{}


static int amd76xrom_init_one(struct pci_dev *pdev,
			      const struct pci_device_id *ent)
{}


static void amd76xrom_remove_one(struct pci_dev *pdev)
{}

static const struct pci_device_id amd76xrom_pci_tbl[] =;

MODULE_DEVICE_TABLE(pci, amd76xrom_pci_tbl);

#if 0
static struct pci_driver amd76xrom_driver = {
	.name =		MOD_NAME,
	.id_table =	amd76xrom_pci_tbl,
	.probe =	amd76xrom_init_one,
	.remove =	amd76xrom_remove_one,
};
#endif

static int __init init_amd76xrom(void)
{}

static void __exit cleanup_amd76xrom(void)
{}

module_init();
module_exit(cleanup_amd76xrom);

MODULE_LICENSE();
MODULE_AUTHOR();
MODULE_DESCRIPTION();