Changeset eb1a2f4 in mainline for uspace/drv/pciintel/pci.h


Ignore:
Timestamp:
2011-02-22T23:30:56Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3b5d1535, a9c674e0
Parents:
dbe25f1 (diff), 664af708 (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 (DDF refactoring)

This merge includes DDF refactoring that brought multifunctional devices
(i.e. ddf_dev_t and ddf_fun_t). Please, see ticket #295 at HelenOS
upstream Trac.

The conflicts themselves were easy to solve (merely several renamings).

Changes to USB subsystem:

  • drivers uses ddf_dev_t and ddf_fun_t
  • different signatures of many library functions
  • several hacks around communication with parent device (now the communication is clearer and somehow what we have now is hack about other hacks)
    • will repair and clean later
  • maybe added some extra debugging messages (the diff has about 240K, and I admit I have no energy to double check that)

WARNING:

  • the diff is VERY long, recommended is viewing partial diffs of the merge (i.e. merges in mainline branch that lead to the parent one)
  • merging with your branches might involve huge renamings, sorry, no other way is possible

BUGS:

  • hub driver will not work (no function created)

GOOD NEWS:

  • QEMU keyboard seems to work with QEMU 0.13 and 0.14
  • we are up-to-date with mainline again
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/pciintel/pci.h

    rdbe25f1 reb1a2f4  
    11/*
    22 * Copyright (c) 2010 Lenka Trochtova
     3 * Copyright (c) 2011 Jiri Svoboda
    34 * All rights reserved.
    45 *
     
    3637#define PCI_H_
    3738
    38 #include <stdlib.h>
    39 #include <driver.h>
    40 #include <malloc.h>
    41 
     39#include <ddf/driver.h>
    4240#include "pci_regs.h"
    4341
    4442#define PCI_MAX_HW_RES 8
    4543
    46 typedef struct pci_dev_data {
     44typedef struct pciintel_bus {
     45        /** DDF device node */
     46        ddf_dev_t *dnode;
     47        uint32_t conf_io_addr;
     48        void *conf_data_port;
     49        void *conf_addr_port;
     50        fibril_mutex_t conf_mutex;
     51} pci_bus_t;
     52
     53typedef struct pci_fun_data {
     54        pci_bus_t *busptr;
     55        ddf_fun_t *fnode;
     56
    4757        int bus;
    4858        int dev;
     
    5161        int device_id;
    5262        hw_resource_list_t hw_resources;
    53 } pci_dev_data_t;
     63} pci_fun_t;
    5464
    55 extern void create_pci_match_ids(device_t *);
     65extern void pci_fun_create_match_ids(pci_fun_t *);
    5666
    57 extern uint8_t pci_conf_read_8(device_t *, int);
    58 extern uint16_t pci_conf_read_16(device_t *, int);
    59 extern uint32_t pci_conf_read_32(device_t *, int);
    60 extern void pci_conf_write_8(device_t *, int, uint8_t);
    61 extern void pci_conf_write_16(device_t *, int, uint16_t);
    62 extern void pci_conf_write_32(device_t *, int, uint32_t);
     67extern uint8_t pci_conf_read_8(pci_fun_t *, int);
     68extern uint16_t pci_conf_read_16(pci_fun_t *, int);
     69extern uint32_t pci_conf_read_32(pci_fun_t *, int);
     70extern void pci_conf_write_8(pci_fun_t *, int, uint8_t);
     71extern void pci_conf_write_16(pci_fun_t *, int, uint16_t);
     72extern void pci_conf_write_32(pci_fun_t *, int, uint32_t);
    6373
    64 extern void pci_add_range(device_t *, uint64_t, size_t, bool);
    65 extern int pci_read_bar(device_t *, int);
    66 extern void pci_read_interrupt(device_t *);
    67 extern void pci_add_interrupt(device_t *, int);
     74extern void pci_add_range(pci_fun_t *, uint64_t, size_t, bool);
     75extern int pci_read_bar(pci_fun_t *, int);
     76extern void pci_read_interrupt(pci_fun_t *);
     77extern void pci_add_interrupt(pci_fun_t *, int);
    6878
    69 extern void pci_bus_scan(device_t *, int);
     79extern pci_fun_t *pci_fun_new(pci_bus_t *);
     80extern void pci_fun_init(pci_fun_t *, int, int, int);
     81extern void pci_fun_delete(pci_fun_t *);
     82extern char *pci_fun_create_name(pci_fun_t *);
    7083
    71 extern pci_dev_data_t *create_pci_dev_data(void);
    72 extern void init_pci_dev_data(pci_dev_data_t *, int, int, int);
    73 extern void delete_pci_dev_data(pci_dev_data_t *);
    74 extern void create_pci_dev_name(device_t *);
     84extern void pci_bus_scan(pci_bus_t *, int);
    7585
    76 extern bool pci_alloc_resource_list(device_t *);
    77 extern void pci_clean_resource_list(device_t *);
     86extern bool pci_alloc_resource_list(pci_fun_t *);
     87extern void pci_clean_resource_list(pci_fun_t *);
    7888
    79 extern void pci_read_bars(device_t *);
     89extern void pci_read_bars(pci_fun_t *);
    8090extern size_t pci_bar_mask_to_size(uint32_t);
    8191
Note: See TracChangeset for help on using the changeset viewer.