linux/drivers/tty/serial/8250/8250_men_mcb.c

// SPDX-License-Identifier: GPL-2.0
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/io.h>
#include <linux/mcb.h>
#include <linux/serial.h>
#include <linux/serial_core.h>
#include <linux/serial_8250.h>

#define MEN_UART_ID_Z025
#define MEN_UART_ID_Z057
#define MEN_UART_ID_Z125

/*
 * IP Cores Z025 and Z057 can have up to 4 UART
 * The UARTs available are stored in a global
 * register saved in physical address + 0x40
 * Is saved as follows:
 *
 * 7                                                              0
 * +------+-------+-------+-------+-------+-------+-------+-------+
 * |UART4 | UART3 | UART2 | UART1 | U4irq | U3irq | U2irq | U1irq |
 * +------+-------+-------+-------+-------+-------+-------+-------+
 */
#define MEN_UART1_MASK
#define MEN_UART2_MASK
#define MEN_UART3_MASK
#define MEN_UART4_MASK

#define MEN_Z125_UARTS_AVAILABLE

#define MEN_Z025_MAX_UARTS
#define MEN_UART_MEM_SIZE
#define MEM_UART_REGISTER_SIZE
#define MEN_Z025_REGISTER_OFFSET

#define MEN_UART1_OFFSET
#define MEN_UART2_OFFSET
#define MEN_UART3_OFFSET
#define MEN_UART4_OFFSET

#define MEN_READ_REGISTER(addr)

#define MAX_PORTS

struct serial_8250_men_mcb_data {};

/*
 * The Z125 16550-compatible UART has no fixed base clock assigned
 * So, depending on the board we're on, we need to adjust the
 * parameter in order to really set the correct baudrate, and
 * do so if possible without user interaction
 */
static u32 men_lookup_uartclk(struct mcb_device *mdev)
{}

static int read_uarts_available_from_register(struct resource *mem_res,
					      u8 *uarts_available)
{}

static int read_serial_data(struct mcb_device *mdev,
			    struct resource *mem_res,
			    struct serial_8250_men_mcb_data *serial_data)
{}

static int init_serial_data(struct mcb_device *mdev,
			    struct resource *mem_res,
			    struct serial_8250_men_mcb_data *serial_data)
{}

static int serial_8250_men_mcb_probe(struct mcb_device *mdev,
				     const struct mcb_device_id *id)
{}

static void serial_8250_men_mcb_remove(struct mcb_device *mdev)
{}

static const struct mcb_device_id serial_8250_men_mcb_ids[] =;
MODULE_DEVICE_TABLE(mcb, serial_8250_men_mcb_ids);

static struct mcb_driver mcb_driver =;
module_mcb_driver();

MODULE_LICENSE();
MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_ALIAS();
MODULE_ALIAS();
MODULE_ALIAS();
MODULE_IMPORT_NS();