imx6q_sabrelite: enable sd_card_drv

This commit is contained in:
Stefan Kalkowski 2019-02-11 15:03:11 +01:00 committed by Norman Feske
parent da502dd036
commit 161f39f7af
4 changed files with 42 additions and 16 deletions

View File

@ -58,9 +58,18 @@ namespace Imx6 {
CACHE_LINE_SIZE_LOG2 = 5,
/* SD host controller */
SDHC_IRQ = 54,
SDHC_MMIO_BASE = 0x02190000,
SDHC_MMIO_SIZE = 0x00004000,
SDHC_1_IRQ = 54,
SDHC_1_MMIO_BASE = 0x02190000,
SDHC_1_MMIO_SIZE = 0x00004000,
SDHC_2_IRQ = 55,
SDHC_2_MMIO_BASE = 0x02194000,
SDHC_2_MMIO_SIZE = 0x00004000,
SDHC_3_IRQ = 56,
SDHC_3_MMIO_BASE = 0x02198000,
SDHC_3_MMIO_SIZE = 0x00004000,
SDHC_4_IRQ = 57,
SDHC_4_MMIO_BASE = 0x0219c000,
SDHC_4_MMIO_SIZE = 0x00004000,
/* GPIO */
GPIO1_MMIO_BASE = 0x0209c000,

View File

@ -1,4 +1,4 @@
SRC_CC += adma2.cc spec/imx/driver.cc spec/imx6/driver.cc
SRC_CC += adma2.cc spec/imx/driver.cc spec/imx6/driver.cc spec/imx6q_sabrelite/driver.cc
LIBS += base
vpath %.cc $(REP_DIR)/src/drivers/sd_card

View File

@ -13,7 +13,6 @@
/* local includes */
#include <driver.h>
#include <drivers/defs/imx6.h>
using namespace Sd_card;
using namespace Genode;
@ -116,14 +115,3 @@ void Driver::_disable_clock_preparation() {
Mmio::write<Vendspec::Frc_sdclk_on>(0); }
void Driver::_enable_clock_finish() { Mmio::write<Vendspec::Frc_sdclk_on>(0); }
Driver::Driver(Env &env)
:
Driver_base(env.ram()),
Attached_mmio(env, Imx6::SDHC_MMIO_BASE, Imx6::SDHC_MMIO_SIZE),
_env(env), _irq(env, Imx6::SDHC_IRQ)
{
log("SD card detected");
log("capacity: ", card_info().capacity_mb(), " MiB");
}

View File

@ -0,0 +1,29 @@
/*
* \brief Secured Digital Host Controller
* \author Martin Stein
* \date 2016-12-13
*/
/*
* Copyright (C) 2016-2017 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_4_MMIO_BASE, Imx6::SDHC_4_MMIO_SIZE),
_env(env), _irq(env, Imx6::SDHC_4_IRQ)
{
log("SD card detected");
log("capacity: ", card_info().capacity_mb(), " MiB");
}