Commit ba3d7ddf authored by Christian Gromm's avatar Christian Gromm Committed by Greg Kroah-Hartman
Browse files

Staging: most: add MOST driver's hdm-dim2 module



This patch adds the hdm-dim2 module of the MOST driver to the kernel's
driver staging area. This module is part of the MOST driver and handles
the MediaLB interface of the MOST network interface controller.

This patch is needed in order to use the MediaLB peripheral interface of
the network interface controller.

Signed-off-by: default avatarChristian Gromm <christian.gromm@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3d31c0cb
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -21,4 +21,6 @@ source "drivers/staging/most/aim-sound/Kconfig"

source "drivers/staging/most/aim-v4l2/Kconfig"

source "drivers/staging/most/hdm-dim2/Kconfig"

endif
+1 −0
Original line number Diff line number Diff line
@@ -3,3 +3,4 @@ obj-$(CONFIG_AIM_CDEV) += aim-cdev/
obj-$(CONFIG_AIM_NETWORK)	+= aim-network/
obj-$(CONFIG_AIM_SOUND)	+= aim-sound/
obj-$(CONFIG_AIM_V4L2)	+= aim-v4l2/
obj-$(CONFIG_HDM_DIM2)	+= hdm-dim2/
+15 −0
Original line number Diff line number Diff line
#
# MediaLB configuration
#

config HDM_DIM2
	tristate "DIM2 HDM"

	---help---
	  Say Y here if you want to connect via MediaLB to network tranceiver.
	  This device driver is platform dependent and needs an addtional
	  platform driver to be installed. For more information contact
	  maintainer of this driver.

	  To compile this driver as a module, choose M here: the
	  module will be called hdm_dim2.
+5 −0
Original line number Diff line number Diff line
obj-$(CONFIG_HDM_DIM2) += hdm_dim2.o

hdm_dim2-objs := dim2_hdm.o dim2_hal.o dim2_sysfs.o
ccflags-y += -Idrivers/staging/most/mostcore/
ccflags-y += -Idrivers/staging/most/aim-network/
+67 −0
Original line number Diff line number Diff line
/*
 * dim2_errors.h - Definitions of errors for DIM2 HAL API
 * (MediaLB, Device Interface Macro IP, OS62420)
 *
 * Copyright (C) 2015, Microchip Technology Germany II GmbH & Co. KG
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * This file is licensed under GPLv2.
 */

#ifndef _MOST_DIM_ERRORS_H
#define _MOST_DIM_ERRORS_H

#ifdef __cplusplus
extern "C" {
#endif


/**
 * MOST DIM errors.
 */
enum dim_errors_t {
	/** Not an error */
	DIM_NO_ERROR = 0,

	/** Bad base address for DIM2 IP */
	DIM_INIT_ERR_DIM_ADDR = 0x10,

	/**< Bad MediaLB clock */
	DIM_INIT_ERR_MLB_CLOCK,

	/** Bad channel address */
	DIM_INIT_ERR_CHANNEL_ADDRESS,

	/** Out of DBR memory */
	DIM_INIT_ERR_OUT_OF_MEMORY,

	/** DIM API is called while DIM is not initialized successfully */
	DIM_ERR_DRIVER_NOT_INITIALIZED = 0x20,

	/**
	 * Configuration does not respect hardware limitations
	 * for isochronous or synchronous channels
	 */
	DIM_ERR_BAD_CONFIG,

	/**
	 * Buffer size does not respect hardware limitations
	 * for isochronous or synchronous channels
	 */
	DIM_ERR_BAD_BUFFER_SIZE,

	DIM_ERR_UNDERFLOW,

	DIM_ERR_OVERFLOW,
};


#ifdef __cplusplus
}
#endif

#endif /* _MOST_DIM_ERRORS_H */
Loading