Skip to content

Commit

Permalink
sfi: Remove framework for deprecated firmware
Browse files Browse the repository at this point in the history
SFI-based platforms are gone. So does this framework.

This removes mention of SFI through the drivers and other code as well.

Signed-off-by: Andy Shevchenko <[email protected]>
Reviewed-by: Hans de Goede <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
andy-shev authored and rafaeljw committed Feb 15, 2021
1 parent 73f70d6 commit 4590d98
Show file tree
Hide file tree
Showing 42 changed files with 14 additions and 2,695 deletions.
15 changes: 0 additions & 15 deletions Documentation/ABI/testing/sysfs-firmware-sfi

This file was deleted.

2 changes: 1 addition & 1 deletion Documentation/ABI/testing/sysfs-platform-kim
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Description:
is connected. example: "/dev/ttyS0".

The device name flows down to architecture specific board
initialization file from the SFI/ATAGS bootloader
initialization file from the ATAGS bootloader
firmware. The name exposed is read from the user-space
dameon and opens the device when install is requested.

Expand Down
7 changes: 0 additions & 7 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -16234,13 +16234,6 @@ S: Maintained
F: Documentation/fb/sm712fb.rst
F: drivers/video/fbdev/sm712*

SIMPLE FIRMWARE INTERFACE (SFI)
S: Obsolete
W: http://simplefirmware.org/
F: arch/x86/platform/sfi/
F: drivers/sfi/
F: include/linux/sfi*.h

SIMPLEFB FB DRIVER
M: Hans de Goede <[email protected]>
L: [email protected]
Expand Down
7 changes: 2 additions & 5 deletions arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ config X86_X2APIC
If you don't know what to do here, say N.

config X86_MPPARSE
bool "Enable MPS table" if ACPI || SFI
bool "Enable MPS table" if ACPI
default y
depends on X86_LOCAL_APIC
help
Expand Down Expand Up @@ -603,7 +603,6 @@ config X86_INTEL_MID
depends on PCI
depends on X86_64 || (PCI_GOANY && X86_32)
depends on X86_IO_APIC
select SFI
select I2C
select DW_APB_TIMER
select APB_TIMER
Expand Down Expand Up @@ -2457,8 +2456,6 @@ source "kernel/power/Kconfig"

source "drivers/acpi/Kconfig"

source "drivers/sfi/Kconfig"

config X86_APM_BOOT
def_bool y
depends on APM
Expand Down Expand Up @@ -2645,7 +2642,7 @@ config PCI_DIRECT
config PCI_MMCONFIG
bool "Support mmconfig PCI config space access" if X86_64
default y
depends on PCI && (ACPI || SFI || JAILHOUSE_GUEST)
depends on PCI && (ACPI || JAILHOUSE_GUEST)
depends on X86_64 || (PCI_GOANY || PCI_GOMMCONFIG)

config PCI_OLPC
Expand Down
37 changes: 0 additions & 37 deletions arch/x86/include/asm/intel-mid.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#ifndef _ASM_X86_INTEL_MID_H
#define _ASM_X86_INTEL_MID_H

#include <linux/sfi.h>
#include <linux/pci.h>
#include <linux/platform_device.h>

Expand All @@ -22,39 +21,6 @@ extern void intel_mid_pwr_power_off(void);

extern int intel_mid_pwr_get_lss_id(struct pci_dev *pdev);

extern int get_gpio_by_name(const char *name);

/*
* Here defines the array of devices platform data that IAFW would export
* through SFI "DEVS" table, we use name and type to match the device and
* its platform data.
*/
struct devs_id {
char name[SFI_NAME_LEN + 1];
u8 type;
u8 delay;
void *(*get_platform_data)(void *info);
};

#define sfi_device(i) \
static const struct devs_id *const __intel_mid_sfi_##i##_dev __used \
__section(".x86_intel_mid_dev.init") = &i

/**
* struct mid_sd_board_info - template for SD device creation
* @name: identifies the driver
* @bus_num: board-specific identifier for a given SD controller
* @max_clk: the maximum frequency device supports
* @platform_data: the particular data stored there is driver-specific
*/
struct mid_sd_board_info {
char name[SFI_NAME_LEN];
int bus_num;
unsigned short addr;
u32 max_clk;
void *platform_data;
};

/*
* Medfield is the follow-up of Moorestown, it combines two chip solution into
* one. Other than that it also added always-on and constant tsc and lapic
Expand Down Expand Up @@ -99,7 +65,4 @@ static inline void intel_scu_devices_destroy(void) { }
/* FSB 83MHz */
#define BSEL_SOC_FUSE_111 0x7

/* The offset for the mapping of global gpio pin to irq */
#define INTEL_MID_IRQ_OFFSET 0x100

#endif /* _ASM_X86_INTEL_MID_H */
58 changes: 1 addition & 57 deletions arch/x86/include/asm/intel_scu_ipc_legacy.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,73 +2,17 @@
#ifndef _ASM_X86_INTEL_SCU_IPC_LEGACY_H_
#define _ASM_X86_INTEL_SCU_IPC_LEGACY_H_

#include <linux/notifier.h>

#define IPCMSG_INDIRECT_READ 0x02
#define IPCMSG_INDIRECT_WRITE 0x05
#include <linux/types.h>

#define IPCMSG_COLD_OFF 0x80 /* Only for Tangier */

#define IPCMSG_WARM_RESET 0xF0
#define IPCMSG_COLD_RESET 0xF1
#define IPCMSG_SOFT_RESET 0xF2
#define IPCMSG_COLD_BOOT 0xF3

/* Don't call these in new code - they will be removed eventually */

