Permalink
Browse files

Revert "Move to version 5 of VCHIQ. Note: this requires a correspondi…

…ng start.elf and /opt/vc/lib update"

This reverts commit eb0c560.
  • Loading branch information...
1 parent 91f1cdc commit 10182a3bc434b27740f81c2b836a1af943060241 @popcornmix popcornmix committed Oct 15, 2012
Showing with 15,144 additions and 7,481 deletions.
  1. +3 −6 drivers/misc/vc04_services/Kconfig
  2. +10 −90 drivers/misc/vc04_services/Makefile
  3. +12 −16 drivers/misc/vc04_services/interface/vchi/connections/connection.h
  4. +9 −12 drivers/misc/vc04_services/interface/vchi/message_drivers/message.h
  5. +18 −26 drivers/misc/vc04_services/interface/vchi/vchi.h
  6. +6 −1 drivers/misc/vc04_services/interface/vchi/vchi_cfg.h
  7. +1 −1 drivers/misc/vc04_services/interface/vchi/vchi_cfg_internal.h
  8. +5 −1 drivers/misc/vc04_services/interface/vchi/vchi_common.h
  9. +1 −1 drivers/misc/vc04_services/interface/vchi/vchi_mh.h
  10. +1 −0 drivers/misc/vc04_services/interface/vchiq_arm/vchiq.h
  11. +136 −142 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
  12. +1,595 −2,423 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.c
  13. +37 −120 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_arm.h
  14. +4 −6 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_cfg.h
  15. +50 −49 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.c
  16. +3 −3 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_connected.h
  17. +2,337 −3,380 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.c
  18. +250 −417 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_core.h
  19. +88 −98 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_if.h
  20. +41 −50 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_ioctl.h
  21. +174 −118 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c
  22. +1,628 −0 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_lib.c
  23. +11 −18 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_memdrv.h
  24. +636 −422 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_shim.c
  25. +43 −51 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.c
  26. +7 −27 drivers/misc/vc04_services/interface/vchiq_arm/vchiq_util.h
  27. +681 −0 drivers/misc/vc04_services/interface/vcos/generic/vcos_cmd.c
  28. +87 −0 drivers/misc/vc04_services/interface/vcos/generic/vcos_common.h
  29. +271 −0 drivers/misc/vc04_services/interface/vcos/generic/vcos_generic_blockpool.h
  30. +311 −0 drivers/misc/vc04_services/interface/vcos/generic/vcos_generic_event_flags.c
  31. +118 −0 drivers/misc/vc04_services/interface/vcos/generic/vcos_generic_event_flags.h
  32. +92 −0 drivers/misc/vc04_services/interface/vcos/generic/vcos_generic_named_sem.h
  33. +86 −0 drivers/misc/vc04_services/interface/vcos/generic/vcos_generic_quickslow_mutex.h
  34. +86 −0 drivers/misc/vc04_services/interface/vcos/generic/vcos_generic_reentrant_mtx.h
  35. +155 −0 drivers/misc/vc04_services/interface/vcos/generic/vcos_generic_tls.h
  36. +214 −0 drivers/misc/vc04_services/interface/vcos/generic/vcos_joinable_thread_from_plain.h
  37. +59 −0 drivers/misc/vc04_services/interface/vcos/generic/vcos_latch_from_sem.h
  38. +560 −0 drivers/misc/vc04_services/interface/vcos/generic/vcos_logcat.c
  39. +84 −0 drivers/misc/vc04_services/interface/vcos/generic/vcos_mem_from_malloc.c
  40. +65 −0 drivers/misc/vc04_services/interface/vcos/generic/vcos_mem_from_malloc.h
  41. +79 −0 drivers/misc/vc04_services/interface/vcos/generic/vcos_mutexes_are_reentrant.h
  42. +46 −0 drivers/misc/vc04_services/interface/vcos/generic/vcos_thread_reaper.h
  43. +31 −0 drivers/misc/vc04_services/interface/vcos/linuxkernel/stdint.h
  44. +627 −0 drivers/misc/vc04_services/interface/vcos/linuxkernel/vcos_linuxkernel.c
  45. +332 −0 drivers/misc/vc04_services/interface/vcos/linuxkernel/vcos_linuxkernel_cfg.c
  46. +111 −0 drivers/misc/vc04_services/interface/vcos/linuxkernel/vcos_linuxkernel_misc.c
  47. +64 −0 drivers/misc/vc04_services/interface/vcos/linuxkernel/vcos_mod_init.c
  48. +507 −0 drivers/misc/vc04_services/interface/vcos/linuxkernel/vcos_platform.h
  49. +59 −0 drivers/misc/vc04_services/interface/vcos/linuxkernel/vcos_platform_types.h
  50. +129 −0 drivers/misc/vc04_services/interface/vcos/linuxkernel/vcos_thread_map.c
  51. +39 −0 drivers/misc/vc04_services/interface/vcos/linuxkernel/vcos_thread_map.h
  52. +212 −0 drivers/misc/vc04_services/interface/vcos/vcos.h
  53. +280 −0 drivers/misc/vc04_services/interface/vcos/vcos_assert.h
  54. +83 −0 drivers/misc/vc04_services/interface/vcos/vcos_atomic_flags.h
  55. +23 −0 drivers/misc/vc04_services/interface/vcos/vcos_build_info.h
  56. +113 −0 drivers/misc/vc04_services/interface/vcos/vcos_cfg.h
  57. +98 −0 drivers/misc/vc04_services/interface/vcos/vcos_cmd.h
  58. +40 −0 drivers/misc/vc04_services/interface/vcos/vcos_ctype.h
  59. +80 −0 drivers/misc/vc04_services/interface/vcos/vcos_dlfcn.h
  60. +108 −0 drivers/misc/vc04_services/interface/vcos/vcos_event.h
  61. +109 −0 drivers/misc/vc04_services/interface/vcos/vcos_event_flags.h
  62. +54 −0 drivers/misc/vc04_services/interface/vcos/vcos_init.h
  63. +290 −0 drivers/misc/vc04_services/interface/vcos/vcos_logging.h
  64. +118 −0 drivers/misc/vc04_services/interface/vcos/vcos_lowlevel_thread.h
  65. +92 −0 drivers/misc/vc04_services/interface/vcos/vcos_mem.h
  66. +168 −0 drivers/misc/vc04_services/interface/vcos/vcos_msgqueue.h
  67. +103 −0 drivers/misc/vc04_services/interface/vcos/vcos_mutex.h
  68. +53 −0 drivers/misc/vc04_services/interface/vcos/vcos_once.h
  69. +126 −0 drivers/misc/vc04_services/interface/vcos/vcos_semaphore.h
  70. +34 −0 drivers/misc/vc04_services/interface/vcos/vcos_stdbool.h
  71. +203 −0 drivers/misc/vc04_services/interface/vcos/vcos_stdint.h
  72. +84 −0 drivers/misc/vc04_services/interface/vcos/vcos_string.h
  73. +270 −0 drivers/misc/vc04_services/interface/vcos/vcos_thread.h
  74. +87 −0 drivers/misc/vc04_services/interface/vcos/vcos_thread_attr.h
  75. +106 −0 drivers/misc/vc04_services/interface/vcos/vcos_timer.h
  76. +211 −0 drivers/misc/vc04_services/interface/vcos/vcos_types.h
  77. +0 −1 sound/arm/bcm2835-vchiq.c
  78. +0 −2 sound/arm/vc_vchi_audioserv_defs.h
