type
stringclasses
5 values
content
stringlengths
9
163k
functions
int mpc83xx_pcie_remap_cfg(struct pci_controller *hose, pci_dev_t dev) { int bus = PCI_BUS(dev) - hose->first_busno; immap_t *immr = (immap_t *)CONFIG_SYS_IMMR; pex83xx_t *pex = &immr->pciexp[bus]; struct pex_outbound_window *out_win = &pex->bridge.pex_outbound_win[0]; u8 devfn = PCI_DEV(dev) << 3 | PCI_FUNC(dev);...
functions
void mpc83xx_pcie_register_hose(int bus, struct pci_region *reg, u8 link) { extern void disable_addr_trans(void); /* start.S */ static struct pci_controller pcie_hose[PCIE_MAX_BUSES]; struct pci_controller *hose = &pcie_hose[bus]; int i; /* * There are no spare BATs to remap all PCI-E windows for U-B...
functions
void mpc83xx_pcie_register_hose(int bus, struct pci_region *reg, u8 link) {}
functions
void mpc83xx_pcie_init_bus(int bus, struct pci_region *reg) { immap_t *immr = (immap_t *)CONFIG_SYS_IMMR; pex83xx_t *pex = &immr->pciexp[bus]; struct pex_outbound_window *out_win; struct pex_inbound_window *in_win; void *hose_cfg_base; unsigned int ram_sz; unsigned int barl; unsigned int tar; u16 reg16; int i...
functions
void mpc83xx_pcie_init(int num_buses, struct pci_region **reg, int warmboot) { int i; /* * Release PCI RST Output signal. * Power on to RST high must be at least 100 ms as per PCI spec. * On warm boots only 1 ms is required. */ udelay(warmboot ? 1000 : 100000); for (i = 0; i < num_buses; i++) mpc83xx_pc...
includes
#include <iprt/mem.h>
includes
#include <iprt/assert.h>
includes
#include <iprt/err.h>
defines
#define REVERSE 0x00000200
functions
qboolean Touch_Breakable (edict_t *self, edict_t *activator) { /* not yet broken */ if (self->HP != 0) return qfalse; /** @todo check that the actor is standing upon the breakable */ if (G_IsActor(activator)) G_ActorFall(activator); return qfalse; }
functions
qboolean Destroy_Breakable (edict_t *self) { vec3_t origin; const char *model = self->model; VectorCenterFromMinsMaxs(self->absmin, self->absmax, origin); /* the HP value is used to decide whether this was a triggered call or a * call during a fight - a triggered call will be handled differently in * terms of...
functions
void SP_func_breakable (edict_t *ent) { ent->classname = "breakable"; ent->type = ET_BREAKABLE; ent->flags |= FL_DESTROYABLE; /* set an inline model */ gi.SetModel(ent, ent->model); ent->solid = SOLID_BSP; gi.LinkEdict(ent); Com_DPrintf(DEBUG_GAME, "func_breakable: model (%s) num: %i mins: %i %i %i maxs: %i ...
functions
void Door_SlidingUse (edict_t *door) { const qboolean open = door->doorState == STATE_OPENED; vec3_t moveAngles, moveDir, distanceVec; int distance; /* get the movement angle vector - a negative speed value will close the door*/ GET_SLIDING_DOOR_SHIFT_VECTOR(door->dir, open ? 1 : -1, moveAngles); /* get the dir...
functions
qboolean Door_Use (edict_t *door, edict_t *activator) { if (door->doorState == STATE_CLOSED) { door->doorState = STATE_OPENED; /* change rotation/origin and relink */ if (door->type == ET_DOOR) { if (door->dir & DOOR_OPEN_REVERSE) door->angles[door->dir & 3] -= DOOR_ROTATION_ANGLE; else door->angl...
functions
else if (door->type == ET_DOOR_SLIDING) { Door_SlidingUse(door); }
functions
else if (door->doorState == STATE_OPENED) { door->doorState = STATE_CLOSED; /* change rotation and relink */ if (door->type == ET_DOOR) { if (door->dir & DOOR_OPEN_REVERSE) door->angles[door->dir & 3] += DOOR_ROTATION_ANGLE; else door->angles[door->dir & 3] -= DOOR_ROTATION_ANGLE; }
functions
else if (door->type == ET_DOOR_SLIDING) { Door_SlidingUse(door); }
functions
qboolean Touch_DoorTrigger (edict_t *self, edict_t *activator) { if (self->owner && self->owner->inuse) { if (G_IsAI(activator)) { /* let the ai interact with the door */ if (self->flags & FL_GROUPSLAVE) self = self->groupMaster; if (AI_CheckUsingDoor(activator, self->owner)) G_ActorUseDoor(activato...
functions
void Reset_DoorTrigger (edict_t *self, edict_t *activator) { if (activator->clientAction == self->owner) G_ActorSetClientAction(activator, NULL); }
functions
void SP_func_door (edict_t *ent) { edict_t *other; ent->classname = "door"; ent->type = ET_DOOR; if (!ent->noise) ent->noise = "doors/open_close"; /* set an inline model */ gi.SetModel(ent, ent->model); ent->solid = SOLID_BSP; gi.LinkEdict(ent); ent->doorState = STATE_CLOSED; ent->dir = YAW; if (ent->sp...
functions
void SP_func_door_sliding (edict_t *ent) { ent->classname = "doorsliding"; ent->type = ET_DOOR_SLIDING; if (!ent->noise) ent->noise = "doors/slide"; /* set an inline model */ gi.SetModel(ent, ent->model); ent->solid = SOLID_BSP; gi.LinkEdict(ent); if (ent->spawnflags & REVERSE) ent->dir |= DOOR_OPEN_REVER...
functions
void SP_func_rotating (edict_t *ent) { ent->classname = "rotating"; ent->type = ET_ROTATING; /* set an inline model */ gi.SetModel(ent, ent->model); ent->solid = SOLID_BSP; gi.LinkEdict(ent); /* the lower, the faster */ if (!ent->speed) ent->speed = 50; if (ent->HP) ent->flags |= FL_DESTROYABLE; ent->...
includes
#include <math.h>
defines
#define LARGE 1.0e+5f
defines
#define SMALL 1.0e-3f
functions
float v_sol(const float p[3], const float v[3], float r) { float a = v_dot(v, v); float b = v_dot(v, p) * 2.0f; float c = v_dot(p, p) - r * r; float d = b * b - 4.0f * a * c; /* HACK: This seems to cause failures to detect low-velocity collision Yet, the potential division by zero below seems ...
functions
float v_vert(float Q[3], const float o[3], const float q[3], const float w[3], const float p[3], const float v[3], float r) { float O[3], P[3], V[3]; float t = LARGE; v_add(O, o, q); v_sub(P, p, O); ...
functions
float v_edge(float Q[3], const float o[3], const float q[3], const float u[3], const float w[3], const float p[3], const float v[3], float r) { float d[3], e[3]; float P[3], V[3]; float du...
functions
float v_side(float Q[3], const float o[3], const float w[3], const float n[3], float d, const float p[3], const float v[3], float r) { float vn = v_dot(v, n); float wn = v_dot(w, n); float t = LARGE; if...
functions
else if (0.0f <= a) { t = 0; v_mad(Q, p, v, +t); v_mad(Q, Q, n, -r); }
functions
float sol_bounce(struct v_ball *up, const float q[3], const float w[3], float dt) { float n[3], r[3], d[3], vn, wn; float *p = up->p; float *v = up->v; /* Find the normal of the impact. */ v_sub(r, p, q); v_sub(d, v, w); v_nrm(n, r); /* ...
functions
float sol_test_vert(float dt, float T[3], const struct v_ball *up, const struct b_vert *vp, const float o[3], const float w[3]) { return v_vert(T, o, vp->p, w, up->p, up->v, up->r);...
functions
float sol_test_edge(float dt, float T[3], const struct v_ball *up, const struct s_base *base, const struct b_edge *ep, const float o[3], const float w[3]) { ...
functions
float sol_test_side(float dt, float T[3], const struct v_ball *up, const struct s_base *base, const struct b_lump *lp, const struct b_side *sp, const float o[...
functions
int sol_test_fore(float dt, const struct v_ball *up, const struct b_side *sp, const float o[3], const float w[3]) { float q[3], d; /* If the ball is not behind the plane, the test passes. */ v_sub(q, up->p,...
functions
int sol_test_back(float dt, const struct v_ball *up, const struct b_side *sp, const float o[3], const float w[3]) { float q[3], d; /* If the ball is not in front of the plane, the test passes. */ v_sub(q, u...
functions
float sol_test_lump(float dt, float T[3], const struct v_ball *up, const struct s_base *base, const struct b_lump *lp, const float o[3], const float w[3]) { ...
functions
float sol_test_node(float dt, float T[3], const struct v_ball *up, const struct s_base *base, const struct b_node *np, const float o[3], const float w[3]) { ...
functions
float sol_test_body(float dt, float T[3], float V[3], const struct v_ball *up, const struct s_vary *vary, const struct v_body *bp) { float U[3], O[3], E[4], W[3], u; const struct b_node *np = vary->base-...
functions
float sol_test_file(float dt, float T[3], float V[3], const struct v_ball *up, const struct s_vary *vary) { float U[3], W[3], u, t = dt; int i; for (i = 0; i < vary->bc; i++) { const struct v_body *bp = vary->bv + ...
functions
void ms_init(void) { ms_accum = 0.0f; }
functions
int ms_step(float dt) { int ms = 0; ms_accum += dt; while (ms_accum >= 0.001f) { ms_accum -= 0.001f; ms += 1; }
functions
int ms_peek(float dt) { int ms = 0; float at; at = ms_accum + dt; while (at >= 0.001f) { at -= 0.001f; ms += 1; }
functions
float sol_step(struct s_vary *vary, const float *g, float dt, int ui, int *m) { float P[3], V[3], v[3], r[3], a[3], d, e, nt, b = 0.0f, tt = dt; int c; union cmd cmd; if (ui < vary->uc) { struct v_ball *up = vary->uv + ui; /* If the ball is in contact with a surface, apply frictio...
functions
void sol_init_sim(struct s_vary *vary) { ms_init(); }
functions
void sol_quit_sim(void) { return; }
includes
#include <common.h>
includes
#include <command.h>
includes
#include <asm/soc.h>
includes
#include <asm/socregs.h>
includes
#include <asm/io.h>
includes
#include <asm/pio.h>
defines
#define PIOALT(port, pin, alt, dir) \
defines
#define PIOALT(port, pin, alt, dir) \
functions
void flashWriteEnable(void) { /* Enable Vpp for writing to flash */ /* Nothing to do! */ }
functions
void flashWriteDisable(void) { /* Disable Vpp for writing to flash */ /* Nothing to do! */ }
functions
void configPIO(void) { /* Setup PIOs for ASC device */ #if defined(CONFIG_ST40_STXH415) #if CONFIG_SYS_STM_ASC_BASE == STXH415_ASC2_BASE /* Route UART2 via PIO17 for TX, RX, CTS & RTS (Alternative #1) */ PIOALT(17, 4, 2, stm_pad_direction_output); /* UART2-TX */ PIOALT(17, 5, 2, stm_pad_direction_input); /* UART2...
functions
void stmac_phy_reset(void) { /* * Reset the Ethernet PHY. */ STPIO_SET_PIN2(GMII_PHY_NOT_RESET, 0); udelay(10000); /* 10 ms */ STPIO_SET_PIN2(GMII_PHY_NOT_RESET, 1); udelay(10000); /* 10 ms */ }
functions
void stmac_set_mac_speed(int speed) { /* Manage the MAC speed */ STPIO_SET_PIN2(GMII_PHY_CLKOUT_NOT_TXCLK_SEL, (speed==1000)?1:0); }
functions
int board_init(void) { configPIO(); #if 0 /* QQQ - TO IMPLEMENT */ #if defined(CONFIG_ST40_STM_SATA) stx7105_configure_sata (); #endif /* CONFIG_ST40_STM_SATA */ #endif /* QQQ - TO IMPLEMENT */ /* * B2032A (MII) Ethernet card (*not* GMII) * On B2000B board, to get GMAC0 working make sure that jumper * on PIN 9-1...
functions
int checkboard (void) { printf ("\n\nBoard: B2000" #if defined(CONFIG_ST40_STXH415) "-STxH415" #elif defined(CONFIG_ST40_STXH416) "-STxH416" #endif #ifdef CONFIG_ST40_SE_MODE " [32-bit mode]" #else " [29-bit mode]" #endif "\n"); #if defined(CONFIG_SOFT_SPI) /* * Configure for the SPI Serial Flash. * ...
includes
#include <iprt/err.h>
includes
#include <iprt/mp.h>
includes
#include <iprt/cpuset.h>
includes
#include <iprt/string.h>
includes
#include <iprt/thread.h>
functions
int rtMpNotificationCpuEvent(cpu_setup_t CpuState, int iCpu, void *pvArg) { RTMPEVENT enmMpEvent; /* * Update our CPU set structures first regardless of whether we've been * scheduled on the right CPU or not, this is just atomic accounting. */ if (CpuState == CPU_ON) { enmMpEvent...
functions
else if (CpuState == CPU_OFF) { enmMpEvent = RTMPEVENT_OFFLINE; RTCpuSetDel(&g_rtMpSolCpuSet, iCpu); }
includes
#include <linux/delay.h>
includes
#include <linux/earlysuspend.h>
includes
#include <linux/firmware.h>
includes
#include <linux/gpio.h>
includes
#include <linux/i2c.h>
includes
#include <linux/init.h>
includes
#include <linux/input.h>
includes
#include <linux/input/mt.h>
includes
#include <linux/interrupt.h>
includes
#include <linux/irq.h>
includes
#include <linux/module.h>
includes
#include <linux/mutex.h>
includes
#include <linux/slab.h>
includes
#include <mach/gpio.h>
includes
#include <linux/uaccess.h>
includes
#include <mach/cpufreq.h>
includes
#include <mach/dev.h>
includes
#include <linux/platform_data/mms_ts.h>
includes
#include <asm/unaligned.h>
defines
#define DEBUG
defines
#define SEC_TSP_FACTORY_TEST
defines
#define SEC_TSP_FW_UPDATE
defines
#define TSP_BUF_SIZE 1024
defines
#define FAIL -1
defines
#define MAX_FINGERS 10
defines
#define MAX_WIDTH 30
defines
#define MAX_PRESSURE 255
defines
#define MAX_ANGLE 90
defines
#define MIN_ANGLE -90
defines
#define MMS_MODE_CONTROL 0x01
defines
#define MMS_XYRES_HI 0x02
defines
#define MMS_XRES_LO 0x03