| /openbmc/u-boot/fs/yaffs2/ |
| H A D | yaffs_checkptrw.c | 2 * YAFFS: Yet Another Flash File System. A NAND-flash specific file system. 4 * Copyright (C) 2002-2011 Aleph One Ltd. 17 static int yaffs2_checkpt_space_ok(struct yaffs_dev *dev) in yaffs2_checkpt_space_ok() argument 19 int blocks_avail = dev->n_erased_blocks - dev->param.n_reserved_blocks; in yaffs2_checkpt_space_ok() 24 return (blocks_avail <= 0) ? 0 : 1; in yaffs2_checkpt_space_ok() 27 static int yaffs_checkpt_erase(struct yaffs_dev *dev) in yaffs_checkpt_erase() argument 31 if (!dev->param.erase_fn) in yaffs_checkpt_erase() 32 return 0; in yaffs_checkpt_erase() 35 dev->internal_start_block, dev->internal_end_block); in yaffs_checkpt_erase() 37 for (i = dev->internal_start_block; i <= dev->internal_end_block; i++) { in yaffs_checkpt_erase() [all …]
|
| H A D | yaffs_guts.c | 2 * YAFFS: Yet Another Flash File System. A NAND-flash specific file system. 4 * Copyright (C) 2002-2011 Aleph One Ltd. 47 void yaffs_addr_to_chunk(struct yaffs_dev *dev, loff_t addr, in yaffs_addr_to_chunk() argument 53 chunk = (u32) (addr >> dev->chunk_shift); in yaffs_addr_to_chunk() 55 if (dev->chunk_div == 1) { in yaffs_addr_to_chunk() 57 offset = (u32) (addr & dev->chunk_mask); in yaffs_addr_to_chunk() 59 /* Non power-of-2 case */ in yaffs_addr_to_chunk() 63 chunk /= dev->chunk_div; in yaffs_addr_to_chunk() 65 chunk_base = ((loff_t) chunk) * dev->data_bytes_per_chunk; in yaffs_addr_to_chunk() 66 offset = (u32) (addr - chunk_base); in yaffs_addr_to_chunk() [all …]
|
| /openbmc/openbmc/poky/meta/files/ |
| H A D | device_table-minimal.txt | 2 #/dev/mem c 640 0 0 1 1 0 0 - 11 /dev d 755 root root - - - - - 12 /dev/console c 662 root tty 5 1 - - - 13 /dev/fb0 c 600 root root 29 0 - - - 14 /dev/hda b 660 root disk 3 0 - - - 15 /dev/hda b 660 root disk 3 1 1 1 4 16 /dev/kmem c 640 root kmem 1 2 - - - 17 /dev/kmsg c 600 root root 1 11 - - - 18 /dev/mem c 640 root kmem 1 1 - - - 19 /dev/mmcblk0 b 660 root disk 179 0 - - - [all …]
|
| /openbmc/u-boot/test/dm/ |
| H A D | test-fdt.c | 1 // SPDX-License-Identifier: GPL-2.0+ 14 #include <dm/device-internal.h> 15 #include <dm/uclass-internal.h> 23 static int testfdt_drv_ping(struct udevice *dev, int pingval, int *pingret) in testfdt_drv_ping() argument 25 const struct dm_test_pdata *pdata = dev->platdata; in testfdt_drv_ping() 26 struct dm_test_priv *priv = dev_get_priv(dev); in testfdt_drv_ping() 28 *pingret = pingval + pdata->ping_add; in testfdt_drv_ping() 29 priv->ping_total += *pingret; in testfdt_drv_ping() 31 return 0; in testfdt_drv_ping() 38 static int testfdt_ofdata_to_platdata(struct udevice *dev) in testfdt_ofdata_to_platdata() argument [all …]
|
| H A D | bus.c | 1 // SPDX-License-Identifier: GPL-2.0+ 11 #include <dm/device-internal.h> 13 #include <dm/uclass-internal.h> 27 FLAG_CHILD_REMOVED = -7, 32 static int testbus_drv_probe(struct udevice *dev) in testbus_drv_probe() argument 34 return dm_scan_fdt_dev(dev); in testbus_drv_probe() 37 static int testbus_child_post_bind(struct udevice *dev) in testbus_child_post_bind() argument 41 plat = dev_get_parent_platdata(dev); in testbus_child_post_bind() 42 plat->bind_flag = 1; in testbus_child_post_bind() 43 plat->uclass_bind_flag = 2; in testbus_child_post_bind() [all …]
|
| H A D | i2c.c | 1 // SPDX-License-Identifier: GPL-2.0+ 5 * Note: Test coverage does not include 10-bit addressing 14 #include <dm/device-internal.h> 16 #include <dm/uclass-internal.h> 21 static const int chip = 0x2c; 26 struct udevice *bus, *dev; in dm_test_i2c_find() local 27 const int no_chip = 0x10; in dm_test_i2c_find() 29 ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_I2C, busnum, in dm_test_i2c_find() 37 ut_assertok(dm_i2c_probe(bus, chip, 0, &dev)); in dm_test_i2c_find() 38 ut_asserteq(-ENOENT, dm_i2c_probe(bus, no_chip, 0, &dev)); in dm_test_i2c_find() [all …]
|
| /openbmc/u-boot/arch/x86/cpu/ivybridge/ |
| H A D | sata.c | 1 // SPDX-License-Identifier: GPL-2.0 4 * Copyright (C) 2008-2009 coresystems GmbH 18 static void common_sata_init(struct udevice *dev, unsigned int port_map) in common_sata_init() argument 25 dm_pci_write_config32(dev, IDE_CONFIG, reg32); in common_sata_init() 28 dm_pci_read_config16(dev, 0x92, ®16); in common_sata_init() 29 reg16 &= ~0x3f; in common_sata_init() 31 dm_pci_write_config16(dev, 0x92, reg16); in common_sata_init() 34 port_map &= 0xff; in common_sata_init() 35 dm_pci_write_config32(dev, 0x94, ((port_map ^ 0x3f) << 24) | 0x183); in common_sata_init() 38 static void bd82x6x_sata_init(struct udevice *dev, struct udevice *pch) in bd82x6x_sata_init() argument [all …]
|
| /openbmc/qemu/hw/pci/ |
| H A D | pcie_sriov.c | 6 * Copyright (c) 2015-2017 Knut Omang <knut.omang@oracle.com> 9 * See the COPYING file in the top-level directory. 17 #include "hw/qdev-properties.h" 24 static void unparent_vfs(PCIDevice *dev, uint16_t total_vfs) in unparent_vfs() argument 26 for (uint16_t i = 0; i < total_vfs; i++) { in unparent_vfs() 27 PCIDevice *vf = dev->exp.sriov_pf.vf[i]; in unparent_vfs() 31 g_free(dev->exp.sriov_pf.vf); in unparent_vfs() 32 dev->exp.sriov_pf.vf = NULL; in unparent_vfs() 35 static void register_vfs(PCIDevice *dev) in register_vfs() argument 39 uint16_t sriov_cap = dev->exp.sriov_cap; in register_vfs() [all …]
|
| H A D | msi.c | 31 #define PCI_MSI_ADDRESS_LO_MASK (~0x3) 34 #define PCI_MSI_32_SIZEOF 0x0a 35 #define PCI_MSI_64_SIZEOF 0x0e 36 #define PCI_MSI_32M_SIZEOF 0x14 37 #define PCI_MSI_64M_SIZEOF 0x18 42 * Flag for interrupt controllers to declare broken MSI/MSI-X support. 43 * values: false - broken; true - non-broken. 45 * Setting this flag to false will remove MSI/MSI-X capability from all devices. 47 * It is preferable for controllers to set this to true (non-broken) even if 48 * they do not actually support MSI/MSI-X: guests normally probe the controller [all …]
|
| /openbmc/u-boot/drivers/net/ |
| H A D | smc911x.c | 1 // SPDX-License-Identifier: GPL-2.0+ 16 u32 pkt_data_pull(struct eth_device *dev, u32 addr) \ 18 void pkt_data_push(struct eth_device *dev, u32 addr, u32 val) \ 21 static void smc911x_handle_mac_address(struct eth_device *dev) in smc911x_handle_mac_address() argument 24 uchar *m = dev->enetaddr; in smc911x_handle_mac_address() 26 addrl = m[0] | (m[1] << 8) | (m[2] << 16) | (m[3] << 24); in smc911x_handle_mac_address() 28 smc911x_set_mac_csr(dev, ADDRL, addrl); in smc911x_handle_mac_address() 29 smc911x_set_mac_csr(dev, ADDRH, addrh); in smc911x_handle_mac_address() 34 static int smc911x_eth_phy_read(struct eth_device *dev, in smc911x_eth_phy_read() argument 37 while (smc911x_get_mac_csr(dev, MII_ACC) & MII_ACC_MII_BUSY) in smc911x_eth_phy_read() [all …]
|
| H A D | natsemi.c | 2 natsemi.c: A U-Boot driver for the NatSemi DP8381x series. 21 Written/copyright 1999-2001 by Donald Becker. 48 * Initial U-Boot Release. Tested with Netgear FA311 board 61 #define EEPROM_SIZE 0xb /*12 16-bit chunks, or 24 bytes*/ 63 #define DSIZE 0x00000FFF 71 Unlike software-only systems, device drivers interact with complex hardware. 75 ChipCmd = 0x00, 76 ChipConfig = 0x04, 77 EECtrl = 0x08, 78 IntrMask = 0x14, [all …]
|
| H A D | ns8382x.c | 2 ns8382x.c: A U-Boot driver for the NatSemi DP8382[01]. 19 Written/copyright 1999-2002 by Donald Becker. 44 * Initial U-Boot Release. 61 #define DSIZE 0x00000FFF 69 ChipCmd = 0x00, 70 ChipConfig = 0x04, 71 EECtrl = 0x08, 72 IntrMask = 0x14, 73 IntrEnable = 0x18, 74 TxRingPtr = 0x20, [all …]
|
| H A D | dc2114x.c | 1 // SPDX-License-Identifier: GPL-2.0+ 16 #define PCI_CFDA_PSM 0x43 18 #define CFRV_RN 0x000000f0 /* Revision Number */ 20 #define WAKEUP 0x00 /* Power Saving Wakeup */ 21 #define SLEEP 0x80 /* Power Saving Sleep Mode */ 23 #define DC2114x_BRK 0x0020 /* CFRV break between DC21142 & DC21143 */ 27 #define DE4X5_BMR 0x000 /* Bus Mode Register */ 28 #define DE4X5_TPD 0x008 /* Transmit Poll Demand Reg */ 29 #define DE4X5_RRBA 0x018 /* RX Ring Base Address Reg */ 30 #define DE4X5_TRBA 0x020 /* TX Ring Base Address Reg */ [all …]
|
| H A D | eepro100.c | 1 // SPDX-License-Identifier: GPL-2.0+ 19 #define SCBStatus 0 /* Rx/Command Unit Status *Word* */ 34 #define SCB_STATUS_CX 0x8000 /* CU finished command (transmit) */ 35 #define SCB_STATUS_FR 0x4000 /* frame received */ 36 #define SCB_STATUS_CNA 0x2000 /* CU left active state */ 37 #define SCB_STATUS_RNR 0x1000 /* receiver left ready state */ 38 #define SCB_STATUS_MDI 0x0800 /* MDI read/write cycle done */ 39 #define SCB_STATUS_SWI 0x0400 /* software generated interrupt */ 40 #define SCB_STATUS_FCP 0x0100 /* flow control pause interrupt */ 42 #define SCB_INTACK_MASK 0xFD00 /* all the above */ [all …]
|
| H A D | pcnet.c | 1 // SPDX-License-Identifier: GPL-2.0+ 6 * Linux driver pcnet32.c written 1996-1999 by Thomas Bogendoerfer. 16 #define PCNET_DEBUG_LEVEL 0 /* 0=off, 1=init, 2=rx/tx */ 19 debug_cond(PCNET_DEBUG_LEVEL > 0, fmt ,##args) 32 #define PCNET_LOG_TX_BUFFERS 0 60 /* The PCNET 32-Bit initialization block, described in databook. */ 90 #define PCNET_RDP 0x10 91 #define PCNET_RAP 0x12 92 #define PCNET_RESET 0x14 93 #define PCNET_BDP 0x16 [all …]
|
| /openbmc/qemu/tests/qtest/libqos/ |
| H A D | pci.c | 4 * Copyright IBM, Corp. 2012-2013 10 * See the COPYING file in the top-level directory. 19 #include "qemu/host-utils.h" 23 void (*func)(QPCIDevice *dev, int devfn, void *data), in qpci_device_foreach() argument 28 for (slot = 0; slot < 32; slot++) { in qpci_device_foreach() 31 for (fn = 0; fn < 8; fn++) { in qpci_device_foreach() 32 QPCIDevice *dev; in qpci_device_foreach() local 34 dev = qpci_device_find(bus, QPCI_DEVFN(slot, fn)); in qpci_device_foreach() 35 if (!dev) { in qpci_device_foreach() 39 if (vendor_id != -1 && in qpci_device_foreach() [all …]
|
| /openbmc/qemu/hw/ppc/ |
| H A D | spapr_vio.c | 23 #include "qemu/error-report.h" 42 #define SPAPR_VIO_REG_BASE 0x71000000 46 SpaprVioDevice *dev = VIO_SPAPR_DEVICE(qdev); in spapr_vio_get_dev_name() local 47 SpaprVioDeviceClass *pc = VIO_SPAPR_DEVICE_GET_CLASS(dev); in spapr_vio_get_dev_name() 50 return g_strdup_printf("%s@%x", pc->dt_name, dev->reg); in spapr_vio_get_dev_name() 57 k->get_dev_path = spapr_vio_get_dev_name; in spapr_vio_bus_class_init() 58 k->get_fw_dev_path = spapr_vio_get_dev_name; in spapr_vio_bus_class_init() 71 SpaprVioDevice *dev = NULL; in spapr_vio_find_by_reg() local 73 QTAILQ_FOREACH(kid, &bus->bus.children, sibling) { in spapr_vio_find_by_reg() 74 dev = (SpaprVioDevice *)kid->child; in spapr_vio_find_by_reg() [all …]
|
| /openbmc/u-boot/drivers/video/bridge/ |
| H A D | anx6345.c | 1 // SPDX-License-Identifier: GPL-2.0+ 12 #include "../anx98xx-edp.h" 14 #define DP_MAX_LINK_RATE 0x001 15 #define DP_MAX_LANE_COUNT 0x002 16 #define DP_MAX_LANE_COUNT_MASK 0x1f 22 static int anx6345_write(struct udevice *dev, unsigned int addr_off, in anx6345_write() argument 30 msg.flags = 0; in anx6345_write() 31 buf[0] = reg_addr; in anx6345_write() 35 ret = dm_i2c_xfer(dev, &msg, 1); in anx6345_write() 42 return 0; in anx6345_write() [all …]
|
| /openbmc/qemu/tests/qtest/ |
| H A D | pnv-host-i2c-test.c | 7 * later. See the COPYING file in the top-level directory. 13 #include "pnv-xscom.h" 15 #define PPC_BIT(bit) (0x8000000000000000ULL >> (bit)) 16 #define PPC_BIT32(bit) (0x80000000 >> (bit)) 17 #define PPC_BIT8(bit) (0x80 >> (bit)) 18 #define PPC_BITMASK(bs, be) ((PPC_BIT(bs) - PPC_BIT(be)) | PPC_BIT(bs)) 19 #define PPC_BITMASK32(bs, be) ((PPC_BIT32(bs) - PPC_BIT32(be)) | \ 22 #define MASK_TO_LSH(m) (__builtin_ffsll(m) - 1) 27 #define PNV10_XSCOM_I2CM_BASE 0xa0000 28 #define PNV10_XSCOM_I2CM_SIZE 0x1000 [all …]
|
| /openbmc/qemu/hw/usb/ |
| H A D | redirect.c | 2 * USB redirector usb-guest 4 * Copyright (c) 2011-2012 Red Hat, Inc. 36 #include "qemu/error-report.h" 39 #include "chardev/char-fe.h" 44 #include "hw/qdev-properties.h" 45 #include "hw/qdev-properties-system.h" 47 #include "migration/qemu-file-types.h" 56 #define EP2I(ep_address) (((ep_address & 0x80) >> 3) | (ep_address & 0x0f)) 57 #define I2EP(i) (((i & 0x10) << 3) | (i & 0x0f)) 58 #define USBEP2I(usb_ep) (((usb_ep)->pid == USB_TOKEN_IN) ? \ [all …]
|
| H A D | desc.c | 7 /* ------------------------------------------------------------------ */ 9 int usb_desc_device(const USBDescID *id, const USBDescDevice *dev, in usb_desc_device() argument 12 uint8_t bLength = 0x12; in usb_desc_device() 16 return -1; in usb_desc_device() 19 d->bLength = bLength; in usb_desc_device() 20 d->bDescriptorType = USB_DT_DEVICE; in usb_desc_device() 22 if (msos && dev->bcdUSB < 0x0200) { in usb_desc_device() 25 * Done this way so msos-desc compat property will handle both in usb_desc_device() 28 d->u.device.bcdUSB_lo = usb_lo(0x0200); in usb_desc_device() 29 d->u.device.bcdUSB_hi = usb_hi(0x0200); in usb_desc_device() [all …]
|
| /openbmc/u-boot/drivers/i2c/ |
| H A D | kona_i2c.c | 1 // SPDX-License-Identifier: GPL-2.0+ 6 * Please see doc/driver-model/i2c-howto.txt for instructions. 13 #include <asm/kona-common/clk.h> 17 #define CS_OFFSET 0x00000020 19 #define CS_ACK_MASK 0x00000008 20 #define CS_ACK_CMD_GEN_START 0x00000000 21 #define CS_ACK_CMD_GEN_RESTART 0x00000001 23 #define CS_CMD_CMD_NO_ACTION 0x00000000 24 #define CS_CMD_CMD_START_RESTART 0x00000001 25 #define CS_CMD_CMD_STOP 0x00000002 [all …]
|
| /openbmc/qemu/hw/net/ |
| H A D | spapr_llan.c | 4 * PAPR Inter-VM Logical Lan, aka ibmveth 35 #include "hw/qdev-properties.h" 46 #define SPAPRVLAN_FLAG_RX_BUF_POOLS_BIT 0 55 #define VLAN_BD_VALID 0x8000000000000000ULL 56 #define VLAN_BD_TOGGLE 0x4000000000000000ULL 57 #define VLAN_BD_NO_CSUM 0x0200000000000000ULL 58 #define VLAN_BD_CSUM_GOOD 0x0100000000000000ULL 59 #define VLAN_BD_LEN_MASK 0x00ffffff00000000ULL 61 #define VLAN_BD_ADDR_MASK 0x00000000ffffffffULL 68 #define VLAN_RXQC_TOGGLE 0x80 [all …]
|
| /openbmc/u-boot/cmd/ |
| H A D | tpm_test.c | 1 // SPDX-License-Identifier: GPL-2.0+ 9 #include <tpm-v1.h> 10 #include "tpm-user-utils.h" 18 printf("TEST FAILED: line %d: " #tpm_command ": 0x%x\n", \ 22 } while (0) 24 #define INDEX0 0xda70 25 #define INDEX1 0xda71 26 #define INDEX2 0xda72 27 #define INDEX3 0xda73 28 #define INDEX_INITIALISED 0xda80 [all …]
|
| /openbmc/u-boot/drivers/tpm/ |
| H A D | tpm2_tis_core.c | 1 // SPDX-License-Identifier: GPL-2.0 5 * Based on the Linux TIS core interface and U-Boot original SPI TPM driver 10 #include <tpm-v2.h> 15 int tpm_tis_get_desc(struct udevice *dev, char *buf, int size) in tpm_tis_get_desc() argument 17 struct tpm_chip *chip = dev_get_priv(dev); in tpm_tis_get_desc() 20 return -ENOSPC; in tpm_tis_get_desc() 23 "%s v2.0: VendorID 0x%04x, DeviceID 0x%04x, RevisionID 0x%02x [%s]", in tpm_tis_get_desc() 24 dev->name, chip->vend_dev & 0xFFFF, in tpm_tis_get_desc() 25 chip->vend_dev >> 16, chip->rid, in tpm_tis_get_desc() 26 (chip->is_open ? "open" : "closed")); in tpm_tis_get_desc() [all …]
|