type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
functions | int
target_char_to_host (int target_char, int *host_char)
{
return ((*target_char_to_host_func)
(target_char_to_host_baton, target_char, host_char));
} |
functions | void
_initialize_charset (void)
{
struct cmd_list_element *new_cmd;
/* Register all the character set GDB knows about.
You should use the same names that iconv does, where possible, to
take advantage of the iconv-based default behaviors.
CAUTION: if you register a character set, you must also regi... |
includes | #include <linux/of.h> |
includes | #include <linux/of_address.h> |
includes | #include <linux/of_irq.h> |
includes | #include <hi_base.h> |
includes | #include <osl_types.h> |
includes |
#include <bsp_version.h> |
includes | #include <bsp_hardtimer.h> |
structs | struct timerslice_control{
void* timerslice_base_addr;
void* timerslice_base_addr_phy; /*ʱ¼ä´ÁʵµØÖ·*/
void* timerslice_hrt_base_addr; /*udelay timer stamp addr*/
u32 hrt_slice_is_increase;
u32 slice_is_increase;
u32 hrt_slice_offset[2]; /*udelay timer stamp Æ«ÒÆ*/
u32 slice_offset[2];/*3... |
functions | void slice_set_judgetime(u64 time_s)
{
if(timeslice_ctrl.is_inited_flag){
timeslice_ctrl.slice_judgetime = timeslice_ctrl.slice_clock_freq*time_s;
return;
} |
functions | u32 bsp_slice_getcurtime(u64 *pcurtime)
{
/*lint -save -e958*/
u64 timervalue[4];
/*lint -restore*/
if(timeslice_ctrl.is_inited_flag){
timervalue[0] = (u64)readl(timeslice_ctrl.timerslice_base_addr+timeslice_ctrl.slice_offset[0]);
timervalue[1] = (u64)readl(timeslice_ctrl.timerslice_base_addr+timeslice_ctrl.sl... |
functions | u32 bsp_slice_getcurtime_hrt(u64 *pcurtime)
{
/*lint -save -e958*/
u64 timervalue[4];
/*lint -restore*/
if(timeslice_ctrl.is_inited_flag){
timervalue[0] = (u64)readl(timeslice_ctrl.timerslice_hrt_base_addr+timeslice_ctrl.hrt_slice_offset[0]);
timervalue[1] = (u64)readl(timeslice_ctrl.timerslice_hrt_base_addr+t... |
functions | u32 bsp_get_slice_value_hrt(void){
if(timeslice_ctrl.is_inited_flag ){
if(timeslice_ctrl.hrt_slice_is_increase){
return readl(timeslice_ctrl.timerslice_hrt_base_addr+timeslice_ctrl.hrt_slice_offset[0]);
} |
functions | u32 bsp_get_slice_value(void){
if(timeslice_ctrl.is_inited_flag ){
if(timeslice_ctrl.slice_is_increase)
return readl(timeslice_ctrl.timerslice_base_addr+timeslice_ctrl.slice_offset[0]);
else
return 0xFFFFFFFF - readl(timeslice_ctrl.timerslice_base_addr+timeslice_ctrl.slice_offset[0]);
} |
functions | u32 bsp_get_elapse_ms(void)
{
u64 tmp=0;
unsigned long timer_get = 0;
if(timeslice_ctrl.is_inited_flag ){
timer_get = bsp_get_slice_value();
tmp = (u64)(timer_get & 0xFFFFFFFF);
tmp = tmp*1000;
tmp = div_u64(tmp,timeslice_ctrl.slice_clock_freq);
return (u32)tmp;
} |
functions | u32 bsp_get_slice_freq(void)
{
return timeslice_ctrl.slice_clock_freq;
} |
functions | int slice_init(void){
struct device_node *node = NULL;
void *iomap_node = NULL;
const u32 *regaddr_p=NULL;
u64 regaddr64=0, size64=0;
s32 ret = 0;
/*p532 fpga Óëp532 asic¶ÁȡͬһÌ×dts£¬ËùÒÔͨ¹ý°æ±¾ºÅÇø·ÖsliceÀ´Ô´;
*porting timer slice also come from timer*/
if(BSP_BOARD_TYPE_SOC == bsp_get_version_info()->board... |
functions | int hrt_slice_init(void){
struct device_node *node = NULL;
char* hrttimer_slice = "hisilicon,hrttimer_slice";
void *iomap_node = NULL;
s32 ret = 0;
node = of_find_compatible_node(NULL, NULL, hrttimer_slice);
if(!node)
{
hardtimer_print_error("timer_hrtslice of_find_compatible_node failed.\n");
return BSP_ERR... |
functions | int bsp_slice_init(void)
{
int ret = 0;
ret=slice_init();
ret|=hrt_slice_init();
if(ret){
hardtimer_print_error("failed.\n");
return BSP_ERROR;
} |
functions | int test_timer_slice(void)
{
u32 low=0,high=0;
if(mdrv_timer_get_accuracy_timestamp(&high,&low))
return -1;
else{
hardtimer_print_error("low =0x%x\n",low);
hardtimer_print_error("high =0x%x\n",high);
} |
defines |
#define gfc_get_structure_ctor_component() XCNEW (gfc_structure_ctor_component) |
functions | match
match_kind_param (int *kind, int *is_iso_c)
{
char name[GFC_MAX_SYMBOL_LEN + 1];
gfc_symbol *sym;
const char *p;
match m;
*is_iso_c = 0;
m = gfc_match_small_literal_int (kind, NULL);
if (m != MATCH_NO)
return m;
m = gfc_match_name (name);
if (m != MATCH_YES)
return m;
if (gfc_find_... |
functions | int
get_kind (int *is_iso_c)
{
int kind;
match m;
*is_iso_c = 0;
if (gfc_match_char ('_') != MATCH_YES)
return -2;
m = match_kind_param (&kind, is_iso_c);
if (m == MATCH_NO)
gfc_error ("Missing kind-parameter at %C");
return (m == MATCH_YES) ? kind : -1;
} |
functions | int
gfc_check_digit (char c, int radix)
{
int r;
switch (radix)
{
case 2:
r = ('0' <= c && c <= '1');
break;
case 8:
r = ('0' <= c && c <= '7');
break;
case 10:
r = ('0' <= c && c <= '9');
break;
case 16:
r = ISXDIGIT (c);
break;
default:
... |
functions | int
match_digits (int signflag, int radix, char *buffer)
{
locus old_loc;
int length;
char c;
length = 0;
c = gfc_next_ascii_char ();
if (signflag && (c == '+' || c == '-'))
{
if (buffer != NULL)
*buffer++ = c;
gfc_gobble_whitespace ();
c = gfc_next_ascii_char ();
length++;
... |
functions | match
match_integer_constant (gfc_expr **result, int signflag)
{
int length, kind, is_iso_c;
locus old_loc;
char *buffer;
gfc_expr *e;
old_loc = gfc_current_locus;
gfc_gobble_whitespace ();
length = match_digits (signflag, 10, NULL);
gfc_current_locus = old_loc;
if (length == -1)
return MATCH_NO... |
functions | match
match_hollerith_constant (gfc_expr **result)
{
locus old_loc;
gfc_expr *e = NULL;
const char *msg;
int num, pad;
int i;
old_loc = gfc_current_locus;
gfc_gobble_whitespace ();
if (match_integer_constant (&e, 0) == MATCH_YES
&& gfc_match_char ('h') == MATCH_YES)
{
if (gfc_notify_... |
functions | match
match_boz_constant (gfc_expr **result)
{
int radix, length, x_hex, kind;
locus old_loc, start_loc;
char *buffer, post, delim;
gfc_expr *e;
start_loc = old_loc = gfc_current_locus;
gfc_gobble_whitespace ();
x_hex = 0;
switch (post = gfc_next_ascii_char ())
{
case 'b':
radix = 2;
... |
functions | match
match_real_constant (gfc_expr **result, int signflag)
{
int kind, count, seen_dp, seen_digits, is_iso_c;
locus old_loc, temp_loc;
char *p, *buffer, c, exp_char;
gfc_expr *e;
bool negate;
old_loc = gfc_current_locus;
gfc_gobble_whitespace ();
e = NULL;
count = 0;
seen_dp = 0;
seen_digits =... |
functions | match
match_substring (gfc_charlen *cl, int init, gfc_ref **result)
{
gfc_expr *start, *end;
locus old_loc;
gfc_ref *ref;
match m;
start = NULL;
end = NULL;
old_loc = gfc_current_locus;
m = gfc_match_char ('(');
if (m != MATCH_YES)
return MATCH_NO;
if (gfc_match_char (':') != MATCH_YES)
... |
functions | gfc_char_t
next_string_char (gfc_char_t delimiter, int *ret)
{
locus old_locus;
gfc_char_t c;
c = gfc_next_char_literal (INSTRING_WARN);
*ret = 0;
if (c == '\n')
{
*ret = -2;
return 0;
} |
functions | match
match_charkind_name (char *name)
{
locus old_loc;
char c, peek;
int len;
gfc_gobble_whitespace ();
c = gfc_next_ascii_char ();
if (!ISALPHA (c))
return MATCH_NO;
*name++ = c;
len = 1;
for (;;)
{
old_loc = gfc_current_locus;
c = gfc_next_ascii_char ();
if (c == '_')
... |
functions | match
match_string_constant (gfc_expr **result)
{
char name[GFC_MAX_SYMBOL_LEN + 1], peek;
int i, kind, length, warn_ampersand, ret;
locus old_locus, start_locus;
gfc_symbol *sym;
gfc_expr *e;
const char *q;
match m;
gfc_char_t c, delimiter, *p;
old_locus = gfc_current_locus;
gfc_gobble_whitespace... |
functions | int
match_logical_constant_string (void)
{
locus orig_loc = gfc_current_locus;
gfc_gobble_whitespace ();
if (gfc_next_ascii_char () == '.')
{
char ch = gfc_next_ascii_char ();
if (ch == 'f')
{
if (gfc_next_ascii_char () == 'a'
&& gfc_next_ascii_char () == 'l'
&& gfc_next_ascii_c... |
functions | else if (ch == 't')
{
if (gfc_next_ascii_char () == 'r'
&& gfc_next_ascii_char () == 'u'
&& gfc_next_ascii_char () == 'e'
&& gfc_next_ascii_char () == '.')
/* Matched ".true.". */
return 1;
} |
functions | match
match_logical_constant (gfc_expr **result)
{
gfc_expr *e;
int i, kind, is_iso_c;
i = match_logical_constant_string ();
if (i == -1)
return MATCH_NO;
kind = get_kind (&is_iso_c);
if (kind == -1)
return MATCH_ERROR;
if (kind == -2)
kind = gfc_default_logical_kind;
if (gfc_validate_kin... |
functions | match
match_sym_complex_part (gfc_expr **result)
{
char name[GFC_MAX_SYMBOL_LEN + 1];
gfc_symbol *sym;
gfc_expr *e;
match m;
m = gfc_match_name (name);
if (m != MATCH_YES)
return m;
if (gfc_find_symbol (name, NULL, 1, &sym) || sym == NULL)
return MATCH_NO;
if (sym->attr.flavor != FL_PARAMETER... |
functions | match
match_complex_part (gfc_expr **result)
{
match m;
m = match_sym_complex_part (result);
if (m != MATCH_NO)
return m;
m = match_real_constant (result, 1);
if (m != MATCH_NO)
return m;
return match_integer_constant (result, 1);
} |
functions | match
match_complex_constant (gfc_expr **result)
{
gfc_expr *e, *real, *imag;
gfc_error_buf old_error;
gfc_typespec target;
locus old_loc;
int kind;
match m;
old_loc = gfc_current_locus;
real = imag = e = NULL;
m = gfc_match_char ('(');
if (m != MATCH_YES)
return m;
gfc_push_error (&old_err... |
functions | match
gfc_match_literal_constant (gfc_expr **result, int signflag)
{
match m;
m = match_complex_constant (result);
if (m != MATCH_NO)
return m;
m = match_string_constant (result);
if (m != MATCH_NO)
return m;
m = match_boz_constant (result);
if (m != MATCH_NO)
return m;
m = match_real_co... |
functions | bool
gfc_is_function_return_value (gfc_symbol *sym, gfc_namespace *ns)
{
if (!sym->attr.function || (sym->result != sym))
return false;
while (ns)
{
if (ns->proc_name == sym)
return true;
ns = ns->parent;
} |
functions | match
match_actual_arg (gfc_expr **result)
{
char name[GFC_MAX_SYMBOL_LEN + 1];
gfc_symtree *symtree;
locus where, w;
gfc_expr *e;
char c;
gfc_gobble_whitespace ();
where = gfc_current_locus;
switch (gfc_match_name (name))
{
case MATCH_ERROR:
return MATCH_ERROR;
case MATCH_NO:
... |
functions | match
match_keyword_arg (gfc_actual_arglist *actual, gfc_actual_arglist *base)
{
char name[GFC_MAX_SYMBOL_LEN + 1];
gfc_actual_arglist *a;
locus name_locus;
match m;
name_locus = gfc_current_locus;
m = gfc_match_name (name);
if (m != MATCH_YES)
goto cleanup;
if (gfc_match_char ('=') != MATCH_YES)
... |
functions | match
match_arg_list_function (gfc_actual_arglist *result)
{
char name[GFC_MAX_SYMBOL_LEN + 1];
locus old_locus;
match m;
old_locus = gfc_current_locus;
if (gfc_match_char ('%') != MATCH_YES)
{
m = MATCH_NO;
goto cleanup;
} |
functions | match
gfc_match_actual_arglist (int sub_flag, gfc_actual_arglist **argp)
{
gfc_actual_arglist *head, *tail;
int seen_keyword;
gfc_st_label *label;
locus old_loc;
match m;
*argp = tail = NULL;
old_loc = gfc_current_locus;
seen_keyword = 0;
if (gfc_match_char ('(') == MATCH_NO)
return (sub_flag) ... |
functions | match
gfc_match_varspec (gfc_expr *primary, int equiv_flag, bool sub_flag,
bool ppc_arg)
{
char name[GFC_MAX_SYMBOL_LEN + 1];
gfc_ref *substring, *tail;
gfc_component *component;
gfc_symbol *sym = primary->symtree->n.sym;
match m;
bool unknown;
tail = NULL;
gfc_gobble_whitespace ();
if (gfc_pe... |
functions | symbol_attribute
gfc_variable_attr (gfc_expr *expr, gfc_typespec *ts)
{
int dimension, pointer, allocatable, target;
symbol_attribute attr;
gfc_ref *ref;
gfc_symbol *sym;
gfc_component *comp;
if (expr->expr_type != EXPR_VARIABLE && expr->expr_type != EXPR_FUNCTION)
gfc_internal_error ("gfc_variable_att... |
functions | symbol_attribute
gfc_expr_attr (gfc_expr *e)
{
symbol_attribute attr;
switch (e->expr_type)
{
case EXPR_VARIABLE:
attr = gfc_variable_attr (e, NULL);
break;
case EXPR_FUNCTION:
gfc_clear_attr (&attr);
if (e->value.function.esym != NULL)
{
gfc_symbol *sym = e->value.functio... |
functions | void
gfc_free_structure_ctor_component (gfc_structure_ctor_component *comp)
{
free (comp->name);
gfc_free_expr (comp->val);
free (comp);
} |
functions | gfc_try
build_actual_constructor (gfc_structure_ctor_component **comp_head,
gfc_constructor_base *ctor_head, gfc_symbol *sym)
{
gfc_structure_ctor_component *comp_iter;
gfc_component *comp;
for (comp = sym->components; comp; comp = comp->next)
{
gfc_structure_ctor_component **next_ptr;
gfc_e... |
functions | gfc_try
gfc_convert_to_structure_constructor (gfc_expr *e, gfc_symbol *sym, gfc_expr **cexpr,
gfc_actual_arglist **arglist,
bool parent)
{
gfc_actual_arglist *actual;
gfc_structure_ctor_component *comp_tail, *comp_head, *comp_iter;
gfc_constructor_base ctor_head = NULL;
gfc_component *comp; ... |
functions | match
gfc_match_structure_constructor (gfc_symbol *sym, gfc_expr **result)
{
match m;
gfc_expr *e;
gfc_symtree *symtree;
gfc_get_sym_tree (sym->name, NULL, &symtree, false); /* Can't fail */
e = gfc_get_expr ();
e->symtree = symtree;
e->expr_type = EXPR_FUNCTION;
gcc_assert (sym->attr.flavor == FL_... |
functions | match
check_for_implicit_index (gfc_symtree **st, gfc_symbol **sym)
{
if ((*sym)->attr.flavor == FL_VARIABLE
&& (*sym)->ns != gfc_current_ns
&& (*sym)->attr.implied_index
&& (*sym)->attr.implicit_type
&& !(*sym)->attr.use_assoc)
{
int i;
i = gfc_get_sym_tree ((*sym)->name, NULL... |
functions | gfc_try
replace_hidden_procptr_result (gfc_symbol **sym, gfc_symtree **st)
{
/* Check for procedure pointer result variable. */
if ((*sym)->attr.function && !(*sym)->attr.external
&& (*sym)->result && (*sym)->result != *sym
&& (*sym)->result->attr.proc_pointer
&& (*sym) == gfc_current_ns->proc_na... |
functions | match
gfc_match_rvalue (gfc_expr **result)
{
gfc_actual_arglist *actual_arglist;
char name[GFC_MAX_SYMBOL_LEN + 1], argname[GFC_MAX_SYMBOL_LEN + 1];
gfc_state_data *st;
gfc_symbol *sym;
gfc_symtree *symtree;
locus where, old_loc;
gfc_expr *e;
match m, m2;
int i;
gfc_typespec *ts;
bool implicit_cha... |
functions | match
match_variable (gfc_expr **result, int equiv_flag, int host_flag)
{
gfc_symbol *sym;
gfc_symtree *st;
gfc_expr *expr;
locus where;
match m;
/* Since nothing has any business being an lvalue in a module
specification block, an interface block or a contains section,
we force the changed_symbo... |
functions | match
gfc_match_variable (gfc_expr **result, int equiv_flag)
{
return match_variable (result, equiv_flag, 1);
} |
functions | match
gfc_match_equiv_variable (gfc_expr **result)
{
return match_variable (result, 1, 0);
} |
includes |
#include <console/console.h> |
includes | #include <stdlib.h> |
includes | #include <spi_flash.h> |
includes | #include <spi-generic.h> |
includes | #include <string.h> |
defines | #define CMD_A25_WREN 0x06 /* Write Enable */ |
defines | #define CMD_A25_WRDI 0x04 /* Write Disable */ |
defines | #define CMD_A25_RDSR 0x05 /* Read Status Register */ |
defines | #define CMD_A25_WRSR 0x01 /* Write Status Register */ |
defines | #define CMD_A25_READ 0x03 /* Read Data Bytes */ |
defines | #define CMD_A25_FAST_READ 0x0b /* Read Data Bytes at Higher Speed */ |
defines | #define CMD_A25_PP 0x02 /* Page Program */ |
defines | #define CMD_A25_SE 0x20 /* Sector (4K) Erase */ |
defines | #define CMD_A25_BE 0xd8 /* Block (64K) Erase */ |
defines | #define CMD_A25_CE 0xc7 /* Chip Erase */ |
defines | #define CMD_A25_DP 0xb9 /* Deep Power-down */ |
defines | #define CMD_A25_RES 0xab /* Release from DP, and Read Signature */ |
structs | struct amic_spi_flash_params {
uint16_t id;
/* Log2 of page size in power-of-two mode */
uint8_t l2_page_size;
uint16_t pages_per_sector;
uint16_t sectors_per_block;
uint16_t nr_blocks;
const char *name;
}; |
structs | struct amic_spi_flash {
struct spi_flash flash;
const struct amic_spi_flash_params *params;
}; |
functions | int amic_write(const struct spi_flash *flash, u32 offset, size_t len,
const void *buf)
{
struct amic_spi_flash *amic = to_amic_spi_flash(flash);
unsigned long byte_addr;
unsigned long page_size;
size_t chunk_len;
size_t actual;
int ret;
u8 cmd[4];
page_size = 1 << amic->params->l2_page_size;
byte_addr = off... |
includes | #include <linux/uaccess.h> |
includes | #include <mach/gpio.h> |
includes | #include <linux/module.h> |
includes | #include <linux/interrupt.h> |
includes | #include <linux/fs.h> |
includes | #include <linux/slab.h> |
includes | #include <linux/delay.h> |
includes | #include <linux/string.h> |
includes | #include <linux/crc-ccitt.h> |
includes | #include <linux/kernel.h> |
includes | #include <linux/init.h> |
includes | #include <linux/platform_device.h> |
includes | #include <linux/miscdevice.h> |
includes | #include <linux/workqueue.h> |
includes | #include <linux/slab.h> |
includes | #include <linux/hw_dev_dec.h> |
includes | #include <linux/hw_dev_array.h> |
includes | #include <hsad/config_interface.h> |
includes | #include <linux/err.h> |
defines | #define false 0 |
defines | #define true 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.