/u-boot/drivers/serial/ |
A D | serial_mcf.c | 31 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 D | serial.c | 56 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 D | serial_sti_asc.c | 31 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 D | atmel_usart.c | 33 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 D | serial-uclass.c | 309 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 D | serial_linflexuart.c | 38 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 D | serial_lpuart.c | 148 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 D | serial_pxa.c | 36 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 D | serial_pl01x.c | 109 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 D | lpc32xx_hsuart.c | 19 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 D | serial_mpc8xx.c | 40 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 D | serial_mxc.c | 163 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 D | serial_ar933x.c | 62 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 D | serial_pic32.c | 51 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 D | serial_bcm283x_pl011.c | 63 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 D | serial_s5p.c | 75 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 D | serial_sh.c | 63 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 D | serial_bcm6345.c | 115 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 D | serial_stm32.c | 27 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 D | serial_nulldev.c | 10 static int nulldev_serial_setbrg(struct udevice *dev, int baudrate) in nulldev_serial_setbrg() argument
|
A D | serial_arc.c | 39 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 D | cf_spi.c | 28 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 D | serial_coldfire.h | 19 int baudrate; member
|
A D | serial_pxa.h | 52 int baudrate; member
|
/u-boot/cmd/ |
A D | load.c | 59 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()
|