Ignore:
Timestamp:
2010-11-26T20:08:10Z (15 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
45df59a
Parents:
fb150d78 (diff), ffdd2b9 (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
  • uspace/srv/hw/bus/cuda_adb/cuda_adb.c

    rfb150d78 r46c20c8  
    5555static void cuda_connection(ipc_callid_t iid, ipc_call_t *icall);
    5656static int cuda_init(void);
    57 static int cuda_claim(void);
    5857static void cuda_irq_handler(ipc_callid_t iid, ipc_call_t *call);
    5958
     
    144143int main(int argc, char *argv[])
    145144{
    146         dev_handle_t dev_handle;
     145        devmap_handle_t devmap_handle;
    147146        int rc;
    148147        int i;
     
    152151        for (i = 0; i < ADB_MAX_ADDR; ++i) {
    153152                adb_dev[i].client_phone = -1;
    154                 adb_dev[i].dev_handle = 0;
     153                adb_dev[i].devmap_handle = 0;
    155154        }
    156155
     
    161160        }
    162161
    163         rc = devmap_device_register("adb/kbd", &dev_handle);
     162        rc = devmap_device_register("adb/kbd", &devmap_handle);
    164163        if (rc != EOK) {
    165164                devmap_hangup_phone(DEVMAP_DRIVER);
     
    168167        }
    169168
    170         adb_dev[2].dev_handle = dev_handle;
    171         adb_dev[8].dev_handle = dev_handle;
    172 
    173         rc = devmap_device_register("adb/mouse", &dev_handle);
     169        adb_dev[2].devmap_handle = devmap_handle;
     170        adb_dev[8].devmap_handle = devmap_handle;
     171
     172        rc = devmap_device_register("adb/mouse", &devmap_handle);
    174173        if (rc != EOK) {
    175174                devmap_hangup_phone(DEVMAP_DRIVER);
     
    178177        }
    179178
    180         adb_dev[9].dev_handle = dev_handle;
     179        adb_dev[9].devmap_handle = devmap_handle;
    181180
    182181        if (cuda_init() < 0) {
     
    197196        ipc_call_t call;
    198197        ipcarg_t method;
    199         dev_handle_t dh;
     198        devmap_handle_t dh;
    200199        int retval;
    201200        int dev_addr, i;
     
    207206        dev_addr = -1;
    208207        for (i = 0; i < ADB_MAX_ADDR; i++) {
    209                 if (adb_dev[i].dev_handle == dh)
     208                if (adb_dev[i].devmap_handle == dh)
    210209                        dev_addr = i;
    211210        }
     
    238237                         */
    239238                        for (i = 0; i < ADB_MAX_ADDR; ++i) {
    240                                 if (adb_dev[i].dev_handle == dh) {
     239                                if (adb_dev[i].devmap_handle == dh) {
    241240                                        adb_dev[i].client_phone = IPC_GET_ARG5(call);
    242241                                }
     
    255254static int cuda_init(void)
    256255{
     256        if (sysinfo_get_value("cuda.address.physical", &(instance->cuda_physical)) != EOK)
     257                return -1;
     258       
     259        if (sysinfo_get_value("cuda.address.kernel", &(instance->cuda_kernel)) != EOK)
     260                return -1;
     261       
    257262        void *vaddr;
    258 
    259         instance->cuda_physical = sysinfo_value("cuda.address.physical");
    260         instance->cuda_kernel = sysinfo_value("cuda.address.kernel");
    261 
    262263        if (pio_enable((void *) instance->cuda_physical, sizeof(cuda_t), &vaddr) != 0)
    263264                return -1;
     265       
    264266        dev = vaddr;
    265267
Note: See TracChangeset for help on using the changeset viewer.