Home
last modified time | relevance | path

Searched refs:pd (Results 1 – 25 of 48) sorted by relevance

12

/optee_os/core/drivers/
H A Dpl022_spi.c144 struct pl022_data *pd = container_of(chip, struct pl022_data, chip); in pl022_txrx8() local
147 if (pd->data_size_bits != 8) { in pl022_txrx8()
149 pd->data_size_bits); in pl022_txrx8()
155 if (io_read8(pd->base + SSPSR) & SSPSR_TNF) { in pl022_txrx8()
157 io_write8(pd->base + SSPDR, wdat[i++]); in pl022_txrx8()
161 if (io_read8(pd->base + SSPSR) & SSPSR_RNE) { in pl022_txrx8()
163 rdat[j++] = io_read8(pd->base + SSPDR); in pl022_txrx8()
170 (io_read8(pd->base + SSPSR) & SSPSR_RNE)) { in pl022_txrx8()
172 rdat[j++] = io_read8(pd->base + SSPDR); in pl022_txrx8()
190 struct pl022_data *pd = container_of(chip, struct pl022_data, chip); in pl022_txrx16() local
[all …]
H A Dns16550.c50 struct ns16550_data **pd) in chip_to_base_and_data() argument
52 *pd = container_of(chip, struct ns16550_data, chip); in chip_to_base_and_data()
54 return io_pa_or_va(&(*pd)->base, NS16550_UART_REG_SIZE); in chip_to_base_and_data()
59 struct ns16550_data *pd = NULL; in ns16550_flush() local
60 vaddr_t base = chip_to_base_and_data(chip, &pd); in ns16550_flush()
62 while ((serial_in(base + (UART_LSR << pd->reg_shift), pd->io_width) & in ns16550_flush()
69 struct ns16550_data *pd = NULL; in ns16550_putc() local
70 vaddr_t base = chip_to_base_and_data(chip, &pd); in ns16550_putc()
75 serial_out(base + (UART_THR << pd->reg_shift), pd->io_width, ch); in ns16550_putc()
80 struct ns16550_data *pd = NULL; in ns16550_have_rx_data() local
[all …]
H A Dplic.c80 plic_is_pending(struct plic_data *pd, uint32_t source) in plic_is_pending() argument
82 return io_read32(PLIC_PENDING(pd->plic_base, source)) & in plic_is_pending()
86 static void plic_set_pending(struct plic_data *pd, uint32_t source) in plic_set_pending() argument
88 io_setbits32(PLIC_PENDING(pd->plic_base, source), BIT(source % 32)); in plic_set_pending()
91 static void plic_enable_interrupt(struct plic_data *pd, uint32_t source) in plic_enable_interrupt() argument
95 io_setbits32(PLIC_ENABLE(pd->plic_base, source, context), in plic_enable_interrupt()
100 plic_get_interrupt_enable(struct plic_data *pd, uint32_t source) in plic_get_interrupt_enable() argument
104 return io_read32(PLIC_ENABLE(pd->plic_base, source, context)) & in plic_get_interrupt_enable()
108 static void plic_disable_interrupt(struct plic_data *pd, uint32_t source) in plic_disable_interrupt() argument
112 io_clrbits32(PLIC_ENABLE(pd->plic_base, source, context), in plic_disable_interrupt()
[all …]
H A Dsp805_wdt.c17 struct sp805_wdt_data *pd = in chip_to_base() local
20 return io_pa_or_va(&pd->base, WDT_SIZE); in chip_to_base()
25 struct sp805_wdt_data *pd = in sp805_setload() local
35 if (MUL_OVERFLOW(timeout, pd->clk_rate, &load)) in sp805_setload()
42 pd->load_val = load; in sp805_setload()
48 struct sp805_wdt_data *pd = in sp805_config() local
53 io_write32(base + WDT_LOAD_OFFSET, pd->load_val); in sp805_config()
91 struct sp805_wdt_data *pd = in wdt_itr_cb() local
94 if (pd->itr_handler) in wdt_itr_cb()
95 pd->itr_handler(chip); in wdt_itr_cb()
[all …]
H A Dstm32_uart.c51 struct stm32_uart_pdata *pd = NULL; in loc_chip_to_base() local
53 pd = container_of(chip, struct stm32_uart_pdata, chip); in loc_chip_to_base()
55 return io_pa_or_va(&pd->base, 1); in loc_chip_to_base()
106 void stm32_uart_init(struct stm32_uart_pdata *pd, vaddr_t base) in stm32_uart_init() argument
108 pd->base.pa = base; in stm32_uart_init()
109 pd->chip.ops = &stm32_uart_serial_ops; in stm32_uart_init()
115 struct stm32_uart_pdata *pd = NULL; in stm32_uart_init_from_dt_node() local
126 pd = calloc(1, sizeof(*pd)); in stm32_uart_init_from_dt_node()
127 if (!pd) in stm32_uart_init_from_dt_node()
130 pd->chip.ops = &stm32_uart_serial_ops; in stm32_uart_init_from_dt_node()
[all …]
H A Dffa_console.c38 struct ffa_console_data *pd = in ffa_console_32_flush() local
44 copy_buf_to_args(&args, pd->buf, pd->pos, sizeof(uint32_t)); in ffa_console_32_flush()
46 pd->pos = 0; in ffa_console_32_flush()
51 struct ffa_console_data *pd = in ffa_console_32_putc() local
54 pd->buf[pd->pos++] = ch; in ffa_console_32_putc()
56 if (pd->pos == FFA_CONSOLE_LOG_32_MAX_MSG_LEN) in ffa_console_32_putc()
67 struct ffa_console_data *pd = in ffa_console_64_flush() local
73 copy_buf_to_args(&args, pd->buf, pd->pos, sizeof(uint64_t)); in ffa_console_64_flush()
75 pd->pos = 0; in ffa_console_64_flush()
80 struct ffa_console_data *pd = in ffa_console_64_putc() local
[all …]
H A Dimx_lpuart.c23 struct imx_uart_data *pd = in chip_to_base() local
26 return io_pa_or_va(&pd->base, UART_SIZE); in chip_to_base()
61 void imx_uart_init(struct imx_uart_data *pd, paddr_t base) in imx_uart_init() argument
63 pd->base.pa = base; in imx_uart_init()
64 pd->chip.ops = &imx_lpuart_ops; in imx_uart_init()
75 struct imx_uart_data *pd = calloc(1, sizeof(*pd)); in imx_lpuart_dev_alloc() local
77 if (!pd) in imx_lpuart_dev_alloc()
80 return &pd->chip; in imx_lpuart_dev_alloc()
86 struct imx_uart_data *pd = in imx_lpuart_dev_init() local
99 imx_uart_init(pd, pbase); in imx_lpuart_dev_init()
[all …]
H A Dserial8250_uart.c35 struct serial8250_uart_data *pd = in chip_to_base() local
38 return io_pa_or_va(&pd->base, SERIAL8250_UART_REG_SIZE); in chip_to_base()
90 void serial8250_uart_init(struct serial8250_uart_data *pd, paddr_t base, in serial8250_uart_init() argument
95 pd->base.pa = base; in serial8250_uart_init()
96 pd->chip.ops = &serial8250_uart_ops; in serial8250_uart_init()
108 struct serial8250_uart_data *pd = calloc(1, sizeof(*pd)); in serial8250_uart_dev_alloc() local
110 if (!pd) in serial8250_uart_dev_alloc()
112 return &pd->chip; in serial8250_uart_dev_alloc()
120 struct serial8250_uart_data *pd = in serial8250_uart_dev_init() local
138 serial8250_uart_init(pd, pbase, 0, 0); in serial8250_uart_dev_init()
[all …]
H A Dimx_uart.c89 struct imx_uart_data *pd = in chip_to_base() local
92 return io_pa_or_va(&pd->base, USIZE); in chip_to_base()
134 void imx_uart_init(struct imx_uart_data *pd, paddr_t base) in imx_uart_init() argument
136 pd->base.pa = base; in imx_uart_init()
137 pd->chip.ops = &imx_uart_ops; in imx_uart_init()
148 struct imx_uart_data *pd = calloc(1, sizeof(*pd)); in imx_uart_dev_alloc() local
150 if (!pd) in imx_uart_dev_alloc()
153 return &pd->chip; in imx_uart_dev_alloc()
159 struct imx_uart_data *pd = in imx_uart_dev_init() local
172 imx_uart_init(pd, pbase); in imx_uart_dev_init()
[all …]
H A Dpl011.c82 struct pl011_data *pd = in chip_to_base() local
85 return io_pa_or_va(&pd->base, PL011_REG_SIZE); in chip_to_base()
156 void pl011_init(struct pl011_data *pd, paddr_t pbase, uint32_t uart_clk, in pl011_init() argument
161 pd->base.pa = pbase; in pl011_init()
162 pd->chip.ops = &pl011_ops; in pl011_init()
164 base = io_pa_or_va(&pd->base, PL011_REG_SIZE); in pl011_init()
187 pl011_flush(&pd->chip); in pl011_init()
194 struct pl011_data *pd = nex_calloc(1, sizeof(*pd)); in pl011_dev_alloc() local
196 if (!pd) in pl011_dev_alloc()
198 return &pd->chip; in pl011_dev_alloc()
[all …]
H A Dscif.c50 struct scif_uart_data *pd = in chip_to_base() local
53 return io_pa_or_va(&pd->base, SCIF_REG_SIZE); in chip_to_base()
82 void scif_uart_init(struct scif_uart_data *pd, paddr_t pbase) in scif_uart_init() argument
86 pd->base.pa = pbase; in scif_uart_init()
87 pd->chip.ops = &scif_uart_ops; in scif_uart_init()
89 base = io_pa_or_va(&pd->base, SCIF_REG_SIZE); in scif_uart_init()
94 scif_uart_flush(&pd->chip); in scif_uart_init()
H A Dmvebu_uart.c59 struct mvebu_uart_data *pd = in chip_to_base() local
62 return io_pa_or_va(&pd->base, UART_SIZE); in chip_to_base()
118 void mvebu_uart_init(struct mvebu_uart_data *pd, paddr_t pbase, in mvebu_uart_init() argument
124 pd->base.pa = pbase; in mvebu_uart_init()
125 pd->chip.ops = &mvebu_uart_ops; in mvebu_uart_init()
127 base = io_pa_or_va(&pd->base, UART_SIZE); in mvebu_uart_init()
144 mvebu_uart_flush(&pd->chip); in mvebu_uart_init()
H A Dqcom_geni_uart.c23 struct qcom_geni_uart_data *pd = in qcom_geni_uart_putc() local
25 vaddr_t base = io_pa_or_va(&pd->base, GENI_UART_REG_SIZE); in qcom_geni_uart_putc()
42 void qcom_geni_uart_init(struct qcom_geni_uart_data *pd, paddr_t base) in qcom_geni_uart_init() argument
44 pd->base.pa = base; in qcom_geni_uart_init()
45 pd->chip.ops = &qcom_geni_uart_ops; in qcom_geni_uart_init()
H A Dstih_asc.c19 struct stih_asc_pd *pd = in chip_to_base() local
22 return io_pa_or_va(&pd->base, STIH_ASC_REG_SIZE); in chip_to_base()
49 void stih_asc_init(struct stih_asc_pd *pd, vaddr_t base) in stih_asc_init() argument
51 pd->base.pa = base; in stih_asc_init()
52 pd->chip.ops = &stih_asc_ops; in stih_asc_init()
H A Dcdns_uart.c61 struct cdns_uart_data *pd = in chip_to_base() local
64 return io_pa_or_va(&pd->base, CDNS_UART_SIZE); in chip_to_base()
119 void cdns_uart_init(struct cdns_uart_data *pd, paddr_t base, uint32_t uart_clk, in cdns_uart_init() argument
122 pd->base.pa = base; in cdns_uart_init()
123 pd->chip.ops = &cdns_uart_ops; in cdns_uart_init()
132 cdns_uart_flush(&pd->chip); in cdns_uart_init()
H A Datmel_uart.c55 struct atmel_uart_data *pd = in chip_to_base() local
58 return io_pa_or_va(&pd->base, ATMEL_UART_SIZE); in chip_to_base()
95 void atmel_uart_init(struct atmel_uart_data *pd, paddr_t base) in atmel_uart_init() argument
97 pd->base.pa = base; in atmel_uart_init()
98 pd->chip.ops = &atmel_uart_ops; in atmel_uart_init()
H A Damlogic_uart.c27 struct amlogic_uart_data *pd = in chip_to_base() local
30 return io_pa_or_va(&pd->base, AML_UART_SIZE); in chip_to_base()
67 void amlogic_uart_init(struct amlogic_uart_data *pd, paddr_t base) in amlogic_uart_init() argument
69 pd->base.pa = base; in amlogic_uart_init()
70 pd->chip.ops = &amlogic_uart_ops; in amlogic_uart_init()
H A Dsprd_uart.c46 struct sprd_uart_data *pd = in chip_to_base() local
49 return io_pa_or_va(&pd->base, UART_SIZE); in chip_to_base()
93 void sprd_uart_init(struct sprd_uart_data *pd, paddr_t base) in sprd_uart_init() argument
95 pd->base.pa = base; in sprd_uart_init()
96 pd->chip.ops = &sprd_uart_ops; in sprd_uart_init()
H A Dhi16xx_uart.c63 struct hi16xx_uart_data *pd = in chip_to_base() local
66 return io_pa_or_va(&pd->base, HI16XX_UART_REG_SIZE); in chip_to_base()
113 void hi16xx_uart_init(struct hi16xx_uart_data *pd, paddr_t base, in hi16xx_uart_init() argument
118 pd->base.pa = base; in hi16xx_uart_init()
119 pd->chip.ops = &hi16xx_uart_ops; in hi16xx_uart_init()
139 hi16xx_uart_flush(&pd->chip); in hi16xx_uart_init()
H A Dsifive_uart.c27 struct sifive_uart_data *pd = in chip_to_base() local
30 return io_pa_or_va(&pd->base, SIFIVE_UART_REG_SIZE); in chip_to_base()
78 void sifive_uart_init(struct sifive_uart_data *pd, paddr_t base, in sifive_uart_init() argument
83 pd->base.pa = base; in sifive_uart_init()
84 pd->chip.ops = &sifive_uart_ops; in sifive_uart_init()
H A Dlpc_uart.c15 struct lpc_uart_data *pd = in chip_to_base() local
18 return io_pa_or_va(&pd->base, LPC_SIZE); in chip_to_base()
102 void lpc_uart_init(struct lpc_uart_data *pd, paddr_t base, in lpc_uart_init() argument
105 pd->base.pa = base; in lpc_uart_init()
106 pd->chip.ops = &lpc_uart_ops; in lpc_uart_init()
/optee_os/core/arch/arm/plat-hikey/
H A Dspi_test.c22 static struct pl061_data pd; in spi_cs_callback() local
29 pl061_init(&pd); in spi_cs_callback()
32 pd.chip.ops->set_interrupt(NULL, GPIO6_2, in spi_cs_callback()
34 pd.chip.ops->set_direction(NULL, GPIO6_2, GPIO_DIR_OUT); in spi_cs_callback()
44 pd.chip.ops->set_value(NULL, GPIO6_2, value); in spi_cs_callback()
70 struct pl022_data pd; in spi_test_with_manual_cs_control() local
81 pd.cs_control = PL022_CS_CTRL_MANUAL; in spi_test_with_manual_cs_control()
85 pd.base = spi_base; in spi_test_with_manual_cs_control()
86 pd.clk_hz = SPI_CLK_HZ; in spi_test_with_manual_cs_control()
87 pd.speed_hz = SPI_10_KHZ; in spi_test_with_manual_cs_control()
[all …]
/optee_os/core/arch/riscv/plat-spike/drivers/
H A Dhtif.c33 struct htif_console_data *pd = in chip_to_base() local
36 return io_pa_or_va(&pd->base, HTIF_REG_SIZE); in chip_to_base()
73 void htif_console_init(struct htif_console_data *pd, paddr_t pbase) in htif_console_init() argument
75 pd->base.pa = pbase; in htif_console_init()
76 pd->chip.ops = &htif_console_ops; in htif_console_init()
/optee_os/lib/libutils/isoc/
H A Dqsort.c78 char *pa, *pb, *pc, *pd, *pl, *pm, *pn; in qsort() local
105 pc = pd = (char *)a + (n - 1) * es; in qsort()
118 swap(pc, pd); in qsort()
119 pd -= es; in qsort()
140 r = min(pd - pc, pn - pd - (int)es); in qsort()
144 if ((r = pd - pc) > (int)es) { in qsort()
/optee_os/core/arch/arm/plat-stm32mp2/
H A Dmain.c102 struct stm32_uart_pdata *pd = NULL; in init_console_from_dt() local
118 pd = stm32_uart_init_from_dt_node(fdt, node); in init_console_from_dt()
119 if (!pd) { in init_console_from_dt()
127 console_data = *pd; in init_console_from_dt()
130 free(pd); in init_console_from_dt()

12