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

// SPDX-License-Identifier: GPL-2.0+
/*
 *  Serial Port driver for Open Firmware platform devices
 *
 *    Copyright (C) 2006 Arnd Bergmann <[email protected]>, IBM Corp.
 */

#include <linux/bits.h>
#include <linux/console.h>
#include <linux/math.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/serial_core.h>
#include <linux/serial_reg.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/pm_runtime.h>
#include <linux/clk.h>
#include <linux/reset.h>
#include <linux/notifier.h>

#include "8250.h"

struct of_serial_info {};

/* Nuvoton NPCM timeout register */
#define UART_NPCM_TOR
#define UART_NPCM_TOIE

static int npcm_startup(struct uart_port *port)
{}

/* Nuvoton NPCM UARTs have a custom divisor calculation */
static unsigned int npcm_get_divisor(struct uart_port *port, unsigned int baud,
				     unsigned int *frac)
{}

static int npcm_setup(struct uart_port *port)
{}

static inline struct of_serial_info *clk_nb_to_info(struct notifier_block *nb)
{}

static int of_platform_serial_clk_notifier_cb(struct notifier_block *nb, unsigned long event,
					      void *data)
{}

/*
 * Fill a struct uart_port for a given device node
 */
static int of_platform_serial_setup(struct platform_device *ofdev,
			int type, struct uart_8250_port *up,
			struct of_serial_info *info)
{}

/*
 * Try to register a serial port
 */
static int of_platform_serial_probe(struct platform_device *ofdev)
{}

/*
 * Release a line
 */
static void of_platform_serial_remove(struct platform_device *ofdev)
{}

#ifdef CONFIG_PM_SLEEP
static int of_serial_suspend(struct device *dev)
{}

static int of_serial_resume(struct device *dev)
{}
#endif
static SIMPLE_DEV_PM_OPS(of_serial_pm_ops, of_serial_suspend, of_serial_resume);

/*
 * A few common types, add more as needed.
 */
static const struct of_device_id of_platform_serial_table[] =;
MODULE_DEVICE_TABLE(of, of_platform_serial_table);

static struct platform_driver of_platform_serial_driver =;

module_platform_driver();

MODULE_AUTHOR();
MODULE_LICENSE();
MODULE_DESCRIPTION();