Commit Graph

23 Commits

Author SHA1 Message Date
Mateusz Guzik
654548838b arm: clean up empty lines in .c and .h files 2020-09-01 21:17:24 +00:00
Kyle Evans
db41cd0e06 Kill off dummy kbd drivers
As far as I can tell, these are an artifact of times when linker sets
couldn't be empty, otherwise the kernel build would fail due to unresolved
symbols. hselasky fixed this in r268138, and I've audited the kbd portions
to make sure nothing would blow up due to the empty linker set and
successfully compiled+ran a kernel with no keyboard support at all.

Kill them off now since they're no longer required.

MFC after:	1 week
2019-12-20 16:22:14 +00:00
Oleksandr Tymoshenko
108117cc22 [ofw] fix errneous checks for OF_finddevice(9) return value
OF_finddevices returns ((phandle_t)-1) in case of failure. Some code
in existing drivers checked return value to be equal to 0 or
less/equal to 0 which is also wrong because phandle_t is unsigned
type. Most of these checks were for negative cases that were never
triggered so trhere was no impact on functionality.

Reviewed by:	nwhitehorn
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D14645
2018-03-20 00:03:49 +00:00
Pedro F. Giffuni
af3dc4a7ca sys/arm: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
2017-11-27 15:04:10 +00:00
Andrew Turner
04b5b6a984 Use the correct OF_getencprop to get the height.
Reported by:	jmcneill
Sponsored by:	ABT Systems Ltd
2016-11-16 11:31:53 +00:00
Andrew Turner
9783ea5c9f Use the correct OF_getencprop over OF_getprop + fdt32_to_cpu to read
integer data from the device tree.

Sponsored by:	ABT Systems Ltd
2016-11-14 12:03:08 +00:00
Andrew Turner
df7675353e Stop including fdt_common.h from the arm code when it's unneeded.
Sponsored by:	ABT Systems Ltd
2016-11-14 11:41:22 +00:00
Oleksandr Tymoshenko
5a715e8aa2 Make framebuffer driver compatible with upstream DT
- Add compatibility string
- Add simplebus as possible parent bus
2016-10-12 03:03:05 +00:00
Oleksandr Tymoshenko
65c2672f67 Force framebuffer virtual viewport to be the same as physical
VideoCore reports garbage in viewport geometry fields unless
viewport was set previously by earlier stage boot loader. So
when booting FreeBSD kernel directly from VideoCore's start.elf
framebuffer intialization fails due to invalid vxres, vyres
values. Make sure we request viewport to be equal to physical
resolution

Submitted by:	Sylvain Garrigues <sylvain@sylvaingarrigues.com>
2016-04-20 22:38:00 +00:00
Oleksandr Tymoshenko
e4ad736f4d Fix build for Pi kernels with syscons enabled 2016-04-19 23:30:22 +00:00
Luiz Otavio O Souza
aafead11b2 Fix the sc(4) framebuffer driver on RPi 2.
Use the BCM2835_MBOX_CHAN_PROP mbox channel to setup the framebuffer,
remove unused code and unnecessary includes.

Adjust the color palette when bcm2708_fb.fbswap is set on /chosen/bootargs
node of DTB.  The firmware used on RPi 2 uses this mode.

Tested on:	RPi-B and RPi 2 with 16, 24 and 32bpp
2015-05-02 22:40:41 +00:00
Andrew Turner
686513878d Call config_intrhook_disestablish on failure of the bcm2835 fb and fbd intr
hooks. With this we can get through the boot even if these functions fail.

Sponsored by:	ABT Systems Ltd
2015-03-08 14:15:57 +00:00
Nathan Whitehorn
65d08437ef Move Open Firmware device root on PowerPC, ARM, and MIPS systems to
a sub-node of nexus (ofwbus) rather than direct attach under nexus. This
fixes FDT on x86 and will make coexistence with ACPI on ARM systems easier.
SPARC is unchanged.

Reviewed by:	imp, ian
2014-02-05 14:44:22 +00:00
Nathan Whitehorn
5cd2b97cd0 Teach nexus(4) about Open Firmware (e.g. FDT) on ARM and MIPS, retiring
fdtbus in most cases. This brings ARM and MIPS more in line with existing
Open Firmware platforms like sparc64 and powerpc, as well as preventing
double-enumeration of the OF tree on embedded PowerPC (first through nexus,
then through fdtbus).

This change is also designed to simplify resource management on FDT platforms
by letting there exist a platform-defined root bus resource_activate() call
instead of replying on fdtbus to do the right thing through fdt_bs_tag.
The OFW_BUS_MAP_INTR() and OFW_BUS_CONFIG_INTR() kobj methods are also
available to implement for similar purposes.

Discussed on:	-arm, -mips
Tested by:	zbb, brooks, imp, and others
MFC after:	6 weeks
2013-11-05 13:48:34 +00:00
Ian Lepore
6489412064 Remove #include <machine/frame.h> from all the arm code that doesn't
really need it.  That would be almost everywhere it was included.  Add
it in a couple files that really do need it and were previously getting
it by accident via another header.
2013-10-27 01:34:10 +00:00
Rui Paulo
279cd1010a Convert bcm2835_mbox to the new mbox interface.
Reviewed by:	gonzo
2013-07-07 21:23:58 +00:00
Aleksandr Rybalko
f101fd7fdc Enable syscons framebuffer support for bcm2835. It makes possible to run Xorg
on Raspberry Pi.
o convert mmap address to physical.
o add FBIOGTYPE ioctl handler - allow to get screen resolution by new
    xf86-video-scfb driver.
Originally designed for "Efika MX" project.

Sponsored by:	FreeBSD Foundation
2013-01-13 22:05:46 +00:00
Oleksandr Tymoshenko
706f28ae4b Fix background color calculation
Spotted by: ray@
2013-01-05 21:05:16 +00:00
Oleksandr Tymoshenko
3ada2d599e Add makeshift implementation for framebuffer console's cursor
Basically it's replica of VersatilePB code which is replica of XBox FB
code. All of them are linear framebuffers and should have common bits
moved to reusable framework.
2012-12-28 03:18:05 +00:00
Oleksandr Tymoshenko
41dd52751d Fix RGB565 case 2012-11-30 02:31:08 +00:00
Oleksandr Tymoshenko
20782cbcf3 Fix hardcoded bpp value 2012-11-29 05:46:46 +00:00
Oleksandr Tymoshenko
9e93341312 Multiple fixes for BCM2835 framebuffer
- Get resolution settings from FDT blob
- Properly handle 24 and 16 bits per pixel
- Add colors support for text console
2012-11-23 04:30:54 +00:00
Oleksandr Tymoshenko
1b1a53cf46 Add barebone Raspberry Pi port. Supported parts:
- Interrupts controller
  - Watchdog
  - System timer
  - Framebuffer (hardcoded resolution/bpp)
2012-08-30 20:59:37 +00:00