LPC23xx: Several fixes for typos from Lizhuoyi
This commit is contained in:
parent
c40c8d1924
commit
2d3f0f01a0
@ -130,22 +130,27 @@ config LPC2378_UART2
|
||||
default n
|
||||
select ARCH_HAVE_UART2
|
||||
|
||||
config LPC2378_UART3
|
||||
bool "UART3"
|
||||
default n
|
||||
select ARCH_HAVE_UART3
|
||||
|
||||
config LPC2378_USBDEV
|
||||
bool "USB Device"
|
||||
default n
|
||||
depends on USBDEV
|
||||
|
||||
config LPC2378_IC0
|
||||
config LPC2378_I2C0
|
||||
bool "I2C0"
|
||||
default n
|
||||
select I2C
|
||||
|
||||
config LPC2378_IC1
|
||||
config LPC2378_I2C1
|
||||
bool "I2C1"
|
||||
default n
|
||||
select I2C
|
||||
|
||||
config LPC2378_IC2
|
||||
config LPC2378_I2C2
|
||||
bool "I2C2"
|
||||
default n
|
||||
select I2C
|
||||
|
@ -121,7 +121,9 @@
|
||||
#define TMR1_BASE_ADDR 0xE0008000
|
||||
#define TMR2_BASE_ADDR 0xE0070000
|
||||
#define TMR3_BASE_ADDR 0xE0074000
|
||||
|
||||
/* Timer 0/1/2/3 register offsets */
|
||||
|
||||
#define TMR_IR_OFFSET 0x00 /* RW:Interrupt Register */
|
||||
#define TMR_TCR_OFFSET 0x04 /* RW: Timer Control Register */
|
||||
#define TMR_TC_OFFSET 0x08 /* RW: Timer Counter */
|
||||
@ -141,11 +143,14 @@
|
||||
#define TMR_CTCR_OFFSET 0x70 /* RW: Count Control Register */
|
||||
|
||||
/* Universal Asynchronous Receiver Transmitter Base Addresses */
|
||||
|
||||
#define UART0_BASE_ADDR 0xE000C000
|
||||
#define UART1_BASE_ADDR 0xE0010000
|
||||
#define UART2_BASE_ADDR 0xE0078000
|
||||
#define UART3_BASE_ADDR 0xE007C000
|
||||
|
||||
/* UART 0/1/2/3 Register Offsets */
|
||||
|
||||
#define UART_RBR_OFFSET 0x00 /* R: Receive Buffer Register (DLAB=0) */
|
||||
#define UART_THR_OFFSET 0x00 /* W: Transmit Holding Register (DLAB=0) */
|
||||
#define UART_DLL_OFFSET 0x00 /* W: Divisor Latch Register (LSB, DLAB=1) */
|
||||
@ -162,10 +167,12 @@
|
||||
#define UART_FDR_OFFSET 0x28 /* RW: Fractional Divider Register */
|
||||
#define UART_TER_OFFSET 0x30 /* RW: Transmit Enable Register */
|
||||
|
||||
|
||||
/* Pulse Width Modulation Base Address */
|
||||
|
||||
#define PWM1_BASE_ADDR 0xE0018000
|
||||
|
||||
/* PWM register offsets */
|
||||
|
||||
#define PWM_IR_OFFSET 0x00 /* Interrupt Register */
|
||||
#define PWM_TCR_OFFSET 0x04 /* Timer Control Register */
|
||||
#define PWM_TC_OFFSET 0x08 /* Timer Counter */
|
||||
@ -190,10 +197,13 @@
|
||||
#define PWM_CTCR_OFFSET 0x70
|
||||
|
||||
/* I2C Base Addresses */
|
||||
|
||||
#define I2C0_BASE_ADDR 0xE001C000
|
||||
#define I2C1_BASE_ADDR 0xE005C000
|
||||
#define I2C2_BASE_ADDR 0xE0080000
|
||||
|
||||
/* I2C 0/1/2 register offsets */
|
||||
|
||||
#define I2C_CONSET_OFFSET 0x00 /* Control Set Register */
|
||||
#define I2C_STAT_OFFSET 0x04 /* Status Register */
|
||||
#define I2C_DAT_OFFSET 0x08 /* Data Register */
|
||||
@ -216,12 +226,11 @@
|
||||
#define PINSEL9_OFFSET 0x24 /* Pin function select register 9 */
|
||||
#define PINSEL10_OFFSET 0x28 /* Pin function select register 10 */
|
||||
|
||||
|
||||
/* Analog to Digital (AD) Base Address */
|
||||
|
||||
#define ADC0_BASE_ADDR 0xE0034000
|
||||
|
||||
/* Analog to Digital (AD) Converter registger offsets */
|
||||
/* Analog to Digital (AD) Converter register offsets */
|
||||
|
||||
#define AD_ADCR_OFFSET 0x00 /* A/D Control Register */
|
||||
#define AD_ADGDR_OFFSET 0x04 /* A/D Global Data Register (only one common register!) */
|
||||
@ -242,6 +251,7 @@
|
||||
#define DAC_BASE_ADDR 0xE006C000
|
||||
|
||||
/* Digital to Analog (DAC) reister offset */
|
||||
|
||||
//#define DACR_OFFSET 0x00
|
||||
|
||||
/* SPI0 register offsets */
|
||||
@ -267,9 +277,12 @@
|
||||
//~ #define SPI1_ICR_OFFSET 0x20 /* Interrupt Clear Register */
|
||||
|
||||
/* SSP Base Addresses */
|
||||
|
||||
#define SSP0_BASE_ADDR 0xE0068000
|
||||
#define SSP1_BASE_ADDR 0xE0030000
|
||||
|
||||
/* SSP 0/1 register offsets */
|
||||
|
||||
#define SSP_CR0_OFFSET 0x00 /* Control Register 0 */
|
||||
#define SSP_CR1_OFFSET 0x04 /* Control Register 1 */
|
||||
#define SSP_DR_OFFSET 0x08 /* Data Register */
|
||||
@ -282,8 +295,11 @@
|
||||
#define SSP_DMACR_OFFSET 0x24 /* DMA Control Register */
|
||||
|
||||
/* Real Time Clock Base Address */
|
||||
|
||||
#define RTC_BASE_ADDR 0xE0024000
|
||||
|
||||
/* RTC register offsets */
|
||||
|
||||
#define RTC_ILR_OFFSET 0x00 /* Interrupt Location Register */
|
||||
#define RTC_CTC_OFFSET 0x04 /* Clock Tick Counter */
|
||||
#define RTC_CCR_OFFSET 0x08 /* Clock Control Register */
|
||||
@ -312,9 +328,9 @@
|
||||
#define RTC_PREINT_OFFSET 0x80 /* Prescale Value Register (integer) */
|
||||
#define RTC_PREFRAC_OFFSET 0x84 /* Prescale Value Register (fraction) */
|
||||
|
||||
|
||||
/* Watchdog */
|
||||
//~ WDG_BASE_ADDR 0xE0000000
|
||||
|
||||
#define WDMOD_OFFSET 0x00
|
||||
#define WDTC_OFFSET 0x04
|
||||
#define WDFEED_OFFSET 0x08
|
||||
@ -323,6 +339,7 @@
|
||||
|
||||
/* CAN CONTROLLERS AND ACCEPTANCE FILTER */
|
||||
//~ CAN_ACCEPT_BASE_ADDR 0xE003C000
|
||||
|
||||
#define CAN_AFMR_OFFSET 0x00
|
||||
#define CAN_SFF_SA_OFFSET 0x04
|
||||
#define CAN_SFF_GRP_SA_OFFSET 0x08
|
||||
@ -392,8 +409,9 @@
|
||||
#define CAN2TDB3_OFFSET 0x5C
|
||||
|
||||
|
||||
/* MultiMedia Card Interface(MCI) Controller */
|
||||
/* MultiMedia Card Interface(MCI) ontroller */
|
||||
//~ MCI_BASE_ADDR 0xE008C000
|
||||
|
||||
#define MCI_POWER_OFFSET 0x00
|
||||
#define MCI_CLOCK_OFFSET 0x04
|
||||
#define MCI_ARGUMENT_OFFSET 0x08
|
||||
@ -430,6 +448,7 @@
|
||||
|
||||
/* General-purpose DMA Controller */
|
||||
/* DMA_BASE_ADDR 0xFFE04000 */
|
||||
|
||||
#define GPDMA_INT_STAT_OFFSET 0x4000
|
||||
#define GPDMA_INT_TCSTAT_OFFSET 0x4004
|
||||
#define GPDMA_INT_TCCLR_OFFSET 0x4008
|
||||
@ -443,26 +462,31 @@
|
||||
#define GPDMA_SOFT_LBREQ_OFFSET 0x4028
|
||||
#define GPDMA_SOFT_LSREQ_OFFSET 0x402C
|
||||
#define GPDMA_CONFIG_OFFSET 0x4030
|
||||
#define GPDMA_SYNC_OFFSET 0x4034
|
||||
#define GPDMA_SYNC_OFFSET 0x0x4034
|
||||
|
||||
/* DMA channel 0 registers */
|
||||
|
||||
#define GPDMA_CH0_SRC_OFFSET 0x4100
|
||||
#define GPDMA_CH0_DEST_OFFSET 0x4104
|
||||
#define GPDMA_CH0_LLI_OFFSET 0x4108
|
||||
#define GPDMA_CH0_CTRL_OFFSET 0x410C
|
||||
#define GPDMA_CH0_CFG_OFFSET 0x4110
|
||||
|
||||
/* DMA channel 1 registers */
|
||||
|
||||
#define GPDMA_CH1_SRC_OFFSET 0x4120
|
||||
#define GPDMA_CH1_DEST_OFFSET 0x4124
|
||||
#define GPDMA_CH1_LLI_OFFSET 0x4128
|
||||
#define GPDMA_CH1_CTRL_OFFSET 0x412C
|
||||
#define GPDMA_CH1_CFG_OFFSET 0x4130
|
||||
|
||||
|
||||
/* USB Controller */
|
||||
|
||||
#define USB_INT_BASE_ADDR 0xE01FC1C0
|
||||
#define USB_BASE_ADDR 0xFFE0C200 /* USB Base Address */
|
||||
|
||||
/* USB Device Interrupt Registers */
|
||||
|
||||
#define USB_INT_STAT_OFFSET 0x00
|
||||
#define USB_INT_EN_OFFSET 0x04
|
||||
#define USB_INT_CLR_OFFSET 0x08
|
||||
@ -477,15 +501,18 @@
|
||||
#define USB_EP_INT_PRIO_OFFSET 0x40
|
||||
|
||||
/* USB Device Endpoint Realization Registers */
|
||||
|
||||
#define USB_REALIZE_EP_OFFSET 0x44
|
||||
#define USB_EP_INDEX_OFFSET 0x48
|
||||
#define USB_MAXPACKET_SIZE_OFFSET 0x4C
|
||||
|
||||
/* USB Device Command Reagisters */
|
||||
|
||||
#define USB_CMD_CODE_OFFSET 0x10
|
||||
#define USB_CMD_DATA_OFFSET 0x14
|
||||
|
||||
/* USB Device Data Transfer Registers */
|
||||
|
||||
#define USB_RX_DATA_OFFSET 0x18
|
||||
#define USB_TX_DATA_OFFSET 0x1C
|
||||
#define USB_RX_PLENGTH_OFFSET 0x20
|
||||
@ -493,6 +520,7 @@
|
||||
#define USB_USB_CTRL_OFFSET 0x28
|
||||
|
||||
/* USB Device DMA Registers */
|
||||
|
||||
#define USB_DMA_REQ_STAT_OFFSET 0x50
|
||||
#define USB_DMA_REQ_CLR_OFFSET 0x54
|
||||
#define USB_DMA_REQ_SET_OFFSET 0x58
|
||||
@ -513,24 +541,33 @@
|
||||
#define USB_SYS_ERR_INT_SET_OFFSET 0xC0
|
||||
|
||||
/* System Control Block(SCB) modules include Memory Accelerator Module,
|
||||
Phase Locked Loop, VPB divider, Power Control, External Interrupt,
|
||||
Reset, and Code Security/Debugging */
|
||||
* Phase Locked Loop, VPB divider, Power Control, External Interrupt,
|
||||
* Reset, and Code Security/Debugging
|
||||
*/
|
||||
|
||||
#define SCB_BASE_ADDR 0xE01FC000
|
||||
|
||||
/* Memory Accelerator Module (MAM) Regiser */
|
||||
|
||||
#define SCB_MAMCR (*(volatile uint32_t*)(0xE01FC000))
|
||||
#define SCB_MAMTIM (*(volatile uint32_t*)(0xE01FC004))
|
||||
#define SCB_MEMMAP (*(volatile uint32_t*)(0xE01FC040))
|
||||
|
||||
/* Phase Locked Loop (PLL) Register */
|
||||
|
||||
#define SCB_PLLCON (*(volatile uint32_t*)(0xE01FC080))
|
||||
#define SCB_PLLCFG (*(volatile uint32_t*)(0xE01FC084))
|
||||
#define SCB_PLLSTAT (*(volatile uint32_t*)(0xE01FC088))
|
||||
#define SCB_PLLFEED (*(volatile uint32_t*)(0xE01FC08C))
|
||||
|
||||
/* Power Control register */
|
||||
|
||||
#define SCB_PCON (*(volatile uint32_t*)(0xE01FC0C0))
|
||||
#define SCB_PCONP (*(volatile uint32_t*)(0xE01FC0C4))
|
||||
#define SCB_PCONP_OFFSET 0x0C4
|
||||
|
||||
/* Clock Divider Register */
|
||||
|
||||
#define SCB_CCLKCFG (*(volatile uint32_t*)(0xE01FC104))
|
||||
#define SCB_USBCLKCFG (*(volatile uint32_t*)(0xE01FC108))
|
||||
#define SCB_CLKSRCSEL (*(volatile uint32_t*)(0xE01FC10C))
|
||||
@ -538,24 +575,31 @@ Reset, and Code Security/Debugging */
|
||||
#define SCB_PCLKSEL1 (*(volatile uint32_t*)(0xE01FC1AC))
|
||||
#define SCB_PCLKSEL0_OFFSET (0x1A8)
|
||||
#define SCB_PCLKSEL1_OFFSET (0x1AC)
|
||||
|
||||
/* External Interrupt register */
|
||||
|
||||
#define SCB_EXTINT (*(volatile uint32_t*)(0xE01FC140))
|
||||
#define SCB_INTWAKE (*(volatile uint32_t*)(0xE01FC144))
|
||||
#define SCB_EXTMODE (*(volatile uint32_t*)(0xE01FC148))
|
||||
#define SCB_EXTPOLAR (*(volatile uint32_t*)(0xE01FC14C))
|
||||
/* Reser Source Indentification register */
|
||||
|
||||
/* Reser Source Identification register */
|
||||
|
||||
#define SCB_RSIR (*(volatile uint32_t*)(0xE01FC180))
|
||||
|
||||
/* RSID, code security protection */
|
||||
|
||||
#define SCB_CSPR (*(volatile uint32_t*)(0xE01FC184))
|
||||
|
||||
#define SCB_AHBCFG1 (*(volatile uint32_t*)(0xE01FC188))
|
||||
#define SCB_AHBCFG2 (*(volatile uint32_t*)(0xE01FC18C))
|
||||
|
||||
/* System Controls and Status Register */
|
||||
|
||||
#define SCB_SCS (*(volatile uint32_t*)(0xE01FC1A0))
|
||||
|
||||
//~ /* External Memory Controller (EMC) definitions */
|
||||
|
||||
|
||||
/* MPMC(EMC) registers, note: all the external memory controller(EMC) registers
|
||||
are for LPC24xx only. */
|
||||
#define STATIC_MEM0_BASE 0x80000000
|
||||
@ -570,6 +614,7 @@ are for LPC24xx only. */
|
||||
|
||||
/* External Memory Controller (EMC) */
|
||||
//~ #define EMC_BASE_ADDR 0xFFE08000
|
||||
|
||||
#define EMC_CTRL_OFFSET 0x000
|
||||
#define EMC_STAT_OFFSET 0x004
|
||||
#define EMC_CONFIG_OFFSET 0x008
|
||||
@ -600,6 +645,7 @@ are for LPC24xx only. */
|
||||
#define EMC_DYN_RASCAS3_OFFSET 0x184
|
||||
|
||||
/* static RAM access registers */
|
||||
|
||||
#define EMC_STA_CFG0_OFFSET 0x200
|
||||
#define EMC_STA_WAITWEN0_OFFSET 0x204
|
||||
#define EMC_STA_WAITOEN0_OFFSET 0x208
|
||||
@ -624,7 +670,7 @@ are for LPC24xx only. */
|
||||
#define EMC_STA_WAITWR2_OFFSET 0x254
|
||||
#define EMC_STA_WAITTURN2_OFFSET 0x258
|
||||
|
||||
#define EMC_STA_CFG3 0x260
|
||||
#define EMC_STA_CFG3_OFFSET 0x260
|
||||
#define EMC_STA_WAITWEN3_OFFSET 0x264
|
||||
#define EMC_STA_WAITOEN3_OFFSET 0x268
|
||||
#define EMC_STA_WAITRD3_OFFSET 0x26C
|
||||
@ -635,6 +681,7 @@ are for LPC24xx only. */
|
||||
#define EMC_STA_EXT_WAIT_OFFSET 0x880
|
||||
|
||||
/* GPIO register offsets WORD access */
|
||||
|
||||
#define GPIO0_PIN_OFFSET 0x00 /* Pin Value Register */
|
||||
#define GPIO0_SET_OFFSET 0x04 /* Pin Output Set Register */
|
||||
#define GPIO0_DIR_OFFSET 0x08 /* Pin Direction Register */
|
||||
@ -645,8 +692,11 @@ are for LPC24xx only. */
|
||||
#define GPIO1_CLR_OFFSET 0x1c /* Pin Output Clear Register */
|
||||
|
||||
/* Fast I0 Base Address */
|
||||
|
||||
#define FIO_BASE_ADDR 0x3FFFC000
|
||||
|
||||
/* FIO register offsets WORD access */
|
||||
|
||||
#define FIO0_DIR_OFFSET 0x00 /* Fast GPIO Port Direction Register */
|
||||
#define FIO0_MASK_OFFSET 0x10 /* Fast GPIO Mask Register */
|
||||
#define FIO0_PIN_OFFSET 0x14 /* Fast GPIO Pin Value Register */
|
||||
@ -677,7 +727,6 @@ are for LPC24xx only. */
|
||||
#define FIO4_SET_OFFSET 0x98 /* Fast GPIO Port Output Set Register */
|
||||
#define FIO4_CLR_OFFSET 0x9c /* Fast GPIO Port Output Clear Register */
|
||||
|
||||
|
||||
/* FIO register offsets HALF-WORD access */
|
||||
|
||||
#define FIO0MASKL_OFFSET 0x10 /* Fast IO Mask Lower HALF-WORD */
|
||||
@ -740,7 +789,6 @@ are for LPC24xx only. */
|
||||
#define FIO3DIRU_OFFSET 0x62
|
||||
#define FIO4DIRU_OFFSET 0x82
|
||||
|
||||
|
||||
/* FIO register offsets BYTE access */
|
||||
|
||||
#define FIO0DIR0_OFFSET 0x00
|
||||
@ -876,7 +924,6 @@ are for LPC24xx only. */
|
||||
#define VIC_PROTECTION_OFFSET 0x020 /* Protection Enable Register */
|
||||
#define VIC_PRIORITY_MASK_OFFSET 0x024 /* Priority Mask Register */
|
||||
|
||||
|
||||
//~ #define LPC23XX_VIC_BASE 0xfffff000 /* Vectored Interrupt Controller (VIC) Base */
|
||||
#define VIC_ADDRESS_OFFSET 0xF00 /* RW: Vector Address Register */
|
||||
|
||||
@ -913,8 +960,8 @@ are for LPC24xx only. */
|
||||
#define VIC_VECTADDR30_OFFSET 0x178 /* RW: Vector Address 30 Register */
|
||||
#define VIC_VECTADDR31_OFFSET 0x17c /* RW: Vector Address 31 Register */
|
||||
|
||||
|
||||
/*VICVectPriority */
|
||||
|
||||
#define VIC_VECTPRIORITY0_OFFSET 0x200 /* RW: Vector Control 0 Register */
|
||||
#define VIC_VECTPRIORITY1_OFFSET 0x204 /* RW: Vector Control 1 Register */
|
||||
#define VIC_VECTPRIORITY2_OFFSET 0x208 /* RW: Vector Control 2 Register */
|
||||
|
@ -377,7 +377,7 @@ static int i2c_interrupt (int irq, FAR void *context)
|
||||
/* Reference UM10360 19.10.5 */
|
||||
|
||||
uint32_t state = getreg32(priv->base + I2C_STAT_OFFSET);
|
||||
putreg32(I2C_CONCLR_SIC, priv->base + 2C_CONCLR_OFFSET);
|
||||
putreg32(I2C_CONCLR_SIC, priv->base + I2C_CONCLR_OFFSET);
|
||||
|
||||
priv->state = state;
|
||||
state &= 0xf8;
|
||||
|
Loading…
Reference in New Issue
Block a user