Changeset 1e0a5fc in mainline


Ignore:
Timestamp:
2006-06-20T12:03:35Z (19 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
cc73a8a1
Parents:
3c5006a0
Message:

don't use hardcoded PIC address

Location:
arch/ppc32
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • arch/ppc32/include/drivers/pic.h

    r3c5006a0 r1e0a5fc  
    2727 */
    2828
    29  /** @addtogroup ppc32 
     29/** @addtogroup ppc32   
    3030 * @{
    3131 */
     
    3636#define __PIC_H_
    3737
    38 /* PIC handler, read from pearpc source codes */
    39 #define PIC_HW_ADDR 0x80800000
    40 
    4138#define PIC_PENDING_LOW    8
    4239#define PIC_PENDING_HIGH   4
     
    4643#define PIC_ACK_HIGH       6
    4744
    48 void pic_init(void);
     45void pic_init(__address base, size_t size);
    4946void pic_enable_interrupt(int intnum);
    5047void pic_disable_interrupt(int intnum);
     
    5451#endif
    5552
    56  /** @}
     53/** @}
    5754 */
    58 
  • arch/ppc32/src/drivers/pic.c

    r3c5006a0 r1e0a5fc  
    4141static volatile __u32 *pic;
    4242
    43 void pic_init(void)
     43void pic_init(__address base, size_t size)
    4444{
    45         pic = (__u32 *)hw_map(PIC_HW_ADDR, PAGE_SIZE);
     45        pic = (__u32 *) hw_map(base, size);
    4646}
    4747
  • arch/ppc32/src/ppc32.c

    r3c5006a0 r1e0a5fc  
    7474       
    7575                /* Initialize PIC */
    76                 pic_init();
     76                pic_init(bootinfo.keyboard.addr, PAGE_SIZE);
    7777               
    78                 cuda_init(bootinfo.keyboard.addr, bootinfo.keyboard.size);
     78                cuda_init(bootinfo.keyboard.addr + 0x16000, 2 * PAGE_SIZE);
    7979               
    8080                /* Merge all zones to 1 big zone */
Note: See TracChangeset for help on using the changeset viewer.