]> git.ipfire.org Git - people/ms/u-boot.git/blob - board/micronas/vct/vct.h
Add GPL-2.0+ SPDX-License-Identifier to source files
[people/ms/u-boot.git] / board / micronas / vct / vct.h
1 /*
2 * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering
3 *
4 * Copyright (C) 2006 Micronas GmbH
5 *
6 * SPDX-License-Identifier: GPL-2.0+
7 */
8
9 #include <asm/io.h>
10
11 #include "bcu.h"
12 #include "dcgu.h"
13 #include "ebi.h"
14 #include "scc.h"
15
16 #ifdef CONFIG_VCT_PREMIUM
17 /* Global start address of all memory mapped registers */
18 #define REG_GLOBAL_START_ADDR 0xbf800000
19 #define TOP_BASE 0x000c8000
20
21 #include "vcth/reg_ebi.h"
22 #include "vcth/reg_dcgu.h"
23 #include "vcth/reg_wdt.h"
24 #include "vcth/reg_gpio.h"
25 #include "vcth/reg_fwsram.h"
26 #include "vcth/reg_scc.h"
27 #include "vcth/reg_usbh.h"
28 #endif
29
30 #ifdef CONFIG_VCT_PLATINUM
31 /* Global start address of all memory mapped registers */
32 #define REG_GLOBAL_START_ADDR 0xbf800000
33 #define TOP_BASE 0x000c8000
34
35 #include "vcth2/reg_ebi.h"
36 #include "vcth/reg_dcgu.h"
37 #include "vcth/reg_wdt.h"
38 #include "vcth/reg_gpio.h"
39 #include "vcth/reg_fwsram.h"
40 #include "vcth/reg_scc.h"
41 #include "vcth/reg_usbh.h"
42 #endif
43
44 #ifdef CONFIG_VCT_PLATINUMAVC
45 /* Global start address of all memory mapped registers */
46 #define REG_GLOBAL_START_ADDR 0xbdc00000
47 #define TOP_BASE 0x00050000
48
49 #include "vctv/reg_ebi.h"
50 #include "vctv/reg_dcgu.h"
51 #include "vctv/reg_wdt.h"
52 #include "vctv/reg_gpio.h"
53 #endif
54
55 #ifndef _VCT_H
56 #define _VCT_H
57
58 /*
59 * Defines
60 */
61 #define PRID_COMP_LEGACY 0x000000
62 #define PRID_COMP_MIPS 0x010000
63 #define PRID_IMP_LX4280 0xc200
64 #define PRID_IMP_VGC 0x9000
65
66 /*
67 * Prototypes
68 */
69 int ebi_initialize(void);
70 int ebi_init_nor_flash(void);
71 int ebi_init_onenand(void);
72 int ebi_init_smc911x(void);
73 u32 smc911x_reg_read(u32 addr);
74 void smc911x_reg_write(u32 addr, u32 data);
75 int top_set_pin(int pin, int func);
76 void vct_pin_mux_initialize(void);
77
78 /*
79 * static inlines
80 */
81 static inline void reg_write(u32 addr, u32 data)
82 {
83 __raw_writel(data, addr + REG_GLOBAL_START_ADDR);
84 }
85
86 static inline u32 reg_read(u32 addr)
87 {
88 return __raw_readl(addr + REG_GLOBAL_START_ADDR);
89 }
90
91 #endif /* _VCT_H */