Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 259792
b: refs/heads/master
c: 5185125
h: refs/heads/master
v: v3
  • Loading branch information
Roland Vossen authored and Greg Kroah-Hartman committed Jul 5, 2011
1 parent 7ed4879 commit 2965ded
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 33 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3c793822fe4821ef5213f08b1183a1424c5ac614
refs/heads/master: 51851250f9838202acb03308b8011dacddd54ad4
8 changes: 5 additions & 3 deletions trunk/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ const struct brcmu_iovar sdioh_iovars[] = {
size) */
{"sd_ints", IOV_USEINTS, 0, IOVT_BOOL, 0},
{"sd_numints", IOV_NUMINTS, 0, IOVT_UINT32, 0},
{"sd_devreg", IOV_DEVREG, 0, IOVT_BUFFER, sizeof(sdreg_t)}
{"sd_devreg", IOV_DEVREG, 0, IOVT_BUFFER, sizeof(struct brcmf_sdreg)}
,
{"sd_rxchain", IOV_RXCHAIN, 0, IOVT_BOOL, 0}
,
Expand Down Expand Up @@ -498,7 +498,8 @@ brcmf_sdioh_iovar_op(struct sdioh_info *si, const char *name,

case IOV_GVAL(IOV_DEVREG):
{
sdreg_t *sd_ptr = (sdreg_t *) params;
struct brcmf_sdreg *sd_ptr =
(struct brcmf_sdreg *) params;
u8 data = 0;

if (brcmf_sdioh_cfg_read
Expand All @@ -514,7 +515,8 @@ brcmf_sdioh_iovar_op(struct sdioh_info *si, const char *name,

case IOV_SVAL(IOV_DEVREG):
{
sdreg_t *sd_ptr = (sdreg_t *) params;
struct brcmf_sdreg *sd_ptr =
(struct brcmf_sdreg *) params;
u8 data = (u8) sd_ptr->value;

if (brcmf_sdioh_cfg_write
Expand Down
54 changes: 27 additions & 27 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@

#define TRAP_T_SIZE 80

typedef struct _trap_struct {
struct brcmf_trap {
u32 type;
u32 epc;
u32 cpsr;
Expand All @@ -116,20 +116,20 @@ typedef struct _trap_struct {
u32 r13;
u32 r14;
u32 pc;
} trap_t;
};

#define CBUF_LEN (128)

#define LOG_BUF_LEN 1024

typedef struct {
struct rte_log {
u32 buf; /* Can't be pointer on (64-bit) hosts */
uint buf_size;
uint idx;
char *_buf_compat; /* Redundant pointer for backward compat. */
} rte_log_t;
};

typedef struct {
struct rte_console {
/* Virtual UART
* When there is no UART (e.g. Quickturn),
* the host should write a complete
Expand All @@ -148,7 +148,7 @@ typedef struct {
* Output will be lost if the output wraps around faster than the host
* polls.
*/
rte_log_t log;
struct rte_log log;

/* Console input line buffer
* Characters are read one at a time into cbuf
Expand All @@ -158,7 +158,7 @@ typedef struct {
*/
uint cbuf_idx;
char cbuf[CBUF_LEN];
} rte_cons_t;
};

#endif /* DHD_DEBUG */
#include <chipcommon.h>
Expand Down Expand Up @@ -418,14 +418,14 @@ DHD_SPINWAIT_SLEEP_INIT(sdioh_spinwait_sleep);

#ifdef DHD_DEBUG
/* Device console log buffer state */
typedef struct dhd_console {
struct dhd_console {
uint count; /* Poll interval msec counter */
uint log_addr; /* Log struct address (fixed) */
rte_log_t log; /* Log struct (host copy) */
struct rte_log log; /* Log struct (host copy) */
uint bufsize; /* Size of log buffer */
u8 *buf; /* Log buffer (host copy) */
uint last; /* Last buffer read index */
} dhd_console_t;
};
#endif /* DHD_DEBUG */

struct sdpcm_shared {
Expand All @@ -434,7 +434,7 @@ struct sdpcm_shared {
u32 assert_exp_addr;
u32 assert_file_addr;
u32 assert_line;
u32 console_addr; /* Address of rte_cons_t */
u32 console_addr; /* Address of struct rte_console */
u32 msgtrace_addr;
u8 tag[32];
};
Expand Down Expand Up @@ -523,7 +523,7 @@ typedef struct dhd_bus {
uint pollcnt; /* Count of active polls */

#ifdef DHD_DEBUG
dhd_console_t console; /* Console output polling support */
struct dhd_console console; /* Console output polling support */
uint console_addr; /* Console address from shared struct */
#endif /* DHD_DEBUG */

Expand Down Expand Up @@ -1755,9 +1755,9 @@ const struct brcmu_iovar dhdsdio_iovars[] = {
{"sdalign", IOV_SDALIGN, 0, IOVT_BOOL, 0},
{"devreset", IOV_DEVRESET, 0, IOVT_BOOL, 0},
#ifdef DHD_DEBUG
{"sdreg", IOV_SDREG, 0, IOVT_BUFFER, sizeof(sdreg_t)}
{"sdreg", IOV_SDREG, 0, IOVT_BUFFER, sizeof(struct brcmf_sdreg)}
,
{"sbreg", IOV_SBREG, 0, IOVT_BUFFER, sizeof(sdreg_t)}
{"sbreg", IOV_SBREG, 0, IOVT_BUFFER, sizeof(struct brcmf_sdreg)}
,
{"sd_cis", IOV_SDCIS, 0, IOVT_BUFFER, DHD_IOCTL_MAXLEN}
,
Expand Down Expand Up @@ -2090,7 +2090,7 @@ static int brcmf_sdbrcm_checkdied(dhd_bus_t *bus, u8 *data, uint size)
char *mbuffer = NULL;
uint maxstrlen = 256;
char *str = NULL;
trap_t tr;
struct brcmf_trap tr;
struct sdpcm_shared sdpcm_shared;
struct brcmu_strbuf strbuf;

Expand Down Expand Up @@ -2180,7 +2180,7 @@ static int brcmf_sdbrcm_checkdied(dhd_bus_t *bus, u8 *data, uint size)
if (sdpcm_shared.flags & SDPCM_SHARED_TRAP) {
bcmerror = brcmf_sdbrcm_membytes(bus, false,
sdpcm_shared.trap_addr, (u8 *)&tr,
sizeof(trap_t));
sizeof(struct brcmf_trap));
if (bcmerror < 0)
goto done;

Expand Down Expand Up @@ -2263,7 +2263,7 @@ static int brcmf_sdbrcm_mem_dump(dhd_bus_t *bus)

static int brcmf_sdbrcm_readconsole(dhd_bus_t *bus)
{
dhd_console_t *c = &bus->console;
struct dhd_console *c = &bus->console;
u8 line[CONSOLE_LINE_MAX], ch;
u32 n, idx, addr;
int rv;
Expand All @@ -2273,7 +2273,7 @@ static int brcmf_sdbrcm_readconsole(dhd_bus_t *bus)
return 0;

/* Read console log struct */
addr = bus->console_addr + offsetof(rte_cons_t, log);
addr = bus->console_addr + offsetof(struct rte_console, log);
rv = brcmf_sdbrcm_membytes(bus, false, addr, (u8 *)&c->log,
sizeof(c->log));
if (rv < 0)
Expand Down Expand Up @@ -2608,10 +2608,10 @@ brcmf_sdbrcm_doiovar(dhd_bus_t *bus, const struct brcmu_iovar *vi, u32 actionid,
#ifdef DHD_DEBUG
case IOV_GVAL(IOV_SDREG):
{
sdreg_t *sd_ptr;
struct brcmf_sdreg *sd_ptr;
u32 addr, size;

sd_ptr = (sdreg_t *) params;
sd_ptr = (struct brcmf_sdreg *) params;

addr = (unsigned long)bus->regs + sd_ptr->offset;
size = sd_ptr->func;
Expand All @@ -2625,10 +2625,10 @@ brcmf_sdbrcm_doiovar(dhd_bus_t *bus, const struct brcmu_iovar *vi, u32 actionid,

case IOV_SVAL(IOV_SDREG):
{
sdreg_t *sd_ptr;
struct brcmf_sdreg *sd_ptr;
u32 addr, size;

sd_ptr = (sdreg_t *) params;
sd_ptr = (struct brcmf_sdreg *) params;

addr = (unsigned long)bus->regs + sd_ptr->offset;
size = sd_ptr->func;
Expand All @@ -2643,7 +2643,7 @@ brcmf_sdbrcm_doiovar(dhd_bus_t *bus, const struct brcmu_iovar *vi, u32 actionid,
(not SDIO core) */
case IOV_GVAL(IOV_SBREG):
{
sdreg_t sdreg;
struct brcmf_sdreg sdreg;
u32 addr, size;

memcpy(&sdreg, params, sizeof(sdreg));
Expand All @@ -2660,7 +2660,7 @@ brcmf_sdbrcm_doiovar(dhd_bus_t *bus, const struct brcmu_iovar *vi, u32 actionid,

case IOV_SVAL(IOV_SBREG):
{
sdreg_t sdreg;
struct brcmf_sdreg sdreg;
u32 addr, size;

memcpy(&sdreg, params, sizeof(sdreg));
Expand Down Expand Up @@ -5137,20 +5137,20 @@ extern int brcmf_sdbrcm_bus_console_in(dhd_pub_t *dhdp, unsigned char *msg,
brcmf_sdbrcm_clkctl(bus, CLK_AVAIL, false);

/* Zero cbuf_index */
addr = bus->console_addr + offsetof(rte_cons_t, cbuf_idx);
addr = bus->console_addr + offsetof(struct rte_console, cbuf_idx);
val = cpu_to_le32(0);
rv = brcmf_sdbrcm_membytes(bus, true, addr, (u8 *)&val, sizeof(val));
if (rv < 0)
goto done;

/* Write message into cbuf */
addr = bus->console_addr + offsetof(rte_cons_t, cbuf);
addr = bus->console_addr + offsetof(struct rte_console, cbuf);
rv = brcmf_sdbrcm_membytes(bus, true, addr, (u8 *)msg, msglen);
if (rv < 0)
goto done;

/* Write length into vcons_in */
addr = bus->console_addr + offsetof(rte_cons_t, vcons_in);
addr = bus->console_addr + offsetof(struct rte_console, vcons_in);
val = cpu_to_le32(msglen);
rv = brcmf_sdbrcm_membytes(bus, true, addr, (u8 *)&val, sizeof(val));
if (rv < 0)
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/brcm80211/brcmfmac/sdiovar.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
#ifndef _sdiovar_h_
#define _sdiovar_h_

typedef struct sdreg {
struct brcmf_sdreg {
int func;
int offset;
int value;
} sdreg_t;
};

/* Common msglevel constants */
#define SDH_ERROR_VAL 0x0001 /* Error */
Expand Down

0 comments on commit 2965ded

Please sign in to comment.