⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pcmciasupport.cod

📁 Ep93XX TionProV2 BSP
💻 COD
📖 第 1 页 / 共 3 页
字号:
; Listing generated by Microsoft (R) Optimizing Compiler Version 13.10.4237 

	TTL	C:\WINCE500\PLATFORM\Ep93xx\Src\Bootloader\Common\.\pcmciasupport.c
	CODE32

  00000			 AREA	 |.drectve|, DRECTVE
	DCB	"-defaultlib:coredll.lib "
	DCB	"-defaultlib:corelibc.lib "


  00000			 AREA	 |.bss|, NOINIT
|Vcc|	%	0x1
|Vpp1|	%	0x1
|Vpp2|	%	0x1

  00000			 AREA	 |.rdata|, DATA, READONLY
|EdbgVendorIds| DCW 0x0
	DCW	0x0
	DCD	0x4033
	DCB	0x1
	DCB	0x0
	DCB	"AD", 0x0
	%	3
	DCW	0x1050
	DCW	0x940
	DCD	0x4005
	DCB	0x1
	DCB	0x0
	DCB	"LS", 0x0
	%	3
	DCW	0x1050
	DCW	0x940
	DCD	0x2078
	DCB	0x1
	DCB	0x0
	DCB	"LS", 0x0
	%	3
	DCW	0x10ec
	DCW	0x8029
	DCD	0xc0f0
	DCB	0x1
	DCB	0x0
	DCB	"KS", 0x0
	%	3
	DCW	0x10ec
	DCW	0x8129
	DCD	0x0
	DCB	0x4
	DCB	0x0
	DCB	"RT", 0x0
	%	3
	DCW	0x10ec
	DCW	0x8139
	DCD	0x900b
	DCB	0x4
	DCB	0x0
	DCB	"RT", 0x0
	%	3
	DCW	0x10ec
	DCW	0x8139
	DCD	0xd0c9
	DCB	0x4
	DCB	0x0
	DCB	"RT", 0x0
	%	3
	DCW	0x10ec
	DCW	0x8139
	DCD	0xe04c
	DCB	0x4
	DCB	0x0
	DCB	"RT", 0x0
	%	3
	DCW	0x1186
	DCW	0x1300
	DCD	0x50ba
	DCB	0x4
	DCB	0x0
	DCB	"DL", 0x0
	%	3
	DCW	0x100b
	DCW	0x20
	DCD	0xa0cc
	DCB	0x5
	DCB	0x0
	DCB	"NG", 0x0
	%	3
	DCW	0x10b7
	DCW	0x9050
	DCD	0x6008
	DCB	0x6
	DCB	0x0
	DCB	"3C", 0x0
	%	3
	DCW	0x10b7
	DCW	0x9200
	DCD	0x476
	DCB	0x6
	DCB	0x0
	DCB	"3C", 0x0
	%	3
	DCW	0x8086
	DCW	0x1039
	DCD	0x4033
	DCB	0x7
	DCB	0x1
	DCB	"IN", 0x0
	%	3
	DCW	0x8086
	DCW	0x103a
	DCD	0x4033
	DCB	0x7
	DCB	0x1
	DCB	"IN", 0x0
	%	3
	DCW	0x8086
	DCW	0x1051
	DCD	0x4033
	DCB	0x7
	DCB	0x1
	DCB	"IN", 0x0
	%	3
	DCW	0x8086
	DCW	0x1229
	DCD	0x4033
	DCB	0x7
	DCB	0x1
	DCB	"IN", 0x0
	%	3
	DCW	0x8086
	DCW	0x2449
	DCD	0x4033
	DCB	0x7
	DCB	0x1
	DCB	"IN", 0x0
	%	3
	EXPORT	|READ_PORT_UCHAR|
