1
0
mirror of https://github.com/sjlongland/adv950.git synced 2025-09-13 10:43:14 +10:00

Blow away 2.4/2.6 drivers.

If someone wants a driver for something that old, ask Advantech.
This commit is contained in:
Stuart Longland 2017-03-05 15:59:26 +10:00
parent 3dd7257b72
commit 453a134106
Signed by: stuartl
GPG Key ID: 4DFA191410BDE3B7
7 changed files with 0 additions and 16481 deletions

View File

@ -1,80 +0,0 @@
#
# Makefile for the PCI-954/16C950 serial drivers
#
# Advantech eAutomation Division
#
ADVMOD := adv950
UNAME := $(shell uname -r)
ifeq "$(UNAME)""2.4.27-2-386"
LINUX_SRC= /usr/src/kernel-headers-2.4.27-2-386
else
LINUX_SRC= /usr/src/linux-2.4
endif
CONFIG_PATH = config-$(shell uname -r)
RESULT = $(shell grep CONFIG_DEVFS_FS=y /boot/$(CONFIG_PATH))
ifeq ($(RESULT),CONFIG_DEVFS_FS=y)
SERIAL_NAME = ttap
SERIAL_FOLDER = ttap/%d
CALLOUT_NAME= ttac
CALLOUT_FOLDER = ttac/%d
TEST_NAME = ttap/
else
SERIAL_NAME = ttyAP
SERIAL_FOLDER = ttyAP
CALLOUT_NAME= ttyAC
CALLOUT_FOLDER = ttyAC
TEST_NAME = ttyAP
endif
MAX_TTY= 16
MAX_TTY= 16
ADV_TTY_MAJOR= 30
ADV_TTY_CUMAJOR= 35
ARCH_FLAGS= $(I386_FLAGS)
INCL_FLAGS= -I. -I$(LINUX_SRC)/include -I$(LINUX_SRC)/drivers/char
DEF_FLAGS= -D__KERNEL__ -DLINUX \
-DCONFIG_PCI -DCONFIG_SERIAL_MULTIPORT \
-DEXPORT_SYMTAB
I386_FLAGS= -march=i686 -O2 -Wall
SERIAL_FLAGS= -DSERIAL_NAME=\"$(SERIAL_NAME)\" \
-DCALLOUT_NAME=\"$(CALLOUT_NAME)\" \
-DADV_TTY_MAJOR=$(ADV_TTY_MAJOR) \
-DADV_TTY_CUMAJOR=$(ADV_TTY_CUMAJOR)
CFLAGS= $(ARCH_FLAGS) $(INCL_FLAGS) $(DEF_FLAGS) $(SERIAL_FLAGS) -DMODULE
CC= gcc
default: $(ADVMOD).o
$(ADVMOD).o: serial.c
$(CC) $(CFLAGS) -c serial.c -o $(ADVMOD).o
install: default
$(shell if grep $(ADVMOD) /proc/modules > /dev/null ; then \
rmmod $(ADVMOD) ; fi)
@insmod $(ADVMOD).o
node: default install
@echo "Creating serial device nodes $(SERIAL_NAME) ..."
@echo "The Result is $(RESULT)"
@../advmknod $(SERIAL_NAME) \
$$(awk '$$2=="$(SERIAL_FOLDER)" {print $$1}' /proc/devices) $(MAX_TTY)
@echo "Creating callout device nodes $(CALLOUT_NAME) ..."
@../advmknod $(CALLOUT_NAME) \
$$(awk '$$2=="$(CALLOUT_FOLDER)" {print $$1}' /proc/devices) $(MAX_TTY)
@echo "Done"
uninstall:
$(shell if grep $(ADVMOD) /proc/modules > /dev/null ; then \
rmmod $(ADVMOD) ; fi)
test:
@cd ../getconfig; make; ./getconfig $(TEST_NAME) $(MAX_TTY)
clean:
@rm -f $(ADVMOD).o
@rm -f *~
@cd ../getconfig; make clean

File diff suppressed because it is too large Load Diff

3178
2.6/8250.c

File diff suppressed because it is too large Load Diff

View File

