cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

8250_fourport.c (1052B)


      1// SPDX-License-Identifier: GPL-2.0
      2/*
      3 *  Copyright (C) 2005 Russell King.
      4 *  Data taken from include/asm-i386/serial.h
      5 */
      6#include <linux/module.h>
      7#include <linux/init.h>
      8#include <linux/serial_8250.h>
      9
     10#include "8250.h"
     11
     12#define SERIAL8250_FOURPORT(_base, _irq) \
     13	SERIAL8250_PORT_FLAGS(_base, _irq, UPF_FOURPORT)
     14
     15static struct plat_serial8250_port fourport_data[] = {
     16	SERIAL8250_FOURPORT(0x1a0, 9),
     17	SERIAL8250_FOURPORT(0x1a8, 9),
     18	SERIAL8250_FOURPORT(0x1b0, 9),
     19	SERIAL8250_FOURPORT(0x1b8, 9),
     20	SERIAL8250_FOURPORT(0x2a0, 5),
     21	SERIAL8250_FOURPORT(0x2a8, 5),
     22	SERIAL8250_FOURPORT(0x2b0, 5),
     23	SERIAL8250_FOURPORT(0x2b8, 5),
     24	{ },
     25};
     26
     27static struct platform_device fourport_device = {
     28	.name			= "serial8250",
     29	.id			= PLAT8250_DEV_FOURPORT,
     30	.dev			= {
     31		.platform_data	= fourport_data,
     32	},
     33};
     34
     35static int __init fourport_init(void)
     36{
     37	return platform_device_register(&fourport_device);
     38}
     39
     40module_init(fourport_init);
     41
     42MODULE_AUTHOR("Russell King");
     43MODULE_DESCRIPTION("8250 serial probe module for AST Fourport cards");
     44MODULE_LICENSE("GPL");