/openbmc/linux/drivers/rtc/ |
H A D | interface.c | 1 // SPDX-License-Identifier: GPL-2.0 27 if (!rtc->offset_secs) in rtc_add_offset() 35 * between expanded range and original range, which is no need to add in rtc_add_offset() 38 if ((rtc->start_secs > rtc->range_min && secs >= rtc->start_secs) || in rtc_add_offset() 39 (rtc->start_secs < rtc->range_min && in rtc_add_offset() 40 secs <= (rtc->start_secs + rtc->range_max - rtc->range_min))) in rtc_add_offset() 43 rtc_time64_to_tm(secs + rtc->offset_secs, tm); in rtc_add_offset() 50 if (!rtc->offset_secs) in rtc_subtract_offset() 57 * device, then no need to subtract the offset when setting time to RTC in rtc_subtract_offset() 61 if (secs >= rtc->range_min && secs <= rtc->range_max) in rtc_subtract_offset() [all …]
|
H A D | rtc-ds1305.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * rtc-ds1305.c -- driver for DS1305 and DS1306 SPI RTC chips 21 * otherwise you're reading it. All non-bitmask values are BCD. 27 * - Need fancy "hours" encoding in 12hour mode 28 * - Don't rely on the "day-of-week" field (or tm_wday) 29 * - Are a 21st-century clock (2000 <= year < 2100) 50 * NOTE ALSO that while we could generate once-a-second IRQs (UIE), we 52 * no alarm is pending (not the standard model), or to use the second 98 /*----------------------------------------------------------------------*/ 101 * Utilities ... tolerate 12-hour AM/PM notation in case of non-Linux [all …]
|
/openbmc/linux/arch/arm/mm/ |
H A D | context.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2002-2003 Deep Blue Solutions Ltd, all rights reserved. 20 #include <asm/proc-fns.h> 26 * +-------------------------+-----------+ 28 * +-------------------------+-----------+ 30 * +-------------------------------------+ 37 * by non-64-bit operations. 59 context_id = mm->context.id.counter; in a15_erratum_get_cpumask() 80 * no need for a reserved set of tables (the active ASID tracking prevents 81 * any issues across a rollover). [all …]
|
/openbmc/linux/drivers/mtd/devices/ |
H A D | mchp48l640.c | 1 // SPDX-License-Identifier: GPL-2.0 11 * are wrong ... no idea why. 76 mutex_lock(&flash->lock); in mchp48l640_read_status() 77 ret = spi_write_then_read(flash->spi, &cmd[0], 1, &cmd[1], 1); in mchp48l640_read_status() 78 mutex_unlock(&flash->lock); in mchp48l640_read_status() 81 dev_dbg(&flash->spi->dev, "read status ret: %d status: %x", ret, *status); in mchp48l640_read_status() 94 dev_dbg(&flash->spi->dev, "read status ret: %d bit: %x %sset status: %x", in mchp48l640_waitforbit() 110 dev_err(&flash->spi->dev, "Timeout waiting for bit %x %s set in status register.", in mchp48l640_waitforbit() 112 return -ETIMEDOUT; in mchp48l640_waitforbit() 125 mutex_lock(&flash->lock); in mchp48l640_write_prepare() [all …]
|
/openbmc/linux/drivers/net/ethernet/sun/ |
H A D | cassini.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 29 /* cassini register map: 2M memory mapped in 32-bit memory space accessible as 30 * 32-bit words. there is no i/o port access. REG_ addresses are 62 /* top level interrupts [0-9] are auto-cleared to 0 when the status 63 * register is read. second level interrupts [13 - 18] are cleared at 64 * the source. tx completion register 3 is replicated in [19 - 31] 85 #define INTR_RX_BUF_UNAVAIL 0x00000020 /* no more receive buffers. 89 #define INTR_RX_COMP_FULL 0x00000080 /* no more room in completion 104 len of non-reassembly pkt 143 /* top level interrupt bits that are cleared during read of REG_INTR_STATUS_ALIAS. [all …]
|
/openbmc/u-boot/drivers/dfu/ |
H A D | dfu.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * dfu.c -- DFU back-end routines 27 * being sent the dfu-util performed reset of USB 31 * user has typed -e (detach) or -R (reset) when invoking 32 * dfu-util command. 67 return -EINVAL; in dfu_init_env_entities() 112 if (dfu->max_buf_size && dfu_buf_size > dfu->max_buf_size) in dfu_get_buf() 113 dfu_buf_size = dfu->max_buf_size; in dfu_get_buf() 146 w_size = dfu->i_buf - dfu->i_buf_start; in dfu_write_buffer_drain() 151 dfu_hash_algo->hash_update(dfu_hash_algo, &dfu->crc, in dfu_write_buffer_drain() [all …]
|
/openbmc/qemu/hw/timer/ |
H A D | digic-timer.c | 35 #include "hw/timer/digic-timer.h" 54 ptimer_transaction_begin(s->ptimer); in digic_timer_reset() 55 ptimer_stop(s->ptimer); in digic_timer_reset() 56 ptimer_transaction_commit(s->ptimer); in digic_timer_reset() 57 s->control = 0; in digic_timer_reset() 58 s->relvalue = 0; in digic_timer_reset() 68 ret = s->control; in digic_timer_read() 71 ret = s->relvalue; in digic_timer_read() 74 ret = ptimer_get_count(s->ptimer) & 0xffff; in digic_timer_read() 78 "digic-timer: read access to unknown register 0x" in digic_timer_read() [all …]
|
H A D | imx_epit.c | 8 * Updated by Jean-Christophe Dubois <jcd@tribudubois.net> 12 * the COPYING file in the top-level directory. 62 CLK_32k, /* 11 ipg_clk_32k -- ~32kHz */ 70 if ((s->sr & SR_OCIF) && (s->cr & CR_OCIEN) && (s->cr & CR_EN)) { in imx_epit_update_int() 71 qemu_irq_raise(s->irq); in imx_epit_update_int() 73 qemu_irq_lower(s->irq); in imx_epit_update_int() 79 uint32_t clksrc = extract32(s->cr, CR_CLKSRC_SHIFT, CR_CLKSRC_BITS); in imx_epit_get_freq() 80 uint32_t prescaler = 1 + extract32(s->cr, CR_PRESCALE_SHIFT, CR_PRESCALE_BITS); in imx_epit_get_freq() 81 uint32_t f_in = imx_ccm_get_clock_frequency(s->ccm, imx_epit_clocks[clksrc]); in imx_epit_get_freq() 94 s->cr = 0; in imx_epit_reset() [all …]
|
H A D | imx_gpt.c | 8 * Updated by Jean-Christophe Dubois <jcd@tribudubois.net> 11 * the COPYING file in the top-level directory. 79 CLK_NONE, /* 000 No clock source */ 90 CLK_NONE, /* 000 No clock source */ 101 CLK_NONE, /* 000 No clock source */ 112 CLK_NONE, /* 000 No clock source */ 123 CLK_NONE, /* 000 No clock source */ 136 uint32_t clksrc = extract32(s->cr, GPT_CR_CLKSRC_SHIFT, 3); in imx_gpt_set_freq() 138 s->freq = imx_ccm_get_clock_frequency(s->ccm, in imx_gpt_set_freq() 139 s->clocks[clksrc]) / (1 + s->pr); in imx_gpt_set_freq() [all …]
|
/openbmc/qemu/include/hw/usb/ |
H A D | ehci-regs.h | 4 /* Capability Registers Base Address - section 2.2 */ 5 #define CAPLENGTH 0x0000 /* 1-byte, 0x0001 reserved */ 6 #define HCIVERSION 0x0002 /* 2-bytes, i/f version # */ 7 #define HCSPARAMS 0x0004 /* 4-bytes, structural params */ 8 #define HCCPARAMS 0x0008 /* 4-bytes, capability params */ 32 #define USBSTS_FLR (1 << 3) // Frame List Rollover 42 * so no need to redefine here. 56 * Bits that are reserved or are read-only are masked out of values
|
/openbmc/linux/Documentation/devicetree/bindings/eeprom/ |
H A D | at24.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only 4 --- 6 $schema: http://devicetree.org/meta-schemas/core.yaml# 11 - Bartosz Golaszewski <bgolaszewski@baylibre.com> 14 - $ref: /schemas/nvmem/nvmem.yaml 20 pattern: "^atmel,(24(c|cs|mac)[0-9]+|spd)$" 22 - compatible 26 pattern: "^eeprom@[0-9a-f]{1,2}$" 36 - allOf: 37 - minItems: 1 [all …]
|
/openbmc/linux/drivers/misc/eeprom/ |
H A D | at24.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * at24.c - handle most I2C EEPROMs 5 * Copyright (C) 2005-2007 David Brownell 20 #include <linux/nvmem-provider.h> 30 /* sysfs-entry will be read-only. */ 32 /* sysfs-entry will be world-readable. */ 36 /* Factory-programmed serial number. */ 38 /* Factory-programmed mac address. */ 40 /* Does not auto-rollover reads to the next slave address. */ 46 * MicroChip 24LC, etc) won't much matter for typical read/write access. [all …]
|
H A D | at25.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 21 #include <linux/nvmem-provider.h> 49 #define AT25_RDSR 0x05 /* read status register */ 51 #define AT25_READ 0x03 /* read byte(s) */ 54 #define FM25_RDID 0x9f /* read device ID */ 55 #define FM25_RDSN 0xc3 /* read S/N */ 57 #define AT25_SR_nRDY 0x01 /* nRDY = write-in-progress */ 73 /*-------------------------------------------------------------------------*/ 82 size_t max_chunk = spi_max_transfer_size(at25->spi); in at25_ee_read() 92 if (unlikely(offset >= at25->chip.byte_len)) in at25_ee_read() [all …]
|
/openbmc/linux/net/packet/ |
H A D | af_packet.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 7 * PACKET - implements raw packet sockets. 15 * Alan Cox : new skbuff lists, look ma no backlogs! 18 * added. Also fixed the peek/read crash 22 * Alan Cox : Re-commented the code. 27 * dubious gcc output. Can you read 30 * Alan Cox : New buffers. Use sk->mac.raw. 101 - If the device has no dev->header_ops->create, there is no LL header 108 needed_headroom to be (the real WiFi header length - the fake Ethernet 110 - packet socket receives packets with pulled ll header, [all …]
|
/openbmc/linux/drivers/gpu/drm/msm/ |
H A D | msm_fence.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Copyright (C) 2013-2016 Red Hat 7 #include <linux/dma-fence.h> 15 struct msm_drm_private *priv = fctx->dev->dev_private; in fctx2gpu() 16 return priv->gpu; in fctx2gpu() 24 kthread_queue_work(fctx2gpu(fctx)->worker, &fctx->deadline_work); in deadline_timer() 35 if (msm_fence_completed(fctx, fctx->next_deadline_fence)) in deadline_work() 51 return ERR_PTR(-ENOMEM); in msm_fence_context_alloc() 53 fctx->dev = dev; in msm_fence_context_alloc() 54 strscpy(fctx->name, name, sizeof(fctx->name)); in msm_fence_context_alloc() [all …]
|
/openbmc/linux/Documentation/firmware-guide/acpi/apei/ |
H A D | output_format.rst | 1 .. SPDX-License-Identifier: GPL-2.0 55 [cache error][, TLB error][, bus error][, micro-architectural error] 57 <proc operation string>* := unknown or generic | data read | data write | \ 81 unknown | no error | single-bit ECC | multi-bit ECC | \ 82 single-symbol chipkill ECC | multi-symbol chipkill ECC | master abort | \ 106 downstream switch port | PCIe to PCI/PCI-X bridge | \ 107 PCI/PCI-X to PCIe bridge | root complex integrated endpoint device | \ 120 Bad TLP | Bad DLLP | RELAY_NUM Rollover | unknown | unknown | unknown | \ 121 Replay Timer Timeout | Advisory Non-Fatal
|
/openbmc/linux/drivers/gpu/drm/i915/display/ |
H A D | intel_tv_regs.h | 1 /* SPDX-License-Identifier: MIT */ 34 /* Selects no oversampling for 1080p */ 41 /* Sets the colorburst to PAL mode. Required for non-M PAL modes. */ 56 /* Read-only state that reports all features enabled */ 58 /* Read-only state that reports that Macrovision is disabled in hardware*/ 60 /* Read-only state that reports that TV-out is disabled in hardware. */ 64 /* Encoder test pattern 1 - combo pattern */ 66 /* Encoder test pattern 2 - full screen vertical 75% color bars */ 68 /* Encoder test pattern 3 - full screen horizontal 75% color bars */ 70 /* Encoder test pattern 4 - random noise */ [all …]
|
/openbmc/linux/arch/m68k/bvme6000/ |
H A D | config.c | 31 #include <asm/bootinfo-vme.h> 49 if (be16_to_cpu(bi->tag) == BI_VME_TYPE) in bvme6000_parse_bootinfo() 65 pit->pcddr |= 0x10; /* WDOG enable */ in bvme6000_reset() 115 pit->pgcr = 0x00; /* Unidirectional 8 bit, no handshake for now */ in config_bvme6000() 116 pit->psrr = 0x18; /* PIACK and PIRQ functions enabled */ in config_bvme6000() 117 pit->pacr = 0x00; /* Sub Mode 00, H2 i/p, no DMA */ in config_bvme6000() 118 pit->padr = 0x00; /* Just to be tidy! */ in config_bvme6000() 119 pit->paddr = 0x00; /* All inputs for now (safest) */ in config_bvme6000() 120 pit->pbcr = 0x80; /* Sub Mode 1x, H4 i/p, no DMA */ in config_bvme6000() 121 pit->pbdr = 0xbc | (*config_reg_ptr & BVME_CONFIG_SW1 ? 0 : 0x40); in config_bvme6000() [all …]
|
/openbmc/linux/drivers/usb/dwc2/ |
H A D | hcd.h | 1 /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ 3 * hcd.h - DesignWare HS OTG Controller host-mode declarations 5 * Copyright (C) 2004-2013 Synopsys, Inc. 24 * struct dwc2_host_chan - Software host channel descriptor 31 * - USB_SPEED_LOW 32 * - USB_SPEED_FULL 33 * - USB_SPEED_HIGH 35 * - USB_ENDPOINT_XFER_CONTROL: 0 36 * - USB_ENDPOINT_XFER_ISOC: 1 37 * - USB_ENDPOINT_XFER_BULK: 2 [all …]
|
/openbmc/linux/include/linux/ |
H A D | hp_sdc.h | 2 * HP i8042 System Device Controller -- header 22 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 31 * HP-HIL Technical Reference Manual. Hewlett Packard Product No. 45918A 34 * for Part Number 1820-4784 Revision B. Dwg No. A-1820-4784-2 50 /* No 4X status reads take longer than this (in usec). 104 #define HP_SDC_STATUS_PUP 0x70 /* Successful power-up self test */ 134 #define HP_SDC_STR 0x7f /* i8042 self-test result */ 146 #define HP_SDC_CFG_ROLLOVER 0x08 /* WTF is "N-key rollover"? */ 149 #define HP_SDC_CFG_KBD_OLD 0x03 /* keyboard code for non-HIL */ 167 case 0x1: str = "1820-3712"; break; \ [all …]
|
/openbmc/linux/drivers/net/ethernet/cadence/ |
H A D | macb_ptp.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2017 Cadence Design Systems - https://www.cadence.com 26 #define GEM_PTP_TIMER_NAME "gem-ptp-timer" 31 if (bp->hw_dma_cap == HW_DMA_CAP_PTP) in macb_ptp_desc() 34 if (bp->hw_dma_cap == HW_DMA_CAP_64B_PTP) in macb_ptp_desc() 49 spin_lock_irqsave(&bp->tsu_clk_lock, flags); in gem_tsu_get_time() 57 /* test for nsec rollover */ in gem_tsu_get_time() 59 /* if so, use later read & re-read seconds in gem_tsu_get_time() 63 ts->tv_nsec = gem_readl(bp, TN); in gem_tsu_get_time() 68 ts->tv_nsec = first; in gem_tsu_get_time() [all …]
|
/openbmc/linux/drivers/scsi/ |
H A D | qlogicpti.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 41 * slots available. That is, host->can_queue and host->sg_tablesize 46 #define QLOGICPTI_REQ_QUEUE_LEN 255 /* must be power of two - 1 */ 47 #define QLOGICPTI_MAX_SG(ql) (4 + (((ql) > 0) ? 7*((ql) - 1) : 0)) 298 * --------- 322 #define RES_QUEUE_LEN 255 /* Must be power of two - 1 */ 327 #define PREV_REQ_PTR(wheee) (((wheee) - 1) & QLOGICPTI_REQ_QUEUE_LEN) 328 #define PREV_RES_PTR(wheee) (((wheee) - 1) & RES_QUEUE_LEN) 352 /* The cmd->handler is only 32-bits, so that things work even on monster 354 * scsi command pointers here. This is essentially what Matt Jacob does. -DaveM [all …]
|
/openbmc/linux/drivers/usb/misc/ |
H A D | iowarrior.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Native support for the I/O-Warrior USB devices 5 * Copyright (c) 2003-2005, 2020 Code Mercenaries GmbH 11 * usb-skeleton.c by Greg Kroah-Hartman <greg@kroah.com> 27 #define DRIVER_DESC "USB IO-Warrior driver" 68 /*--------------*/ 70 /*--------------*/ 81 unsigned char *int_in_buffer; /* buffer for data to be read */ 85 wait_queue_head_t write_wait; /* wait-queue for writing to the device */ 86 atomic_t write_busy; /* number of write-urbs submitted */ [all …]
|
/openbmc/linux/drivers/gpu/drm/msm/adreno/ |
H A D | a3xx_gpu.c | 1 // SPDX-License-Identifier: GPL-2.0-only 33 struct msm_ringbuffer *ring = submit->ring; in a3xx_submit() 36 for (i = 0; i < submit->nr_cmds; i++) { in a3xx_submit() 37 switch (submit->cmd[i].type) { in a3xx_submit() 39 /* ignore IB-targets */ in a3xx_submit() 43 if (gpu->cur_ctx_seqno == submit->queue->ctx->seqno) in a3xx_submit() 48 OUT_RING(ring, lower_32_bits(submit->cmd[i].iova)); in a3xx_submit() 49 OUT_RING(ring, submit->cmd[i].size); in a3xx_submit() 56 OUT_RING(ring, submit->seqno); in a3xx_submit() 73 OUT_RING(ring, submit->seqno); in a3xx_submit() [all …]
|
/openbmc/linux/drivers/net/wireless/marvell/mwifiex/ |
H A D | pcie.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright 2011-2020 NXP 183 if (!of_match_node(mwifiex_pcie_of_match_table, dev->of_node)) { in mwifiex_pcie_probe_of() 185 return -EINVAL; in mwifiex_pcie_probe_of() 199 struct pcie_service_card *card = adapter->card; in mwifiex_map_pci_memory() 202 mapping.addr = dma_map_single(&card->dev->dev, skb->data, size, flags); in mwifiex_map_pci_memory() 203 if (dma_mapping_error(&card->dev->dev, mapping.addr)) { in mwifiex_map_pci_memory() 205 return -1; in mwifiex_map_pci_memory() 215 struct pcie_service_card *card = adapter->card; in mwifiex_unmap_pci_memory() 219 dma_unmap_single(&card->dev->dev, mapping.addr, mapping.len, flags); in mwifiex_unmap_pci_memory() [all …]
|