Changeset 40a5d40 in mainline


Ignore:
Timestamp:
2011-03-06T15:34:06Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c18b11a, edb5f837
Parents:
5079242
Message:

Add EHCI stub and implement BIOS handover.

Files:
6 added
3 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/amd64/Makefile.inc

    r5079242 r40a5d40  
    4343        isa \
    4444        ns8250 \
     45        ehci-hcd \
    4546        uhci-hcd \
    4647        uhci-rhd \
  • uspace/Makefile

    r5079242 r40a5d40  
    117117                srv/hw/irc/apic \
    118118                srv/hw/irc/i8259 \
     119                drv/ehci-hcd \
    119120                drv/uhci-hcd \
    120121                drv/uhci-rhd \
     
    134135                srv/hw/irc/apic \
    135136                srv/hw/irc/i8259 \
     137                drv/ehci-hcd \
    136138                drv/uhci-hcd \
    137139                drv/uhci-rhd \
  • uspace/drv/pciintel/pci.c

    r5079242 r40a5d40  
    127127}
    128128
    129 static int pci_config_space_write_16(ddf_fun_t *fun, uint32_t address, uint16_t data)
     129static int pci_config_space_write_32(
     130    ddf_fun_t *fun, uint32_t address, uint32_t data)
     131{
     132        if (address > 252)
     133                return EINVAL;
     134        pci_conf_write_32(PCI_FUN(fun), address, data);
     135        return EOK;
     136}
     137
     138static int pci_config_space_write_16(
     139    ddf_fun_t *fun, uint32_t address, uint16_t data)
    130140{
    131141        if (address > 254)
     
    135145}
    136146
     147static int pci_config_space_write_8(
     148    ddf_fun_t *fun, uint32_t address, uint8_t data)
     149{
     150        if (address > 255)
     151                return EINVAL;
     152        pci_conf_write_8(PCI_FUN(fun), address, data);
     153        return EOK;
     154}
     155
     156static int pci_config_space_read_32(
     157    ddf_fun_t *fun, uint32_t address, uint32_t *data)
     158{
     159        if (address > 252)
     160                return EINVAL;
     161        *data = pci_conf_read_32(PCI_FUN(fun), address);
     162        return EOK;
     163}
     164
     165static int pci_config_space_read_16(
     166    ddf_fun_t *fun, uint32_t address, uint16_t *data)
     167{
     168        if (address > 254)
     169                return EINVAL;
     170        *data = pci_conf_read_16(PCI_FUN(fun), address);
     171        return EOK;
     172}
     173
     174static int pci_config_space_read_8(
     175    ddf_fun_t *fun, uint32_t address, uint8_t *data)
     176{
     177        if (address > 255)
     178                return EINVAL;
     179        *data = pci_conf_read_8(PCI_FUN(fun), address);
     180        return EOK;
     181}
    137182
    138183static hw_res_ops_t pciintel_hw_res_ops = {
     
    142187
    143188static pci_dev_iface_t pci_dev_ops = {
    144         .config_space_read_8 = NULL,
    145         .config_space_read_16 = NULL,
    146         .config_space_read_32 = NULL,
    147         .config_space_write_8 = NULL,
     189        .config_space_read_8 = &pci_config_space_read_8,
     190        .config_space_read_16 = &pci_config_space_read_16,
     191        .config_space_read_32 = &pci_config_space_read_32,
     192        .config_space_write_8 = &pci_config_space_write_8,
    148193        .config_space_write_16 = &pci_config_space_write_16,
    149         .config_space_write_32 = NULL
     194        .config_space_write_32 = &pci_config_space_write_32
    150195};
    151196
Note: See TracChangeset for help on using the changeset viewer.