Add additional i2c and mmc prcm module enum values for devices that
authorjsg <jsg@openbsd.org>
Mon, 18 Jul 2016 15:03:01 +0000 (15:03 +0000)
committerjsg <jsg@openbsd.org>
Mon, 18 Jul 2016 15:03:01 +0000 (15:03 +0000)
didn't attach previously on OMAP4 with the static device configuration
and now do with the fdt.  Like most of the other OMAP4 prcm cases
these don't do anything, hopefully we'll properly configure clocks with
data from the fdt at some point in the future.

Tested by abieber@ on PandaBoard-ES.

sys/arch/armv7/omap/prcm.c
sys/arch/armv7/omap/prcmvar.h

index c91bec6..a82eb67 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: prcm.c,v 1.10 2016/07/17 00:21:13 jsg Exp $ */
+/* $OpenBSD: prcm.c,v 1.11 2016/07/18 15:03:01 jsg Exp $ */
 /*
  * Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
  *
@@ -287,6 +287,12 @@ prcm_v3_bit(int mod)
                return PRCM_CLK_EN_GPIO5;
        case PRCM_GPIO5:
                return PRCM_CLK_EN_GPIO6;
+       case PRCM_I2C0:
+               return PRCM_CLK_EN_I2C1;
+       case PRCM_I2C1:
+               return PRCM_CLK_EN_I2C2;
+       case PRCM_I2C2:
+               return PRCM_CLK_EN_I2C3;
        default:
                panic("%s: module not found\n", __func__);
        }
@@ -396,6 +402,10 @@ prcm_v4_enablemodule(struct prcm_softc *sc, int mod)
 {
        switch (mod) {
                case PRCM_MMC0:
+               case PRCM_MMC1:
+               case PRCM_MMC2:
+               case PRCM_MMC3:
+               case PRCM_MMC4:
                        break;
                case PRCM_USBP1_PHY:
                case PRCM_USBP2_PHY:
@@ -416,6 +426,12 @@ prcm_v4_enablemodule(struct prcm_softc *sc, int mod)
                case  PRCM_GPIO5:
                        /* XXX */
                        break;
+               case PRCM_I2C0:
+               case PRCM_I2C1:
+               case PRCM_I2C2:
+               case PRCM_I2C3:
+                       /* XXX */
+                       break;
        default:
                panic("%s: module not found\n", __func__);
        }
index 736bcfc..18a18a8 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: prcmvar.h,v 1.5 2014/03/18 07:34:17 syl Exp $ */
+/* $OpenBSD: prcmvar.h,v 1.6 2016/07/18 15:03:01 jsg Exp $ */
 /*
  * Copyright (c) 2007,2009 Dale Rahn <drahn@openbsd.org>
  *
@@ -40,6 +40,8 @@ enum PRCM_MODULES {
        PRCM_MMC0,
        PRCM_MMC1,
        PRCM_MMC2,
+       PRCM_MMC3,
+       PRCM_MMC4,
        PRCM_USB,
        PRCM_USBTLL,
        PRCM_USBP1_PHY,
@@ -51,6 +53,7 @@ enum PRCM_MODULES {
        PRCM_I2C0,
        PRCM_I2C1,
        PRCM_I2C2,
+       PRCM_I2C3,
 };
 
 #define PRCM_REG_MAX   6