Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
arch/powerpc/perf/power9-pmu.c
static int power9_get_alternatives(u64 event, unsigned int flags, u64 alt[]) { int num_alt = 0; num_alt = isa207_get_alternatives(event, alt, ARRAY_SIZE(power9_event_alternatives), flags, power9_event_alternatives); return num_alt; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/perf/power9-pmu.c
static u64 power9_bhrb_filter_map(u64 branch_sample_type) { u64 pmu_bhrb_filter = 0; /* No branch filter requested */ if (branch_sample_type & PERF_SAMPLE_BRANCH_ANY) return pmu_bhrb_filter; /* Invalid branch filter options - HW does not support */ if (branch_sample_type & PERF_SAMPLE_BRANCH_ANY_RETURN)...
[ 0, 0 ]
Linux Kernel
arch/powerpc/perf/power9-pmu.c
int __init init_power9_pmu(void) { int rc = 0; unsigned int pvr = mfspr(SPRN_PVR); if (PVR_VER(pvr) != PVR_POWER9) return -ENODEV; if (!(pvr & PVR_POWER9_CUMULUS)) { if ((PVR_CFG(pvr) == 2) && (PVR_MIN(pvr) == 1)) { power9_pmu.blacklist_ev = p9_dd21_bl_ev; power9_pmu.n_blacklist_ev = ARRAY...
[ 1, 0 ]
Linux Kernel
arch/powerpc/perf/ppc970-pmu.c
static int p970_get_alternatives(u64 event, unsigned int flags, u64 alt[]) { alt[0] = event; if (event == 0x2002 || event == 0x3002) { alt[1] = event ^ 0x1000; return 2; } return 1; }
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/44x/canyonlands.c
static int __init ppc460ex_device_probe(void) { of_platform_bus_probe(NULL, ppc460ex_of_bus, NULL); return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/44x/fsp2.c
static void __init fsp2_irq_init(void) { uic_init_tree(); critical_irq_setup(); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/44x/idle.c
int __init ppc44x_idle_init(void) { if (!mode_spin) { ppc_md.power_save = &ppc44x_idle; } return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/44x/iss4xx.c
static int smp_iss4xx_kick_cpu(int cpu) { struct device_node *cpunode = of_get_cpu_node(cpu, NULL); const u64 *spin_table_addr_prop; u32 *spin_table; extern void start_secondary_47x(void); BUG_ON(cpunode == NULL); spin_table_addr_prop = of_get_property(cpunode, "cpu-release-addr", NULL); if (spin_table_...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/44x/iss4xx.c
static void __init iss4xx_smp_init(void) {} #endif
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/44x/ppc476.c
static void __noreturn avr_halt_system(int pwrctl_flags) { i2c_smbus_write_byte_data(avr_i2c_client, AVR_PWRCTL_CMD, pwrctl_flags); /* Wait for system to be reset */ while (1) ; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/44x/ppc476.c
static void avr_power_off_system(void) { avr_halt_system(AVR_PWRCTL_PWROFF); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/44x/ppc476.c
static void __noreturn avr_reset_system(char *cmd) { avr_halt_system(AVR_PWRCTL_RESET); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/44x/warp.c
static int __init warp_probe(void) { if (!of_machine_is_compatible("pika,warp")) return 0; return 1; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/44x/warp.c
int pika_dtm_unregister_shutdown(void (*func)(void *arg), void *arg) { struct dtm_shutdown *shutdown; list_for_each_entry(shutdown, &dtm_shutdown_list, list) if (shutdown->func == func && shutdown->arg == arg) { list_del(&shutdown->list); kfree(shutdow...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/44x/warp.c
static irqreturn_t temp_isr(int irq, void *context) { struct dtm_shutdown *shutdown; int value = 1; local_irq_disable(); gpio_set_value(green_led, 0); list_for_each_entry(shutdown, &dtm_shutdown_list, list) shutdown->func(shutdown->arg); printk(KERN_EMERG "\n\nCritical Temperature Shutdown\n\n"); ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/4xx/cpm.c
static void cpm_idle_wait(void) { unsigned long msr_save; msr_save = mfmsr(); /* sync required when CPM0_ER[CPU] is set */ mb(); /* set wait state MSR */ mtmsr(msr_save | MSR_WE | MSR_EE | MSR_CE | MSR_DE); isync(); /* return to initial state */ mtmsr(msr_save); isync(); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/4xx/cpm.c
static ssize_t cpm_idle_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { char *s = buf; int i; for (i = 0; i < ARRAY_SIZE(idle_mode); i++) { if (idle_mode[i].enabled) s += sprintf(s, "[%s] ", idle_mode[i].name); else s += sprintf(s, "%s ", idle...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/4xx/cpm.c
static ssize_t cpm_idle_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t n) { int i; char *p; int len; p = memchr(buf, '\n', n); len = p ? p - buf : n; for (i = 0; i < ARRAY_SIZE(idle_mode); i++) { if (strncmp(buf, idle_mode[i].name, len) ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/4xx/cpm.c
static void cpm_idle(void) { if (idle_mode[CPM_IDLE_DOZE].enabled) cpm_idle_doze(); else cpm_idle_wait(); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/4xx/cpm.c
static int cpm_suspend_enter(suspend_state_t state) { switch (state) { case PM_SUSPEND_STANDBY: cpm_suspend_standby(cpm.standby); break; case PM_SUSPEND_MEM: cpm_suspend_standby(cpm.suspend); break; } return 0; }
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/4xx/cpm.c
static int __init cpm_powersave_off(char *arg) { cpm.powersave_off = 1; return 1; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/4xx/gpio.c
static int ppc4xx_gpio_get(struct gpio_chip *gc, unsigned int gpio) { struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc); struct ppc4xx_gpio __iomem *regs = mm_gc->regs; return !!(in_be32(&regs->ir) & GPIO_MASK(gpio)); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/4xx/gpio.c
static int __init ppc4xx_add_gpiochips(void) { struct device_node *np; for_each_compatible_node(np, NULL, "ibm,ppc4xx-gpio") { int ret; struct ppc4xx_gpio_chip *ppc4xx_gc; struct of_mm_gpio_chip *mm_gc; struct gpio_chip *gc; ppc4xx_gc = kzalloc(sizeof(*ppc4xx_gc), GFP_KERNEL); if (!ppc4xx_...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/4xx/hsta_msi.c
static int hsta_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) { struct msi_msg msg; struct msi_desc *entry; int irq, hwirq; u64 addr; if (type == PCI_CAP_ID_MSIX) { pr_debug("%s: MSI-X not supported.\n", __func__); return -EINVAL; } msi_for_each_desc(entry, &dev->dev, MSI_DESC_NOTASSOC...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/4xx/pci.c
static int __init ppc440spe_pciex_core_init(struct device_node *np) { int time_out = 20; dcri_clrset(SDR0, PESDR0_PLLLCT1, 0, 1 << 28); /* Shouldn't we do all the calibration stuff etc... here ? */ if (ppc440spe_pciex_check_reset(np)) return -ENXIO; if (!(mfdcri(SDR0, PESDR0_PLLLCT2) & 0x10000)) { ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/4xx/pci.c
static int __init ppc440speA_pciex_init_port_hw(struct ppc4xx_pciex_port *port) { return ppc440spe_pciex_init_port_hw(port); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/4xx/pci.c
static int __init apm821xx_pciex_core_init(struct device_node *np) { return 1; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/4xx/pci.c
static int __init ppc460sx_pciex_init_port_hw(struct ppc4xx_pciex_port *port) { if (port->endpoint) dcri_clrset(SDR0, port->sdr_base + PESDRn_UTLSET2, 0x01000000, 0); else dcri_clrset(SDR0, port->sdr_base + PESDRn_UTLSET2, 0, 0x01000000); dcri_clrset(SDR0, port->sdr_base + PESDRn_RCSSET, ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/4xx/pci.c
static void __init ppc460sx_pciex_check_link(struct ppc4xx_pciex_port *port) { void __iomem *mbase; int attempt = 50; port->link = 0; mbase = ioremap(port->cfg_space.start + 0x10000000, 0x1000); if (mbase == NULL) { printk(KERN_ERR "%pOF: Can't map internal config space !", port->node); return; }...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/4xx/pci.c
static void __init ppc4xx_pciex_port_init_mapping(struct ppc4xx_pciex_port *port) { dcr_write(port->dcrs, DCRO_PEGPL_CFGBAH, RES_TO_U32_HIGH(port->cfg_space.start)); dcr_write(port->dcrs, DCRO_PEGPL_CFGBAL, RES_TO_U32_LOW(port->cfg_space.start)); /* XXX FIXME: Use size from reg property....
[ 0, 1 ]
Linux Kernel
arch/powerpc/platforms/4xx/pci.c
static int ppc4xx_pciex_validate_bdf(struct ppc4xx_pciex_port *port, struct pci_bus *bus, unsigned int devfn) { static int message; if (port->endpoint && bus->number != port->hose->first_busno) return PCIBIOS_DEVICE_NOT_FOUND; /* Check we are within the mapped range */ ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/4xx/soc.c
static inline u32 l2c_diag(u32 addr) { mtdcr(dcrbase_l2c + DCRN_L2C0_ADDR, addr); mtdcr(dcrbase_l2c + DCRN_L2C0_CMD, L2C_CMD_DIAG); while (!(mfdcr(dcrbase_l2c + DCRN_L2C0_SR) & L2C_SR_CC)) ; return mfdcr(dcrbase_l2c + DCRN_L2C0_DATA); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/4xx/uic.c
static int uic_set_irq_type(struct irq_data *d, unsigned int flow_type) { struct uic *uic = irq_data_get_irq_chip_data(d); unsigned int src = irqd_to_hwirq(d); unsigned long flags; int trigger, polarity; u32 tr, pr, mask; switch (flow_type & IRQ_TYPE_SENSE_MASK) { case IRQ_TYPE_NONE: uic_mask_irq(d)...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/4xx/uic.c
static void uic_irq_cascade(struct irq_desc *desc) { struct irq_chip *chip = irq_desc_get_chip(desc); struct irq_data *idata = irq_desc_get_irq_data(desc); struct uic *uic = irq_desc_get_handler_data(desc); u32 msr; int src; raw_spin_lock(&desc->lock); if (irqd_is_level_type(idata)) chip->irq_mask(id...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/4xx/uic.c
static struct uic *__init uic_init_one(struct device_node *node) { struct uic *uic; const u32 *indexp, *dcrreg; int len; BUG_ON(!of_device_is_compatible(node, "ibm,uic")); uic = kzalloc(sizeof(*uic), GFP_KERNEL); if (!uic) return NULL; /* FIXME: panic? */ raw_spin_lock_init(&uic->lock); indexp = ...
[ 1, 1 ]
Linux Kernel
arch/powerpc/platforms/4xx/uic.c
void __init uic_init_tree(void) { struct device_node *np; struct uic *uic; const u32 *interrupts; for_each_compatible_node(np, NULL, "ibm,uic") { interrupts = of_get_property(np, "interrupts", NULL); if (!interrupts) break; } BUG_ON(!np); /* uic_init_tree() assumes there's a UIC as the ...
[ 0, 1 ]
Linux Kernel
arch/powerpc/platforms/4xx/uic.c
unsigned int uic_get_irq(void) { u32 msr; int src; BUG_ON(!primary_uic); msr = mfdcr(primary_uic->dcrbase + UIC_MSR); src = 32 - ffs(msr); return irq_linear_revmap(primary_uic->irqhost, src); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/512x/clock-commonclk.c
static void __init mpc512x_clk_determine_soc(void) { if (of_machine_is_compatible("fsl,mpc5121")) { soc = MPC512x_SOC_MPC5121; return; } if (of_machine_is_compatible("fsl,mpc5123")) { soc = MPC512x_SOC_MPC5123; return; } if (of_machine_is_compatible("fsl,mpc5125")) { soc = MPC512x_SOC_MPC...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/512x/clock-commonclk.c
static bool __init soc_has_pata(void) { if (soc == MPC512x_SOC_MPC5125) return false; return true; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/512x/clock-commonclk.c
static bool __init soc_has_sdhc2(void) { if (soc == MPC512x_SOC_MPC5125) return true; return false; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/512x/clock-commonclk.c
static bool __init soc_has_cpmf_0_bypass(void) { if (soc == MPC512x_SOC_MPC5125) return true; return false; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/512x/clock-commonclk.c
static inline struct clk * mpc512x_clk_divtable(const char *name, const char *parent_name, u32 __iomem *reg, u8 pos, u8 len, const struct clk_div_table *divtab) { u8 divflags; divflags = CLK_DIVIDER_BIG_ENDIAN; return clk_register_divider_table(NULL, name, parent_name, ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/512x/clock-commonclk.c
static inline struct clk *mpc512x_clk_gated(const char *name, const char *parent_name, u32 __iomem *reg, u8 pos) { int clkflags; u8 gateflags; clkflags = CLK_SET_RATE_PARENT; gateflags = CLK_GATE_BIG_ENDIAN; return clk_r...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/512x/clock-commonclk.c
static inline struct clk *mpc512x_clk_muxed(const char *name, const char **parent_names, int parent_count, u32 __iomem *reg, u8 pos, u8 len) { int clkflags; u8 muxflags; clkflags =...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/512x/clock-commonclk.c
static inline int get_bit_field(uint32_t __iomem *reg, uint8_t pos, uint8_t len) { uint32_t val; val = in_be32(reg); val >>= pos; val &= (1 << len) - 1; return val; }
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/512x/clock-commonclk.c
static void __init mpc5121_clk_provide_migration_support(void) { struct device_node *np; clk_prepare_enable(clks[MPC512x_CLK_PSC3_MCLK]); /* serial console */ np = of_find_compatible_node(NULL, "pci", "fsl,mpc5121-pci"); of_node_put(np); if (np) clk_prepare_enable(clks[MPC512x_CLK_PCI]); } /* * those m...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/512x/clock-commonclk.c
int __init mpc5121_clk_init(void) { struct device_node *clk_np; int busfreq; clk_np = of_find_compatible_node(NULL, NULL, "fsl,mpc5121-clock"); if (!clk_np) return -ENODEV; clkregs = of_iomap(clk_np, 0); WARN_ON(!clkregs); /* determine the SoC variant we run on */ mpc512x_clk_determine_soc(); /...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
static void __iomem *irq_to_pic_mask(unsigned int irq) { return irq <= 7 ? &cpld_regs->pci_mask : &cpld_regs->misc_mask; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
static unsigned int cpld_pic_get_irq(int offset, u8 ignore, u8 __iomem *statusp, u8 __iomem *maskp) { u8 status = in_8(statusp); u8 mask = in_8(maskp); status |= (ignore | mask); if (status == 0xff) return ~0; return ffz(status) + offset; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
static int cpld_pic_host_match(struct irq_domain *h, struct device_node *node, enum irq_domain_bus_token bus_token) { return cpld_pic_node == node; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
static int cpld_pic_host_map(struct irq_domain *h, unsigned int virq, irq_hw_number_t hw) { irq_set_status_flags(virq, IRQ_LEVEL); irq_set_chip_and_handler(virq, &cpld_pic, handle_level_irq); return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/512x/mpc512x_generic.c
static int __init mpc512x_generic_probe(void) { if (!of_device_compatible_match(of_root, board)) return 0; mpc512x_init_early(); return 1; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/512x/mpc512x_lpbfifo.c
static int get_cs_ranges(struct device *dev) { int ret = -ENODEV; struct device_node *lb_node; const u32 *addr_cells_p; const u32 *size_cells_p; int proplen; size_t i; lb_node = of_find_compatible_node(NULL, NULL, "fsl,mpc5121-localbus"); if (!lb_node) return ret; addr_cells_p = of_get_property(...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/512x/mpc512x_shared.c
static void mpc512x_release_bootmem(void) { unsigned long addr = diu_shared_fb.fb_phys & PAGE_MASK; unsigned long size = diu_shared_fb.fb_len; unsigned long start, end; if (diu_shared_fb.in_use) { start = PFN_UP(addr); end = PFN_DOWN(addr + size); for (; start < end; start++) mpc512x_free_b...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/512x/mpc512x_shared.c
const char *__init mpc512x_select_psc_compat(void) { if (of_machine_is_compatible("fsl,mpc5121")) return "fsl,mpc5121-psc"; if (of_machine_is_compatible("fsl,mpc5125")) return "fsl,mpc5125-psc"; return NULL; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/512x/mpc512x_shared.c
const char *__init mpc512x_select_reset_compat(void) { if (of_machine_is_compatible("fsl,mpc5121")) return "fsl,mpc5121-reset"; if (of_machine_is_compatible("fsl,mpc5125")) return "fsl,mpc5125-reset"; return NULL; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/512x/pdm360ng.c
void __init pdm360ng_init(void) { mpc512x_init(); pdm360ng_touchscreen_init(); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/efika.c
static int rtas_write_config(struct pci_bus *bus, unsigned int devfn, int offset, int len, u32 val) { struct pci_controller *hose = pci_bus_to_host(bus); unsigned long addr = (offset & 0xff) | ((devfn & 0xff) << 8) | (((bus->number - hose->first_busno) & 0xff) <<...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/efika.c
static void __init efika_pcisetup(void) {} #endif
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/efika.c
static void __init efika_setup_arch(void) { rtas_initialize(); mpc52xx_map_common_devices(); #ifdef CONFIG_PM mpc52xx_suspend.board_suspend_prepare = efika_suspend_prepare; mpc52xx_pm_init(); #endif if (ppc_md.progress) ppc_md.progress("Linux/PPC " UTS_RELEASE " running on Efika ;-)\n", 0x0); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/lite5200.c
static int __init lite5200_probe(void) { return of_device_compatible_match(of_root, board); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/lite5200_pm.c
static int lite5200_pm_valid(suspend_state_t state) { switch (state) { case PM_SUSPEND_STANDBY: case PM_SUSPEND_MEM: return 1; default: return 0; } }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/media5200.c
static void media5200_irq_unmask(struct irq_data *d) { unsigned long flags; u32 val; spin_lock_irqsave(&media5200_irq.lock, flags); val = in_be32(media5200_irq.regs + MEDIA5200_IRQ_ENABLE); val |= 1 << (MEDIA5200_IRQ_SHIFT + irqd_to_hwirq(d)); out_be32(media5200_irq.regs + MEDIA5200_IRQ_ENABLE, val); sp...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/media5200.c
static void media5200_irq_cascade(struct irq_desc *desc) { struct irq_chip *chip = irq_desc_get_chip(desc); int val; u32 status, enable; raw_spin_lock(&desc->lock); chip->irq_mask(&desc->irq_data); raw_spin_unlock(&desc->lock); /* Ask the FPGA for IRQ status. If 'val' is 0, then no irqs * are pendin...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/mpc5200_simple.c
static void __init mpc5200_simple_setup_arch(void) { if (ppc_md.progress) ppc_md.progress("mpc5200_simple_setup_arch()", 0); mpc52xx_map_common_devices(); /* Some mpc5200 & mpc5200b related configuration */ mpc5200_setup_xlb_arbiter(); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/mpc52xx_common.c
void __init mpc52xx_declare_of_platform_devices(void) { if (of_platform_populate(NULL, mpc52xx_bus_ids, NULL, NULL)) pr_err(__FILE__ ": Error while populating devices from DT\n"); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/mpc52xx_common.c
void __noreturn mpc52xx_restart(char *cmd) { local_irq_disable(); if (mpc52xx_wdt) { out_be32(&mpc52xx_wdt->mode, 0x00000000); out_be32(&mpc52xx_wdt->count, 0x000000ff); out_be32(&mpc52xx_wdt->mode, 0x00009004); } else printk(KERN_ERR __FILE__ ": " "mpc52xx_restart: C...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/mpc52xx_gpt.c
static void mpc52xx_gpt_irq_cascade(struct irq_desc *desc) { struct mpc52xx_gpt_priv *gpt = irq_desc_get_handler_data(desc); u32 status; status = in_be32(&gpt->regs->status) & MPC52xx_GPT_STATUS_IRQMASK; if (status) generic_handle_domain_irq(gpt->irqhost, 0); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/mpc52xx_gpt.c
static void mpc52xx_gpt_gpio_set(struct gpio_chip *gc, unsigned int gpio, int v) { struct mpc52xx_gpt_priv *gpt = gpiochip_get_data(gc); unsigned long flags; u32 r; dev_dbg(gpt->dev, "%s: gpio:%d v:%d\n", __func__, gpio, v); r = v ? MPC52xx_GPT_MODE_GPIO_OUT_HIGH : MPC52xx_G...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/mpc52xx_gpt.c
static inline void mpc52xx_gpt_wdt_ping(struct mpc52xx_gpt_priv *gpt_wdt) { unsigned long flags; raw_spin_lock_irqsave(&gpt_wdt->lock, flags); out_8((u8 *)&gpt_wdt->regs->mode, MPC52xx_GPT_MODE_WDT_PING); raw_spin_unlock_irqrestore(&gpt_wdt->lock, flags); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/mpc52xx_gpt.c
static long mpc52xx_wdt_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { struct mpc52xx_gpt_priv *gpt_wdt = file->private_data; int __user *data = (int __user *)arg; int timeout; u64 real_timeout; int ret = 0; switch (cmd) { case WDIOC_GETSUPPORT: ret = co...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/mpc52xx_gpt.c
static int mpc52xx_wdt_release(struct inode *inode, struct file *file) { #if !defined(CONFIG_WATCHDOG_NOWAYOUT) struct mpc52xx_gpt_priv *gpt_wdt = file->private_data; unsigned long flags; raw_spin_lock_irqsave(&gpt_wdt->lock, flags); clrbits32(&gpt_wdt->regs->mode, MPC52xx_GPT_MODE_COUNTER_ENABLE ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/mpc52xx_gpt.c
static int mpc52xx_gpt_wdt_setup(struct mpc52xx_gpt_priv *gpt, const u32 *period) { u64 real_timeout; mpc52xx_gpt_wdt = gpt; /* configure the wdt if the device tree contained a timeout */ if (!period || *period == 0) return 0; real_timeout = (u64)*period * 1000000000ULL...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/mpc52xx_gpt.c
static int mpc52xx_gpt_wdt_init(void) { return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/mpc52xx_gpt.c
static inline int mpc52xx_gpt_wdt_setup(struct mpc52xx_gpt_priv *gpt, const u32 *period) { return 0; } #endif
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/mpc52xx_pci.c
static int mpc52xx_pci_write_config(struct pci_bus *bus, unsigned int devfn, int offset, int len, u32 val) { struct pci_controller *hose = pci_bus_to_host(bus); u32 value, mask; if (ppc_md.pci_exclude_device) if (ppc_md.pci_exclude_device(hose, bus->number, devfn)) r...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/mpc52xx_pci.c
int __init mpc52xx_add_bridge(struct device_node *node) { int len; struct mpc52xx_pci __iomem *pci_regs; struct pci_controller *hose; const int *bus_range; struct resource rsrc; pr_debug("Adding MPC52xx PCI host bridge %pOF\n", node); pci_add_flags(PCI_REASSIGN_ALL_BUS); if (of_address_to_resource(no...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/mpc52xx_pic.c
static inline void io_be_setbit(u32 __iomem *addr, int bitno) { out_be32(addr, in_be32(addr) | (1 << bitno)); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/mpc52xx_pic.c
static inline void io_be_clrbit(u32 __iomem *addr, int bitno) { out_be32(addr, in_be32(addr) & ~(1 << bitno)); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/mpc52xx_pic.c
static void mpc52xx_main_unmask(struct irq_data *d) { int l2irq = irqd_to_hwirq(d) & MPC52xx_IRQ_L2_MASK; io_be_clrbit(&intr->main_mask, 16 - l2irq); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/mpc52xx_pic.c
static void mpc52xx_periph_mask(struct irq_data *d) { int l2irq = irqd_to_hwirq(d) & MPC52xx_IRQ_L2_MASK; io_be_setbit(&intr->per_mask, 31 - l2irq); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/mpc52xx_pic.c
static void mpc52xx_sdma_mask(struct irq_data *d) { int l2irq = irqd_to_hwirq(d) & MPC52xx_IRQ_L2_MASK; io_be_setbit(&sdma->IntMask, l2irq); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/mpc52xx_pic.c
static int mpc52xx_irqhost_map(struct irq_domain *h, unsigned int virq, irq_hw_number_t irq) { int l1irq; int l2irq; struct irq_chip *irqchip; void *hndlr; int type; u32 reg; l1irq = (irq & MPC52xx_IRQ_L1_MASK) >> MPC52xx_IRQ_L1_OFFSET; l2irq = irq & MPC52xx_IRQ_L2_MASK; ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/mpc52xx_pic.c
unsigned int mpc52xx_get_irq(void) { u32 status; int irq; status = in_be32(&intr->enc_status); if (status & 0x00000400) { irq = (status >> 8) & 0x3; if (irq == 2) /* high priority peripheral */ goto peripheral; irq |= (MPC52xx_IRQ_L1_CRIT << MPC52xx_IRQ_L1_OFFSET); } else if (status & 0x002...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/52xx/mpc52xx_pm.c
int mpc52xx_set_wakeup_gpio(u8 pin, u8 level) { u16 tmp; out_8(&gpiow->wkup_gpioe, in_8(&gpiow->wkup_gpioe) | (1 << pin)); /* set as input */ out_8(&gpiow->wkup_ddr, in_8(&gpiow->wkup_ddr) & ~(1 << pin)); /* enable deep sleep interrupt */ out_8(&gpiow->wkup_inten, in_8(&gpiow->wkup_inten) | (1 << pin)); ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/82xx/ep8248e.c
static void __init init_ioports(void) { int i; for (i = 0; i < ARRAY_SIZE(ep8248e_pins); i++) { const struct cpm_pin *pin = &ep8248e_pins[i]; cpm2_set_pin(pin->port, pin->pin, pin->flags); } cpm2_smc_clk_setup(CPM_CLK_SMC1, CPM_BRG7); cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_RX); cpm2_clk_se...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/82xx/ep8248e.c
static void __init ep8248e_setup_arch(void) { if (ppc_md.progress) ppc_md.progress("ep8248e_setup_arch()", 0); cpm2_reset(); clrbits32(&cpm2_immr->im_siu_conf.siu_82xx.sc_bcr, MPC82XX_BCR_PLDP); ep8248e_bcsr_node = of_find_compatible_node(NULL, NULL, "fsl,ep8248e-bcsr"); if (!ep8248e_bcsr_node) { p...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/82xx/ep8248e.c
static int __init ep8248e_probe(void) { return of_machine_is_compatible("fsl,ep8248e"); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/82xx/km82xx.c
static void __init init_ioports(void) { int i; for (i = 0; i < ARRAY_SIZE(km82xx_pins); i++) { const struct cpm_pin *pin = &km82xx_pins[i]; cpm2_set_pin(pin->port, pin->pin, pin->flags); } cpm2_smc_clk_setup(CPM_CLK_SMC2, CPM_BRG8); cpm2_smc_clk_setup(CPM_CLK_SMC1, CPM_BRG7); cpm2_clk_setup(CPM_CL...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/82xx/km82xx.c
static void __init km82xx_setup_arch(void) { if (ppc_md.progress) ppc_md.progress("km82xx_setup_arch()", 0); cpm2_reset(); clrbits32(&cpm2_immr->im_siu_conf.siu_82xx.sc_bcr, MPC82XX_BCR_PLDP); init_ioports(); if (ppc_md.progress) ppc_md.progress("km82xx_setup_arch(), finish", 0); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/82xx/km82xx.c
static int __init declare_of_platform_devices(void) { of_platform_bus_probe(NULL, of_bus_ids, NULL); return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/82xx/km82xx.c
static int __init km82xx_probe(void) { return of_machine_is_compatible("keymile,km82xx"); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/82xx/mpc8272_ads.c
static void __init mpc8272_ads_pic_init(void) { struct device_node *np = of_find_compatible_node(NULL, NULL, "fsl,cpm2-pic"); if (!np) { printk(KERN_ERR "PIC init: can not find fsl,cpm2-pic node\n"); return; } cpm2_pic_init(np); of_node_put(np); pq2ads_pci_init_irq(); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/82xx/pq2.c
void __init pq2_init_pci(void) { struct device_node *np; ppc_md.pci_exclude_device = pq2_pci_exclude_device; for_each_compatible_node(np, NULL, "fsl,pq2-pci") pq2_pci_add_bridge(np); } #endif
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/82xx/pq2ads-pci-pic.c
static void pq2ads_pci_mask_irq(struct irq_data *d) { struct pq2ads_pci_pic *priv = irq_data_get_irq_chip_data(d); int irq = NUM_IRQS - irqd_to_hwirq(d) - 1; if (irq != -1) { unsigned long flags; raw_spin_lock_irqsave(&pci_pic_lock, flags); setbits32(&priv->regs->mask, 1 << irq); mb(); raw...
[ 1, 0 ]
Linux Kernel
arch/powerpc/platforms/82xx/pq2fads.c
static void __init init_ioports(void) { int i; for (i = 0; i < ARRAY_SIZE(pq2fads_pins); i++) { struct cpm_pin *pin = &pq2fads_pins[i]; cpm2_set_pin(pin->port, pin->pin, pin->flags); } cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_RX); cpm2_clk_setup(CPM_CLK_SCC1, CPM_BRG1, CPM_CLK_TX); cpm2_clk...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/82xx/pq2fads.c
static void __init pq2fads_setup_arch(void) { struct device_node *np; __be32 __iomem *bcsr; if (ppc_md.progress) ppc_md.progress("pq2fads_setup_arch()", 0); cpm2_reset(); np = of_find_compatible_node(NULL, NULL, "fsl,pq2fads-bcsr"); if (!np) { printk(KERN_ERR "No fsl,pq2fads-bcsr in device tree\n...
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/82xx/pq2fads.c
static int __init pq2fads_probe(void) { return of_machine_is_compatible("fsl,pq2fads"); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/83xx/asp834x.c
static void __init asp834x_setup_arch(void) { mpc83xx_setup_arch(); mpc834x_usb_cfg(); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c
static int shutdown_thread_fn(void *data) { int ret; struct mcu *mcu = glob_mcu; while (!kthread_should_stop()) { ret = i2c_smbus_read_byte_data(mcu->client, MCU_REG_CTRL); if (ret < 0) pr_err("MCU status reg read failed.\n"); mcu->reg_ctrl = ret; if (mcu->reg_ctrl & MCU_CTRL_BTN) { ...
[ 0, 0 ]