sd_card_drv: support for Nitrogen6 SoloX

This commit is contained in:
Stefan Kalkowski 2019-02-19 13:19:22 +01:00 committed by Christian Helmuth
parent 55b0dff795
commit 1ff36965f4
4 changed files with 43 additions and 4 deletions

View File

@ -0,0 +1,6 @@
SRC_CC += adma2.cc spec/imx/driver.cc spec/imx6/driver.cc spec/nit6_solox/driver.cc
LIBS += base
vpath %.cc $(REP_DIR)/src/drivers/sd_card
include $(REP_DIR)/lib/import/import-sd_card_drv.mk

View File

@ -33,7 +33,8 @@ set config {
</parent-provides>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route> }
</default-route>
<default caps="100"/> }
append_if [expr [have_spec arndale] || [have_spec rpi]] config {
<start name="platform_drv">

View File

@ -64,10 +64,13 @@ bool Driver::_issue_cmd_finish_xfertyp(Xfertyp::access_t &,
}
bool Driver::_supported_host_version(Hostver::access_t hostver)
bool Driver::_supported_host_version(Hostver::access_t)
{
return Hostver::Vvn::get(hostver) == 0 &&
Hostver::Svn::get(hostver) == 3;
/*
* on i.MX6 there exist board-specific (tested) drivers only,
* therefore we do not need to differentiate in between controller versions
*/
return true;
}

View File

@ -0,0 +1,29 @@
/*
* \brief Secured Digital Host Controller
* \author Stefan Kalkowski
* \date 2019-02-19
*/
/*
* Copyright (C) 2019 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
/* local includes */
#include <driver.h>
#include <drivers/defs/imx6.h>
using namespace Sd_card;
using namespace Genode;
Driver::Driver(Env &env)
:
Driver_base(env.ram()),
Attached_mmio(env, Imx6::SDHC_2_MMIO_BASE, Imx6::SDHC_2_MMIO_SIZE),
_env(env), _irq(env, Imx6::SDHC_2_IRQ)
{
log("SD card detected");
log("capacity: ", card_info().capacity_mb(), " MiB");
}