Changeset 9cdac5a in mainline


Ignore:
Timestamp:
2011-01-06T22:15:55Z (13 years ago)
Author:
martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d8d8bbd
Parents:
c2f3e0b
Message:

add CMD_PIO_WRITE_A_x commands which store values from scratch space to I/O space

Location:
kernel/generic
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/ddi/irq.h

    rc2f3e0b r9cdac5a  
    5454        /** Read 4 bytes from the I/O space. */
    5555        CMD_PIO_READ_32,
     56       
    5657        /** Write 1 byte to the I/O space. */
    5758        CMD_PIO_WRITE_8,
     
    6263       
    6364        /**
    64          * Perform a bit test on the source argument and store the result into
    65          * the destination argument.
     65         * Write 1 byte from the source argument
     66         * to the I/O space.
     67         */
     68        CMD_PIO_WRITE_A_8,
     69        /**
     70         * Write 2 bytes from the source argument
     71         * to the I/O space.
     72         */
     73        CMD_PIO_WRITE_A_16,
     74        /**
     75         * Write 4 bytes from the source argument
     76         * to the I/O space.
     77         */
     78        CMD_PIO_WRITE_A_32,
     79       
     80        /**
     81         * Perform a bit masking on the source argument
     82         * and store the result into the destination argument.
    6683         */
    6784        CMD_BTEST,
    6885       
    6986        /**
    70          * Predicate the execution of the following N commands by the boolean
    71          * value of the source argument.
     87         * Predicate the execution of the following
     88         * N commands by the boolean value of the source
     89         * argument.
    7290         */
    7391        CMD_PREDICATE,
     
    7593        /** Accept the interrupt. */
    7694        CMD_ACCEPT,
     95       
    7796        /** Decline the interrupt. */
    7897        CMD_DECLINE,
  • kernel/generic/src/ipc/irq.c

    rc2f3e0b r9cdac5a  
    404404                            (uint32_t) code->cmds[i].value);
    405405                        break;
     406                case CMD_PIO_WRITE_A_8:
     407                        if (srcarg) {
     408                                pio_write_8((ioport8_t *) code->cmds[i].addr,
     409                                    (uint8_t) scratch[srcarg]);
     410                        }
     411                        break;
     412                case CMD_PIO_WRITE_A_16:
     413                        if (srcarg) {
     414                                pio_write_16((ioport16_t *) code->cmds[i].addr,
     415                                    (uint16_t) scratch[srcarg]);
     416                        }
     417                        break;
     418                case CMD_PIO_WRITE_A_32:
     419                        if (srcarg) {
     420                                pio_write_32((ioport32_t *) code->cmds[i].addr,
     421                                    (uint32_t) scratch[srcarg]);
     422                        }
     423                        break;
    406424                case CMD_BTEST:
    407425                        if ((srcarg) && (dstarg)) {
Note: See TracChangeset for help on using the changeset viewer.