summaryrefslogtreecommitdiff
path: root/include/lh7a400.h
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-06-10 21:55:33 +0000
committerwdenk <wdenk>2004-06-10 21:55:33 +0000
commitf832d8a1432da791b94b820ccf2c7864708c5631 (patch)
tree6521bd856efe4951d6a17288ae02ab3c3ed6e7a4 /include/lh7a400.h
parentb54d32b40d95d399dd1f53f24c93b0cf5c42460d (diff)
downloadu-boot-f832d8a1432da791b94b820ccf2c7864708c5631.tar.gz
u-boot-f832d8a1432da791b94b820ccf2c7864708c5631.tar.bz2
u-boot-f832d8a1432da791b94b820ccf2c7864708c5631.zip
* Patch by Paul Ruhland, 10 Jun 2004:
fix support for Logic SDK-LH7A404 board and clean up the LH7A404 register macros. * Patch by Matthew McClintock, 10 Jun 2004: Modify code to select correct serial clock on Sandpoint8245
Diffstat (limited to 'include/lh7a400.h')
-rw-r--r--include/lh7a400.h54
1 files changed, 18 insertions, 36 deletions
diff --git a/include/lh7a400.h b/include/lh7a400.h
index e43667dc92..d1e70a228b 100644
--- a/include/lh7a400.h
+++ b/include/lh7a400.h
@@ -38,35 +38,17 @@ typedef struct {
volatile u32 rsvd3;
} /*__attribute__((__packed__))*/ lh7a400_interrupt_t;
#define LH7A400_INTERRUPT_BASE (0x80000500)
-#define LH7A400_INTERRUPT_PTR(name) lh7a400_interrupt_t* name = (lh7a400_interrupt_t*) LH7A400_INTERRUPT_BASE
+#define LH7A400_INTERRUPT_PTR ((lh7a400_interrupt_t*) LH7A400_INTERRUPT_BASE)
/* (DMA) Direct Memory Access Controller (userguide 9.2.1) */
typedef struct {
- volatile u32 maxcnt;
- volatile u32 base;
- volatile u32 current;
- volatile u32 rsvd1;
-} lh7a400_dmabuf_t;
-
-typedef struct {
- volatile u32 control;
- volatile u32 interrupt;
- volatile u32 rsvd1;
- volatile u32 status;
- volatile u32 rsvd2;
- volatile u32 remain;
- volatile u32 rsvd3;
- volatile u32 rsvd4;
- lh7a400_dmabuf_t buf[2];
-} /*__attribute__((__packed__))*/ lh7a400_dmachan_t;
-
-typedef struct {
- lh7a400_dmachan_t chan[15];
+ lh7a40x_dmachan_t chan[15];
volatile u32 glblint;
volatile u32 rsvd1;
volatile u32 rsvd2;
volatile u32 rsvd3;
} /*__attribute__((__packed__))*/ lh7a400_dma_t;
+
#define LH7A400_DMA_BASE (0x80002800)
#define DMA_USBTX_OFFSET (0x000)
#define DMA_USBRX_OFFSET (0x040)
@@ -74,20 +56,20 @@ typedef struct {
#define DMA_MMCRX_OFFSET (0x0C0)
#define DMA_AC97_BASE (0x80002A00)
-#define LH7A400_DMA_PTR(name) lh7a400_dma_t* name = (lh7a400_dma_t*) LH7A400_DMA_BASE
-#define LH7A400_DMA_USBTX(name) \
- lh7a400_dmachan_t* name = (lh7a400_dmachan_t*) (LH7A400_DMA_BASE + DMA_USBTX_OFFSET)
-#define LH7A400_DMA_USBRX(name) \
- lh7a400_dmachan_t* name = (lh7a400_dmachan_t*) (LH7A400_DMA_BASE + DMA_USBRX_OFFSET)
-#define LH7A400_DMA_MMCTX(name) \
- lh7a400_dmachan_t* name = (lh7a400_dmachan_t*) (LH7A400_DMA_BASE + DMA_MMCTX_OFFSET)
-#define LH7A400_DMA_MMCRX(name) \
- lh7a400_dmachan_t* name = (lh7a400_dmachan_t*) (LH7A400_DMA_BASE + DMA_MMCRX_OFFSET)
-#define LH7A400_AC97RX(name,n) \
- lh7a400_dmachan_t* name = (lh7a400_dmachan_t*) (LH7A400_AC97_BASE + \
- ((2*n) * sizeof(lh7a400_dmachan_t)))
-#define LH7A400_AC97TX(name,n) \
- lh7a400_dmachan_t* name = (lh7a400_dmachan_t*) (LH7A400_AC97_BASE + \
- (((2*n)+1) * sizeof(lh7a400_dmachan_t)))
+#define LH7A400_DMA_PTR ((lh7a400_dma_t*) LH7A400_DMA_BASE)
+#define LH7A400_DMA_USBTX \
+ ((lh7a400_dmachan_t*) (LH7A400_DMA_BASE + DMA_USBTX_OFFSET))
+#define LH7A400_DMA_USBRX \
+ ((lh7a400_dmachan_t*) (LH7A400_DMA_BASE + DMA_USBRX_OFFSET))
+#define LH7A400_DMA_MMCTX \
+ ((lh7a400_dmachan_t*) (LH7A400_DMA_BASE + DMA_MMCTX_OFFSET))
+#define LH7A400_DMA_MMCRX \
+ ((lh7a400_dmachan_t*) (LH7A400_DMA_BASE + DMA_MMCRX_OFFSET))
+#define LH7A400_AC97RX(n) \
+ ((lh7a400_dmachan_t*) (LH7A400_AC97_BASE + \
+ ((2*n) * sizeof(lh7a400_dmachan_t))))
+#define LH7A400_AC97TX(n) \
+ ((lh7a400_dmachan_t*) (LH7A400_AC97_BASE + \
+ (((2*n)+1) * sizeof(lh7a400_dmachan_t))))
#endif /* __LH7A400_H__ */