diff options
Diffstat (limited to 'include/asm-arm/arch-ixp2000/system.h')
| -rw-r--r-- | include/asm-arm/arch-ixp2000/system.h | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/include/asm-arm/arch-ixp2000/system.h b/include/asm-arm/arch-ixp2000/system.h index 4f489cc0dfa5..ddbbb34b5f95 100644 --- a/include/asm-arm/arch-ixp2000/system.h +++ b/include/asm-arm/arch-ixp2000/system.h | |||
| @@ -26,29 +26,24 @@ static inline void arch_reset(char mode) | |||
| 26 | * RedBoot bank. | 26 | * RedBoot bank. |
| 27 | */ | 27 | */ |
| 28 | if (machine_is_ixdp2401()) { | 28 | if (machine_is_ixdp2401()) { |
| 29 | *IXDP2X01_CPLD_FLASH_REG = ((0 >> IXDP2X01_FLASH_WINDOW_BITS) | 29 | ixp2000_reg_write(IXDP2X01_CPLD_FLASH_REG, |
| 30 | | IXDP2X01_CPLD_FLASH_INTERN); | 30 | ((0 >> IXDP2X01_FLASH_WINDOW_BITS) |
| 31 | *IXDP2X01_CPLD_RESET_REG = 0xffffffff; | 31 | | IXDP2X01_CPLD_FLASH_INTERN)); |
| 32 | ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0xffffffff); | ||
| 32 | } | 33 | } |
| 33 | 34 | ||
| 34 | /* | 35 | /* |
| 35 | * On IXDP2801 we need to write this magic sequence to the CPLD | 36 | * On IXDP2801 we need to write this magic sequence to the CPLD |
| 36 | * to cause a complete reset of the CPU and all external devices | 37 | * to cause a complete reset of the CPU and all external devices |
| 37 | * and moves the flash bank register back to 0. | 38 | * and move the flash bank register back to 0. |
| 38 | */ | 39 | */ |
| 39 | if (machine_is_ixdp2801()) { | 40 | if (machine_is_ixdp2801()) { |
| 40 | unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG; | 41 | unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG; |
| 42 | |||
| 41 | reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF); | 43 | reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF); |
| 42 | *IXDP2X01_CPLD_RESET_REG = reset_reg; | 44 | ixp2000_reg_write(IXDP2X01_CPLD_RESET_REG, reset_reg); |
| 43 | mb(); | 45 | ixp2000_reg_wrb(IXDP2X01_CPLD_RESET_REG, 0x80000000); |
| 44 | *IXDP2X01_CPLD_RESET_REG = 0x80000000; | ||
| 45 | } | 46 | } |
| 46 | 47 | ||
| 47 | /* | 48 | ixp2000_reg_wrb(IXP2000_RESET0, RSTALL); |
| 48 | * We do a reset all if we are PCI master. We could be a slave and we | ||
| 49 | * don't want to do anything funky on the PCI bus. | ||
| 50 | */ | ||
| 51 | if (*IXP2000_STRAP_OPTIONS & CFG_PCI_BOOT_HOST) { | ||
| 52 | *(IXP2000_RESET0) |= (RSTALL); | ||
| 53 | } | ||
| 54 | } | 49 | } |
