Changeset 8565a42 in mainline for kernel/arch/sparc64/src/drivers


Ignore:
Timestamp:
2018-03-02T20:34:50Z (8 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1a81f69, d5e5fd1
Parents:
3061bc1 (diff), 34e1206 (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.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
git-committer:
GitHub <noreply@…> (2018-03-02 20:34:50)
Message:

Remove all trailing whitespace, everywhere.

See individual commit messages for details.

Location:
kernel/arch/sparc64/src/drivers
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/drivers/kbd.c

    r3061bc1 r8565a42  
    6262{
    6363        const char *name = ofw_tree_node_name(node);
    64        
     64
    6565        if (str_cmp(name, "su") != 0)
    6666                return false;
    67        
     67
    6868        /*
    6969         * Read 'interrupts' property.
     
    7575                return false;
    7676        }
    77        
     77
    7878        uint32_t interrupts = *((uint32_t *) prop->value);
    79        
     79
    8080        /*
    8181         * Read 'reg' property.
     
    8787                return false;
    8888        }
    89        
     89
    9090        size_t size = ((ofw_ebus_reg_t *) prop->value)->size;
    91        
     91
    9292        uintptr_t pa = 0; // Prevent -Werror=maybe-uninitialized
    9393        if (!ofw_ebus_apply_ranges(node->parent,
     
    9797                return false;
    9898        }
    99        
     99
    100100        inr_t inr;
    101101        cir_t cir;
     
    108108                return false;
    109109        }
    110        
     110
    111111        /*
    112112         * We need to pass aligned address to hw_map().
     
    117117        uintptr_t aligned_addr = ALIGN_DOWN(pa, PAGE_SIZE);
    118118        size_t offset = pa - aligned_addr;
    119        
     119
    120120        ioport8_t *ns16550 = (ioport8_t *) (km_map(aligned_addr, offset + size,
    121121            PAGE_WRITE | PAGE_NOT_CACHEABLE) + offset);
    122        
     122
    123123        ns16550_instance_t *ns16550_instance = ns16550_init(ns16550, 0, inr, cir,
    124124            cir_arg, NULL);
     
    131131                }
    132132        }
    133        
     133
    134134        /*
    135135         * This is the necessary evil until the userspace drivers are
     
    140140        sysinfo_set_item_val("kbd.address.physical", NULL, pa);
    141141        sysinfo_set_item_val("kbd.type.ns16550", NULL, true);
    142        
     142
    143143        return true;
    144144}
  • kernel/arch/sparc64/src/drivers/niagara.c

    r3061bc1 r8565a42  
    126126         * shared buffer to the console.
    127127         */
    128        
     128
    129129        while (output_buffer.read_ptr != output_buffer.write_ptr) {
    130130                do_putchar(output_buffer.data[output_buffer.read_ptr]);
     
    132132                    ((output_buffer.read_ptr) + 1) % OUTPUT_BUFFER_SIZE;
    133133        }
    134        
     134
    135135        /*
    136136         * Read character from keyboard.
    137137         */
    138        
     138
    139139        uint64_t c;
    140140        if (__hypercall_fast_ret1(0, 0, 0, 0, 0, CONS_GETCHAR, &c) == HV_EOK) {
     
    174174        if (instance)
    175175                return;
    176        
     176
    177177        instance = malloc(sizeof(niagara_instance_t), FRAME_ATOMIC);
    178178        instance->thread = thread_create(kniagarapoll, NULL, TASK,
    179179            THREAD_FLAG_UNCOUNTED, "kniagarapoll");
    180        
     180
    181181        if (!instance->thread) {
    182182                free(instance);
     
    184184                return;
    185185        }
    186        
     186
    187187        instance->srlnin = NULL;
    188        
     188
    189189        output_buffer.read_ptr = 0;
    190190        output_buffer.write_ptr = 0;
    191191        input_buffer.write_ptr = 0;
    192192        input_buffer.read_ptr = 0;
    193        
     193
    194194        /*
    195195         * Set sysinfos and pareas so that the userspace counterpart of the
     
    197197         * buffers.
    198198         */
    199        
     199
    200200        sysinfo_set_item_val("fb", NULL, true);
    201201        sysinfo_set_item_val("fb.kind", NULL, 5);
    202        
     202
    203203        sysinfo_set_item_val("niagara.outbuf.address", NULL,
    204204            KA2PA(&output_buffer));
     
    207207        sysinfo_set_item_val("niagara.outbuf.datasize", NULL,
    208208            OUTPUT_BUFFER_SIZE);
    209        
     209
    210210        sysinfo_set_item_val("niagara.inbuf.address", NULL,
    211211            KA2PA(&input_buffer));
     
    214214        sysinfo_set_item_val("niagara.inbuf.datasize", NULL,
    215215           INPUT_BUFFER_SIZE);
    216        
     216
    217217        outbuf_parea.pbase = (uintptr_t) (KA2PA(&output_buffer));
    218218        outbuf_parea.frames = 1;
     
    220220        outbuf_parea.mapped = false;
    221221        ddi_parea_register(&outbuf_parea);
    222        
     222
    223223        inbuf_parea.pbase = (uintptr_t) (KA2PA(&input_buffer));
    224224        inbuf_parea.frames = 1;
     
    226226        inbuf_parea.mapped = false;
    227227        ddi_parea_register(&inbuf_parea);
    228        
     228
    229229        outdev_t *niagara_dev = malloc(sizeof(outdev_t), FRAME_ATOMIC);
    230230        outdev_initialize("niagara_dev", niagara_dev, &niagara_ops);
     
    238238{
    239239        niagara_init();
    240        
     240
    241241        if (instance) {
    242242                srln_instance_t *srln_instance = srln_init();
     
    244244                        indev_t *sink = stdin_wire();
    245245                        indev_t *srln = srln_wire(srln_instance, sink);
    246                        
     246
    247247                        instance->srlnin = srln;
    248248                        thread_ready(instance->thread);
    249249                }
    250250        }
    251        
     251
    252252        return instance;
    253253}
  • kernel/arch/sparc64/src/drivers/pci.c

    r3061bc1 r8565a42  
    183183        if (!prop || !prop->value)
    184184                return NULL;
    185        
     185
    186186        if (str_cmp(prop->value, "SUNW,sabre") == 0) {
    187187                /*
  • kernel/arch/sparc64/src/drivers/scr.c

    r3061bc1 r8565a42  
    6767        ofw_sbus_reg_t *sbus_reg;
    6868        const char *name;
    69        
     69
    7070        name = ofw_tree_node_name(node);
    71        
     71
    7272        if (str_cmp(name, "SUNW,m64B") == 0)
    7373                scr_type = SCR_ATYFB;
     
    8080        else if (str_cmp(name, "QEMU,VGA") == 0)
    8181                scr_type = SCR_QEMU_VGA;
    82        
     82
    8383        if (scr_type == SCR_UNKNOWN) {
    8484                log(LF_ARCH, LVL_ERROR, "Unknown screen device.");
    8585                return;
    8686        }
    87        
     87
    8888        uintptr_t fb_addr;
    8989        unsigned int fb_offset = 0;
     
    121121                        return;
    122122                }
    123        
     123
    124124                pci_reg = &((ofw_pci_reg_t *) prop->value)[1];
    125                
     125
    126126                if (!ofw_pci_reg_absolutize(node, pci_reg, &pci_abs_reg)) {
    127127                        log(LF_ARCH, LVL_ERROR,
     
    129129                        return;
    130130                }
    131        
     131
    132132                if (!ofw_pci_apply_ranges(node->parent, &pci_abs_reg,
    133133                    &fb_addr)) {
     
    136136                        return;
    137137                }
    138                
     138
    139139                switch (fb_depth) {
    140140                case 8:
     
    159159                        return;
    160160                }
    161                
     161
    162162                break;
    163163        case SCR_XVR:
     
    167167                        return;
    168168                }
    169        
     169
    170170                pci_reg = &((ofw_pci_reg_t *) prop->value)[1];
    171                
     171
    172172                if (!ofw_pci_reg_absolutize(node, pci_reg, &pci_abs_reg)) {
    173173                        log(LF_ARCH, LVL_ERROR,
     
    175175                        return;
    176176                }
    177        
     177
    178178                if (!ofw_pci_apply_ranges(node->parent, &pci_abs_reg,
    179179                    &fb_addr)) {
     
    207207                        return;
    208208                }
    209                
     209
    210210                break;
    211211        case SCR_FFB:
     
    231231                        return;
    232232                }
    233                
     233
    234234                sbus_reg = &((ofw_sbus_reg_t *) prop->value)[0];
    235235                if (!ofw_sbus_apply_ranges(node->parent, sbus_reg, &fb_addr)) {
     
    238238                        return;
    239239                }
    240        
     240
    241241                break;
    242242
     
    297297                .visual = visual,
    298298        };
    299        
     299
    300300        outdev_t *fbdev = fb_init(&props);
    301301        if (fbdev)
  • kernel/arch/sparc64/src/drivers/tick.c

    r3061bc1 r8565a42  
    8989
    9090        softint.value = softint_read();
    91        
     91
    9292        /*
    9393         * Make sure we are servicing interrupt_level_14
    9494         */
    9595        assert(n == TT_INTERRUPT_LEVEL_14);
    96        
     96
    9797        /*
    9898         * Make sure we are servicing TICK_INT.
     
    106106        clear.tick_int = 1;
    107107        clear_softint_write(clear.value);
    108        
     108
    109109        /*
    110110         * Reprogram the compare register.
Note: See TracChangeset for help on using the changeset viewer.