2 * (C) Copyright 2008 Stefan Roese <sr@denx.de>, DENX Software Engineering
4 * Copyright (C) 2006 Micronas GmbH
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of
9 * the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
29 #ifdef CONFIG_VCT_PREMIUM
30 /* Global start address of all memory mapped registers */
31 #define REG_GLOBAL_START_ADDR 0xbf800000
32 #define TOP_BASE 0x000c8000
34 #include "vcth/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_PLATINUM
44 /* Global start address of all memory mapped registers */
45 #define REG_GLOBAL_START_ADDR 0xbf800000
46 #define TOP_BASE 0x000c8000
48 #include "vcth2/reg_ebi.h"
49 #include "vcth/reg_dcgu.h"
50 #include "vcth/reg_wdt.h"
51 #include "vcth/reg_gpio.h"
52 #include "vcth/reg_fwsram.h"
53 #include "vcth/reg_scc.h"
54 #include "vcth/reg_usbh.h"
57 #ifdef CONFIG_VCT_PLATINUMAVC
58 /* Global start address of all memory mapped registers */
59 #define REG_GLOBAL_START_ADDR 0xbdc00000
60 #define TOP_BASE 0x00050000
62 #include "vctv/reg_ebi.h"
63 #include "vctv/reg_dcgu.h"
64 #include "vctv/reg_wdt.h"
65 #include "vctv/reg_gpio.h"
74 #define PRID_COMP_LEGACY 0x000000
75 #define PRID_COMP_MIPS 0x010000
76 #define PRID_IMP_LX4280 0xc200
77 #define PRID_IMP_VGC 0x9000
82 int ebi_initialize(void);
83 int ebi_init_nor_flash(void);
84 int ebi_init_onenand(void);
85 int ebi_init_smc911x(void);
86 u32 smc911x_reg_read(u32 addr);
87 void smc911x_reg_write(u32 addr, u32 data);
88 int top_set_pin(int pin, int func);
89 void vct_pin_mux_initialize(void);
94 static inline void reg_write(u32 addr, u32 data)
96 __raw_writel(data, addr + REG_GLOBAL_START_ADDR);
99 static inline u32 reg_read(u32 addr)
101 return __raw_readl(addr + REG_GLOBAL_START_ADDR);