mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
MIPS: Alchemy: devboard register abstraction
All Alchemy development boards have external CPLDs with a few registers in them. They all share an identical register layout with only a few minor differences (except the PB1000) in bit functions and base addresses. This patch - adds a primitive facility to initialize and use these external registers, - replaces all occurrences of bcsr->xxx accesses with calls to the new functions (the pb1200 cascade irq handling code is special). - collects BCSR register information scattered throughout the board headers in a central place. Signed-off-by: Manuel Lauss <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
This commit is contained in:
parent
ebc89718a4
commit
9bdcf336d0
19 changed files with 475 additions and 596 deletions
|
|
@ -19,6 +19,7 @@
|
|||
#include <asm/io.h>
|
||||
|
||||
#include <asm/mach-au1x00/au1xxx.h>
|
||||
#include <asm/mach-db1x00/bcsr.h>
|
||||
|
||||
/*
|
||||
* MTD structure for NAND controller
|
||||
|
|
@ -475,7 +476,8 @@ static int __init au1xxx_nand_init(void)
|
|||
/* set gpio206 high */
|
||||
au_writel(au_readl(GPIO2_DIR) & ~(1 << 6), GPIO2_DIR);
|
||||
|
||||
boot_swapboot = (au_readl(MEM_STSTAT) & (0x7 << 1)) | ((bcsr->status >> 6) & 0x1);
|
||||
boot_swapboot = (au_readl(MEM_STSTAT) & (0x7 << 1)) | ((bcsr_read(BCSR_STATUS) >> 6) & 0x1);
|
||||
|
||||
switch (boot_swapboot) {
|
||||
case 0:
|
||||
case 2:
|
||||
|
|
|
|||
Loading…
Reference in a new issue