northbridge/intel/i945: Change types to uintptr_t where appropriate
Prepares compilation for x86_64 by avoiding casts to different sizes. Current patch fixes: 1. src/northbridge/intel/i945/raminit.c: In function 'ram_read32': src/northbridge/intel/i945/raminit.c:77:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 77 | read32((void *)offset); | ^ 2. src/northbridge/intel/i945/rcven.c: In function 'sample_strobes': src/northbridge/intel/i945/rcven.c:29:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 29 | read32((void *)addr); | ^ src/northbridge/intel/i945/rcven.c:30:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 30 | read32((void *)(addr + 0x80)); | ^ 3. src/northbridge/intel/i945/gma.c: In function 'intel_gma_init_lvds': src/northbridge/intel/i945/gma.c:98:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 98 | (void *)pgfx, mmiobase, piobase, pphysbase); | ^ src/northbridge/intel/i945/gma.c:359:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 359 | (void *)pgfx, hactive * vactive * 4); | ^ src/northbridge/intel/i945/gma.c:360:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 360 | memset((void *)pgfx, 0x00, hactive * vactive * 4); | ^ src/northbridge/intel/i945/gma.c: In function 'intel_gma_init_vga': src/northbridge/intel/i945/gma.c:384:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 384 | (u32)mmiobase, piobase, pphysbase); | 4. src/northbridge/intel/i945/northbridge.c: In function 'mch_domain_read_resources': src/northbridge/intel/i945/northbridge.c:64:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 64 | cbmem_topk = ((uint32_t)cbmem_top() / KiB); | ^ Change-Id: I5ac7a1cb5d85a346114f909047d5a7c21ddb43e9 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/61117 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
parent
6ec3dd2e5c
commit
964055d74f
|
@ -73,7 +73,7 @@ static int gtt_setup(u8 *mmiobase)
|
|||
|
||||
static int intel_gma_init_lvds(struct northbridge_intel_i945_config *conf,
|
||||
unsigned int pphysbase, unsigned int piobase,
|
||||
u8 *mmiobase, unsigned int pgfx)
|
||||
u8 *mmiobase, uintptr_t pgfx)
|
||||
{
|
||||
struct edid edid;
|
||||
struct edid_mode *mode;
|
||||
|
@ -373,15 +373,15 @@ static int intel_gma_init_lvds(struct northbridge_intel_i945_config *conf,
|
|||
|
||||
static int intel_gma_init_vga(struct northbridge_intel_i945_config *conf,
|
||||
unsigned int pphysbase, unsigned int piobase,
|
||||
u8 *mmiobase, unsigned int pgfx)
|
||||
u8 *mmiobase, uintptr_t pgfx)
|
||||
{
|
||||
int i;
|
||||
u32 hactive, vactive;
|
||||
u16 reg16;
|
||||
u32 uma_size;
|
||||
|
||||
printk(BIOS_SPEW, "mmiobase %x addrport %x physbase %x\n",
|
||||
(u32)mmiobase, piobase, pphysbase);
|
||||
printk(BIOS_SPEW, "mmiobase %lx addrport %x physbase %x\n",
|
||||
(uintptr_t)mmiobase, piobase, pphysbase);
|
||||
|
||||
gtt_setup(mmiobase);
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ static void mch_domain_read_resources(struct device *dev)
|
|||
|
||||
/* cbmem_top can be shifted downwards due to alignment.
|
||||
Mark the region between cbmem_top and tomk as unusable */
|
||||
cbmem_topk = ((uint32_t)cbmem_top() / KiB);
|
||||
cbmem_topk = ((uintptr_t)cbmem_top() / KiB);
|
||||
delta_cbmem = tomk_stolen - cbmem_topk;
|
||||
tomk_stolen -= delta_cbmem;
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ static __attribute__((noinline)) void do_ram_command(u32 command)
|
|||
udelay(1);
|
||||
}
|
||||
|
||||
static void ram_read32(u32 offset)
|
||||
static void ram_read32(uintptr_t offset)
|
||||
{
|
||||
PRINTK_DEBUG(" RAM read: %08x\n", offset);
|
||||
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
*/
|
||||
static u32 sample_strobes(int channel_offset, struct sys_info *sysinfo)
|
||||
{
|
||||
u32 reg32, addr;
|
||||
u32 reg32;
|
||||
uintptr_t addr;
|
||||
int i;
|
||||
|
||||
mchbar_setbits32(C0DRC1 + channel_offset, 1 << 6);
|
||||
|
|
Loading…
Reference in New Issue