X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=include%2Fatmel_mci.h;h=de2414806b7673b03a36599ff7f2a8975e2c22e8;hb=5a4edb5b29d5f5ae5cd5d9b3ea958bc0962597e3;hp=0158f972a8c43bd8efd1130bb3c7a85a0247d986;hpb=72fa467988e7944407a634ddc4bc6a2df685c04c;p=karo-tx-uboot.git diff --git a/include/atmel_mci.h b/include/atmel_mci.h index 0158f972a8..de2414806b 100644 --- a/include/atmel_mci.h +++ b/include/atmel_mci.h @@ -1,23 +1,7 @@ /* * Copyright (C) 2005-2006 Atmel Corporation * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * SPDX-License-Identifier: GPL-2.0+ */ #ifndef __ATMEL_MCI_H__ #define __ATMEL_MCI_H__ @@ -38,7 +22,7 @@ typedef struct atmel_mci { u32 sdcr; /* 0x0c */ u32 argr; /* 0x10 */ u32 cmdr; /* 0x14 */ - u32 _18; /* 0x18 */ + u32 blkr; /* 0x18 */ u32 _1c; /* 0x1c */ u32 rspr; /* 0x20 */ u32 rspr1; /* 0x24 */ @@ -52,34 +36,14 @@ typedef struct atmel_mci { u32 ier; /* 0x44 */ u32 idr; /* 0x48 */ u32 imr; /* 0x4c */ + u32 dma; /* 0x50 */ + u32 cfg; /* 0x54 */ + u32 reserved[41]; + u32 version; } atmel_mci_t; #endif /* __ASSEMBLY__ */ -/* - * NOTICE: Use of registers offsets is depreciated. - * These defines will be removed once the old driver - * is taken out of commision. - * - * Atmel MultiMedia Card Interface (MCI) registers - */ -#define MMCI_CR 0x0000 -#define MMCI_MR 0x0004 -#define MMCI_DTOR 0x0008 -#define MMCI_SDCR 0x000c -#define MMCI_ARGR 0x0010 -#define MMCI_CMDR 0x0014 -#define MMCI_RSPR 0x0020 -#define MMCI_RSPR1 0x0024 -#define MMCI_RSPR2 0x0028 -#define MMCI_RSPR3 0x002c -#define MMCI_RDR 0x0030 -#define MMCI_TDR 0x0034 -#define MMCI_SR 0x0040 -#define MMCI_IER 0x0044 -#define MMCI_IDR 0x0048 -#define MMCI_IMR 0x004c - /* Bitfields in CR */ #define MMCI_MCIEN_OFFSET 0 #define MMCI_MCIEN_SIZE 1 @@ -105,6 +69,10 @@ typedef struct atmel_mci { #define MMCI_PDCPADV_SIZE 1 #define MMCI_PDCMODE_OFFSET 15 #define MMCI_PDCMODE_SIZE 1 +/* MCI IP version >= 0x500, MR bit 16 used for CLKODD */ +#define MMCI_CLKODD_OFFSET 16 +#define MMCI_CLKODD_SIZE 1 +/* MCI IP version < 0x200, MR higher 16bits for BLKLEN */ #define MMCI_BLKLEN_OFFSET 16 #define MMCI_BLKLEN_SIZE 16 @@ -142,6 +110,11 @@ typedef struct atmel_mci { #define MMCI_TRTYP_OFFSET 19 #define MMCI_TRTYP_SIZE 2 +/* Bitfields in BLKR */ +/* MMCI_BLKLEN_OFFSET/SIZE already defined in MR */ +#define MMCI_BCNT_OFFSET 0 +#define MMCI_BCNT_SIZE 16 + /* Bitfields in RSPRx */ #define MMCI_RSP_OFFSET 0 #define MMCI_RSP_SIZE 32 @@ -218,6 +191,16 @@ typedef struct atmel_mci { #define MMCI_TRTYP_MULTI_BLOCK 1 #define MMCI_TRTYP_STREAM 2 +/* Bitfields in CFG */ +#define MMCI_FIFOMODE_OFFSET 0 +#define MMCI_FIFOMODE_SIZE 1 +#define MMCI_FERRCTRL_OFFSET 4 +#define MMCI_FERRCTRL_SIZE 1 +#define MMCI_HSMODE_OFFSET 8 +#define MMCI_HSMODE_SIZE 1 +#define MMCI_LSYNC_OFFSET 12 +#define MMCI_LSYNC_SIZE 1 + /* Bit manipulation macros */ #define MMCI_BIT(name) \ (1 << MMCI_##name##_OFFSET) @@ -232,16 +215,4 @@ typedef struct atmel_mci { << MMCI_##name##_OFFSET)) \ | MMCI_BF(name,value)) -/* - * NOTICE: Use of registers offsets is depreciated. - * These defines will be removed once the old driver - * is taken out of commision. - * - * Register access macros - */ -#define mmci_readl(reg) \ - readl((void *)ATMEL_BASE_MMCI + MMCI_##reg) -#define mmci_writel(reg,value) \ - writel((value), (void *)ATMEL_BASE_MMCI + MMCI_##reg) - #endif /* __ATMEL_MCI_H__ */