mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 19:34:56 +00:00
sd_card_drv: support for Nitrogen6 SoloX
This commit is contained in:
parent
55b0dff795
commit
1ff36965f4
6
repos/os/lib/mk/spec/nit6_solox/sd_card_drv.mk
Normal file
6
repos/os/lib/mk/spec/nit6_solox/sd_card_drv.mk
Normal 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
|
@ -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">
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
29
repos/os/src/drivers/sd_card/spec/nit6_solox/driver.cc
Normal file
29
repos/os/src/drivers/sd_card/spec/nit6_solox/driver.cc
Normal 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");
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user