summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/armv7/omap/am335x_prcmreg.h4
-rw-r--r--sys/arch/armv7/omap/ommmc.c8
-rw-r--r--sys/arch/armv7/omap/prcm.c14
-rw-r--r--sys/arch/armv7/omap/prcmvar.h6
4 files changed, 21 insertions, 11 deletions
diff --git a/sys/arch/armv7/omap/am335x_prcmreg.h b/sys/arch/armv7/omap/am335x_prcmreg.h
index 49e34f7bd54..ca2314371f3 100644
--- a/sys/arch/armv7/omap/am335x_prcmreg.h
+++ b/sys/arch/armv7/omap/am335x_prcmreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: am335x_prcmreg.h,v 1.2 2013/10/10 19:40:02 syl Exp $ */
+/* $OpenBSD: am335x_prcmreg.h,v 1.3 2013/10/24 19:39:46 syl Exp $ */
/*
* Copyright (c) 2013 Raphael Graf <r@undefined.ch>
*
@@ -29,6 +29,8 @@
#define PRCM_AM335X_GPIO2_CLKCTRL 0x00b0
#define PRCM_AM335X_GPIO3_CLKCTRL 0x00b4
#define PRCM_AM335X_TPCC_CLKCTRL 0x00bc
+#define PRCM_AM335X_MMC1_CLKCTRL 0x00f4
+#define PRCM_AM335X_MMC2_CLKCTRL 0x00f8
#define PRCM_AM335X_TPTC1_CLKCTRL 0x00fc
#define PRCM_AM335X_TPTC2_CLKCTRL 0x0100
#define PRCM_AM335X_CM_WKUP 0x0400
diff --git a/sys/arch/armv7/omap/ommmc.c b/sys/arch/armv7/omap/ommmc.c
index c73add7dbb5..67584ff3e83 100644
--- a/sys/arch/armv7/omap/ommmc.c
+++ b/sys/arch/armv7/omap/ommmc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ommmc.c,v 1.7 2013/10/18 15:23:58 syl Exp $ */
+/* $OpenBSD: ommmc.c,v 1.8 2013/10/24 19:39:46 syl Exp $ */
/*
* Copyright (c) 2009 Dale Rahn <drahn@openbsd.org>
@@ -283,8 +283,6 @@ ommmc_attach(struct device *parent, struct device *self, void *args)
int error = 1;
uint32_t caps;
- /* XXX - ICLKEN, FCLKEN? */
-
sc->sc_iot = oa->oa_iot;
if (bus_space_map(sc->sc_iot, oa->oa_dev->mem[0].addr,
oa->oa_dev->mem[0].size, 0, &sc->sc_ioh))
@@ -292,8 +290,8 @@ ommmc_attach(struct device *parent, struct device *self, void *args)
printf("\n");
- /* XXX DMA channels? */
- /* FIXME prcm_enableclock(sc->clockbit); */
+ /* Enable ICLKEN, FCLKEN? */
+ prcm_enablemodule(PRCM_MMC0 + oa->oa_dev->unit);
sc->sc_ih = arm_intr_establish(oa->oa_dev->irq[0], IPL_SDMMC,
ommmc_intr, sc, DEVNAME(sc));
diff --git a/sys/arch/armv7/omap/prcm.c b/sys/arch/armv7/omap/prcm.c
index 05adeb69f39..42043244a19 100644
--- a/sys/arch/armv7/omap/prcm.c
+++ b/sys/arch/armv7/omap/prcm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: prcm.c,v 1.3 2013/10/10 19:40:02 syl Exp $ */
+/* $OpenBSD: prcm.c,v 1.4 2013/10/24 19:39:46 syl Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
*
@@ -252,8 +252,12 @@ uint32_t
prcm_v3_bit(int mod)
{
switch(mod) {
- case PRCM_MMC:
+ case PRCM_MMC0:
return PRCM_CLK_EN_MMC1;
+ case PRCM_MMC1:
+ return PRCM_CLK_EN_MMC2;
+ case PRCM_MMC2:
+ return PRCM_CLK_EN_MMC3;
case PRCM_USB:
return PRCM_CLK_EN_USB;
default:
@@ -269,8 +273,12 @@ prcm_am335x_clkctrl(int mod)
return PRCM_AM335X_TIMER2_CLKCTRL;
case PRCM_TIMER3:
return PRCM_AM335X_TIMER3_CLKCTRL;
- case PRCM_MMC:
+ case PRCM_MMC0:
return PRCM_AM335X_MMC0_CLKCTRL;
+ case PRCM_MMC1:
+ return PRCM_AM335X_MMC1_CLKCTRL;
+ case PRCM_MMC2:
+ return PRCM_AM335X_MMC2_CLKCTRL;
case PRCM_USB:
return PRCM_AM335X_USB0_CLKCTRL;
case PRCM_TPCC:
diff --git a/sys/arch/armv7/omap/prcmvar.h b/sys/arch/armv7/omap/prcmvar.h
index 50f4e995301..61ecd6fa842 100644
--- a/sys/arch/armv7/omap/prcmvar.h
+++ b/sys/arch/armv7/omap/prcmvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: prcmvar.h,v 1.2 2013/10/10 19:40:03 syl Exp $ */
+/* $OpenBSD: prcmvar.h,v 1.3 2013/10/24 19:39:46 syl Exp $ */
/*
* Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
*
@@ -31,7 +31,9 @@ enum PRCM_MODULES {
PRCM_TPTC0,
PRCM_TPTC1,
PRCM_TPTC2,
- PRCM_MMC,
+ PRCM_MMC0,
+ PRCM_MMC1,
+ PRCM_MMC2,
PRCM_USB,
PRCM_USBTLL,
PRCM_USBP1_PHY,