From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sangmoon Kim Date: Mon, 28 Jun 2004 19:44:46 +0900 Subject: [U-Boot-Users] What are IBAT and DBAT? References: <20040628062500.214.qmail@web20703.mail.yahoo.com> Message-ID: <00a501c45cfc$ee3262d0$212d4cdc@smkim> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, > 3. Can IBAT and DBAT be modified dynamically? For example, if I want to > access 0x70000000 ~ 0x78000000 temporarily, which is not defined in > configuration header file, can I change the configuration of one of IBAT > and DBAT pair, e.g. ibat2 and dbat2? > In case of board/etin/debris board. DBAT1/IBAT1 is used for cache before RAM is initialized. After RAM is initialized and the data memory area is mapped to RAM, DBAT1/IBAT1 is not needed. So I use DBAT1 for a flash memory at 0x78000000 after it. See board/etin/debris/flash.c. You can find the following code in flash_init function. msr = get_msr(); set_msr(msr & ~(MSR_IR | MSR_DR)); mtibat1l(0x70000000 | BATL_PP_10 | BATL_CACHEINHIBIT); mtibat1u(0x70000000 | BATU_BL_256M | BATU_VS | BATU_VP); mtdbat1l(0x70000000 | BATL_PP_10 | BATL_CACHEINHIBIT); mtdbat1u(0x70000000 | BATU_BL_256M | BATU_VS | BATU_VP); set_msr(msr); You can also change IBAT1 with similar method. Regards, Sangmoon Kim