; File c:\wince500\platform\ep93xx\src\bootloader\common\pcmciasupport.c

  00000			 AREA	 |.text| { |READ_PORT_UCHAR| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$READ_PORT_UCHAR|, PDATA, SELECTION=5, ASSOC=|.text| { |READ_PORT_UCHAR| } ; comdat associative
|$T38213| DCD	|$L38212|
	DCD	0x40000b04
; Function compile flags: /Ods

  00000			 AREA	 |.text| { |READ_PORT_UCHAR| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |READ_PORT_UCHAR| PROC

; 60   : {

  00000		 |$L38212|
  00000	e1a0c00d	 mov         r12, sp
  00004	e92d0001	 stmdb       sp!, {r0}
  00008	e92d5000	 stmdb       sp!, {r12, lr}
  0000c	e24dd004	 sub         sp, sp, #4
  00010		 |$M38210|

; 61   : 	return  * pAddr;

  00010	e59d300c	 ldr         r3, [sp, #0xC]
  00014	e5d33000	 ldrb        r3, [r3]
  00018	e5cd3000	 strb        r3, [sp]
  0001c	e5dd0000	 ldrb        r0, [sp]

; 62   : }

  00020	e28dd004	 add         sp, sp, #4
  00024	e89d6000	 ldmia       sp, {sp, lr}
  00028	e12fff1e	 bx          lr
  0002c		 |$M38211|

			 ENDP  ; |READ_PORT_UCHAR|

	EXPORT	|WRITE_PORT_UCHAR|

  00000			 AREA	 |.text| { |WRITE_PORT_UCHAR| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$WRITE_PORT_UCHAR|, PDATA, SELECTION=5, ASSOC=|.text| { |WRITE_PORT_UCHAR| } ; comdat associative
|$T38220| DCD	|$L38219|
	DCD	0x40000803
; Function compile flags: /Ods

  00000			 AREA	 |.text| { |WRITE_PORT_UCHAR| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |WRITE_PORT_UCHAR| PROC

; 64   : {

  00000		 |$L38219|
  00000	e1a0c00d	 mov         r12, sp
  00004	e92d0003	 stmdb       sp!, {r0, r1}
  00008	e92d5000	 stmdb       sp!, {r12, lr}
  0000c		 |$M38217|

; 65   : 	*pAddr= ucData;

  0000c	e5dd200c	 ldrb        r2, [sp, #0xC]
  00010	e59d3008	 ldr         r3, [sp, #8]
  00014	e5c32000	 strb        r2, [r3]

; 66   : }

  00018	e89d6000	 ldmia       sp, {sp, lr}
  0001c	e12fff1e	 bx          lr
  00020		 |$M38218|

			 ENDP  ; |WRITE_PORT_UCHAR|

	EXPORT	|READ_PORT_USHORT|

  00000			 AREA	 |.text| { |READ_PORT_USHORT| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$READ_PORT_USHORT|, PDATA, SELECTION=5, ASSOC=|.text| { |READ_PORT_USHORT| } ; comdat associative
|$T38228| DCD	|$L38227|
	DCD	0x40000b04
; Function compile flags: /Ods

  00000			 AREA	 |.text| { |READ_PORT_USHORT| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |READ_PORT_USHORT| PROC

; 70   : {

  00000		 |$L38227|
  00000	e1a0c00d	 mov         r12, sp
  00004	e92d0001	 stmdb       sp!, {r0}
  00008	e92d5000	 stmdb       sp!, {r12, lr}
  0000c	e24dd004	 sub         sp, sp, #4
  00010		 |$M38225|

; 71   : 	return  * pAddr;

  00010	e59d300c	 ldr         r3, [sp, #0xC]
  00014	e1d330b0	 ldrh        r3, [r3]
  00018	e1cd30b0	 strh        r3, [sp]
  0001c	e1dd00b0	 ldrh        r0, [sp]

; 72   : }

  00020	e28dd004	 add         sp, sp, #4
  00024	e89d6000	 ldmia       sp, {sp, lr}
  00028	e12fff1e	 bx          lr
  0002c		 |$M38226|

			 ENDP  ; |READ_PORT_USHORT|

	EXPORT	|WRITE_PORT_USHORT|

  00000			 AREA	 |.text| { |WRITE_PORT_USHORT| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$WRITE_PORT_USHORT|, PDATA, SELECTION=5, ASSOC=|.text| { |WRITE_PORT_USHORT| } ; comdat associative
|$T38235| DCD	|$L38234|
	DCD	0x40000803
; Function compile flags: /Ods

  00000			 AREA	 |.text| { |WRITE_PORT_USHORT| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |WRITE_PORT_USHORT| PROC

; 75   : {

  00000		 |$L38234|
  00000	e1a0c00d	 mov         r12, sp
  00004	e92d0003	 stmdb       sp!, {r0, r1}
  00008	e92d5000	 stmdb       sp!, {r12, lr}
  0000c		 |$M38232|

; 76   : 	*pAddr= usData;

  0000c	e1dd20bc	 ldrh        r2, [sp, #0xC]
  00010	e59d3008	 ldr         r3, [sp, #8]
  00014	e1c320b0	 strh        r2, [r3]

; 77   : }

  00018	e89d6000	 ldmia       sp, {sp, lr}
  0001c	e12fff1e	 bx          lr
  00020		 |$M38233|

			 ENDP  ; |WRITE_PORT_USHORT|

	EXPORT	|OEMPCMCIAInitialize|
	IMPORT	|DelayInMsec|

  00000			 AREA	 |.text| { |OEMPCMCIAInitialize| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000			 AREA	 |.pdata$$OEMPCMCIAInitialize|, PDATA, SELECTION=5, ASSOC=|.text| { |OEMPCMCIAInitialize| } ; comdat associative
|$T38243| DCD	|$L38242|
	DCD	0x40006102
; Function compile flags: /Ods

  00000			 AREA	 |.text| { |OEMPCMCIAInitialize| }, CODE, ARM, SELECTION=1 ; comdat noduplicate

  00000		 |OEMPCMCIAInitialize| PROC

; 450  : {

  00000		 |$L38242|
  00000	e52de004	 str         lr, [sp, #-4]!
  00004	e24dd01c	 sub         sp, sp, #0x1C
  00008		 |$M38240|

; 451  :     int iVolts;
; 452  :     int iReturnValue = 1;

  00008	e3a03001	 mov         r3, #1
  0000c	e58d3000	 str         r3, [sp]

; 453  :     //
; 454  :     // All other GPIO pins except WP..
; 455  :     //
; 456  :     *GPIO_PFDDR = GPIOF_PCMCIA_WP;

  00010	e59f2168	 ldr         r2, [pc, #0x168]
  00014	e3a03001	 mov         r3, #1
  00018	e5823000	 str         r3, [r2]

; 457  :     *GPIO_PFDR  = 0;        

  0001c	e59f2158	 ldr         r2, [pc, #0x158]
  00020	e3a03000	 mov         r3, #0
  00024	e5823000	 str         r3, [r2]

; 458  : 
; 459  : 
; 460  :     //
; 461  :     // Temporarily disable all PCMCIA interrupts.
; 462  :     //
; 463  :     *GPIO_INTENF    = 0;

  00028	e59f213c	 ldr         r2, [pc, #0x13C]
  0002c	e3a03000	 mov         r3, #0
  00030	e5823000	 str         r3, [r2]

; 464  : 
; 465  :     //
; 466  :     // Acknowlege any pending edge triggered PCMCIA interrupts.
; 467  :     //
; 468  :     *GPIO_FEOI      = 0xFF;

  00034	e59f213c	 ldr         r2, [pc, #0x13C]
  00038	e3a030ff	 mov         r3, #0xFF
  0003c	e5823000	 str         r3, [r2]

; 469  :     
; 470  :     //
; 471  :     // We want to make the  GPIOF_PCMCIA_IRQ pin level triggered.
; 472  :     // We don't care about any of the other bits in the register.
; 473  :     //
; 474  :     *GPIO_FINTTYPE1 = 0;

  00040	e59f212c	 ldr         r2, [pc, #0x12C]
  00044	e3a03000	 mov         r3, #0
  00048	e5823000	 str         r3, [r2]

; 475  :     
; 476  :     //
; 477  :     // We want the GPIOF_PCMCIA to be triggered high.
; 478  :     //
; 479  :     //*GPIO_FINTTYPE2  = GPIOF_PCMCIA_IRQ;
; 480  : 
; 481  :     //
; 482  :     // We want the GPIOF_PCMCIA to be triggered low.
; 483  :     //
; 484  :     *GPIO_FINTTYPE2 = 0;

  0004c	e59f211c	 ldr         r2, [pc, #0x11C]
  00050	e3a03000	 mov         r3, #0
  00054	e5823000	 str         r3, [r2]

; 485  :     
; 486  :     //
; 487  :     // Enable the interrupt.
; 488  :     //
; 489  :     *GPIO_INTENF    = GPIOF_PCMCIA_IRQ;

  00058	e59f210c	 ldr         r2, [pc, #0x10C]
  0005c	e3a03040	 mov         r3, #0x40
  00060	e5823000	 str         r3, [r2]

; 490  : 
; 491  :     //
; 492  :     // Detect the correct voltages.
; 493  :     //
; 494  :     iVolts = detectVolts();

  00064	eb000000	 bl          detectVolts
  00068	e58d000c	 str         r0, [sp, #0xC]
  0006c	e59d300c	 ldr         r3, [sp, #0xC]
  00070	e58d3004	 str         r3, [sp, #4]

; 495  : 
; 496  :     //
; 497  :     // Program the voltage to the PCMCIA card.
; 498  :     // 
; 499  :     if(iVolts )

  00074	e59d3004	 ldr         r3, [sp, #4]
  00078	e3530000	 cmp         r3, #0
  0007c	0a00002e	 beq         |$L38166|

; 500  :     {
; 501  :         PowerPCCardWrite
; 502  :         (
; 503  :             iVolts,
; 504  :             0,
; 505  :             0
; 506  :         );

  00080	e3a02000	 mov         r2, #0
  00084	e3a01000	 mov         r1, #0
  00088	e59d3004	 ldr         r3, [sp, #4]
  0008c	e20300ff	 and         r0, r3, #0xFF
  00090	eb000000	 bl          PowerPCCardWrite

; 507  : 
; 508  :         //
; 509  :         // Set the enable and reset lines.
; 510  :         //   
; 511  :         *SMC_PCCONT |= PCCONT_PC1EN | PCCONT_PC1RST;

  00094	e59f30cc	 ldr         r3, [pc, #0xCC]
  00098	e5933000	 ldr         r3, [r3]
  0009c	e3832005	 orr         r2, r3, #5
  000a0	e59f30c0	 ldr         r3, [pc, #0xC0]
  000a4	e5832000	 str         r2, [r3]

; 512  :         DelayInMsec(600);

  000a8	e3a00f96	 mov         r0, #0x96, 30
  000ac	eb000000	 bl          DelayInMsec

; 513  :     
; 514  :         //
; 515  :         // Enable waiting on the wait line...
; 516  :         //   
; 517  :         *SMC_PCCONT |= PCCONT_WEN1;

  000b0	e59f30b0	 ldr         r3, [pc, #0xB0]
  000b4	e5933000	 ldr         r3, [r3]
  000b8	e3832010	 orr         r2, r3, #0x10
  000bc	e59f30a4	 ldr         r3, [pc, #0xA4]
  000c0	e5832000	 str         r2, [r3]

; 518  :         DelayInMsec(600);

  000c4	e3a00f96	 mov         r0, #0x96, 30
  000c8	eb000000	 bl          DelayInMsec

; 519  : 
; 520  :         //
; 521  :         // Clear the reset line.
; 522  :         //    
; 523  :         *SMC_PCCONT &= ~PCCONT_PC1RST;

  000cc	e59f3094	 ldr         r3, [pc, #0x94]
  000d0	e5932000	 ldr         r2, [r3]
  000d4	e3e03004	 mvn         r3, #4
  000d8	e0022003	 and         r2, r2, r3
  000dc	e59f3084	 ldr         r3, [pc, #0x84]
  000e0	e5832000	 str         r2, [r3]

; 524  :         DelayInMsec(400);

  000e4	e3a00e19	 mov         r0, #0x19, 28
  000e8	eb000000	 bl          DelayInMsec

; 525  : 
; 526  : 
; 527  :         //
; 528  :         // Initialize the SMC interface.  Rather than parse the pcmcia configuration space,
; 529  :         // just set the Attribute and memory timings to 600 ns and PCMCIA timing to I/O all 
; 530  :         // access.
; 531  :         //
; 532  :         *SMC_PCCONFIG_ATT1  = CalculatePcmciaTimings(300);

  000ec	e3a00f4b	 mov         r0, #0x4B, 30
  000f0	eb000000	 bl          CalculatePcmciaTimings
  000f4	e58d0010	 str         r0, [sp, #0x10]
  000f8	e59f2064	 ldr         r2, [pc, #0x64]
  000fc	e59d3010	 ldr         r3, [sp, #0x10]
  00100	e5823000	 str         r3, [r2]

; 533  :         *SMC_PCCONFIG_MEM1  = CalculatePcmciaTimings(300);

  00104	e3a00f4b	 mov         r0, #0x4B, 30
  00108	eb000000	 bl          CalculatePcmciaTimings
  0010c	e58d0014	 str         r0, [sp, #0x14]
  00110	e59f2048	 ldr         r2, [pc, #0x48]
  00114	e59d3014	 ldr         r3, [sp, #0x14]
  00118	e5823000	 str         r3, [r2]

; 534  :         *SMC_PCCONFIG_IO1   = CalculatePcmciaTimings(0 ) | PCCONFIG_MW_16BIT;

  0011c	e3a00000	 mov         r0, #0

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -