Changeset a71c158 in mainline for kernel/arch/arm32/src
- Timestamp:
- 2009-08-21T14:12:45Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0e6dce8, b50b5af2, e5792d1
- Parents:
- 90c8b8d
- Location:
- kernel/arch/arm32/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/src/arm32.c
r90c8b8d ra71c158 89 89 interrupt_init(); 90 90 91 #ifdef CONFIG_FB92 machine_fb_init();93 #else94 #ifdef CONFIG_ARM_PRN95 91 machine_output_init(); 96 #endif /* CONFIG_ARM_PRN */97 #endif /* CONFIG_FB */98 92 } 99 93 … … 182 176 } 183 177 184 /** Acquire console back for kernel. */185 void arch_grab_console(void)186 {187 machine_grab_console();188 #ifdef CONFIG_FB189 fb_redraw();190 #endif191 }192 193 /** Return console to userspace. */194 void arch_release_console(void)195 {196 machine_release_console();197 }198 199 178 /** @} 200 179 */ -
kernel/arch/arm32/src/mach/integratorcp/integratorcp.c
r90c8b8d ra71c158 57 57 static irq_t icp_timer_irq; 58 58 struct arm_machine_ops machine_ops = { 59 MACHINE_GENFUNC,60 MACHINE_GENFUNC,61 59 icp_init, 62 60 icp_timer_irq_start, 63 61 icp_cpu_halt, 64 62 icp_get_memory_size, 65 icp_fb_init,66 63 icp_irq_exception, 67 icp_get_fb_address,68 64 icp_frame_init, 69 65 icp_output_init, … … 128 124 } 129 125 130 /** Initializes the icp frame buffer */131 void icp_fb_init(void)132 {133 fb_properties_t prop = {134 .addr = 0,135 .offset = 0,136 .x = 640,137 .y = 480,138 .scan = 2560,139 .visual = VISUAL_BGR_0_8_8_8,140 };141 prop.addr = icp_get_fb_address();142 fb_init(&prop);143 fb_parea.pbase = ICP_FB;144 fb_parea.frames = 300;145 ddi_parea_register(&fb_parea);146 }147 148 126 /** Initializes icp_hw_map. */ 149 127 void icp_init(void) … … 172 150 } 173 151 174 175 /** Acquire console back for kernel. */176 void icp_grab_console(void)177 {178 }179 180 /** Return console to userspace. */181 void icp_release_console(void)182 {183 }184 185 152 /** Starts icp Real Time Clock device, which asserts regular interrupts. 186 * 153 * 187 154 * @param frequency Interrupts frequency (0 disables RTC). 188 155 */ … … 296 263 } 297 264 298 /** Returns address of framebuffer device. 299 * 300 * @return Address of framebuffer device. 301 */ 302 uintptr_t icp_get_fb_address(void) 303 { 265 /* 266 * Integrator specific frame initialization 267 */ 268 void 269 icp_frame_init(void) 270 { 271 frame_mark_unavailable(ICP_FB_FRAME, ICP_FB_NUM_FRAME); 272 frame_mark_unavailable(0, 256); 273 } 274 275 void icp_output_init(void) 276 { 277 #ifdef CONFIG_FB 304 278 if (!vga_init) { 305 279 icp_vga_init(); 306 280 vga_init = true; 307 281 } 308 return (uintptr_t) ICP_FB; 309 } 310 311 /* 312 * Integrator specific frame initialization 313 */ 314 void 315 icp_frame_init(void) 316 { 317 frame_mark_unavailable(ICP_FB_FRAME, ICP_FB_NUM_FRAME); 318 frame_mark_unavailable(0, 256); 319 } 320 321 void icp_output_init(void) 322 { 282 283 fb_properties_t prop = { 284 .addr = ICP_FB, 285 .offset = 0, 286 .x = 640, 287 .y = 480, 288 .scan = 2560, 289 .visual = VISUAL_BGR_0_8_8_8, 290 }; 291 292 outdev_t *fbdev = fb_init(&prop); 293 if (fbdev) { 294 stdout_wire(fbdev); 295 fb_parea.pbase = ICP_FB; 296 fb_parea.frames = 300; 297 ddi_parea_register(&fb_parea); 298 } 299 #endif 323 300 } 324 301 -
kernel/arch/arm32/src/mach/testarm/testarm.c
r90c8b8d ra71c158 57 57 58 58 struct arm_machine_ops machine_ops = { 59 MACHINE_GENFUNC,60 MACHINE_GENFUNC,61 59 gxemul_init, 62 60 gxemul_timer_irq_start, 63 61 gxemul_cpu_halt, 64 62 gxemul_get_memory_size, 65 gxemul_fb_init,66 63 gxemul_irq_exception, 67 gxemul_get_fb_address,68 64 gxemul_frame_init, 69 65 gxemul_output_init, … … 78 74 } 79 75 80 void gxemul_fb_init(void) 81 { 76 void gxemul_output_init(void) 77 { 78 #ifdef CONFIG_FB 82 79 fb_properties_t prop = { 83 80 .addr = GXEMUL_FB_ADDRESS, … … 88 85 .visual = VISUAL_RGB_8_8_8, 89 86 }; 90 fb_init(&prop); 91 } 92 93 void gxemul_output_init(void) 94 { 95 dsrlnout_init((ioport8_t *) gxemul_kbd); 87 88 outdev_t *fbdev = fb_init(&prop); 89 if (fbdev) 90 stdout_wire(fbdev); 91 #endif 92 93 #ifdef CONFIG_ARM_PRN 94 outdev_t *dsrlndev = dsrlnout_init((ioport8_t *) gxemul_kbd); 95 if (dsrlndev) 96 stdout_wire(dsrlndev); 97 #endif 96 98 } 97 99 … … 233 235 } 234 236 235 uintptr_t gxemul_get_fb_address()236 {237 return ((uintptr_t)GXEMUL_FB_ADDRESS);238 }239 240 241 237 /** @} 242 238 */ -
kernel/arch/arm32/src/machine_func.c
r90c8b8d ra71c158 41 41 42 42 43 /** Acquire console back for kernel. */44 void machine_grab_console(void)45 {46 (machine_ops.machine_grab_console)();47 }48 49 /** Return console to userspace. */50 void machine_release_console(void)51 {52 (machine_ops.machine_release_console)();53 }54 55 56 43 /** Maps HW devices to the kernel address space using #hw_map. */ 57 44 void machine_init(void) … … 84 71 } 85 72 86 /** Initializes the Frame Buffer87 *88 */89 void machine_fb_init(void)90 {91 (machine_ops.machine_fb_init)();92 }93 94 95 73 /** Interrupt exception handler. 96 74 * … … 103 81 } 104 82 105 106 /** Returns address of framebuffer device.107 *108 * @return Address of framebuffer device.109 */110 uintptr_t machine_get_fb_address(void)111 {112 return (machine_ops.machine_get_fb_address)();113 }114 83 115 84 /*
Note:
See TracChangeset
for help on using the changeset viewer.