Philips Semiconductors
AN10476
Getting started Linux with LPC3180
source file
./linux-2.6.10/drivers/mtd/nand/lpc3180_nand_phytec.c
is quite similar with
that.
User can know their minor difference by comparing the current two files.
E.g. Add MTD partitions definitions in Linux driver
const static struct mtd_partition partition_info[] =
{
#define NUM_PARTITIONS 1
{
.name = "LPC3180 NAND PART 0",
.offset = 0x01000000,
.size = 15*1024*1024
}
};
8. SDRAM
porting
In the Phytec reference board, a Micron MT48H8M16LF 32Mbyte SDRAM is mounted.
Users may use different SDRAM with it. This section gives a guide on how to make the
necessary modification for new type SDRAM in SIBL and U-boot.
8.1 SDRAM initialization in SIBL
In the Linux staged boot process, SIBL does the SDRAM initialization before loading
images from NAND flash to SDRAM.
In the file
./sibl/sibl_startup.s
, SDRAM size and working frequency are defined:
; ------------------------------------------------------------
; Sdram init
;
TMBT_SDRAM_SZ EQU 256
; Mbit
IMPORT tmbtSdramInit
MOV r0, #(((TMBT_AHB_FREQ/13)-1)*4)
MOV r1, #(((TMBT_SDRAM_SZ/128)-1)*4)
BL
tmbtSdramInit
; ------------------------------------------------------------
The overall implementation of SDRAM initialization is in
./sibl/lpc3180_sdram.s
,
including the functions of SDRAM controller control, mode control, memory control, bus
control, etc. All of the listed registers should be initialized properly according the specific
SDRAM device user manual:
MPMCControl
MPMCConfig
MPMCAHBControl0
MPMCAHBControl2
MPMCAHBControl3
MPMCAHBControl4
MPMCDynamicConfig0
MPMCDynamicRasCas0
MPMCDynamicReadConfig
MPMCDynamictRP
MPMCDynamictRAS
MPMCDynamictSREX
MPMCDynamictWR
MPMCDynamictRC
MPMCDynamictRFC
MPMCDynamictXSR
MPMCDynamictRRD
MPMCDynamictMRD
MPMCDynamicCDLR
MPMCDynamicControl
MPMCDynamicControl
MPMCDynamicRefresh
<12NC>
© Koninklijke Philips Electronics N.V. 2004. All rights reserved.
Application note
Rev.03 — 21 Dec 2006
24 of 28