Changeset a14f346 in mainline
- Timestamp:
 - 2013-01-21T00:14:50Z (13 years ago)
 - Branches:
 - lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
 - Children:
 - c9d0642d
 - Parents:
 - c7d11a0b
 - Files:
 - 
      
- 1 deleted
 - 5 edited
 
- 
          
  boot/arch/arm32/Makefile.inc (modified) (1 diff)
 - 
          
  kernel/arch/arm32/src/mach/beagleboardxm/beagleboardxm.c (modified) (5 diffs)
 - 
          
  kernel/genarch/include/drivers/amdm37x_dispc/amdm37x_dispc.h (deleted)
 - 
          
  uspace/Makefile (modified) (1 diff)
 - 
          
  uspace/drv/fb/amdm37x_dispc/amdm37x_dispc.c (modified) (1 diff)
 - 
          
  uspace/drv/infrastructure/rootamdm37x/rootamdm37x.c (modified) (1 diff)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
boot/arch/arm32/Makefile.inc
rc7d11a0b ra14f346 59 59 RD_DRVS += \ 60 60 infrastructure/rootamdm37x \ 61 fb/amdm37x_dispc \ 61 62 bus/usb/ehci \ 62 63 bus/usb/ohci \  - 
      
kernel/arch/arm32/src/mach/beagleboardxm/beagleboardxm.c
rc7d11a0b ra14f346 38 38 #include <genarch/drivers/amdm37x_uart/amdm37x_uart.h> 39 39 #include <genarch/drivers/amdm37x_gpt/amdm37x_gpt.h> 40 #include <genarch/drivers/amdm37x_dispc/amdm37x_dispc.h>41 40 #include <genarch/fb/fb.h> 42 41 #include <genarch/srln/srln.h> … … 61 60 62 61 static struct beagleboard { 63 amdm37x_dispc_regs_t *dispc;64 62 amdm37x_irc_regs_t *irc_addr; 65 63 amdm37x_uart_t uart; … … 85 83 } 86 84 87 static void bbxm_setup_fb(unsigned width, unsigned height, unsigned bpp)88 {89 const unsigned pixel_bytes = (bpp / 8);90 const size_t size = ALIGN_UP(width * height * pixel_bytes, FRAME_SIZE);91 const unsigned frames = size / FRAME_SIZE;92 unsigned order = 0;93 unsigned frame = 1;94 while (frame < frames) {95 frame *= 2;96 ++order;97 }98 /* prefer highmem as we don't care about virtual mapping. */99 void *buffer = frame_alloc(order, FRAME_LOWMEM);100 if (!buffer) {101 printf("Failed to allocate framebuffer.\n");102 return;103 }104 105 amdm37x_dispc_setup_fb(beagleboard.dispc, width, height, bpp,106 (uintptr_t) buffer);107 108 fb_properties_t prop = {109 .addr = (uintptr_t)buffer,110 .offset = 0,111 .x = width,112 .y = height,113 .scan = width * pixel_bytes,114 .visual = VISUAL_RGB_5_6_5_LE115 };116 switch (bpp)117 {118 case 8:119 prop.visual = VISUAL_INDIRECT_8; break;120 case 16:121 prop.visual = VISUAL_RGB_5_6_5_LE; break;122 case 24:123 prop.visual = VISUAL_BGR_8_8_8; break;124 case 32:125 prop.visual = VISUAL_RGB_8_8_8_0; break;126 default:127 printf("Invalid framebuffer bit depth: bailing out.\n");128 return;129 }130 outdev_t *fb_dev = fb_init(&prop);131 if (fb_dev)132 stdout_wire(fb_dev);133 134 }135 136 85 static void bb_timer_irq_handler(irq_t *irq) 137 86 { … … 154 103 ASSERT(beagleboard.irc_addr); 155 104 amdm37x_irc_init(beagleboard.irc_addr); 156 157 /* Map display controller */158 beagleboard.dispc = (void*) km_map(AMDM37x_DISPC_BASE_ADDRESS,159 AMDM37x_DISPC_SIZE, PAGE_NOT_CACHEABLE);160 ASSERT(beagleboard.dispc);161 105 162 106 /* Initialize timer. Use timer1, because it is in WKUP power domain … … 223 167 static void bbxm_output_init(void) 224 168 { 225 #ifdef CONFIG_FB226 bbxm_setup_fb(CONFIG_BFB_WIDTH, CONFIG_BFB_HEIGHT, CONFIG_BFB_BPP);227 #else228 (void)bbxm_setup_fb;229 #endif230 169 /* UART3 is wired to external RS232 connector */ 231 170 const bool ok = amdm37x_uart_init(&beagleboard.uart,  - 
      
uspace/Makefile
rc7d11a0b ra14f346 194 194 ifeq ($(UARCH),arm32) 195 195 DIRS += \ 196 drv/infrastructure/rootamdm37x 196 drv/infrastructure/rootamdm37x \ 197 drv/fb/amdm37x_dispc 197 198 endif 198 199  - 
      
uspace/drv/fb/amdm37x_dispc/amdm37x_dispc.c
rc7d11a0b ra14f346 316 316 } 317 317 318 ddf_log_note("Handling damage\n"); 319 return EOK; 320 } 321 318 return EOK; 319 }  - 
      
uspace/drv/infrastructure/rootamdm37x/rootamdm37x.c
rc7d11a0b ra14f346 195 195 ddf_msg(LVL_ERROR, "Failed to add EHCI function for " 196 196 "BeagleBoard-xM platform."); 197 if (rootamdm37x_add_fun(dev, "dispc", "amdm37x&dispc", &ehci) != EOK) 198 ddf_msg(LVL_ERROR, "Failed to add dispc function for " 199 "BeagleBoard-xM platform."); 197 200 198 201 return EOK;  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  