Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix Raspberry Pi support #621

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
/.externalToolBuilders
/autom4te.cache
/.vscode
*.swp

# /arch/.unmaintained/amiga/workbench/hidds/graphics/intuition/
/arch/.unmaintained/amiga/workbench/hidds/graphics/intuition/*.bak
Expand Down
1 change: 1 addition & 0 deletions arch/arm-native/kernel/mmakefile.src
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ $(OSGENDIR)/boot/core.elf: $(KOBJSDIR)/kernel_resource.o $(KOBJSDIR)/exec_librar
@$(ECHO) "Creating $@"
%mkdirs_q $(OSGENDIR)/boot
@$(TARGET_LD) -Map $(OSGENDIR)/boot/core.map -T $(SRCDIR)/$(CURDIR)/ldscript.lds -o $@ $^ -L$(AROS_LIB) -larossupport -lautoinit -llibinit -lstdc.static -laeabi
$(TARGET_OBJCOPY) --only-keep-debug $@ [email protected]
@$(TARGET_STRIP) --strip-unneeded -R .note -R .comment $@

#MM kernel-kernel-raspi-arm : includes
Expand Down
5 changes: 4 additions & 1 deletion arch/arm-native/kernel/platform_bcm2708.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Copyright (C) 2015-2016, The AROS Development Team. All rights reserved.
*/

#undef __AROSEXEC_SMP

#include <aros/types/spinlock_s.h>
#include <aros/kernel.h>
#include <aros/symbolsets.h>
Expand Down Expand Up @@ -92,7 +94,7 @@ static void bcm2708_init(APTR _kernelBase, APTR _sysBase)
asm volatile ("mrc p15, 0, %0, c2, c0, 0":"=r"(tmp));
((uint32_t *)(trampoline_dst + trampoline_data_offset))[0] = tmp; // pde
((uint32_t *)(trampoline_dst + trampoline_data_offset))[1] = (uint32_t)cpu_Register;

#if 0
for (cpu = 1; cpu < 4; cpu ++)
{
cpu_stack = (uint32_t *)AllocMem(AROS_STACKSIZE*sizeof(uint32_t), MEMF_CLEAR); /* MEMF_PRIVATE */
Expand Down Expand Up @@ -138,6 +140,7 @@ static void bcm2708_init(APTR _kernelBase, APTR _sysBase)
KrnSpinLock(&startup_lock, NULL, SPINLOCK_MODE_WRITE);
KrnSpinUnLock(&startup_lock);
}
#endif
}
}

Expand Down
6 changes: 3 additions & 3 deletions arch/arm-native/soc/broadcom/2708/include/hardware/usb2otg.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,9 @@
#define USB2OTG_INTRCHAN_BABBLEERROR (1 << 8)
#define USB2OTG_INTRCHAN_FRAMEOVERRUN (1 << 9)
#define USB2OTG_INTRCHAN_DATATOGGLEERROR (1 << 10)
#define USB2OTG_INTRCHAN_BUFFERNOTAVAILABLE (1 << 11)
#define USB2OTG_INTRCHAN_EXCESSIVETRANSMISSION (1 << 12)
#define USB2OTG_INTRCHAN_FRAMELISTROLLOVER (1 << 13)
#define USB2OTG_INTRCHAN_BUFFERNOTAVAILABLE (1 << 11) // reserved?
#define USB2OTG_INTRCHAN_EXCESSIVETRANSMISSION (1 << 12) // reserved?
#define USB2OTG_INTRCHAN_FRAMELISTROLLOVER (1 << 13) // reserved?

/* Bits in the power register */
#define USB2OTG_POWER_STOPPCLOCK (1 << 0)
Expand Down
5 changes: 3 additions & 2 deletions arch/arm-native/soc/broadcom/2708/mmakefile.src
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ BCM2708_SP := aros-$(AROS_TARGET_CPU)-bcm2708.rom
#MM kernel-sdcard \
#MM hidd-i2c-bcm2708 \
#MM hidd-vc4gfx \
#MM kernel-usb-usb2otg
#MM kernel-usb-usb2otg \
#MM kernel-usb-dwc2

#MM kernel-package-arm-bcm2708-missing: \
#MM kernel-battclock
Expand All @@ -24,7 +25,7 @@ PKG_LIBS :=
PKG_LIBS_ARCH :=
PKG_RSRC := gpio mbox
PKG_RSRC_ARCH :=
PKG_DEVS := sdcard USBHardware/usb2otg
PKG_DEVS := sdcard USBHardware/dwc2
PKG_DEVS_ARCH := timer
PKG_HANDLERS :=
PKG_HIDDS := i2c-bcm2708 vc4gfx
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Copyright (C) 2013-2019, The AROS Development Team. All rights reserved.
*/

#define DEBUG 1
#define DEBUG 0
#include <aros/debug.h>

#include <proto/exec.h>
Expand Down
Loading