This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

compact flash interface with davinci EVM6446 (TMS320DM6446)

HI,

I have made changes according to spraap7.pdf this pdf for compact flash detection in kernel make menuconfig . but still its not getting properly please suggest me. I am using sandisk ultra II 4 gb compact flash . heare i have attached the log also please take a look. and suggest me to how to move forward.

-Boot >   nand write 0x80700000 0x60000 0x200000

NAND write: device 0 offset 0x60000, size 0x200000
 2097152 bytes written: OK
U-Boot >  setenv bootcmd 'nboot 0x80700000 0 0x60000; bootm'
U-Boot > saveenv
Saving Environment to NAND...
Erasing Nand...
Erasing at 0x0 -- 100% complete.
Writing to Nand... done
U-Boot > DM644x_810MHz initialization passed!
TI UBL Version: 1.50
Booting Catalog Boot Loader
BootMode = NAND
Starting NAND Copy...
Valid magicnum, 0xA1ACED66, found in block 0x00000006.
   DONE
Jumping to entry point at 0x81080000.


U-Boot 2009.03 (Jun 21 2010 - 16:30:08)

I2C:   ready
DRAM:  256 MB
NAND:  NAND device: Manufacturer ID: 0xec, Chip ID: 0x36 (Samsung NAND 64MiB 1,8V 8-bit)
64 MiB
In:    serial
Out:   serial
Err:   serial
ARM Clock: 405MHz
DDR Clock: 189MHz
Ethernet PHY: LXT972 @ 0x01
Hit any key to stop autoboot:  0 

Loading from NAND 64MiB 1,8V 8-bit, offset 0x60000
   Image Name:   Linux-2.6.18_pro500-davinci_evm-
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2017252 Bytes =  1.9 MB
   Load Address: 80008000
   Entry Point:  80008000
## Booting kernel from Legacy Image at 80700000 ...
   Image Name:   Linux-2.6.18_pro500-davinci_evm-
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2017252 Bytes =  1.9 MB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux..................................................................................................................................... done, booting the kernel.
Linux version 2.6.18_pro500-davinci_evm-arm_v5t_le (root@yash12) (gcc version 4.2.0 (MontaVista 4.2.0-16.0.32.0801914 2008-08-30)) #1 PREEMPT Thu Sep 1 20:12:36 IST 2016
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: DaVinci EVM
Memory policy: ECC disabled, Data cache writeback
DaVinci DM6443 variant 0x1
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
Built 1 zonelists.  Total pages: 30208
Kernel command line: video=davincifb:vid0=0,2500K: vid1=0,2500K:osd0=720x576x16,2025K davinci_enc_mngr.ch0_output=COMPOSITE davinci_enc_mngr.ch0_mode=$(videostd) console=ttyS0,115200n8 noinitrd rw ip=192.168.1.103 root=/dev/nfs nfsroot=192.168.1.122:/public/filesys,nolock mem=118M
PID hash table entries: 512 (order: 9, 2048 bytes)
Clock event device timer0_0 configured with caps set: 03
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 118MB = 118MB total
Memory: 115328KB available (3457K code, 689K data, 172K init)
Security Framework v1.0.0 initialized
Capability LSM initialized
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
DaVinci: 71 gpio irqs
WARNING: both IDE and NOR flash are enabled, but share pins.
	Disable IDE for NOR support.
ch0 default output "COMPOSITE", mode "NTSC"
MUX: initialized LOEEN
MUX: initialized LFLDEN
VPBE Encoder Initialized
LogicPD encoder initialized
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 4096 bind 2048)
TCP reno registered
davinci_spi_board_init: NO spi support
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
squashfs: version 3.1 (2006/08/19) Phillip Lougher
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
yaffs Sep  1 2016 20:15:19 Installing. 
SGI XFS with no debug enabled
Initializing Cryptographic API
io scheduler noop registered
io scheduler anticipatory registered (default)
LTT : ltt-facilities init
LTT : ltt-facility-core init in kernel
davincifb davincifb: dm_osd0_fb: 720x480x16@0,0 with framebuffer size 675KB
davincifb davincifb: dm_vid0_fb: 0x0x16@0,0 with framebuffer size 2500KB
davincifb davincifb: dm_osd1_fb: 720x480x4@0,0 with framebuffer size 675KB
davincifb davincifb: dm_vid1_fb: 0x0x16@0,0 with framebuffer size 1020KB
davincifb davincifb.0: dm_osd0_fb: Failed to obtain ownership of OSD window.
DAVINCI-WDT: DaVinci Watchdog Timer: heartbeat 60 sec
Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO map 0x1c20000 mem 0xfec20000 (irq = 40) is a 16550A
RAMDISK driver initialized: 1 RAM disks of 32768K size 1024 blocksize
netconsole: not configured, aborting
TI DaVinci EMAC: MAC address is 00:0e:99:02:43:b1
TI DaVinci EMAC Linux version updated 4.0
TI DaVinci EMAC: Installed 1 instances.
Linux video capture interface: v2.00
vpfe vpfe.1: DaVinci v4l2 capture driver V1.0 loaded
Trying to register davinci display video device.
layer=c088d600,layer->video_dev=c088d760
Trying to register davinci display video device.
layer=c088d400,layer->video_dev=c088d560
davinci_init:DaVinci V4L2 Display Driver V1.0 loaded

 Davici AEW Driver cannot be loaded
 VIDEO PORT is not enabledData Flow path from CCDC is disabled

 Davinci AF driver cannot be loaded
 VIDEO PORT is not enabled 
 CCDC needs to be configured<6>i2c /dev entries driver
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
MUX: initialized HDIREN
MUX: initialized ATAEN
    ide0: MMIO-DMA , BIOS settings: hda:pio, hdb:pio
