提交 976c21ad 编写于 作者: M Matthias Fuchs 提交者: Stefan Roese

ppc4xx: Fix building for PLU405 boards

The init_coupler() function from board/esd/plu405/plu405.c
got lost somehow! This patch readds it.
Signed-off-by: NMatthias Fuchs <matthias.fuchs@esd.eu>
Signed-off-by: NStefan Roese <sr@denx.de>
上级 59c1db6d
......@@ -46,6 +46,34 @@ const unsigned char fpgadata[] =
*/
#include "../common/fpga.c"
/*
* generate a short spike on the CAN tx line
* to bring the couplers in sync
*/
void init_coupler(u32 addr)
{
struct sja1000_basic_s *ctrl = (struct sja1000_basic_s *)addr;
/* reset */
out_8(&ctrl->cr, CR_RR);
/* dominant */
out_8(&ctrl->btr0, 0x00); /* btr setup is required */
out_8(&ctrl->btr1, 0x14); /* we use 1Mbit/s */
out_8(&ctrl->oc, OC_TP1 | OC_TN1 | OC_POL1 |
OC_TP0 | OC_TN0 | OC_POL0 | OC_MODE1);
out_8(&ctrl->cr, 0x00);
/* delay */
in_8(&ctrl->cr);
in_8(&ctrl->cr);
in_8(&ctrl->cr);
in_8(&ctrl->cr);
/* reset */
out_8(&ctrl->cr, CR_RR);
}
int board_early_init_f(void)
{
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册