📄 lowlevel_init.s
字号:
/* * Copyright (C) 2008 Nobuhiro Iwamatsu * Copyright (C) 2008 Renesas Solutions Corp. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of * the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA */#include <config.h>#include <version.h>#include <asm/processor.h>#include <asm/macro.h> .global lowlevel_init .text .align 2lowlevel_init: /* Cache setting */ write32 CCR1_A ,CCR1_D /* ConfigurePortPins */ write16 PECRL3_A, PECRL3_D write16 PCCRL4_A, PCCRL4_D0 write16 PECRL4_A, PECRL4_D0 write16 PEIORL_A, PEIORL_D0 write16 PCIORL_A, PCIORL_D write16 PFCRH2_A, PFCRH2_D write16 PFCRH3_A, PFCRH3_D write16 PFCRH1_A, PFCRH1_D write16 PFIORH_A, PFIORH_D write16 PECRL1_A, PECRL1_D0 write16 PEIORL_A, PEIORL_D1 /* Configure Operating Frequency */ write16 WTCSR_A, WTCSR_D0 write16 WTCSR_A, WTCSR_D1 write16 WTCNT_A, WTCNT_D /* Set clock mode*/ write16 FRQCR_A, FRQCR_D /* Configure Bus And Memory */init_bsc_cs0: write16 PCCRL4_A, PCCRL4_D1 write16 PECRL1_A, PECRL1_D1 write32 CMNCR_A, CMNCR_D write32 SC0BCR_A, SC0BCR_D write32 CS0WCR_A, CS0WCR_Dinit_bsc_cs1: write16 PECRL4_A, PECRL4_D1 write32 CS1WCR_A, CS1WCR_Dinit_sdram: write16 PCCRL2_A, PCCRL2_D write16 PCCRL4_A, PCCRL4_D2 write16 PCCRL1_A, PCCRL1_D write16 PCCRL3_A, PCCRL3_D write32 CS3BCR_A, CS3BCR_D write32 CS3WCR_A, CS3WCR_D write32 SDCR_A, SDCR_D write32 RTCOR_A, RTCOR_D write32 RTCSR_A, RTCSR_D /* wait 200us */ mov.l REPEAT_D, r3 mov #0, r2repeat0: add #1, r2 cmp/hs r3, r2 bf repeat0 nop mov.l SDRAM_MODE, r1 mov #0, r0 mov.l r0, @r1 nop rts .align 4CCR1_A: .long CCR1CCR1_D: .long 0x0000090BPCCRL4_A: .long 0xFFFE3910PCCRL4_D0: .long 0x00000000PECRL4_A: .long 0xFFFE3A10PECRL4_D0: .long 0x00000000PECRL3_A: .long 0xFFFE3A12PECRL3_D: .long 0x00000000PEIORL_A: .long 0xFFFE3A06PEIORL_D0: .long 0x00001C00PEIORL_D1: .long 0x00001C02PCIORL_A: .long 0xFFFE3906PCIORL_D: .long 0x00004000PFCRH2_A: .long 0xFFFE3A8CPFCRH2_D: .long 0x00000000PFCRH3_A: .long 0xFFFE3A8APFCRH3_D: .long 0x00000000PFCRH1_A: .long 0xFFFE3A8EPFCRH1_D: .long 0x00000000PFIORH_A: .long 0xFFFE3A84PFIORH_D: .long 0x00000729PECRL1_A: .long 0xFFFE3A16PECRL1_D0: .long 0x00000033WTCSR_A: .long 0xFFFE0000WTCSR_D0: .long 0x0000A518WTCSR_D1: .long 0x0000A51DWTCNT_A: .long 0xFFFE0002WTCNT_D: .long 0x00005A84FRQCR_A: .long 0xFFFE0010FRQCR_D: .long 0x00000104PCCRL4_D1: .long 0x00000010PECRL1_D1: .long 0x00000133CMNCR_A: .long 0xFFFC0000CMNCR_D: .long 0x00001810SC0BCR_A: .long 0xFFFC0004SC0BCR_D: .long 0x10000400CS0WCR_A: .long 0xFFFC0028CS0WCR_D: .long 0x00000B41PECRL4_D1: .long 0x00000100CS1WCR_A: .long 0xFFFC002CCS1WCR_D: .long 0x00000B01PCCRL4_D2: .long 0x00000011PCCRL3_A: .long 0xFFFE3912PCCRL3_D: .long 0x00000011PCCRL2_A: .long 0xFFFE3914PCCRL2_D: .long 0x00001111PCCRL1_A: .long 0xFFFE3916PCCRL1_D: .long 0x00001010PDCRL4_A: .long 0xFFFE3990PDCRL4_D: .long 0x00000011PDCRL3_A: .long 0xFFFE3992PDCRL3_D: .long 0x00000011PDCRL2_A: .long 0xFFFE3994PDCRL2_D: .long 0x00001111PDCRL1_A: .long 0xFFFE3996PDCRL1_D: .long 0x00001000CS3BCR_A: .long 0xFFFC0010CS3BCR_D: .long 0x00004400CS3WCR_A: .long 0xFFFC0034CS3WCR_D: .long 0x00002892SDCR_A: .long 0xFFFC004CSDCR_D: .long 0x00000809RTCOR_A: .long 0xFFFC0058RTCOR_D: .long 0xA55A0041RTCSR_A: .long 0xFFFC0050RTCSR_D: .long 0xa55a0010STBCR3_A: .long 0xFFFE0408STBCR3_D: .long 0x00000000STBCR4_A: .long 0xFFFE040CSTBCR4_D: .long 0x00000008STBCR5_A: .long 0xFFFE0410STBCR5_D: .long 0x00000000STBCR6_A: .long 0xFFFE0414STBCR6_D: .long 0x00000002SDRAM_MODE: .long 0xFFFC5040REPEAT_D: .long 0x00009C40
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -