]> Git Repo - J-u-boot.git/blame - board/freescale/mpc8569mds/bcsr.c
SPDX: Convert all of our single license tags to Linux Kernel style
[J-u-boot.git] / board / freescale / mpc8569mds / bcsr.c
CommitLineData
83d290c5 1// SPDX-License-Identifier: GPL-2.0+
765547dc 2/*
4c2e3da8 3 * Copyright (C) 2009 Freescale Semiconductor, Inc.
765547dc
HW
4 */
5
6#include <common.h>
7#include <asm/io.h>
8
9#include "bcsr.h"
10
e56143e5 11void enable_8569mds_flash_write(void)
765547dc 12{
16e7559c 13 setbits_8((u8 *)(CONFIG_SYS_BCSR_BASE + 17), BCSR17_FLASH_nWP);
765547dc
HW
14}
15
e56143e5 16void disable_8569mds_flash_write(void)
765547dc
HW
17{
18 clrbits_8((u8 *)(CONFIG_SYS_BCSR_BASE + 17), BCSR17_FLASH_nWP);
19}
20
e56143e5 21void enable_8569mds_qe_uec(void)
765547dc 22{
f82107f6 23#if defined(CONFIG_SYS_UCC_RGMII_MODE)
765547dc
HW
24 setbits_8((u8 *)(CONFIG_SYS_BCSR_BASE + 7),
25 BCSR7_UCC1_GETH_EN | BCSR7_UCC1_RGMII_EN);
26 setbits_8((u8 *)(CONFIG_SYS_BCSR_BASE + 8),
27 BCSR8_UCC2_GETH_EN | BCSR8_UCC2_RGMII_EN);
750098d3
HW
28 setbits_8((u8 *)(CONFIG_SYS_BCSR_BASE + 9),
29 BCSR9_UCC3_GETH_EN | BCSR9_UCC3_RGMII_EN);
30 setbits_8((u8 *)(CONFIG_SYS_BCSR_BASE + 10),
31 BCSR10_UCC4_GETH_EN | BCSR10_UCC4_RGMII_EN);
f82107f6
HW
32#elif defined(CONFIG_SYS_UCC_RMII_MODE)
33 /* Set UCC1-4 working at RMII mode */
34 clrbits_8((u8 *)(CONFIG_SYS_BCSR_BASE + 7),
35 BCSR7_UCC1_GETH_EN | BCSR7_UCC1_RGMII_EN);
36 clrbits_8((u8 *)(CONFIG_SYS_BCSR_BASE + 8),
37 BCSR8_UCC2_GETH_EN | BCSR8_UCC2_RGMII_EN);
38 clrbits_8((u8 *)(CONFIG_SYS_BCSR_BASE + 9),
39 BCSR9_UCC3_GETH_EN | BCSR9_UCC3_RGMII_EN);
40 clrbits_8((u8 *)(CONFIG_SYS_BCSR_BASE + 10),
41 BCSR10_UCC4_GETH_EN | BCSR10_UCC4_RGMII_EN);
42 setbits_8((u8 *)(CONFIG_SYS_BCSR_BASE + 9), BCSR9_UCC3_RMII_EN);
43#endif
765547dc
HW
44}
45
e56143e5 46void disable_8569mds_brd_eeprom_write_protect(void)
765547dc
HW
47{
48 clrbits_8((u8 *)(CONFIG_SYS_BCSR_BASE + 7), BCSR7_BRD_WRT_PROTECT);
49}
This page took 0.446576 seconds and 4 git commands to generate.