From a7c7ce51630292612b31453c894003364991a0d5 Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 18 Jul 2016 15:03:01 +0000 Subject: [PATCH] Add additional i2c and mmc prcm module enum values for devices that 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 | 18 +++++++++++++++++- sys/arch/armv7/omap/prcmvar.h | 5 ++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/sys/arch/armv7/omap/prcm.c b/sys/arch/armv7/omap/prcm.c index c91bec66e77..a82eb67f510 100644 --- a/sys/arch/armv7/omap/prcm.c +++ b/sys/arch/armv7/omap/prcm.c @@ -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 * @@ -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__); } diff --git a/sys/arch/armv7/omap/prcmvar.h b/sys/arch/armv7/omap/prcmvar.h index 736bcfc2383..18a18a88918 100644 --- a/sys/arch/armv7/omap/prcmvar.h +++ b/sys/arch/armv7/omap/prcmvar.h @@ -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 * @@ -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 -- 2.20.1