linux/drivers/misc/bcm-vk/bcm_vk_tty.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright 2018-2020 Broadcom.
 */

#include <linux/tty.h>
#include <linux/tty_driver.h>
#include <linux/tty_flip.h>

#include "bcm_vk.h"

/* TTYVK base offset is 0x30000 into BAR1 */
#define BAR1_TTYVK_BASE_OFFSET
/* Each TTYVK channel (TO or FROM) is 0x10000 */
#define BAR1_TTYVK_CHAN_OFFSET
/* Each TTYVK channel has TO and FROM, hence the * 2 */
#define BAR1_TTYVK_BASE(index)
/* TO TTYVK channel base comes before FROM for each index */
#define TO_TTYK_BASE(index)
#define FROM_TTYK_BASE(index)

struct bcm_vk_tty_chan {};

#define VK_BAR_CHAN(v, DIR, e)
#define VK_BAR_CHAN_SIZE(v, DIR)
#define VK_BAR_CHAN_WR(v, DIR)
#define VK_BAR_CHAN_RD(v, DIR)
#define VK_BAR_CHAN_DATA(v, DIR, off)

#define VK_BAR0_REGSEG_TTY_DB_OFFSET

/* Poll every 1/10 of second - temp hack till we use MSI interrupt */
#define SERIAL_TIMER_VALUE

static void bcm_vk_tty_poll(struct timer_list *t)
{}

irqreturn_t bcm_vk_tty_irqhandler(int irq, void *dev_id)
{}

static void bcm_vk_tty_wq_handler(struct work_struct *work)
{}

static int bcm_vk_tty_open(struct tty_struct *tty, struct file *file)
{}

static void bcm_vk_tty_close(struct tty_struct *tty, struct file *file)
{}

static void bcm_vk_tty_doorbell(struct bcm_vk *vk, u32 db_val)
{}

static ssize_t bcm_vk_tty_write(struct tty_struct *tty, const u8 *buffer,
				size_t count)
{}

static unsigned int bcm_vk_tty_write_room(struct tty_struct *tty)
{}

static const struct tty_operations serial_ops =;

int bcm_vk_tty_init(struct bcm_vk *vk, char *name)
{}

void bcm_vk_tty_exit(struct bcm_vk *vk)
{}

void bcm_vk_tty_terminate_tty_user(struct bcm_vk *vk)
{}

void bcm_vk_tty_wq_exit(struct bcm_vk *vk)
{}