+// SPDX-License-Identifier: GPL-2.0+
/*
* ATI Radeon Video card Framebuffer driver.
*
*
- * SPDX-License-Identifier: GPL-2.0+
- *
* Some codes of this file is partly ported from Linux kernel
* ATI video framebuffer driver.
*
*/
#include <common.h>
+#include <linux/delay.h>
#include <command.h>
+#include <bios_emul.h>
+#include <env.h>
#include <pci.h>
#include <asm/processor.h>
-#include <asm/errno.h>
+#include <linux/errno.h>
#include <asm/io.h>
#include <malloc.h>
#include <video_fb.h>
#define DPRINT(x...) do{}while(0)
#endif
-#ifndef min_t
-#define min_t(type,x,y) \
- ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; })
-#endif
-
#define MAX_MAPPED_VRAM (2048*2048*4)
#define MIN_MAPPED_VRAM (1024*768*1)
}
#include "../bios_emulator/include/biosemu.h"
-extern int BootVideoCardBIOS(pci_dev_t pcidev, BE_VGAInfo ** pVGAInfo, int cleanUp);
int radeon_probe(struct radeonfb_info *rinfo)
{
videomode = CONFIG_SYS_DEFAULT_VIDEO_MODE;
/* get video mode via environment */
- if ((penv = getenv ("videomode")) != NULL) {
+ penv = env_get("videomode");
+ if (penv) {
/* deceide if it is a string */
if (penv[0] <= '9') {
videomode = (int) simple_strtoul (penv, NULL, 16);