Home
last modified time | relevance | path

Searched +full:x +full:- +full:rc (Results 1 – 25 of 586) sorted by relevance

12345678910>>...24

/openbmc/qemu/hw/xen/
H A Dxen_pt_msi.c5 * the COPYING file in the top-level directory.
14 #include "hw/i386/apic-msidef.h"
16 #include "hw/xen/xen-legacy-backend.h"
19 #define XEN_PT_AUTO_ASSIGN -1
71 return (uint64_t)msi->addr_hi << 32 | msi->addr_lo; in msi_addr64()
80 int rc; in msi_msix_enable() local
83 return -1; in msi_msix_enable()
86 rc = xen_host_pci_get_word(&s->real_device, address, &val); in msi_msix_enable()
87 if (rc) { in msi_msix_enable()
88 XEN_PT_ERR(&s->dev, "Failed to read MSI/MSI-X register (0x%x), rc:%d\n", in msi_msix_enable()
[all …]
H A Dxen-host-pci-device.c5 * the COPYING file in the top-level directory.
12 #include "hw/xen/xen-legacy-backend.h"
13 #include "hw/xen/xen-bus-helper.h"
14 #include "xen-host-pci-device.h"
17 ((PCIE_CONFIG_SPACE_SIZE - PCI_CONFIG_SPACE_SIZE) / (PCI_CAP_SIZEOF + 4))
29 #define IORESOURCE_BITS 0x000000ff /* Bus-specific bits */
39 * Non-passthrough (dom0) accesses are local PCI devices and use the given BDF
41 * either have a BDF identical to the backend's BDF (xen-backend.passthrough=1)
42 * or a local virtual BDF (xen-backend.passthrough=0)
67 snprintf(path, sizeof(path), "dev-%d", i); in xen_host_pci_fill_local_addr()
[all …]
H A Dxen_pt.c6 * the COPYING file in the top-level directory.
22 * - Set real Interrupt Disable bit to '1'.
23 * - Set machine_irq and assigned_device->machine_irq to '0'.
28 * - Set real Interrupt Disable bit to '1'.
29 * - Unmap INTx.
30 * - Decrement xen_pt_mapped_machine_irq[machine_irq]
31 * - Set assigned_device->machine_irq to '0'.
35 * - Set real bit to '0' if assigned_device->machine_irq isn't '0'.
38 * - Set real bit to '1'.
44 * - Unmap MSI.
[all …]
/openbmc/u-boot/arch/arm/mach-omap2/am33xx/
H A Dclk_synthesizer.c1 // SPDX-License-Identifier: GPL-2.0+
3 * clk-synthesizer.c
7 * Copyright (C) 2016, Texas Instruments, Incorporated - http://www.ti.com/
16 * clk_synthesizer_reg_read - Read register from synthesizer.
27 int rc; in clk_synthesizer_reg_read() local
34 rc = i2c_write(CLK_SYNTHESIZER_I2C_ADDR, addr, 1, buf, 1); in clk_synthesizer_reg_read()
35 if (rc) in clk_synthesizer_reg_read()
42 rc = dm_i2c_reg_write(dev, addr, *buf); in clk_synthesizer_reg_read()
43 if (rc) in clk_synthesizer_reg_read()
47 rc = dm_i2c_reg_read(dev, addr); in clk_synthesizer_reg_read()
[all …]
/openbmc/hiomapd/
H A Dprotocol.c1 // SPDX-License-Identifier: Apache-2.0
18 #pragma GCC diagnostic ignored "-Wpointer-arith"
19 #pragma GCC diagnostic ignored "-Wunused-result"
25 if (context->version == API_VERSION_1) { in protocol_get_bmc_event_mask()
33 * protocol_events_put() - Push the full set/cleared state of BMC events on the
45 return ops->put_events(context, mask); in protocol_events_put()
49 * protocol_events_set() - Update the set BMC events on the active transport
60 * Store the raw value, as we may up- or down- grade the protocol in protocol_events_set()
64 context->bmc_events |= bmc_event; in protocol_events_set()
66 return context->transport->set_events(context, bmc_event, mask); in protocol_events_set()
[all …]
/openbmc/qemu/pc-bios/s390-ccw/
H A Dnetmain.c2 * S390 virtio-ccw network boot loading program
6 * Based on the S390 virtio-ccw loading program (main.c)
35 #include "s390-ccw.h"
38 #include "s390-time.h"
65 return dest_timer - get_time_ms(); in get_timer()
76 * client MAC, client IP, TFTP-server MAC, TFTP-server IP,
80 * non-0 : error condition occurred.
85 int rc = -1; in dhcp() local
93 printf("\b\b\b%03d", i - 1); in dhcp()
94 if (!--i) { in dhcp()
[all …]
H A Dcio.c10 * your option) any later version. See the COPYING file in the top-level
16 #include "s390-ccw.h"
17 #include "s390-arch.h"
31 sda_area->request.length = 0x0400; in enable_mss_facility()
32 sda_area->request.code = 0x0031; in enable_mss_facility()
33 sda_area->operation_code = 0x2; in enable_mss_facility()
36 if ((ret == 0) && (sda_area->response.code == 0x0001)) { in enable_mss_facility()
39 return -EIO; in enable_mss_facility()
84 if (irb->scsw.cstat) { in irb_error()
87 return irb->scsw.dstat != (SCSW_DSTAT_DEVEND | SCSW_DSTAT_CHEND); in irb_error()
[all …]
/openbmc/hiomapd/file/
H A Dbackend.c1 // SPDX-License-Identifier: Apache-2.0
12 #include <mtd/mtd-abi.h>
39 #pragma GCC diagnostic ignored "-Wpointer-arith"
51 int rc = 0; in file_dev_init() local
55 return -EINVAL; in file_dev_init()
60 return -errno; in file_dev_init()
64 priv->fd = open(path, O_RDWR); in file_dev_init()
65 if (priv->fd < 0) { in file_dev_init()
68 rc = -errno; in file_dev_init()
73 rc = ioctl(priv->fd, MEMGETINFO, &info); in file_dev_init()
[all …]
/openbmc/libmctp/utils/
H A Dmctp-astlpc-daemon.c1 /* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */
12 #include "libmctp-astlpc.h"
30 fprintf(stderr, "TX: dest EID 0x%02x: %zd bytes, first byte [0x%02x]\n", in tx_message()
32 mctp_message_tx(ctx->mctp, eid, 0, MCTP_MESSAGE_TO_SRC, msg, len); in tx_message()
43 fprintf(stderr, "RX: src EID 0x%02x: %zd bytes, first byte [0x%02x]\n", in rx_message()
57 int rc; in main() local
68 ctx->mctp = mctp; in main()
82 rc = poll(pollfds, 2, -1); in main()
83 if (rc < 0) in main()
88 rc = read(STDIN_FILENO, buf, sizeof(buf)); in main()
[all …]
/openbmc/skeleton/op-flasher/
H A Dflasher_obj.c7 * http://www.apache.org/licenses/LICENSE-2.0
44 #define __aligned(x) __attribute__((aligned(x))) argument
59 int rc = 0; in erase_chip() local
64 rc = arch_flash_erase_chip(bl); in erase_chip()
65 if(rc) { in erase_chip()
66 fprintf(stderr, "Error %d erasing chip\n", rc); in erase_chip()
67 return(rc); in erase_chip()
71 return(rc); in erase_chip()
99 -1, in flash_message()
109 int fd, rc; in program_file() local
[all …]
/openbmc/phosphor-mboxd/
H A Dmboxd_msg.c1 // SPDX-License-Identifier: Apache-2.0
34 * write_bmc_event_reg() - Write to the BMC controlled status register (reg 15)
41 int rc; in write_bmc_event_reg() local
44 rc = lseek(context->fds[MBOX_FD].fd, MBOX_BMC_EVENT, SEEK_SET); in write_bmc_event_reg()
45 if (rc != MBOX_BMC_EVENT) { in write_bmc_event_reg()
48 return -MBOX_R_SYSTEM_ERROR; in write_bmc_event_reg()
52 rc = write(context->fds[MBOX_FD].fd, &context->bmc_events, 1); in write_bmc_event_reg()
53 if (rc != 1) { in write_bmc_event_reg()
56 return -MBOX_R_SYSTEM_ERROR; in write_bmc_event_reg()
60 rc = lseek(context->fds[MBOX_FD].fd, 0, SEEK_SET); in write_bmc_event_reg()
[all …]
H A Dmboxd_flash.c1 // SPDX-License-Identifier: Apache-2.0
27 #include <mtd/mtd-abi.h>
36 int fd, rc = 0; in init_flash_dev() local
40 return -1; in init_flash_dev()
50 rc = -errno; in init_flash_dev()
53 context->fds[MTD_FD].fd = fd; in init_flash_dev()
56 if (ioctl(fd, MEMGETINFO, &context->mtd_info) == -1) { in init_flash_dev()
59 rc = -1; in init_flash_dev()
63 if (context->flash_size == 0) { in init_flash_dev()
70 * context->flash_size, and not the size of the flash device. in init_flash_dev()
[all …]
/openbmc/ipmitool/lib/
H A Dipmi_hpmfwupg.c23 * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
110 /* HpmGetuserInput - get input from user
131 /* HpmDisplayLine - display the line with the given character
136 while (n--) { in HpmDisplayLine()
142 /* HpmDisplayUpgradeHeader - display the Upgrade header information
148 HpmDisplayLine("-", 79); in HpmDisplayUpgradeHeader()
154 "|----|-------------|-----------------|-----------------|-----------------|----|\n"); in HpmDisplayUpgradeHeader()
157 /* HpmDisplayUpgrade - display the progress of the upgrade; prints the "."
165 static int old_percent = -1; in HpmDisplayUpgrade()
174 if (old_percent != -1) { in HpmDisplayUpgrade()
[all …]
H A Dipmi_sdradd.c20 * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
32 * Functions to program the SDR repository, from built-in sensors or
72 message fits into the recommended 32-byte limit */
81 rsp = intf->sendrecv(intf, req); in partial_send()
83 return -1; in partial_send()
86 if (rsp->ccode || rsp->data_len < 2) { in partial_send()
87 return -1; in partial_send()
90 *id = rsp->data[0] + (rsp->data[1] << 8); in partial_send()
102 int len = sdrr->length; in ipmi_sdr_add_record()
103 int rc = 0; in ipmi_sdr_add_record() local
[all …]
H A Dipmi_ime.c25 * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED.
44 * The ME is an IPMI-enabled component included in Intel(R) Next Generation
45 * Server Chipset Nehalem-EP platforms.
49 * - Dynamic Power Node Manager
50 * - Intelligent Power Node Manager
64 * ipmitool -m 0x20 -t 0x88 -b 8 ime info
66 * !! WARNING - You MUST use an image provided by your board vendor. - WARNING !!
69 * Jean-Michel.Audet@ca.kontron.com
76 * 2009-04-20
97 static const int IME_ERROR = -1;
[all …]
H A Dipmi_delloem.c6 * - Redistributions of source code must retain the above copyright notice,
9 * - Redistributions in binary form must reproduce the above copyright notice,
12 * - Neither the name of Dell Inc nor the names of its contributors
69 #define INVALID (-1)
80 #define INVAILD_FAILOVER_MODE -2
81 #define INVAILD_FAILOVER_MODE_SETTINGS -3
82 #define INVAILD_SHARED_MODE -4
129 * 11G || 12G || 13G -> _ALL
130 * 12G || 13G -> _12_13
258 * Input: intf - ipmi interface
[all …]
/openbmc/hiomapd/mtd/
H A Dbackend.c1 // SPDX-License-Identifier: Apache-2.0
11 #include <mtd/mtd-abi.h>
35 #pragma GCC diagnostic ignored "-Wpointer-arith"
41 int rc = 0; in mtd_dev_init() local
50 rc = -errno; in mtd_dev_init()
56 priv->fd = open(path, O_RDWR); in mtd_dev_init()
57 if (priv->fd < 0) { in mtd_dev_init()
60 rc = -errno; in mtd_dev_init()
65 if (ioctl(priv->fd, MEMGETINFO, &priv->mtd_info) == -1) { in mtd_dev_init()
66 rc = -errno; in mtd_dev_init()
[all …]
/openbmc/libmctp/
H A Dastlpc.c1 /* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later */
18 #define pr_fmt(x) "astlpc: " x argument
23 #include "libmctp-alloc.h"
24 #include "libmctp-log.h"
25 #include "libmctp-astlpc.h"
35 #include <linux/aspeed-lpc-ctrl.h>
38 static const char *lpc_path = "/dev/aspeed-lpc-ctrl";
145 bool __bmc = ((ctx)->mode == MCTP_BINDING_ASTLPC_MODE_BMC); \
161 /* clang-format off */
170 /* clang-format on */
[all …]
/openbmc/u-boot/drivers/i2c/
H A Dtegra_i2c.c1 // SPDX-License-Identifier: GPL-2.0+
4 * Copyright (c) 2010-2011 NVIDIA Corporation
20 #include <asm/arch-tegra/tegra_i2c.h>
47 if (i2c_bus->type == TYPE_DVC) { in set_packet_mode()
48 struct dvc_ctlr *dvc = (struct dvc_ctlr *)i2c_bus->regs; in set_packet_mode()
50 writel(config, &dvc->cnfg); in set_packet_mode()
52 writel(config, &i2c_bus->regs->cnfg); in set_packet_mode()
57 setbits_le32(&i2c_bus->regs->sl_cnfg, I2C_SL_CNFG_NEWSL_MASK); in set_packet_mode()
64 reset_assert(&i2c_bus->reset_ctl); in i2c_reset_controller()
66 reset_deassert(&i2c_bus->reset_ctl); in i2c_reset_controller()
[all …]
/openbmc/u-boot/drivers/tpm/
H A Dtpm2_tis_sandbox.c1 // SPDX-License-Identifier: GPL-2.0+
9 #include <tpm-v2.h>
79 printf("No session required for command 0x%x\n", in sandbox_tpm2_check_session()
92 printf("Session required for command 0x%x\n", command); in sandbox_tpm2_check_session()
121 printf("Wrong handle 0x%x\n", handle); in sandbox_tpm2_check_session()
128 printf("Command code not recognized: 0x%x\n", command); in sandbox_tpm2_check_session()
138 printf("Wrong session handle 0x%x\n", session_handle); in sandbox_tpm2_check_session()
161 if (!pw_sz && !tpm->pw_sz[*hierarchy]) in sandbox_tpm2_check_session()
175 if (pw_sz != tpm->pw_sz[*hierarchy] || in sandbox_tpm2_check_session()
176 strncmp(pw, tpm->pw[*hierarchy], tpm->pw_sz[*hierarchy])) { in sandbox_tpm2_check_session()
[all …]
/openbmc/openpower-proc-control/extensions/phal/
H A Dpdbg_utils.cpp11 #include <phosphor-logging/log.hpp>
54 return -1; in probeTarget()
62 return -1; in probeTarget()
74 return -1; in getCFAM()
77 auto rc = probeTarget(procTarget); in getCFAM() local
78 if (rc) in getCFAM()
81 return rc; in getCFAM()
84 rc = fsi_read(fsiTarget, reg, &val); in getCFAM()
85 if (rc) in getCFAM()
88 "failed to read input cfam", entry("RC=%u", rc), in getCFAM()
[all …]
/openbmc/u-boot/env/
H A Dflash.c1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2000-2010
6 * (C) Copyright 2001 Sysgo Real-Time Solutions, GmbH <www.elinos.com>
60 CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE - 1;
68 CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1;
77 uchar flag1 = flash_addr->flags; in env_flash_init()
78 uchar flag2 = flash_addr_new->flags; in env_flash_init()
81 ulong addr1 = (ulong)&(flash_addr->data); in env_flash_init()
82 ulong addr2 = (ulong)&(flash_addr_new->data); in env_flash_init()
84 crc1_ok = crc32(0, flash_addr->data, ENV_SIZE) == flash_addr->crc; in env_flash_init()
[all …]
/openbmc/u-boot/cmd/
H A Dfsi.c23 int rc; in do_getcfam() local
33 debug("%s %08x\n", __func__, addr); in do_getcfam()
34 rc = aspeed_fsi_read(fsi, 0, addr, &val, 4); in do_getcfam()
35 if (rc) { in do_getcfam()
36 printf("error reading: %d\n", rc); in do_getcfam()
40 printf("0x%08x\n", be32_to_cpu(val)); in do_getcfam()
45 int rc; in do_putcfam() local
56 debug("%s %08x %08x\n", __func__, addr, val); in do_putcfam()
57 rc = aspeed_fsi_write(fsi, 0, addr, &val, 4); in do_putcfam()
58 if (rc) in do_putcfam()
[all …]
/openbmc/u-boot/drivers/net/
H A Dbcm-sf2-eth.c1 // SPDX-License-Identifier: GPL-2.0+
17 #include "bcm-sf2-eth.h"
20 #include "bcm-sf2-eth-gmac.h"
34 struct eth_info *eth = (struct eth_info *)(dev->priv); in bcm_sf2_eth_init()
35 struct eth_dma *dma = &(eth->dma); in bcm_sf2_eth_init()
37 int rc = 0; in bcm_sf2_eth_init() local
40 rc = eth->mac_init(dev); in bcm_sf2_eth_init()
41 if (rc) { in bcm_sf2_eth_init()
43 return rc; in bcm_sf2_eth_init()
47 dma->disable_dma(dma, MAC_DMA_RX); in bcm_sf2_eth_init()
[all …]
/openbmc/phosphor-mboxd/vpnor/
H A Dmboxd_flash.cpp1 // SPDX-License-Identifier: Apache-2.0
23 #include <phosphor-logging/log.hpp>
24 #include <phosphor-logging/elog-errors.hpp>
49 int rc = 0; in init_flash_dev() local
54 return -1; in init_flash_dev()
64 return -errno; in init_flash_dev()
68 if (ioctl(fd, MEMGETINFO, &context->mtd_info) == -1) in init_flash_dev()
72 return -errno; in init_flash_dev()
75 if (context->flash_size == 0) in init_flash_dev()
79 context->flash_size = context->mtd_info.size; in init_flash_dev()
[all …]

12345678910>>...24