]>
git.ipfire.org Git - thirdparty/u-boot.git/blob - board/freescale/mpc8568mds/bcsr.c
2 * Copyright 2007 Freescale Semiconductor.
4 * SPDX-License-Identifier: GPL-2.0+
12 void enable_8568mds_duart(void)
14 volatile uint
* duart_mux
= (uint
*)(CONFIG_SYS_CCSRBAR
+ 0xe0060);
15 volatile uint
* devices
= (uint
*)(CONFIG_SYS_CCSRBAR
+ 0xe0070);
16 volatile u8
*bcsr
= (u8
*)(CONFIG_SYS_BCSR
);
18 *duart_mux
= 0x80000000; /* Set the mux to Duart on PMUXCR */
19 *devices
= 0; /* Enable all peripheral devices */
20 bcsr
[5] |= 0x01; /* Enable Duart in BCSR*/
23 void enable_8568mds_flash_write(void)
25 volatile u8
*bcsr
= (u8
*)(CONFIG_SYS_BCSR
);
30 void disable_8568mds_flash_write(void)
32 volatile u8
*bcsr
= (u8
*)(CONFIG_SYS_BCSR
);
37 void enable_8568mds_qe_mdio(void)
39 u8
*bcsr
= (u8
*)(CONFIG_SYS_BCSR
);
44 #if defined(CONFIG_UEC_ETH1) || defined(CONFIG_UEC_ETH2)
45 void reset_8568mds_uccs(void)
47 volatile u8
*bcsr
= (u8
*)(CONFIG_SYS_BCSR
);
49 /* Turn off UCC1 & UCC2 */
50 out_8(&bcsr
[8], in_8(&bcsr
[8]) & ~BCSR_UCC1_GETH_EN
);
51 out_8(&bcsr
[9], in_8(&bcsr
[9]) & ~BCSR_UCC2_GETH_EN
);
53 /* Mode is RGMII, all bits clear */
54 out_8(&bcsr
[11], in_8(&bcsr
[11]) & ~(BCSR_UCC1_MODE_MSK
|
57 /* Turn UCC1 & UCC2 on */
58 out_8(&bcsr
[8], in_8(&bcsr
[8]) | BCSR_UCC1_GETH_EN
);
59 out_8(&bcsr
[9], in_8(&bcsr
[9]) | BCSR_UCC2_GETH_EN
);