]> Git Repo - J-u-boot.git/blame - arch/m68k/cpu/mcf523x/cpu.c
Merge tag 'u-boot-imx-master-20250127' of https://gitlab.denx.de/u-boot/custodians...
[J-u-boot.git] / arch / m68k / cpu / mcf523x / cpu.c
CommitLineData
83d290c5 1// SPDX-License-Identifier: GPL-2.0+
4a442d31
TL
2/*
3 *
4 * (C) Copyright 2000-2003
5 * Wolfgang Denk, DENX Software Engineering, [email protected].
6 *
c6d88630 7 * Copyright (C) 2004-2007, 2012 Freescale Semiconductor, Inc.
4a442d31 8 * TsiChung Liew ([email protected])
4a442d31
TL
9 */
10
691d719d 11#include <init.h>
90526e9f 12#include <net.h>
2189d5f1 13#include <vsprintf.h>
4a442d31 14#include <command.h>
89973f8a 15#include <netdev.h>
401d1c4f 16#include <asm/global_data.h>
4a442d31
TL
17
18#include <asm/immap.h>
c6d88630 19#include <asm/io.h>
4a442d31
TL
20
21DECLARE_GLOBAL_DATA_PTR;
22
09140113 23int do_reset(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
4a442d31 24{
c6d88630 25 ccm_t *ccm = (ccm_t *) MMAP_CCM;
4a442d31 26
c6d88630 27 out_8(&ccm->rcr, CCM_RCR_SOFTRST);
4a442d31
TL
28 /* we don't return! */
29 return 0;
c6d88630 30}
4a442d31 31
b9153fe3
AD
32#if defined(CONFIG_DISPLAY_CPUINFO)
33int print_cpuinfo(void)
4a442d31 34{
c6d88630 35 ccm_t *ccm = (ccm_t *) MMAP_CCM;
4a442d31
TL
36 u16 msk;
37 u16 id = 0;
38 u8 ver;
39
40 puts("CPU: ");
c6d88630
AW
41 msk = (in_be16(&ccm->cir) >> 6);
42 ver = (in_be16(&ccm->cir) & 0x003f);
4a442d31
TL
43 switch (msk) {
44 case 0x31:
45 id = 5235;
46 break;
47 }
48
49 if (id) {
08ef89ec
WD
50 char buf1[32], buf2[32];
51
4a442d31
TL
52 printf("Freescale MCF%d (Mask:%01x Version:%x)\n", id, msk,
53 ver);
08ef89ec 54 printf(" CPU CLK %s MHz BUS CLK %s MHz\n",
1b270844
TL
55 strmhz(buf1, gd->cpu_clk),
56 strmhz(buf2, gd->bus_clk));
4a442d31
TL
57 }
58
59 return 0;
60};
b9153fe3 61#endif /* CONFIG_DISPLAY_CPUINFO */
4a442d31 62
86882b80
BW
63#if defined(CONFIG_MCFFEC)
64/* Default initializations for MCFFEC controllers. To override,
65 * create a board-specific function called:
0cf207ec 66 * int board_eth_init(struct bd_info *bis)
86882b80
BW
67 */
68
b75d8dc5 69int cpu_eth_init(struct bd_info *bis)
86882b80
BW
70{
71 return mcffec_initialize(bis);
72}
73#endif
This page took 0.520566 seconds and 5 git commands to generate.