@@ -1,10 +1,7 @@
config BCM2708_VCHIQ
tristate "Videocore VCHIQ"
depends on MACH_BCM2708
- default CONFIG_BCM_VC_SERVICES
- help
- Kernel to VideoCore communication interface for the
- BCM2708 family of products.
- Defaults to Y when the Broadcom Videocore services
- are included in the build, N otherwise.
+ default y
+ help
+ Helper for communication for VideoCore.
@@ -1,101 +1,21 @@
-ifeq ($(CONFIG_MACH_BCM2708),y)
-
-##############################################################################
-#
-# This section is for building the RaspberryPi model
-#
-##############################################################################
-
obj-$(CONFIG_BCM2708_VCHIQ) += vchiq.o
vchiq-objs := \
interface/vchiq_arm/vchiq_core.o \
+ interface/vchiq_arm/vchiq_shim.o \
+ interface/vchiq_arm/vchiq_util.o \
interface/vchiq_arm/vchiq_arm.o \
interface/vchiq_arm/vchiq_kern_lib.o \
interface/vchiq_arm/vchiq_2835_arm.o \
- interface/vchiq_arm/vchiq_proc.o \
- interface/vchiq_arm/vchiq_shim.o \
- interface/vchiq_arm/vchiq_util.o \
- interface/vchiq_arm/vchiq_connected.o \
-
-EXTRA_CFLAGS += -DVCOS_VERIFY_BKPTS=1 -Idrivers/misc/vc04_services -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000
-
-endif
-
-ifeq ($(CONFIG_ARCH_KONA),y)
-
-##############################################################################
-#
-# This section is for building the Capri/Island model
-#
-##############################################################################
-
-# Remove the quotes from the platform config name
-VCHIQ_PLATFORM_CONFIG = $(patsubst "%",%,$(CONFIG_VCHIQ_PLATFORM_CFG_NAME))
-
-$(info VCHIQ_PLATFORM_CONFIG = $(VCHIQ_PLATFORM_CONFIG))
-include $(srctree)/drivers/misc/vc04_services/interface/vchiq_arm/platform-cfg/$(VCHIQ_PLATFORM_CONFIG).mk
-
-$(info Building for MAP build system)
-$(info CONFIG_ARCH_KONA = $(CONFIG_ARCH_KONA))
-
-EXTRA_CFLAGS += -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -Wno-declaration-after-statement -Wno-parentheses
-
-EXTRA_CFLAGS += -I"drivers/misc/vc04_services/"
-EXTRA_CFLAGS += -I"drivers/misc/vc04_services/interface/vchiq_arm"
-EXTRA_CFLAGS += -I"drivers/misc/vc04_services/interface/debug_sym"
-EXTRA_CFLAGS += -I"include/linux/broadcom"
-
-EXTRA_CFLAGS += -Werror
-
-VCHIQ_HOST_BUS_ALIGNMENT = 3
-
-EXTRA_CFLAGS += -DOS_ASSERT_FAILURE
-EXTRA_CFLAGS += -D__STDC_VERSION=199901L
-EXTRA_CFLAGS += -D__STDC_VERSION__=199901L
-EXTRA_CFLAGS += -D__VCCOREVER__=0
-EXTRA_CFLAGS += -D__linux__
-EXTRA_CFLAGS += -D__KERNEL__
-EXTRA_CFLAGS += -DVCHIQ_HOST_BUS_ALIGNMENT=$(VCHIQ_HOST_BUS_ALIGNMENT)
-EXTRA_CFLAGS += -DVCHIQ_SLOT_PADDING=16
-EXTRA_CFLAGS += -DVCHIQ_ARM_SIDE
-EXTRA_CFLAGS += -DUSE_VCHIQ_ARM
-ifeq ($(VCHIQ_SM_ALLOC),vcddr)
-EXTRA_CFLAGS += -DVCHIQ_SM_ALLOC_VCDDR
-endif
-
-obj-$(CONFIG_KONA_VCHIQ) += vc-vchiq.o
-vc-vchiq-objs := \
- interface/vchiq_arm/vchiq_arm.o \
- interface/vchiq_arm/vchiq_connected.o \
- interface/vchiq_arm/vchiq_core.o \
- interface/vchiq_arm/vchiq_kern_lib.o \
- interface/vchiq_arm/vchiq_shim.o \
- interface/vchiq_arm/vchiq_util.o \
- interface/vchiq_arm/vchiq_kona_arm.o \
- interface/vchiq_arm/vchiq_$(VCHIQ_PLATFORM)_arm.o \
- interface/vchiq_arm/vchiq_version.o \
- interface/vchiq_arm/vchiq_proc.o
-ifeq ($(VCHIQ_SM_ALLOC),vcddr)
-vc-vchiq-objs += \
- interface/debug_sym/debug_sym.o
-endif
-
-obj-$(CONFIG_KONA_VCHIQ_MEMDRV) += vc-vchiq-memdrv-kona.o
-vc-vchiq-memdrv-kona-objs := \
- interface/vchiq_arm/vchiq_memdrv_kona.o
-
-genversion = drivers/misc/vc04_services/interface/vchiq_arm/vchiq_genversion
+ interface/vcos/linuxkernel/vcos_linuxkernel.o \
+ interface/vcos/linuxkernel/vcos_thread_map.o \
+ interface/vcos/linuxkernel/vcos_linuxkernel_cfg.o \
+ interface/vcos/generic/vcos_generic_event_flags.o \
+ interface/vcos/generic/vcos_logcat.o \
+ interface/vcos/generic/vcos_mem_from_malloc.o \
+ interface/vcos/generic/vcos_cmd.o
-GENVERSION_SRC_ROOT_DIR = .
-ifeq ($(CONFIG_ANDROID),y)
-GENVERSION_SRC_ROOT_DIR = $(srctree)
-endif
+EXTRA_CFLAGS += -DVCOS_VERIFY_BKPTS=1 -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -Idrivers/misc/vc04_services -Idrivers/misc/vc04_services/interface/vcos/linuxkernel
-$(obj)/interface/vchiq_arm/vchiq_version.c: $(genversion) FORCE
- echo "(new) Generating $@ ..."
- perl $(srctree)/$(genversion) vchiq $(GENVERSION_SRC_ROOT_DIR) > $@
-clean-files := vchiq_version.c
-endif
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2012 Broadcom. All rights reserved.
+ * Copyright (c) 2010-2011 Broadcom Corporation. All rights reserved.
*
* 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
@@ -19,10 +19,6 @@
#ifndef CONNECTION_H_
#define CONNECTION_H_
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <linux/semaphore.h>
-
#include "interface/vchi/vchi_cfg_internal.h"
#include "interface/vchi/vchi_common.h"
#include "interface/vchi/message_drivers/message.h"
@@ -54,15 +50,15 @@ typedef int32_t (*VCHI_CONNECTION_CRC_CONTROL_T)( VCHI_CONNECTION_STATE_T *state
// Routine to create a service
typedef int32_t (*VCHI_CONNECTION_SERVICE_CONNECT_T)( VCHI_CONNECTION_STATE_T *state_handle,
- int32_t service_id,
+ vcos_fourcc_t service_id,
uint32_t rx_fifo_size,
uint32_t tx_fifo_size,
int server,
VCHI_CALLBACK_T callback,
void *callback_param,
- int32_t want_crc,
- int32_t want_unaligned_bulk_rx,
- int32_t want_unaligned_bulk_tx,
+ vcos_bool_t want_crc,
+ vcos_bool_t want_unaligned_bulk_rx,
+ vcos_bool_t want_unaligned_bulk_tx,
VCHI_CONNECTION_SERVICE_HANDLE_T *service_handle );
// Routine to close a service
@@ -120,7 +116,7 @@ typedef int32_t (*VCHI_CONNECTION_HELD_MSG_INFO_T)( VCHI_CONNECTION_SERVICE_HAND
uint32_t *rx_timestamp );
// Routine to check whether the iterator has a next message
-typedef int32_t (*VCHI_CONNECTION_MSG_ITER_HAS_NEXT_T)( VCHI_CONNECTION_SERVICE_HANDLE_T service,
+typedef vcos_bool_t (*VCHI_CONNECTION_MSG_ITER_HAS_NEXT_T)( VCHI_CONNECTION_SERVICE_HANDLE_T service,
const VCHI_MSG_ITER_T *iter );
// Routine to advance the iterator
@@ -153,7 +149,7 @@ typedef int32_t (*VCHI_CONNECTION_BULK_QUEUE_RECEIVE_T)( VCHI_CONNECTION_SERVICE
void *bulk_handle );
// Routine to report if a server is available
-typedef int32_t (*VCHI_CONNECTION_SERVER_PRESENT)( VCHI_CONNECTION_STATE_T *state, int32_t service_id, int32_t peer_flags );
+typedef int32_t (*VCHI_CONNECTION_SERVER_PRESENT)( VCHI_CONNECTION_STATE_T *state, vcos_fourcc_t service_id, int32_t peer_flags );
// Routine to report the number of RX slots available
typedef int (*VCHI_CONNECTION_RX_SLOTS_AVAILABLE)( const VCHI_CONNECTION_STATE_T *state );
@@ -163,18 +159,18 @@ typedef uint32_t (*VCHI_CONNECTION_RX_SLOT_SIZE)( const VCHI_CONNECTION_STATE_T
// Callback to indicate that the other side has added a buffer to the rx bulk DMA FIFO
typedef void (*VCHI_CONNECTION_RX_BULK_BUFFER_ADDED)(VCHI_CONNECTION_STATE_T *state,
- int32_t service,
+ vcos_fourcc_t service,
uint32_t length,
MESSAGE_TX_CHANNEL_T channel,
uint32_t channel_params,
uint32_t data_length,
uint32_t data_offset);
// Callback to inform a service that a Xon or Xoff message has been received
-typedef void (*VCHI_CONNECTION_FLOW_CONTROL)(VCHI_CONNECTION_STATE_T *state, int32_t service_id, int32_t xoff);
+typedef void (*VCHI_CONNECTION_FLOW_CONTROL)(VCHI_CONNECTION_STATE_T *state, vcos_fourcc_t service_id, int32_t xoff);
// Callback to inform a service that a server available reply message has been received
-typedef void (*VCHI_CONNECTION_SERVER_AVAILABLE_REPLY)(VCHI_CONNECTION_STATE_T *state, int32_t service_id, uint32_t flags);
+typedef void (*VCHI_CONNECTION_SERVER_AVAILABLE_REPLY)(VCHI_CONNECTION_STATE_T *state, vcos_fourcc_t service_id, uint32_t flags);
// Callback to indicate that bulk auxiliary messages have arrived
typedef void (*VCHI_CONNECTION_BULK_AUX_RECEIVED)(VCHI_CONNECTION_STATE_T *state);
@@ -189,7 +185,7 @@ typedef void (*VCHI_CONNECTION_INFO)(VCHI_CONNECTION_STATE_T *state, uint32_t pr
typedef void (*VCHI_CONNECTION_DISCONNECT)(VCHI_CONNECTION_STATE_T *state, uint32_t flags);
// Callback to inform of a power control request
-typedef void (*VCHI_CONNECTION_POWER_CONTROL)(VCHI_CONNECTION_STATE_T *state, MESSAGE_TX_CHANNEL_T channel, int32_t enable);
+typedef void (*VCHI_CONNECTION_POWER_CONTROL)(VCHI_CONNECTION_STATE_T *state, MESSAGE_TX_CHANNEL_T channel, vcos_bool_t enable);
// allocate memory suitably aligned for this connection
typedef void * (*VCHI_BUFFER_ALLOCATE)(VCHI_CONNECTION_SERVICE_HANDLE_T service_handle, uint32_t * length);
@@ -303,7 +299,7 @@ struct vchi_connection_t {
const VCHI_CONNECTION_API_T *api;
VCHI_CONNECTION_STATE_T *state;
#ifdef VCHI_COARSE_LOCKING
- struct semaphore sem;
+ VCOS_SEMAPHORE_T sem;
#endif
};
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2012 Broadcom. All rights reserved.
+ * Copyright (c) 2010-2011 Broadcom Corporation. All rights reserved.
*
* 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
@@ -19,11 +19,8 @@
#ifndef _VCHI_MESSAGE_H_
#define _VCHI_MESSAGE_H_
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <linux/semaphore.h>
-
#include "interface/vchi/vchi_cfg_internal.h"
+#include "interface/vcos/vcos.h"
#include "interface/vchi/vchi_common.h"
@@ -66,7 +63,7 @@ typedef struct rx_msg_slot_info {
struct rx_msg_slot_info *next;
//struct slot_info *prev;
#if !defined VCHI_COARSE_LOCKING
- struct semaphore sem;
+ VCOS_SEMAPHORE_T sem;
#endif
uint8_t *addr; // base address of slot
@@ -87,7 +84,7 @@ typedef struct rx_msg_slot_info {
typedef struct rx_bulk_slotinfo_t {
struct rx_bulk_slotinfo_t *next;
- struct semaphore *blocking;
+ VCOS_SEMAPHORE_T *blocking;
// needed by DMA
void *addr;
@@ -130,7 +127,7 @@ typedef struct {
uint16_t slot_delta; // whether this message indicated slot delta
uint32_t len; // length of message
RX_MSG_SLOTINFO_T *slot; // slot this message is in
- int32_t service; // service id this message is destined for
+ vcos_fourcc_t service; // service id this message is destined for
uint32_t tx_timestamp; // timestamp from the header
uint32_t rx_timestamp; // timestamp when we parsed it
} message;
@@ -159,14 +156,14 @@ struct opaque_vchi_message_driver_t {
VCHI_MDRIVER_HANDLE_T *(*open)( VCHI_MESSAGE_DRIVER_OPEN_T *params, void *state );
int32_t (*suspending)( VCHI_MDRIVER_HANDLE_T *handle );
int32_t (*resumed)( VCHI_MDRIVER_HANDLE_T *handle );
- int32_t (*power_control)( VCHI_MDRIVER_HANDLE_T *handle, MESSAGE_TX_CHANNEL_T, int32_t enable );
+ int32_t (*power_control)( VCHI_MDRIVER_HANDLE_T *handle, MESSAGE_TX_CHANNEL_T, vcos_bool_t enable );
int32_t (*add_msg_rx_slot)( VCHI_MDRIVER_HANDLE_T *handle, RX_MSG_SLOTINFO_T *slot ); // rx message
int32_t (*add_bulk_rx)( VCHI_MDRIVER_HANDLE_T *handle, void *data, uint32_t len, RX_BULK_SLOTINFO_T *slot ); // rx data (bulk)
int32_t (*send)( VCHI_MDRIVER_HANDLE_T *handle, MESSAGE_TX_CHANNEL_T channel, const void *data, uint32_t len, VCHI_MSG_FLAGS_T flags, void *send_handle ); // tx (message & bulk)
void (*next_event)( VCHI_MDRIVER_HANDLE_T *handle, MESSAGE_EVENT_T *event ); // get the next event from message_driver
int32_t (*enable)( VCHI_MDRIVER_HANDLE_T *handle );
- int32_t (*form_message)( VCHI_MDRIVER_HANDLE_T *handle, int32_t service_id, VCHI_MSG_VECTOR_T *vector, uint32_t count, void
- *address, uint32_t length_avail, uint32_t max_total_length, int32_t pad_to_fill, int32_t allow_partial );
+ int32_t (*form_message)( VCHI_MDRIVER_HANDLE_T *handle, vcos_fourcc_t service_id, VCHI_MSG_VECTOR_T *vector, uint32_t count, void
+ *address, uint32_t length_avail, uint32_t max_total_length, vcos_bool_t pad_to_fill, vcos_bool_t allow_partial );
int32_t (*update_message)( VCHI_MDRIVER_HANDLE_T *handle, void *dest, int16_t *slot_count );
int32_t (*buffer_aligned)( VCHI_MDRIVER_HANDLE_T *handle, int tx, int uncached, const void *address, const uint32_t length );
@@ -175,7 +172,7 @@ struct opaque_vchi_message_driver_t {
int (*rx_slot_size)( VCHI_MDRIVER_HANDLE_T *handle, int msg_size );
int (*tx_slot_size)( VCHI_MDRIVER_HANDLE_T *handle, int msg_size );
- int32_t (*tx_supports_terminate)( const VCHI_MDRIVER_HANDLE_T *handle, MESSAGE_TX_CHANNEL_T channel );
+ vcos_bool_t (*tx_supports_terminate)( const VCHI_MDRIVER_HANDLE_T *handle, MESSAGE_TX_CHANNEL_T channel );
uint32_t (*tx_bulk_chunk_size)( const VCHI_MDRIVER_HANDLE_T *handle, MESSAGE_TX_CHANNEL_T channel );
int (*tx_alignment)( const VCHI_MDRIVER_HANDLE_T *handle, MESSAGE_TX_CHANNEL_T channel );
int (*rx_alignment)( const VCHI_MDRIVER_HANDLE_T *handle, MESSAGE_RX_CHANNEL_T channel );
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2012 Broadcom. All rights reserved.
+ * Copyright (c) 2010-2011 Broadcom Corporation. All rights reserved.
*
* 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
@@ -16,9 +16,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+/*=============================================================================
+Contains the protypes for the vchi functions.
+=============================================================================*/
+
#ifndef VCHI_H_
#define VCHI_H_
+#include "interface/vcos/vcos.h"
#include "interface/vchi/vchi_cfg.h"
#include "interface/vchi/vchi_common.h"
#include "interface/vchi/connections/connection.h"
@@ -39,12 +44,6 @@
#define VCHI_BULK_ALIGNED(x) (((unsigned long)(x) & (VCHI_BULK_ALIGN-1)) == 0)
#endif
-struct vchi_version {
- uint32_t version;
- uint32_t version_min;
-};
-#define VCHI_VERSION(v_) { v_, v_ }
-#define VCHI_VERSION_EX(v_, m_) { v_, m_ }
typedef enum
{
@@ -89,8 +88,8 @@ typedef struct vchi_msg_vector_ex {
// Construct an entry in a msg vector for a message handle (h), starting at offset (o) of length (l)
#define VCHI_VEC_HANDLE(h,o,l) VCHI_VEC_HANDLE, { { (h), (o), (l) } }
-// Macros to manipulate 'FOURCC' values
-#define MAKE_FOURCC(x) ((int32_t)( (x[0] << 24) | (x[1] << 16) | (x[2] << 8) | x[3] ))
+// Macros to manipulate fourcc_t values
+#define MAKE_FOURCC(x) ((fourcc_t)( (x[0] << 24) | (x[1] << 16) | (x[2] << 8) | x[3] ))
#define FOURCC_TO_CHAR(x) (x >> 24) & 0xFF,(x >> 16) & 0xFF,(x >> 8) & 0xFF, x & 0xFF
@@ -109,22 +108,15 @@ typedef struct
// structure used to provide the information needed to open a server or a client
typedef struct {
- struct vchi_version version;
- int32_t service_id;
- VCHI_CONNECTION_T *connection;
- uint32_t rx_fifo_size;
- uint32_t tx_fifo_size;
- VCHI_CALLBACK_T callback;
- void *callback_param;
- /* client intends to receive bulk transfers of
- odd lengths or into unaligned buffers */
- int32_t want_unaligned_bulk_rx;
- /* client intends to transmit bulk transfers of
- odd lengths or out of unaligned buffers */
- int32_t want_unaligned_bulk_tx;
- /* client wants to check CRCs on (bulk) xfers.
- Only needs to be set at 1 end - will do both directions. */
- int32_t want_crc;
+ vcos_fourcc_t service_id;
+ VCHI_CONNECTION_T *connection;
+ uint32_t rx_fifo_size;
+ uint32_t tx_fifo_size;
+ VCHI_CALLBACK_T callback;
+ void *callback_param;
+ vcos_bool_t want_unaligned_bulk_rx; // client intends to receive bulk transfers of odd lengths or into unaligned buffers
+ vcos_bool_t want_unaligned_bulk_tx; // client intends to transmit bulk transfers of odd lengths or out of unaligned buffers
+ vcos_bool_t want_crc; // client wants to check CRCs on (bulk) transfers. Only needs to be set at 1 end - will do both directions.
} SERVICE_CREATION_T;
// Opaque handle for a VCHI instance
@@ -277,7 +269,7 @@ extern uint32_t vchi_held_msg_rx_timestamp( const VCHI_HELD_MSG_T *message );
extern int32_t vchi_held_msg_release( VCHI_HELD_MSG_T *message );
// Indicates whether the iterator has a next message.
-extern int32_t vchi_msg_iter_has_next( const VCHI_MSG_ITER_T *iter );
+extern vcos_bool_t vchi_msg_iter_has_next( const VCHI_MSG_ITER_T *iter );
// Return the pointer and length for the next message and advance the iterator.
extern int32_t vchi_msg_iter_next( VCHI_MSG_ITER_T *iter,
Oops, something went wrong.

0 comments on commit 10182a3

Please sign in to comment.