Jaehoon Chung | 7aff967 | 2012-10-15 19:10:31 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2012 SAMSUNG Electronics |
| 3 | * Jaehoon Chung <jh80.chung@samsung.com> |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation; either version 2 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 18 | * |
| 19 | */ |
| 20 | |
| 21 | #define DWMCI_CLKSEL 0x09C |
| 22 | #define DWMCI_SHIFT_0 0x0 |
| 23 | #define DWMCI_SHIFT_1 0x1 |
| 24 | #define DWMCI_SHIFT_2 0x2 |
| 25 | #define DWMCI_SHIFT_3 0x3 |
| 26 | #define DWMCI_SET_SAMPLE_CLK(x) (x) |
| 27 | #define DWMCI_SET_DRV_CLK(x) ((x) << 16) |
| 28 | #define DWMCI_SET_DIV_RATIO(x) ((x) << 24) |
| 29 | |
| 30 | int exynos_dwmci_init(u32 regbase, int bus_width, int index); |
| 31 | |
| 32 | static inline unsigned int exynos_dwmmc_init(int index, int bus_width) |
| 33 | { |
| 34 | unsigned int base = samsung_get_base_mmc() + (0x10000 * index); |
| 35 | return exynos_dwmci_init(base, bus_width, index); |
| 36 | } |