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


Ignore:
Timestamp:
2009-04-21T12:46:26Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f2d2c7ba
Parents:
44b7783
Message:

change the way how input devices are wired together according to ticket #44
(also the proposal http://lists.modry.cz/cgi-bin/private/helenos-devel/2009-March/002507.html)

File:
1 edited

Legend:

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

    r44b7783 rc2417bc  
    3636#include <arch.h>
    3737#include <arch/boot/boot.h>
    38 #include <arch/drivers/cuda.h>
     38#include <genarch/drivers/via-cuda/cuda.h>
    3939#include <arch/interrupt.h>
    4040#include <genarch/fb/fb.h>
     
    4545#include <ddi/irq.h>
    4646#include <arch/drivers/pic.h>
     47#include <align.h>
    4748#include <macros.h>
    4849#include <string.h>
    4950
    5051#define IRQ_COUNT  64
     52#define IRQ_CUDA   10
    5153
    5254bootinfo_t bootinfo;
     
    118120                if (bootinfo.macio.addr) {
    119121                        /* Initialize PIC */
    120                         pic_init(bootinfo.macio.addr, PAGE_SIZE);
     122                        cir_t cir;
     123                        void *cir_arg;
     124                        pic_init(bootinfo.macio.addr, PAGE_SIZE, &cir, &cir_arg);
     125                       
     126#ifdef CONFIG_VIA_CUDA
     127                        uintptr_t pa = bootinfo.macio.addr + 0x16000;
     128                        uintptr_t aligned_addr = ALIGN_DOWN(pa, PAGE_SIZE);
     129                        size_t offset = pa - aligned_addr;
     130                        size_t size = 2 * PAGE_SIZE;
     131                       
     132                        cuda_t *cuda = (cuda_t *)
     133                            (hw_map(aligned_addr, offset + size) + offset);
    121134                       
    122135                        /* Initialize I/O controller */
    123                         cuda_init(bootinfo.macio.addr + 0x16000, 2 * PAGE_SIZE);
     136                        cuda_instance_t *cuda_instance =
     137                            cuda_init(cuda, IRQ_CUDA, cir, cir_arg);
     138                        if (cuda_instance) {
     139                                indev_t *sink = stdin_wire();
     140                                cuda_wire(cuda_instance, sink);
     141                        }
     142#endif
    124143                }
    125144               
     
    187206}
    188207
     208void arch_reboot(void)
     209{
     210        // TODO
     211        while (1);
     212}
     213
    189214/** @}
    190215 */
Note: See TracChangeset for help on using the changeset viewer.