Home
last modified time | relevance | path

Searched refs:baudrate (Results 1 – 25 of 94) sorted by relevance

1234

/u-boot/drivers/serial/
A Dserial_mcf.c31 static int mcf_serial_init_common(uart_t *uart, int port_idx, int baudrate) in mcf_serial_init_common() argument
53 counter = (u32) ((gd->bus_clk / 32) + (baudrate / 2)); in mcf_serial_init_common()
54 counter = counter / baudrate; in mcf_serial_init_common()
66 static void mcf_serial_setbrg_common(uart_t *uart, int baudrate) in mcf_serial_setbrg_common() argument
71 counter = (u32) ((gd->bus_clk / 32) + (baudrate / 2)); in mcf_serial_setbrg_common()
72 counter = counter / baudrate; in mcf_serial_setbrg_common()
92 plat->port, plat->baudrate); in coldfire_serial_probe()
121 int coldfire_serial_setbrg(struct udevice *dev, int baudrate) in coldfire_serial_setbrg() argument
126 mcf_serial_setbrg_common(uart, baudrate); in coldfire_serial_setbrg()
154 plat->baudrate = gd->baudrate; in coldfire_of_to_plat()
A Dserial.c56 int baudrate; in on_baudrate() local
64 baudrate = simple_strtoul(value, NULL, 10); in on_baudrate()
67 if (gd->baudrate == baudrate) in on_baudrate()
71 if (baudrate == baudrate_table[i]) in on_baudrate()
77 baudrate); in on_baudrate()
82 " bps and press ENTER ...\n", baudrate); in on_baudrate()
86 gd->baudrate = baudrate; in on_baudrate()
106 U_BOOT_ENV_CALLBACK(baudrate, on_baudrate);
484 saved_baud = gd->baudrate; in uart_post_test()
507 gd->baudrate = bauds[b]; in uart_post_test()
[all …]
A Dserial_sti_asc.c31 u32 baudrate; member
83 static int _sti_asc_serial_setbrg(struct sti_asc_uart *uart, int baudrate) in _sti_asc_serial_setbrg() argument
88 switch (baudrate) { in _sti_asc_serial_setbrg()
104 baudrate); in _sti_asc_serial_setbrg()
115 writel(t, &uart->baudrate); in _sti_asc_serial_setbrg()
131 static int sti_asc_serial_setbrg(struct udevice *dev, int baudrate) in sti_asc_serial_setbrg() argument
136 return _sti_asc_serial_setbrg(uart, baudrate); in sti_asc_serial_setbrg()
180 sti_asc_serial_setbrg(dev, gd->baudrate); in sti_asc_serial_probe()
A Datmel_usart.c33 int baudrate) in atmel_serial_setbrg_internal() argument
44 divisor = (usart_hz / 16 + baudrate / 2) / baudrate; in atmel_serial_setbrg_internal()
76 CONFIG_USART_ID, gd->baudrate); in atmel_serial_setbrg()
150 ulong usart_clk_rate, int baudrate) in _atmel_serial_set_brg() argument
154 divisor = (usart_clk_rate / 16 + baudrate / 2) / baudrate; in _atmel_serial_set_brg()
159 ulong usart_clk_rate, int baudrate) in _atmel_serial_init() argument
169 _atmel_serial_set_brg(usart, usart_clk_rate, baudrate); in _atmel_serial_init()
175 int atmel_serial_setbrg(struct udevice *dev, int baudrate) in atmel_serial_setbrg() argument
179 _atmel_serial_set_brg(priv->usart, priv->usart_clk_rate, baudrate); in atmel_serial_setbrg()
284 _atmel_serial_init(priv->usart, priv->usart_clk_rate, gd->baudrate); in atmel_serial_probe()
A Dserial-uclass.c309 ops->setbrg(gd->cur_serial_dev, gd->baudrate); in serial_setbrg()
341 info->baudrate = gd->baudrate; in serial_getinfo()
388 int baudrate; in on_baudrate() local
396 baudrate = simple_strtoul(value, NULL, 10); in on_baudrate()
399 if (gd->baudrate == baudrate) in on_baudrate()
403 if (baudrate == baudrate_table[i]) in on_baudrate()
409 baudrate); in on_baudrate()
414 baudrate); in on_baudrate()
418 gd->baudrate = baudrate; in on_baudrate()
438 U_BOOT_ENV_CALLBACK(baudrate, on_baudrate);
[all …]
A Dserial_linflexuart.c38 static void _linflex_serial_setbrg(struct linflex_fsl *base, int baudrate) in _linflex_serial_setbrg() argument
43 if (!baudrate) in _linflex_serial_setbrg()
44 baudrate = CONFIG_BAUDRATE; in _linflex_serial_setbrg()
46 ibr = (u32) (clk / (16 * gd->baudrate)); in _linflex_serial_setbrg()
47 fbr = (u32) (clk % (16 * gd->baudrate)) * 16; in _linflex_serial_setbrg()
128 int linflex_serial_setbrg(struct udevice *dev, int baudrate) in linflex_serial_setbrg() argument
132 _linflex_serial_setbrg(priv->lfuart, baudrate); in linflex_serial_setbrg()
A Dserial_lpuart.c148 int baudrate) in _lpuart_serial_setbrg() argument
164 sbr = (u16)(clk / (16 * baudrate)); in _lpuart_serial_setbrg()
229 _lpuart_serial_setbrg(dev, gd->baudrate); in _lpuart_serial_init()
237 int baudrate) in _lpuart32_serial_setbrg_7ulp() argument
253 baud_diff = baudrate; in _lpuart32_serial_setbrg_7ulp()
258 tmp_sbr = (clk / (baudrate * tmp_osr)); in _lpuart32_serial_setbrg_7ulp()
265 tmp_diff = tmp_diff - baudrate; in _lpuart32_serial_setbrg_7ulp()
306 int baudrate) in _lpuart32_serial_setbrg() argument
322 sbr = (clk / (16 * baudrate)); in _lpuart32_serial_setbrg()
439 _lpuart32_serial_setbrg(dev, baudrate); in lpuart_serial_setbrg()
[all …]
A Dserial_pxa.c36 static uint32_t pxa_uart_get_baud_divider(int baudrate) in pxa_uart_get_baud_divider() argument
38 return 921600 / baudrate; in pxa_uart_get_baud_divider()
61 void pxa_setbrg_common(struct pxa_uart_regs *uart_regs, int port, int baudrate) in pxa_setbrg_common() argument
63 uint32_t divider = pxa_uart_get_baud_divider(baudrate); in pxa_setbrg_common()
106 pxa_setbrg_common(uart_regs, uart_index, gd->baudrate); in pxa_setbrg_dev()
275 plat->baudrate); in pxa_serial_probe()
305 int pxa_serial_setbrg(struct udevice *dev, int baudrate) in pxa_serial_setbrg() argument
311 pxa_setbrg_common(uart_regs, port, baudrate); in pxa_serial_setbrg()
A Dserial_pl01x.c109 int clock, int baudrate) in pl01x_generic_setbrg() argument
118 switch (baudrate) { in pl01x_generic_setbrg()
166 temp = 16 * baudrate; in pl01x_generic_setbrg()
169 temp = (8 * remainder) / baudrate; in pl01x_generic_setbrg()
190 static void pl01x_serial_init_baud(int baudrate) in pl01x_serial_init_baud() argument
203 pl01x_generic_setbrg(base_regs, pl01x_type, clock, baudrate); in pl01x_serial_init_baud()
255 pl01x_serial_init_baud(gd->baudrate); in pl01x_serial_setbrg()
283 int pl01x_serial_setbrg(struct udevice *dev, int baudrate) in pl01x_serial_setbrg() argument
290 baudrate); in pl01x_serial_setbrg()
A Dlpc32xx_hsuart.c19 static int lpc32xx_serial_setbrg(struct udevice *dev, int baudrate) in lpc32xx_serial_setbrg() argument
26 div = (get_serial_clock() / 14 + baudrate / 2) / baudrate - 1; in lpc32xx_serial_setbrg()
A Dserial_mpc8xx.c40 static void serial_setdivisor(cpm8xx_t __iomem *cp, int baudrate) in serial_setdivisor() argument
42 int divisor = (gd->cpu_clk + 8 * baudrate) / 16 / baudrate; in serial_setdivisor()
63 static int serial_mpc8xx_setbrg(struct udevice *dev, int baudrate) in serial_mpc8xx_setbrg() argument
76 serial_setdivisor(cp, baudrate); in serial_mpc8xx_setbrg()
146 serial_mpc8xx_setbrg(dev, gd->baudrate); in serial_mpc8xx_probe()
A Dserial_mxc.c163 unsigned long baudrate, bool use_dte) in _mxc_serial_setbrg() argument
175 writel(clk / (2 * baudrate), &base->bmr); in _mxc_serial_setbrg()
194 if (!gd->baudrate) in mxc_serial_setbrg()
195 gd->baudrate = CONFIG_BAUDRATE; in mxc_serial_setbrg()
197 _mxc_serial_setbrg(mxc_base, clk, gd->baudrate, false); in mxc_serial_setbrg()
266 int mxc_serial_setbrg(struct udevice *dev, int baudrate) in mxc_serial_setbrg() argument
271 _mxc_serial_setbrg(plat->reg, clk, baudrate, plat->use_dte); in mxc_serial_setbrg()
A Dserial_ar933x.c62 u32 tscale, baudrate; in ar933x_serial_get_scale_step() local
80 baudrate = ar933x_serial_get_baud(clk, tscale, tstep); in ar933x_serial_get_scale_step()
81 diff = abs(baudrate - baud); in ar933x_serial_get_scale_step()
90 static int ar933x_serial_setbrg(struct udevice *dev, int baudrate) in ar933x_serial_setbrg() argument
96 ar933x_serial_get_scale_step(val, baudrate, &scale, &step); in ar933x_serial_setbrg()
A Dserial_pic32.c51 static int pic32_serial_init(void __iomem *base, ulong clk, u32 baudrate) in pic32_serial_init() argument
53 u32 div = DIV_ROUND_CLOSEST(clk, baudrate * 16); in pic32_serial_init()
104 static int pic32_uart_setbrg(struct udevice *dev, int baudrate) in pic32_uart_setbrg() argument
108 return pic32_serial_init(priv->base, priv->uartclk, baudrate); in pic32_uart_setbrg()
A Dserial_bcm283x_pl011.c63 static int bcm283x_pl011_serial_setbrg(struct udevice *dev, int baudrate) in bcm283x_pl011_serial_setbrg() argument
67 r = pl01x_serial_setbrg(dev, baudrate); in bcm283x_pl011_serial_setbrg()
A Dserial_s5p.c75 int baudrate) in s5p_serial_baud() argument
79 val = uclk / baudrate; in s5p_serial_baud()
90 int s5p_serial_setbrg(struct udevice *dev, int baudrate) in s5p_serial_setbrg() argument
108 s5p_serial_baud(uart, uclk, baudrate); in s5p_serial_setbrg()
A Dserial_sh.c63 sh_serial_setbrg_generic(struct uart_port *port, int clk, int baudrate) in sh_serial_setbrg_generic() argument
66 unsigned short dl = DL_VALUE(baudrate, clk); in sh_serial_setbrg_generic()
71 sci_out(port, SCBRR, SCBRR_VALUE(baudrate, clk)); in sh_serial_setbrg_generic()
171 static int sh_serial_setbrg(struct udevice *dev, int baudrate) in sh_serial_setbrg() argument
176 sh_serial_setbrg_generic(priv, plat->clk, baudrate); in sh_serial_setbrg()
299 sh_serial_setbrg_generic(port, CONFIG_SH_SCIF_CLK_FREQ, gd->baudrate); in sh_serial_setbrg()
A Dserial_bcm6345.c115 static int bcm6345_serial_init(void __iomem *base, ulong clk, u32 baudrate) in bcm6345_serial_init() argument
160 val = ((clk / baudrate) >> 4); in bcm6345_serial_init()
187 static int bcm6345_serial_setbrg(struct udevice *dev, int baudrate) in bcm6345_serial_setbrg() argument
191 return bcm6345_serial_init(priv->base, priv->uartclk, baudrate); in bcm6345_serial_setbrg()
A Dserial_stm32.c27 int baudrate) in _stm32_serial_setbrg() argument
32 int_div = DIV_ROUND_CLOSEST(clock_rate, baudrate); in _stm32_serial_setbrg()
48 static int stm32_serial_setbrg(struct udevice *dev, int baudrate) in stm32_serial_setbrg() argument
53 plat->clock_rate, baudrate); in stm32_serial_setbrg()
A Dserial_nulldev.c10 static int nulldev_serial_setbrg(struct udevice *dev, int baudrate) in nulldev_serial_setbrg() argument
A Dserial_arc.c39 static int arc_serial_setbrg(struct udevice *dev, int baudrate) in arc_serial_setbrg() argument
43 int arc_console_baud = gd->cpu_clk / (baudrate * 4) - 1; in arc_serial_setbrg()
/u-boot/drivers/spi/
A Dcf_spi.c28 uint baudrate; member
241 cfspi->baudrate = max_hz; in coldfire_spi_set_speed()
248 if ((cfspi->baudrate > (gd->bus_clk >> 1)) || in coldfire_spi_set_speed()
249 (cfspi->baudrate < (gd->bus_clk / tmp))) { in coldfire_spi_set_speed()
257 (cfspi->baudrate > (gd->bus_clk / (prescaler[0] * scaler[0])))) { in coldfire_spi_set_speed()
283 if (tmp > cfspi->baudrate) in coldfire_spi_set_speed()
284 diff = tmp - cfspi->baudrate; in coldfire_spi_set_speed()
286 diff = cfspi->baudrate - tmp; in coldfire_spi_set_speed()
354 cfspi->baudrate = plat->speed_hz; in coldfire_spi_probe()
/u-boot/include/dm/platform_data/
A Dserial_coldfire.h19 int baudrate; member
A Dserial_pxa.h52 int baudrate; member
/u-boot/cmd/
A Dload.c59 load_baudrate = current_baudrate = gd->baudrate; in do_load_serial()
83 gd->baudrate = load_baudrate; in do_load_serial()
126 gd->baudrate = current_baudrate; in do_load_serial()
256 save_baudrate = current_baudrate = gd->baudrate; in do_save_serial()
277 gd->baudrate = save_baudrate; in do_save_serial()
306 gd->baudrate = current_baudrate; in do_save_serial()
443 load_baudrate = current_baudrate = gd->baudrate; in do_load_serial_bin()
460 gd->baudrate = load_baudrate; in do_load_serial_bin()
506 gd->baudrate = current_baudrate; in do_load_serial_bin()

Completed in 29 milliseconds

1234