We use Appro DM8127 IPNC RDK 3.8.0 in our project, the default configure is 512MB DDR3,with two EMIF(EMIF0 and EMIF1),each is 256MB.
Now,we want to change to only use EMIF0 with 256MB DDR3. I try to change memory map 256M(single EMIF) as follows:
1、Not use Bank #2 in ti8148_ipnc.h
/**
* Physical Memory Map
*/
#define CONFIG_NR_DRAM_BANKS 1 /* we have 2 banks of DRAM */
#define PHYS_DRAM_1 0x80000000 /* DRAM Bank #1 */
#define PHYS_DRAM_1_SIZE 0x10000000 /* 256 MB */
//#define PHYS_DRAM_2 0xB0000000 /* DRAM Bank #2 */
//#define PHYS_DRAM_2_SIZE 0x10000000 /* 256 MB */
2、change LISA register
/*
* Program the PG2.1 DMM to Access EMIF0
* 256MB sections with not interleaving
*/
__raw_writel(0x0, DMM_LISA_MAP__0);
__raw_writel(0x0, DMM_LISA_MAP__1);
__raw_writel(0x0, DMM_LISA_MAP__2);
__raw_writel(0x80400100, DMM_LISA_MAP__3);
3、change the env bootargs:
setenv bootargs 'console=ttyO0,115200n8 rootwait=1 rw ubi.mtd=4,2048 rootfstype=ubifs root=ubi0:rootfs init=/init mem=54M vram=4M notifyk.vpssm3_sva=0x8F900000 ip=${ipaddr}:${serverip}:${gateway}:${subnet}::eth0:off ethaddr=${ethaddr} cmemk.phys_start=0x83600000 cmemk.phys_end=0x85600000 cmemk.allowOverlap=1 earlyprintk';saveenv
4、Boot log as below:
U-Boot 2010.06 (Jul 17 2014 - 12:06:02) DM8127_IPNC_3.80.00
TI8148-GP rev 2.1
ARM clk: 1000MHz
DDR clk: 533MHz
L3 clk: 200MHz
IVA clk: 480MHz
ISS clk: 560MHz
DSP Default OFF
DSS Default OFF
DRAM: 256 MiB
DCACHE: Off
NAND: HW ECC BCH8 Selected
256 MiB
Using default environment
The 2nd stage U-Boot will now be auto-loaded
Please do not interrupt the countdown till TI8148_EVM prompt if 2nd stage is already flashed
Hit any key to stop autoboot: 0
NAND read: device 0 offset 0x20000, size 0x40000
262144 bytes read: OK
## Starting application at 0x81000000 ...
U-Boot 2010.06 (Jul 17 2014 - 12:06:49) DM8127_IPNC_3.80.00
TI8148-GP rev 2.1
ARM clk: 1000MHz
DDR clk: 533MHz
L3 clk: 200MHz
IVA clk: 480MHz
ISS clk: 560MHz
DSP Default OFF
DSS Default OFF
I2C: ready
DRAM: 256 MiB
DCACHE: On
NAND: HW ECC BCH8 Selected
256 MiB
MMC: OMAP SD/MMC: 0, ON-BOARD SDIO: 1
Date: 2012-11-09 (Friday) Time: 13:46:45
Net: Detected MACID:84:7e:40:85:d:32
cpsw
Hit any key to stop autoboot: 0
Loading from nand0, offset 0x280000
Image Name: Linux-2.6.37_DM8127_IPNC_3.80.00
Created: 2014-07-17 19:15:31 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2493632 Bytes = 2.4 MiB
Load Address: 80008000
Entry Point: 80008000
## Booting kernel from Legacy Image at 81000000 ...
Image Name: Linux-2.6.37_DM8127_IPNC_3.80.00
Created: 2014-07-17 19:15:31 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2493632 Bytes = 2.4 MiB
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.37_DM8127_IPNC_3.80.00 (root@ubuntu) (gcc version 4.5.3 20110311 (prerelease) (GCC) ) #8 Thu Jul 17 12:15:25 PDT 2014
CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: ti8148ipnc
vram size = 4194304 at 0x0
bootconsole [earlycon0] enabled
ti81xx_reserve: ### Reserved DDR region @83500000
reserved size = 4194304 at 0x0
FB: Reserving 4194304 bytes SDRAM for VRAM
Memory policy: ECC disabled, Data cache writeback
OMAP chip is TI8148 2.1
SRAM: Mapped pa 0x402f1000 to va 0xfe400000 size: 0xf000
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 12436
Kernel command line: console=ttyO0,115200n8 rootwait=1 rw ubi.mtd=4,2048 rootfstype=ubifs root=ubi0:rootfs init=/init mem=54M vram=4M notifyk.vpssm3_sva=0x8F900000 ip=${ipaddr}:${serverip}:${gateway}:${subnet}::eth0:off ethaddr=${ethaddr} cmemk.phys_start=0x83600000 cmemk.phys_end=0x85600000 cmemk.allowOverlap=1 earlyprintk
cpsw: kernel boot params Ethernet address: ddr=${ethaddr}
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 48MB 1MB = 49MB total
Memory: 44276k/44276k available, 11020k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xffc00000 - 0xffe00000 ( 2 MB)
vmalloc : 0xc3800000 - 0xf8000000 ( 840 MB)
lowmem : 0xc0000000 - 0xc3600000 ( 54 MB)
pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
.init : 0xc0008000 - 0xc003e000 ( 216 kB)
.text : 0xc003e000 - 0xc04bf000 (4612 kB)
.data : 0xc04c0000 - 0xc05005c0 ( 258 kB)
SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS:375
IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
Total of 128 interrupts on 1 active controller
GPMC revision 6.0
Trying to install interrupt handler for IRQ368
Trying to install interrupt handler for IRQ369
Trying to install interrupt handler for IRQ370
Trying to install interrupt handler for IRQ371
Trying to install interrupt handler for IRQ372
Trying to install interrupt handler for IRQ373
Trying to install interrupt handler for IRQ374
Trying to install type control for IRQ375
Trying to set irq flags for IRQ375
OMAP clockevent source: GPTIMER1 at 20000000 Hz
Console: colour dummy device 80x30
Calibrating delay loop... 999.42 BogoMIPS (lpj=4997120)
pid_max: default: 32768 minimum: 301
Security Framework initialized
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
devtmpfs: initialized
TI81XX: Map 0x83500000 to 0xfe500000 for dram barrier
TI81XX: Map 0x40300000 to 0xfe600000 for sram barrier
omap_voltage_early_init: voltage driver support not added
regulator: core version 0.5
regulator: dummy:
NET: Registered protocol family 16
omap_voltage_domain_lookup: Voltage driver init not yet happened.Faulting!
omap_voltage_add_dev: VDD specified does not exist!
OMAP GPIO hardware version 0.1
OMAP GPIO hardware version 0.1
OMAP GPIO hardware version 0.1
OMAP GPIO hardware version 0.1
omap_mux_init: Add partition: #1: core, flags: 4
_omap_mux_init_gpio: Could not set gpio79
_omap_mux_init_gpio: Could not set gpio80
Cannot clk_get ck_32
Debugfs: Only enabling/disabling deep sleep and wakeup timer is supported now
registered ti81xx_vpss device
registered ti81xx_vidout device
registered ti81xx on-chip HDMI device
registered ti81xx_fb device
PWM0 init success.
PWM1 init success.
bio: create slab <bio-0> at 0
SCSI subsystem initialized
USBSS revision 4ea2080b
registerd cppi-dma Intr @ IRQ 17
Cppi41 Init Done
omap_i2c omap_i2c.1: bus 1 rev4.0 at 100 kHz
regulator: VRTC: 1800 mV
regulator: VIO: 1500 mV
regulator: VDD1: 600 <--> 1500 mV at 1350 mV
regulator: VDD2: 600 <--> 1500 mV at 1350 mV
regulator: VDDCTRL: 600 <--> 1400 mV at 1350 mV
regulator: LDO1: 1100 <--> 3300 mV at 1800 mV
regulator: LDO2: 1100 <--> 3300 mV at 1800 mV
regulator: LDO3: 1100 <--> 3300 mV at 3300 mV
regulator: LDO4: 1100 <--> 3300 mV at 1800 mV
regulator: LDO5: 1100 <--> 3300 mV at 3300 mV
regulator: LDO6: 1100 <--> 3300 mV at 3300 mV
regulator: LDO7: 1100 <--> 3300 mV at 3300 mV
regulator: LDO8: 1100 <--> 3300 mV at 1800 mV
tps65911-rtc tps65911-rtc: rtc core: registered tps65911-rtc as rtc0
tps65910 1-002d: No interrupt support, no core IRQ
Advanced Linux Sound Architecture Driver Version 1.0.23.
Switching to clocksource gp timer
musb-hdrc: version 6.0, peripheral, debug=0
musb-hdrc musb-hdrc.0: dma type: dma-cppi41
MUSB controller-0 revision 4ea20800
usb2phy: computed values rxcalib(15)DACs(38 14 15)
usb2phy: override computed values rxcalib(15)DACs(38 14 15)
usb2phy_config: musb(0) rxcalib done, rxcalib read value 6f735d7e
musb-hdrc musb-hdrc.0: USB Peripheral mode controller at c381e000 using DMA, IRQ 18
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
NetWinder Floating Point Emulator V0.97 (double precision)
PMU: registered new PMU device of type 0
omap-iommu omap-iommu.0: ducati registered
omap-iommu omap-iommu.1: sys registered
JFFS2 version 2.2. (NAND) ? 2001-2006 Red Hat, Inc.
msgmni has been set to 86
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
CMEMK module: built on Jul 17 2014 at 12:07:58
Reference Linux version 2.6.37
File /usr/local/yourapp/Source/ti_tools/linuxutils_3_23_00_01/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
allocated heap buffer 0xc5000000 of size 0x2000000
cmemk initialized
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
omap_uart.0: ttyO0 at MMIO 0x48020000 (irq = 72) is a OMAP UART0
console [ttyO0] enabled, bootconsole disabled
console [ttyO0] enabled, bootconsole disabled
omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
brd: module loaded
loop: module loaded
omap2-nand driver initializing
ONFI param page 0 valid
ONFI flash detected
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xca (Micron NAND 256MiB 3,3V 16-bit)
omap2-nand: detected x16 NAND flash
Creating 8 MTD partitions on "omap2-nand.0":
0x000000000000-0x000000020000 : "U-Boot-min"
0x000000020000-0x000000260000 : "U-Boot"
0x000000260000-0x000000280000 : "U-Boot Env"
0x000000280000-0x0000006c0000 : "Kernel"
0x0000006c0000-0x000006fc0000 : "File System"
0x000006fc0000-0x000007bc0000 : "Data"
0x000007bc0000-0x00000b0c0000 : "File System2"
0x00000b0c0000-0x000010000000 : "Reserved"
UBI: attaching mtd4 to ubi0
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 126976 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 2048 (aligned 2048)
UBI: data offset: 4096
UBI: max. sequence number: 114
UBI: attached mtd4 to ubi0
UBI: MTD device name: "File System"
UBI: MTD device size: 105 MiB
UBI: number of good PEBs: 840
UBI: number of bad PEBs: 0
UBI: number of corrupted PEBs: 0
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 1
UBI: available PEBs: 0
UBI: total number of reserved PEBs: 840
UBI: number of PEBs reserved for bad PEB handling: 8
UBI: max/mean erase counter: 2/0
UBI: image sequence number: 302596095
UBI: background thread "ubi_bgt0d" started, PID 44
davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
davinci_mdio davinci_mdio.0: detected phy mask fffffffe
davinci_mdio.0: probed
davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver unknown
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
Linux video capture interface: v2.00
OMAP Watchdog Timer Rev 0x00: initial timeout 60 sec
notify_init : notify drivercreated for remote proc id 2 at physical Address 0x8f900000
cm: Module associated with clock hdmi_i2s_fck didn't enable in 100000 tries
asoc: tlv320aic3x-hifi <-> davinci-mcasp.2 mapping ok
asoc: HDMI-DAI-CODEC <-> hdmi-dai mapping ok
ALSA device list:
#0: TI8148 IPNC
nf_conntrack version 0.5.0 (691 buckets, 2764 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
NET: Registered protocol family 17
Bridge firewalling registered
lib80211: common routines for IEEE802.11 drivers
Registering the dns_resolver key type
VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
omap_voltage_late_init: Voltage driver support not added
Power Management for TI81XX.
Random MACID=2e:96:f9:a2:9c:17
tps65911-rtc tps65911-rtc: setting system clock to 2012-11-09 13:46:51 UTC (1352468811)
CPSW phy found : id is : 0x4dd074
PHY 0:01 not found
IP-Config: Unable to set interface netmask (-22).
UBIFS: recovery needed
UBIFS: recovery completed
UBIFS: mounted UBI device 0, volume 0, name "rootfs"
UBIFS: file system size: 103612416 bytes (101184 KiB, 98 MiB, 816 LEBs)
UBIFS: journal size: 9023488 bytes (8812 KiB, 8 MiB, 72 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root: 0 bytes (0 KiB)
VFS: Mounted root (ubifs filesystem) on device 0:13.
devtmpfs: mounted
Freeing init memory: 216K
Failed to execute /init. Attempting defaults...
INIT: version 2.86 booting
Please wait: booting...
Starting udev
PHY: 0:00 - Link is Up - 100/Full
Root filesystem already rw, not remounting
Caching udev devnodes
modprobe: FATAL: Module index: unexpected error: EOF
Try re-running depmod
modprobe: FATAL: Module index: unexpected error: EOF
Try re-running depmod
modprobe: FATAL: Module index: unexpected error: EOF
Try re-running depmod
root: mount: mounting /dev/root on / failed: No such file or directory
Configuring network interfaces... udhcpc (v1.13.2) started
Sending discover...
Sending discover...
Sending discover...
No lease, forking to background
done.
Setting up IP spoofing protection: rp_filter.
rm: cannot remove '/tmp': Device or resource busy
sh: (another: unknown operand
/etc/init.d/rc: line 172: /etc/rcS.d/S99finish: not found
inside finish.sh
UBI: attaching mtd5 to ubi1
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 126976 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 2048 (aligned 2048)
UBI: data offset: 4096
UBI: max. sequence number: 15
UBI: attached mtd5 to ubi1
UBI: MTD device name: "Data"
UBI: MTD device size: 12 MiB
UBI: number of good PEBs: 96
UBI: number of bad PEBs: 0
UBI: number of corrupted PEBs: 0
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 1
UBI: available PEBs: 0
UBI: total number of reserved PEBs: 96
UBI: number of PEBs reserved for bad PEB handling: 2
UBI: max/mean erase counter: 2/1
UBI: image sequence number: -1812316634
UBI: background thread "ubi_bgt1d" started, PID 286
UBI device number 1, total 96 LEBs (12189696 bytes, 11.6 MiB), available 0 LEBs (0 bytes), LEB size 126976 bytes (124.0 KiB)
UBIFS: recovery needed
UBIFS: recovery completed
UBIFS: mounted UBI device 1, volume 0, name "ubifs_volume"
UBIFS: file system size: 10285056 bytes (10044 KiB, 9 MiB, 81 LEBs)
UBIFS: journal size: 1015809 bytes (992 KiB, 0 MiB, 6 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root: 485787 bytes (474 KiB)
UBI: attaching mtd7 to ubi2
UBI: physical eraseblock size: 131072 bytes (128 KiB)
UBI: logical eraseblock size: 126976 bytes
UBI: smallest flash I/O unit: 2048
UBI: sub-page size: 512
UBI: VID header offset: 2048 (aligned 2048)
UBI: data offset: 4096
UBI: max. sequence number: 13
UBI: attached mtd7 to ubi2
UBI: MTD device name: "Reserved"
UBI: MTD device size: 79 MiB
UBI: number of good PEBs: 634
UBI: number of bad PEBs: 0
UBI: number of corrupted PEBs: 0
UBI: max. allowed volumes: 128
UBI: wear-leveling threshold: 4096
UBI: number of internal volumes: 1
UBI: number of user volumes: 1
UBI: available PEBs: 0
UBI: total number of reserved PEBs: 634
UBI: number of PEBs reserved for bad PEB handling: 6
UBI: max/mean erase counter: 41/39
UBI: image sequence number: 424907308
UBI: background thread "ubi_bgt2d" started, PID 299
UBI device number 2, total 634 LEBs (80502784 bytes, 76.8 MiB), available 0 LEBs (0 bytes), LEB size 126976 bytes (124.0 KiB)
UBIFS: recovery needed
UBIFS: recovery completed
UBIFS: mounted UBI device 2, volume 0, name "ubifs_volume"
UBIFS: file system size: 78090240 bytes (76260 KiB, 74 MiB, 615 LEBs)
UBIFS: journal size: 3936256 bytes (3844 KiB, 3 MiB, 31 LEBs)
UBIFS: media format: w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root: 3688395 bytes (3601 KiB)
numid=1,iface=MIXER,name='PCM Playback Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=127,step=0
: values=127,127
| dBscale-min=-63.50dB,step=0.50dB,mute=0
Unhandled fault: external abort on non-linefetch (0x1818) at 0x40084004
SysLink version : 2.21.02.10
SysLink module created on Date:Jul 17 2014 Time:12:16:41
Trace enabled
Trace SetFailureReason enabled
/dev/mem opened.
Phy Addr : 0x48181560 Data : 0x00000002
secss put in low power state
Phy Addr : 0x48180f10 Data : 0x00000000
Phy Addr : 0x48180508 Data : 0x00000302
Phy Addr : 0x48180520 Data : 0x00000002
Phy Addr : 0x48180524 Data : 0x00000002
Phy Addr : 0x48180528 Data : 0x00000002
Phy Addr : 0x4c0000e4 Data : 0x00170208
Phy Addr : 0x4d0000e4 Data : 0x00000000
Phy Addr : 0x4c0000e4 Data : 0x00170208
Phy Addr : 0x4d0000e4 Data : 0x00100000
DDR IOs RX is shutdown
Phy Addr : 0x48180a04 Data : 0x00000000
[host] Setting DMM priority for [ISS ] to [0] ( 0x4e000634 = 0x00080000 )
[host] Setting L3 bandwidth regulator for [ISS ] to [press=[3,3] BW=400, WM Cycles=2500]
[host] Attached to slave procId 2.
[host] Setting DMM pri
Qustion:How can I change Memory map for 256M(only use EMIF0) with DM8127 ?