86xx: Update Global Utilities structure
PATCH 1/2 86xx: Update Global Utilities structure
Signed-off-by Peter Tyser <[email protected]>
--- include/asm-ppc/immap_86xx.h | 29 +++++++++++++++++++++-------- 1 files changed, 21 insertions(+), 8 deletions(-)
include/asm-ppc/immap_86xx.h +21 -8
@@ -1289,22 +1289,35 @@ typedef struct ccsr_gur {uint powmgtcsr;/* 0xe0080 - Power management status and control register */ char res8[12 ];uint mcpsumr;/* 0xe0090 - Machine check summary register */ -char res9[12 ]; +uint rstrscr;/* 0xe0094 - Reset request status and control register */ +char res9[8 ];uint pvr;/* 0xe00a0 - Processor version register */ uint svr;/* 0xe00a4 - System version register */ -char res10a[1880 ]; +char res10a[8 ]; +uint rstcr;/* 0xe00b0 - Reset control register */ +#define MPC86xx_RSTCR_HRST_REQ 0x00000002 +char res10b[1868 ];uint clkdvdr;/* 0xe0800 - Clock Divide register */ -char res10b[1532 ]; +char res10c[796 ]; +uint ddr1clkdr;/* 0xe0b20 - DDRC1 Clock Disable register */ +char res10d[4 ]; +uint ddr2clkdr;/* 0xe0b28 - DDRC2 Clock Disable register */ +char res10e[724 ];uint clkocr;/* 0xe0e00 - Clock out select register */ char res11[12 ];uint ddrdllcr;/* 0xe0e10 - DDR DLL control register */ char res12[12 ];uint lbcdllcr;/* 0xe0e20 - LBC DLL control register */ -int res13[57 ]; -uint lynxdcr1;/* 0xe0f08 - Lynx debug control register 1*/ -int res14[6 ]; -uint ddrioovcr;/* 0xe0f24 - DDR IO Overdrive Control register */ -char res15[216 ]; +char res13a[224 ]; +uint srds1cr0;/* 0xe0f04 - SerDes1 control register 0 */ +char res13b[4 ]; +uint srds1cr1;/* 0xe0f08 - SerDes1 control register 1 */ +char res14[24 ]; +uint ddrioovcr;/* 0xe0f24 - DDR IO Overdrive Control register */ +char res15a[24 ]; +uint srds2cr0;/* 0xe0f40 - SerDes2 control register 0 */ +uint srds2cr1;/* 0xe0f44 - SerDes2 control register 1 */ +char res16[184 ]; } ccsr_gur_t;/*
Signature · 1 line
1.6.0.2.GIT
PATCH 2/2 86xx: Reset update
Update the 86xx reset sequence to try executing a board-specific reset function. If the board-specific reset is not implemented or does not succeed, then assert #HRESET_REQ. Using #HRESET_REQ is a more standard reset procedure than the previous method and allows all board peripherals to be reset if needed.
Signed-off-by Peter Tyser <[email protected]>
--- board/freescale/mpc8610hpcd/mpc8610hpcd.c | 8 +++ board/freescale/mpc8641hpcn/mpc8641hpcn.c | 8 +++ board/sbc8641d/sbc8641d.c | 29 ++++++++++ cpu/mpc86xx/cpu.c | 80 +++++++---------------------- include/configs/MPC8610HPCD.h | 2 - include/configs/MPC8641HPCN.h | 2 - 6 files changed, 64 insertions(+), 65 deletions(-)
board/freescale/mpc8610hpcd/mpc8610hpcd.c +8 -0
@@ -484,3 +484,11 @@ int board_eth_init(bd_t *bis) {return pci_eth_init (bis); } + +void board_reset (void ) +{ +out8 (PIXIS_BASE +PIXIS_RST ,0 ); + +while (1 ) + ; +}
board/freescale/mpc8641hpcn/mpc8641hpcn.c +8 -0
@@ -363,3 +363,11 @@ int board_eth_init(bd_t *bis)cpu_eth_init (bis);return pci_eth_init (bis); } + +void board_reset (void ) +{ +out8 (PIXIS_BASE +PIXIS_RST ,0 ); + +while (1 ) + ; +}
board/sbc8641d/sbc8641d.c +29 -0
@@ -384,3 +384,32 @@ unsigned long get_board_sys_clk (ulong dummy)return val; } + +void board_reset (void ) +{ +#ifdef CONFIG_SYS_RESET_ADDRESS +ulong addr =CONFIG_SYS_RESET_ADDRESS ; + +/* flush and disable I/D cache */ + __asm__ __volatile__ ("mfspr 3, 1008" :::"r3" ); + __asm__ __volatile__ ("ori 5, 5, 0xcc00" :::"r5" ); + __asm__ __volatile__ ("ori 4, 3, 0xc00" :::"r4" ); + __asm__ __volatile__ ("andc 5, 3, 5" :::"r5" ); + __asm__ __volatile__ ("sync" ); + __asm__ __volatile__ ("mtspr 1008, 4" ); + __asm__ __volatile__ ("isync" ); + __asm__ __volatile__ ("sync" ); + __asm__ __volatile__ ("mtspr 1008, 5" ); + __asm__ __volatile__ ("isync" ); + __asm__ __volatile__ ("sync" ); + +/* +* SRR0 has system reset vector, SRR1 has default MSR value +* rfi restores MSR from SRR1 and sets the PC to the SRR0 value +*/ + __asm__ __volatile__ ("mtspr 26, %0" ::"r" (addr)); + __asm__ __volatile__ ("li 4, (1 << 6)" :::"r4" ); + __asm__ __volatile__ ("mtspr 27, 4" ); + __asm__ __volatile__ ("rfi" ); +#endif +}
cpu/mpc86xx/cpu.c +19 -61
98 lines not on this page · raw message
include/configs/MPC8610HPCD.h +0 -2
@@ -34,8 +34,6 @@#define CONFIG_SYS_DIAG_ADDR 0xff800000#endif -#define CONFIG_SYS_RESET_ADDRESS 0xfff00100 -/* * virtual address to be used for temporary mappings. There * should be 128k free at this VA.
include/configs/MPC8641HPCN.h +0 -2
@@ -44,8 +44,6 @@#define CONFIG_SYS_DIAG_ADDR CONFIG_SYS_FLASH_BASE#endif -#define CONFIG_SYS_RESET_ADDRESS 0xfff00100 -/* * virtual address to be used for temporary mappings. There * should be 128k free at this VA.
Signature · 1 line
1.6.0.2.GIT