Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
gdb-io.c File Reference
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/console.h>
#include <linux/init.h>
#include <linux/serial_reg.h>
#include <asm/pgtable.h>
#include <asm/irc-regs.h>
#include <asm/timer-regs.h>
#include <asm/gdb-stub.h>
#include "gdb-io.h"

Go to the source code of this file.

Macros

#define __UART(X)   (*(volatile uint8_t *)(UART1_BASE + (UART_##X)))
 
#define __UART_IRR_NMI   0xfff00000
 
#define LSR_WAIT_FOR(STATE)
 
#define FLOWCTL_QUERY(LINE)   ({ __UART(MSR) & UART_MSR_##LINE; })
 
#define FLOWCTL_CLEAR(LINE)   do { __UART(MCR) &= ~UART_MCR_##LINE; mb(); } while (0)
 
#define FLOWCTL_SET(LINE)   do { __UART(MCR) |= UART_MCR_##LINE; mb(); } while (0)
 
#define FLOWCTL_WAIT_FOR(LINE)
 

Functions

void gdbstub_io_init (void)
 
void gdbstub_set_baud (unsigned baud)
 
void gdbstub_do_rx (void)
 
int gdbstub_rx_char (unsigned char *_ch, int nonblock)
 
void gdbstub_tx_char (unsigned char ch)
 
void gdbstub_tx_flush (void)
 

Macro Definition Documentation

#define __UART (   X)    (*(volatile uint8_t *)(UART1_BASE + (UART_##X)))

Definition at line 31 of file gdb-io.c.

#define __UART_IRR_NMI   0xfff00000

Definition at line 32 of file gdb-io.c.

#define FLOWCTL_CLEAR (   LINE)    do { __UART(MCR) &= ~UART_MCR_##LINE; mb(); } while (0)

Definition at line 41 of file gdb-io.c.

#define FLOWCTL_QUERY (   LINE)    ({ __UART(MSR) & UART_MSR_##LINE; })

Definition at line 40 of file gdb-io.c.

#define FLOWCTL_SET (   LINE)    do { __UART(MCR) |= UART_MCR_##LINE; mb(); } while (0)

Definition at line 42 of file gdb-io.c.

#define FLOWCTL_WAIT_FOR (   LINE)
Value:
do { \
gdbstub_do_rx(); \
} while(!FLOWCTL_QUERY(LINE))

Definition at line 44 of file gdb-io.c.

#define LSR_WAIT_FOR (   STATE)
Value:
do { \
gdbstub_do_rx(); \
} while (!(__UART(LSR) & UART_LSR_##STATE))

Definition at line 35 of file gdb-io.c.

Function Documentation

void gdbstub_do_rx ( void  )

Definition at line 112 of file gdb-io.c.

void gdbstub_io_init ( void  )

Definition at line 54 of file gdb-io.c.

int gdbstub_rx_char ( unsigned char _ch,
int  nonblock 
)

Definition at line 139 of file gdb-io.c.

void gdbstub_set_baud ( unsigned  baud)

Definition at line 81 of file gdb-io.c.

void gdbstub_tx_char ( unsigned char  ch)

Definition at line 188 of file gdb-io.c.

void gdbstub_tx_flush ( void  )

Definition at line 210 of file gdb-io.c.