mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 05:37:54 +00:00
imx6q_sabrelite: enable sd_card_drv
This commit is contained in:
parent
da502dd036
commit
161f39f7af
@ -58,9 +58,18 @@ namespace Imx6 {
|
|||||||
CACHE_LINE_SIZE_LOG2 = 5,
|
CACHE_LINE_SIZE_LOG2 = 5,
|
||||||
|
|
||||||
/* SD host controller */
|
/* SD host controller */
|
||||||
SDHC_IRQ = 54,
|
SDHC_1_IRQ = 54,
|
||||||
SDHC_MMIO_BASE = 0x02190000,
|
SDHC_1_MMIO_BASE = 0x02190000,
|
||||||
SDHC_MMIO_SIZE = 0x00004000,
|
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 */
|
/* GPIO */
|
||||||
GPIO1_MMIO_BASE = 0x0209c000,
|
GPIO1_MMIO_BASE = 0x0209c000,
|
||||||
|
@ -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
|
LIBS += base
|
||||||
|
|
||||||
vpath %.cc $(REP_DIR)/src/drivers/sd_card
|
vpath %.cc $(REP_DIR)/src/drivers/sd_card
|
@ -13,7 +13,6 @@
|
|||||||
|
|
||||||
/* local includes */
|
/* local includes */
|
||||||
#include <driver.h>
|
#include <driver.h>
|
||||||
#include <drivers/defs/imx6.h>
|
|
||||||
|
|
||||||
using namespace Sd_card;
|
using namespace Sd_card;
|
||||||
using namespace Genode;
|
using namespace Genode;
|
||||||
@ -116,14 +115,3 @@ void Driver::_disable_clock_preparation() {
|
|||||||
Mmio::write<Vendspec::Frc_sdclk_on>(0); }
|
Mmio::write<Vendspec::Frc_sdclk_on>(0); }
|
||||||
|
|
||||||
void Driver::_enable_clock_finish() { 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");
|
|
||||||
}
|
|
||||||
|
29
repos/os/src/drivers/sd_card/spec/imx6q_sabrelite/driver.cc
Normal file
29
repos/os/src/drivers/sd_card/spec/imx6q_sabrelite/driver.cc
Normal 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");
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user