Changes in / [81b9d3e:84eb4edd] in mainline
- Files:
-
- 4 added
- 6 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/ppc32/Makefile.inc
r81b9d3e r84eb4edd 44 44 RD_DRVS_ESSENTIAL += \ 45 45 platform/mac \ 46 bus/adb/cuda_adb \47 46 bus/pci/pciintel \ 48 47 bus/usb/ohci \ -
uspace/Makefile
r81b9d3e r84eb4edd 134 134 srv/hid/output \ 135 135 srv/hid/remcons \ 136 srv/hw/bus/cuda_adb \ 136 137 srv/hw/char/s3c24xx_uart \ 137 138 srv/hw/irc/apic \ … … 147 148 drv/block/ata_bd \ 148 149 drv/block/ddisk \ 149 drv/bus/adb/cuda_adb \150 150 drv/bus/isa \ 151 151 drv/bus/pci/pciintel \ -
uspace/app/init/init.c
r81b9d3e r84eb4edd 342 342 srv_start("/srv/icp-ic"); 343 343 srv_start("/srv/obio"); 344 srv_start("/srv/cuda_adb"); 344 345 srv_start("/srv/s3c24xx_uart"); 345 346 srv_start("/srv/s3c24xx_ts"); -
uspace/drv/platform/mac/mac.c
r81b9d3e r84eb4edd 1 1 /* 2 2 * Copyright (c) 2011 Martin Decky 3 * Copyright (c) 2017 Jiri Svoboda4 3 * All rights reserved. 5 4 * … … 41 40 #include <errno.h> 42 41 #include <ops/hw_res.h> 43 #include <ops/pio_window.h>44 42 #include <stdio.h> 45 #include <sysinfo.h>46 43 47 44 #define NAME "mac" … … 49 46 typedef struct { 50 47 hw_resource_list_t hw_resources; 51 pio_window_t pio_window;52 48 } mac_fun_t; 53 54 static hw_resource_t adb_res[] = {55 {56 .type = IO_RANGE,57 .res.io_range = {58 .address = 0,59 .size = 0x2000,60 .relative = true,61 .endianness = BIG_ENDIAN62 }63 },64 {65 .type = INTERRUPT,66 .res.interrupt = {67 .irq = 0 /* patched at run time */68 }69 },70 };71 72 static mac_fun_t adb_data = {73 .hw_resources = {74 sizeof(adb_res) / sizeof(adb_res[0]),75 adb_res76 },77 .pio_window = {78 .io = {79 .base = 0, /* patched at run time */80 .size = 0x200081 }82 }83 };84 49 85 50 static hw_resource_t pci_conf_regs[] = { … … 114 79 115 80 /** Obtain function soft-state from DDF function node */ 116 static mac_fun_t *mac_fun(ddf_fun_t * ddf_fun)81 static mac_fun_t *mac_fun(ddf_fun_t *fnode) 117 82 { 118 return ddf_fun_data_get(ddf_fun); 119 } 120 121 static pio_window_t *mac_get_pio_window(ddf_fun_t *ddf_fun) 122 { 123 mac_fun_t *fun = mac_fun(ddf_fun); 124 return &fun->pio_window; 83 return ddf_fun_data_get(fnode); 125 84 } 126 85 … … 129 88 { 130 89 ddf_msg(LVL_DEBUG, "Adding new function '%s'.", name); 131 printf("mac: Adding new function '%s'.\n", name);132 90 133 91 ddf_fun_t *fnode = NULL; … … 156 114 } 157 115 158 printf("mac: Added new function '%s' (str=%s).\n", name, str_match_id);159 116 return true; 160 117 … … 178 135 static int mac_dev_add(ddf_dev_t *dev) 179 136 { 180 int rc;181 uintptr_t cuda_physical;182 sysarg_t cuda_inr;183 137 #if 0 184 138 /* Register functions */ 185 if (!mac_add_fun(dev, "pci0", "intel_pci", &pci_data)) { 186 ddf_msg(LVL_ERROR, "Failed to add PCI function for Mac platform."); 187 return EIO; 188 } 139 if (!mac_add_fun(dev, "pci0", "intel_pci", &pci_data)) 140 ddf_msg(LVL_ERROR, "Failed to add functions for Mac platform."); 189 141 #else 190 142 (void)pci_data; 143 (void)mac_add_fun; 191 144 #endif 192 rc = sysinfo_get_value("cuda.address.physical", &cuda_physical); 193 if (rc != EOK) 194 return EIO; 195 rc = sysinfo_get_value("cuda.inr", &cuda_inr); 196 if (rc != EOK) 197 return EIO; 198 199 adb_data.pio_window.io.base = cuda_physical; 200 adb_res[1].res.interrupt.irq = cuda_inr; 201 202 if (!mac_add_fun(dev, "adb", "cuda_adb", &adb_data)) { 203 ddf_msg(LVL_ERROR, "Failed to add ADB function for Mac platform."); 204 return EIO; 205 } 206 145 207 146 return EOK; 208 147 } … … 234 173 } 235 174 236 static pio_window_ops_t fun_pio_window_ops = {237 .get_pio_window = &mac_get_pio_window238 };239 240 175 static hw_res_ops_t fun_hw_res_ops = { 241 176 .get_resource_list = &mac_get_resources, … … 248 183 ddf_log_init(NAME); 249 184 mac_fun_ops.interfaces[HW_RES_DEV_IFACE] = &fun_hw_res_ops; 250 mac_fun_ops.interfaces[PIO_WINDOW_DEV_IFACE] = &fun_pio_window_ops;251 185 return ddf_driver_main(&mac_driver); 252 186 } -
uspace/srv/hid/input/port/adb.c
r81b9d3e r84eb4edd 62 62 kbd_dev = kdev; 63 63 64 const char *dev = " devices/\\hw\\adb\\kbd";64 const char *dev = "adb/kbd"; 65 65 service_id_t service_id; 66 int rc = loc_service_get_id(dev, &service_id, IPC_FLAG_BLOCKING);66 int rc = loc_service_get_id(dev, &service_id, 0); 67 67 if (rc != EOK) 68 68 return rc; -
uspace/srv/hid/input/port/adb_mouse.c
r81b9d3e r84eb4edd 75 75 static int adb_port_init(mouse_dev_t *mdev) 76 76 { 77 const char *dev = " devices/\\hw\\adb\\mouse";77 const char *dev = "adb/mouse"; 78 78 79 79 mouse_dev = mdev; 80 80 81 81 service_id_t service_id; 82 int rc = loc_service_get_id(dev, &service_id, IPC_FLAG_BLOCKING);82 int rc = loc_service_get_id(dev, &service_id, 0); 83 83 if (rc != EOK) 84 84 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.