More Hudson 64bit fixes
Change-Id: I2a6cd7ad27cb6d16dfe3267ea6fb844a5e2e20c6 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/11083 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
parent
0390cc6b3a
commit
772029fe73
|
@ -40,22 +40,22 @@
|
||||||
|
|
||||||
void pm_write8(u8 reg, u8 value)
|
void pm_write8(u8 reg, u8 value)
|
||||||
{
|
{
|
||||||
write8((void *)(PM_MMIO_BASE + reg), value);
|
write8((void *)((uintptr_t)PM_MMIO_BASE + reg), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 pm_read8(u8 reg)
|
u8 pm_read8(u8 reg)
|
||||||
{
|
{
|
||||||
return read8((void *)(PM_MMIO_BASE + reg));
|
return read8((void *)((uintptr_t)PM_MMIO_BASE + reg));
|
||||||
}
|
}
|
||||||
|
|
||||||
void pm_write16(u8 reg, u16 value)
|
void pm_write16(u8 reg, u16 value)
|
||||||
{
|
{
|
||||||
write16((void *)(PM_MMIO_BASE + reg), value);
|
write16((void *)((uintptr_t)PM_MMIO_BASE + reg), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
u16 pm_read16(u16 reg)
|
u16 pm_read16(u16 reg)
|
||||||
{
|
{
|
||||||
return read16((void *)(PM_MMIO_BASE + reg));
|
return read16((void *)((uintptr_t)PM_MMIO_BASE + reg));
|
||||||
}
|
}
|
||||||
|
|
||||||
#define PM_REG_USB_ENABLE 0xef
|
#define PM_REG_USB_ENABLE 0xef
|
||||||
|
|
|
@ -41,7 +41,7 @@ static void sata_init(struct device *dev)
|
||||||
#define CFG_CAP_SPM (1<<12)
|
#define CFG_CAP_SPM (1<<12)
|
||||||
|
|
||||||
volatile u32 *ahci_ptr =
|
volatile u32 *ahci_ptr =
|
||||||
(u32*)(pci_read_config32(dev, AHCI_BASE_ADDRESS_REG) & 0xFFFFFF00);
|
(u32*)(uintptr_t)(pci_read_config32(dev, AHCI_BASE_ADDRESS_REG) & 0xFFFFFF00);
|
||||||
u32 temp;
|
u32 temp;
|
||||||
|
|
||||||
/* unlock the write-protect */
|
/* unlock the write-protect */
|
||||||
|
|
|
@ -36,22 +36,22 @@ enum smi_lvl {
|
||||||
|
|
||||||
static inline uint32_t smi_read32(uint8_t offset)
|
static inline uint32_t smi_read32(uint8_t offset)
|
||||||
{
|
{
|
||||||
return read32((void *)(SMI_BASE + offset));
|
return read32((void *)((uintptr_t)SMI_BASE + offset));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void smi_write32(uint8_t offset, uint32_t value)
|
static inline void smi_write32(uint8_t offset, uint32_t value)
|
||||||
{
|
{
|
||||||
write32((void *)(SMI_BASE + offset), value);
|
write32((void *)((uintptr_t)SMI_BASE + offset), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint16_t smi_read16(uint8_t offset)
|
static inline uint16_t smi_read16(uint8_t offset)
|
||||||
{
|
{
|
||||||
return read16((void *)(SMI_BASE + offset));
|
return read16((void *)((uintptr_t)SMI_BASE + offset));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void smi_write16(uint8_t offset, uint16_t value)
|
static inline void smi_write16(uint8_t offset, uint16_t value)
|
||||||
{
|
{
|
||||||
write16((void *)(SMI_BASE + offset), value);
|
write16((void *)((uintptr_t)SMI_BASE + offset), value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void hudson_configure_gevent_smi(uint8_t gevent, uint8_t mode, uint8_t level);
|
void hudson_configure_gevent_smi(uint8_t gevent, uint8_t mode, uint8_t level);
|
||||||
|
|
Loading…
Reference in New Issue