2002-11-06 Marcel Telka <marcel@telka.sk>

* common.h: Added bits_get() macro.
	* arm/pxa2x0/uart.h: Added get_* macros for register bits.
	* arm/pxa2x0/ic.h: Added symbolic names for IRQs.


git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@263 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Marcel Telka 22 years ago
parent 7d529c02cb
commit c91ba33e1e

@ -1,6 +1,8 @@
2002-11-06 Marcel Telka <marcel@telka.sk>
* arm/pxa2x0/uart.h: Fixed formatting.
* common.h: Added bits_get() macro.
* arm/pxa2x0/uart.h: Added get_* macros for register bits.
* arm/pxa2x0/ic.h: Added symbolic names for IRQs.
2002-11-04 Marcel Telka <marcel@telka.sk>
@ -10,7 +12,6 @@
* arm/pxa2x0/gpio.h: Added ALT_FN_0_IN and ALT_FN_0_OUT declarations.
* arm/pxa2x0/pmrc.h: Added missing PWER_WEx (where x = 0 through 15) declarations.
* arm/pxa2x0/rtc.h: Fixed RTTR bit declarations.
* NEWS: Added new file.
2002-11-02 Marcel Telka <marcel@telka.sk>

@ -9,6 +9,8 @@ Changes in include since version 0.1:
- added ALT_FN_0_IN and ALT_FN_0_OUT declarations
- added missing PWER_WEx (where x = 0 through 15) declarations
- fixed RTTR bit declarations
- added new get_* macros for UART register bits
- added symbolic names for IRQ masks (IC_IRQ_*)
* Changes in SA11x0 support:
- added _t suffix for register type names
* Removed _t suffix from structure names in CFI declarations.

@ -116,6 +116,38 @@ typedef volatile struct IC_registers {
#define IC_IRQ7 bit(7)
#endif /* PXA26x only */
/* symbolic names for IRQs - see Table 4-36 in [1], Table 4-36 in [2] */
#define IC_IRQ_RTC_ALARM IC_IRQ31
#define IC_IRQ_RTC_HZ IC_IRQ30
#define IC_IRQ_OST3 IC_IRQ29
#define IC_IRQ_OST2 IC_IRQ28
#define IC_IRQ_OST1 IC_IRQ27
#define IC_IRQ_OST0 IC_IRQ26
#define IC_IRQ_DMA IC_IRQ25
#define IC_IRQ_SSP IC_IRQ24
#define IC_IRQ_MMC IC_IRQ23
#define IC_IRQ_FFUART IC_IRQ22
#define IC_IRQ_BTUART IC_IRQ21
#define IC_IRQ_STUART IC_IRQ20
#define IC_IRQ_ICP IC_IRQ19
#define IC_IRQ_I2C IC_IRQ18
#define IC_IRQ_LCD IC_IRQ17
#if !defined(PXA2X0_NOPXA26X)
#define IC_IRQ_NSSP IC_IRQ16
#define IC_IRQ_ASSP IC_IRQ15
#endif /* PXA26x only */
#define IC_IRQ_AC97 IC_IRQ14
#define IC_IRQ_I2S IC_IRQ13
#define IC_IRQ_PMU IC_IRQ12
#define IC_IRQ_USB IC_IRQ11
#define IC_IRQ_GPIO IC_IRQ10
#define IC_IRQ_GPIO1 IC_IRQ9
#define IC_IRQ_GPIO0 IC_IRQ8
#if !defined(PXA2X0_NOPXA26X)
#define IC_IRQ_HWUART IC_IRQ7
#endif /* PXA26x only */
/* ICCR bits - see Table 4-33 in [1], Table in [2] */
#define ICCR_DIM bit(0)

@ -214,18 +214,21 @@ typedef volatile struct UART_registers {
#define IIR_FIFOES_MASK bits(7,6)
#define IIR_FIFOES(x) bits_val(7,6,x)
#define get_IIR_FIFOES(x) bits_get(7,6,x)
#if !defined(PXA2X0_NOPXA26X)
#define IIR_ABL bit(4) /* only for HWUART */
#endif /* PXA26x only */
#define IIR_TOD bit(3)
#define IIR_IID_MASK bits(2,1)
#define IIR_IID(x) bits_val(2,1,x)
#define get_IIR_IID(x) bits_get(2,1,x)
#define IIR_IP bit(0)
/* FCR bits - see Table 10-11 in [1], Table 10-11 in [2], Table 17-10 in [2] */
#define FCR_ITL_MASK bits(7,6)
#define FCR_ITL(x) bits_val(7,6,x)
#define get_FCR_ITL(x) bits_get(7,6,x)
#if !defined(PXA2X0_NOPXA26X)
#define FCR_TIL bit(3) /* only for HWUART */
#endif /* PXA26x only */
@ -243,6 +246,7 @@ typedef volatile struct UART_registers {
#define LCR_STB bit(2)
#define LCR_WLS_MASK bits(1,0)
#define LCR_WLS(x) bits_val(1,0,x)
#define get_LCR_WLS(x) bits_get(1,0,x)
/* LSR bits - see Table 10-13 in [1], Table 10-13 in [2], Table 17-15 in [2] */
@ -281,6 +285,7 @@ typedef volatile struct UART_registers {
#define SPR_SP_MASK bits(7,0)
#define SPR_SP(x) bits_val(7,0,x)
#define get_SPR_SP(x) bits_get(7,0,x)
/* ISR bits - see Table 10-17 in [1], Table 10-17 in [2], Table 17-19 in [2] */
@ -295,6 +300,7 @@ typedef volatile struct UART_registers {
#define HWFOR_BC_MASK bits(6,0)
#define HWFOR_BC(x) bits_val(6,0,x)
#define get_HWFOR_BC(x) bits_get(6,0,x)
/* HWABR bits - see Table 17-12 in [2] */
@ -307,6 +313,7 @@ typedef volatile struct UART_registers {
#define HWACR_ACR_MASK bits(15,0)
#define HWACR_ACR(x) bits_val(15,0,x)
#define get_HWACR_ACR(x) bits_get(15,0,x)
#endif /* PXA26x only */
#endif /* PXA2X0_UART_H */

@ -58,5 +58,6 @@
#define bit(b) (1 << (b))
#define bits(b1,b2) (((2 << BITS_ABS((b1) - (b2))) - 1) << BITS_MIN(b1,b2))
#define bits_val(b1,b2,v) (((v) << BITS_MIN(b1,b2)) & bits(b1,b2))
#define bits_get(b1,b2,v) (((v) & bits(b1,b2)) >> BITS_MIN(b1,b2))
#endif /* COMMON_H */

Loading…
Cancel
Save