Changeset e27cf669 in mainline for kernel/arch/ppc32/src/ppc32.c


Ignore:
Timestamp:
2010-02-09T20:19:23Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
fb150d78
Parents:
975e7e9 (diff), eb73a50 (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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ppc32/src/ppc32.c

    r975e7e9 re27cf669  
    3939#include <genarch/kbrd/kbrd.h>
    4040#include <arch/interrupt.h>
     41#include <interrupt.h>
    4142#include <genarch/fb/fb.h>
    4243#include <genarch/fb/visuals.h>
     
    4748#include <proc/uarg.h>
    4849#include <console/console.h>
     50#include <sysinfo/sysinfo.h>
    4951#include <ddi/irq.h>
    5052#include <arch/drivers/pic.h>
     
    5860
    5961bootinfo_t bootinfo;
     62
     63static cir_t pic_cir;
     64static void *pic_cir_arg;
    6065
    6166/** Performs ppc32-specific initialization before main_bsp() is called. */
     
    186191        if (assigned_address) {
    187192                /* Initialize PIC */
    188                 cir_t cir;
    189                 void *cir_arg;
    190                 pic_init(assigned_address[0].addr, PAGE_SIZE, &cir, &cir_arg);
    191                
     193                pic_init(assigned_address[0].addr, PAGE_SIZE, &pic_cir,
     194                    &pic_cir_arg);
     195
    192196#ifdef CONFIG_MAC_KBD
    193197                uintptr_t pa = assigned_address[0].addr + 0x16000;
     
    201205                /* Initialize I/O controller */
    202206                cuda_instance_t *cuda_instance =
    203                     cuda_init(cuda, IRQ_CUDA, cir, cir_arg);
     207                    cuda_init(cuda, IRQ_CUDA, pic_cir, pic_cir_arg);
    204208                if (cuda_instance) {
    205209                        kbrd_instance_t *kbrd_instance = kbrd_init();
     
    211215                        }
    212216                }
     217
     218                /*
     219                 * This is the necessary evil until the userspace driver is entirely
     220                 * self-sufficient.
     221                 */
     222                sysinfo_set_item_val("cuda", NULL, true);
     223                sysinfo_set_item_val("cuda.inr", NULL, IRQ_CUDA);
     224                sysinfo_set_item_val("cuda.address.physical", NULL, pa);
     225                sysinfo_set_item_val("cuda.address.kernel", NULL,
     226                    (uintptr_t) cuda);
    213227#endif
    214228        }
     
    216230        /* Consider only a single device for now */
    217231        return false;
     232}
     233
     234void irq_initialize_arch(irq_t *irq)
     235{
     236        irq->cir = pic_cir;
     237        irq->cir_arg = pic_cir_arg;
     238        irq->preack = true;
    218239}
    219240
Note: See TracChangeset for help on using the changeset viewer.