From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shinya Kuribayashi Date: Sun, 26 Jul 2009 20:37:54 +0900 Subject: [U-Boot] [U-Boot-Users] MIPS: accessing flash > 8MB In-Reply-To: <7f245da80907251943n173ec78bq879f3ea85b046773@mail.gmail.com> References: <7f245da80907251943n173ec78bq879f3ea85b046773@mail.gmail.com> Message-ID: <4A6C4012.1040002@pobox.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Chetan Nanda wrote: > We have a MIPS-4KEC based SoC and running an older version of U-Boot > (1.1.3) on it. It is working perfectly fine. > Board has 8MB AMD flash and starting address of that flash is 0xBFC00000 > (reset vector for MIPS). > > Problem is that we are not able to access full 8MB of flash. Only > 0xBFC00000 - 0xBFFFFFFF (4MB) is accessible, as it lies in un-mapped, > un-cached region of MIPS. > From 0xC0000000 lies in mapped memory area of MIPS. > > Now my questions are, creating entry in TLBs is sufficient to access > rest of 4MB of flash? It depends on its physical address. If your flash device is mapped to 0x1FC00000-0x203FFFFF, you'll need to access to the remaining half via TLBs. However, if it's mapped to 0x1F800000-0x1FFFFFFF, no need to set up TLB entries; you can access anywhere in the devices using KSEG1 virtual addresses. > Is their any interface provided in U-boot to update TLB? There's write_one_tlb() prepared in cpu/mips/cpu.c (I don't know whether it works or not, as I've never had a chance to use it so far). Lastly, AFAIK there's no command line interface to do it.