linux/drivers/mtd/maps/esb2rom.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * esb2rom.c
 *
 * Normal mappings of flash chips in physical memory
 * through the Intel ESB2 Southbridge.
 *
 * This was derived from ichxrom.c in May 2006 by
 *	Lew Glendenning <[email protected]>
 *
 * Eric Biederman, of course, was a major help in this effort.
 */

#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 MOD_NAME

#define ADDRESS_NAME_LEN

#define ROM_PROBE_STEP_SIZE

#define BIOS_CNTL
#define BIOS_LOCK_ENABLE
#define BIOS_WRITE_ENABLE

/* This became a 16-bit register, and EN2 has disappeared */
#define FWH_DEC_EN1
#define FWH_F8_EN
#define FWH_F0_EN
#define FWH_E8_EN
#define FWH_E0_EN
#define FWH_D8_EN
#define FWH_D0_EN
#define FWH_C8_EN
#define FWH_C0_EN
#define FWH_LEGACY_F_EN
#define FWH_LEGACY_E_EN
/* reserved  0x0020 and 0x0010 */
#define FWH_70_EN
#define FWH_60_EN
#define FWH_50_EN
#define FWH_40_EN

/* these are 32-bit values */
#define FWH_SEL1
#define FWH_SEL2

#define FWH_8MiB

#define FWH_7MiB

#define FWH_6MiB

#define FWH_5MiB

#define FWH_4MiB

#define FWH_3_5MiB

#define FWH_3MiB

#define FWH_2_5MiB

#define FWH_2MiB

#define FWH_1_5MiB

#define FWH_1MiB

#define FWH_0_5MiB


struct esb2rom_window {};

struct esb2rom_map_info {};

static struct esb2rom_window esb2rom_window =;

static void esb2rom_cleanup(struct esb2rom_window *window)
{}

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

static void esb2rom_remove_one(struct pci_dev *pdev)
{}

static const struct pci_device_id esb2rom_pci_tbl[] =;

#if 0
MODULE_DEVICE_TABLE(pci, esb2rom_pci_tbl);

static struct pci_driver esb2rom_driver = {
	.name =		MOD_NAME,
	.id_table =	esb2rom_pci_tbl,
	.probe =	esb2rom_init_one,
	.remove =	esb2rom_remove_one,
};
#endif

static int __init init_esb2rom(void)
{}

static void __exit cleanup_esb2rom(void)
{}

module_init();
module_exit(cleanup_esb2rom);

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