Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | arch/powerpc/platforms/powermac/backlight.c | void pmac_backlight_set_legacy_brightness_pmu(int brightness) {
if (atomic_read(&kernel_backlight_disabled))
return;
pmac_backlight_set_legacy_queued = brightness;
schedule_work(&pmac_backlight_set_legacy_work);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/backlight.c |
int pmac_backlight_get_legacy_brightness(void) {
int result = -ENXIO;
mutex_lock(&pmac_backlight_mutex);
if (pmac_backlight) {
struct backlight_properties *props;
props = &pmac_backlight->props;
result = props->brightness * (OLD_BACKLIGHT_MAX + 1) /
(props->max_brightness + 1);
}
... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/backlight.c |
void pmac_backlight_enable(void) { atomic_dec(&kernel_backlight_disabled); } | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/bootx_init.c |
static void *__init bootx_early_getprop(unsigned long base, unsigned long node,
char *prop) {
struct bootx_dt_node *np = (struct bootx_dt_node *)(base + node);
u32 *ppp = &np->properties;
while (*ppp) {
struct bootx_dt_prop *pp = (struct bootx_dt_prop *)(base + *ppp);... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/bootx_init.c | static void __init bootx_dt_add_prop(char *name, void *data, int size,
unsigned long *mem_end) {
unsigned long soff = bootx_dt_find_string(name);
if (data == NULL)
size = 0;
if (soff == 0) {
bootx_printf("WARNING: Can't find string index for <%s>\n", name);
return;... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/bootx_init.c |
static void __init bootx_dt_add_string(char *s, unsigned long *mem_end) {
unsigned int l = strlen(s) + 1;
memcpy((void *)*mem_end, s, l);
bootx_dt_strend = *mem_end = *mem_end + l;
} | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/feature.c |
struct macio_chip *macio_find(struct device_node *child, int type) {
while (child) {
int i;
for (i = 0; i < MAX_MACIO_CHIPS && macio_chips[i].of_node; i++)
if (child == macio_chips[i].of_node &&
(!type || macio_chips[i].type == type))
return &macio_chips[i];
child = child->parent... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/feature.c |
static long ohare_floppy_enable(struct device_node *node, long param,
long value) {
return simple_feature_tweak(node, macio_ohare, OHARE_FCR, OH_FLOPPY_ENABLE,
value);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/feature.c | static long ohare_ide_enable(struct device_node *node, long param, long value) {
switch (param) {
case 0:
if (value)
simple_feature_tweak(node, macio_ohare, OHARE_FCR, OH_IOBUS_ENABLE, 1);
return simple_feature_tweak(node, macio_ohare, OHARE_FCR, OH_IDE0_ENABLE,
value)... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/feature.c |
static void heathrow_wakeup(struct macio_chip *macio, int secondary) {
if (secondary) {
MACIO_OUT32(0x38, save_fcr[2]);
(void)MACIO_IN32(0x38);
mdelay(1);
MACIO_OUT32(0x3c, save_fcr[3]);
(void)MACIO_IN32(0x38);
mdelay(10);
dbdma_restore(macio, save_alt_dbdma);
} else {
MACIO_OUT32(0... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/feature.c | static long core99_modem_enable(struct device_node *node, long param,
long value) {
struct macio_chip *macio;
u8 gpio;
unsigned long flags;
/* Hack for internal USB modem */
if (node == NULL) {
if (macio_chips[0].type != macio_keylargo)
return -ENODEV;
node = mac... | [
0,
1
] |
Linux Kernel | arch/powerpc/platforms/powermac/feature.c | static long pangea_modem_enable(struct device_node *node, long param,
long value) {
struct macio_chip *macio;
u8 gpio;
unsigned long flags;
/* Hack for internal USB modem */
if (node == NULL) {
if (macio_chips[0].type != macio_pangea &&
macio_chips[0].type != macio... | [
1,
1
] |
Linux Kernel | arch/powerpc/platforms/powermac/feature.c | static long core99_ide_enable(struct device_node *node, long param,
long value) {
switch (param) {
case 0:
return simple_feature_tweak(node, macio_unknown, KEYLARGO_FCR1,
KL1_EIDE0_ENABLE, value);
case 1:
return simple_feature_tweak(node, maci... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/feature.c |
static long core99_gmac_enable(struct device_node *node, long param,
long value) {
unsigned long flags;
LOCK(flags);
if (value)
UN_BIS(UNI_N_CLOCK_CNTL, UNI_N_CLOCK_CNTL_GMAC);
else
UN_BIC(UNI_N_CLOCK_CNTL, UNI_N_CLOCK_CNTL_GMAC);
(void)UN_IN(UNI_N_CLOCK_CNTL);
UNLOC... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/feature.c | static long core99_firewire_cable_power(struct device_node *node, long param,
long value) {
unsigned long flags;
struct macio_chip *macio;
if ((pmac_mb.board_flags & PMAC_MB_HAS_FW_POWER) == 0)
return -ENODEV;
macio = &macio_chips[0];
if (macio->type != macio_keyla... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/feature.c |
static long core99_read_gpio(struct device_node *node, long param, long value) {
struct macio_chip *macio = &macio_chips[0];
return MACIO_IN8(param);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/feature.c | static long g5_eth_phy_reset(struct device_node *node, long param, long value) {
struct macio_chip *macio = &macio_chips[0];
struct device_node *phy;
int need_reset;
phy = of_get_next_child(node, NULL);
if (!phy)
return -ENODEV;
need_reset = of_device_is_compatible(phy, "B5221");
of_node_put(phy);
... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/feature.c | static long generic_dev_can_wake(struct device_node *node, long param,
long value) {
/* Todo: eventually check we are really dealing with on-board
* video device ...
*/
if (pmac_mb.board_flags & PMAC_MB_MAY_SLEEP)
pmac_mb.board_flags |= PMAC_MB_CAN_SLEEP;
return 0;
} | [
0,
1
] |
Linux Kernel | arch/powerpc/platforms/powermac/feature.c |
void pmac_resume_agp_for_card(struct pci_dev *dev) {
if (pmac_agp_bridge == NULL || pmac_agp_resume == NULL)
return;
if (pmac_agp_bridge->bus != dev->bus)
return;
pmac_agp_resume(pmac_agp_bridge);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/low_i2c.c |
static void kw_i2c_do_stop(struct pmac_i2c_host_kw *host, int result) {
kw_write_reg(reg_control, KW_I2C_CTL_STOP);
host->state = state_stop;
host->result = result;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/low_i2c.c | static irqreturn_t kw_i2c_irq(int irq, void *dev_id) {
struct pmac_i2c_host_kw *host = dev_id;
unsigned long flags;
spin_lock_irqsave(&host->lock, flags);
del_timer(&host->timeout_timer);
kw_i2c_handle_interrupt(host, kw_read_reg(reg_isr));
if (host->state != state_idle) {
host->timeout_timer.expires =... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/low_i2c.c |
static int kw_i2c_open(struct pmac_i2c_bus *bus) {
struct pmac_i2c_host_kw *host = bus->hostdata;
mutex_lock(&host->mutex);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/low_i2c.c |
static void pmu_i2c_complete(struct adb_request *req) { complete(req->arg); } | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/low_i2c.c | static void __init pmu_i2c_probe(void) {
struct pmac_i2c_bus *bus;
struct device_node *busnode;
int channel, sz;
if (!pmu_present())
return;
busnode = of_find_node_by_name(NULL, "pmu-i2c");
if (busnode == NULL)
busnode = of_find_node_by_name(NULL, "via-pmu");
if (busnode == NULL)
return;
... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/low_i2c.c |
u8 pmac_i2c_get_dev_addr(struct device_node *device) {
const u32 *reg = of_get_property(device, "reg", NULL);
if (reg == NULL)
return 0;
return (*reg) & 0xff;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/low_i2c.c |
int pmac_i2c_get_flags(struct pmac_i2c_bus *bus) { return bus->flags; } | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/low_i2c.c |
struct i2c_adapter *pmac_i2c_get_adapter(struct pmac_i2c_bus *bus) {
return &bus->adapter;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/low_i2c.c |
struct pmac_i2c_bus *pmac_i2c_adapter_to_bus(struct i2c_adapter *adapter) {
struct pmac_i2c_bus *bus;
list_for_each_entry(bus, &pmac_i2c_busses,
link) if (&bus->adapter == adapter) return bus;
return NULL;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/low_i2c.c | static void pmac_i2c_do_apply_rmw(struct pmac_i2c_pf_inst *inst, u32 len,
const u8 *mask, const u8 *val) {
int i;
if (inst->quirks & pmac_i2c_quirk_invmask) {
for (i = 0; i < len; i++)
inst->scratch[i] = (inst->buffer[i] & mask[i]) | val[i];
} else {
for (i = 0; i ... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/low_i2c.c |
static void pmac_i2c_dev_resume(struct device_node *np, int quirks) {
DBG("dev_resume(%pOF)\n", np);
pmf_do_functions(np, NULL, 0, PMF_FLAGS_ON_WAKE, NULL);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/low_i2c.c | static int __init pmac_i2c_create_platform_devices(void) {
struct pmac_i2c_bus *bus;
int i = 0;
pmac_i2c_force_poll = 0;
/* Create platform devices */
list_for_each_entry(bus, &pmac_i2c_busses, link) {
bus->platform_dev = platform_device_alloc("i2c-powermac", i++);
if (bus->platform_dev == NULL)
... | [
0,
1
] |
Linux Kernel | arch/powerpc/platforms/powermac/nvram.c |
static ssize_t core99_nvram_read(char *buf, size_t count, loff_t *index) {
int i;
if (nvram_image == NULL)
return -ENODEV;
if (*index > NVRAM_SIZE)
return 0;
i = *index;
if (i + count > NVRAM_SIZE)
count = NVRAM_SIZE - i;
memcpy(buf, &nvram_image[i], count);
*index = i + count;
return co... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/nvram.c |
static ssize_t core99_nvram_write(char *buf, size_t count, loff_t *index) {
int i;
if (nvram_image == NULL)
return -ENODEV;
if (*index > NVRAM_SIZE)
return 0;
i = *index;
if (i + count > NVRAM_SIZE)
count = NVRAM_SIZE - i;
memcpy(&nvram_image[i], buf, count);
*index = i + count;
return c... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/nvram.c |
static unsigned char pmu_nvram_read_byte(int addr) {
struct adb_request req;
DECLARE_COMPLETION_ONSTACK(req_complete);
req.arg = system_state == SYSTEM_RUNNING ? &req_complete : NULL;
if (pmu_request(&req, pmu_nvram_complete, 3, PMU_READ_NVRAM,
(addr >> 8) & 0xff, addr & 0xff))
return 0x... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/nvram.c |
static u32 core99_calc_adler(u8 *buffer) {
int cnt;
u32 low, high;
buffer += CORE99_ADLER_START;
low = 1;
high = 0;
for (cnt = 0; cnt < (NVRAM_SIZE - CORE99_ADLER_START); cnt++) {
if ((cnt % 5000) == 0) {
high %= 65521UL;
high %= 65521UL;
}
low += buffer[cnt];
high += low;
}
... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/nvram.c |
static u32 __init core99_check(u8 *datas) {
struct core99_header *hdr99 = (struct core99_header *)datas;
if (hdr99->hdr.signature != CORE99_SIGNATURE) {
DBG("Invalid signature\n");
return 0;
}
if (hdr99->hdr.cksum != chrp_checksum(&hdr99->hdr)) {
DBG("Invalid checksum\n");
return 0;
}
if (... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/nvram.c | static int amd_write_bank(int bank, u8 *datas) {
int i, stat = 0;
unsigned long timeout;
u8 __iomem *base = (u8 __iomem *)nvram_data + core99_bank * NVRAM_SIZE;
DBG("nvram: AMD Writing bank %d...\n", bank);
for (i = 0; i < NVRAM_SIZE; i++) {
out_8(base + 0x555, 0xaa);
udelay(1);
/* Unlock 2 */... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/nvram.c |
static void __init lookup_partitions(void) {
u8 buffer[17];
int i, offset;
struct chrp_header *hdr;
if (pmac_newworld) {
nvram_partitions[pmac_nvram_OF] = -1;
nvram_partitions[pmac_nvram_XPRAM] = -1;
nvram_partitions[pmac_nvram_NR] = -1;
hdr = (struct chrp_header *)buffer;
offset = 0;
... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/nvram.c |
int pmac_get_partition(int partition) { return nvram_partitions[partition]; } | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pci.c | static int __init fixup_one_level_bus_range(struct device_node *node,
int higher) {
for (; node; node = node->sibling) {
const int *bus_range;
const unsigned int *class_code;
int len;
class_code = of_get_property(node, "class-code", NULL);
if (!class_co... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pci.c | static void __init fixup_bus_range(struct device_node *bridge) {
int *bus_range, len;
struct property *prop;
prop = of_find_property(bridge, "bus-range", &len);
if (prop == NULL || prop->length < 2 * sizeof(int))
return;
bus_range = prop->value;
bus_range[1] = fixup_one_level_bus_range(bridge->child, ... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pci.c | static void __init setup_chaos(struct pci_controller *hose,
struct resource *addr) {
hose->ops = &chaos_pci_ops;
hose->cfg_addr = ioremap(addr->start + 0x800000, 0x1000);
hose->cfg_data = ioremap(addr->start + 0xc00000, 0x1000);
} | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pci.c |
static void __iomem *u3_ht_cfg_access(struct pci_controller *hose, u8 bus,
u8 devfn, u8 offset, int *swap) {
*swap = 1;
if (bus == hose->first_busno) {
if (devfn != 0)
return hose->cfg_data + U3_HT_CFA0(devfn, offset);
*swap = 0;
return ((void __iomem *)hose-... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pci.c | static int u3_ht_read_config(struct pci_bus *bus, unsigned int devfn,
int offset, int len, u32 *val) {
struct pci_controller *hose;
void __iomem *addr;
int swap;
hose = pci_bus_to_host(bus);
if (hose == NULL)
return PCIBIOS_DEVICE_NOT_FOUND;
if (offset >= 0x100)
return ... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pci.c | static void __init init_second_ohare(void) {
struct device_node *np = of_find_node_by_name(NULL, "pci106b,7");
unsigned char bus, devfn;
unsigned short cmd;
if (np == NULL)
return;
if (pci_device_from_OF_node(np, &bus, &devfn) == 0) {
struct pci_controller *hose = pci_find_hose_for_OF_device(np);
... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pci.c | static void __init fixup_nec_usb2(void) {
struct device_node *nec;
for_each_node_by_name(nec, "usb") {
struct pci_controller *hose;
u32 data;
const u32 *prop;
u8 bus, devfn;
prop = of_get_property(nec, "vendor-id", NULL);
if (prop == NULL)
continue;
if (0x1033 != *prop)
con... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pci.c |
static void __init setup_bandit(struct pci_controller *hose,
struct resource *addr) {
hose->ops = ¯isc_pci_ops;
hose->cfg_addr = ioremap(addr->start + 0x800000, 0x1000);
hose->cfg_data = ioremap(addr->start + 0xc00000, 0x1000);
init_bandit(hose);
} | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pci.c | static int __init setup_uninorth(struct pci_controller *hose,
struct resource *addr) {
pci_add_flags(PCI_REASSIGN_ALL_BUS);
has_uninorth = 1;
hose->ops = ¯isc_pci_ops;
hose->cfg_addr = ioremap(addr->start + 0x800000, 0x1000);
hose->cfg_data = ioremap(addr->start + 0xc00000... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pci.c | static int pmac_pci_root_bridge_prepare(struct pci_host_bridge *bridge) {
struct pci_controller *hose = pci_bus_to_host(bridge->bus);
struct device_node *np, *child;
if (hose != u3_agp)
return 0;
np = hose->dn;
PCI_DN(np)->busno = 0xf0;
for_each_child_of_node(np, child) PCI_DN(child)->busno = 0xf0;
... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pci.c | void __init pmac_pcibios_after_init(void) {
struct device_node *nd;
for_each_node_by_name(nd, "firewire") {
if (nd->parent &&
(of_device_is_compatible(nd, "pci106b,18") ||
of_device_is_compatible(nd, "pci106b,30") ||
of_device_is_compatible(nd, "pci11c1,5811")) &&
of_device_is... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pci.c | static void pmac_pci_fixup_pciata(struct pci_dev *dev) {
u8 progif = 0;
if (!machine_is(powermac))
return;
/* Some controllers don't have the class IDE */
if (dev->vendor == PCI_VENDOR_ID_PROMISE)
switch (dev->device) {
case PCI_DEVICE_ID_PROMISE_20246:
case PCI_DEVICE_ID_PROMISE_20262:
ca... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pci.c | static void fixup_k2_sata(struct pci_dev *dev) {
int i;
u16 cmd;
if (PCI_FUNC(dev->devfn) > 0) {
pci_read_config_word(dev, PCI_COMMAND, &cmd);
cmd &= ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY);
pci_write_config_word(dev, PCI_COMMAND, cmd);
for (i = 0; i < 6; i++) {
dev->resource[i].start = dev-... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pci.c | static int pmac_pci_probe_mode(struct pci_bus *bus) {
struct device_node *node = pci_bus_to_OF_node(bus);
if (bus->self == NULL && (of_device_is_compatible(node, "u3-agp") ||
of_device_is_compatible(node, "u4-pcie") ||
of_device_is_compatible(node, "u3-ht")))... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pfunc_base.c | static int macio_do_delay(PMF_STD_ARGS, u32 duration) {
msleep((duration + 999) / 1000);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pfunc_base.c |
static int macio_do_write_reg8(PMF_STD_ARGS, u32 offset, u8 value, u8 mask) {
struct macio_chip *macio = func->driver_data;
unsigned long flags;
raw_spin_lock_irqsave(&feature_lock, flags);
MACIO_OUT8(offset, (MACIO_IN8(offset) & ~mask) | (value & mask));
raw_spin_unlock_irqrestore(&feature_lock, flags);
... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pfunc_base.c | static int macio_do_read_reg8_msrx(PMF_STD_ARGS, u32 offset, u32 mask,
u32 shift, u32 xor) {
struct macio_chip *macio = func->driver_data;
if (args == NULL || args->count == 0 || args->u[0].p == NULL)
return -EINVAL;
*((u8 *)(args->u[0].p)) = ((MACIO_IN8(offset) & mask) >>... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pfunc_base.c | static int unin_do_write_reg32(PMF_STD_ARGS, u32 offset, u32 value, u32 mask) {
unsigned long flags;
raw_spin_lock_irqsave(&feature_lock, flags);
UN_OUT(offset, (UN_IN(offset) & ~mask) | (value & mask));
raw_spin_unlock_irqrestore(&feature_lock, flags);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pfunc_core.c |
static int pmf_parser_write_reg32(struct pmf_cmd *cmd, struct pmf_handlers *h) {
u32 offset = pmf_next32(cmd);
u32 value = pmf_next32(cmd);
u32 mask = pmf_next32(cmd);
LOG_PARSE("pmf: write_reg32(offset: %08x, value: %08x, mask: %08x)\n", offset,
value, mask);
PMF_PARSE_CALL(write_reg32, cmd, h... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pfunc_core.c |
static int pmf_parser_read_reg32(struct pmf_cmd *cmd, struct pmf_handlers *h) {
u32 offset = pmf_next32(cmd);
LOG_PARSE("pmf: read_reg32(offset: %08x)\n", offset);
PMF_PARSE_CALL(read_reg32, cmd, h, offset);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pfunc_core.c |
static int pmf_parser_write_reg16(struct pmf_cmd *cmd, struct pmf_handlers *h) {
u32 offset = pmf_next32(cmd);
u16 value = (u16)pmf_next32(cmd);
u16 mask = (u16)pmf_next32(cmd);
LOG_PARSE("pmf: write_reg16(offset: %08x, value: %04x, mask: %04x)\n", offset,
value, mask);
PMF_PARSE_CALL(write_re... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pfunc_core.c |
static int pmf_parser_delay(struct pmf_cmd *cmd, struct pmf_handlers *h) {
u32 duration = pmf_next32(cmd);
LOG_PARSE("pmf: delay(duration: %d us)\n", duration);
PMF_PARSE_CALL(delay, cmd, h, duration);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pfunc_core.c |
static int pmf_parser_rmw_i2c_sub(struct pmf_cmd *cmd, struct pmf_handlers *h) {
u8 subaddr = (u8)pmf_next32(cmd);
u32 maskbytes = pmf_next32(cmd);
u32 valuesbytes = pmf_next32(cmd);
u32 totalbytes = pmf_next32(cmd);
const void *maskblob = pmf_next_blob(cmd, maskbytes);
const void *valuesblob = pmf_next_b... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pfunc_core.c |
static int pmf_parser_read_reg32_msrx(struct pmf_cmd *cmd,
struct pmf_handlers *h) {
u32 offset = pmf_next32(cmd);
u32 mask = pmf_next32(cmd);
u32 shift = pmf_next32(cmd);
u32 xor = pmf_next32(cmd);
LOG_PARSE("pmf: read_reg32_msrx(offset: %x, mask: %x, shift: %x,"
... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pfunc_core.c | static int pmf_parse_one(struct pmf_function *func,
struct pmf_handlers *handlers, void *instdata,
struct pmf_args *args) {
struct pmf_cmd cmd;
u32 ccode;
int count, rc;
cmd.cmdptr = func->data;
cmd.cmdend = func->data + func->length;
cmd.func = func;
cmd... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pfunc_core.c | static int pmf_add_function_prop(struct pmf_device *dev, void *driverdata,
const char *name, u32 *data,
unsigned int length) {
int count = 0;
struct pmf_function *func = NULL;
DBG("pmf: Adding functions for platform-do-%s\n", name);
while (leng... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pfunc_core.c |
static void pmf_release_function(struct kref *kref) {
struct pmf_function *func = container_of(kref, struct pmf_function, ref);
pmf_put_device(func->dev);
kfree(func);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pfunc_core.c | void pmf_do_irq(struct pmf_function *func) {
unsigned long flags;
struct pmf_irq_client *client;
spin_lock_irqsave(&pmf_lock, flags);
list_for_each_entry(client, &func->irq_clients, link) {
if (!try_module_get(client->owner))
continue;
client->handler(client->data);
module_put(client->owner);... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pfunc_core.c |
int pmf_call_one(struct pmf_function *func, struct pmf_args *args) {
struct pmf_device *dev = func->dev;
void *instdata = NULL;
int rc = 0;
DBG(" ** pmf_call_one(%pOF/%s) **\n", dev->node, func->name);
if (dev->handlers->begin)
instdata = dev->handlers->begin(func, args);
rc = pmf_parse_one(func, de... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pfunc_core.c |
int pmf_do_functions(struct device_node *np, const char *name, u32 phandle,
u32 fflags, struct pmf_args *args) {
struct pmf_device *dev;
struct pmf_function *func, *tmp;
unsigned long flags;
int rc = -ENODEV;
spin_lock_irqsave(&pmf_lock, flags);
dev = pmf_find_device(np);
if (dev =... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pfunc_core.c |
int pmf_call_function(struct device_node *target, const char *name,
struct pmf_args *args) {
struct pmf_function *func = pmf_find_function(target, name);
int rc;
if (func == NULL)
return -ENODEV;
rc = pmf_call_one(func, args);
pmf_put_function(func);
return rc;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pic.c | static void __pmac_set_irq_mask(unsigned int irq_nr, int nokicklost) {
unsigned long bit = 1UL << (irq_nr & 0x1f);
int i = irq_nr >> 5;
if ((unsigned)irq_nr >= max_irqs)
return;
out_le32(&pmac_irq_hw[i]->enable, ppc_cached_irq_mask[i]);
do {
/* make sure mask gets to controller before we
ret... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pic.c |
static irqreturn_t gatwick_action(int cpl, void *dev_id) {
unsigned long flags;
int irq, bits;
int rc = IRQ_NONE;
raw_spin_lock_irqsave(&pmac_pic_lock, flags);
for (irq = max_irqs; (irq -= 32) >= max_real_irqs;) {
int i = irq >> 5;
bits = in_le32(&pmac_irq_hw[i]->event) | ppc_lost_interrupts[i];
... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pic.c | static unsigned int pmac_pic_get_irq(void) {
int irq;
unsigned long bits = 0;
unsigned long flags;
#ifdef CONFIG_PPC_PMAC32_PSURGE
/* IPI's are a hack on the powersurge -- Cort */
if (smp_processor_id() != 0) {
return psurge_secondary_virq;
}
#endif /* CONFIG_PPC_PMAC32_PSURGE */
raw_spin_lock_irqsav... | [
1,
1
] |
Linux Kernel | arch/powerpc/platforms/powermac/pic.c | static int __init pmac_pic_probe_mpic(void) {
struct mpic *mpic1, *mpic2;
struct device_node *np, *master = NULL, *slave = NULL;
for_each_node_by_type(np, "open-pic") {
if (master == NULL && of_get_property(np, "interrupts", NULL) == NULL)
master = of_node_get(np);
else if (slave == NULL)
sla... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pic.c | void __init pmac_pic_init(void) {
#ifdef CONFIG_PPC32
if (!pmac_newworld)
of_irq_workarounds |= OF_IMAP_OLDWORLD_MAC;
if (of_get_property(of_chosen, "linux,bootx", NULL) != NULL)
of_irq_workarounds |= OF_IMAP_NO_PHANDLE;
/* If we don't have phandles on a newworld, then try to locate a
* default inter... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/pic.c | static int pmacpic_suspend(void) {
int viaint = pmacpic_find_viaint();
sleep_save_mask[0] = ppc_cached_irq_mask[0];
sleep_save_mask[1] = ppc_cached_irq_mask[1];
ppc_cached_irq_mask[0] = 0;
ppc_cached_irq_mask[1] = 0;
if (viaint > 0)
set_bit(viaint, ppc_cached_irq_mask);
out_le32(&pmac_irq_hw[0]->enab... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/setup.c | int __init find_via_cuda(void) {
struct device_node *dn = of_find_node_by_name(NULL, "via-cuda");
if (!dn)
return 0;
of_node_put(dn);
printk("WARNING ! Your machine is CUDA-based but your kernel\n");
printk(" wasn't compiled with CONFIG_ADB_CUDA option !\n");
return 0;
}
#endif
#ifndef CONFIG... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/setup.c | int __init smu_init(void) { return 0; }
#endif
#ifdef CONFIG_PPC32 | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/setup.c | static void __init ohare_init(void) {
struct device_node *dn;
sysctrl_regs = (volatile u32 *)ioremap(0xf8000000, 0x1000);
/*
* Turn on the L2 cache.
* We assume that we have a PSX memory controller iff
* we have an ohare I/O controller.
*/
dn = of_find_node_by_name(NULL, "ohare");
if (dn) {
... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/setup.c | void __ref note_bootable_part(dev_t dev, int part, int goodness) {
char *p;
if (!initializing)
return;
if ((goodness <= current_root_goodness) && ROOT_DEV != DEFAULT_ROOT_DEVICE)
return;
p = strstr(boot_command_line, "root=");
if (p != NULL && (p == boot_command_line || p[-1] == ' '))
return;
... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/setup.c |
static void __noreturn pmac_halt(void) { pmac_power_off(); } | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/smp.c |
static inline void psurge_clr_ipi(int cpu) {
if (cpu > 0) {
switch (psurge_type) {
case PSURGE_DUAL:
out_8(psurge_sec_intr, ~0);
break;
case PSURGE_NONE:
break;
default:
PSURGE_QUAD_OUT(PSURGE_QUAD_IRQ_CLR, 1 << cpu);
}
}
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/smp.c | static int __init psurge_quad_probe(void) {
int type;
unsigned int i;
type = PSURGE_QUAD_IN(PSURGE_QUAD_BOARD_ID);
if (type < PSURGE_QUAD_OKEE || type > PSURGE_QUAD_ICEGRASS ||
type != PSURGE_QUAD_IN(PSURGE_QUAD_BOARD_ID))
return PSURGE_DUAL;
/* bogus is not necessarily cacheline-aligned,
tho... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/smp.c | void __init smp_psurge_give_timebase(void) {} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/smp.c | static int smp_core99_kick_cpu(int nr) {
unsigned int save_vector;
unsigned long target, flags;
unsigned int *vector = (unsigned int *)(PAGE_OFFSET + 0x100);
if (nr < 0 || nr > 3)
return -ENOENT;
if (ppc_md.progress)
ppc_md.progress("smp_core99_kick_cpu", 0x346);
local_irq_save(flags);
save_ve... | [
1,
1
] |
Linux Kernel | arch/powerpc/platforms/powermac/smp.c |
static int smp_core99_cpu_disable(void) {
int rc = generic_cpu_disable();
if (rc)
return rc;
mpic_cpu_set_priority(0xf);
cleanup_cpu_mmu_context();
return 0;
}
#ifdef CONFIG_PPC32 | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/smp.c | void __init pmac_setup_smp(void) {
struct device_node *np;
np = of_find_node_by_name(NULL, "uni-n");
if (!np)
np = of_find_node_by_name(NULL, "u3");
if (!np)
np = of_find_node_by_name(NULL, "u4");
if (np) {
of_node_put(np);
smp_ops = &core99_smp_ops;
}
#ifdef CONFIG_PPC_PMAC32_PSURGE
else... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/udbg_adb.c | static int udbg_adb_local_getc(void) {
int k, t, on;
xmon_wants_key = 1;
for (;;) {
xmon_adb_keycode = -1;
t = 0;
on = 0;
k = -1;
do {
if (--t < 0) {
on = 1 - on;
btext_drawchar(on ? 0xdb : 0x20);
btext_drawchar('\b');
t = 200000;
}
udbg_adb_p... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/udbg_adb.c |
static int udbg_adb_getc(void) {
#ifdef CONFIG_BOOTX_TEXT
if (udbg_adb_use_btext && input_type != input_adb_none)
return udbg_adb_local_getc();
#endif
if (udbg_adb_old_getc)
return udbg_adb_old_getc();
return -1;
} | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/udbg_adb.c |
void __init udbg_adb_init_early(void) {
#ifdef CONFIG_BOOTX_TEXT
if (btext_find_display(1) == 0) {
udbg_adb_use_btext = 1;
udbg_putc = udbg_adb_putc;
}
#endif
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/udbg_adb.c | int __init udbg_adb_init(int force_btext) {
struct device_node *np;
udbg_adb_old_putc = udbg_putc;
udbg_adb_old_getc = udbg_getc;
udbg_adb_old_getc_poll = udbg_getc_poll;
/* Check if our early init was already called */
if (udbg_adb_old_putc == udbg_adb_putc)
udbg_adb_old_putc = NULL;
#ifdef CONFIG_BO... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/udbg_scc.c | static void udbg_real_scc_putc(char c) {
while ((real_readb(sccc) & SCC_TXRDY) == 0)
;
real_writeb(c, sccd);
if (c == '\n')
udbg_real_scc_putc('\r');
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powermac/udbg_scc.c |
void __init udbg_init_pmac_realmode(void) {
sccc = (volatile u8 __iomem *)0x80013020ul;
sccd = (volatile u8 __iomem *)0x80013030ul;
udbg_putc = udbg_real_scc_putc;
udbg_getc = NULL;
udbg_getc_poll = NULL;
} | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powernv/copy-paste.h | static inline int vas_copy(void *crb, int offset) {
asm volatile(PPC_COPY(% 0, % 1) ";" : : "b"(offset), "b"(crb) : "memory");
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powernv/eeh-powernv.c |
static s64 pnv_eeh_poll(unsigned long id) {
s64 rc = OPAL_HARDWARE;
while (1) {
rc = opal_pci_poll(id);
if (rc <= 0)
break;
if (system_state < SYSTEM_RUNNING)
udelay(1000 * rc);
else
msleep(rc);
}
return rc;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powernv/eeh-powernv.c | static int pnv_eeh_bridge_reset(struct pci_dev *pdev, int option) {
struct pci_controller *hose = pci_bus_to_host(pdev->bus);
struct pnv_phb *phb = hose->private_data;
struct device_node *dn = pci_device_to_OF_node(pdev);
uint64_t id =
PCI_SLOT_ID(phb->opal_id, (pdev->bus->number << 8) | pdev->devfn);
u... | [
1,
0
] |
Linux Kernel | arch/powerpc/platforms/powernv/eeh-powernv.c |
void pnv_pci_reset_secondary_bus(struct pci_dev *dev) {
struct pci_controller *hose;
if (pci_is_root_bus(dev->bus)) {
hose = pci_bus_to_host(dev->bus);
pnv_eeh_root_reset(hose, EEH_RESET_HOT);
pnv_eeh_root_reset(hose, EEH_RESET_DEACTIVATE);
} else {
pnv_eeh_bridge_reset(dev, EEH_RESET_HOT);
... | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powernv/eeh-powernv.c | static int pnv_eeh_configure_bridge(struct eeh_pe *pe) { return 0; } | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powernv/idle.c |
static void power7_idle(void) {
if (!powersave_nap)
return;
power7_idle_type(PNV_THREAD_NAP);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/platforms/powernv/idle.c | void pnv_power9_force_smt4_release(void) {
int cpu, cpu0, thr;
cpu = smp_processor_id();
cpu0 = cpu & ~(threads_per_core - 1);
for (thr = 0; thr < threads_per_core; ++thr) {
if (cpu != cpu0 + thr)
atomic_dec(&paca_ptrs[cpu0 + thr]->dont_stop);
}
} | [
1,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.