Ignore:
Timestamp:
2011-03-21T22:00:17Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
143932e3
Parents:
b50b5af2 (diff), 7308e84 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes (needs fixes).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/src/mach/integratorcp/integratorcp.c

    rb50b5af2 r04803bf  
    5656static icp_hw_map_t icp_hw_map;
    5757static irq_t icp_timer_irq;
    58 struct arm_machine_ops machine_ops = {
     58struct arm_machine_ops icp_machine_ops = {
    5959        icp_init,
    6060        icp_timer_irq_start,
    6161        icp_cpu_halt,
    62         icp_get_memory_size,
     62        icp_get_memory_extents,
    6363        icp_irq_exception,
    6464        icp_frame_init,
    6565        icp_output_init,
    66         icp_input_init
     66        icp_input_init,
     67        icp_get_irq_count,
     68        icp_get_platform_name
    6769};
    6870
     
    214216}
    215217
    216 /** Returns the size of emulated memory.
    217  *
    218  * @return Size in bytes.
    219  */
    220 size_t icp_get_memory_size(void)
    221 {
     218/** Get extents of available memory.
     219 *
     220 * @param start         Place to store memory start address.
     221 * @param size          Place to store memory size.
     222 */
     223void icp_get_memory_extents(uintptr_t *start, uintptr_t *size)
     224{
     225        *start = 0;
     226
    222227        if (hw_map_init_called) {
    223                 return (sdram[((*(uint32_t *)icp_hw_map.sdramcr & ICP_SDRAM_MASK) >> 2)]);
     228                *size = (sdram[((*(uint32_t *)icp_hw_map.sdramcr &
     229                    ICP_SDRAM_MASK) >> 2)]);
    224230        } else {
    225                 return SDRAM_SIZE;
    226         }
    227        
     231                *size = SDRAM_SIZE;
     232        }
    228233}
    229234
     
    242247 * @param istate Saved processor state.
    243248 */
    244 void icp_irq_exception(int exc_no, istate_t *istate)
     249void icp_irq_exception(unsigned int exc_no, istate_t *istate)
    245250{
    246251        uint32_t sources = icp_irqc_get_sources();
    247         int i;
     252        unsigned int i;
    248253       
    249254        for (i = 0; i < ICP_IRQC_MAX_IRQ; i++) {
     
    295300                fb_parea.pbase = ICP_FB;
    296301                fb_parea.frames = 300;
     302                fb_parea.unpriv = false;
    297303                ddi_parea_register(&fb_parea);
    298304        }
     
    333339}
    334340
     341size_t icp_get_irq_count(void)
     342{
     343        return ICP_IRQ_COUNT;
     344}
     345
     346const char *icp_get_platform_name(void)
     347{
     348        return "integratorcp";
     349}
    335350
    336351/** @}
Note: See TracChangeset for help on using the changeset viewer.