Home
last modified time | relevance | path

Searched +full:slave +full:- +full:mode (Results 1 – 25 of 1021) sorted by relevance

12345678910>>...41

/openbmc/u-boot/include/
H A Dspi.h1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Common SPI Interface: Controller-specific definitions
14 /* SPI mode flags */
22 #define SPI_LSB_FIRST BIT(3) /* per-word bits-on-wire */
24 #define SPI_LOOP BIT(5) /* loopback mode */
25 #define SPI_SLAVE BIT(6) /* slave mode */
46 * struct dm_spi_platdata - platform data for all SPI slaves
48 * This describes a SPI slave, a child device of the SPI bus. To obtain this
50 * dev_get_parent_platdata(slave->dev).
52 * This data is immuatable. Each time the device is probed, @max_hz and @mode
[all …]
/openbmc/u-boot/drivers/spi/
H A Dspi-uclass.c1 // SPDX-License-Identifier: GPL-2.0+
11 #include <dm/device-internal.h>
12 #include <dm/uclass-internal.h>
20 static int spi_set_speed_mode(struct udevice *bus, int speed, int mode) in spi_set_speed_mode() argument
26 if (ops->set_speed) in spi_set_speed_mode()
27 ret = ops->set_speed(bus, speed); in spi_set_speed_mode()
29 ret = -EINVAL; in spi_set_speed_mode()
35 if (ops->set_mode) in spi_set_speed_mode()
36 ret = ops->set_mode(bus, mode); in spi_set_speed_mode()
38 ret = -EINVAL; in spi_set_speed_mode()
[all …]
H A Dmpc8xxx_spi.c1 // SPDX-License-Identifier: GPL-2.0+
16 #define SPI_MODE_LOOP (0x80000000 >> 1) /* Loopback mode */
17 #define SPI_MODE_REV (0x80000000 >> 5) /* Reverse mode - MSB first */
24 unsigned int max_hz, unsigned int mode) in spi_setup_slave() argument
26 struct spi_slave *slave; in spi_setup_slave() local
31 slave = spi_alloc_slave_base(bus, cs); in spi_setup_slave()
32 if (!slave) in spi_setup_slave()
40 return slave; in spi_setup_slave()
43 void spi_free_slave(struct spi_slave *slave) in spi_free_slave() argument
45 free(slave); in spi_free_slave()
[all …]
H A Dcf_spi.c1 // SPDX-License-Identifier: GPL-2.0+
4 * (C) Copyright 2000-2003
7 * Copyright (C) 2004-2009 Freescale Semiconductor, Inc.
8 * TsiChung Liew (Tsi-Chung.Liew@freescale.com)
17 struct spi_slave slave; member
37 /* DSPI specific mode */
41 static inline struct cf_spi_slave *to_cf_spi_slave(struct spi_slave *slave) in to_cf_spi_slave() argument
43 return container_of(slave, struct cf_spi_slave, slave); in to_cf_spi_slave()
52 dspi->mcr = DSPI_MCR_MSTR | DSPI_MCR_CSIS7 | DSPI_MCR_CSIS6 | in cfspi_init()
59 dspi->ctar[0] = CONFIG_SYS_DSPI_CTAR0; in cfspi_init()
[all …]
H A Dlpc32xx_ssp.c1 // SPDX-License-Identifier: GPL-2.0+
3 * LPC32xx SSP interface (SPI mode)
6 * Written-by: Albert ARIBAUD <albert.aribaud@3adev.fr>
38 /* lpc32xx spi slave */
40 struct spi_slave slave; member
45 struct spi_slave *slave) in to_lpc32xx_spi_slave() argument
47 return container_of(slave, struct lpc32xx_spi_slave, slave); in to_lpc32xx_spi_slave()
52 struct spi_slave *spi_setup_slave(uint bus, uint cs, uint max_hz, uint mode) in spi_setup_slave() argument
58 if (mode & SPI_3WIRE) { in spi_setup_slave()
59 pr_err("3-wire mode not supported"); in spi_setup_slave()
[all …]
H A Dsoft_spi_legacy.c1 // SPDX-License-Identifier: GPL-2.0+
15 /*-----------------------------------------------------------------------
26 struct spi_slave slave; member
27 unsigned int mode; member
30 static inline struct soft_spi_slave *to_soft_spi(struct spi_slave *slave) in to_soft_spi() argument
32 return container_of(slave, struct soft_spi_slave, slave); in to_soft_spi()
40 unsigned int max_hz, unsigned int mode) in spi_setup_slave() argument
51 ss->mode = mode; in spi_setup_slave()
55 return &ss->slave; in spi_setup_slave()
58 void spi_free_slave(struct spi_slave *slave) in spi_free_slave() argument
[all …]
H A Dti_qspi.c1 // SPDX-License-Identifier: GPL-2.0+
17 #include <asm/ti-common/ti-edma3.h>
36 #define QSPI_WLEN(n) ((n-1) << 19)
102 struct spi_slave slave; member
111 unsigned int mode; member
123 clk_div = DIV_ROUND_UP(priv->fclk, hz) - 1; in ti_spi_set_speed()
132 writel(readl(&priv->base->clk_ctrl) & ~QSPI_CLK_EN, in ti_spi_set_speed()
133 &priv->base->clk_ctrl); in ti_spi_set_speed()
135 writel(QSPI_CLK_EN | clk_div, &priv->base->clk_ctrl); in ti_spi_set_speed()
140 writel(priv->cmd | QSPI_INVAL, &priv->base->cmd); in ti_qspi_cs_deactivate()
[all …]
H A Dfsl_espi.c1 // SPDX-License-Identifier: GPL-2.0+
5 * Copyright 2010-2011 Freescale Semiconductor, Inc.
16 struct spi_slave slave; member
21 unsigned int mode; member
28 #define to_fsl_spi_slave(s) container_of(s, struct fsl_spi_slave, slave)
66 unsigned int max_hz, unsigned int mode) in spi_setup_slave() argument
81 fsl->espi = (void *)(CONFIG_SYS_MPC85xx_ESPI_ADDR); in spi_setup_slave()
82 fsl->mode = mode; in spi_setup_slave()
83 fsl->max_transfer_length = ESPI_MAX_DATA_TRANSFER_LEN; in spi_setup_slave()
88 fsl->div16 = 0; in spi_setup_slave()
[all …]
H A Ddavinci_spi.c1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
70 * define CONFIG_SYS_SPI1 when platform has spi-1 device (bus #1) and
80 * define CONFIG_SYS_SPI2 when platform has spi-2 device (bus #2) and
120 /* davinci spi slave */
123 struct spi_slave slave; member
127 unsigned int mode; /* current SPI mode used */ member
129 u8 cur_cs; /* CS of current slave */
130 bool half_duplex; /* true, if master is half-duplex only */
144 writel(data, &ds->regs->dat1); in davinci_spi_xfer_data()
[all …]
H A Dkirkwood_spi.c1 // SPDX-License-Identifier: GPL-2.0+
5 * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
19 #include <asm/arch-mvebu/spi.h>
23 setbits_le32(&reg->ctrl, KWSPI_CSN_ACT); in _spi_cs_activate()
28 clrbits_le32(&reg->ctrl, KWSPI_CSN_ACT); in _spi_cs_deactivate()
43 * handle data in 8-bit chunks in _spi_xfer()
44 * TBD: 2byte xfer mode to be enabled in _spi_xfer()
46 clrsetbits_le32(&reg->cfg, KWSPI_XFERLEN_MASK, KWSPI_XFERLEN_1BYTE); in _spi_xfer()
52 /* Shift data so it's msb-justified */ in _spi_xfer()
56 clrbits_le32(&reg->irq_cause, KWSPI_SMEMRDIRQ); in _spi_xfer()
[all …]
H A Dmxs_spi.c1 // SPDX-License-Identifier: GPL-2.0+
8 * NOTE: This driver only supports the SPI-controller chipselects,
19 #include <asm/arch/imx-regs.h>
21 #include <asm/mach-imx/dma.h>
31 struct spi_slave slave; member
33 uint32_t mode; member
37 static inline struct mxs_spi_slave *to_mxs_slave(struct spi_slave *slave) in to_mxs_slave() argument
39 return container_of(slave, struct mxs_spi_slave, slave); in to_mxs_slave()
52 unsigned int max_hz, unsigned int mode) in spi_setup_slave() argument
68 mxs_slave->max_khz = max_hz / 1000; in spi_setup_slave()
[all …]
/openbmc/linux/include/net/
H A Dbonding.h1 /* SPDX-License-Identifier: GPL-1.0+ */
5 * Portions are (c) Copyright 1995 Simon "Guru Aleph-Null" Janes
43 netdev_info(bond_dev, "(slave %s): " fmt, (slave_dev)->name, ##__VA_ARGS__)
45 netdev_warn(bond_dev, "(slave %s): " fmt, (slave_dev)->name, ##__VA_ARGS__)
47 netdev_dbg(bond_dev, "(slave %s): " fmt, (slave_dev)->name, ##__VA_ARGS__)
49 netdev_err(bond_dev, "(slave %s): " fmt, (slave_dev)->name, ##__VA_ARGS__)
51 #define BOND_MODE(bond) ((bond)->params.mode)
53 /* slave list primitives */
54 #define bond_slave_list(bond) (&(bond)->dev->adj_list.lower)
61 netdev_adjacent_get_private(bond_slave_list(bond)->next) : \
[all …]
/openbmc/linux/drivers/net/ethernet/ti/
H A Dcpsw-phy-sel.c1 // SPDX-License-Identifier: GPL-2.0
35 phy_interface_t phy_mode, int slave);
40 phy_interface_t phy_mode, int slave) in cpsw_gmii_sel_am3352() argument
44 u32 mode = 0; in cpsw_gmii_sel_am3352() local
47 reg = readl(priv->gmii_sel); in cpsw_gmii_sel_am3352()
51 mode = AM33XX_GMII_SEL_MODE_RMII; in cpsw_gmii_sel_am3352()
55 mode = AM33XX_GMII_SEL_MODE_RGMII; in cpsw_gmii_sel_am3352()
61 mode = AM33XX_GMII_SEL_MODE_RGMII; in cpsw_gmii_sel_am3352()
66 dev_warn(priv->dev, in cpsw_gmii_sel_am3352()
67 "Unsupported PHY mode: \"%s\". Defaulting to MII.\n", in cpsw_gmii_sel_am3352()
[all …]
/openbmc/linux/tools/testing/selftests/drivers/net/bonding/
H A Dbond_options.sh2 # SPDX-License-Identifier: GPL-2.0
4 # Test bonding options with mode 1,5,6
20 ip -n ${s_ns} link set eth0 type bond_slave prio 10
21 [[ $? -ne 0 ]] && skip=0
24 ip -n ${s_ns} -d link show eth0 | grep -q "prio 10"
25 [[ $? -ne 0 ]] && skip=0
35 ip -n ${s_ns} link add bond1 type bond ns_ip6_target ${g_ip6}
36 [[ $? -ne 0 ]] && skip=0
39 ip -n ${s_ns} -d link show bond1 | grep -q "ns_ip6_target ${g_ip6}"
40 [[ $? -ne 0 ]] && skip=0
[all …]
/openbmc/linux/Documentation/w1/masters/
H A Domap-hdq.rst2 Kernel driver for omap HDQ/1-wire module
7 HDQ/1-wire controller on the TI OMAP 2430/3430 platforms.
15 The HDQ/1-Wire module of TI OMAP2430/3430 platforms implement the hardware
17 Semiconductor 1-Wire protocols. These protocols use a single wire for
18 communication between the master (HDQ/1-Wire controller) and the slave
19 (HDQ/1-Wire external compliant device).
21 A typical application of the HDQ/1-Wire module is the communication with battery
24 The controller supports operation in both HDQ and 1-wire mode. The essential
25 difference between the HDQ and 1-wire mode is how the slave device responds to
26 initialization pulse.In HDQ mode, the firmware does not require the host to
[all …]
/openbmc/linux/Documentation/networking/
H A Dbonding.rst1 .. SPDX-License-Identifier: GPL-2.0
11 Corrections, HA extensions: 2000/10/03-15:
13 - Willy Tarreau <willy at meta-x.org>
14 - Constantine Gavrilov <const-g at xpert.com>
15 - Chad N. Tindel <ctindel at ieee dot org>
16 - Janice Girouard <girouard at us dot ibm dot com>
17 - Jay Vosburgh <fubar at us dot ibm dot com>
22 - Mitch Williams <mitch.a.williams at intel.com>
29 The behavior of the bonded interfaces depends upon the mode; generally
35 the original tools from extreme-linux and beowulf sites will not work
[all …]
/openbmc/u-boot/test/dm/
H A Dspi.c1 // SPDX-License-Identifier: GPL-2.0+
12 #include <dm/device-internal.h>
14 #include <dm/uclass-internal.h>
18 /* Test that we can find buses and chip-selects */
22 struct spi_slave *slave; in dm_test_spi_find() local
24 const int busnum = 0, cs = 0, mode = 0, speed = 1000000, cs_b = 1; in dm_test_spi_find() local
28 ut_asserteq(-ENODEV, uclass_find_device_by_seq(UCLASS_SPI, busnum, in dm_test_spi_find()
33 * this then remove the emulation and the slave device. in dm_test_spi_find()
49 ut_asserteq(-ENODEV, spi_find_bus_and_cs(busnum, cs, &bus, &dev)); in dm_test_spi_find()
50 ut_asserteq(-ENODEV, spi_get_bus_and_cs(busnum, cs, speed, mode, in dm_test_spi_find()
[all …]
/openbmc/linux/include/linux/soundwire/
H A Dsdw.h1 /* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
2 /* Copyright(c) 2015-17 Intel Corporation. */
75 * enum sdw_slave_status - Slave status
76 * @SDW_SLAVE_UNATTACHED: Slave is not attached with the bus.
77 * @SDW_SLAVE_ATTACHED: Slave is attached with bus.
78 * @SDW_SLAVE_ALERT: Some alert condition on the Slave
93 * @SDW_CLK_PRE_DEPREPARE: pre clock stop de-prepare
94 * @SDW_CLK_POST_DEPREPARE: post clock stop de-prepare
104 * enum sdw_command_response - Command response as defined by SDW spec
132 /* block packing mode enum */
[all …]
/openbmc/u-boot/drivers/i2c/
H A DKconfig23 Enable old-style I2C functions for compatibility with existing code.
41 ---help---
43 often dealt with by using an I2C pass-through interface provided by
44 the EC. On some unfortunate models (e.g. Spring) the pass-through
71 configuration is given by the device tree. Kernel-style device tree
73 Binding info: doc/device-tree-bindings/i2c/i2c-gpio.txt
82 i2c-gpio driver unless your system can cope with this limitation.
83 Binding info: doc/device-tree-bindings/i2c/i2c-at91.txt
132 support AST2600 I2C new mode register.
141 Only single master mode is supported and only byte-by-byte
[all …]
/openbmc/u-boot/drivers/net/ti/
H A Dcpsw.c1 // SPDX-License-Identifier: GPL-2.0+
5 * Copyright (C) 2010-2018 Texas Instruments Incorporated - http://www.ti.com/
28 #define BITMASK(bits) (BIT(bits) - 1)
68 /* Descriptor mode bits */
75 * This timeout definition is a worst-case ultra defensive measure against
163 /* ALE unicast entry flags - passed into cpsw_ale_add_ucast() */
203 #define desc_write(desc, fld, val) __raw_writel((u32)(val), &(desc)->fld)
204 #define desc_read(desc, fld) __raw_readl(&(desc)->fld)
205 #define desc_read_ptr(desc, fld) ((void *)__raw_readl(&(desc)->fld))
207 #define chan_write(chan, fld, val) __raw_writel((u32)(val), (chan)->fld)
[all …]
/openbmc/u-boot/examples/standalone/
H A Datmel_df_pow2.c2 * atmel_df_pow2.c - convert Atmel Dataflashes to Power of 2 mode
6 * Licensed under the 2-clause BSD.
17 static int flash_cmd(struct spi_slave *slave, uchar cmd, uchar *buf, int len) in flash_cmd() argument
20 return spi_xfer(slave, 8 * len, buf, buf, SPI_XFER_BEGIN | SPI_XFER_END); in flash_cmd()
23 static int flash_status(struct spi_slave *slave) in flash_status() argument
26 if (flash_cmd(slave, CMD_STAT, buf, sizeof(buf))) in flash_status()
27 return -1; in flash_status()
31 static int flash_set_pow2(struct spi_slave *slave) in flash_set_pow2() argument
40 ret = flash_cmd(slave, CMD_CFG, buf, sizeof(buf)); in flash_set_pow2()
47 ret = flash_status(slave); in flash_set_pow2()
[all …]
/openbmc/linux/drivers/net/bonding/
H A Dbond_main.c1 // SPDX-License-Identifier: GPL-1.0+
21 * the first slave bonded to the channel. All slaves will then use
28 * will attach eth0 to bond0 as a slave. eth0 hw mac address will either
97 /*---------------------------- Module parameters ----------------------------*/
108 static char *mode; variable
146 module_param(mode, charp, 0);
147 MODULE_PARM_DESC(mode, "Mode of operation; 0 for balance-rr, "
148 "1 for active-backup, 2 for balance-xor, "
149 "3 for broadcast, 4 for 802.3ad, 5 for balance-tlb, "
150 "6 for balance-alb");
[all …]
/openbmc/linux/Documentation/devicetree/bindings/net/
H A Dcpsw.txt2 ------------------------------------------------------
5 - compatible : Should be one of the below:-
7 "ti,am335x-cpsw" for AM335x controllers
8 "ti,am4372-cpsw" for AM437x controllers
9 "ti,dra7-cpsw" for DRA7x controllers
10 - reg : physical base address and size of the cpsw
12 - interrupts : property with a value describing the interrupt
14 - cpdma_channels : Specifies number of channels in CPDMA
15 - ale_entries : Specifies No of entries ALE can hold
16 - bd_ram_size : Specifies internal descriptor RAM size
[all …]
/openbmc/linux/Documentation/devicetree/bindings/ata/
H A Dcortina,gemini-sata-bridge.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/ata/cortina,gemini-sata-bridge.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Linus Walleij <linus.walleij@linaro.org>
13 The Gemini SATA bridge in a SoC-internal PATA to SATA bridge that
19 const: cortina,gemini-sata-bridge
28 reset-names:
30 - const: sata0
31 - const: sata1
[all …]
/openbmc/u-boot/cmd/
H A Dspi.c1 // SPDX-License-Identifier: GPL-2.0+
17 /*-----------------------------------------------------------------------
30 static unsigned int mode; variable
37 struct spi_slave *slave; in do_spi_xfer() local
47 return -ENOMEM; in do_spi_xfer()
48 ret = spi_get_bus_and_cs(bus, cs, 1000000, mode, "spi_generic_drv", in do_spi_xfer()
49 str, &dev, &slave); in do_spi_xfer()
53 slave = spi_setup_slave(bus, cs, 1000000, mode); in do_spi_xfer()
54 if (!slave) { in do_spi_xfer()
56 return -EINVAL; in do_spi_xfer()
[all …]

12345678910>>...41