hda: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, ATA DISK drive
ide0 at 0xfec661f0-0xfec661f7,0xfec663f6 on irq 22
hda: max request size: 128KiB
hda: 7928928 sectors (4059 MB) w/2049KiB Cache, CHS=7866/16/63, BUG DMA OFF
hda: task_no_data_intr: status=0x51 { DriveReady SeekComplete Error }
hda: task_no_data_intr: error=0x04 { DriveStatusError }
ide: failed opcode was: 0xef
 hda: unknown partition table
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.6:USB HID core driver
musb_hdrc: version 6.0, cppi-dma, host, debug=0
musb_hdrc musb_hdrc: No DMA interrupt line
musb_hdrc: USB Host mode controller at c785e000 using DMA, IRQ 12
musb_hdrc musb_hdrc: MUSB HDRC host driver
musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
mice: PS/2 mouse device common for all mice
rtc_davinci_evm rtc_davinci_evm: rtc intf: proc
rtc_davinci_evm rtc_davinci_evm: rtc intf: dev (254:0)
rtc_davinci_evm rtc_davinci_evm: rtc core: registered rtc_davinci_evm as rtc0
rtc0: hours 12-23 are misreported as duplicate hours 00-11
davinci-mmc davinci-mmc.0: Supporting 4-bit mode
davinci-mmc davinci-mmc.0: Using DMA mode
Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50 2006 UTC).
ASoC version 0.13.1
MUX: initialized MCBSP
AIC3X Audio Codec 0.1
asoc: aic3x <-> davinci-i2s mapping ok
ALSA device list:
  #0: DaVinci EVM (aic3x)
IPv4 over IPv4 tunneling driver
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Time: timer0_1 clocksource has been installed.
Clock event device timer0_0 configured with caps set: 08
Switched to high resolution mode on CPU 0
rtc_davinci_evm rtc_davinci_evm: setting the system clock to 2004-02-01 12:16:16 (1075637776)
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
      device=eth0, addr=192.168.1.103, mask=255.255.255.0, gw=255.255.255.255,
     host=192.168.1.103, domain=, nis-domain=(none),
     bootserver=255.255.255.255, rootserver=192.168.1.122, rootpath=
Looking up port of RPC 100003/2 on 192.168.1.122
Looking up port of RPC 100005/1 on 192.168.1.122
VFS: Mounted root (nfs filesystem).
Freeing init memory: 172K
INIT: version 2.86 booting
Starting the hotplug events dispatcher: udevd.
Synthesizing the initial hotplug events...done.
Waiting for /dev to be fully populated...done.
Activating swap...done. 
Remounting root filesystem...done. 
Calculating module dependencies
WARNING: Couldn't open directory /lib/modules/2.6.18_pro500-davinci_evm-arm_v5t_le: No such file or directory
FATAL: Could not open /lib/modules/2.6.18_pro500-davinci_evm-arm_v5t_le/modules.dep.temp for writing: No such file or directory
Loading modules: 
Checking all file systems: fsck
fsck 1.40 (29-Jun-2007)
Mounting local filesystems: mount nothing was mounted
umount.nfs: /dev/root: not found or not mounted
Setting up networking ....
/etc/network/options is deprecated.
Setting up IP spoofing protection: rp_filter done.
Disabling IPv4 packet forwarding: done.
Disabling TCP/IP Explicit Congestion Notification: done.
Starting network interfaces: done.
Starting hotplug subsystem:
   pci     
   pci      [success]
   usb     
   usb      [success]
   isapnp  
   isapnp   [success]
   ide     
   ide      [success]
   input   
   input    [success]
   scsi    
   scsi     [success]
done.
Starting portmap daemon....
Cleaning: /tmp /var/lock /var/run done.
Updating /etc/motd...done.
INIT: Entering runlevel: 3
Starting system log daemon: syslogd klogd.
Starting NFS common utilities: statd.
Starting internet superserver: inetd.
Starting OpenBSD Secure Shell server: sshd. 

MontaVista(R) Linux(R) Professional Edition 5.0.0 (0801921)

