Commit Graph

13 Commits

Author SHA1 Message Date
Luiz Otavio O Souza
50ad20b383 Add the routines to activate the GMAC clock and setup the GMAC mode.
Tested on Cubieboard 2 and Banana pi.
2015-07-03 18:39:25 +00:00
Luiz Otavio O Souza
2e33d3583d Remove duplicate and unnecessary includes.
While here remove an unused and wrong define.
2015-07-03 17:09:27 +00:00
Luiz Otavio O Souza
7ec8c789c3 Add AHCI attachment code for Allwinner A10/A20 SoCs.
The Allwinner SoC has an AHCI device on its internal main bus rather
than the PCI bus.  This SoC is somewhat underdocumented, and its SATA
controller is no exception.  The methods to support this chip were
harvested from the Linux Allwinner SDK, and then constants invented to
describe what's going on based on low-level constants contained in the
SATA standard and guess work.

This SoC requires a specific AHCI channel setup in order to start the
operations on the channel properly.

Clock setup and AHCI channel setup idea came from NetBSD.

Tested on Cubieboard 2 and Banana pi (and attachment on Cubieboard by
Pratik Singhal).

Differential Revision:	https://reviews.freebsd.org/D737
Submitted by:	imp
Reviewed by:	imp, ganbold, mav, andrew
2015-07-03 14:11:01 +00:00
Luiz Otavio O Souza
6a11fa4e31 Add the MMC/SD driver for Allwinner SoCs.
This is based on the patch sent by Alexander Fedorov with the following
fixes/improvements:

 - Better error handling;
 - Clock is derived from PLL6 (obtained from netbsd);
 - No more unnecessary busy loops on interrupt handler;
 - style(9) fixes and code cleanup.

I also want to thanks Martin Galvan who has sent an alternative
implementation with some interesting fixes.

Tested on CubieBoard2, Banana-Pi (thanks to netgate!) and Cubieboard1
(Pratik Singhal).

This is intended to pave the way for the upcoming GSoC work (and make
easier the build of images for the supported boards).

PR:		196081
Submitted by:	Alexander Fedorov <alexander.fedorov@rtlservice.com>
2015-05-21 17:39:42 +00:00
Andrew Turner
ff3b52bb19 Stop using machine/fdt.h in the arm kernel code when we don't need it. 2015-04-04 21:34:26 +00:00
Ganbold Tsagaankhuu
2fb98875cf Fix typo in comment.
Disable AHB clock gate for ehci0.

Approved by:	stas (mentor)
2014-09-20 09:18:58 +00:00
Ganbold Tsagaankhuu
fe47fb7b1c Switch to my freebsd.org emal address in copyright.
Approved by:	stas (mentor)
2014-03-25 08:31:47 +00:00
Ganbold Tsagaankhuu
79690a92d0 Add gpio and clock bits for A10/A20's EMAC ethernet controller driver, such as:
- EMAC gpio configuration
- EMAC clock activation

Approved by:	stas (mentor)
2014-03-03 11:00:52 +00:00
Ian Lepore
add35ed5b8 Follow r261352 by updating all drivers which are children of simplebus
to check the status property in their probe routines.

Simplebus used to only instantiate its children whose status="okay"
but that was improper behavior, fixed in r261352.  Now that it doesn't
check anymore and probes all its children; the children all have to
do the check because really only the children know how to properly
interpret their status property strings.

Right now all existing drivers only understand "okay" versus something-
that's-not-okay, so they all use the new ofw_bus_status_okay() helper.
2014-02-02 19:17:28 +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
Oleksandr Tymoshenko
aaa54dd138 Enable USB1 (which is EHCI0) for Allwinner A10
Tested by: ganbold@
2013-02-15 21:29:03 +00:00
Ganbold Tsagaankhuu
3c9606d74e Remove two dead assignments and
make use of sc more explicit and clear

Submitted by: Christoph Mallon
Approved by: gonzo@
2013-02-05 04:13:34 +00:00
Ganbold Tsagaankhuu
458690fe41 Add simple clock driver and ehci glue code for a10
Update dts and kernel config

Approved by: gonzo@
2013-01-29 07:21:50 +00:00