summaryrefslogtreecommitdiff
path: root/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-02-22 12:14:01 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-22 12:14:01 -0800
commitcaa59428971d5ad81d19512365c9ba580d83268c (patch)
treecd9615719bad9a97f02bb5bc1021396a1b484762 /drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
parentb2064617c74f301dab1448f1f9c8dbb3c8021058 (diff)
parent0a441275018b69deffd35bc22a84fd51c54d7d85 (diff)
Merge tag 'staging-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging/iio driver updates from Greg KH: "Here is the big staging and iio driver patchsets for 4.11-rc1. We almost broke even this time around, with only a few thousand lines added overall, as we removed the old and obsolete i4l code, but added some new drivers for the RPi platform, as well as adding some new IIO drivers. All of these have been in linux-next for a while with no reported issues" * tag 'staging-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (669 commits) Staging: vc04_services: Fix the "space prohibited" code style errors Staging: vc04_services: Fix the "wrong indent" code style errors staging: octeon: Use net_device_stats from struct net_device Staging: rtl8192u: ieee80211: ieee80211.h - style fix Staging: rtl8192u: ieee80211: ieee80211_tx.c - style fix Staging: rtl8192u: ieee80211: rtl819x_BAProc.c - style fix Staging: rtl8192u: ieee80211: ieee80211_module.c - style fix Staging: rtl8192u: ieee80211: rtl819x_TSProc.c - style fix Staging: rtl8192u: r8192U.h - style fix Staging: rtl8192u: r8192U_core.c - style fix Staging: rtl8192u: r819xU_cmdpkt.c - style fix staging: rtl8192u: blank lines aren't necessary before a close brace '}' staging: rtl8192u: Adding space after enum and struct definition staging: rtl8192u: Adding space after struct definition Staging: ks7010: Add required and preferred spaces around operators Staging: ks7010: ks*: Remove redundant blank lines Staging: ks7010: ks*: Add missing blank lines after declarations staging: visorbus, replace init_timer with setup_timer staging: vt6656: rxtx.c Removed multiple dereferencing staging: vt6656: Alignment match open parenthesis ...
Diffstat (limited to 'drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c')
-rw-r--r--drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c49
1 files changed, 26 insertions, 23 deletions
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
index 2b500d85cebc..e6241fb5cfa6 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
@@ -48,18 +48,21 @@
#define TOTAL_SLOTS (VCHIQ_SLOT_ZERO_SLOTS + 2 * 32)
#include "vchiq_arm.h"
-#include "vchiq_2835.h"
#include "vchiq_connected.h"
#include "vchiq_killable.h"
+#include "vchiq_pagelist.h"
#define MAX_FRAGMENTS (VCHIQ_NUM_CURRENT_BULKS * 2)
+#define VCHIQ_PLATFORM_FRAGMENTS_OFFSET_IDX 0
+#define VCHIQ_PLATFORM_FRAGMENTS_COUNT_IDX 1
+
#define BELL0 0x00
#define BELL2 0x08
typedef struct vchiq_2835_state_struct {
- int inited;
- VCHIQ_ARM_STATE_T arm_state;
+ int inited;
+ VCHIQ_ARM_STATE_T arm_state;
} VCHIQ_2835_ARM_STATE_T;
struct vchiq_pagelist_info {
@@ -192,31 +195,31 @@ int vchiq_platform_init(struct platform_device *pdev, VCHIQ_STATE_T *state)
vchiq_call_connected_callbacks();
- return 0;
+ return 0;
}
VCHIQ_STATUS_T
vchiq_platform_init_state(VCHIQ_STATE_T *state)
{
- VCHIQ_STATUS_T status = VCHIQ_SUCCESS;
- state->platform_state = kzalloc(sizeof(VCHIQ_2835_ARM_STATE_T), GFP_KERNEL);
- ((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->inited = 1;
- status = vchiq_arm_init_state(state, &((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->arm_state);
- if(status != VCHIQ_SUCCESS)
- {
- ((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->inited = 0;
- }
- return status;
+ VCHIQ_STATUS_T status = VCHIQ_SUCCESS;
+ state->platform_state = kzalloc(sizeof(VCHIQ_2835_ARM_STATE_T), GFP_KERNEL);
+ ((VCHIQ_2835_ARM_STATE_T *)state->platform_state)->inited = 1;
+ status = vchiq_arm_init_state(state, &((VCHIQ_2835_ARM_STATE_T *)state->platform_state)->arm_state);
+ if (status != VCHIQ_SUCCESS)
+ {
+ ((VCHIQ_2835_ARM_STATE_T *)state->platform_state)->inited = 0;
+ }
+ return status;
}
VCHIQ_ARM_STATE_T*
vchiq_platform_get_arm_state(VCHIQ_STATE_T *state)
{
- if(!((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->inited)
- {
- BUG();
- }
- return &((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->arm_state;
+ if (!((VCHIQ_2835_ARM_STATE_T *)state->platform_state)->inited)
+ {
+ BUG();
+ }
+ return &((VCHIQ_2835_ARM_STATE_T *)state->platform_state)->arm_state;
}
void
@@ -292,13 +295,13 @@ vchiq_dump_platform_state(void *dump_context)
VCHIQ_STATUS_T
vchiq_platform_suspend(VCHIQ_STATE_T *state)
{
- return VCHIQ_ERROR;
+ return VCHIQ_ERROR;
}
VCHIQ_STATUS_T
vchiq_platform_resume(VCHIQ_STATE_T *state)
{
- return VCHIQ_SUCCESS;
+ return VCHIQ_SUCCESS;
}
void
@@ -312,15 +315,15 @@ vchiq_platform_resumed(VCHIQ_STATE_T *state)
}
int
-vchiq_platform_videocore_wanted(VCHIQ_STATE_T* state)
+vchiq_platform_videocore_wanted(VCHIQ_STATE_T *state)
{
- return 1; // autosuspend not supported - videocore always wanted
+ return 1; // autosuspend not supported - videocore always wanted
}
int
vchiq_platform_use_suspend_timer(void)
{
- return 0;
+ return 0;
}
void
vchiq_dump_platform_use_state(VCHIQ_STATE_T *state)