Commit b037a952 authored by Piotr Klasa's avatar Piotr Klasa

driver: added driver for simple wb uart

Driver for the simple wb UART. It supports only physical UART.
Signed-off-by: 's avatarPiotr Klasa <piotr.klasa@cern.ch>
parent 3c636a53
......@@ -5,6 +5,7 @@
DIRS := i2c-ocores
DIRS += spi-ocores
DIRS += htvic
DIRS += wb_uart
.PHONY: all clean modules install modules_install gtags
......
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileCopyrightText: 2019 CERN
.PHONY: all clean modules install modules_install
DIR := drivers/
all: modules
install: modules_install
clean modules modules_install cppcheck flawfinder:
@$(MAKE) -C $(DIR) $@
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Copyright (C) 2024 CERN
ccflags-y += -DGIT_VERSION=\"$(GIT_VERSION)\"
ccflags-y += -Wall -Werror
ccflags-y += -I$(src)/../include
obj-m := wb_uart.o
wb-uart-objs := wb_uart.o
# priority to our local headers (avoid conflict with the version in kernel)
LINUXINCLUDE := -I$(src)/../include $(LINUXINCLUDE)
LINUXINCLUDE := -I$(src)/../include/linux $(LINUXINCLUDE)
\ No newline at end of file
# SPDX-FileCopyrightText: 2024 CERN (home.cern)
#
# SPDX-License-Identifier: GPL-2.0-or-later
-include Makefile.specific
# include parent_common.mk for buildsystem's defines
#use absolute path for REPO_PARENT
TOPDIR ?= $(shell /bin/pwd)/../../..
REPO_PARENT ?= $(TOPDIR)/..
-include $(REPO_PARENT)/parent_common.mk
CPPCHECK ?= cppcheck
FLAWFINDER ?= flawfinder
CURDIR := $(shell /bin/pwd)
KVERSION ?= $(shell uname -r)
KERNELSRC ?= /lib/modules/$(KVERSION)/build
WBGEN2 ?= wbgen2
GIT_VERSION := $(shell git describe --always --dirty --long --tags)
all: modules
install: modules_install
modules modules_install: hw_headers
hw_headers: wb_uart.h
wb_uart.h: $(TOPDIR)/modules/wishbone/wb_uart/simple_uart_wb.wb
$(WBGEN2) -s defines -C $@ $<
clean help modules:
$(MAKE) -C $(KERNELSRC) M=$(shell pwd) GIT_VERSION=$(GIT_VERSION) $@
modules_install: modules
$(MAKE) -C $(KERNELSRC) M=$(shell /bin/pwd) $@
cppcheck:
$(CPPCHECK) -q -I. --enable=all *.c *.h
flawfinder:
$(FLAWFINDER) -SQDC .
.PHONY: all modules clean help install modules_install cppcheck flawfinder hw_headers
\ No newline at end of file
This diff is collapsed.
/* SPDX-License-Identifier: GPL-2.0-or-later
* SPDX-FileCopyrightText: 2024 CERN (home.cern)
*/
#ifndef __WB_UART_PDATA_H__
#define __WB_UART_PDATA_H__
#include <linux/bitops.h>
#define WB_UART_NAME_MAX_LEN 32
#define WB_UART_BIG_ENDIAN BIT(0)
struct wb_uart_platform_data {
unsigned long flags;
char wb_uart_name[WB_UART_NAME_MAX_LEN];
};
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment