Changes in uspace/drv/platform/amdm37x/main.c [cccd60c3:33b8d024] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/platform/amdm37x/main.c
rcccd60c3 r33b8d024 49 49 typedef struct { 50 50 const char *name; 51 match_id_t match_id; 51 const char *id; 52 int score; 52 53 hw_resource_list_t hw_resources; 53 54 } amdm37x_fun_t; … … 133 134 { 134 135 .name = "ohci", 135 .match_id = { .id = "usb/host=ohci", .score = 90 }, 136 .id = "usb/host=ohci", 137 .score = 90, 136 138 .hw_resources = { .resources = ohci_res, .count = ARRAY_SIZE(ohci_res) } 137 139 }, 138 140 { 139 141 .name = "ehci", 140 .match_id = { .id = "usb/host=ehci", .score = 90 }, 142 .id = "usb/host=ehci", 143 .score = 90, 141 144 .hw_resources = { .resources = ehci_res, .count = ARRAY_SIZE(ehci_res) } 142 145 }, 143 146 { 144 147 .name = "fb", 145 .match_id = { .id = "amdm37x&dispc", .score = 90 }, 148 .id = "amdm37x&dispc", 149 .score = 90, 146 150 .hw_resources = { .resources = disp_res, .count = ARRAY_SIZE(disp_res) } 147 151 }, … … 150 154 151 155 static hw_resource_list_t *amdm37x_get_resources(ddf_fun_t *fnode); 152 static int amdm37x_enable_interrupt(ddf_fun_t *fun, int);156 static errno_t amdm37x_enable_interrupt(ddf_fun_t *fun, int); 153 157 154 158 static hw_res_ops_t fun_hw_res_ops = { … … 161 165 }; 162 166 163 static int amdm37x_add_fun(ddf_dev_t *dev, const amdm37x_fun_t *fun)167 static errno_t amdm37x_add_fun(ddf_dev_t *dev, const amdm37x_fun_t *fun) 164 168 { 165 169 assert(dev); … … 174 178 175 179 /* Add match id */ 176 int ret = ddf_fun_add_match_id(fnode, 177 fun->match_id.id, fun->match_id.score); 180 errno_t ret = ddf_fun_add_match_id(fnode, fun->id, fun->score); 178 181 if (ret != EOK) { 179 182 ddf_fun_destroy(fnode); … … 209 212 * (both of HW and pseudo devices). 210 213 * 211 * @return Zero on success, negativeerror number otherwise.212 * 213 */ 214 static int amdm37x_dev_add(ddf_dev_t *dev)214 * @return Zero on success, error number otherwise. 215 * 216 */ 217 static errno_t amdm37x_dev_add(ddf_dev_t *dev) 215 218 { 216 219 assert(dev); … … 218 221 if (!device) 219 222 return ENOMEM; 220 int ret = amdm37x_init(device, DEBUG_CM);223 errno_t ret = amdm37x_init(device, DEBUG_CM); 221 224 if (ret != EOK) { 222 225 ddf_msg(LVL_FATAL, "Failed to setup hw access!.\n"); … … 265 268 } 266 269 267 static int amdm37x_enable_interrupt(ddf_fun_t *fun, int irq)270 static errno_t amdm37x_enable_interrupt(ddf_fun_t *fun, int irq) 268 271 { 269 272 //TODO: Implement
Note:
See TracChangeset
for help on using the changeset viewer.