forked from Imagelibrary/rtems
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
616545350f | ||
|
|
13cbd83444 | ||
|
|
ef6e6e3087 | ||
|
|
7b40317e76 |
4
.gitlab/gitlab-ci.yml
Normal file
4
.gitlab/gitlab-ci.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
include:
|
||||
- project: 'administration/integration'
|
||||
file:
|
||||
- 'ci/config/rtems.yml'
|
||||
@@ -590,7 +590,7 @@ int ns16550_set_attributes(
|
||||
* turn into the LSB and MSB divisor latch registers.
|
||||
*/
|
||||
|
||||
(*setReg)(pNS16550, NS16550_LINE_CONTROL, SP_LINE_DLAB);
|
||||
(*setReg)(pNS16550, NS16550_LINE_CONTROL, SP_LINE_DLAB | ucLineControl);
|
||||
(*setReg)(pNS16550, NS16550_TRANSMIT_BUFFER, ulBaudDivisor&0xff);
|
||||
(*setReg)(pNS16550, NS16550_INTERRUPT_ENABLE, (ulBaudDivisor>>8)&0xff);
|
||||
|
||||
|
||||
@@ -62,7 +62,8 @@ int grlib_canbtrs_calc_timing(
|
||||
tseg++) {
|
||||
/* calculate scaler */
|
||||
tmp = ((br->divfactor + tseg) * baud);
|
||||
sc = (core_hz * 2)/ tmp - core_hz / tmp;
|
||||
/* Core frequency is always divided by 2 before scaler */
|
||||
sc = core_hz / (2 * tmp);
|
||||
if (sc <= 0 || sc > br->max_scaler)
|
||||
continue;
|
||||
if (br->has_bpr &&
|
||||
@@ -71,7 +72,7 @@ int grlib_canbtrs_calc_timing(
|
||||
((sc > 256 * 4) && (sc <= 256 * 8) && (sc & 0x7))))
|
||||
continue;
|
||||
|
||||
error = baud - core_hz / (sc * (br->divfactor + tseg));
|
||||
error = baud - core_hz / (2 * sc * (br->divfactor + tseg));
|
||||
#ifdef GRLIB_CANBTRS_DEBUG
|
||||
printf(" baud=%d, tseg=%d, sc=%d, error=%d\n",
|
||||
baud, tseg, sc, error);
|
||||
|
||||
@@ -1000,7 +1000,9 @@ static void convert_timing_to_btrs(
|
||||
{
|
||||
btrs->btr0 = (t->rsj << OCCAN_BUSTIM_SJW_BIT) |
|
||||
(t->scaler & OCCAN_BUSTIM_BRP);
|
||||
btrs->btr1 = (0<<7) | (t->ps2 << OCCAN_BUSTIM_TSEG2_BIT) | t->ps1;
|
||||
|
||||
/* Core adds +1 to the register values, so compensate here by decrementing */
|
||||
btrs->btr1 = (0<<7) | ((t->ps2-1) << OCCAN_BUSTIM_TSEG2_BIT) | (t->ps1-1);
|
||||
}
|
||||
|
||||
static int occan_set_speedregs(occan_priv *priv, occan_speed_regs *timing)
|
||||
|
||||
@@ -34,11 +34,11 @@ const rtems_assoc_t rtems_termios_baud_table [] = {
|
||||
{ "B1800", 1800, B1800 },
|
||||
{ "B2400", 2400, B2400 },
|
||||
{ "B4800", 4800, B4800 },
|
||||
{ "B7200", 7200, B7200 },
|
||||
{ "B9600", 9600, B9600 },
|
||||
{ "B14400", 14400, B14400 },
|
||||
{ "B19200", 19200, B19200 },
|
||||
{ "B38400", 38400, B38400 },
|
||||
{ "B7200", 7200, B7200 },
|
||||
{ "B14400", 14400, B14400 },
|
||||
{ "B28800", 28800, B28800 },
|
||||
{ "B57600", 57600, B57600 },
|
||||
{ "B76800", 76800, B76800 },
|
||||
|
||||
Reference in New Issue
Block a user