.globl _start @.globl data @.globl machtype @.globl cmdline @.globl linux .equ _start,0x0 #define MSM_CSR_BASE 0xE0001000 #define MSM_CSR_PHYS 0xC0100000 #define MSM_A2M_INT_6_PHYS 0xC0100424 #define MSM_SHARED_RAM_BASE 0xE0100000 #define MSM_SHARED_RAM_PHYS 0x01F00000 #define PC_COMMAND 0x00 #define PC_STATUS 0x04 #define PC_SERIAL 0x08 #define PC_SERIAL_CHECK 0x0C #define PC_DATA 0x20 #define PC_DATA_RESULT 0x24 #define PCOM_PMIC_VIBRA_ON 0x4 #define PCOM_PMIC_VIBRA_OFF 0x5 #define MSM_SHARED_RAM_VIBRA 0xfc130 #define MSM_SHARED_RAM_VIBRA_PHYS 0x01ffc130 #define MSM_SHARED_RAM_PCOM 0xfc100 #define MSM_SHARED_RAM_PCOM_PHYS 0x01ffc100 #define WINCE_PC_COMMAND_PHYS 0x01ffc100 #define WINCE_PC_SERIAL_PHYS 0x01ffc108 #define MSM_MDP_BASE 0xE0010000 #define MSM_MDP_PHYS 0xAA200000 #define MSM_MDP_SIZE 0x000F0000 #define HTC_FB_PHYS 0x16800000 /* physical page for our fb */ #define HTC_FB_PHYS_END 0x16896000 /* end of fb */ #define MDP_DMA_CONFIG 0x010180 #define MDP_DMA_CONFIG_PHYS 0xAA210180 #define MDP_DMA_START 0x30 #define MDP_DMA_START_PHYS 0xAA210030 #define X 0 #define Y 0 #define WIDTH 480 #define HEIGHT 640 #define STRIDE WIDTH*2 #define PPP_SRC_PACK_TIGHT (1<<17) #define PPP_SRC_PACK_LOOSE 0 #define PPP_SRC_PACK_ALIGN_LSB 0 #define PPP_SRC_PACK_ALIGN_MSB (1<<18) #define DMA_PACK_TIGHT (1<<6) #define DMA_PACK_LOOSE 0 #define DMA_PACK_ALIGN_LSB 0 #define DMA_PACK_ALIGN_MSB (1<<7) #define DMA_PACK_PATTERN_RGB ( ((0<<(2*3)) | ((CLR_R)<<(2*2)) | ((CLR_G)<<2) | CLR_B) << 8 ) #define DMA_IBUF_FORMAT_RGB565 (1<<20) #define DMA_IBUF_FORMAT_RGB888_OR_ARGB8888 0 #define DMA_IBUF_NONCONTIGUOUS (1<<21) #define DMA_OUT_SEL_AHB 0 #define DMA_OUT_SEL_MDDI (1<<14) #define DMA_MDDI_DMAOUT_LCD_SEL_PRIMARY 0 #define DMA_MDDI_DMAOUT_LCD_SEL_SECONDARY (1<<18) #define DMA_MDDI_DMAOUT_LCD_SEL_EXTERNAL (1<<19) #define DMA_DITHER_EN (1<<17) #define MDDI_VDO_PACKET_DESC 0x5666 #define MDDI_VDO_PACKET_PRIM 0xC3 #define MDDI_VDO_PACKET_SECD 0xC0 #define WORD34 0x10188 #define WORD35 0x1018c #define WORD37 0x10194 #define WORD40 0x101a0 #define WORD41 0x101a4 #define WORD37_PHYS 0xAA210194 #define WORD40_PHYS 0xAA2101a0 #define WORD41_PHYS 0xAA2101a4 /* #define WORD37_VALUE ((Y << 16) | (X)) */ #define WORD37_VALUE 0 /* ld_param */ #define WORD40_VALUE 0 /* (MDDI_VDO_PACKET_DESC << 16) | MDDI_VDO_PACKET_PRIM */ #define WORD41_VALUE ( (MDDI_VDO_PACKET_DESC << 16) | MDDI_VDO_PACKET_PRIM ) /* #define DMA2_CFG = DMA_PACK_TIGHT | DMA_PACK_ALIGN_LSB | DMA_PACK_PATTERN_RGB | DMA_OUT_SEL_AHB | DMA_IBUF_NONCONTIGUOUS | DMA_IBUF_FORMAT_RGB565 | DMA_OUT_SEL_MDDI | DMA_MDDI_DMAOUT_LCD_SEL_PRIMARY | DMA_DITHER_EN */ #define DOUBLERGB_GREEN 0x7e007e0 #define DMA2_CFG 0x326140 .text _start: /* msr cpsr_c, #PSR_F_BIT | #PSR_I_BIT | SVC_MODE */ mrs r0,cpsr bic r0,r0,#0x1f orr r0,r0,#0xd3 msr cpsr,r0 /* write to vibra register */ /* mov r4,# 0xb22 */ /* maximum */ mov r4,# 0xff ldr r5,=MSM_SHARED_RAM_VIBRA_PHYS str r4,[r5] /* vibrate using pcom wince command */ mov r4,#PCOM_PMIC_VIBRA_ON ldr r5,=WINCE_PC_COMMAND_PHYS str r4,[r5] /* increment serial counter (PC_SERIAL) */ ldr r6,=WINCE_PC_SERIAL_PHYS ldr r5,[r6] add r5, r5, #1 str r5,[r6] /* notify arm9 */ mov r4,# 1 ldr r6,=MSM_A2M_INT_6_PHYS str r4,[r6] /* now clear the screen (green) and start dma */ mov r4,# WORD37_VALUE ldr r6,=WORD37_PHYS str r4,[r6] mov r4,# WORD40_VALUE ldr r6,=WORD40_PHYS str r4,[r6] ldr r4,=WORD41_VALUE ldr r6,=WORD41_PHYS str r4,[r6] ldr r4,=DMA2_CFG ldr r6,=MDP_DMA_CONFIG_PHYS str r4,[r6] ldr r5,=HTC_FB_PHYS ldr r6,=HTC_FB_PHYS_END ldr r4,=DOUBLERGB_GREEN /* green */ clearscreenloop: str r4,[r5] add r5, r5, #4 cmp r5,r6 ble clearscreenloop /* start DMA2 */ mov r4,# 0 ldr r6,=MDP_DMA_START_PHYS str r4,[r6] busy: b busy