Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/fb/sgcn.c

    rd9fae235 rb3d513f  
    122122int sgcn_init(void)
    123123{
    124         sysarg_t sram_paddr;
    125         if (sysinfo_get_value("sram.address.physical", &sram_paddr) != EOK)
    126                 return -1;
     124        sram_virt_addr = (uintptr_t) as_get_mappable_page(sysinfo_value("sram.area.size"));
    127125       
    128         sysarg_t sram_size;
    129         if (sysinfo_get_value("sram.area.size", &sram_size) != EOK)
    130                 return -1;
    131        
    132         if (sysinfo_get_value("sram.buffer.offset", &sram_buffer_offset) != EOK)
    133                 sram_buffer_offset = 0;
    134        
    135         sram_virt_addr = (uintptr_t) as_get_mappable_page(sram_size);
    136        
    137         if (physmem_map((void *) sram_paddr, (void *) sram_virt_addr,
    138             sram_size / PAGE_SIZE, AS_AREA_READ | AS_AREA_WRITE) != 0)
     126        if (physmem_map((void *) sysinfo_value("sram.address.physical"),
     127            (void *) sram_virt_addr, sysinfo_value("sram.area.size") / PAGE_SIZE,
     128            AS_AREA_READ | AS_AREA_WRITE) != 0)
    139129                return -1;
    140130       
    141131        serial_console_init(sgcn_putc, WIDTH, HEIGHT);
     132       
     133        sram_buffer_offset = sysinfo_value("sram.buffer.offset");
    142134       
    143135        async_set_client_connection(serial_client_connection);
Note: See TracChangeset for help on using the changeset viewer.