Path: blob/master/arch/m32r/include/asm/mappi2/mappi2_pld.h
17646 views
#ifndef _MAPPI2_PLD_H1#define _MAPPI2_PLD_H23/*4* include/asm-m32r/mappi2/mappi2_pld.h5*6* Definitions for Extended IO Logic on MAPPI2 board.7* based on m32700ut_pld.h8*9* This file is subject to the terms and conditions of the GNU General10* Public License. See the file "COPYING" in the main directory of11* this archive for more details.12*/1314#ifndef __ASSEMBLY__15/* FIXME:16* Some C functions use non-cache address, so can't define non-cache address.17*/18#define PLD_BASE (0x10c00000 /* + NONCACHE_OFFSET */)19#define __reg8 (volatile unsigned char *)20#define __reg16 (volatile unsigned short *)21#define __reg32 (volatile unsigned int *)22#else23#define PLD_BASE (0x10c00000 + NONCACHE_OFFSET)24#define __reg825#define __reg1626#define __reg3227#endif /* __ASSEMBLY__ */2829/* CFC */30#define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000)31#define PLD_CFSTS __reg16(PLD_BASE + 0x0002)32#define PLD_CFIMASK __reg16(PLD_BASE + 0x0004)33#define PLD_CFBUFCR __reg16(PLD_BASE + 0x0006)34#define PLD_CFCR0 __reg16(PLD_BASE + 0x000a)35#define PLD_CFCR1 __reg16(PLD_BASE + 0x000c)3637/* MMC */38#define PLD_MMCCR __reg16(PLD_BASE + 0x4000)39#define PLD_MMCMOD __reg16(PLD_BASE + 0x4002)40#define PLD_MMCSTS __reg16(PLD_BASE + 0x4006)41#define PLD_MMCBAUR __reg16(PLD_BASE + 0x400a)42#define PLD_MMCCMDBCUT __reg16(PLD_BASE + 0x400c)43#define PLD_MMCCDTBCUT __reg16(PLD_BASE + 0x400e)44#define PLD_MMCDET __reg16(PLD_BASE + 0x4010)45#define PLD_MMCWP __reg16(PLD_BASE + 0x4012)46#define PLD_MMCWDATA __reg16(PLD_BASE + 0x5000)47#define PLD_MMCRDATA __reg16(PLD_BASE + 0x6000)48#define PLD_MMCCMDDATA __reg16(PLD_BASE + 0x7000)49#define PLD_MMCRSPDATA __reg16(PLD_BASE + 0x7006)5051/* Power Control of MMC and CF */52#define PLD_CPCR __reg16(PLD_BASE + 0x14000)535455/*==== ICU ====*/56#define M32R_IRQ_PC104 (5) /* INT4(PC/104) */57#define M32R_IRQ_I2C (28) /* I2C-BUS */58#if 159#define PLD_IRQ_CFIREQ (40) /* CFC Card Interrupt */60#define PLD_IRQ_CFC_INSERT (41) /* CFC Card Insert */61#define PLD_IRQ_CFC_EJECT (42) /* CFC Card Eject */62#define PLD_IRQ_MMCCARD (43) /* MMC Card Insert */63#define PLD_IRQ_MMCIRQ (44) /* MMC Transfer Done */64#else65#define PLD_IRQ_CFIREQ (34) /* CFC Card Interrupt */66#define PLD_IRQ_CFC_INSERT (35) /* CFC Card Insert */67#define PLD_IRQ_CFC_EJECT (36) /* CFC Card Eject */68#define PLD_IRQ_MMCCARD (37) /* MMC Card Insert */69#define PLD_IRQ_MMCIRQ (38) /* MMC Transfer Done */70#endif717273#if 074/* LED Control75*76* 1: DIP swich side77* 2: Reset switch side78*/79#define PLD_IOLEDCR __reg16(PLD_BASE + 0x14002)80#define PLD_IOLED_1_ON 0x00181#define PLD_IOLED_1_OFF 0x00082#define PLD_IOLED_2_ON 0x00283#define PLD_IOLED_2_OFF 0x0008485/* DIP Switch86* 0: Write-protect of Flash Memory (0:protected, 1:non-protected)87* 1: -88* 2: -89* 3: -90*/91#define PLD_IOSWSTS __reg16(PLD_BASE + 0x14004)92#define PLD_IOSWSTS_IOSW2 0x020093#define PLD_IOSWSTS_IOSW1 0x010094#define PLD_IOSWSTS_IOWP0 0x00019596#endif9798/* CRC */99#define PLD_CRC7DATA __reg16(PLD_BASE + 0x18000)100#define PLD_CRC7INDATA __reg16(PLD_BASE + 0x18002)101#define PLD_CRC16DATA __reg16(PLD_BASE + 0x18004)102#define PLD_CRC16INDATA __reg16(PLD_BASE + 0x18006)103#define PLD_CRC16ADATA __reg16(PLD_BASE + 0x18008)104#define PLD_CRC16AINDATA __reg16(PLD_BASE + 0x1800a)105106107#if 0108/* RTC */109#define PLD_RTCCR __reg16(PLD_BASE + 0x1c000)110#define PLD_RTCBAUR __reg16(PLD_BASE + 0x1c002)111#define PLD_RTCWRDATA __reg16(PLD_BASE + 0x1c004)112#define PLD_RTCRDDATA __reg16(PLD_BASE + 0x1c006)113#define PLD_RTCRSTODT __reg16(PLD_BASE + 0x1c008)114115/* SIO0 */116#define PLD_ESIO0CR __reg16(PLD_BASE + 0x20000)117#define PLD_ESIO0CR_TXEN 0x0001118#define PLD_ESIO0CR_RXEN 0x0002119#define PLD_ESIO0MOD0 __reg16(PLD_BASE + 0x20002)120#define PLD_ESIO0MOD0_CTSS 0x0040121#define PLD_ESIO0MOD0_RTSS 0x0080122#define PLD_ESIO0MOD1 __reg16(PLD_BASE + 0x20004)123#define PLD_ESIO0MOD1_LMFS 0x0010124#define PLD_ESIO0STS __reg16(PLD_BASE + 0x20006)125#define PLD_ESIO0STS_TEMP 0x0001126#define PLD_ESIO0STS_TXCP 0x0002127#define PLD_ESIO0STS_RXCP 0x0004128#define PLD_ESIO0STS_TXSC 0x0100129#define PLD_ESIO0STS_RXSC 0x0200130#define PLD_ESIO0STS_TXREADY (PLD_ESIO0STS_TXCP | PLD_ESIO0STS_TEMP)131#define PLD_ESIO0INTCR __reg16(PLD_BASE + 0x20008)132#define PLD_ESIO0INTCR_TXIEN 0x0002133#define PLD_ESIO0INTCR_RXCEN 0x0004134#define PLD_ESIO0BAUR __reg16(PLD_BASE + 0x2000a)135#define PLD_ESIO0TXB __reg16(PLD_BASE + 0x2000c)136#define PLD_ESIO0RXB __reg16(PLD_BASE + 0x2000e)137138/* SIM Card */139#define PLD_SCCR __reg16(PLD_BASE + 0x38000)140#define PLD_SCMOD __reg16(PLD_BASE + 0x38004)141#define PLD_SCSTS __reg16(PLD_BASE + 0x38006)142#define PLD_SCINTCR __reg16(PLD_BASE + 0x38008)143#define PLD_SCBAUR __reg16(PLD_BASE + 0x3800a)144#define PLD_SCTXB __reg16(PLD_BASE + 0x3800c)145#define PLD_SCRXB __reg16(PLD_BASE + 0x3800e)146147#endif148149#endif /* _MAPPI2_PLD.H */150151152