Skip to content

Commit

Permalink
x86/platform/intel-mid: Remove unused leftovers (vRTC)
Browse files Browse the repository at this point in the history
There is no driver present, remove the device creation and other
leftovers.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Andy Shevchenko authored and Rafael J. Wysocki committed Feb 9, 2021
1 parent 59326a6 commit 2468f93
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 246 deletions.
3 changes: 0 additions & 3 deletions arch/x86/include/asm/fixmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,6 @@ enum fixed_addresses {
#ifdef CONFIG_PARAVIRT_XXL
FIX_PARAVIRT_BOOTMAP,
#endif
#ifdef CONFIG_X86_INTEL_MID
FIX_LNW_VRTC,
#endif

#ifdef CONFIG_ACPI_APEI_GHES
/* Used for GHES mapping from assorted contexts */
Expand Down
10 changes: 0 additions & 10 deletions arch/x86/include/asm/intel-mid.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ 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);
extern int __init sfi_parse_mrtc(struct sfi_table_header *table);
extern int __init sfi_parse_mtmr(struct sfi_table_header *table);
extern int sfi_mrtc_num;
extern struct sfi_rtc_table_entry sfi_mrtc_array[];

/*
* Here defines the array of devices platform data that IAFW would export
Expand Down Expand Up @@ -112,13 +109,6 @@ extern enum intel_mid_timer_options intel_mid_timer_options;
#define BSEL_SOC_FUSE_111 0x7

#define SFI_MTMR_MAX_NUM 8
#define SFI_MRTC_MAX 8

/* VRTC timer */
#define MRST_VRTC_MAP_SZ 1024
/* #define MRST_VRTC_PGOFFSET 0xc00 */

extern void intel_mid_rtc_init(void);

/* The offset for the mapping of global gpio pin to irq */
#define INTEL_MID_IRQ_OFFSET 0x100
Expand Down
10 changes: 0 additions & 10 deletions arch/x86/include/asm/intel_mid_vrtc.h

This file was deleted.

5 changes: 0 additions & 5 deletions arch/x86/include/asm/intel_scu_ipc_legacy.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
#define IPCMSG_SOFT_RESET 0xF2
#define IPCMSG_COLD_BOOT 0xF3

#define IPCMSG_VRTC 0xFA /* Set vRTC device */
/* Command id associated with message IPCMSG_VRTC */
#define IPC_CMD_VRTC_SETTIME 1 /* Set time */
#define IPC_CMD_VRTC_SETALARM 2 /* Set alarm */

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

/* Read single register */
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/platform/intel-mid/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
obj-$(CONFIG_X86_INTEL_MID) += intel-mid.o intel_mid_vrtc.o pwr.o
obj-$(CONFIG_X86_INTEL_MID) += intel-mid.o pwr.o

# SFI specific code
ifdef CONFIG_X86_INTEL_MID
Expand Down
2 changes: 0 additions & 2 deletions arch/x86/platform/intel-mid/intel-mid.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include <asm/apic.h>
#include <asm/io_apic.h>
#include <asm/intel-mid.h>
#include <asm/intel_mid_vrtc.h>
#include <asm/io.h>
#include <asm/i8259.h>
#include <asm/intel_scu_ipc.h>
Expand Down Expand Up @@ -159,7 +158,6 @@ void __init x86_intel_mid_early_setup(void)

x86_init.timers.timer_init = intel_mid_time_init;
x86_init.timers.setup_percpu_clockev = x86_init_noop;
x86_init.timers.wallclock_init = intel_mid_rtc_init;

x86_init.irqs.pre_vector_init = x86_init_noop;

Expand Down
173 changes: 0 additions & 173 deletions arch/x86/platform/intel-mid/intel_mid_vrtc.c

This file was deleted.

42 changes: 0 additions & 42 deletions arch/x86/platform/intel-mid/sfi.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include <asm/apic.h>
#include <asm/io_apic.h>
#include <asm/intel-mid.h>
#include <asm/intel_mid_vrtc.h>
#include <asm/io.h>
#include <asm/i8259.h>
#include <asm/intel_scu_ipc.h>
Expand All @@ -54,12 +53,8 @@ static int i2c_next_dev;
static int i2c_bus[MAX_SCU_I2C];
static int gpio_num_entry;
static u32 sfi_mtimer_usage[SFI_MTMR_MAX_NUM];
int sfi_mrtc_num;
int sfi_mtimer_num;

struct sfi_rtc_table_entry sfi_mrtc_array[SFI_MRTC_MAX];
EXPORT_SYMBOL_GPL(sfi_mrtc_array);

struct blocking_notifier_head intel_scu_notifier =
BLOCKING_NOTIFIER_INIT(intel_scu_notifier);
EXPORT_SYMBOL_GPL(intel_scu_notifier);
Expand Down Expand Up @@ -138,43 +133,6 @@ void sfi_free_mtmr(struct sfi_timer_table_entry *mtmr)
}
}

/* parse all the mrtc info to a global mrtc array */
int __init sfi_parse_mrtc(struct sfi_table_header *table)
{
struct sfi_table_simple *sb;
struct sfi_rtc_table_entry *pentry;
struct mpc_intsrc mp_irq;

int totallen;

sb = (struct sfi_table_simple *)table;
if (!sfi_mrtc_num) {
sfi_mrtc_num = SFI_GET_NUM_ENTRIES(sb,
struct sfi_rtc_table_entry);
pentry = (struct sfi_rtc_table_entry *)sb->pentry;
totallen = sfi_mrtc_num * sizeof(*pentry);
memcpy(sfi_mrtc_array, pentry, totallen);
}

pr_debug("SFI RTC info (num = %d):\n", sfi_mrtc_num);
pentry = sfi_mrtc_array;
for (totallen = 0; totallen < sfi_mrtc_num; totallen++, pentry++) {
pr_debug("RTC[%d]: paddr = 0x%08x, irq = %d\n",
totallen, (u32)pentry->phys_addr, pentry->irq);
mp_irq.type = MP_INTSRC;
mp_irq.irqtype = mp_INT;
mp_irq.irqflag = MP_IRQTRIG_LEVEL | MP_IRQPOL_ACTIVE_LOW;
mp_irq.srcbus = MP_BUS_ISA;
mp_irq.srcbusirq = pentry->irq; /* IRQ */
mp_irq.dstapic = MP_APIC_ALL;
mp_irq.dstirq = pentry->irq;
mp_save_irq(&mp_irq);
mp_map_gsi_to_irq(pentry->irq, IOAPIC_MAP_ALLOC, NULL);
}
return 0;
}


/*
* Parsing GPIO table first, since the DEVS table will need this table
* to map the pin name to the actual pin.
Expand Down

0 comments on commit 2468f93

Please sign in to comment.