1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering
5 * Copyright (C) 2006 Micronas GmbH
15 #ifdef CONFIG_VCT_PREMIUM
16 /* Global start address of all memory mapped registers */
17 #define REG_GLOBAL_START_ADDR 0xbf800000
18 #define TOP_BASE 0x000c8000
20 #include "vcth/reg_ebi.h"
21 #include "vcth/reg_dcgu.h"
22 #include "vcth/reg_wdt.h"
23 #include "vcth/reg_gpio.h"
24 #include "vcth/reg_fwsram.h"
25 #include "vcth/reg_scc.h"
26 #include "vcth/reg_usbh.h"
29 #ifdef CONFIG_VCT_PLATINUM
30 /* Global start address of all memory mapped registers */
31 #define REG_GLOBAL_START_ADDR 0xbf800000
32 #define TOP_BASE 0x000c8000
34 #include "vcth2/reg_ebi.h"
35 #include "vcth/reg_dcgu.h"
36 #include "vcth/reg_wdt.h"
37 #include "vcth/reg_gpio.h"
38 #include "vcth/reg_fwsram.h"
39 #include "vcth/reg_scc.h"
40 #include "vcth/reg_usbh.h"
43 #ifdef CONFIG_VCT_PLATINUMAVC
44 /* Global start address of all memory mapped registers */
45 #define REG_GLOBAL_START_ADDR 0xbdc00000
46 #define TOP_BASE 0x00050000
48 #include "vctv/reg_ebi.h"
49 #include "vctv/reg_dcgu.h"
50 #include "vctv/reg_wdt.h"
51 #include "vctv/reg_gpio.h"
60 #define PRID_COMP_LEGACY 0x000000
61 #define PRID_COMP_MIPS 0x010000
62 #define PRID_IMP_LX4280 0xc200
63 #define PRID_IMP_VGC 0x9000
68 int ebi_initialize(void);
69 int ebi_init_nor_flash(void);
70 int ebi_init_onenand(void);
71 int ebi_init_smc911x(void);
72 u32 smc911x_reg_read(u32 addr);
73 void smc911x_reg_write(u32 addr, u32 data);
74 int top_set_pin(int pin, int func);
75 void vct_pin_mux_initialize(void);
80 static inline void reg_write(u32 addr, u32 data)
82 void *reg = (void *)(addr + REG_GLOBAL_START_ADDR);
83 __raw_writel(data, reg);
86 static inline u32 reg_read(u32 addr)
88 const void *reg = (const void *)(addr + REG_GLOBAL_START_ADDR);
89 return __raw_readl(reg);