1*77b55e8cSThomas Abraham /* 2*77b55e8cSThomas Abraham * (C) Copyright 2012 SAMSUNG Electronics 3*77b55e8cSThomas Abraham * Jaehoon Chung <jh80.chung@samsung.com> 4*77b55e8cSThomas Abraham * 5*77b55e8cSThomas Abraham * SPDX-License-Identifier: GPL-2.0+ 6*77b55e8cSThomas Abraham */ 7*77b55e8cSThomas Abraham 8*77b55e8cSThomas Abraham #define DWMCI_CLKSEL 0x09C 9*77b55e8cSThomas Abraham #define DWMCI_SET_SAMPLE_CLK(x) (x) 10*77b55e8cSThomas Abraham #define DWMCI_SET_DRV_CLK(x) ((x) << 16) 11*77b55e8cSThomas Abraham #define DWMCI_SET_DIV_RATIO(x) ((x) << 24) 12*77b55e8cSThomas Abraham 13*77b55e8cSThomas Abraham #define EMMCP_MPSBEGIN0 0x1200 14*77b55e8cSThomas Abraham #define EMMCP_SEND0 0x1204 15*77b55e8cSThomas Abraham #define EMMCP_CTRL0 0x120C 16*77b55e8cSThomas Abraham 17*77b55e8cSThomas Abraham #define MPSCTRL_SECURE_READ_BIT (0x1<<7) 18*77b55e8cSThomas Abraham #define MPSCTRL_SECURE_WRITE_BIT (0x1<<6) 19*77b55e8cSThomas Abraham #define MPSCTRL_NON_SECURE_READ_BIT (0x1<<5) 20*77b55e8cSThomas Abraham #define MPSCTRL_NON_SECURE_WRITE_BIT (0x1<<4) 21*77b55e8cSThomas Abraham #define MPSCTRL_USE_FUSE_KEY (0x1<<3) 22*77b55e8cSThomas Abraham #define MPSCTRL_ECB_MODE (0x1<<2) 23*77b55e8cSThomas Abraham #define MPSCTRL_ENCRYPTION (0x1<<1) 24*77b55e8cSThomas Abraham #define MPSCTRL_VALID (0x1<<0) 25*77b55e8cSThomas Abraham 26*77b55e8cSThomas Abraham /* CLKSEL Register */ 27*77b55e8cSThomas Abraham #define DWMCI_DIVRATIO_BIT 24 28*77b55e8cSThomas Abraham #define DWMCI_DIVRATIO_MASK 0x7 29*77b55e8cSThomas Abraham 30*77b55e8cSThomas Abraham #ifdef CONFIG_OF_CONTROL 31*77b55e8cSThomas Abraham int exynos_dwmmc_init(const void *blob); 32*77b55e8cSThomas Abraham #endif 33*77b55e8cSThomas Abraham int exynos_dwmci_add_port(int index, u32 regbase, int bus_width, u32 clksel); 34