hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/*
 * Copyright 2007 Freescale Semiconductor.
 *
 * SPDX-License-Identifier:    GPL-2.0+
 */
 
#ifndef __BCSR_H_
#define __BCSR_H_
 
#include <common.h>
 
/* BCSR Bit definitions
   * BCSR 0 *
   0:3    ccb sys pll
   4:6    cfg core pll
   7    cfg boot seq
 
   * BCSR 1 *
   0:2    cfg rom lock
   3:5    cfg host agent
   6    PCI IO
   7    cfg RIO size
 
   * BCSR 2 *
   0:4    QE PLL
   5    QE clock
   6    cfg PCI arbiter
 
   * BCSR 3 *
   0    TSEC1 reduce
   1    TSEC2 reduce
   2:3    TSEC1 protocol
   4:5    TSEC2 protocol
   6    PHY1 slave
   7    PHY2 slave
 
   * BCSR 4 *
   4    clock enable
   5    boot EPROM
   6    GETH transactive reset
   7    BRD write potect
 
   * BCSR 5 *
   1:3    Leds 1-3
   4    UPC1 enable
   5    UPC2 enable
   6    UPC2 pos
   7    RS232 enable
 
   * BCSR 6 *
   0    CFG ver 0
   1    CFG ver 1
   6    Register config led
   7    Power on reset
 
   * BCSR 7 *
   2    board host mode indication
   5    enable TSEC1 PHY
   6    enable TSEC2 PHY
 
   * BCSR 8 *
   0    UCC GETH1 enable
   1    UCC GMII enable
   3    UCC TBI enable
   5    UCC MII enable
   7    Real time clock reset
 
   * BCSR 9 *
   0    UCC2 GETH enable
   1    UCC2 GMII enable
   3    UCC2 TBI enable
   5    UCC2 MII enable
   6    Ready only - indicate flash ready after burning
   7    Flash write protect
*/
 
#define BCSR_UCC1_GETH_EN    (0x1 << 7)
#define BCSR_UCC2_GETH_EN    (0x1 << 7)
#define BCSR_UCC1_MODE_MSK    (0x3 << 4)
#define BCSR_UCC2_MODE_MSK    (0x3 << 0)
 
/*BCSR Utils functions*/
 
void enable_8568mds_duart(void);
void enable_8568mds_flash_write(void);
void disable_8568mds_flash_write(void);
void enable_8568mds_qe_mdio(void);
 
#if defined(CONFIG_UEC_ETH1) || defined(CONFIG_UEC_ETH2)
void reset_8568mds_uccs(void);
#endif
 
#endif    /* __BCSR_H_ */