#define ADDRESSOFTEXTLCD        0x14200000

if((fd=open("/dev/mem", O_RDWR|O_SYNC))<0){
                perror("mem open failn");
                exit(1);
        }
        
pTextlcd=mmap(NULL, 4, PROT_WRITE, MAP_SHARED, fd, ADDRESSOFTEXTLCD);


mmap 함수를 이용해서 하드웨어 접근을 하는데요. 컴파일후

실행을 하면

Unhandled fault: external abort on linefetch (0x006) at 0x40017000
mm = c00151a0 pgd = c0c68000
*pgd = a0c6c001, *pmd = a0c6c001, *pte = 142000b3, *ppte = 14200033
Bus error

이런 에러가 납니다.

커널에 있는   ez-x5.c 부분에

static struct map_desc ez_x5_io_desc[] __initdata = {
/*       virtual     physical               length      domain     r  w  c  b */
        { 0xf0000000, 0x00000000  +0x000000, 0x00400000, DOMAIN_IO, 0, 1, 0, 0 },  // nCS0
        { 0xf1000000, 0x00000000  +0x400000, 0x00100000, DOMAIN_IO, 0, 1, 0, 0 },  // nCS0
        { 0xf1100000, 0x00000000  +0x800000, 0x00100000, DOMAIN_IO, 0, 1, 0, 0 },  // nCS0
        { 0xf1200000, PXA_CS1_PHYS+0x000000, 0x00100000, DOMAIN_IO, 0, 1, 0, 0 },  //
           { 0xf1300000, PXA_CS1_PHYS+0x400000, 0x00100000, DOMAIN_IO, 0, 1, 0, 0 },  //
        { 0xf1400000, 0x00000000  +0xC00000, 0x00100000, DOMAIN_IO, 0, 1, 0, 0 },  // nCS0
        { 0xf1500000, PXA_CS1_PHYS+0x800000, 0x00100000, DOMAIN_IO, 0, 1, 0, 0 },  //
        { 0xf1600000, PXA_CS1_PHYS+0xC00000, 0x00100000, DOMAIN_IO, 0, 1, 0, 0 },  //
        { 0xf2000000, PXA_CS2_PHYS         , 0x01000000, DOMAIN_IO, 0, 1, 0, 0 },  // nCS2
          { 0xf3000000, PXA_CS3_PHYS         , 0x01000000, DOMAIN_IO, 0, 1, 0, 0 },  // nCS3
        { 0xf4000000, PXA_CS4_PHYS         , 0x01000000, DOMAIN_IO, 0, 1, 0, 0 },  // nCS4
        { 0xf5000000, PXA_CS5_PHYS         , 0x01000000, DOMAIN_IO, 0, 1, 0, 0 },  // nCS5
        { 0xf6000000, 0x14200000,0x00100000, DOMAIN_IO, 1, 1, 0, 0 },  // nCS5 영역  16Mbyte
        
        LAST_DESC
};

이렇게 추가는 시켜 주었구요.

초보라서 그러는데 무엇을 더 해줘야 하나요?