diff --git a/src/superio/serverengines/Makefile.inc b/src/superio/serverengines/Makefile.inc deleted file mode 100644 index 094286b66e..0000000000 --- a/src/superio/serverengines/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -subdirs-y += pilot diff --git a/src/superio/serverengines/pilot/Kconfig b/src/superio/serverengines/pilot/Kconfig deleted file mode 100644 index 21520bc464..0000000000 --- a/src/superio/serverengines/pilot/Kconfig +++ /dev/null @@ -1,4 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only - -config SUPERIO_SERVERENGINES_PILOT - bool diff --git a/src/superio/serverengines/pilot/Makefile.inc b/src/superio/serverengines/pilot/Makefile.inc deleted file mode 100644 index ce77e43a9c..0000000000 --- a/src/superio/serverengines/pilot/Makefile.inc +++ /dev/null @@ -1,6 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-or-later - -bootblock-$(CONFIG_SUPERIO_SERVERENGINES_PILOT) += early_init.c -bootblock-$(CONFIG_SUPERIO_SERVERENGINES_PILOT) += early_serial.c -romstage-$(CONFIG_SUPERIO_SERVERENGINES_PILOT) += early_init.c -romstage-$(CONFIG_SUPERIO_SERVERENGINES_PILOT) += early_serial.c diff --git a/src/superio/serverengines/pilot/early_init.c b/src/superio/serverengines/pilot/early_init.c deleted file mode 100644 index d974afef25..0000000000 --- a/src/superio/serverengines/pilot/early_init.c +++ /dev/null @@ -1,107 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ - -/* PILOT Super I/O is only based on LPC observation done on factory system. */ - -#define BLUBB_DEV PNP_DEV(port, 0x04) - -#include -#include -#include - -#include "pilot.h" - -/* - * Logical device 4, 5 and 7 are being deactivated. Logical Device 1 seems to - * be another serial (?), it is also deactivated on the HP machine. - */ -void pilot_early_init(pnp_devfn_t dev) -{ - u16 port = dev >> 8; - - printk(BIOS_DEBUG, "Using port: %04x\n", port); - pilot_disable_serial(PNP_DEV(port, 0x1)); - printk(BIOS_DEBUG, "disable serial 1\n"); - - pnp_enter_ext_func_mode(dev); - pnp_set_logical_device(PNP_DEV(port, 0x3)); - pnp_set_enable(dev, 0); - pnp_set_iobase(dev, PNP_IDX_IO0, 0x0b00); - pnp_set_iobase(dev, PNP_IDX_IO1, 0x0b80); - pnp_set_iobase(dev, PNP_IDX_IO2, 0x0b84); - pnp_set_iobase(dev, PNP_IDX_IO3, 0x0b86); - pnp_set_enable(dev, 1); - pnp_exit_ext_func_mode(dev); - -/* - pnp_enter_ext_func_mode(dev); - pnp_set_logical_device(PNP_DEV(port, 0x3)); - pnp_exit_ext_func_mode(dev); - pnp_enter_ext_func_mode(dev); - pnp_set_enable(PNP_DEV(port, 0x3), 0); - pnp_exit_ext_func_mode(dev); -*/ - - pnp_enter_ext_func_mode(dev); - pnp_set_logical_device(PNP_DEV(port, 0x4)); - pnp_exit_ext_func_mode(dev); - pnp_enter_ext_func_mode(dev); - pnp_set_enable(PNP_DEV(port, 0x4), 0); - pnp_exit_ext_func_mode(dev); - - pnp_enter_ext_func_mode(dev); - pnp_set_logical_device(PNP_DEV(port, 0x5)); - pnp_exit_ext_func_mode(dev); - pnp_enter_ext_func_mode(dev); - pnp_set_enable(PNP_DEV(port, 0x5), 0); - pnp_exit_ext_func_mode(dev); - - pnp_enter_ext_func_mode(dev); - pnp_set_logical_device(PNP_DEV(port, 0x6)); - pnp_set_enable(dev, 0); - pnp_set_iobase(dev, PNP_IDX_IO0, 0x60); - pnp_set_iobase(dev, PNP_IDX_IO1, 0x64); - pnp_set_irq(dev, PNP_IDX_IRQ0, 1); - pnp_set_drq(dev, 0x71, 3); - pnp_set_enable(dev, 0); - pnp_exit_ext_func_mode(dev); - - pnp_enter_ext_func_mode(dev); - pnp_set_logical_device(PNP_DEV(port, 0xe)); - pnp_set_enable(dev, 0); - pnp_set_iobase(dev, PNP_IDX_IO0, 0x70); - pnp_set_iobase(dev, PNP_IDX_IO1, 0x72); - pnp_set_irq(dev, PNP_IDX_IRQ0, 8); - pnp_set_drq(dev, 0x71, 3); - pnp_set_enable(dev, 0); - pnp_exit_ext_func_mode(dev); - - pnp_enter_ext_func_mode(dev); - pnp_set_logical_device(PNP_DEV(port, 0x7)); - pnp_exit_ext_func_mode(dev); - pnp_enter_ext_func_mode(dev); - pnp_set_enable(PNP_DEV(port, 0x7), 0); - pnp_exit_ext_func_mode(dev); - -/* - pnp_enter_ext_func_mode(dev); - pnp_set_logical_device(PNP_DEV(port, 0x8)); - pnp_exit_ext_func_mode(dev); - pnp_enter_ext_func_mode(dev); - pnp_set_enable(PNP_DEV(port, 0x8), 0); - pnp_exit_ext_func_mode(dev); - - pnp_enter_ext_func_mode(dev); - pnp_set_logical_device(PNP_DEV(port, 0x9)); - pnp_exit_ext_func_mode(dev); - pnp_enter_ext_func_mode(dev); - pnp_set_enable(PNP_DEV(port, 0x9), 0); - pnp_exit_ext_func_mode(dev); - - pnp_enter_ext_func_mode(dev); - pnp_set_logical_device(PNP_DEV(port, 0x10)); - pnp_exit_ext_func_mode(dev); - pnp_enter_ext_func_mode(dev); - pnp_set_enable(PNP_DEV(port, 0x10), 0); - pnp_exit_ext_func_mode(dev); -*/ -} diff --git a/src/superio/serverengines/pilot/early_serial.c b/src/superio/serverengines/pilot/early_serial.c deleted file mode 100644 index e4154132e2..0000000000 --- a/src/superio/serverengines/pilot/early_serial.c +++ /dev/null @@ -1,40 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ - -/* PILOT Super I/O is only based on LPC observation done on factory system. */ - -#include -#include -#include -#include "pilot.h" - -/* Pilot uses 0x5A/0xA5 pattern to activate deactivate config access. */ -void pnp_enter_ext_func_mode(pnp_devfn_t dev) -{ - u16 port = dev >> 8; - outb(0x5A, port); -} - -void pnp_exit_ext_func_mode(pnp_devfn_t dev) -{ - u16 port = dev >> 8; - outb(0xA5, port); -} - -/* Serial config is a fairly standard procedure. */ -void pilot_enable_serial(pnp_devfn_t dev, u16 iobase) -{ - pnp_enter_ext_func_mode(dev); - pnp_set_logical_device(dev); - pnp_set_iobase(dev, PNP_IDX_IO0, iobase); - pnp_set_enable(dev, 1); - pnp_exit_ext_func_mode(dev); -} - -void pilot_disable_serial(pnp_devfn_t dev) -{ - pnp_enter_ext_func_mode(dev); - pnp_set_logical_device(dev); - pnp_set_iobase(dev, PNP_IDX_IO0, 0x0000); - pnp_set_enable(dev, 0); - pnp_exit_ext_func_mode(dev); -} diff --git a/src/superio/serverengines/pilot/pilot.h b/src/superio/serverengines/pilot/pilot.h deleted file mode 100644 index 5641c08582..0000000000 --- a/src/superio/serverengines/pilot/pilot.h +++ /dev/null @@ -1,25 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ - -#ifndef SUPERIO_SERVERENGINES_PILOT_PILOT_H -#define SUPERIO_SERVERENGINES_PILOT_PILOT_H - -#include - -/* PILOT Super I/O is only based on LPC observation done on factory system. */ - -#define PILOT_LD1 0x01 /* Logical device 1 */ -#define PILOT_SP1 0x02 /* Com1 */ -#define PILOT_LD4 0x04 /* Logical device 4 */ -#define PILOT_LD5 0x05 /* Logical device 5 */ -#define PILOT_LD7 0x07 /* Logical device 7 */ - -/* should not expose these however early_init needs love */ -void pnp_enter_ext_func_mode(pnp_devfn_t dev); -void pnp_exit_ext_func_mode(pnp_devfn_t dev); - -void pilot_early_init(pnp_devfn_t dev); - -void pilot_enable_serial(pnp_devfn_t dev, u16 iobase); -void pilot_disable_serial(pnp_devfn_t dev); - -#endif /* SUPERIO_SERVERENGINES_PILOT_PILOT_H */