Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | arch/s390/pci/pci_insn.c |
static inline void zpci_err_insn_addr(int lvl, u8 insn, u8 cc, u8 status,
u64 addr, u64 len) {
struct zpci_err_insn_data data = {
.insn = insn, .cc = cc, .status = status, .addr = addr, .len = len};
zpci_err_hex_level(lvl, &data, sizeof(data));
} | [
1,
0
] |
Linux Kernel | arch/s390/pci/pci_insn.c |
int zpci_refresh_trans(u64 fn, u64 addr, u64 range) {
bool retried = false;
u8 cc, status;
do {
cc = __rpcit(fn, addr, range, &status);
if (cc == 2) {
udelay(ZPCI_INSN_BUSY_DELAY);
if (!retried) {
zpci_err_insn_addr(1, 'R', cc, status, addr, range);
retried = true;
}
... | [
0,
0
] |
Linux Kernel | arch/s390/pci/pci_insn.c |
static inline int __pcilg(u64 *data, u64 req, u64 offset, u8 *status) {
u64 __data;
int cc;
cc = ____pcilg(&__data, req, offset, status);
if (!cc)
*data = __data;
return cc;
} | [
0,
0
] |
Linux Kernel | arch/s390/pci/pci_insn.c |
int __zpci_load(u64 *data, u64 req, u64 offset) {
bool retried = false;
u8 status;
int cc;
do {
cc = __pcilg(data, req, offset, &status);
if (cc == 2) {
udelay(ZPCI_INSN_BUSY_DELAY);
if (!retried) {
zpci_err_insn_req(1, 'l', cc, status, req, offset);
retried = true;
}... | [
0,
0
] |
Linux Kernel | arch/s390/pci/pci_insn.c | static inline int __pcistg(u64 data, u64 req, u64 offset, u8 *status) {
union register_pair req_off = {.even = req, .odd = offset};
int cc = -ENXIO;
asm volatile(" .insn rre,0xb9d00000,%[data],%[req_off]\n"
"0: ipm %[cc]\n"
" srl %[cc],28\n"
"1:\n" EX_TABLE(0b, 1b)
... | [
1,
0
] |
Linux Kernel | arch/s390/pci/pci_insn.c |
int __zpci_store_block(const u64 *data, u64 req, u64 offset) {
bool retried = false;
u8 status;
int cc;
do {
cc = __pcistb(data, req, offset, &status);
if (cc == 2) {
udelay(ZPCI_INSN_BUSY_DELAY);
if (!retried) {
zpci_err_insn_req(0, 'b', cc, status, req, offset);
retried =... | [
0,
0
] |
Linux Kernel | arch/s390/pci/pci_insn.c |
static inline int zpci_write_block_fh(volatile void __iomem *dst,
const void *src, unsigned long len) {
struct zpci_iomap_entry *entry = &zpci_iomap_start[ZPCI_IDX(dst)];
u64 req = ZPCI_CREATE_REQ(entry->fh, entry->bar, len);
u64 offset = ZPCI_OFFSET(dst);
return __zpci_s... | [
0,
0
] |
Linux Kernel | arch/s390/pci/pci_iov.h | static inline int zpci_iov_setup_virtfn(struct zpci_bus *zbus,
struct pci_dev *virtfn, int vfn) {
return 0;
}
#endif
#endif /* __S390_PCI_IOV_h */ | [
0,
0
] |
Linux Kernel | arch/s390/pci/pci_irq.c | static int zpci_clear_directed_irq(struct zpci_dev *zdev) {
u64 req = ZPCI_CREATE_REQ(zdev->fh, 0, ZPCI_MOD_FC_DEREG_INT_D);
struct zpci_fib fib = {0};
u8 cc, status;
fib.fmt = 1;
fib.gd = zdev->gisa;
cc = zpci_mod_fc(req, &fib, &status);
if (cc == 3 || (cc == 1 && status == 24))
cc = 0;
return c... | [
0,
0
] |
Linux Kernel | arch/s390/pci/pci_irq.c | static int zpci_clear_irq(struct zpci_dev *zdev) {
int rc;
if (irq_delivery == DIRECTED)
rc = zpci_clear_directed_irq(zdev);
else
rc = zpci_clear_airq(zdev);
if (!rc)
zdev->irqs_registered = 0;
return rc;
} | [
0,
0
] |
Linux Kernel | arch/s390/pci/pci_irq.c |
void __init zpci_irq_exit(void) {
unsigned int cpu;
if (irq_delivery == DIRECTED) {
for_each_possible_cpu(cpu) { airq_iv_release(zpci_ibv[cpu]); }
}
kfree(zpci_ibv);
if (zpci_sbv)
airq_iv_release(zpci_sbv);
unregister_adapter_interrupt(&zpci_airq);
} | [
0,
0
] |
Linux Kernel | arch/s390/pci/pci_mmio.c |
static inline void zpci_err_mmio(u8 cc, u8 status, u64 offset) {
struct {
u64 offset;
u8 cc;
u8 status;
} data = {offset, cc, status};
zpci_err_hex(&data, sizeof(data));
} | [
1,
0
] |
Linux Kernel | arch/s390/pci/pci_mmio.c |
static inline int __pcistb_mio_inuser(void __iomem *ioaddr,
const void __user *src, u64 len,
u8 *status) {
int cc = -ENXIO;
asm volatile(" sacf 256\n"
"0: .insn rsy,0xeb00000000d4,%[len],%[ioaddr],%[src]\n"
... | [
1,
0
] |
Linux Kernel | arch/s390/pci/pci_mmio.c | static inline int __pcistg_mio_inuser(void __iomem *ioaddr,
const void __user *src, u64 ulen,
u8 *status) {
union register_pair ioaddr_len = {.even = (u64 __force)ioaddr, .odd = ulen};
int cc = -ENXIO;
u64 val = 0;
u64 cnt = ulen;
u8 ... | [
1,
0
] |
Linux Kernel | arch/s390/pci/pci_mmio.c |
static inline int __memcpy_fromio_inuser(void __user *dst,
const void __iomem *src,
unsigned long n) {
int size, rc = 0;
u8 status;
while (n > 0) {
size = zpci_get_max_write_size((u64 __force)src, (u64 __force)dst, n,
... | [
0,
0
] |
Linux Kernel | arch/s390/pci/pci_sysfs.c |
static ssize_t mio_enabled_show(struct device *dev,
struct device_attribute *attr, char *buf) {
struct zpci_dev *zdev = to_zpci(to_pci_dev(dev));
return sprintf(buf, zpci_use_mio(zdev) ? "1\n" : "0\n");
} | [
1,
0
] |
Linux Kernel | arch/s390/pci/pci_sysfs.c |
static ssize_t util_string_read(struct file *filp, struct kobject *kobj,
struct bin_attribute *attr, char *buf,
loff_t off, size_t count) {
struct device *dev = kobj_to_dev(kobj);
struct pci_dev *pdev = to_pci_dev(dev);
struct zpci_dev *zdev = to_zp... | [
1,
0
] |
Linux Kernel | arch/s390/pci/pci_sysfs.c |
static ssize_t report_error_write(struct file *filp, struct kobject *kobj,
struct bin_attribute *attr, char *buf,
loff_t off, size_t count) {
struct zpci_report_error_header *report = (void *)buf;
struct device *dev = kobj_to_dev(kobj);
struct p... | [
1,
0
] |
Linux Kernel | arch/s390/pci/pci_sysfs.c |
static ssize_t uid_is_unique_show(struct device *dev,
struct device_attribute *attr, char *buf) {
return sysfs_emit(buf, "%d\n", zpci_unique_uid ? 1 : 0);
} | [
0,
0
] |
Linux Kernel | arch/s390/pci/pci_sysfs.c |
static umode_t zpci_index_is_visible(struct kobject *kobj,
struct attribute *attr, int n) {
return zpci_unique_uid ? attr->mode : 0;
} | [
0,
0
] |
Linux Kernel | arch/s390/purgatory/purgatory.c |
int verify_sha256_digest(void) {
struct kexec_sha_region *ptr, *end;
u8 digest[SHA256_DIGEST_SIZE];
struct sha256_state sctx;
sha256_init(&sctx);
end = purgatory_sha_regions + ARRAY_SIZE(purgatory_sha_regions);
for (ptr = purgatory_sha_regions; ptr < end; ptr++)
sha256_update(&sctx, (uint8_t *)(ptr->... | [
1,
0
] |
Linux Kernel | arch/s390/tools/gen_facilities.c |
static void print_facility_lists(void) {
unsigned int i;
for (i = 0; i < sizeof(facility_defs) / sizeof(facility_defs[0]); i++)
print_facility_list(&facility_defs[i]);
} | [
1,
0
] |
Linux Kernel | arch/s390/tools/gen_opcode_table.c | static void print_opcode_table(struct gen_opcode *desc) {
char opcode[2] = "";
struct insn *insn;
int i, offset;
qsort(desc->insn, desc->nr, sizeof(*desc->insn), cmpopcode);
printf("#define OPCODE_TABLE_INITIALIZER { \\\n");
offset = 0;
for (i = 0; i < desc->nr; i++) {
insn = &desc->insn[i];
if (... | [
1,
0
] |
Linux Kernel | arch/s390/tools/gen_opcode_table.c | int main(int argc, char **argv) {
struct gen_opcode _desc = {0};
struct gen_opcode *desc = &_desc;
read_instructions(desc);
printf("#ifndef __S390_GENERATED_DIS_DEFS_H__\n");
printf("#define __S390_GENERATED_DIS_DEFS_H__\n");
printf("\n\n");
print_formats(desc);
print_long_insn(desc);
print_opcode_ta... | [
0,
0
] |
Linux Kernel | arch/sh/boards/board-apsh4ad0a.c |
static int __init apsh4ad0a_devices_setup(void) {
regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
return platform_add_devices(apsh4ad0a_devices, ARRAY_SIZE(apsh4ad0a_devices));
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/board-apsh4ad0a.c | static int apsh4ad0a_mode_pins(void) {
int value = 0;
value |= MODE_PIN0; /* Clock Mode 3 */
value |= MODE_PIN1;
value &= ~MODE_PIN2;
value &= ~MODE_PIN3;
value &= ~MODE_PIN4; /* 16-bit Area0 bus width */
value |= MODE_PIN5;
value |= MODE_PIN6;
value |= MODE_PIN7; /* Normal mode */
value |= MODE... | [
0,
0
] |
Linux Kernel | arch/sh/boards/board-apsh4ad0a.c |
static int apsh4ad0a_clk_init(void) {
struct clk *clk;
int ret;
clk = clk_get(NULL, "extal");
if (IS_ERR(clk))
return PTR_ERR(clk);
ret = clk_set_rate(clk, 33333000);
clk_put(clk);
return ret;
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/board-polaris.c | static int __init polaris_initialise(void) {
u16 wcr, bcr_mask;
printk(KERN_INFO "Configuring Polaris external bus\n");
regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
wcr = __raw_readw(WCR2);
wcr &= (~AREA5_WAIT_CTRL);
wcr |= (WAIT_STATES_10 << 10);
__raw_writew(wcr, WCR2);
... | [
0,
0
] |
Linux Kernel | arch/sh/boards/board-secureedge5410.c | static irqreturn_t eraseconfig_interrupt(int irq, void *dev_id) {
printk("SnapGear: erase switch interrupt!\n");
return IRQ_HANDLED;
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/board-sh2007.c | static void __init sh2007_setup(char **cmdline_p) {
pr_info("SH-2007 Setup...");
__raw_writel(CS5BCR_D, CS5BCR);
__raw_writel(CS5WCR_D, CS5WCR);
__raw_writel(CS5PCR_D, CS5PCR);
pr_cont(" done.\n");
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/board-sh7785lcr.c |
static int __init sh7785lcr_devices_setup(void) {
i2c_register_board_info(0, sh7785lcr_i2c_devices,
ARRAY_SIZE(sh7785lcr_i2c_devices));
if (mach_is_sh7785lcr_pt()) {
i2c_device.resource = i2c_proto_resources;
i2c_device.num_resources = ARRAY_SIZE(i2c_proto_resources);
}
gpio... | [
0,
0
] |
Linux Kernel | arch/sh/boards/board-shmin.c | static void __init init_shmin_irq(void) {
__raw_writew(0x2a00, PFC_PHCR);
__raw_writew(0x0aaa, INTC_ICR1);
-mode, Low - active.plat_irq_setup_pins(IRQ_MODE_IRQ);
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/board-urquell.c |
static void __init urquell_init_irq(void) {
plat_irq_setup_pins(IRQ_MODE_IRL3210_MASK);
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/board-urquell.c | static void __init urquell_setup(char **cmdline_p) {
printk(KERN_INFO "Renesas Technology Corp. Urquell support.\n");
pm_power_off = urquell_power_off;
register_smp_ops(&shx3_smp_ops);
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-ap325rxa/setup.c | static int ap325rxa_mode_pins(void) { return MODE_PIN5 | MODE_PIN8; } | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-dreamcast/irq.c | static inline void enable_systemasic_irq(struct irq_data *data) {
unsigned int irq = data->irq;
__u32 emr = EMR_BASE + (LEVEL(irq) << 4) + (LEVEL(irq) << 2);
__u32 mask;
mask = inl(emr);
mask |= (1 << EVENT_BIT(irq));
outl(mask, emr);
} | [
1,
0
] |
Linux Kernel | arch/sh/boards/mach-dreamcast/irq.c | static void mask_ack_systemasic_irq(struct irq_data *data) {
unsigned int irq = data->irq;
__u32 esr = ESR_BASE + (LEVEL(irq) << 2);
disable_systemasic_irq(data);
outl((1 << EVENT_BIT(irq)), esr);
} | [
1,
0
] |
Linux Kernel | arch/sh/boards/mach-ecovec24/setup.c | static void usb0_port_power(int port, int power) {
gpio_set_value(GPIO_PTB4, power);
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-ecovec24/setup.c | static void usb1_port_power(int port, int power) {
gpio_set_value(GPIO_PTB5, power);
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-ecovec24/setup.c |
static int ts_init(void) {
gpio_request(GPIO_FN_INTC_IRQ0, NULL);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-ecovec24/setup.c | static void __init sh_eth_init(struct sh_eth_plat_data *pd) {
struct i2c_adapter *a = i2c_get_adapter(1);
int i;
if (!a) {
pr_err("can not get I2C 1\n");
return;
}
for (i = 0; i < sizeof(pd->mac_addr); i++) {
pd->mac_addr[i] = mac_read(a, 0x10 + i);
msleep(10);
}
i2c_put_adapter(a);
} | [
1,
0
] |
Linux Kernel | arch/sh/boards/mach-highlander/psw.c | static irqreturn_t psw_irq_handler(int irq, void *arg) {
struct platform_device *pdev = arg;
struct push_switch *psw = platform_get_drvdata(pdev);
struct push_switch_platform_info *psw_info = pdev->dev.platform_data;
unsigned int l, mask;
int ret = 0;
l = __raw_readw(PA_DBSW);
if (psw->state) {
ret ... | [
1,
0
] |
Linux Kernel | arch/sh/boards/mach-highlander/setup.c |
static int highlander_irq_demux(int irq) {
if (irq >= HL_NR_IRL || irq < 0 || !irl2irq[irq])
return irq;
return irl2irq[irq];
} | [
1,
0
] |
Linux Kernel | arch/sh/boards/mach-hp6xx/pm.c |
static int hp6x0_pm_enter(suspend_state_t state) {
u8 stbcr, stbcr2;
#ifdef CONFIG_HD64461_ENABLER
u8 scr;
u16 hd64461_stbcr;
#endif
#ifdef CONFIG_HD64461_ENABLER
outb(0, HD64461_PCC1CSCIER);
scr = inb(HD64461_PCC1SCR);
scr |= HD64461_PCCSCR_VCC1;
outb(scr, HD64461_PCC1SCR);
hd64461_stbcr = inw(HD64... | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-hp6xx/setup.c |
static void __init hp6xx_setup(char **cmdline_p) {
u8 v8;
u16 v;
v = inw(HD64461_STBCR);
v |= HD64461_STBCR_SURTST | HD64461_STBCR_SIRST | HD64461_STBCR_STM1ST |
HD64461_STBCR_STM0ST | HD64461_STBCR_SAFEST | HD64461_STBCR_SPC0ST |
HD64461_STBCR_SMIAST | HD64461_STBCR_SAFECKE_OST |
HD64461... | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-kfr2r09/lcd_wqvga.c |
static void write_data(void *sohandle, struct sh_mobile_lcdc_sys_bus_ops *so,
unsigned char const *data, int no_data) {
int i;
for (i = 0; i < no_data; i++)
write_reg(sohandle, so, 1, data[i]);
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-kfr2r09/lcd_wqvga.c | static void clear_memory(void *sohandle,
struct sh_mobile_lcdc_sys_bus_ops *so) {
int i;
write_memory_start(sohandle, so);
/* paint it black */
for (i = 0; i < (240 * 400); i++)
write_reg(sohandle, so, 1, 0x00);
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-kfr2r09/setup.c | static int kfr2r09_serial_i2c_setup(void) {
struct i2c_adapter *a;
struct i2c_msg msg;
unsigned char buf[2];
int ret;
a = i2c_get_adapter(0);
if (!a)
return -ENODEV;
buf[0] = 0x13;
msg.addr = 0x09;
msg.buf = buf;
msg.len = 1;
msg.flags = 0;
ret = i2c_transfer(a, &msg, 1);
if (ret != 1)
... | [
1,
0
] |
Linux Kernel | arch/sh/boards/mach-kfr2r09/setup.c | static int kfr2r09_usb0_gadget_i2c_setup(void) { return -ENODEV; } | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-kfr2r09/setup.c | static int kfr2r09_usb0_gadget_setup(void) {
int plugged_in;
gpio_request(GPIO_PTN4, NULL);
gpio_direction_input(GPIO_PTN4);
plugged_in = gpio_get_value(GPIO_PTN4);
if (!plugged_in)
return -ENODEV; /* no cable plugged in */
if (kfr2r09_usb0_gadget_i2c_setup() != 0)
return -ENODEV; /* unable to con... | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-landisk/gio.c |
static void __exit gio_exit(void) {
cdev_del(cdev_p);
unregister_chrdev_region(dev, DEVCOUNT);
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-landisk/setup.c | static void __init landisk_setup(char **cmdline_p) {
__set_io_port_base(0);
/* LED ON */
__raw_writeb(__raw_readb(PA_LED) | 0x03, PA_LED);
printk(KERN_INFO "I-O DATA DEVICE, INC. \"LANDISK Series\" support.\n");
pm_power_off = landisk_power_off;
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-lboxre2/setup.c | static int __init lboxre2_devices_setup(void) {
u32 cf0_io_base;
pgprot_t prot;
unsigned long paddrbase, psize;
/* open I/O area window */
paddrbase = virt_to_phys((void *)PA_AREA5_IO);
psize = PAGE_SIZE;
prot = PAGE_KERNEL_PCC(1, _PAGE_PCC_IO16);
cf0_io_base = (u32)ioremap_prot(paddrbase, psize, pgpro... | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-microdev/irq.c | static void disable_microdev_irq(struct irq_data *data) {
unsigned int irq = data->irq;
unsigned int fpgaIrq;
if (irq >= NUM_EXTERNAL_IRQS)
return;
if (!fpgaIrqTable[irq].mapped)
return;
fpgaIrq = fpgaIrqTable[irq].fpgaIrq;
__raw_writel(MICRODEV_FPGA_INTC_MASK(fpgaIrq), MICRODEV_FPGA_INTDSB_REG);... | [
1,
0
] |
Linux Kernel | arch/sh/boards/mach-microdev/irq.c | static void enable_microdev_irq(struct irq_data *data) {
unsigned int irq = data->irq;
unsigned long priorityReg, priorities, pri;
unsigned int fpgaIrq;
if (unlikely(irq >= NUM_EXTERNAL_IRQS))
return;
if (unlikely(!fpgaIrqTable[irq].mapped))
return;
pri = 15 - irq;
fpgaIrq = fpgaIrqTable[irq].f... | [
1,
0
] |
Linux Kernel | arch/sh/boards/mach-migor/lcd_qvga.c | static void reset_lcd_module(void) {
gpio_set_value(GPIO_PTH2, 0);
mdelay(2);
gpio_set_value(GPIO_PTH2, 1);
mdelay(1);
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-migor/lcd_qvga.c |
static void write_reg(void *sys_ops_handle,
struct sh_mobile_lcdc_sys_bus_ops *sys_ops,
unsigned short reg, unsigned short data) {
sys_ops->write_index(sys_ops_handle, adjust_reg18(reg << 8 | data));
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-migor/lcd_qvga.c |
static void migor_lcd_qvga_seq(void *sys_ops_handle,
struct sh_mobile_lcdc_sys_bus_ops *sys_ops,
unsigned short const *data, int no_data) {
int i;
for (i = 0; i < no_data; i += 2)
write_reg16(sys_ops_handle, sys_ops, data[i], data[i + 1]);
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-migor/setup.c | static void __init migor_mv_mem_reserve(void) {
phys_addr_t phys;
phys_addr_t size = CEU_BUFFER_MEMORY_SIZE;
phys = memblock_phys_alloc(size, PAGE_SIZE);
if (!phys)
panic("Failed to allocate CEU memory\n");
memblock_phys_free(phys, size);
memblock_remove(phys, size);
ceu_dma_membase = phys;
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-r2d/setup.c | static void r2d_chip_select(struct sh_spi_info *spi, int cs, int state) {
BUG_ON(cs != 0);
__raw_writew(state == BITBANG_CS_ACTIVE, PA_RTCCE);
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-r2d/setup.c |
static int __init rts7751r2d_devices_setup(void) {
if (register_trapped_io(&cf_trapped_io) == 0)
platform_device_register(&cf_ide_device);
if (mach_is_r2d_plus())
platform_device_register(&flash_device);
spi_register_board_info(spi_bus, ARRAY_SIZE(spi_bus));
return platform_add_devices(rts7751r2d_de... | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-r2d/setup.c |
static void rts7751r2d_power_off(void) { __raw_writew(0x0001, PA_POWOFF); } | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-rsk/devices-rsk7264.c |
static int __init rsk7264_devices_setup(void) {
return platform_add_devices(rsk7264_devices, ARRAY_SIZE(rsk7264_devices));
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-rsk/setup.c |
static int __init rsk_devices_setup(void) {
regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
return platform_add_devices(rsk_devices, ARRAY_SIZE(rsk_devices));
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-sdk7780/irq.c | void __init init_sdk7780_IRQ(void) {
printk(KERN_INFO "Using SDK7780 interrupt controller.\n");
__raw_writew(0xFFFF, FPGA_IRQ0MR);
__raw_writew(0x0003, FPGA_IMSR);
plat_irq_setup_pins(IRQ_MODE_IRL3210);
register_intc_controller(&fpga_intc_desc);
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-sdk7786/fpga.c |
void __init sdk7786_fpga_init(void) {
u16 version, date;
sdk7786_fpga_base = sdk7786_fpga_probe();
if (unlikely(!sdk7786_fpga_base)) {
panic("FPGA detection failed.\n");
return;
}
version = fpga_read_reg(FPGAVR);
date = fpga_read_reg(FPGADR);
pr_info("\tFPGA version:\t%d.%d (built on %d/%d/%d)... | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-sdk7786/gpio.c |
static int usrgpir_gpio_get(struct gpio_chip *chip, unsigned gpio) {
return !!(fpga_read_reg(USRGPIR) & (1 << gpio));
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-sdk7786/setup.c | static void __init sdk7786_setup(char **cmdline_p) {
pr_info("Renesas Technology Europe SDK7786 support:\n");
regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
sdk7786_fpga_init();
sdk7786_nmi_init();
pr_info("\tPCB revision:\t%d\n", fpga_read_reg(PCBRR) & 0xf);
machine_ops.restar... | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-se/7206/irq.c | static void eoi_se7206_irq(struct irq_data *data) {
unsigned short sts0, sts1;
unsigned int irq = data->irq;
if (!irqd_irq_disabled(data) && !irqd_irq_inprogress(data))
enable_se7206_irq(data);
sts0 = __raw_readw(INTSTS0);
sts1 = __raw_readw(INTSTS1);
switch (irq) {
case IRQ0_IRQ:
sts0 &= ~0x00... | [
1,
0
] |
Linux Kernel | arch/sh/boards/mach-se/7206/irq.c |
static void make_se7206_irq(unsigned int irq) {
disable_irq_nosync(irq);
irq_set_chip_and_handler_name(irq, &se7206_irq_chip, handle_level_irq,
"level");
disable_se7206_irq(irq_get_irq_data(irq));
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-se/7343/irq.c |
static void se7343_irq_demux(struct irq_desc *desc) {
struct irq_data *data = irq_desc_get_irq_data(desc);
struct irq_chip *chip = irq_data_get_irq_chip(data);
unsigned long mask;
int bit;
chip->irq_mask_ack(data);
mask = ioread16(se7343_irq_regs + PA_CPLD_ST_REG);
for_each_set_bit(bit, &mask, SE7343_... | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-se/7343/irq.c |
static void __init se7343_gc_init(void) {
struct irq_chip_generic *gc;
struct irq_chip_type *ct;
unsigned int irq_base;
irq_base = irq_linear_revmap(se7343_irq_domain, 0);
gc = irq_alloc_generic_chip(DRV_NAME, 1, irq_base, se7343_irq_regs,
handle_level_irq);
if (unlikely(!gc... | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-se/7343/setup.c |
static void isp116x_delay(struct device *dev, int delay) { ndelay(delay); } | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-se/770x/irq.c | void __init init_se_IRQ(void) {
__raw_writew(0, BCR_ILCRA);
__raw_writew(0, BCR_ILCRB);
__raw_writew(0, BCR_ILCRC);
__raw_writew(0, BCR_ILCRD);
__raw_writew(0, BCR_ILCRE);
__raw_writew(0, BCR_ILCRF);
__raw_writew(0, BCR_ILCRG);
register_ipr_controller(&ipr_irq_desc);
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-se/7721/setup.c |
static int __init se7721_devices_setup(void) {
mrshpc_setup_windows();
return platform_add_devices(se7721_devices, ARRAY_SIZE(se7721_devices));
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-se/7722/irq.c | void __init init_se7722_IRQ(void) {
se7722_irq_regs = ioremap(IRQ01_BASE_ADDR, SZ_16);
if (unlikely(!se7722_irq_regs)) {
printk("Failed to remap IRQ01 regs\n");
return;
}
iowrite16(0, se7722_irq_regs + IRQ01_MASK_REG);
__raw_writew(0x2000, 0xb03fffec); /* mrshpc irq enable */
se7722_domain_init()... | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-se/7724/irq.c |
static unsigned int fpga2irq(unsigned int irq) {
if (irq >= IRQ0_BASE && irq <= IRQ0_END)
return IRQ0_IRQ;
else if (irq >= IRQ1_BASE && irq <= IRQ1_END)
return IRQ1_IRQ;
else
return IRQ2_IRQ;
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-se/7724/irq.c |
static void disable_se7724_irq(struct irq_data *data) {
unsigned int irq = data->irq;
struct fpga_irq set = get_fpga_irq(fpga2irq(irq));
unsigned int bit = irq - set.base;
__raw_writew(__raw_readw(set.mraddr) | 0x0001 << bit, set.mraddr);
} | [
1,
0
] |
Linux Kernel | arch/sh/boards/mach-se/7724/irq.c |
static void enable_se7724_irq(struct irq_data *data) {
unsigned int irq = data->irq;
struct fpga_irq set = get_fpga_irq(fpga2irq(irq));
unsigned int bit = irq - set.base;
__raw_writew(__raw_readw(set.mraddr) & ~(0x0001 << bit), set.mraddr);
} | [
1,
0
] |
Linux Kernel | arch/sh/boards/mach-se/7751/setup.c |
static int __init se7751_devices_setup(void) {
return platform_add_devices(se7751_devices, ARRAY_SIZE(se7751_devices));
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-sh03/rtc.c | static int set_rtc_mmss(struct rtc_time *tm) {
int retval = 0;
int real_seconds, real_minutes, cmos_minutes;
int i;
spin_lock(&sh03_rtc_lock);
for (i = 0; i < 1000000; i++) /* may take up to 1 second... */
if (!(__raw_readb(RTC_CTL) & RTC_BUSY))
break;
cmos_minutes =
(__raw_readb(RTC_MIN1) ... | [
1,
0
] |
Linux Kernel | arch/sh/boards/mach-sh7763rdp/setup.c |
static int __init sh7763rdp_devices_setup(void) {
return platform_add_devices(sh7763rdp_devices, ARRAY_SIZE(sh7763rdp_devices));
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-x3proto/gpio.c |
static int x3proto_gpio_direction_input(struct gpio_chip *chip, unsigned gpio) {
unsigned long flags;
unsigned int data;
spin_lock_irqsave(&x3proto_gpio_lock, flags);
data = __raw_readw(KEYCTLR);
data |= (1 << gpio);
__raw_writew(data, KEYCTLR);
spin_unlock_irqrestore(&x3proto_gpio_lock, flags);
retu... | [
0,
0
] |
Linux Kernel | arch/sh/boards/mach-x3proto/gpio.c |
static int x3proto_gpio_get(struct gpio_chip *chip, unsigned gpio) {
return !!(__raw_readw(KEYDETR) & (1 << gpio));
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/of-generic.c |
static void dummy_prepare_cpus(unsigned int max_cpus) {} | [
0,
0
] |
Linux Kernel | arch/sh/boards/of-generic.c |
static void sh_of_smp_probe(void) {}
#endif | [
0,
0
] |
Linux Kernel | arch/sh/boards/of-generic.c |
static void __init sh_of_init_irq(void) {
pr_info("SH generic board support: scanning for interrupt controllers\n");
irqchip_init();
} | [
0,
0
] |
Linux Kernel | arch/sh/boards/of-generic.c |
void __init __weak plat_irq_setup(void) {} | [
0,
0
] |
Linux Kernel | arch/sh/boot/compressed/misc.c |
void *memset(void *s, int c, size_t n) {
int i;
char *ss = (char *)s;
for (i = 0; i < n; i++)
ss[i] = c;
return s;
} | [
1,
0
] |
Linux Kernel | arch/sh/boot/compressed/misc.c | static void error(char *x) {
puts("\n\n");
puts(x);
puts("\n\n -- System halted");
while (1)
;
} | [
0,
0
] |
Linux Kernel | arch/sh/boot/compressed/misc.c |
void __stack_chk_fail(void) {
error("stack-protector: Kernel stack is corrupted\n");
} | [
0,
0
] |
Linux Kernel | arch/sh/cchips/hd6446x/hd64461.c |
static void hd64461_mask_irq(struct irq_data *data) {
unsigned int irq = data->irq;
unsigned short nimr;
unsigned short mask = 1 << (irq - HD64461_IRQBASE);
nimr = __raw_readw(HD64461_NIMR);
nimr |= mask;
__raw_writew(nimr, HD64461_NIMR);
} | [
1,
0
] |
Linux Kernel | arch/sh/drivers/dma/dma-api.c | int request_dma_bycap(const char **dmac, const char **caps,
const char *dev_id) {
unsigned int found = 0;
struct dma_info *info;
const char **p;
int i;
BUG_ON(!dmac || !caps);
list_for_each_entry(info, ®istered_dmac_list,
list) if (strcmp(*dmac, info->name) =... | [
1,
0
] |
Linux Kernel | arch/sh/drivers/dma/dma-api.c |
int register_chan_caps(const char *dmac, struct dma_chan_caps *caps) {
struct dma_info *info;
unsigned int found = 0;
int i;
list_for_each_entry(info, ®istered_dmac_list,
list) if (strcmp(dmac, info->name) == 0) {
found = 1;
break;
}
if (unlikely(!found))
return -ENOD... | [
1,
0
] |
Linux Kernel | arch/sh/drivers/dma/dma-api.c |
void dma_configure_channel(unsigned int chan, unsigned long flags) {
struct dma_info *info = get_dma_info(chan);
struct dma_channel *channel = get_dma_channel(chan);
if (info->ops->configure)
info->ops->configure(channel, flags);
} | [
0,
0
] |
Linux Kernel | arch/sh/drivers/dma/dma-api.c |
void unregister_dmac(struct dma_info *info) {
unsigned int i;
for (i = 0; i < info->nr_channels; i++)
dma_remove_sysfs_files(info->channels + i, info);
if (!(info->flags & DMAC_CHANNELS_CONFIGURED))
kfree(info->channels);
list_del(&info->list);
platform_device_unregister(info->pdev);
} | [
0,
0
] |
Linux Kernel | arch/sh/drivers/dma/dma-g2.c |
static int g2_enable_dma(struct dma_channel *chan) {
unsigned int chan_nr = chan->chan;
g2_dma->channel[chan_nr].chan_enable = 1;
g2_dma->channel[chan_nr].xfer_enable = 1;
return 0;
} | [
1,
0
] |
Linux Kernel | arch/sh/drivers/dma/dma-pvr2.c |
static irqreturn_t pvr2_dma_interrupt(int irq, void *dev_id) {
if (get_dma_residue(PVR2_CASCADE_CHAN)) {
printk(KERN_WARNING "DMA: SH DMAC did not complete transfer "
"on channel %d, waiting..\n",
PVR2_CASCADE_CHAN);
dma_wait_for_completion(PVR2_CASCADE_CHAN);
}
if (co... | [
0,
0
] |
Linux Kernel | arch/sh/drivers/dma/dma-pvr2.c |
static int pvr2_request_dma(struct dma_channel *chan) {
if (__raw_readl(PVR2_DMA_MODE) != 0)
return -EBUSY;
__raw_writel(0, PVR2_DMA_LMMODE0);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/sh/drivers/dma/dma-pvr2.c |
static int pvr2_xfer_dma(struct dma_channel *chan) {
if (chan->sar || !chan->dar)
return -EINVAL;
xfer_complete = 0;
__raw_writel(chan->dar, PVR2_DMA_ADDR);
__raw_writel(chan->count, PVR2_DMA_COUNT);
__raw_writel(chan->mode & DMA_MODE_MASK, PVR2_DMA_MODE);
return 0;
} | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.