192.168.1.103 login: root
Last login: Sun Feb  1 01:05:35 2004 on console
Linux 192.168.1.103 2.6.18_pro500-davinci_evm-arm_v5t_le #1 PREEMPT Thu Sep 1 20:12:36 IST 2016 armv5tejl GNU/Linux
root@192.168.1.103:~# nfs: server 192.168.1.122 not responding, still trying
nfs: server 192.168.1.122 not responding, still trying
ide0: unexpected interrupt, status=0x00, count=1


  • WARNING: both IDE and NOR flash are enabled, but share pins.
    Disable IDE for NOR support.

    Can you please try to disable the NOR flash support in board file and configuration (make menuconfig) and check it.
  • hi,
    thanks for your reply,In the kernel configaration nor flash is already disabled still we are getting same error for compact flash.

  • WARNING: both IDE and NOR flash are enabled, but share pins.
    Disable IDE for NOR support.

    It seems your board file still has the initialization for NOR flash (like PINMUX)
    I hope this log is from board file of DM6446.
  • there in nor flash configaration in dm6446 borad here i attached the config file of kernel configration.please take a look and suggest meautoconf.h

  • You can also attach the .config file from Linux kernel source and board file.
    linux-kernel/.config
    linux-kernel/arch/arm/mach-davinci/<board file of DM6446>
  • /*
     * TI DaVinci EVM board support
     *
     * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
     *
     * (C) 2007-2008 MontaVista Software, Inc.
     *
     * This file is licensed under the terms of the GNU General Public License
     * version 2. This program is licensed "as is" without any warranty of any
     * kind, whether express or implied.
     *
     */
    #include <linux/kernel.h>
    #include <linux/module.h>
    #include <linux/init.h>
    #include <linux/dma-mapping.h>
    #include <linux/platform_device.h>
    #include <linux/mtd/mtd.h>
    #include <linux/mtd/partitions.h>
    #if defined(CONFIG_MTD) || defined(CONFIG_MTD_MODULE)
    #include <linux/mtd/physmap.h>
    #endif
    #include <linux/serial.h>
    #include <linux/serial_8250.h>
    
    #include <asm/setup.h>
    #include <asm/io.h>
    #include <asm/mach-types.h>
    #include <asm/hardware.h>
    
    #include <asm/mach/arch.h>
    #include <asm/mach/map.h>
    #include <asm/mach/flash.h>
    
    #include <asm/arch/common.h>
    #include <asm/arch/gpio.h>
    #include <asm/arch/mux.h>
    #include <asm/arch/clock.h>
    #include <asm/arch/nand.h>
    #include <asm/arch/mmc.h>
    #include <asm/arch/edma.h>
    #include <asm/arch/i2c-client.h>
    
    /* other misc. init functions */
    void __init davinci_serial_init(struct platform_device *pdev);
    void __init davinci_irq_init(void);
    void __init davinci_map_common_io(void);
    void __init davinci_init_common_hw(void);
    
    static struct plat_serial8250_port serial_platform_data[] = {
    	{
    		.membase	= (char *)IO_ADDRESS(DAVINCI_UART0_BASE),
    		.mapbase	= (unsigned long)DAVINCI_UART0_BASE,
    		.irq		= IRQ_UARTINT0,
    		.flags		= UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
    		.iotype		= UPIO_MEM,
    		.regshift	= 2,
    		.uartclk	= 27000000,
    	},
    	{
    		.flags		= 0
    	},
    };
    
    static struct platform_device serial_device = {
    	.name			= "serial8250",
    	.id			= PLAT8250_DEV_PLATFORM,
    	.dev			= {
    		.platform_data	= serial_platform_data,
    	},
    };
    
    #if defined(CONFIG_MTD) || defined(CONFIG_MTD_MODULE)
    /* NOR Flash base address set to CS0 by default */
    #define NOR_FLASH_PHYS 0x02000000
    
    static struct mtd_partition davinci_evm_partitions[] = {
    	/* bootloader (U-Boot, etc) in first 4 sectors */
    	{
    		.name		= "bootloader",
    		.offset		= 0,
    		.size		= SZ_128K,
    		.mask_flags	= MTD_WRITEABLE, /* force read-only */
    	},
    	/* bootloader params in the next 1 sectors */
    	{
    		.name		= "params",
    		.offset		= MTDPART_OFS_APPEND,
    		.size		= SZ_128K,
    		.mask_flags	= MTD_WRITEABLE,
    	},
    	/* kernel */
    	{
    		.name		= "kernel",
    		.offset		= MTDPART_OFS_APPEND,
    		.size		= SZ_4M,
    		.mask_flags	= 0
    	},
    	/* file system */
    	{
    		.name		= "filesystem",
    		.offset		= MTDPART_OFS_APPEND,
    		.size		= MTDPART_SIZ_FULL,
    		.mask_flags	= 0
    	}
    };
    
    static struct physmap_flash_data davinci_evm_flash_data = {
    	.width		= 2,
    	.parts		= davinci_evm_partitions,
    	.nr_parts	= ARRAY_SIZE(davinci_evm_partitions),
    };
    
    /* NOTE: CFI probe will correctly detect flash part as 32M, but EMIF
     * limits addresses to 16M, so using addresses past 16M will wrap */
    static struct resource davinci_evm_flash_resource = {
    	.start		= NOR_FLASH_PHYS,
    	.end		= NOR_FLASH_PHYS + SZ_16M - 1,
    	.flags		= IORESOURCE_MEM,
    };
    
    static struct platform_device davinci_evm_flash_device = {
    	.name		= "physmap-flash",
    	.id		= 0,
    	.dev		= {
    		.platform_data	= &davinci_evm_flash_data,
    	},
    	.num_resources	= 1,
    	.resource	= &davinci_evm_flash_resource,
    };
    #endif
    
    #if defined(CONFIG_MTD_NAND_DAVINCI) || defined(CONFIG_MTD_NAND_DAVINCI_MODULE)
    static struct mtd_partition davinci_nand_partitions[] = {
    	/* bootloader (U-Boot, etc) in first sector */
    	{
    		.name		= "bootloader",
    		.offset		= 0,
    		.size		= SZ_256K,
    		.mask_flags	= MTD_WRITEABLE,	/* force read-only */
    	},
    	/* bootloader params in the next sector */
    	{
    		.name		= "params",
    		.offset		= MTDPART_OFS_APPEND,
    		.size		= SZ_128K,
    		.mask_flags	= MTD_WRITEABLE,	/* force read-only */
    	},
    	/* kernel */
    	{
    		.name		= "kernel",
    		.offset		= MTDPART_OFS_APPEND,
    		.size		= SZ_4M,
    		.mask_flags	= 0,
    	},
    	/* file system */
    	{
    		.name		= "filesystem",
    		.offset		= MTDPART_OFS_APPEND,
    		.size		= MTDPART_SIZ_FULL,
    		.mask_flags	= 0,
    	}
    };
    
    static struct nand_davinci_platform_data davinci_nand_data = {
    	.options	= 0,
    	.ecc_mode	= NAND_ECC_HW,
    	.cle_mask	= 0x10,
    	.ale_mask	= 0x08,
    	.bbt_td		= NULL,
    	.bbt_md		= NULL,
    	.parts		= davinci_nand_partitions,
    	.nr_parts	= ARRAY_SIZE(davinci_nand_partitions),
    };
    
    static struct resource davinci_nand_resources[] = {
    	[0] = {		/* First memory resource is AEMIF control registers */
    		.start		= DM644X_ASYNC_EMIF_CNTRL_BASE,
    		.end		= DM644X_ASYNC_EMIF_CNTRL_BASE + SZ_4K - 1,
    		.flags		= IORESOURCE_MEM,
    	},
    	[1] = {		/* Second memory resource is NAND I/O window */
    		.start		= DAVINCI_ASYNC_EMIF_DATA_CE0_BASE,
    		.end		= DAVINCI_ASYNC_EMIF_DATA_CE0_BASE + SZ_16K - 1,
    		.flags		= IORESOURCE_MEM,
    	},
    };
    
    static struct platform_device davinci_nand_device = {
    	.name			= "nand_davinci",
    	.id			= 0,
    	.dev			= {
    		.platform_data	= &davinci_nand_data,
    	},
    
    	.num_resources		= ARRAY_SIZE(davinci_nand_resources),
    	.resource		= davinci_nand_resources,
    };
    #endif
    
    static struct platform_device rtc_dev = {
    	.name		= "rtc_davinci_evm",
    	.id		= -1,
    };
    
    static u64 davinci_fb_dma_mask = DMA_32BIT_MASK;
    
    static struct platform_device davinci_fb_device = {
    	.name		= "davincifb",
    	.id		= -1,
    	.dev = {
    		.dma_mask		= &davinci_fb_dma_mask,
    		.coherent_dma_mask      = DMA_32BIT_MASK,
    	},
    	.num_resources = 0,
    };
    
    #if defined(CONFIG_MMC_DAVINCI) || defined(CONFIG_MMC_DAVINCI_MODULE)
    static struct resource mmc0_resources[] = {
    	[0] = {			/* registers */
    		.start		= DAVINCI_MMC_SD_BASE,
    		.end		= DAVINCI_MMC_SD_BASE + SZ_1K - 1,
    		.flags		= IORESOURCE_MEM,
    	},
    	[1] = {			/* interrupt */
    		.start		= IRQ_MMCINT,
    		.end		= IRQ_MMCINT,
    		.flags		= IORESOURCE_IRQ,
    	},
    	[2] = {			/* dma rx */
    		.start		= DM644X_DMACH_MMCRXEVT,
    		.end		= DM644X_DMACH_MMCRXEVT,
    		.flags		= IORESOURCE_DMA,
    	},
    	[3] = {			/* dma tx */
    		.start		= DM644X_DMACH_MMCTXEVT,
    		.end		= DM644X_DMACH_MMCTXEVT,
    		.flags		= IORESOURCE_DMA,
    	},
    };
    
    static struct davinci_mmc_platform_data mmc0_platform_data = {
    	.mmc_clk		= "MMCSDCLK0",
    	.rw_threshold		= 32,
    	.use_4bit_mode		= 1,
    };
    
    static struct platform_device mmc0_device = {
    	.name			= "davinci-mmc",
    	.id			= 0,
    	.dev			= {
    		.platform_data	= &mmc0_platform_data,
    	},
    
    	.num_resources		= ARRAY_SIZE(mmc0_resources),
    	.resource		= mmc0_resources,
    };
    
    static void setup_mmc(void)
    {
    	davinci_psc_config(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_MMC_SD0, 1);
    }
    #else
    #define setup_mmc()
    #endif
    
    #if defined(CONFIG_BLK_DEV_PALMCHIP_BK3710) || \
        defined(CONFIG_BLK_DEV_PALMCHIP_BK3710_MODULE)
    static struct resource ide_resources[] = {
    	{
    		.start		= DAVINCI_CFC_ATA_BASE,
    		.end		= DAVINCI_CFC_ATA_BASE + 0x7ff,
    		.flags		= IORESOURCE_MEM,
    	},
    	{
    		.start		= IRQ_IDE,
    		.end		= IRQ_IDE,
    		.flags		= IORESOURCE_IRQ,
    	},
    };
    
    static struct platform_device davinci_ide_device = {
    	.name		= "palm_bk3710",
    	.id		= -1,
    	.num_resources	= ARRAY_SIZE(ide_resources),
    	.resource	= ide_resources,
    };
    #endif
    
    static struct platform_device *davinci_evm_devices[] __initdata = {
    	&serial_device,
    #if defined(CONFIG_MTD) || defined(CONFIG_MTD_MODULE)
    	&davinci_evm_flash_device,
    #endif
    #if defined(CONFIG_MTD_NAND_DAVINCI) || defined(CONFIG_MTD_NAND_DAVINCI_MODULE)
    	&davinci_nand_device,
    #endif
    	&rtc_dev,
    	&davinci_fb_device,
    #if defined(CONFIG_BLK_DEV_PALMCHIP_BK3710) || \
        defined(CONFIG_BLK_DEV_PALMCHIP_BK3710_MODULE)
    	&davinci_ide_device,
    #endif
    #if defined(CONFIG_MMC_DAVINCI) || defined(CONFIG_MMC_DAVINCI_MODULE)
    	&mmc0_device,
    #endif
    };
    
    static void dm644x_setup_pinmux(unsigned int id)
    {
    	switch (id) {
    	case DAVINCI_LPSC_ATA:
    		davinci_cfg_reg(DM644X_HDIREN);
    		davinci_cfg_reg(DM644X_ATAEN);
    		break;
    	case DAVINCI_LPSC_MMC_SD:
    		/* VDD power manupulations are done in U-Boot for CPMAC
    		 * so applies to MMC as well
    		 */
    		/*Set up the pull regiter for MMC */
    		davinci_writel(0, DAVINCI_VDD3P3V_PWDN);
    		davinci_cfg_reg(DM644X_MSTK);
    		break;
    	case DAVINCI_LPSC_I2C:
    		davinci_cfg_reg(DM644X_I2C);
    		break;
    	case DAVINCI_LPSC_McBSP:
    		davinci_cfg_reg(DM644X_MCBSP);
    		break;
    	case DAVINCI_LPSC_PWM0:
    		davinci_cfg_reg(DM644X_PWM0);
    		break;
    	case DAVINCI_LPSC_PWM1:
    		davinci_cfg_reg(DM644X_PWM1);
    		break;
    	case DAVINCI_LPSC_PWM2:
    		davinci_cfg_reg(DM644X_PWM2);
    		break;
    	case DAVINCI_LPSC_VLYNQ:
    		davinci_cfg_reg(DM644X_VLINQEN);
    		davinci_cfg_reg(DM644X_VLINQWD);
    		break;
    	default:
    		break;
    	}
    }
    
    static void __init
    davinci_evm_map_io(void)
    {
    	davinci_pinmux_setup = dm644x_setup_pinmux;
    	davinci_map_common_io();
    }
    
    static void __init davinci_psc_init(void)
    {
    	davinci_psc_config(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_VPSSMSTR, 1);
    	davinci_psc_config(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_VPSSSLV, 1);
     	davinci_psc_config(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_TPCC, 1);
    	davinci_psc_config(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_TPTC0, 1);
    	davinci_psc_config(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_TPTC1, 1);
    	davinci_psc_config(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_GPIO, 1);
    #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
    	davinci_psc_config(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_USB, 1);
    #endif
    
    	/* Turn on WatchDog timer LPSC.	 Needed for RESET to work */
    	davinci_psc_config(DAVINCI_GPSC_ARMDOMAIN, DAVINCI_LPSC_TIMER2, 1);
    }
    
    static __init void davinci_evm_i2c_expander_setup(void)
    {
    #if defined(CONFIG_BLK_DEV_PALMCHIP_BK3710) || \
        defined(CONFIG_BLK_DEV_PALMCHIP_BK3710_MODULE)
    	/*
    	 * ATA_SEL is 1 -> disable, 0 -> enable.
    	 * CF_SEL  is 1 -> disable, 0 -> enable.
    	 *
    	 * Ensure both are not enabled at once.
    	 */
    #ifdef CONFIG_DAVINCI_EVM_CF_SUPPORT
    	davinci_i2c_expander_op(0x3A, ATA_SEL,	1);
    	davinci_i2c_expander_op(0x3A, CF_RESET, 1);
    	davinci_i2c_expander_op(0x3A, CF_SEL,	0);
    #else
    	davinci_i2c_expander_op(0x3A, CF_SEL,	1);
    	davinci_i2c_expander_op(0x3A, ATA_SEL,	0);
    #endif
    #endif
    }
    
    static __init void davinci_evm_init(void)
    {
    	davinci_gpio_init();
    	davinci_psc_init();
    
    	board_i2c_expander_setup = davinci_evm_i2c_expander_setup;
    
    #if defined(CONFIG_BLK_DEV_PALMCHIP_BK3710) || \
        defined(CONFIG_BLK_DEV_PALMCHIP_BK3710_MODULE)
    	printk(KERN_WARNING "WARNING: both IDE and NOR flash are enabled, "
    	       "but share pins.\n\tDisable IDE for NOR support.\n");
    #endif
    #if defined(CONFIG_MTD_NAND_DAVINCI) || defined(CONFIG_MTD_NAND_DAVINCI_MODULE)
    	printk(KERN_WARNING "WARNING: both NAND and NOR flash are enabled, "
    	       "but share pins.\n\tDisable NAND for NOR support.\n");
    #endif
    
    	davinci_serial_init(&serial_device);
    	setup_mmc();
    	platform_add_devices(davinci_evm_devices,
    			     ARRAY_SIZE(davinci_evm_devices));
    }
    
    static __init void davinci_evm_irq_init(void)
    {
    	davinci_init_common_hw();
    	davinci_irq_init();
    }
    
    MACHINE_START(DAVINCI_EVM, "DaVinci EVM")
    	/* Maintainer: MontaVista Software <source@mvista.com> */
    	.phys_io      = IO_PHYS,
    	.io_pg_offst  = (io_p2v(IO_PHYS) >> 18) & 0xfffc,
    	.boot_params  = (DAVINCI_DDR_BASE + 0x100),
    	.map_io	      = davinci_evm_map_io,
    	.init_irq     = davinci_evm_irq_init,
    	.timer	      = &davinci_timer,
    	.init_machine = davinci_evm_init,
    MACHINE_END
    
    
    

  • Able to get the /dev/hda" node in Linux now ?
  • its detecting the compact flash as /dev/hda but it gives some error is shown bellow

    hda: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, ATA DISK drive
    ide0 at 0xfec661f0-0xfec661f7,0xfec663f6 on irq 22
    hda: max request size: 128KiB
    hda: 7928928 sectors (4059 MB) w/2049KiB Cache, CHS=7866/16/63, BUG DMA OFF
    hda: task_no_data_intr: status=0x51 { DriveReady SeekComplete Error }
    hda: task_no_data_intr: error=0x04 { DriveStatusError }
    ide: failed opcode was: 0xef
     hda: unknown partition table


    even i  am attaching the borad log please take a look and suggest further

    -Boot >   nand write 0x80700000 0x60000 0x200000
    
    NAND write: device 0 offset 0x60000, size 0x200000
     2097152 bytes written: OK
    U-Boot >  setenv bootcmd 'nboot 0x80700000 0 0x60000; bootm'
    U-Boot > saveenv
    Saving Environment to NAND...
    Erasing Nand...
    Erasing at 0x0 -- 100% complete.
    Writing to Nand... done
    U-Boot > DM644x_810MHz initialization passed!
    TI UBL Version: 1.50
    Booting Catalog Boot Loader
    BootMode = NAND
    Starting NAND Copy...
    Valid magicnum, 0xA1ACED66, found in block 0x00000006.
       DONE
    Jumping to entry point at 0x81080000.
    
    
    U-Boot 2009.03 (Jun 21 2010 - 16:30:08)
    
    I2C:   ready
    DRAM:  256 MB
    NAND:  NAND device: Manufacturer ID: 0xec, Chip ID: 0x36 (Samsung NAND 64MiB 1,8V 8-bit)
    64 MiB
    In:    serial
    Out:   serial
    Err:   serial
    ARM Clock: 405MHz
    DDR Clock: 189MHz
    Ethernet PHY: LXT972 @ 0x01
    Hit any key to stop autoboot:  0 
    
    Loading from NAND 64MiB 1,8V 8-bit, offset 0x60000
       Image Name:   Linux-2.6.18_pro500-davinci_evm-
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    2017252 Bytes =  1.9 MB
       Load Address: 80008000
       Entry Point:  80008000
    ## Booting kernel from Legacy Image at 80700000 ...
       Image Name:   Linux-2.6.18_pro500-davinci_evm-
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    2017252 Bytes =  1.9 MB
       Load Address: 80008000
       Entry Point:  80008000
       Verifying Checksum ... OK
       Loading Kernel Image ... OK
    OK
    
    Starting kernel ...
    
    Uncompressing Linux..................................................................................................................................... done, booting the kernel.
    Linux version 2.6.18_pro500-davinci_evm-arm_v5t_le (root@yash12) (gcc version 4.2.0 (MontaVista 4.2.0-16.0.32.0801914 2008-08-30)) #1 PREEMPT Thu Sep 1 20:12:36 IST 2016
    CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
    Machine: DaVinci EVM
    Memory policy: ECC disabled, Data cache writeback
    DaVinci DM6443 variant 0x1
    CPU0: D VIVT write-back cache
    CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
    CPU0: D cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets
    Built 1 zonelists.  Total pages: 30208
    Kernel command line: video=davincifb:vid0=0,2500K: vid1=0,2500K:osd0=720x576x16,2025K davinci_enc_mngr.ch0_output=COMPOSITE davinci_enc_mngr.ch0_mode=$(videostd) console=ttyS0,115200n8 noinitrd rw ip=192.168.1.103 root=/dev/nfs nfsroot=192.168.1.122:/public/filesys,nolock mem=118M
    PID hash table entries: 512 (order: 9, 2048 bytes)
    Clock event device timer0_0 configured with caps set: 03
    Console: colour dummy device 80x30
    Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
    Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
    Memory: 118MB = 118MB total
    Memory: 115328KB available (3457K code, 689K data, 172K init)
    Security Framework v1.0.0 initialized
    Capability LSM initialized
    Mount-cache hash table entries: 512
    CPU: Testing write buffer coherency: ok
    NET: Registered protocol family 16
    DaVinci: 71 gpio irqs
    WARNING: both IDE and NOR flash are enabled, but share pins.
    	Disable IDE for NOR support.
    ch0 default output "COMPOSITE", mode "NTSC"
    MUX: initialized LOEEN
    MUX: initialized LFLDEN
    VPBE Encoder Initialized
    LogicPD encoder initialized
    SCSI subsystem initialized
    usbcore: registered new driver usbfs
    usbcore: registered new driver hub
    NET: Registered protocol family 2
    IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
    TCP established hash table entries: 4096 (order: 2, 16384 bytes)
    TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
    TCP: Hash tables configured (established 4096 bind 2048)
    TCP reno registered
    davinci_spi_board_init: NO spi support
    VFS: Disk quotas dquot_6.5.1
    Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    squashfs: version 3.1 (2006/08/19) Phillip Lougher
    JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
    yaffs Sep  1 2016 20:15:19 Installing. 
    SGI XFS with no debug enabled
    Initializing Cryptographic API
    io scheduler noop registered
    io scheduler anticipatory registered (default)
    LTT : ltt-facilities init
    LTT : ltt-facility-core init in kernel
    davincifb davincifb: dm_osd0_fb: 720x480x16@0,0 with framebuffer size 675KB
    davincifb davincifb: dm_vid0_fb: 0x0x16@0,0 with framebuffer size 2500KB
    davincifb davincifb: dm_osd1_fb: 720x480x4@0,0 with framebuffer size 675KB
    davincifb davincifb: dm_vid1_fb: 0x0x16@0,0 with framebuffer size 1020KB
    davincifb davincifb.0: dm_osd0_fb: Failed to obtain ownership of OSD window.
    DAVINCI-WDT: DaVinci Watchdog Timer: heartbeat 60 sec
    Serial: 8250/16550 driver $Revision: 1.90 $ 2 ports, IRQ sharing disabled
    serial8250.0: ttyS0 at MMIO map 0x1c20000 mem 0xfec20000 (irq = 40) is a 16550A
    RAMDISK driver initialized: 1 RAM disks of 32768K size 1024 blocksize
    netconsole: not configured, aborting
    TI DaVinci EMAC: MAC address is 00:0e:99:02:43:b1
    TI DaVinci EMAC Linux version updated 4.0
    TI DaVinci EMAC: Installed 1 instances.
    Linux video capture interface: v2.00
    vpfe vpfe.1: DaVinci v4l2 capture driver V1.0 loaded
    Trying to register davinci display video device.
    layer=c088d600,layer->video_dev=c088d760
    Trying to register davinci display video device.
    layer=c088d400,layer->video_dev=c088d560
    davinci_init:DaVinci V4L2 Display Driver V1.0 loaded
    
     Davici AEW Driver cannot be loaded
     VIDEO PORT is not enabledData Flow path from CCDC is disabled
    
     Davinci AF driver cannot be loaded
     VIDEO PORT is not enabled 
     CCDC needs to be configured<6>i2c /dev entries driver
    Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
    ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
    MUX: initialized HDIREN
    MUX: initialized ATAEN
        ide0: MMIO-DMA , BIOS settings: hda:pio, hdb:pio
    hda: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, ATA DISK drive
    ide0 at 0xfec661f0-0xfec661f7,0xfec663f6 on irq 22
    hda: max request size: 128KiB
    hda: 7928928 sectors (4059 MB) w/2049KiB Cache, CHS=7866/16/63, BUG DMA OFF
    hda: task_no_data_intr: status=0x51 { DriveReady SeekComplete Error }
    hda: task_no_data_intr: error=0x04 { DriveStatusError }
    ide: failed opcode was: 0xef
     hda: unknown partition table
    Initializing USB Mass Storage driver...
    usbcore: registered new driver usb-storage
    USB Mass Storage support registered.
    usbcore: registered new driver usbhid
    drivers/usb/input/hid-core.c: v2.6:USB HID core driver
    musb_hdrc: version 6.0, cppi-dma, host, debug=0
    musb_hdrc musb_hdrc: No DMA interrupt line
    musb_hdrc: USB Host mode controller at c785e000 using DMA, IRQ 12
    musb_hdrc musb_hdrc: MUSB HDRC host driver
    musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
    usb usb1: configuration #1 chosen from 1 choice
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected
    mice: PS/2 mouse device common for all mice
    rtc_davinci_evm rtc_davinci_evm: rtc intf: proc
    rtc_davinci_evm rtc_davinci_evm: rtc intf: dev (254:0)
    rtc_davinci_evm rtc_davinci_evm: rtc core: registered rtc_davinci_evm as rtc0
    rtc0: hours 12-23 are misreported as duplicate hours 00-11
    davinci-mmc davinci-mmc.0: Supporting 4-bit mode
    davinci-mmc davinci-mmc.0: Using DMA mode
    Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50 2006 UTC).
    ASoC version 0.13.1
    MUX: initialized MCBSP
    AIC3X Audio Codec 0.1
    asoc: aic3x <-> davinci-i2s mapping ok
    ALSA device list:
      #0: DaVinci EVM (aic3x)
    IPv4 over IPv4 tunneling driver
    TCP bic registered
    NET: Registered protocol family 1
    NET: Registered protocol family 17
    Time: timer0_1 clocksource has been installed.
    Clock event device timer0_0 configured with caps set: 08
    Switched to high resolution mode on CPU 0
    rtc_davinci_evm rtc_davinci_evm: setting the system clock to 2004-02-01 12:16:16 (1075637776)
    IP-Config: Guessing netmask 255.255.255.0
    IP-Config: Complete:
          device=eth0, addr=192.168.1.103, mask=255.255.255.0, gw=255.255.255.255,
         host=192.168.1.103, domain=, nis-domain=(none),
         bootserver=255.255.255.255, rootserver=192.168.1.122, rootpath=
    Looking up port of RPC 100003/2 on 192.168.1.122
    Looking up port of RPC 100005/1 on 192.168.1.122
    VFS: Mounted root (nfs filesystem).
    Freeing init memory: 172K
    INIT: version 2.86 booting
    Starting the hotplug events dispatcher: udevd.
    Synthesizing the initial hotplug events...done.
    Waiting for /dev to be fully populated...done.
    Activating swap...done. 
    Remounting root filesystem...done. 
    Calculating module dependencies
    WARNING: Couldn't open directory /lib/modules/2.6.18_pro500-davinci_evm-arm_v5t_le: No such file or directory
    FATAL: Could not open /lib/modules/2.6.18_pro500-davinci_evm-arm_v5t_le/modules.dep.temp for writing: No such file or directory
    Loading modules: 
    Checking all file systems: fsck
    fsck 1.40 (29-Jun-2007)
    Mounting local filesystems: mount nothing was mounted
    umount.nfs: /dev/root: not found or not mounted
    Setting up networking ....
    /etc/network/options is deprecated.
    Setting up IP spoofing protection: rp_filter done.
    Disabling IPv4 packet forwarding: done.
    Disabling TCP/IP Explicit Congestion Notification: done.
    Starting network interfaces: done.
    Starting hotplug subsystem:
       pci     
       pci      [success]
       usb     
       usb      [success]
       isapnp  
       isapnp   [success]
       ide     
       ide      [success]
       input   
       input    [success]
       scsi    
       scsi     [success]
    done.
    Starting portmap daemon....
    Cleaning: /tmp /var/lock /var/run done.
    Updating /etc/motd...done.
    INIT: Entering runlevel: 3
    Starting system log daemon: syslogd klogd.
    Starting NFS common utilities: statd.
    Starting internet superserver: inetd.
    Starting OpenBSD Secure Shell server: sshd. 
    
    MontaVista(R) Linux(R) Professional Edition 5.0.0 (0801921)
    
    192.168.1.103 login: root
    Last login: Sun Feb  1 01:05:35 2004 on console
    Linux 192.168.1.103 2.6.18_pro500-davinci_evm-arm_v5t_le #1 PREEMPT Thu Sep 1 20:12:36 IST 2016 armv5tejl GNU/Linux
    root@192.168.1.103:~# nfs: server 192.168.1.122 not responding, still trying
    nfs: server 192.168.1.122 not responding, still trying
    ide0: unexpected interrupt, status=0x00, count=1