type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
includes | #include <asm/smp_plat.h> |
includes |
#include <plat/platsmp.h> |
functions | void write_pen_release(int val)
{
pen_release = val;
smp_wmb();
sync_cache_w(&pen_release);
} |
functions | void versatile_secondary_init(unsigned int cpu)
{
/*
* let the primary processor know we're out of the
* pen, then head off into the C entry point
*/
write_pen_release(-1);
/*
* Synchronise with the boot thread.
*/
spin_lock(&boot_lock);
spin_unlock(&boot_lock);
} |
functions | int versatile_boot_secondary(unsigned int cpu, struct task_struct *idle)
{
unsigned long timeout;
/*
* Set synchronisation state between this boot processor
* and the secondary one
*/
spin_lock(&boot_lock);
/*
* This is really belt and braces; we hold unintended secondary
* CPUs in the holding pen until... |
includes |
#include <linux/init.h> |
includes | #include <linux/module.h> |
includes | #include <linux/rtc.h> |
includes | #include <linux/of.h> |
includes | #include <linux/of_device.h> |
includes | #include <linux/of_platform.h> |
includes | #include <linux/io.h> |
includes | #include <linux/slab.h> |
structs | struct mpc5121_rtc_regs {
u8 set_time; /* RTC + 0x00 */
u8 hour_set; /* RTC + 0x01 */
u8 minute_set; /* RTC + 0x02 */
u8 second_set; /* RTC + 0x03 */
u8 set_date; /* RTC + 0x04 */
u8 month_set; /* RTC + 0x05 */
u8 weekday_set; /* RTC + 0x06 */
u8 date_set; /* RTC + 0x07 */
u8 write_sw; /* RTC + 0x08... |
structs | struct mpc5121_rtc_data {
unsigned irq;
unsigned irq_periodic;
struct mpc5121_rtc_regs __iomem *regs;
struct rtc_device *rtc;
struct rtc_wkalrm wkalarm;
}; |
functions | void mpc5121_rtc_update_smh(struct mpc5121_rtc_regs __iomem *regs,
struct rtc_time *tm)
{
out_8(®s->second_set, tm->tm_sec);
out_8(®s->minute_set, tm->tm_min);
out_8(®s->hour_set, tm->tm_hour);
/* set time sequence */
out_8(®s->set_time, 0x1);
out_8(®s->set_time, 0x3);
out_8(®s->set_tim... |
functions | int mpc5121_rtc_read_time(struct device *dev, struct rtc_time *tm)
{
struct mpc5121_rtc_data *rtc = dev_get_drvdata(dev);
struct mpc5121_rtc_regs __iomem *regs = rtc->regs;
unsigned long now;
/*
* linux time is actual_time plus the offset saved in target_time
*/
now = in_be32(®s->actual_time) + in_be32(&re... |
functions | int mpc5121_rtc_set_time(struct device *dev, struct rtc_time *tm)
{
struct mpc5121_rtc_data *rtc = dev_get_drvdata(dev);
struct mpc5121_rtc_regs __iomem *regs = rtc->regs;
int ret;
unsigned long now;
/*
* The actual_time register is read only so we write the offset
* between it and linux time to the target_ti... |
functions | int mpc5200_rtc_read_time(struct device *dev, struct rtc_time *tm)
{
struct mpc5121_rtc_data *rtc = dev_get_drvdata(dev);
struct mpc5121_rtc_regs __iomem *regs = rtc->regs;
int tmp;
tm->tm_sec = in_8(®s->second);
tm->tm_min = in_8(®s->minute);
/* 12 hour format? */
if (in_8(®s->hour) & 0x20)
tm->tm_... |
functions | int mpc5200_rtc_set_time(struct device *dev, struct rtc_time *tm)
{
struct mpc5121_rtc_data *rtc = dev_get_drvdata(dev);
struct mpc5121_rtc_regs __iomem *regs = rtc->regs;
mpc5121_rtc_update_smh(regs, tm);
/* date */
out_8(®s->month_set, tm->tm_mon + 1);
out_8(®s->weekday_set, tm->tm_wday ? tm->tm_wday : ... |
functions | int mpc5121_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm)
{
struct mpc5121_rtc_data *rtc = dev_get_drvdata(dev);
struct mpc5121_rtc_regs __iomem *regs = rtc->regs;
*alarm = rtc->wkalarm;
alarm->pending = in_8(®s->alm_status);
return 0;
} |
functions | int mpc5121_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)
{
struct mpc5121_rtc_data *rtc = dev_get_drvdata(dev);
struct mpc5121_rtc_regs __iomem *regs = rtc->regs;
/*
* the alarm has no seconds so deal with it
*/
if (alarm->time.tm_sec) {
alarm->time.tm_sec = 0;
alarm->time.tm_min++;
if (al... |
functions | irqreturn_t mpc5121_rtc_handler(int irq, void *dev)
{
struct mpc5121_rtc_data *rtc = dev_get_drvdata((struct device *)dev);
struct mpc5121_rtc_regs __iomem *regs = rtc->regs;
if (in_8(®s->int_alm)) {
/* acknowledge and clear status */
out_8(®s->int_alm, 1);
out_8(®s->alm_status, 1);
rtc_update_irq... |
functions | irqreturn_t mpc5121_rtc_handler_upd(int irq, void *dev)
{
struct mpc5121_rtc_data *rtc = dev_get_drvdata((struct device *)dev);
struct mpc5121_rtc_regs __iomem *regs = rtc->regs;
if (in_8(®s->int_sec) && (in_8(®s->int_enable) & 0x1)) {
/* acknowledge */
out_8(®s->int_sec, 1);
rtc_update_irq(rtc->rtc... |
functions | int mpc5121_rtc_alarm_irq_enable(struct device *dev,
unsigned int enabled)
{
struct mpc5121_rtc_data *rtc = dev_get_drvdata(dev);
struct mpc5121_rtc_regs __iomem *regs = rtc->regs;
int val;
if (enabled)
val = 1;
else
val = 0;
out_8(®s->alm_enable, val);
rtc->wkalarm.enabled = val;
return 0;
} |
functions | int mpc5121_rtc_probe(struct platform_device *op)
{
struct mpc5121_rtc_data *rtc;
int err = 0;
rtc = devm_kzalloc(&op->dev, sizeof(*rtc), GFP_KERNEL);
if (!rtc)
return -ENOMEM;
rtc->regs = of_iomap(op->dev.of_node, 0);
if (!rtc->regs) {
dev_err(&op->dev, "%s: couldn't map io space\n", __func__);
return -E... |
functions | int mpc5121_rtc_remove(struct platform_device *op)
{
struct mpc5121_rtc_data *rtc = platform_get_drvdata(op);
struct mpc5121_rtc_regs __iomem *regs = rtc->regs;
/* disable interrupt, so there are no nasty surprises */
out_8(®s->alm_enable, 0);
out_8(®s->int_enable, in_8(®s->int_enable) & ~0x1);
iounmap... |
functions | void u8g_pb_Clear(u8g_pb_t *b)
{
uint8_t *ptr = (uint8_t *)b->buf;
uint8_t *end_ptr = ptr;
end_ptr += b->width;
do
{
*ptr++ = 0;
} |
functions | void u8g_pb_Clear(u8g_pb_t *b)
{
uint8_t *ptr = (uint8_t *)b->buf;
uint8_t cnt = b->width;
do
{
*ptr++ = 0;
cnt--;
} |
functions | uint8_t u8g_pb8v1_IsYIntersection___Old(u8g_pb_t *b, u8g_uint_t v0, u8g_uint_t v1)
{
uint8_t c0, c1, c;
c0 = v0 <= b->p.page_y1;
c1 = v1 >= b->p.page_y0;
c = v0 > v1;
if ( c0 && c1 ) return 1;
if ( c0 && c ) return 1;
if ( c1 && c ) return 1;
return 0;
} |
functions | uint8_t u8g_pb_IsYIntersection(u8g_pb_t *pb, u8g_uint_t v0, u8g_uint_t v1)
{
uint8_t c1, c2, c3, tmp;
c1 = v0 <= pb->p.page_y1;
c2 = v1 >= pb->p.page_y0;
c3 = v0 > v1;
/*
if ( c1 && c2 )
return 1;
if ( c1 && c3 )
return 1;
if ( c2 && c3 )
return 1;
return 0;
*/
tmp = c1;
c1 &= c2;... |
functions | uint8_t u8g_pb_IsXIntersection(u8g_pb_t *b, u8g_uint_t v0, u8g_uint_t v1)
{
uint8_t /*c0, c1, */ c2, c3;
/*
conditions: b->p.page_y0 < b->p.page_y1
there are no restriction on v0 and v1. If v0 > v1, then warp around unsigned is assumed
*/
/*
c0 = v0 < 0;
c1 = v1 < 0;
*/
c2 = v0 > b->width;
c3 ... |
functions | uint8_t u8g_pb_IsIntersection(u8g_pb_t *pb, u8g_dev_arg_bbx_t *bbx)
{
u8g_uint_t tmp;
tmp = bbx->y;
tmp += bbx->h;
tmp--;
if ( u8g_pb_IsYIntersection(pb, bbx->y, tmp) == 0 )
return 0;
/* maybe this one can be skiped... probability is very high to have an intersection, so it would be ok to always ... |
functions | void u8g_pb_GetPageBox(u8g_pb_t *pb, u8g_box_t *box)
{
box->x0 = 0;
box->y0 = pb->p.page_y0;
box->x1 = pb->width;
box->x1--;
box->y1 = pb->p.page_y1;
} |
functions | uint8_t u8g_pb_Is8PixelVisible(u8g_pb_t *b, u8g_dev_arg_pixel_t *arg_pixel)
{
u8g_uint_t v0, v1;
v0 = arg_pixel->y;
v1 = v0;
switch( arg_pixel->dir )
{
case 0:
break;
case 1:
v1 += 8; /* this is independent from the page height */
break;
case 2:
break;
case... |
functions | uint8_t u8g_pb_WriteBuffer(u8g_pb_t *b, u8g_t *u8g, u8g_dev_t *dev)
{
return u8g_WriteSequence(u8g, dev, b->width, b->buf);
} |
includes |
#include <linux/init.h> |
includes | #include <linux/bootmem.h> |
includes | #include <linux/mmzone.h> |
includes | #include <linux/mm.h> |
includes | #include <linux/seq_file.h> |
includes | #include <linux/console.h> |
includes | #include <linux/of_fdt.h> |
includes | #include <asm/io.h> |
includes | #include <asm/sections.h> |
includes | #include <asm/setup.h> |
includes | #include <asm/processor.h> |
includes | #include <asm/hexagon_vm.h> |
includes | #include <asm/vm_mmu.h> |
includes | #include <asm/time.h> |
includes | #include <asm/prom.h> |
functions | void calibrate_delay(void)
{
loops_per_jiffy = thread_freq_mhz * 1000000 / HZ;
} |
functions | __init setup_arch(char **cmdline_p)
{
char *p = &external_cmdline_buffer;
/*
* These will eventually be pulled in via either some hypervisor
* or devicetree description. Hardwiring for now.
*/
pcycle_freq_mhz = 600;
thread_freq_mhz = 100;
sleep_clk_freq = 32000;
/*
* Set up event bindings to handle exc... |
functions | void c_stop(struct seq_file *m, void *v)
{
} |
functions | int show_cpuinfo(struct seq_file *m, void *v)
{
int cpu = (unsigned long) v - 1;
#ifdef CONFIG_SMP
if (!cpu_online(cpu))
return 0;
#endif
seq_printf(m, "processor\t: %d\n", cpu);
seq_printf(m, "model name\t: Hexagon Virtual Machine\n");
seq_printf(m, "BogoMips\t: %lu.%02lu\n",
(loops_per_jiffy * HZ) / 500000... |
includes | #include <linux/jiffies.h> |
includes | #include <linux/sched.h> |
includes | #include <linux/timer.h> |
includes | #include <linux/kthread.h> |
defines |
#define DRV_VERSION "2.21" |
defines | #define SYNTH_CLEAR 0x18 |
defines | #define PROCSPEECH '\r' |
functions | void do_catch_up(struct spk_synth *synth)
{
u_char ch;
unsigned long flags;
unsigned long jiff_max;
struct var_t *jiffy_delta;
struct var_t *delay_time;
struct var_t *full_time;
int full_time_val = 0;
int delay_time_val = 0;
int jiffy_delta_val = 0;
jiffy_delta = spk_get_var(JIFFY);
delay_time = spk_get_var... |
functions | __init apollo_init(void)
{
return synth_add(&synth_apollo);
} |
functions | __exit apollo_exit(void)
{
synth_remove(&synth_apollo);
} |
includes |
#include <linux/netlink.h> |
includes | #include <linux/slab.h> |
includes | #include <net/iw_handler.h> |
functions | void zfwMemFree(zdev_t *dev, void *mem, u32_t size)
{
kfree(mem);
return;
} |
functions | void zfwMemoryCopy(u8_t *dst, u8_t *src, u16_t length)
{
/* u16_t i; */
memcpy(dst, src, length);
/*
* for(i=0; i<length; i++)
* {
* dst[i] = src[i];
* } |
functions | void zfwZeroMemory(u8_t *va, u16_t length)
{
/* u16_t i; */
memset(va, 0, length);
/*
* for(i=0; i<length; i++)
* {
* va[i] = 0;
* } |
functions | void zfwMemoryMove(u8_t *dst, u8_t *src, u16_t length)
{
memcpy(dst, src, length);
return;
} |
functions | u8_t zfwMemoryIsEqual(u8_t *m1, u8_t *m2, u16_t length)
{
/* u16_t i; */
int ret;
ret = memcmp(m1, m2, length);
return ((ret == 0) ? TRUE : FALSE);
/*
* for(i=0; i<length; i++)
*{
* if ( m1[i] != m2[i] )
* {
* return FALSE;
* } |
includes |
#include <linux/kernel.h> |
includes | #include <linux/init.h> |
includes | #include <linux/platform_device.h> |
includes | #include <linux/pci.h> |
includes | #include <linux/irq.h> |
includes | #include <linux/mtd/physmap.h> |
includes | #include <linux/mv643xx_eth.h> |
includes | #include <linux/leds.h> |
includes | #include <linux/gpio_keys.h> |
includes | #include <linux/input.h> |
includes | #include <linux/i2c.h> |
includes | #include <linux/ata_platform.h> |
includes | #include <linux/gpio.h> |
includes | #include <asm/mach-types.h> |
includes | #include <asm/mach/arch.h> |
includes | #include <asm/mach/pci.h> |
includes | #include <mach/orion5x.h> |
defines |
#define D2NET_NOR_BOOT_BASE 0xfff80000 |
defines | #define D2NET_NOR_BOOT_SIZE SZ_512K |
defines |
#define D2NET_GPIO_SATA0_POWER 3 |
defines | #define D2NET_GPIO_SATA1_POWER 12 |
defines |
#define D2NET_GPIO_RED_LED 6 |
defines | #define D2NET_GPIO_BLUE_LED_BLINK_CTRL 16 |
defines | #define D2NET_GPIO_BLUE_LED_OFF 23 |
defines |
#define D2NET_GPIO_PUSH_BUTTON 18 |
defines | #define D2NET_GPIO_POWER_SWITCH_ON 8 |
defines | #define D2NET_GPIO_POWER_SWITCH_OFF 9 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.