Mercurial > flash_v2
comparison packages/io/pci/current/src/pci.c @ 1467:8ad4d297cbf8
* src/pci.c (cyg_pci_get_device_info): Added fix for devices that
only implement the bottom 16 bits of an IO BAR. This is allowed by
the standard but is very rare and mostly present in older devices
only. Without this cyg_pci_allocate_io_priv() gets confused.
| author | nickg |
|---|---|
| date | Wed, 14 Jan 2004 15:39:43 +0000 |
| parents | efdacf0f8122 |
| children | 5dd2b854cc32 |
comparison
equal
deleted
inserted
replaced
| 1466:4534df73d5ba | 1467:8ad4d297cbf8 |
|---|---|
| 165 // Clear fields for next BAR - it's the upper 32 bits. | 165 // Clear fields for next BAR - it's the upper 32 bits. |
| 166 i++; | 166 i++; |
| 167 dev_info->base_size[i] = 0; | 167 dev_info->base_size[i] = 0; |
| 168 dev_info->base_map[i] = 0xffffffff; | 168 dev_info->base_map[i] = 0xffffffff; |
| 169 } | 169 } |
| 170 } | |
| 171 | |
| 172 // Fix any IO devices that only implement the bottom 16 | |
| 173 // bits of the the BAR. Just fill in these bits so it | |
| 174 // looks like a full 32 bit BAR. | |
| 175 if ((CYG_PCI_CFG_BAR_SPACE_IO == | |
| 176 (size & CYG_PCI_CFG_BAR_SPACE_MASK)) && | |
| 177 ((size & 0xFFFF0000) == 0) | |
| 178 ) | |
| 179 { | |
| 180 dev_info->base_size[i] |= 0xFFFF0000; | |
| 170 } | 181 } |
| 171 } | 182 } |
| 172 dev_info->num_bars = bar_count; | 183 dev_info->num_bars = bar_count; |
| 173 } else { | 184 } else { |
| 174 // If the device is already configured. Fill in the base_map. | 185 // If the device is already configured. Fill in the base_map. |
