+2011-08-19 Vladimir Serbinenko <phcoder@gmail.com>
+
+ Fix PCI iterating on functions >= 4.
+
+ * grub-core/bus/pci.c (grub_pci_iterate): Remove useless ghost skipping.
+ * include/grub/mips/loongson/pci.h (GRUB_LOONGSON_OHCI_GHOST_FUNCTION):
+ Removed.
+ (GRUB_LOONGSON_EHCI_GHOST_FUNCTION): Likewise.
+ (grub_pci_read): Fix bitmask.
+ (grub_pci_read_word): Likewise.
+ (grub_pci_read_byte): Likewise.
+ (grub_pci_write): Likewise.
+ (grub_pci_write_word): Likewise.
+ (grub_pci_write_byte): Likewise.
+
2011-08-19 Vladimir Serbinenko <phcoder@gmail.com>
* configure.ac: Don't impose march=loongson2f on loongson platform. (It
continue;
}
-#ifdef GRUB_MACHINE_MIPS_LOONGSON
- /* Skip ghosts. */
- if (id == GRUB_LOONGSON_OHCI_PCIID
- && dev.function == GRUB_LOONGSON_OHCI_GHOST_FUNCTION)
- continue;
- if (id == GRUB_LOONGSON_EHCI_PCIID
- && dev.function == GRUB_LOONGSON_EHCI_GHOST_FUNCTION)
- continue;
-#endif
-
if (hook (dev, id))
return;
#define GRUB_LOONGSON_OHCI_PCIID 0x00351033
#define GRUB_LOONGSON_EHCI_PCIID 0x00e01033
-#define GRUB_LOONGSON_OHCI_GHOST_FUNCTION 4
-#define GRUB_LOONGSON_EHCI_GHOST_FUNCTION 5
#define GRUB_PCI_NUM_BUS 1
#define GRUB_PCI_NUM_DEVICES 16
{
GRUB_MACHINE_PCI_CONF_CTRL_REG = 1 << ((addr >> 11) & 0xf);
return *(volatile grub_uint32_t *) (GRUB_MACHINE_PCI_CONFSPACE
- | (addr & 0x03ff));
+ | (addr & 0x07ff));
}
static inline grub_uint16_t
{
GRUB_MACHINE_PCI_CONF_CTRL_REG = 1 << ((addr >> 11) & 0xf);
return *(volatile grub_uint16_t *) (GRUB_MACHINE_PCI_CONFSPACE
- | (addr & 0x03ff));
+ | (addr & 0x07ff));
}
static inline grub_uint8_t
{
GRUB_MACHINE_PCI_CONF_CTRL_REG = 1 << ((addr >> 11) & 0xf);
return *(volatile grub_uint8_t *) (GRUB_MACHINE_PCI_CONFSPACE
- | (addr & 0x03ff));
+ | (addr & 0x07ff));
}
static inline void
{
GRUB_MACHINE_PCI_CONF_CTRL_REG = 1 << ((addr >> 11) & 0xf);
*(volatile grub_uint32_t *) (GRUB_MACHINE_PCI_CONFSPACE
- | (addr & 0x03ff)) = data;
+ | (addr & 0x07ff)) = data;
}
static inline void
{
GRUB_MACHINE_PCI_CONF_CTRL_REG = 1 << ((addr >> 11) & 0xf);
*(volatile grub_uint16_t *) (GRUB_MACHINE_PCI_CONFSPACE
- | (addr & 0x03ff)) = data;
+ | (addr & 0x07ff)) = data;
}
static inline void
{
GRUB_MACHINE_PCI_CONF_CTRL_REG = 1 << ((addr >> 11) & 0xf);
*(volatile grub_uint8_t *) (GRUB_MACHINE_PCI_CONFSPACE
- | (addr & 0x03ff)) = data;
+ | (addr & 0x07ff)) = data;
}
volatile void *