mm.c/h -> frames.c/h: Naming indicating dealing with physical not virtual memory
This commit is contained in:
@ -20,7 +20,7 @@
|
||||
|
||||
#include <types.h>
|
||||
#include <framebuffer.h>
|
||||
#include <mm.h>
|
||||
#include <frames.h>
|
||||
#include <math.h>
|
||||
|
||||
#define PL110_CR_EN 0x001
|
||||
@ -45,7 +45,7 @@ int pl110_init(struct fb *f, unsigned int color_depth) {
|
||||
unsigned int width, height;
|
||||
unsigned int fb_size, power;
|
||||
struct pl110_control *plio = (struct pl110_control*)PL110_IOBASE;
|
||||
struct page *p;
|
||||
struct frame *fr;
|
||||
|
||||
/* 640x480 pixels */
|
||||
width = 640;
|
||||
@ -58,11 +58,11 @@ int pl110_init(struct fb *f, unsigned int color_depth) {
|
||||
power = log(fb_size) - log(MM_PAGE_SIZE);
|
||||
if ((unsigned int)1<<power < fb_size)
|
||||
power++;
|
||||
p = mm_get_free_pages(power);
|
||||
if (!p)
|
||||
fr = get_free_frames(power);
|
||||
if (!fr)
|
||||
return -1;
|
||||
|
||||
plio->upbase = (uint32)p->address;
|
||||
plio->upbase = (uint32)fr->address;
|
||||
|
||||
if (color_depth == FB_COLOR_DEPTH_8) {
|
||||
plio->control = 0x1827;
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <framebuffer.h>
|
||||
#include <init.h>
|
||||
#include <math.h>
|
||||
#include <mm.h>
|
||||
#include <frames.h>
|
||||
#include <types.h>
|
||||
|
||||
#include <drivers/fb.h>
|
||||
@ -47,7 +47,7 @@ int pl111_init_dev(struct fb *f, unsigned int color_depth) {
|
||||
unsigned int width, height;
|
||||
unsigned int fb_size, power;
|
||||
struct pl111_control *plio = (struct pl111_control*)PL111_IOBASE;
|
||||
struct page *p;
|
||||
struct frame *fr;
|
||||
|
||||
/* 640x480 pixels */
|
||||
width = 640;
|
||||
@ -60,11 +60,11 @@ int pl111_init_dev(struct fb *f, unsigned int color_depth) {
|
||||
power = log(fb_size) - log(MM_PAGE_SIZE);
|
||||
if ((unsigned int)1<<power < fb_size)
|
||||
power++;
|
||||
p = mm_get_free_pages(power);
|
||||
if (!p)
|
||||
fr = get_free_frames(power);
|
||||
if (!fr)
|
||||
return -1;
|
||||
|
||||
plio->upbase = (uint32)p->address;
|
||||
plio->upbase = (uint32)fr->address;
|
||||
|
||||
if (color_depth == FB_COLOR_DEPTH_8) {
|
||||
plio->control = 0x1827;
|
||||
|
Reference in New Issue
Block a user