1/* 2 * Copyright (c) 2012, ETH Zurich. 3 * All rights reserved. 4 * 5 * This file is distributed under the terms in the attached LICENSE file. 6 * If you do not find this file, copies can be found by writing to: 7 * ETH Zurich D-INFK, CAB F.78, Universitaetstr 6, CH-8092 Zurich. 8 */ 9 10#ifndef __OMAP44XX_CM2_H__ 11#define __OMAP44XX_CM2_H__ 12 13#include <barrelfish/barrelfish.h> 14#include <dev/omap/omap44xx_l3init_cm2_dev.h> 15#include <dev/omap/omap44xx_l4per_cm2_dev.h> 16 17 18//#define CM2_DEBUG_ENABLE 1 19 20#if defined(CM2_DEBUG_ENABLE) || defined(GLOBAL_DEBUG) 21#define CM2_DEBUG(x...) printf(x) 22#else 23#define CM2_DEBUG(x...) ((void)0) 24#endif 25 26struct cm2_driver_state { 27 size_t level; 28 struct capref cap; 29 omap44xx_l3init_cm2_t l3init_cm2; 30 omap44xx_l4per_cm2_t l4per_cm2; 31}; 32 33/* cm2.c */ 34void cm2_enable_i2c(struct cm2_driver_state* st, size_t i2c_index); 35int cm2_get_hsmmc1_base_clock(struct cm2_driver_state* st); 36void cm2_enable_hsmmc1(struct cm2_driver_state*); 37void cm2_init(struct cm2_driver_state*); 38 39/* service.c */ 40void cm2_init_service(struct cm2_driver_state* st, iref_t* iref); 41 42#endif /* __OMAP44XX_CM2_H__ */ 43