/* Read a vector */
static inline int intel_scu_ipc_readv(u16 *addr, u8 *data, int len)
{
return intel_scu_ipc_dev_readv(NULL, addr, data, len);
}

/* Write a vector */
static inline int intel_scu_ipc_writev(u16 *addr, u8 *data, int len)
{
return intel_scu_ipc_dev_writev(NULL, addr, data, len);
}

/* Update single register based on the mask */
static inline int intel_scu_ipc_update_register(u16 addr, u8 data, u8 mask)
{
return intel_scu_ipc_dev_update(NULL, addr, data, mask);
}

/* Issue commands to the SCU with or without data */
static inline int intel_scu_ipc_simple_command(int cmd, int sub)
{
return intel_scu_ipc_dev_simple_command(NULL, cmd, sub);
}

static inline int intel_scu_ipc_command(int cmd, int sub, u32 *in, int inlen,
u32 *out, int outlen)
{
/* New API takes both inlen and outlen as bytes so convert here */
size_t inbytes = inlen * sizeof(u32);
size_t outbytes = outlen * sizeof(u32);

return intel_scu_ipc_dev_command_with_size(NULL, cmd, sub, in, inbytes,
inlen, out, outbytes);
}

extern struct blocking_notifier_head intel_scu_notifier;

static inline void intel_scu_notifier_add(struct notifier_block *nb)
{
blocking_notifier_chain_register(&intel_scu_notifier, nb);
}

static inline void intel_scu_notifier_remove(struct notifier_block *nb)
{
blocking_notifier_chain_unregister(&intel_scu_notifier, nb);
}

static inline int intel_scu_notifier_post(unsigned long v, void *p)
{
return blocking_notifier_call_chain(&intel_scu_notifier, v, p);
}

#define SCU_AVAILABLE 1
#define SCU_DOWN 2

#endif
2 changes: 0 additions & 2 deletions arch/x86/include/asm/platform_sst_audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#ifndef _PLATFORM_SST_AUDIO_H_
#define _PLATFORM_SST_AUDIO_H_

#include <linux/sfi.h>

#define MAX_NUM_STREAMS_MRFLD 25
#define MAX_NUM_STREAMS MAX_NUM_STREAMS_MRFLD

Expand Down
4 changes: 2 additions & 2 deletions arch/x86/kernel/apic/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ static int __init parse_noapic(char *str)
}
early_param("noapic", parse_noapic);

/* Will be called in mpparse/acpi/sfi codes for saving IRQ info */
/* Will be called in mpparse/ACPI codes for saving IRQ info */
void mp_save_irq(struct mpc_intsrc *m)
{
int i;
Expand Down Expand Up @@ -2863,7 +2863,7 @@ int mp_register_ioapic(int id, u32 address, u32 gsi_base,

/*
* If mp_register_ioapic() is called during early boot stage when
* walking ACPI/SFI/DT tables, it's too early to create irqdomain,
* walking ACPI/DT tables, it's too early to create irqdomain,
* we are still using bootmem allocator. So delay it to setup_IO_APIC().
*/
if (hotplug) {
Expand Down
2 changes: 0 additions & 2 deletions arch/x86/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <linux/memblock.h>
#include <linux/pci.h>
#include <linux/root_dev.h>
#include <linux/sfi.h>
#include <linux/hugetlb.h>
#include <linux/tboot.h>
#include <linux/usb/xhci-dbgp.h>
Expand Down Expand Up @@ -1185,7 +1184,6 @@ void __init setup_arch(char **cmdline_p)
* Read APIC and some other early information from ACPI tables.
*/
acpi_boot_init();
sfi_init();
x86_dtb_init();

/*
Expand Down
6 changes: 3 additions & 3 deletions arch/x86/pci/mmconfig-shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
* themselves.
*/

#include <linux/acpi.h>
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/sfi_acpi.h>
#include <linux/bitmap.h>
#include <linux/dmi.h>
#include <linux/slab.h>
Expand Down Expand Up @@ -665,7 +665,7 @@ void __init pci_mmcfg_early_init(void)
if (pci_mmcfg_check_hostbridge())
known_bridge = 1;
else
acpi_sfi_table_parse(ACPI_SIG_MCFG, pci_parse_mcfg);
acpi_table_parse(ACPI_SIG_MCFG, pci_parse_mcfg);
__pci_mmcfg_init(1);

set_apei_filter();
Expand All @@ -683,7 +683,7 @@ void __init pci_mmcfg_late_init(void)

/* MMCONFIG hasn't been enabled yet, try again */
if (pci_probe & PCI_PROBE_MASK & ~PCI_PROBE_MMCONF) {
acpi_sfi_table_parse(ACPI_SIG_MCFG, pci_parse_mcfg);
acpi_table_parse(ACPI_SIG_MCFG, pci_parse_mcfg);
__pci_mmcfg_init(0);
}
}
Expand Down
1 change: 0 additions & 1 deletion arch/x86/platform/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ obj-y += intel-mid/
obj-y += intel-quark/
obj-y += olpc/
obj-y += scx200/
obj-y += sfi/
obj-y += ts5500/
obj-y += uv/
5 changes: 0 additions & 5 deletions arch/x86/platform/intel-mid/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
# SPDX-License-Identifier: GPL-2.0-only
obj-$(CONFIG_X86_INTEL_MID) += intel-mid.o pwr.o

# SFI specific code
ifdef CONFIG_X86_INTEL_MID
obj-$(CONFIG_SFI) += sfi.o device_libs/
endif
23 changes: 0 additions & 23 deletions arch/x86/platform/intel-mid/device_libs/Makefile

This file was deleted.

Loading

0 comments on commit 4590d98

Please sign in to comment.