Commit 913af5f7 authored by Franky Lin's avatar Franky Lin Committed by Greg Kroah-Hartman

staging: brcm80211: move debug console related code to dhd_sdio.c

Debug console functionality is provided by dhd_sdio.c. So the related
variables and iovars should go there as well.
Signed-off-by: default avatarFranky Lin <frankyl@broadcom.com>
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Reviewed-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ac495534
...@@ -773,11 +773,6 @@ extern atomic_t brcmf_mmc_suspend; ...@@ -773,11 +773,6 @@ extern atomic_t brcmf_mmc_suspend;
* Insmod parameters for debug/test * Insmod parameters for debug/test
*/ */
#if defined(BCMDBG)
/* Console output poll interval */
extern uint brcmf_console_ms;
#endif /* defined(BCMDBG) */
/* Use interrupts */ /* Use interrupts */
extern uint brcmf_intr; extern uint brcmf_intr;
......
...@@ -58,12 +58,6 @@ brcmf_sdbrcm_bus_txctl(struct dhd_bus *bus, unsigned char *msg, uint msglen); ...@@ -58,12 +58,6 @@ brcmf_sdbrcm_bus_txctl(struct dhd_bus *bus, unsigned char *msg, uint msglen);
extern int extern int
brcmf_sdbrcm_bus_rxctl(struct dhd_bus *bus, unsigned char *msg, uint msglen); brcmf_sdbrcm_bus_rxctl(struct dhd_bus *bus, unsigned char *msg, uint msglen);
#ifdef BCMDBG
/* Device console input function */
extern int
brcmf_sdbrcm_bus_console_in(dhd_pub_t *dhd, unsigned char *msg, uint msglen);
#endif /* BCMDBG */
/* Deferred processing for the bus, return true requests reschedule */ /* Deferred processing for the bus, return true requests reschedule */
extern bool dhd_bus_dpc(struct dhd_bus *bus); extern bool dhd_bus_dpc(struct dhd_bus *bus);
extern void dhd_bus_isr(bool *InterruptRecognized, extern void dhd_bus_isr(bool *InterruptRecognized,
......
...@@ -53,10 +53,6 @@ enum { ...@@ -53,10 +53,6 @@ enum {
IOV_BCMERRORSTR, IOV_BCMERRORSTR,
IOV_BCMERROR, IOV_BCMERROR,
IOV_DUMP, IOV_DUMP,
#ifdef BCMDBG
IOV_CONS,
IOV_DCONSOLE_POLL,
#endif
IOV_CLEARCOUNTS, IOV_CLEARCOUNTS,
IOV_LOGDUMP, IOV_LOGDUMP,
IOV_LOGCAL, IOV_LOGCAL,
...@@ -79,12 +75,6 @@ const struct brcmu_iovar brcmf_iovars[] = { ...@@ -79,12 +75,6 @@ const struct brcmu_iovar brcmf_iovars[] = {
, ,
{"dump", IOV_DUMP, 0, IOVT_BUFFER, DHD_IOCTL_MAXLEN} {"dump", IOV_DUMP, 0, IOVT_BUFFER, DHD_IOCTL_MAXLEN}
, ,
#ifdef BCMDBG
{"dconpoll", IOV_DCONSOLE_POLL, 0, IOVT_UINT32, 0}
,
{"cons", IOV_CONS, 0, IOVT_BUFFER, 0}
,
#endif
{"clearcounts", IOV_CLEARCOUNTS, 0, IOVT_VOID, 0} {"clearcounts", IOV_CLEARCOUNTS, 0, IOVT_VOID, 0}
, ,
{"gpioob", IOV_GPIOOB, 0, IOVT_UINT32, 0} {"gpioob", IOV_GPIOOB, 0, IOVT_UINT32, 0}
...@@ -238,23 +228,6 @@ brcmf_c_doiovar(dhd_pub_t *dhd_pub, const struct brcmu_iovar *vi, u32 actionid, ...@@ -238,23 +228,6 @@ brcmf_c_doiovar(dhd_pub_t *dhd_pub, const struct brcmu_iovar *vi, u32 actionid,
bcmerror = brcmf_c_dump(dhd_pub, arg, len); bcmerror = brcmf_c_dump(dhd_pub, arg, len);
break; break;
#ifdef BCMDBG
case IOV_GVAL(IOV_DCONSOLE_POLL):
int_val = (s32) brcmf_console_ms;
memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_DCONSOLE_POLL):
brcmf_console_ms = (uint) int_val;
break;
case IOV_SVAL(IOV_CONS):
if (len > 0)
bcmerror = brcmf_sdbrcm_bus_console_in(dhd_pub, arg,
len - 1);
break;
#endif
case IOV_SVAL(IOV_CLEARCOUNTS): case IOV_SVAL(IOV_CLEARCOUNTS):
dhd_pub->tx_packets = dhd_pub->rx_packets = 0; dhd_pub->tx_packets = dhd_pub->rx_packets = 0;
dhd_pub->tx_errors = dhd_pub->rx_errors = 0; dhd_pub->tx_errors = dhd_pub->rx_errors = 0;
......
...@@ -124,12 +124,6 @@ module_param(brcmf_msg_level, int, 0); ...@@ -124,12 +124,6 @@ module_param(brcmf_msg_level, int, 0);
uint brcmf_sysioc = true; uint brcmf_sysioc = true;
module_param(brcmf_sysioc, uint, 0); module_param(brcmf_sysioc, uint, 0);
#ifdef BCMDBG
/* Console poll interval */
uint brcmf_console_ms;
module_param(brcmf_console_ms, uint, 0);
#endif /* BCMDBG */
/* ARP offload agent mode : Enable ARP Host Auto-Reply /* ARP offload agent mode : Enable ARP Host Auto-Reply
and ARP Peer Auto-Reply */ and ARP Peer Auto-Reply */
uint brcmf_arp_mode = 0xb; uint brcmf_arp_mode = 0xb;
......
...@@ -659,6 +659,12 @@ module_param(brcmf_watchdog_prio, int, 0); ...@@ -659,6 +659,12 @@ module_param(brcmf_watchdog_prio, int, 0);
uint brcmf_watchdog_ms = 10; uint brcmf_watchdog_ms = 10;
module_param(brcmf_watchdog_ms, uint, 0); module_param(brcmf_watchdog_ms, uint, 0);
#ifdef BCMDBG
/* Console poll interval */
uint brcmf_console_ms;
module_param(brcmf_console_ms, uint, 0);
#endif /* DHD_DEBUG */
/* Tx/Rx bounds */ /* Tx/Rx bounds */
uint brcmf_txbound; uint brcmf_txbound;
uint brcmf_rxbound; uint brcmf_rxbound;
...@@ -757,6 +763,8 @@ static void brcmf_sdbrcm_sdtest_set(dhd_bus_t *bus, bool start); ...@@ -757,6 +763,8 @@ static void brcmf_sdbrcm_sdtest_set(dhd_bus_t *bus, bool start);
#endif #endif
#ifdef BCMDBG #ifdef BCMDBG
static int brcmf_sdbrcm_bus_console_in(dhd_pub_t *dhdp, unsigned char *msg,
uint msglen);
static int brcmf_sdbrcm_checkdied(dhd_bus_t *bus, u8 *data, uint size); static int brcmf_sdbrcm_checkdied(dhd_bus_t *bus, u8 *data, uint size);
static int brcmf_sdbrcm_mem_dump(dhd_bus_t *bus); static int brcmf_sdbrcm_mem_dump(dhd_bus_t *bus);
#endif /* BCMDBG */ #endif /* BCMDBG */
...@@ -1665,6 +1673,8 @@ enum { ...@@ -1665,6 +1673,8 @@ enum {
IOV_MEMSIZE, IOV_MEMSIZE,
#ifdef BCMDBG #ifdef BCMDBG
IOV_CHECKDIED, IOV_CHECKDIED,
IOV_CONS,
IOV_DCONSOLE_POLL,
#endif #endif
IOV_DOWNLOAD, IOV_DOWNLOAD,
IOV_FORCEEVEN, IOV_FORCEEVEN,
...@@ -1710,6 +1720,10 @@ const struct brcmu_iovar dhdsdio_iovars[] = { ...@@ -1710,6 +1720,10 @@ const struct brcmu_iovar dhdsdio_iovars[] = {
{"devreset", IOV_DEVRESET, 0, IOVT_BOOL, 0}, {"devreset", IOV_DEVRESET, 0, IOVT_BOOL, 0},
{"wdtick", IOV_WDTICK, 0, IOVT_UINT32, 0}, {"wdtick", IOV_WDTICK, 0, IOVT_UINT32, 0},
#ifdef BCMDBG #ifdef BCMDBG
{"cons", IOV_CONS, 0, IOVT_BUFFER, 0}
,
{"dconpoll", IOV_DCONSOLE_POLL, 0, IOVT_UINT32, 0}
,
{"sdreg", IOV_SDREG, 0, IOVT_BUFFER, sizeof(struct brcmf_sdreg)} {"sdreg", IOV_SDREG, 0, IOVT_BUFFER, sizeof(struct brcmf_sdreg)}
, ,
{"sbreg", IOV_SBREG, 0, IOVT_BUFFER, sizeof(struct brcmf_sdreg)} {"sbreg", IOV_SBREG, 0, IOVT_BUFFER, sizeof(struct brcmf_sdreg)}
...@@ -2559,6 +2573,21 @@ brcmf_sdbrcm_doiovar(dhd_bus_t *bus, const struct brcmu_iovar *vi, u32 actionid, ...@@ -2559,6 +2573,21 @@ brcmf_sdbrcm_doiovar(dhd_bus_t *bus, const struct brcmu_iovar *vi, u32 actionid,
#endif /* BCMDBG */ #endif /* BCMDBG */
#ifdef BCMDBG #ifdef BCMDBG
case IOV_GVAL(IOV_DCONSOLE_POLL):
int_val = (s32) brcmf_console_ms;
memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_DCONSOLE_POLL):
brcmf_console_ms = (uint) int_val;
break;
case IOV_SVAL(IOV_CONS):
if (len > 0)
bcmerror = brcmf_sdbrcm_bus_console_in(bus->dhd,
arg, len - 1);
break;
case IOV_GVAL(IOV_SDREG): case IOV_GVAL(IOV_SDREG):
{ {
struct brcmf_sdreg *sd_ptr; struct brcmf_sdreg *sd_ptr;
...@@ -5100,7 +5129,7 @@ extern bool brcmf_sdbrcm_bus_watchdog(dhd_pub_t *dhdp) ...@@ -5100,7 +5129,7 @@ extern bool brcmf_sdbrcm_bus_watchdog(dhd_pub_t *dhdp)
} }
#ifdef BCMDBG #ifdef BCMDBG
extern int brcmf_sdbrcm_bus_console_in(dhd_pub_t *dhdp, unsigned char *msg, static int brcmf_sdbrcm_bus_console_in(dhd_pub_t *dhdp, unsigned char *msg,
uint msglen) uint msglen)
{ {
dhd_bus_t *bus = dhdp->bus; dhd_bus_t *bus = dhdp->bus;
......
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