platform/u-boot: Work towards using arm mailbox driver
* Reference bcm2708 framebuffer when it makes sense * Add bcm2708 define to Raspberry Pi board_config.h
This commit is contained in:
parent
7ddf9bcf0d
commit
5906dbb4d4
@ -11,7 +11,8 @@
|
||||
|
||||
#define BOARD_NAME_PRETTY "Raspberry Pi"
|
||||
|
||||
#define BOARD_CPU_ARM6 1
|
||||
#define BOARD_CPU_TYPE_ARM6 1
|
||||
#define BOARD_CPU_BCM2708 1
|
||||
|
||||
#include <arch/arm/bcm2708.h>
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
SubDir HAIKU_TOP src system boot platform u-boot arch arm ;
|
||||
|
||||
SubDirHdrs $(HAIKU_TOP) src system boot platform $(TARGET_BOOT_PLATFORM) ;
|
||||
SubDirHdrs $(HAIKU_TOP) src system boot arch $(TARGET_KERNEL_ARCH) ;
|
||||
|
||||
UsePrivateSystemHeaders ;
|
||||
UsePrivateHeaders kernel [ FDirName kernel arch $(TARGET_KERNEL_ARCH) ]
|
||||
[ FDirName kernel boot platform $(HAIKU_BOOT_PLATFORM) ] ;
|
||||
@ -11,6 +13,8 @@ SubDirC++Flags -fno-rtti ;
|
||||
BootMergeObject boot_platform_u-boot_arm.o :
|
||||
# must come first to have _start_* at correct locations
|
||||
shell.S
|
||||
|
||||
arch_mailbox.cpp
|
||||
: -fno-pic
|
||||
;
|
||||
|
||||
|
27
src/system/boot/platform/u-boot/arch/arm/arch_mailbox.cpp
Normal file
27
src/system/boot/platform/u-boot/arch/arm/arch_mailbox.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2012-2015 Haiku, Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Alexander von Gluck IV, kallisti5@unixzen.com
|
||||
*/
|
||||
|
||||
|
||||
#include "arch_mailbox.h"
|
||||
|
||||
#include <board_config.h>
|
||||
|
||||
|
||||
ArchMailbox *gMailbox = NULL;
|
||||
|
||||
|
||||
extern "C" status_t
|
||||
arch_mailbox_init()
|
||||
{
|
||||
#if defined(BOARD_CPU_BCM2708)
|
||||
extern ArchMailbox *arch_get_mailbox_arm_bcm2708(addr_t base);
|
||||
#warning ARM: Add gPeripheralBase to ARM_CTRL_0_MAILBOX_BASE
|
||||
gMailbox = arch_get_mailbox_arm_bcm2708(ARM_CTRL_0_MAILBOX_BASE);
|
||||
#endif
|
||||
return B_OK;
|
||||
}
|
@ -60,6 +60,10 @@ extern "C" int start_gen(int argc, const char **argv,
|
||||
struct image_header *uimage=NULL, void *fdt=NULL);
|
||||
extern "C" void dump_uimage(struct image_header *image);
|
||||
extern "C" void dump_fdt(const void *fdt);
|
||||
#if defined(__ARM__)
|
||||
extern "C" status_t arch_mailbox_init();
|
||||
#endif
|
||||
|
||||
|
||||
// declared in shell.S
|
||||
// those are initialized to NULL but not in the BSS
|
||||
@ -210,6 +214,9 @@ start_gen(int argc, const char **argv, struct image_header *uimage, void *fdt)
|
||||
gFDT = args.platform.fdt_data;
|
||||
}
|
||||
|
||||
#if defined(__ARM__)
|
||||
arch_mailbox_init();
|
||||
#endif
|
||||
serial_init(gFDT);
|
||||
console_init();
|
||||
// initialize the OpenFirmware wrapper
|
||||
|
@ -108,6 +108,10 @@ platform_init_video(void)
|
||||
#if defined(BOARD_CPU_ARM920T)
|
||||
extern ArchFramebuffer *arch_get_fb_arm_920(addr_t base);
|
||||
gFramebuffer = arch_get_fb_arm_920(0x88000000);
|
||||
#elif defined(BOARD_CPU_BCM2708)
|
||||
extern ArchFramebuffer *arch_get_fb_arm_bcm2708(addr_t base);
|
||||
// BCM2708 gets its framebuffer base from a Mailbox
|
||||
gFramebuffer = arch_get_fb_arm_bcm2708(0x0);
|
||||
#elif defined(BOARD_CPU_OMAP3)
|
||||
extern ArchFramebuffer *arch_get_fb_arm_omap3(addr_t base);
|
||||
gFramebuffer = arch_get_fb_arm_omap3(FB_BASE);
|
||||
|
Loading…
Reference in New Issue
Block a user