1
0

fb: Generalize framebuffer device initialization

This commit is contained in:
2012-10-07 23:25:11 -04:00
parent 0b7e14c69b
commit c64bfea238
7 changed files with 137 additions and 17 deletions

View File

@ -18,11 +18,14 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <types.h>
#include <framebuffer.h>
#include <init.h>
#include <kmalloc.h>
#include <print.h>
#include <types.h>
#include <drivers/bcm2835_mailbox.h>
#include <drivers/fb.h>
struct bcm2835_config {
volatile uint32 width;
@ -43,7 +46,7 @@ struct bcm2835_config {
struct fbdev bcm2835_fb_device;
int bcm2835_videocore_init(struct fb *f, unsigned int color_depth) {
int bcm2835_videocore_init_dev(struct fb *f, unsigned int color_depth) {
struct bcm2835_config *cfg;
uint32 result;
void *mailbox_buffer_orig, *mailbox_buffer;
@ -108,3 +111,13 @@ int bcm2835_videocore_init(struct fb *f, unsigned int color_depth) {
return 0;
}
struct fb_dev videocore_dev = {
.init = &bcm2835_videocore_init_dev
};
void bcm2835_videocore_init() {
fb_register_device(&videocore_dev);
}
device_initcall(bcm2835_videocore_init);