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#include <common.h>
27#include <command.h>
28#include <pci.h>
29#include <netdev.h>
30#include "articiaS.h"
31#include "memio.h"
32#include "via686.h"
33
34__asm__(" .globl send_kb \n "
35 "send_kb: \n "
36 " lis r9, 0xfe00 \n "
37 " \n "
38 " li r4, 0x10 # retries \n "
39 " mtctr r4 \n "
40 " \n "
41 "idle: \n "
42 " lbz r4, 0x64(r9) \n "
43 " andi. r4, r4, 0x02 \n "
44 " bne idle \n "
45
46 "ready: \n "
47 " stb r3, 0x60(r9) \n "
48 " \n "
49 "check: \n "
50 " lbz r4, 0x64(r9) \n "
51 " andi. r4, r4, 0x01 \n "
52 " beq check \n "
53 " \n "
54 " lbz r4, 0x60(r9) \n "
55 " cmpwi r4, 0xfa \n "
56 " beq done \n "
57
58 " bdnz idle \n "
59
60 " li r3, 0 \n "
61 " blr \n "
62
63 "done: \n "
64 " li r3, 1 \n "
65 " blr \n "
66
67 ".globl test_kb \n "
68 "test_kb: \n "
69 " mflr r10 \n "
70 " li r3, 0xed \n "
71 " bl send_kb \n "
72 " li r3, 0x01 \n "
73 " bl send_kb \n "
74 " mtlr r10 \n "
75 " blr \n "
76);
77
78
79int checkboard (void)
80{
81 printf ("Board: AmigaOneG3SE\n");
82 return 0;
83}
84
85phys_size_t initdram (int board_type)
86{
87 return articiaS_ram_init ();
88}
89
90
91void after_reloc (ulong dest_addr, gd_t *gd)
92{
93 board_init_r (gd, dest_addr);
94}
95
96
97int misc_init_r (void)
98{
99 extern pci_dev_t video_dev;
100 extern void drv_video_init (void);
101
102 if (video_dev != ~0)
103 drv_video_init ();
104
105 return (0);
106}
107
108
109void pci_init_board (void)
110{
111#ifndef CONFIG_RAMBOOT
112 articiaS_pci_init ();
113#endif
114}
115
116int board_eth_init(bd_t *bis)
117{
118#if defined(CONFIG_3COM)
119 eth_3com_initialize(bis);
120#endif
121 return 0;
122}
123