QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1467|回复: 2

一个非常疑惑的问题,请斑竹和各位大侠帮忙解释一下,谢谢!

[复制链接]
发表于 2005-9-2 11:40:48 | 显示全部楼层 |阅读模式
我读了nandflash和USB,还有LCD的测试代码,一开始就遇到了两个疑惑:
在三个测试程序中,有三处对设备基地址的定义分别是:

1 USB测试程序 D12Def.h文件中:
//#define D12Dat 0x07fd0000         //D12 use nECS0 as the chip selection
//#define D12Cmd 0x07fd0001
#define D12Base 0x07fd0000

2 nandlflash测试程序,flash.h文件中:
/#define rKM29UXDATA           (*(volatile unsigned char *)0x07fd0000)        //E CS bank0
//#define rKM29UXDATA           (*(volatile unsigned char *)0x07fd4000)        //E CS bank1
//#define rKM29UXDATA           (*(volatile unsigned char *)0x07fd8000)        //E CS bank2
#define rKM29UXDATA           (*(volatile unsigned char *)0x07fd8000)        //E CS bank23 LCD测试程序,lcd.h文件中
#define          Base_Addr        0x3ff0000
#define REFEXTCON        (VPint(Base_Addr+0x303c))
#define LCD_Addr_Base  ( ((REFEXTCON & 0x3FF) << 16 ) + 0x00004000 )
我看了硬件电路图,发现USB使用nECS0作为片选信号,LCD使用nECS1作为片选,nandflash使用nECS2作为片选,而bootloader启动后,内存映射时把extern IO BANK 0 的基地址定义在0x03fd0000,那么这三个设备只有LCD的基地址是和bootloader启动后的基地址是符合,两外两个设备的基地址确刚好多了0x0400000,斑竹请帮忙解释一下吧,非常感谢!!
发表于 2005-9-2 14:27:37 | 显示全部楼层
USB  (nECS0):   0x03fd0000
LCD  (nECS1):   0x03fd4000  
NandFlash  (nECS2):  0x03fd8000
每一个 extern IO Bank 长度是 0x4000 。
至于 0x7FD 和 0x3FD 的关系,可以看看 chw75 的帖子:
http://www.linuxfans.org/nuke/modules.php?name=Forums&file=viewtopic&p=4490082&highlight=#4490082

在s3c4510的pdf上是这么讲的:
NON-CACHEABLE AREA CONTROL BIT
Although the cache affects the entire system memory, it is sometimes necessary to define non-cacheable areas
when the consistency of data stored in memory and the cache must be ensured. To support this, the S3C4510B
provides a non-cacheable area control bit in the address field, ADDR[26].
If ADDR[26] in the ROM/SRAM, flash memory, DRAM, or external I/O bank's access address is "0", then the
accessed data is cacheable. If the ADDR[26] value is "1", the accessed data is non-cacheable.
回复

使用道具 举报

 楼主| 发表于 2005-9-4 09:43:21 | 显示全部楼层

非常感谢!!!,终于明白了。。。

非常感谢!!!,终于明白了。。。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-6-7 00:07 , Processed in 0.046874 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表