@ -1,122 +0,0 @@
/*
* linux/drivers/char/8250.h
*
* Driver for 8250/16550-type serial ports
*
* Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
*
* Copyright (C) 2001 Russell King.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* $Id: 8250.h,v 1.8 2002/07/21 21:32:30 rmk Exp $
*/
//lipeng add at 2006/06/08
#include <linux/version.h>
#ifndef KERNEL_VERSION
#define KERNEL_VERSION(a,b,c) ((a)*65536+(b)*256+(c))
#endif
//lipeng add end
//lipeng modify at 2007/09/07
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
#include <linux/config.h>
#endif
//lipeng modify end
//jinxin added to support DMA
#include <linux/pci.h>
#define TX_BUF_TOT_LEN 128
#define RX_BUF_TOT_LEN 128
#ifndef MIN
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
//DMA registers
#define DMAADL (0x100 + 0x00) //DMA Address Low
#define DMAADH (0x100 + 0x04) //DMA Address High
#define DMATL (0x100 + 0x08) //DMA Transfer Length
#define DMASTA (0x100 + 0x0c) //DMA Status
//DMA Status
#define DMAREAD (1UL << 31)
#define DMAACT (1UL << 0)
#define DMAERR (1UL << 1)
#define DMADONE (1UL << 2)
//jinxin added to support dtrdsr flow control
#ifndef CDTRDSR
#define CDTRDSR 004000000000 /* DTR/DSR flow control */
#endif
//jinxin added end
void adv_serial8250_get_irq_map(unsigned int *map);
void adv_serial8250_suspend_port(int line);
void adv_serial8250_resume_port(int line);
struct uart_8250_port {
struct uart_port port;
struct timer_list timer; /* "no irq" timer */
struct list_head list; /* ports on this IRQ */
unsigned int capabilities; /* port capabilities */
unsigned short rev;
unsigned char acr;
unsigned char ier;
unsigned char lcr;
unsigned char mcr;
unsigned char mcr_mask; /* mask of user bits */
unsigned char mcr_force; /* mask of forced bits */
unsigned char lsr_break_flag;
//jinxin added to support DMA
dma_addr_t rx_ring_dma;
dma_addr_t tx_ring_dma;
unsigned char *rx_ring;
unsigned char *tx_ring;
/*
* We provide a per-port pm hook.
*/
void (*pm)(struct uart_port *port,
unsigned int state, unsigned int old);
};
struct old_serial_port {
unsigned int uart;
unsigned int baud_base;
unsigned int port;
unsigned int irq;
unsigned int flags;
unsigned char hub6;
unsigned char io_type;
unsigned char *iomem_base;
unsigned short iomem_reg_shift;
};
#undef SERIAL_DEBUG_PCI
#if defined(__i386__) && (defined(CONFIG_M386) || defined(CONFIG_M486))
#define SERIAL_INLINE
#endif
#ifdef SERIAL_INLINE
#define _INLINE_ inline
#else
#define _INLINE_
#endif
#define PROBE_RSA (1 << 0)
#define PROBE_ANY (~0)
#define HIGH_BITS_OFFSET ((sizeof(long)-sizeof(int))*8)
#ifdef CONFIG_SERIAL_8250_SHARE_IRQ
#define SERIAL8250_SHARE_IRQS 1
#else
#define SERIAL8250_SHARE_IRQS 0
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,74 +0,0 @@
#
# Makefile for the kernel serial device drivers.
#
# Advantech eAutomation Division
#
UNAME := $(shell uname -r)
PWD := $(shell pwd)
ADVMOD := adv950
SERIAL_NAME= ttyAP
MAX_TTY= 64
ADV_TTY_MAJOR= 30
SERIAL_FLAGS= -DSERIAL_NAME=\"$(SERIAL_NAME)\" \
-DADV_TTY_MAJOR=$(ADV_TTY_MAJOR) \
-DADV_TTY_CUMAJOR=$(ADV_TTY_CUMAJOR)
ifeq "$(UNAME)""2.6.15-26-386"
SERIAL_FLAGS:= $(SERIAL_FLAGS) -DUBUNTU_2_6_15=1
else
ifeq "$(UNAME)""2.6.9-34.EL"
SERIAL_FLAGS:= $(SERIAL_FLAGS) -DRHE4SMP=0
else
ifeq "$(UNAME)""2.6.9-34.ELsmp"
SERIAL_FLAGS:= $(SERIAL_FLAGS) -DRHE4SMP=1
else
SERIAL_FLAGS:= $(SERIAL_FLAGS) -DUBUNTU_2_6_15=0
endif
endif
endif
ifneq ($(KERNELRELEASE),)
EXTRA_CFLAGS = $(SERIAL_FLAGS)
obj-m := adv950.o
adv950-objs := 8250.o 8250_pci.o serial_core.o
else
KDIR := /lib/modules/$(shell uname -r)/build/
PWD := $(shell pwd)
all:
$(MAKE) -w -C $(KDIR) SUBDIRS=$(PWD) modules
endif
install:
$(shell if grep $(ADVMOD) /proc/modules > /dev/null ; then \
rmmod $(ADVMOD) ; fi)
@insmod $(ADVMOD).ko
node: default install
@echo "Creating serial device nodes $(SERIAL_NAME) ..."
@chmod 777 ../advmknod
@../advmknod $(SERIAL_NAME) \
$$(awk '$$2=="$(SERIAL_NAME)" {print $$1}' /proc/devices) $(MAX_TTY)
@echo "Done"
uninstall:
$(shell if grep $(ADVMOD) /proc/modules > /dev/null ; then \
rmmod $(ADVMOD) ; fi)
test:
@cd ../getconfig; make; ./getconfig $(SERIAL_NAME) $(MAX_TTY)
clean:
@rm -f *.o
@rm -f *.ko
@rm -f *.mod.c modules.order Module.symvers Module.markers
@rm -f .*.cmd
@rm -rf .tmp_versions
@rm -rf *~
@cd ../getconfig; make clean

File diff suppressed because it is too large Load Diff