[7a6d91b] | 1 | /*
|
---|
| 2 | * Copyright (c) 2012 Jan Vesely
|
---|
| 3 | * All rights reserved.
|
---|
| 4 | *
|
---|
| 5 | * Redistribution and use in source and binary forms, with or without
|
---|
| 6 | * modification, are permitted provided that the following conditions
|
---|
| 7 | * are met:
|
---|
| 8 | *
|
---|
| 9 | * - Redistributions of source code must retain the above copyright
|
---|
| 10 | * notice, this list of conditions and the following disclaimer.
|
---|
| 11 | * - Redistributions in binary form must reproduce the above copyright
|
---|
| 12 | * notice, this list of conditions and the following disclaimer in the
|
---|
| 13 | * documentation and/or other materials provided with the distribution.
|
---|
| 14 | * - The name of the author may not be used to endorse or promote products
|
---|
| 15 | * derived from this software without specific prior written permission.
|
---|
| 16 | *
|
---|
| 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
---|
| 18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
---|
| 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
---|
| 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
---|
| 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
---|
| 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
---|
| 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
---|
| 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
---|
| 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
---|
| 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
---|
| 27 | */
|
---|
| 28 |
|
---|
| 29 | /** @addtogroup amdm37xdrv
|
---|
| 30 | * @{
|
---|
| 31 | */
|
---|
| 32 | /** @file
|
---|
| 33 | * @brief AM/DM 37x device.
|
---|
| 34 | */
|
---|
| 35 | #ifndef AMDM37x_H
|
---|
| 36 | #define AMDM37x_H
|
---|
| 37 |
|
---|
| 38 | #include "uhh.h"
|
---|
| 39 | #include "usbtll.h"
|
---|
| 40 |
|
---|
| 41 | #include "cm/core.h"
|
---|
| 42 | #include "cm/clock_control.h"
|
---|
| 43 | #include "cm/usbhost.h"
|
---|
| 44 | #include "cm/mpu.h"
|
---|
| 45 | #include "cm/iva2.h"
|
---|
| 46 |
|
---|
| 47 | #include "prm/clock_control.h"
|
---|
| 48 | #include "prm/global_reg.h"
|
---|
| 49 |
|
---|
[3e6a98c5] | 50 | #include <stdbool.h>
|
---|
[7a6d91b] | 51 |
|
---|
| 52 | typedef struct {
|
---|
| 53 | uhh_regs_t *uhh;
|
---|
| 54 | tll_regs_t *tll;
|
---|
| 55 | struct {
|
---|
| 56 | mpu_cm_regs_t *mpu;
|
---|
| 57 | iva2_cm_regs_t *iva2;
|
---|
| 58 | core_cm_regs_t *core;
|
---|
| 59 | clock_control_cm_regs_t *clocks;
|
---|
| 60 | usbhost_cm_regs_t *usbhost;
|
---|
| 61 | } cm;
|
---|
| 62 | struct {
|
---|
| 63 | clock_control_prm_regs_t *clocks;
|
---|
| 64 | global_reg_prm_regs_t *global;
|
---|
| 65 | } prm;
|
---|
| 66 | } amdm37x_t;
|
---|
| 67 |
|
---|
| 68 | int amdm37x_init(amdm37x_t *device, bool trace_io);
|
---|
| 69 | int amdm37x_usb_tll_init(amdm37x_t *device);
|
---|
| 70 | void amdm37x_setup_dpll_on_autoidle(amdm37x_t *device);
|
---|
| 71 | void amdm37x_usb_clocks_set(amdm37x_t *device, bool enabled);
|
---|
| 72 |
|
---|
| 73 | #endif
|
---|
| 74 | /**
|
---|
| 75 | * @}
|
---|
| 76 | */
|
---|