Implement changes based on Kees comments on the code review:
http://gerrit-minix.few.vu.nl/#/c/676/
Changes:
- use spin API instead of micro_delay() for busy-wait loops.
- use read16/write16/set16 from mmio.h to access I2C registers.
- reduce the timeout for soft reset.
- in read/write, don't mix variable declaration and initialization.
- after transfer, wait for access ready instead of blindly delaying.
- rename constants am335x, dm37xx to AM335X_I2C_BUS, DM37XX_I2C_BUS.
- rename ADDRESS_MASK to MAX_I2C_SA_MASK for clairity.
- rename omap_i2c_claim_bus() to omap_i2c_bus_is_free().
Change-Id: Ic221e6134e024ea0a6690f21cff208a728286948
Between Minix 3.1.2 and Minix 3.1.3, the d_name member of struct
dirent was reduced from 61 characters to 1 character. backup(8)
blindly copies the result of readdir() into an array of dirent
structs. As a consequence, the structs in the array only contain
the first letter of the name and the name string was not null
terminated. This caused the backup utility to always fail.
Remedy the situation by adding room for the full d_name.
Change-Id: I2a7b4630f1bb727825a95a6095a7a543fc2f08f6
Use EDID when available to configure the frame buffer driver with
good settings for the attached display.
Change-Id: I69a78155a93e55ffa1ca3ff6621a879a56cdbceb
NetBSD provides an in-kernel EDID parser, validator, and printer
along with other useful functions. This code will be re-used by
the Minix fb driver as it is a complete and well tested
implementation.
Change-Id: I46fe3005d9957cd90d4972030ddcce7bc3bd7924
readclock:
- the setup function for readclock on i386 was missing a return.
- the message field for RTCDEV_GRANT wasn't the right type.
tda19988:
- position variable was used without being initialized.
Change-Id: I3f78dd0a9d44f35eb38cb7da0974909f066b7007
On the BeagleBoard-xM, the RTC is located on the Power Management IC
(PMIC). To keep things consistent, access to the PMIC's RTC is done
through the readclock driver. The readclock driver forwards the request
on to the TPS65950 driver which does the work of manipulating the
registers on the chip.
Change-Id: I53cefbb59c5a9ab87fab90df3cc1a75a6e430f58
- Simplify the message passing between readclock and the driver.
- Add a -q command line option to suppress warning messages. This
cuts down on the noise when readclock is called early in the boot
sequence and a secondary RTC driver (ex TPS95650) isn't up yet.
- Update the man page to be less i386 centric and add details about
the new -q option.
Change-Id: If8d7c50a217ca98c1e9fae0ca92521e2e7c893e4
The VM server now manages its call masks such that all user processes
share the same call mask. As a result, an update for the call mask of
any user process will apply to all user processes. This is similar to
the privilege infrastructure employed by the kernel, and may serve as
a template for similar fine-grained restrictions in other servers.
Concretely, this patch fixes the problem of "service edit init" not
applying the given VM call mask to user processes started from RC
scripts during system startup.
In addition, this patch makes RS set a proper VM call mask for each
recovery script it spawns.
Change-Id: I520a30d85a0d3f3502d2b158293a2258825358cf
. Replace 64bit funcions with operators in arch_clock.c
. Replace 64bit funcions with operators in proc.c
. Replace 64bit funcions with operators in vbox.c
. Replace 64bit funcions with operators in driver.c
. Eradicates is_zero64, make_zero64, neg64
Change-Id: Ie4e1242a73534f114725271b2e2365b2004cb7b9
Some ARM chips handle power-off with RTC alarms. PM notifies
readclock (the driver for RTCs) about the impending power-off.
If the power-off mechanism is an RTC alarm, readclock will
set the alarm. If not, there is no effect.
Change-Id: Iee00066def2a0f742cdf0dbde8e32b376edf1b78
AM335X SoCs support power-off via a power management
chip (PMIC). An alarm in the real time clock is used
to trigger the PMIC to cut the power.
To ensure the alarm goes off when the system is in
a safe state, the RTC is frozen when the alarm is
set. At the last moment, the kernel unfreezes the RTC
to let the alarm go off.
This patch adds a mini driver for unfreezing the RTC
as well as code to handle RBT_POWEROFF on Minix/arm.
Change-Id: I7d48e75791e3a81bdd2f7704997193a269409fe8
Add support for getting/setting the am335x SoC's internal real
time clock. Also, allow the power off alarm to be set.
Make readclock an "always on" driver. This is needed for setting
power-off alarms whenever the power button is pressed on the BBB.
Replace the readclock.sh script & single run driver with a
readclock program that takes the same arguments and forwards
the requests on to the always up readclock driver.
Change-Id: Ifd6c2acd80ae4b5e79d83df510df445c24e24a71
128 byte reads are much more common than 32 byte reads. The message
passing + setup/teardown for a read is much more expensive, in terms
of time, than the reading itself. A slightly bigger struct is well
worth the time savings. This reduces read times for /dev/eeprom
from 57 seconds per 4KB to 14 seconds.
Additionally, make sending the page address in the eeprom driver
and utility optional. This can save a little time when reading
within the same page and allows support for smaller devices that
don't support pages (example: chips containing EDID).
Change-Id: Ie48087caee40c11fa241d1555fce9309ddd27b43
To do so, a few dependencies have been imported:
* external/bsd/lutok
* external/mit/lua
* external/public-domain/sqlite
* external/public-domain/xz
The Kyua framework is the new generation of ATF (Automated Test
Framework), it is composed of:
* external/bsd/atf
* external/bsd/kyua-atf-compat
* external/bsd/kyua-cli
* external/bsd/kyua-tester
* tests
Kyua/ATF being written in C++, it depends on libstdc++ which is
provided by GCC. As this is not part of the sources, Kyua is only
compiled when the native GCC utils are installed.
To install Kyua do the following:
* In a cross-build enviromnent, add the following to the build.sh
commandline: -V MKBINUTILS=yes -V MKGCCCMDS=yes
WARNING:
At this point the import is still experimental, and not supported
on native builds (a.k.a make build).
Change-Id: I26aee23c5bbd2d64adcb7c1beb98fe0d479d7ada
This reverts commit 85e7d849c8.
This introduce a bug in position computing for disk bigger than 4GB.
Change-Id: I281e60e9644d995cc4643006b50c05693f939b44
This program uses the i2c /dev interface to read the
contents of EEPROMs and display it to the user in
HEX and ASCII. It also has a mode that can display
data in label:value pairs. That mode is used for
board detection in the rc script to start the right
i2c drivers for the board.
Change-Id: I0bf5b13ffab5a89533c762d6881a145cf7f14914
The padconf library runs in user mode, but to actually affect the
padconf register contents, the processor has to be in privileged
mode. A full server based solution will be developed, but for now
just set the pinmux in the kernel at boot.
Change-Id: I170ed54dae64b27cd9bd8807445231598fb8e3e1