ppc4xx: Overhaul for cmd reginfo
v2 cover ppc4xx: Overhaul for cmd reginfo
The command "reginfo" got an overhaul for the ppc4xx. It dumps all the relevant HW configuration registers (address, symbolic name, content). This allows to easily detect errors in *.h files and changes in the HW configuration.
It is split in the following parts:
- Cleanup some HW register names:
Here you find all the changes in the include directory for new register names and adapting other ones to the names used by AMCC in their manuals, e.g. For 440EPx/GRPPC440EPx/GRX, Revision 1.15 ??? September 22, 2008 For PPC405GP Embedded Processor, Revision 1.02 ??? March 22, 2006
- Apply new HW register names
Modify all existing *.c files to use the new register names.
- Rework cmd reginfo
Here the real work done to improve the reginfo command.
- respect 80-chars per line in ppc*.h files
After running checkstyle.pl on the three previous patches I noted that in the *.h files there were a lot of long lines. This patch solves this problem.
I tested the changes on my PPC405GPr board HCU4 and PPC440EPx board HCU5.
Only ran MAKEALL 4xx as I have no other cross-compilers installed.
As I had not time to consult the documentation of all PPC440 variants (not have I boards to test it) the code in reginfo will probably dump less registers for none PPC440EPx variants.
The DMA-registers are not dumped for the PPC440.
I know that I could spend not only many hours but weeks to cleanup all the PPC4xx register naming conventions.
I did not feel it my responsability to bring the lines in all 4xx board specific code to fit into 80 chars. But I think I will have soon a look at all the common 4xx files to bring them in shape as I would really like that a tool like checkstyle.pl from the Linux kernel only reports my errors.
Niklaus Giger (4):
ppc4xx: Cleanup some HW register names
ppc_4xx: Apply new HW register names
ppc4xx: Rework cmd reginfo
ppc4xx: respect 80-chars per line in ppc*.h files
board/amcc/bamboo/bamboo.c | 32 +- board/amcc/canyonlands/canyonlands.c | 22 +- board/amcc/ebony/ebony.c | 22 +- board/amcc/katmai/katmai.c | 22 +- board/amcc/luan/epld.h | 22 +- board/amcc/luan/luan.c | 22 +- board/amcc/ocotea/ocotea.c | 22 +- board/amcc/sequoia/sequoia.c | 28 +- board/amcc/taishan/showinfo.c | 112 ++-- board/amcc/taishan/taishan.c | 22 +- board/amcc/yosemite/yosemite.c | 32 +- board/amcc/yucca/yucca.c | 22 +- board/esd/common/cmd_loadpci.c | 2 +- board/esd/du440/du440.c | 28 +- board/esd/pmc440/cmd_pmc440.c | 10 +- board/esd/pmc440/pmc440.c | 32 +- board/exbitgen/init.S | 4 +- board/gdsys/gdppc440etx/gdppc440etx.c | 32 +- board/gdsys/intip/intip.c | 22 +- board/korat/korat.c | 28 +- board/lwmon5/lwmon5.c | 32 +- board/netstal/hcu5/hcu5.c | 28 +- board/pcs440ep/pcs440ep.c | 32 +- board/prodrive/alpr/alpr.c | 52 +- board/prodrive/p3p440/p3p440.c | 22 +- board/sandburst/common/ppc440gx_i2c.h | 2 +- board/sandburst/common/sb_common.c | 22 +- board/xes/xpedite1000/xpedite1000.c | 24 +- common/cmd_reginfo.c | 158 +---- cpu/ppc4xx/4xx_pci.c | 48 +- cpu/ppc4xx/Makefile | 4 + cpu/ppc4xx/cpu_init.c | 4 +- cpu/ppc4xx/miiphy.c | 24 +- cpu/ppc4xx/reginfo.c | 370 +++++++++ cpu/ppc4xx/speed.c | 6 +- drivers/net/4xx_enet.c | 100 ++-- include/4xx_i2c.h | 2 +- include/ppc405.h | 530 +++++++------- include/ppc440.h | 1401 +++++++++++++++++++-------------- include/ppc4xx.h | 36 +- include/ppc4xx_enet.h | 314 ++++---- post/cpu/ppc4xx/ether.c | 50 +- 42 files changed, 2109 insertions(+), 1690 deletions(-) create mode 100644 cpu/ppc4xx/reginfo.c
v2 cover *** SUBJECT HERE ***
*** BLURB HERE ***
Niklaus Giger (4):
ppc4xx: Cleanup some HW register names
ppc_4xx: Apply new HW register names
ppc4xx: Rework cmd reginfo
ppc4xx: respect 80-chars per line in ppc*.h files
board/amcc/bamboo/bamboo.c | 32 +- board/amcc/canyonlands/canyonlands.c | 22 +- board/amcc/ebony/ebony.c | 22 +- board/amcc/katmai/katmai.c | 22 +- board/amcc/luan/epld.h | 22 +- board/amcc/luan/luan.c | 22 +- board/amcc/ocotea/ocotea.c | 22 +- board/amcc/sequoia/sequoia.c | 28 +- board/amcc/taishan/showinfo.c | 112 ++-- board/amcc/taishan/taishan.c | 22 +- board/amcc/yosemite/yosemite.c | 32 +- board/amcc/yucca/yucca.c | 22 +- board/esd/common/cmd_loadpci.c | 2 +- board/esd/du440/du440.c | 28 +- board/esd/pmc440/cmd_pmc440.c | 10 +- board/esd/pmc440/pmc440.c | 32 +- board/exbitgen/init.S | 4 +- board/gdsys/gdppc440etx/gdppc440etx.c | 32 +- board/gdsys/intip/intip.c | 22 +- board/korat/korat.c | 28 +- board/lwmon5/lwmon5.c | 32 +- board/netstal/hcu5/hcu5.c | 28 +- board/pcs440ep/pcs440ep.c | 32 +- board/prodrive/alpr/alpr.c | 52 +- board/prodrive/p3p440/p3p440.c | 22 +- board/sandburst/common/ppc440gx_i2c.h | 2 +- board/sandburst/common/sb_common.c | 22 +- board/xes/xpedite1000/xpedite1000.c | 24 +- common/cmd_reginfo.c | 158 +---- cpu/ppc4xx/4xx_pci.c | 48 +- cpu/ppc4xx/Makefile | 4 + cpu/ppc4xx/cpu_init.c | 4 +- cpu/ppc4xx/miiphy.c | 24 +- cpu/ppc4xx/reginfo.c | 370 +++++++++ cpu/ppc4xx/speed.c | 6 +- drivers/net/4xx_enet.c | 100 ++-- include/4xx_i2c.h | 2 +- include/ppc405.h | 530 +++++++------- include/ppc440.h | 1401 +++++++++++++++++++-------------- include/ppc4xx.h | 36 +- include/ppc4xx_enet.h | 314 ++++---- post/cpu/ppc4xx/ether.c | 50 +- 42 files changed, 2109 insertions(+), 1690 deletions(-) create mode 100644 cpu/ppc4xx/reginfo.c
PATCH v2 1/4 ppc4xx: Cleanup some HW register names
Here you find all the changes in the include directory for new register names and adapting other ones to the names used by AMCC in their manuals, e.g. For 440EPx/GRPPC440EPx/GRX, Revision 1.15 ? September 22, 2008 For PPC405GP Embedded Processor, Revision 1.02 ? March 22, 2006
--- include/4xx_i2c.h | 2 +- include/ppc405.h | 4 +- include/ppc440.h | 179 ++++++++++++++++++++++------------------ include/ppc4xx_enet.h | 220 +++++++++++++++++++++++++------------------------ 4 files changed, 216 insertions(+), 189 deletions(-)
include/4xx_i2c.h +1 -1
@@ -63,7 +63,7 @@#define IIC_EXTSTS (I2C_REGISTERS_BASE_ADDRESS+IICEXTSTS)#define IIC_LSADR (I2C_REGISTERS_BASE_ADDRESS+IICLSADR)#define IIC_HSADR (I2C_REGISTERS_BASE_ADDRESS+IICHSADR) -#define IIC_CLKDIV (I2C_REGISTERS_BASE_ADDRESS+IICCLKDIV) +#define IIC_CLKDIV (I2C_REGISTERS_BASE_ADDRESS+IIC0_CLKDIV)#define IIC_INTRMSK (I2C_REGISTERS_BASE_ADDRESS+IICINTRMSK)#define IIC_XFRCNT (I2C_REGISTERS_BASE_ADDRESS+IICXFRCNT)#define IIC_XTCNTLSS (I2C_REGISTERS_BASE_ADDRESS+IICXTCNTLSS)
include/ppc405.h +2 -2
@@ -578,7 +578,7 @@#define IICEXTSTS 0x09#define IICLSADR 0x0A#define IICHSADR 0x0B -#define IICCLKDIV 0x0C +#define IIC0_CLKDIV 0x0C#define IICINTRMSK 0x0D#define IICXFRCNT 0x0E#define IICXTCNTLSS 0x0F
@@ -760,7 +760,7 @@#define CPR0_PLLD 0x060#define CPR0_CPUD 0x080#define CPR0_PLBD 0x0a0 -#define CPR0_OPBD 0x0c0 +#define CPR0_OPBD0 0x0c0#define CPR0_PERD 0x0e0#define SDR0_PINSTP 0x0040
include/ppc440.h +99 -80
226 lines not on this page · raw message
include/ppc4xx_enet.h +114 -106
275 lines not on this page · raw message
Signature · 1 line
1.6.3.3
PATCH v2 2/4 ppc_4xx: Apply new HW register names
Modify all existing *.c files to use the new register names as seen in the AMCC manuals.
--- board/amcc/bamboo/bamboo.c | 32 +++++----- board/amcc/canyonlands/canyonlands.c | 22 +++--- board/amcc/ebony/ebony.c | 22 +++--- board/amcc/katmai/katmai.c | 22 +++--- board/amcc/luan/epld.h | 22 +++--- board/amcc/luan/luan.c | 22 +++--- board/amcc/ocotea/ocotea.c | 22 +++--- board/amcc/sequoia/sequoia.c | 28 ++++---- board/amcc/taishan/showinfo.c | 112 ++++++++++++++++---------------- board/amcc/taishan/taishan.c | 22 +++--- board/amcc/yosemite/yosemite.c | 32 +++++----- board/amcc/yucca/yucca.c | 22 +++--- board/esd/common/cmd_loadpci.c | 2 +- board/esd/du440/du440.c | 28 ++++---- board/esd/pmc440/cmd_pmc440.c | 10 ++-- board/esd/pmc440/pmc440.c | 32 +++++----- board/exbitgen/init.S | 4 +- board/gdsys/gdppc440etx/gdppc440etx.c | 32 +++++----- board/gdsys/intip/intip.c | 22 +++--- board/korat/korat.c | 28 ++++---- board/lwmon5/lwmon5.c | 32 +++++----- board/netstal/hcu5/hcu5.c | 28 ++++---- board/pcs440ep/pcs440ep.c | 32 +++++----- board/prodrive/alpr/alpr.c | 52 ++++++++-------- board/prodrive/p3p440/p3p440.c | 22 +++--- board/sandburst/common/ppc440gx_i2c.h | 2 +- board/sandburst/common/sb_common.c | 22 +++--- board/xes/xpedite1000/xpedite1000.c | 24 ++++---- cpu/ppc4xx/4xx_pci.c | 48 +++++++------- cpu/ppc4xx/cpu_init.c | 4 +- cpu/ppc4xx/miiphy.c | 24 ++++---- cpu/ppc4xx/speed.c | 6 +- drivers/net/4xx_enet.c | 100 +++++++++++++++--------------- post/cpu/ppc4xx/ether.c | 50 +++++++------- 34 files changed, 492 insertions(+), 492 deletions(-)
board/amcc/bamboo/bamboo.c +16 -16
@@ -542,22 +542,22 @@ void pci_target_init(struct pci_controller *hose)| Use byte reversed out routines to handle endianess. | Make this region non-prefetchable. +--------------------------------------------------------------------------*/ -out32r (PCIX0_PMM0MA ,0x00000000 );/* PMM0 Mask/Attribute - disabled b4 setting */ -out32r (PCIX0_PMM0LA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 Local Address */ -out32r (PCIX0_PMM0PCILA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 PCI Low Address */ -out32r (PCIX0_PMM0PCIHA ,0x00000000 );/* PMM0 PCI High Address */ -out32r (PCIX0_PMM0MA ,0xE0000001 );/* 512M + No prefetching, and enable region */ - -out32r (PCIX0_PMM1MA ,0x00000000 );/* PMM0 Mask/Attribute - disabled b4 setting */ -out32r (PCIX0_PMM1LA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 Local Address */ -out32r (PCIX0_PMM1PCILA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 PCI Low Address */ -out32r (PCIX0_PMM1PCIHA ,0x00000000 );/* PMM0 PCI High Address */ -out32r (PCIX0_PMM1MA ,0xE0000001 );/* 512M + No prefetching, and enable region */ - -out32r (PCIX0_PTM1MS ,0x00000001 );/* Memory Size/Attribute */ -out32r (PCIX0_PTM1LA ,0 );/* Local Addr. Reg */ -out32r (PCIX0_PTM2MS ,0 );/* Memory Size/Attribute */ -out32r (PCIX0_PTM2LA ,0 );/* Local Addr. Reg */ +out32r (PCIL0_PMM0MA ,0x00000000 );/* PMM0 Mask/Attribute - disabled b4 setting */ +out32r (PCIL0_PMM0LA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 Local Address */ +out32r (PCIL0_PMM0PCILA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 PCI Low Address */ +out32r (PCIL0_PMM0PCIHA ,0x00000000 );/* PMM0 PCI High Address */ +out32r (PCIL0_PMM0MA ,0xE0000001 );/* 512M + No prefetching, and enable region */ + +out32r (PCIL0_PMM1MA ,0x00000000 );/* PMM0 Mask/Attribute - disabled b4 setting */ +out32r (PCIL0_PMM1LA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 Local Address */ +out32r (PCIL0_PMM1PCILA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 PCI Low Address */ +out32r (PCIL0_PMM1PCIHA ,0x00000000 );/* PMM0 PCI High Address */ +out32r (PCIL0_PMM1MA ,0xE0000001 );/* 512M + No prefetching, and enable region */ + +out32r (PCIL0_PTM1MS ,0x00000001 );/* Memory Size/Attribute */ +out32r (PCIL0_PTM1LA ,0 );/* Local Addr. Reg */ +out32r (PCIL0_PTM2MS ,0 );/* Memory Size/Attribute */ +out32r (PCIL0_PTM2LA ,0 );/* Local Addr. Reg */ /*--------------------------------------------------------------------------+ * Set up Configuration registers
board/amcc/canyonlands/canyonlands.c +11 -11
@@ -338,27 +338,27 @@ void pci_target_init(struct pci_controller * hose )/* * Disable everything */ -out_le32 ((void *)PCIX0_PIM0SA ,0 );/* disable */ -out_le32 ((void *)PCIX0_PIM1SA ,0 );/* disable */ -out_le32 ((void *)PCIX0_PIM2SA ,0 );/* disable */ -out_le32 ((void *)PCIX0_EROMBA ,0 );/* disable expansion rom */ +out_le32 ((void *)PCIL0_PIM0SA ,0 );/* disable */ +out_le32 ((void *)PCIL0_PIM1SA ,0 );/* disable */ +out_le32 ((void *)PCIL0_PIM2SA ,0 );/* disable */ +out_le32 ((void *)PCIL0_EROMBA ,0 );/* disable expansion rom */ /* * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440 * strapping options to not support sizes such as 128/256 MB. */ -out_le32 ((void *)PCIX0_PIM0LAL ,CONFIG_SYS_SDRAM_BASE ); -out_le32 ((void *)PCIX0_PIM0LAH ,0 ); -out_le32 ((void *)PCIX0_PIM0SA , ~(gd->ram_size -1 ) |1 ); -out_le32 ((void *)PCIX0_BAR0 ,0 ); +out_le32 ((void *)PCIL0_PIM0LAL ,CONFIG_SYS_SDRAM_BASE ); +out_le32 ((void *)PCIL0_PIM0LAH ,0 ); +out_le32 ((void *)PCIL0_PIM0SA , ~(gd->ram_size -1 ) |1 ); +out_le32 ((void *)PCIL0_BAR0 ,0 );/* * Program the board's subsystem id/vendor id */ -out_le16 ((void *)PCIX0_SBSYSVID ,CONFIG_SYS_PCI_SUBSYS_VENDORID ); -out_le16 ((void *)PCIX0_SBSYSID ,CONFIG_SYS_PCI_SUBSYS_DEVICEID ); +out_le16 ((void *)PCIL0_SBSYSVID ,CONFIG_SYS_PCI_SUBSYS_VENDORID ); +out_le16 ((void *)PCIL0_SBSYSID ,CONFIG_SYS_PCI_SUBSYS_DEVICEID ); - out_le16((void *)PCIX0_CMD, in16r(PCIX0_CMD) | PCI_COMMAND_MEMORY); + out_le16((void *)PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY); }#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
board/amcc/ebony/ebony.c +11 -11
@@ -210,28 +210,28 @@ void pci_target_init(struct pci_controller *hose)/*--------------------------------------------------------------------------+ * Disable everything *--------------------------------------------------------------------------*/ -out32r (PCIX0_PIM0SA ,0 );/* disable */ -out32r (PCIX0_PIM1SA ,0 );/* disable */ -out32r (PCIX0_PIM2SA ,0 );/* disable */ -out32r (PCIX0_EROMBA ,0 );/* disable expansion rom */ +out32r (PCIL0_PIM0SA ,0 );/* disable */ +out32r (PCIL0_PIM1SA ,0 );/* disable */ +out32r (PCIL0_PIM2SA ,0 );/* disable */ +out32r (PCIL0_EROMBA ,0 );/* disable expansion rom */ /*--------------------------------------------------------------------------+ * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440 strapping * options to not support sizes such as 128/256 MB. *--------------------------------------------------------------------------*/ -out32r (PCIX0_PIM0LAL ,CONFIG_SYS_SDRAM_BASE ); -out32r (PCIX0_PIM0LAH ,0 ); -out32r (PCIX0_PIM0SA , ~(gd->ram_size -1 ) |1 ); +out32r (PCIL0_PIM0LAL ,CONFIG_SYS_SDRAM_BASE ); +out32r (PCIL0_PIM0LAH ,0 ); +out32r (PCIL0_PIM0SA , ~(gd->ram_size -1 ) |1 ); -out32r (PCIX0_BAR0 ,0 ); +out32r (PCIL0_BAR0 ,0 );/*--------------------------------------------------------------------------+ * Program the board's subsystem id/vendor id *--------------------------------------------------------------------------*/ -out16r (PCIX0_SBSYSVID ,CONFIG_SYS_PCI_SUBSYS_VENDORID ); -out16r (PCIX0_SBSYSID ,CONFIG_SYS_PCI_SUBSYS_DEVICEID ); +out16r (PCIL0_SBSYSVID ,CONFIG_SYS_PCI_SUBSYS_VENDORID ); +out16r (PCIL0_SBSYSID ,CONFIG_SYS_PCI_SUBSYS_DEVICEID ); - out16r(PCIX0_CMD, in16r(PCIX0_CMD) | PCI_COMMAND_MEMORY); + out16r(PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY); }#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
board/amcc/katmai/katmai.c +11 -11
@@ -304,27 +304,27 @@ void pci_target_init(struct pci_controller * hose )/*-------------------------------------------------------------------+ * Disable everything *-------------------------------------------------------------------*/ -out32r (PCIX0_PIM0SA ,0 );/* disable */ -out32r (PCIX0_PIM1SA ,0 );/* disable */ -out32r (PCIX0_PIM2SA ,0 );/* disable */ -out32r (PCIX0_EROMBA ,0 );/* disable expansion rom */ +out32r (PCIL0_PIM0SA ,0 );/* disable */ +out32r (PCIL0_PIM1SA ,0 );/* disable */ +out32r (PCIL0_PIM2SA ,0 );/* disable */ +out32r (PCIL0_EROMBA ,0 );/* disable expansion rom */ /*-------------------------------------------------------------------+ * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440 * strapping options to not support sizes such as 128/256 MB. *-------------------------------------------------------------------*/ -out32r (PCIX0_PIM0LAL ,CONFIG_SYS_SDRAM_BASE ); -out32r (PCIX0_PIM0LAH ,0 ); -out32r (PCIX0_PIM0SA , ~(gd->ram_size -1 ) |1 ); -out32r (PCIX0_BAR0 ,0 ); +out32r (PCIL0_PIM0LAL ,CONFIG_SYS_SDRAM_BASE ); +out32r (PCIL0_PIM0LAH ,0 ); +out32r (PCIL0_PIM0SA , ~(gd->ram_size -1 ) |1 ); +out32r (PCIL0_BAR0 ,0 );/*-------------------------------------------------------------------+ * Program the board's subsystem id/vendor id *-------------------------------------------------------------------*/ -out16r (PCIX0_SBSYSVID ,CONFIG_SYS_PCI_SUBSYS_VENDORID ); -out16r (PCIX0_SBSYSID ,CONFIG_SYS_PCI_SUBSYS_DEVICEID ); +out16r (PCIL0_SBSYSVID ,CONFIG_SYS_PCI_SUBSYS_VENDORID ); +out16r (PCIL0_SBSYSID ,CONFIG_SYS_PCI_SUBSYS_DEVICEID ); - out16r( PCIX0_CMD, in16r(PCIX0_CMD) | PCI_COMMAND_MEMORY ); + out16r( PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY ); }#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
board/amcc/luan/epld.h +11 -11
@@ -8,8 +8,8 @@#define EPLD0_FLASH_SRAM_SEL_N 0x01/* 0 SRAM at mem top, 1 small flash at mem top */ #define EPLD1_CLK_CNTL0 0x80/* FSEL-FB1 of MPC9772 */ -#define EPLD1_PCIX0_CNTL1 0x40/* S*0 of 9531 */ -#define EPLD1_PCIX0_CNTL2 0x20/* S*1 of 9531 */ +#define EPLD1_PCIL0_CNTL1 0x40/* S*0 of 9531 */ +#define EPLD1_PCIL0_CNTL2 0x20/* S*1 of 9531 */ #define EPLD1_CLK_CNTL3 0x10/* FSEL-B1 of MPC9772 */ #define EPLD1_CLK_CNTL4 0x08/* FSEL-B0 of MPC9772 */ #define EPLD1_MASTER_CLOCK6 0x04/* clock source select 6 */
@@ -29,25 +29,25 @@#define EPLD3_STATUS_LED2 0x02/* status LED 2 (1 = LED on) */ #define EPLD3_STATUS_LED1 0x01/* status LED 1 (1 = LED on) */ -#define EPLD4_PCIX0_VTH1 0x80/* PCI-X 0 VTH1 status */ -#define EPLD4_PCIX0_VTH2 0x40/* PCI-X 0 VTH2 status */ -#define EPLD4_PCIX0_VTH3 0x20/* PCI-X 0 VTH3 status */ -#define EPLD4_PCIX0_VTH4 0x10/* PCI-X 0 VTH4 status */ +#define EPLD4_PCIL0_VTH1 0x80/* PCI-X 0 VTH1 status */ +#define EPLD4_PCIL0_VTH2 0x40/* PCI-X 0 VTH2 status */ +#define EPLD4_PCIL0_VTH3 0x20/* PCI-X 0 VTH3 status */ +#define EPLD4_PCIL0_VTH4 0x10/* PCI-X 0 VTH4 status */ #define EPLD4_PCIX1_VTH1 0x08/* PCI-X 1 VTH1 status */ #define EPLD4_PCIX1_VTH2 0x04/* PCI-X 1 VTH2 status */ #define EPLD4_PCIX1_VTH3 0x02/* PCI-X 1 VTH3 status */ #define EPLD4_PCIX1_VTH4 0x01/* PCI-X 1 VTH4 status */ -#define EPLD5_PCIX0_INT0 0x80/* PCIX0 INT0 status, write 0 to reset */ -#define EPLD5_PCIX0_INT1 0x40/* PCIX0 INT1 status, write 0 to reset */ -#define EPLD5_PCIX0_INT2 0x20/* PCIX0 INT2 status, write 0 to reset */ -#define EPLD5_PCIX0_INT3 0x10/* PCIX0 INT3 status, write 0 to reset */ +#define EPLD5_PCIL0_INT0 0x80/* PCIX0 INT0 status, write 0 to reset */ +#define EPLD5_PCIL0_INT1 0x40/* PCIX0 INT1 status, write 0 to reset */ +#define EPLD5_PCIL0_INT2 0x20/* PCIX0 INT2 status, write 0 to reset */ +#define EPLD5_PCIL0_INT3 0x10/* PCIX0 INT3 status, write 0 to reset */ #define EPLD5_PCIX1_INT0 0x08/* PCIX1 INT0 status, write 0 to reset */ #define EPLD5_PCIX1_INT1 0x04/* PCIX1 INT1 status, write 0 to reset */ #define EPLD5_PCIX1_INT2 0x02/* PCIX1 INT2 status, write 0 to reset */ #define EPLD5_PCIX1_INT3 0x01/* PCIX1 INT3 status, write 0 to reset */ -#define EPLD6_PCIX0_RESET_CTL 0x80/* 0=enable slot reset, 1=disable slot reset */ +#define EPLD6_PCIL0_RESET_CTL 0x80/* 0=enable slot reset, 1=disable slot reset */ #define EPLD6_PCIX1_RESET_CTL 0x40/* 0=enable slot reset, 1=disable slot reset */ #define EPLD6_ETH_INT_MODE 0x20/* 0=IRQ5 recv's external eth int */ #define EPLD6_PCIX2_RESET_CTL 0x10/* 0=enable slot reset, 1=disable slot reset */
board/amcc/luan/luan.c +11 -11
@@ -173,28 +173,28 @@ void pci_target_init(struct pci_controller *hose)/*--------------------------------------------------------------------------+ * Disable everything *--------------------------------------------------------------------------*/ -out32r (PCIX0_PIM0SA ,0 );/* disable */ -out32r (PCIX0_PIM1SA ,0 );/* disable */ -out32r (PCIX0_PIM2SA ,0 );/* disable */ -out32r (PCIX0_EROMBA ,0 );/* disable expansion rom */ +out32r (PCIL0_PIM0SA ,0 );/* disable */ +out32r (PCIL0_PIM1SA ,0 );/* disable */ +out32r (PCIL0_PIM2SA ,0 );/* disable */ +out32r (PCIL0_EROMBA ,0 );/* disable expansion rom */ /*--------------------------------------------------------------------------+ * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440 strapping * options to not support sizes such as 128/256 MB. *--------------------------------------------------------------------------*/ -out32r (PCIX0_PIM0LAL ,CONFIG_SYS_SDRAM_BASE ); -out32r (PCIX0_PIM0LAH ,0 ); -out32r (PCIX0_PIM0SA , ~(gd->ram_size -1 ) |1 ); +out32r (PCIL0_PIM0LAL ,CONFIG_SYS_SDRAM_BASE ); +out32r (PCIL0_PIM0LAH ,0 ); +out32r (PCIL0_PIM0SA , ~(gd->ram_size -1 ) |1 ); -out32r (PCIX0_BAR0 ,0 ); +out32r (PCIL0_BAR0 ,0 );/*--------------------------------------------------------------------------+ * Program the board's subsystem id/vendor id *--------------------------------------------------------------------------*/ -out16r (PCIX0_SBSYSVID ,CONFIG_SYS_PCI_SUBSYS_VENDORID ); -out16r (PCIX0_SBSYSID ,CONFIG_SYS_PCI_SUBSYS_DEVICEID ); +out16r (PCIL0_SBSYSVID ,CONFIG_SYS_PCI_SUBSYS_VENDORID ); +out16r (PCIL0_SBSYSID ,CONFIG_SYS_PCI_SUBSYS_DEVICEID ); - out16r( PCIX0_CMD, in16r(PCIX0_CMD) | PCI_COMMAND_MEMORY ); + out16r( PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY ); }#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
board/amcc/ocotea/ocotea.c +11 -11
@@ -321,28 +321,28 @@ void pci_target_init(struct pci_controller * hose )/*--------------------------------------------------------------------------+ * Disable everything *--------------------------------------------------------------------------*/ -out32r (PCIX0_PIM0SA ,0 );/* disable */ -out32r (PCIX0_PIM1SA ,0 );/* disable */ -out32r (PCIX0_PIM2SA ,0 );/* disable */ -out32r (PCIX0_EROMBA ,0 );/* disable expansion rom */ +out32r (PCIL0_PIM0SA ,0 );/* disable */ +out32r (PCIL0_PIM1SA ,0 );/* disable */ +out32r (PCIL0_PIM2SA ,0 );/* disable */ +out32r (PCIL0_EROMBA ,0 );/* disable expansion rom */ /*--------------------------------------------------------------------------+ * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440 strapping * options to not support sizes such as 128/256 MB. *--------------------------------------------------------------------------*/ -out32r (PCIX0_PIM0LAL ,CONFIG_SYS_SDRAM_BASE ); -out32r (PCIX0_PIM0LAH ,0 ); -out32r (PCIX0_PIM0SA , ~(gd->ram_size -1 ) |1 ); +out32r (PCIL0_PIM0LAL ,CONFIG_SYS_SDRAM_BASE ); +out32r (PCIL0_PIM0LAH ,0 ); +out32r (PCIL0_PIM0SA , ~(gd->ram_size -1 ) |1 ); -out32r (PCIX0_BAR0 ,0 ); +out32r (PCIL0_BAR0 ,0 );/*--------------------------------------------------------------------------+ * Program the board's subsystem id/vendor id *--------------------------------------------------------------------------*/ -out16r (PCIX0_SBSYSVID ,CONFIG_SYS_PCI_SUBSYS_VENDORID ); -out16r (PCIX0_SBSYSID ,CONFIG_SYS_PCI_SUBSYS_DEVICEID ); +out16r (PCIL0_SBSYSVID ,CONFIG_SYS_PCI_SUBSYS_VENDORID ); +out16r (PCIL0_SBSYSID ,CONFIG_SYS_PCI_SUBSYS_DEVICEID ); - out16r( PCIX0_CMD, in16r(PCIX0_CMD) | PCI_COMMAND_MEMORY ); + out16r( PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY ); }#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
board/amcc/sequoia/sequoia.c +14 -14
@@ -428,26 +428,26 @@ void pci_target_init(struct pci_controller *hose)* Use byte reversed out routines to handle endianess. * Make this region non-prefetchable. */ -out32r (PCIX0_PMM0MA ,0x00000000 );/* PMM0 Mask/Attribute */ +out32r (PCIL0_PMM0MA ,0x00000000 );/* PMM0 Mask/Attribute */ /* - disabled b4 setting */ -out32r (PCIX0_PMM0LA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 Local Address */ -out32r (PCIX0_PMM0PCILA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 PCI Low Address */ -out32r (PCIX0_PMM0PCIHA ,0x00000000 );/* PMM0 PCI High Address */ -out32r (PCIX0_PMM0MA ,0xE0000001 );/* 512M + No prefetching, */ +out32r (PCIL0_PMM0LA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 Local Address */ +out32r (PCIL0_PMM0PCILA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 PCI Low Address */ +out32r (PCIL0_PMM0PCIHA ,0x00000000 );/* PMM0 PCI High Address */ +out32r (PCIL0_PMM0MA ,0xE0000001 );/* 512M + No prefetching, */ /* and enable region */ -out32r (PCIX0_PMM1MA ,0x00000000 );/* PMM0 Mask/Attribute */ +out32r (PCIL0_PMM1MA ,0x00000000 );/* PMM0 Mask/Attribute */ /* - disabled b4 setting */ -out32r (PCIX0_PMM1LA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 Local Address */ -out32r (PCIX0_PMM1PCILA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 PCI Low Address */ -out32r (PCIX0_PMM1PCIHA ,0x00000000 );/* PMM0 PCI High Address */ -out32r (PCIX0_PMM1MA ,0xE0000001 );/* 512M + No prefetching, */ +out32r (PCIL0_PMM1LA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 Local Address */ +out32r (PCIL0_PMM1PCILA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 PCI Low Address */ +out32r (PCIL0_PMM1PCIHA ,0x00000000 );/* PMM0 PCI High Address */ +out32r (PCIL0_PMM1MA ,0xE0000001 );/* 512M + No prefetching, */ /* and enable region */ -out32r (PCIX0_PTM1MS ,0x00000001 );/* Memory Size/Attribute */ -out32r (PCIX0_PTM1LA ,0 );/* Local Addr. Reg */ -out32r (PCIX0_PTM2MS ,0 );/* Memory Size/Attribute */ -out32r (PCIX0_PTM2LA ,0 );/* Local Addr. Reg */ +out32r (PCIL0_PTM1MS ,0x00000001 );/* Memory Size/Attribute */ +out32r (PCIL0_PTM1LA ,0 );/* Local Addr. Reg */ +out32r (PCIL0_PTM2MS ,0 );/* Memory Size/Attribute */ +out32r (PCIL0_PTM2LA ,0 );/* Local Addr. Reg */ /* * Set up Configuration registers
board/amcc/taishan/showinfo.c +56 -56
128 lines not on this page · raw message
board/amcc/taishan/taishan.c +11 -11
@@ -254,28 +254,28 @@ void pci_target_init(struct pci_controller * hose )/*--------------------------------------------------------------------------+ * Disable everything *--------------------------------------------------------------------------*/ -out32r (PCIX0_PIM0SA ,0 );/* disable */ -out32r (PCIX0_PIM1SA ,0 );/* disable */ -out32r (PCIX0_PIM2SA ,0 );/* disable */ -out32r (PCIX0_EROMBA ,0 );/* disable expansion rom */ +out32r (PCIL0_PIM0SA ,0 );/* disable */ +out32r (PCIL0_PIM1SA ,0 );/* disable */ +out32r (PCIL0_PIM2SA ,0 );/* disable */ +out32r (PCIL0_EROMBA ,0 );/* disable expansion rom */ /*--------------------------------------------------------------------------+ * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440 strapping * options to not support sizes such as 128/256 MB. *--------------------------------------------------------------------------*/ -out32r (PCIX0_PIM0LAL ,CONFIG_SYS_SDRAM_BASE ); -out32r (PCIX0_PIM0LAH ,0 ); -out32r (PCIX0_PIM0SA , ~(gd->ram_size -1 ) |1 ); +out32r (PCIL0_PIM0LAL ,CONFIG_SYS_SDRAM_BASE ); +out32r (PCIL0_PIM0LAH ,0 ); +out32r (PCIL0_PIM0SA , ~(gd->ram_size -1 ) |1 ); -out32r (PCIX0_BAR0 ,0 ); +out32r (PCIL0_BAR0 ,0 );/*--------------------------------------------------------------------------+ * Program the board's subsystem id/vendor id *--------------------------------------------------------------------------*/ -out16r (PCIX0_SBSYSVID ,CONFIG_SYS_PCI_SUBSYS_VENDORID ); -out16r (PCIX0_SBSYSID ,CONFIG_SYS_PCI_SUBSYS_DEVICEID ); +out16r (PCIL0_SBSYSVID ,CONFIG_SYS_PCI_SUBSYS_VENDORID ); +out16r (PCIL0_SBSYSID ,CONFIG_SYS_PCI_SUBSYS_DEVICEID ); - out16r( PCIX0_CMD, in16r(PCIX0_CMD) | PCI_COMMAND_MEMORY ); + out16r( PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY ); }#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
board/amcc/yosemite/yosemite.c +16 -16
@@ -408,22 +408,22 @@ void pci_target_init(struct pci_controller *hose)| Use byte reversed out routines to handle endianess. | Make this region non-prefetchable. +--------------------------------------------------------------------------*/ -out32r (PCIX0_PMM0MA ,0x00000000 );/* PMM0 Mask/Attribute - disabled b4 setting */ -out32r (PCIX0_PMM0LA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 Local Address */ -out32r (PCIX0_PMM0PCILA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 PCI Low Address */ -out32r (PCIX0_PMM0PCIHA ,0x00000000 );/* PMM0 PCI High Address */ -out32r (PCIX0_PMM0MA ,0xE0000001 );/* 512M + No prefetching, and enable region */ - -out32r (PCIX0_PMM1MA ,0x00000000 );/* PMM0 Mask/Attribute - disabled b4 setting */ -out32r (PCIX0_PMM1LA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 Local Address */ -out32r (PCIX0_PMM1PCILA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 PCI Low Address */ -out32r (PCIX0_PMM1PCIHA ,0x00000000 );/* PMM0 PCI High Address */ -out32r (PCIX0_PMM1MA ,0xE0000001 );/* 512M + No prefetching, and enable region */ - -out32r (PCIX0_PTM1MS ,0x00000001 );/* Memory Size/Attribute */ -out32r (PCIX0_PTM1LA ,0 );/* Local Addr. Reg */ -out32r (PCIX0_PTM2MS ,0 );/* Memory Size/Attribute */ -out32r (PCIX0_PTM2LA ,0 );/* Local Addr. Reg */ +out32r (PCIL0_PMM0MA ,0x00000000 );/* PMM0 Mask/Attribute - disabled b4 setting */ +out32r (PCIL0_PMM0LA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 Local Address */ +out32r (PCIL0_PMM0PCILA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 PCI Low Address */ +out32r (PCIL0_PMM0PCIHA ,0x00000000 );/* PMM0 PCI High Address */ +out32r (PCIL0_PMM0MA ,0xE0000001 );/* 512M + No prefetching, and enable region */ + +out32r (PCIL0_PMM1MA ,0x00000000 );/* PMM0 Mask/Attribute - disabled b4 setting */ +out32r (PCIL0_PMM1LA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 Local Address */ +out32r (PCIL0_PMM1PCILA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 PCI Low Address */ +out32r (PCIL0_PMM1PCIHA ,0x00000000 );/* PMM0 PCI High Address */ +out32r (PCIL0_PMM1MA ,0xE0000001 );/* 512M + No prefetching, and enable region */ + +out32r (PCIL0_PTM1MS ,0x00000001 );/* Memory Size/Attribute */ +out32r (PCIL0_PTM1LA ,0 );/* Local Addr. Reg */ +out32r (PCIL0_PTM2MS ,0 );/* Memory Size/Attribute */ +out32r (PCIL0_PTM2LA ,0 );/* Local Addr. Reg */ /*--------------------------------------------------------------------------+ * Set up Configuration registers
board/amcc/yucca/yucca.c +11 -11
@@ -632,27 +632,27 @@ void pci_target_init(struct pci_controller * hose )/*-------------------------------------------------------------------+ * Disable everything *-------------------------------------------------------------------*/ -out32r (PCIX0_PIM0SA ,0 );/* disable */ -out32r (PCIX0_PIM1SA ,0 );/* disable */ -out32r (PCIX0_PIM2SA ,0 );/* disable */ -out32r (PCIX0_EROMBA ,0 );/* disable expansion rom */ +out32r (PCIL0_PIM0SA ,0 );/* disable */ +out32r (PCIL0_PIM1SA ,0 );/* disable */ +out32r (PCIL0_PIM2SA ,0 );/* disable */ +out32r (PCIL0_EROMBA ,0 );/* disable expansion rom */ /*-------------------------------------------------------------------+ * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440 * strapping options to not support sizes such as 128/256 MB. *-------------------------------------------------------------------*/ -out32r (PCIX0_PIM0LAL ,CONFIG_SYS_SDRAM_BASE ); -out32r (PCIX0_PIM0LAH ,0 ); -out32r (PCIX0_PIM0SA , ~(gd->ram_size -1 ) |1 ); -out32r (PCIX0_BAR0 ,0 ); +out32r (PCIL0_PIM0LAL ,CONFIG_SYS_SDRAM_BASE ); +out32r (PCIL0_PIM0LAH ,0 ); +out32r (PCIL0_PIM0SA , ~(gd->ram_size -1 ) |1 ); +out32r (PCIL0_BAR0 ,0 );/*-------------------------------------------------------------------+ * Program the board's subsystem id/vendor id *-------------------------------------------------------------------*/ -out16r (PCIX0_SBSYSVID ,CONFIG_SYS_PCI_SUBSYS_VENDORID ); -out16r (PCIX0_SBSYSID ,CONFIG_SYS_PCI_SUBSYS_DEVICEID ); +out16r (PCIL0_SBSYSVID ,CONFIG_SYS_PCI_SUBSYS_VENDORID ); +out16r (PCIL0_SBSYSID ,CONFIG_SYS_PCI_SUBSYS_DEVICEID ); - out16r( PCIX0_CMD, in16r(PCIX0_CMD) | PCI_COMMAND_MEMORY ); + out16r( PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY ); }#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
board/esd/common/cmd_loadpci.c +1 -1
@@ -48,7 +48,7 @@ int do_loadpci(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])u32 la, ptm1la;#if defined(CONFIG_440 ) - ptm1la =in32r (PCIX0_PTM1LA ); + ptm1la =in32r (PCIL0_PTM1LA );#else ptm1la =in32r (PTM1LA );#endif
board/esd/du440/du440.c +14 -14
@@ -435,26 +435,26 @@ void pci_target_init(struct pci_controller *hose)* Use byte reversed out routines to handle endianess. * Make this region non-prefetchable. */ -out32r (PCIX0_PMM0MA ,0x00000000 );/* PMM0 Mask/Attribute */ +out32r (PCIL0_PMM0MA ,0x00000000 );/* PMM0 Mask/Attribute */ /* - disabled b4 setting */ -out32r (PCIX0_PMM0LA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 Local Address */ -out32r (PCIX0_PMM0PCILA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 PCI Low Address */ -out32r (PCIX0_PMM0PCIHA ,0x00000000 );/* PMM0 PCI High Address */ -out32r (PCIX0_PMM0MA ,0xE0000001 );/* 512M + No prefetching, */ +out32r (PCIL0_PMM0LA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 Local Address */ +out32r (PCIL0_PMM0PCILA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 PCI Low Address */ +out32r (PCIL0_PMM0PCIHA ,0x00000000 );/* PMM0 PCI High Address */ +out32r (PCIL0_PMM0MA ,0xE0000001 );/* 512M + No prefetching, */ /* and enable region */ -out32r (PCIX0_PMM1MA ,0x00000000 );/* PMM0 Mask/Attribute */ +out32r (PCIL0_PMM1MA ,0x00000000 );/* PMM0 Mask/Attribute */ /* - disabled b4 setting */ -out32r (PCIX0_PMM1LA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 Local Address */ -out32r (PCIX0_PMM1PCILA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 PCI Low Address */ -out32r (PCIX0_PMM1PCIHA ,0x00000000 );/* PMM0 PCI High Address */ -out32r (PCIX0_PMM1MA ,0xE0000001 );/* 512M + No prefetching, */ +out32r (PCIL0_PMM1LA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 Local Address */ +out32r (PCIL0_PMM1PCILA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 PCI Low Address */ +out32r (PCIL0_PMM1PCIHA ,0x00000000 );/* PMM0 PCI High Address */ +out32r (PCIL0_PMM1MA ,0xE0000001 );/* 512M + No prefetching, */ /* and enable region */ -out32r (PCIX0_PTM1MS ,0x00000001 );/* Memory Size/Attribute */ -out32r (PCIX0_PTM1LA ,0 );/* Local Addr. Reg */ -out32r (PCIX0_PTM2MS ,0 );/* Memory Size/Attribute */ -out32r (PCIX0_PTM2LA ,0 );/* Local Addr. Reg */ +out32r (PCIL0_PTM1MS ,0x00000001 );/* Memory Size/Attribute */ +out32r (PCIL0_PTM1LA ,0 );/* Local Addr. Reg */ +out32r (PCIL0_PTM2MS ,0 );/* Memory Size/Attribute */ +out32r (PCIL0_PTM2LA ,0 );/* Local Addr. Reg */ /* * Set up Configuration registers
board/esd/pmc440/cmd_pmc440.c +5 -5
@@ -497,15 +497,15 @@ int do_pmm(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])/* map PCI address at 0xc0000000 in PLB space */ /* PMM1 Mask/Attribute - disabled b4 setting */ -out32r (PCIX0_PMM1MA ,0x00000000 ); +out32r (PCIL0_PMM1MA ,0x00000000 );/* PMM1 Local Address */ -out32r (PCIX0_PMM1LA ,0xc0000000 ); +out32r (PCIL0_PMM1LA ,0xc0000000 );/* PMM1 PCI Low Address */ -out32r (PCIX0_PMM1PCILA , pciaddr); +out32r (PCIL0_PMM1PCILA , pciaddr);/* PMM1 PCI High Address */ -out32r (PCIX0_PMM1PCIHA ,0x00000000 ); +out32r (PCIL0_PMM1PCIHA ,0x00000000 );/* 256MB + No prefetching, and enable region */ -out32r (PCIX0_PMM1MA ,0xf0000001 ); +out32r (PCIL0_PMM1MA ,0xf0000001 ); }else {printf ("Usage:\npmm %s\n" , cmdtp->help); }
board/esd/pmc440/pmc440.c +16 -16
@@ -208,7 +208,7 @@ int misc_init_f(void)if (getenv ("pciearly" ) && (!is_monarch ())) {printf ("PCI: early target init\n" ); -pci_setup_indirect (&hose,PCIX0_CFGADR ,PCIX0_CFGDATA ); +pci_setup_indirect (&hose,PCIL0_CFGADR ,PCIL0_CFGDATA );pci_target_init (&hose); }return 0 ;
@@ -568,42 +568,42 @@ void pci_target_init(struct pci_controller *hose)* Use byte reversed out routines to handle endianess. * Make this region non-prefetchable. */ -out32r (PCIX0_PMM0MA ,0x00000000 );/* PMM0 Mask/Attribute */ +out32r (PCIL0_PMM0MA ,0x00000000 );/* PMM0 Mask/Attribute */ /* - disabled b4 setting */ -out32r (PCIX0_PMM0LA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 Local Address */ -out32r (PCIX0_PMM0PCILA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 PCI Low Address */ -out32r (PCIX0_PMM0PCIHA ,0x00000000 );/* PMM0 PCI High Address */ -out32r (PCIX0_PMM0MA ,0xc0000001 );/* 1G + No prefetching, */ +out32r (PCIL0_PMM0LA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 Local Address */ +out32r (PCIL0_PMM0PCILA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 PCI Low Address */ +out32r (PCIL0_PMM0PCIHA ,0x00000000 );/* PMM0 PCI High Address */ +out32r (PCIL0_PMM0MA ,0xc0000001 );/* 1G + No prefetching, */ /* and enable region */ if (!is_monarch ()) { ptmla_str =getenv ("ptm1la" ); ptmms_str =getenv ("ptm1ms" );if (NULL != ptmla_str &&NULL != ptmms_str ) { -out32r (PCIX0_PTM1MS , +out32r (PCIL0_PTM1MS ,simple_strtoul (ptmms_str,NULL ,16 )); -out32r (PCIX0_PTM1LA , +out32r (PCIL0_PTM1LA ,simple_strtoul (ptmla_str,NULL ,16 )); }else {/* BAR1: default top 64MB of RAM */ -out32r (PCIX0_PTM1MS ,0xfc000001 ); -out32r (PCIX0_PTM1LA ,0x0c000000 ); +out32r (PCIL0_PTM1MS ,0xfc000001 ); +out32r (PCIL0_PTM1LA ,0x0c000000 ); } }else {/* BAR1: default: complete 256MB RAM */ -out32r (PCIX0_PTM1MS ,0xf0000001 ); -out32r (PCIX0_PTM1LA ,0x00000000 ); +out32r (PCIL0_PTM1MS ,0xf0000001 ); +out32r (PCIL0_PTM1LA ,0x00000000 ); } ptmla_str =getenv ("ptm2la" );/* Local Addr. Reg */ ptmms_str =getenv ("ptm2ms" );/* Memory Size/Attribute */ if (NULL != ptmla_str &&NULL != ptmms_str ) { -out32r (PCIX0_PTM2MS ,simple_strtoul (ptmms_str,NULL ,16 )); -out32r (PCIX0_PTM2LA ,simple_strtoul (ptmla_str,NULL ,16 )); +out32r (PCIL0_PTM2MS ,simple_strtoul (ptmms_str,NULL ,16 )); +out32r (PCIL0_PTM2LA ,simple_strtoul (ptmla_str,NULL ,16 )); }else {/* BAR2: default: 4MB FPGA */ -out32r (PCIX0_PTM2MS ,0xffc00001 );/* Memory Size/Attribute */ -out32r (PCIX0_PTM2LA ,0xef000000 );/* Local Addr. Reg */ +out32r (PCIL0_PTM2MS ,0xffc00001 );/* Memory Size/Attribute */ +out32r (PCIL0_PTM2LA ,0xef000000 );/* Local Addr. Reg */ }if (is_monarch ()) {
board/exbitgen/init.S +2 -2
@@ -52,7 +52,7 @@ #define IIC_EXTSTS (I2C_REGISTERS_BASE_ADDRESS+IICEXTSTS) #define IIC_LSADR (I2C_REGISTERS_BASE_ADDRESS+IICLSADR) #define IIC_HSADR (I2C_REGISTERS_BASE_ADDRESS+IICHSADR) -#define IIC_CLKDIV (I2C_REGISTERS_BASE_ADDRESS+IICCLKDIV) +#define IIC_CLKDIV (I2C_REGISTERS_BASE_ADDRESS+IIC0_CLKDIV) #define IIC_INTRMSK (I2C_REGISTERS_BASE_ADDRESS+IICINTRMSK) #define IIC_XFRCNT (I2C_REGISTERS_BASE_ADDRESS+IICXFRCNT) #define IIC_XTCNTLSS (I2C_REGISTERS_BASE_ADDRESS+IICXTCNTLSS)
@@ -537,7 +537,7 @@ read_spd: WRITE_I2C(IICHSADR, 0x00) /* clear hi slave address */ WRITE_I2C(IICSTS, 0x08) /* update status register */ WRITE_I2C(IICEXTSTS, 0x8f) - WRITE_I2C(IICCLKDIV, 0x05) + WRITE_I2C(IIC0_CLKDIV, 0x05) WRITE_I2C(IICINTRMSK, 0x00) /* no interrupts */ WRITE_I2C(IICXFRCNT, 0x00) /* clear transfer count */ WRITE_I2C(IICXTCNTLSS, 0xf0) /* clear extended control & stat */
board/gdsys/gdppc440etx/gdppc440etx.c +16 -16
@@ -239,22 +239,22 @@ void pci_target_init(struct pci_controller *hose)* Use byte reversed out routines to handle endianess. * Make this region non-prefetchable. */ -out32r (PCIX0_PMM0MA ,0x00000000 );/* disabled b4 setting */ -out32r (PCIX0_PMM0LA ,CONFIG_SYS_PCI_MEMBASE ); -out32r (PCIX0_PMM0PCILA ,CONFIG_SYS_PCI_MEMBASE ); -out32r (PCIX0_PMM0PCIHA ,0x00000000 ); -out32r (PCIX0_PMM0MA ,0xE0000001 );/* 512M, no prefetch, enable region */ - -out32r (PCIX0_PMM1MA ,0x00000000 );/* disabled b4 setting */ -out32r (PCIX0_PMM1LA ,CONFIG_SYS_PCI_MEMBASE2 ); -out32r (PCIX0_PMM1PCILA ,CONFIG_SYS_PCI_MEMBASE2 ); -out32r (PCIX0_PMM1PCIHA ,0x00000000 ); -out32r (PCIX0_PMM1MA ,0xE0000001 );/* 512M, no prefetch, enable region */ - -out32r (PCIX0_PTM1MS ,0x00000001 ); -out32r (PCIX0_PTM1LA ,0 ); -out32r (PCIX0_PTM2MS ,0 ); -out32r (PCIX0_PTM2LA ,0 ); +out32r (PCIL0_PMM0MA ,0x00000000 );/* disabled b4 setting */ +out32r (PCIL0_PMM0LA ,CONFIG_SYS_PCI_MEMBASE ); +out32r (PCIL0_PMM0PCILA ,CONFIG_SYS_PCI_MEMBASE ); +out32r (PCIL0_PMM0PCIHA ,0x00000000 ); +out32r (PCIL0_PMM0MA ,0xE0000001 );/* 512M, no prefetch, enable region */ + +out32r (PCIL0_PMM1MA ,0x00000000 );/* disabled b4 setting */ +out32r (PCIL0_PMM1LA ,CONFIG_SYS_PCI_MEMBASE2 ); +out32r (PCIL0_PMM1PCILA ,CONFIG_SYS_PCI_MEMBASE2 ); +out32r (PCIL0_PMM1PCIHA ,0x00000000 ); +out32r (PCIL0_PMM1MA ,0xE0000001 );/* 512M, no prefetch, enable region */ + +out32r (PCIL0_PTM1MS ,0x00000001 ); +out32r (PCIL0_PTM1LA ,0 ); +out32r (PCIL0_PTM2MS ,0 ); +out32r (PCIL0_PTM2LA ,0 );/* * Set up Configuration registers
board/gdsys/intip/intip.c +11 -11
@@ -154,27 +154,27 @@ void pci_target_init(struct pci_controller *hose)/* * Disable everything */ -out_le32 ((void *)PCIX0_PIM0SA ,0 );/* disable */ -out_le32 ((void *)PCIX0_PIM1SA ,0 );/* disable */ -out_le32 ((void *)PCIX0_PIM2SA ,0 );/* disable */ -out_le32 ((void *)PCIX0_EROMBA ,0 );/* disable expansion rom */ +out_le32 ((void *)PCIL0_PIM0SA ,0 );/* disable */ +out_le32 ((void *)PCIL0_PIM1SA ,0 );/* disable */ +out_le32 ((void *)PCIL0_PIM2SA ,0 );/* disable */ +out_le32 ((void *)PCIL0_EROMBA ,0 );/* disable expansion rom */ /* * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440 * strapping options to not support sizes such as 128/256 MB. */ -out_le32 ((void *)PCIX0_PIM0LAL ,CONFIG_SYS_SDRAM_BASE ); -out_le32 ((void *)PCIX0_PIM0LAH ,0 ); -out_le32 ((void *)PCIX0_PIM0SA , ~(gd->ram_size -1 ) |1 ); -out_le32 ((void *)PCIX0_BAR0 ,0 ); +out_le32 ((void *)PCIL0_PIM0LAL ,CONFIG_SYS_SDRAM_BASE ); +out_le32 ((void *)PCIL0_PIM0LAH ,0 ); +out_le32 ((void *)PCIL0_PIM0SA , ~(gd->ram_size -1 ) |1 ); +out_le32 ((void *)PCIL0_BAR0 ,0 );/* * Program the board's subsystem id/vendor id */ -out_le16 ((void *)PCIX0_SBSYSVID ,CONFIG_SYS_PCI_SUBSYS_VENDORID ); -out_le16 ((void *)PCIX0_SBSYSID ,CONFIG_SYS_PCI_SUBSYS_DEVICEID ); +out_le16 ((void *)PCIL0_SBSYSVID ,CONFIG_SYS_PCI_SUBSYS_VENDORID ); +out_le16 ((void *)PCIL0_SBSYSID ,CONFIG_SYS_PCI_SUBSYS_DEVICEID ); - out_le16((void *)PCIX0_CMD, in16r(PCIX0_CMD) | PCI_COMMAND_MEMORY); + out_le16((void *)PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY); }#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
board/korat/korat.c +14 -14
@@ -679,29 +679,29 @@ void pci_target_init(struct pci_controller *hose)* Use byte reversed out routines to handle endianess. * Make this region non-prefetchable. */ -out32r (PCIX0_PMM0MA ,0x00000000 );/* PMM0 Mask/Attribute */ +out32r (PCIL0_PMM0MA ,0x00000000 );/* PMM0 Mask/Attribute */ /* - disabled b4 setting */ -out32r (PCIX0_PMM0LA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 Local Address */ -out32r (PCIX0_PMM0PCILA , +out32r (PCIL0_PMM0LA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 Local Address */ +out32r (PCIL0_PMM0PCILA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 PCI Low Address */ -out32r (PCIX0_PMM0PCIHA ,0x00000000 );/* PMM0 PCI High Address */ -out32r (PCIX0_PMM0MA ,0xE0000001 );/* 512M + No prefetching, */ +out32r (PCIL0_PMM0PCIHA ,0x00000000 );/* PMM0 PCI High Address */ +out32r (PCIL0_PMM0MA ,0xE0000001 );/* 512M + No prefetching, */ /* and enable region */ -out32r (PCIX0_PMM1MA ,0x00000000 );/* PMM0 Mask/Attribute */ +out32r (PCIL0_PMM1MA ,0x00000000 );/* PMM0 Mask/Attribute */ /* - disabled b4 setting */ -out32r (PCIX0_PMM1LA , +out32r (PCIL0_PMM1LA ,CONFIG_SYS_PCI_MEMBASE +0x20000000 );/* PMM0 Local Address */ -out32r (PCIX0_PMM1PCILA , +out32r (PCIL0_PMM1PCILA ,CONFIG_SYS_PCI_MEMBASE +0x20000000 );/* PMM0 PCI Low Address */ -out32r (PCIX0_PMM1PCIHA ,0x00000000 );/* PMM0 PCI High Address */ -out32r (PCIX0_PMM1MA ,0xE0000001 );/* 512M + No prefetching, */ +out32r (PCIL0_PMM1PCIHA ,0x00000000 );/* PMM0 PCI High Address */ +out32r (PCIL0_PMM1MA ,0xE0000001 );/* 512M + No prefetching, */ /* and enable region */ -out32r (PCIX0_PTM1MS ,0x00000001 );/* Memory Size/Attribute */ -out32r (PCIX0_PTM1LA ,0 );/* Local Addr. Reg */ -out32r (PCIX0_PTM2MS ,0 );/* Memory Size/Attribute */ -out32r (PCIX0_PTM2LA ,0 );/* Local Addr. Reg */ +out32r (PCIL0_PTM1MS ,0x00000001 );/* Memory Size/Attribute */ +out32r (PCIL0_PTM1LA ,0 );/* Local Addr. Reg */ +out32r (PCIL0_PTM2MS ,0 );/* Memory Size/Attribute */ +out32r (PCIL0_PTM2LA ,0 );/* Local Addr. Reg */ /* * Set up Configuration registers
board/lwmon5/lwmon5.c +16 -16
@@ -351,22 +351,22 @@ void pci_target_init(struct pci_controller *hose)| Use byte reversed out routines to handle endianess. | Make this region non-prefetchable. +--------------------------------------------------------------------------*/ -out32r (PCIX0_PMM0MA ,0x00000000 );/* PMM0 Mask/Attribute - disabled b4 setting */ -out32r (PCIX0_PMM0LA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 Local Address */ -out32r (PCIX0_PMM0PCILA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 PCI Low Address */ -out32r (PCIX0_PMM0PCIHA ,0x00000000 );/* PMM0 PCI High Address */ -out32r (PCIX0_PMM0MA ,0xE0000001 );/* 512M + No prefetching, and enable region */ - -out32r (PCIX0_PMM1MA ,0x00000000 );/* PMM0 Mask/Attribute - disabled b4 setting */ -out32r (PCIX0_PMM1LA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 Local Address */ -out32r (PCIX0_PMM1PCILA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 PCI Low Address */ -out32r (PCIX0_PMM1PCIHA ,0x00000000 );/* PMM0 PCI High Address */ -out32r (PCIX0_PMM1MA ,0xE0000001 );/* 512M + No prefetching, and enable region */ - -out32r (PCIX0_PTM1MS ,0x00000001 );/* Memory Size/Attribute */ -out32r (PCIX0_PTM1LA ,0 );/* Local Addr. Reg */ -out32r (PCIX0_PTM2MS ,0 );/* Memory Size/Attribute */ -out32r (PCIX0_PTM2LA ,0 );/* Local Addr. Reg */ +out32r (PCIL0_PMM0MA ,0x00000000 );/* PMM0 Mask/Attribute - disabled b4 setting */ +out32r (PCIL0_PMM0LA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 Local Address */ +out32r (PCIL0_PMM0PCILA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 PCI Low Address */ +out32r (PCIL0_PMM0PCIHA ,0x00000000 );/* PMM0 PCI High Address */ +out32r (PCIL0_PMM0MA ,0xE0000001 );/* 512M + No prefetching, and enable region */ + +out32r (PCIL0_PMM1MA ,0x00000000 );/* PMM0 Mask/Attribute - disabled b4 setting */ +out32r (PCIL0_PMM1LA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 Local Address */ +out32r (PCIL0_PMM1PCILA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 PCI Low Address */ +out32r (PCIL0_PMM1PCIHA ,0x00000000 );/* PMM0 PCI High Address */ +out32r (PCIL0_PMM1MA ,0xE0000001 );/* 512M + No prefetching, and enable region */ + +out32r (PCIL0_PTM1MS ,0x00000001 );/* Memory Size/Attribute */ +out32r (PCIL0_PTM1LA ,0 );/* Local Addr. Reg */ +out32r (PCIL0_PTM2MS ,0 );/* Memory Size/Attribute */ +out32r (PCIL0_PTM2LA ,0 );/* Local Addr. Reg */ /*--------------------------------------------------------------------------+ * Set up Configuration registers
board/netstal/hcu5/hcu5.c +14 -14
@@ -398,27 +398,27 @@ void pci_target_init(struct pci_controller *hose)* Make this region non-prefetchable. */ /* PMM0 Mask/Attribute - disabled b4 setting */ -out32r (PCIX0_PMM0MA ,0x00000000 ); -out32r (PCIX0_PMM0LA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 Local Address */ +out32r (PCIL0_PMM0MA ,0x00000000 ); +out32r (PCIL0_PMM0LA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 Local Address */ /* PMM0 PCI Low Address */ -out32r (PCIX0_PMM0PCILA ,CONFIG_SYS_PCI_MEMBASE ); -out32r (PCIX0_PMM0PCIHA ,0x00000000 );/* PMM0 PCI High Address */ +out32r (PCIL0_PMM0PCILA ,CONFIG_SYS_PCI_MEMBASE ); +out32r (PCIL0_PMM0PCIHA ,0x00000000 );/* PMM0 PCI High Address */ /* 512M + No prefetching, and enable region */ -out32r (PCIX0_PMM0MA ,0xE0000001 ); +out32r (PCIL0_PMM0MA ,0xE0000001 );/* PMM0 Mask/Attribute - disabled b4 setting */ -out32r (PCIX0_PMM1MA ,0x00000000 ); -out32r (PCIX0_PMM1LA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 Local Address */ +out32r (PCIL0_PMM1MA ,0x00000000 ); +out32r (PCIL0_PMM1LA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 Local Address */ /* PMM0 PCI Low Address */ -out32r (PCIX0_PMM1PCILA ,CONFIG_SYS_PCI_MEMBASE2 ); -out32r (PCIX0_PMM1PCIHA ,0x00000000 );/* PMM0 PCI High Address */ +out32r (PCIL0_PMM1PCILA ,CONFIG_SYS_PCI_MEMBASE2 ); +out32r (PCIL0_PMM1PCIHA ,0x00000000 );/* PMM0 PCI High Address */ /* 512M + No prefetching, and enable region */ -out32r (PCIX0_PMM1MA ,0xE0000001 ); +out32r (PCIL0_PMM1MA ,0xE0000001 ); -out32r (PCIX0_PTM1MS ,0x00000001 );/* Memory Size/Attribute */ -out32r (PCIX0_PTM1LA ,0 );/* Local Addr. Reg */ -out32r (PCIX0_PTM2MS ,0 );/* Memory Size/Attribute */ -out32r (PCIX0_PTM2LA ,0 );/* Local Addr. Reg */ +out32r (PCIL0_PTM1MS ,0x00000001 );/* Memory Size/Attribute */ +out32r (PCIL0_PTM1LA ,0 );/* Local Addr. Reg */ +out32r (PCIL0_PTM2MS ,0 );/* Memory Size/Attribute */ +out32r (PCIL0_PTM2LA ,0 );/* Local Addr. Reg */ /* * Set up Configuration registers
board/pcs440ep/pcs440ep.c +16 -16
@@ -626,22 +626,22 @@ void pci_target_init(struct pci_controller *hose)| Use byte reversed out routines to handle endianess. | Make this region non-prefetchable. +--------------------------------------------------------------------------*/ -out32r (PCIX0_PMM0MA ,0x00000000 );/* PMM0 Mask/Attribute - disabled b4 setting */ -out32r (PCIX0_PMM0LA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 Local Address */ -out32r (PCIX0_PMM0PCILA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 PCI Low Address */ -out32r (PCIX0_PMM0PCIHA ,0x00000000 );/* PMM0 PCI High Address */ -out32r (PCIX0_PMM0MA ,0xE0000001 );/* 512M + No prefetching, and enable region */ - -out32r (PCIX0_PMM1MA ,0x00000000 );/* PMM0 Mask/Attribute - disabled b4 setting */ -out32r (PCIX0_PMM1LA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 Local Address */ -out32r (PCIX0_PMM1PCILA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 PCI Low Address */ -out32r (PCIX0_PMM1PCIHA ,0x00000000 );/* PMM0 PCI High Address */ -out32r (PCIX0_PMM1MA ,0xE0000001 );/* 512M + No prefetching, and enable region */ - -out32r (PCIX0_PTM1MS ,0x00000001 );/* Memory Size/Attribute */ -out32r (PCIX0_PTM1LA ,0 );/* Local Addr. Reg */ -out32r (PCIX0_PTM2MS ,0 );/* Memory Size/Attribute */ -out32r (PCIX0_PTM2LA ,0 );/* Local Addr. Reg */ +out32r (PCIL0_PMM0MA ,0x00000000 );/* PMM0 Mask/Attribute - disabled b4 setting */ +out32r (PCIL0_PMM0LA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 Local Address */ +out32r (PCIL0_PMM0PCILA ,CONFIG_SYS_PCI_MEMBASE );/* PMM0 PCI Low Address */ +out32r (PCIL0_PMM0PCIHA ,0x00000000 );/* PMM0 PCI High Address */ +out32r (PCIL0_PMM0MA ,0xE0000001 );/* 512M + No prefetching, and enable region */ + +out32r (PCIL0_PMM1MA ,0x00000000 );/* PMM0 Mask/Attribute - disabled b4 setting */ +out32r (PCIL0_PMM1LA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 Local Address */ +out32r (PCIL0_PMM1PCILA ,CONFIG_SYS_PCI_MEMBASE2 );/* PMM0 PCI Low Address */ +out32r (PCIL0_PMM1PCIHA ,0x00000000 );/* PMM0 PCI High Address */ +out32r (PCIL0_PMM1MA ,0xE0000001 );/* 512M + No prefetching, and enable region */ + +out32r (PCIL0_PTM1MS ,0x00000001 );/* Memory Size/Attribute */ +out32r (PCIL0_PTM1LA ,0 );/* Local Addr. Reg */ +out32r (PCIL0_PTM2MS ,0 );/* Memory Size/Attribute */ +out32r (PCIL0_PTM2LA ,0 );/* Local Addr. Reg */ /*--------------------------------------------------------------------------+ * Set up Configuration registers
board/prodrive/alpr/alpr.c +26 -26
75 lines not on this page · raw message
board/prodrive/p3p440/p3p440.c +11 -11
@@ -209,28 +209,28 @@ void pci_target_init(struct pci_controller *hose)/*--------------------------------------------------------------------------+ * Disable everything *--------------------------------------------------------------------------*/ -out32r (PCIX0_PIM0SA ,0 );/* disable */ -out32r (PCIX0_PIM1SA ,0 );/* disable */ -out32r (PCIX0_PIM2SA ,0 );/* disable */ -out32r (PCIX0_EROMBA ,0 );/* disable expansion rom */ +out32r (PCIL0_PIM0SA ,0 );/* disable */ +out32r (PCIL0_PIM1SA ,0 );/* disable */ +out32r (PCIL0_PIM2SA ,0 );/* disable */ +out32r (PCIL0_EROMBA ,0 );/* disable expansion rom */ /*--------------------------------------------------------------------------+ * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440 strapping * options to not support sizes such as 128/256 MB. *--------------------------------------------------------------------------*/ -out32r (PCIX0_PIM0LAL ,CONFIG_SYS_SDRAM_BASE ); -out32r (PCIX0_PIM0LAH ,0 ); -out32r (PCIX0_PIM0SA , ~(gd->ram_size -1 ) |1 ); +out32r (PCIL0_PIM0LAL ,CONFIG_SYS_SDRAM_BASE ); +out32r (PCIL0_PIM0LAH ,0 ); +out32r (PCIL0_PIM0SA , ~(gd->ram_size -1 ) |1 ); -out32r (PCIX0_BAR0 ,0 ); +out32r (PCIL0_BAR0 ,0 );/*--------------------------------------------------------------------------+ * Program the board's subsystem id/vendor id *--------------------------------------------------------------------------*/ -out16r (PCIX0_SBSYSVID ,CONFIG_SYS_PCI_SUBSYS_VENDORID ); -out16r (PCIX0_SBSYSID ,CONFIG_SYS_PCI_SUBSYS_DEVICEID ); +out16r (PCIL0_SBSYSVID ,CONFIG_SYS_PCI_SUBSYS_VENDORID ); +out16r (PCIL0_SBSYSID ,CONFIG_SYS_PCI_SUBSYS_DEVICEID ); - out16r(PCIX0_CMD, in16r(PCIX0_CMD) | PCI_COMMAND_MEMORY); + out16r(PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY); }#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
board/sandburst/common/ppc440gx_i2c.h +1 -1
@@ -44,7 +44,7 @@#define IIC_EXTSTS1 (I2C_REGISTERS_BUS1_BASE_ADDRESS+IICEXTSTS)#define IIC_LSADR1 (I2C_REGISTERS_BUS1_BASE_ADDRESS+IICLSADR)#define IIC_HSADR1 (I2C_REGISTERS_BUS1_BASE_ADDRESS+IICHSADR) -#define IIC_CLKDIV1 (I2C_REGISTERS_BUS1_BASE_ADDRESS+IICCLKDIV) +#define IIC_CLKDIV1 (I2C_REGISTERS_BUS1_BASE_ADDRESS+IIC0_CLKDIV)#define IIC_INTRMSK1 (I2C_REGISTERS_BUS1_BASE_ADDRESS+IICINTRMSK)#define IIC_XFRCNT1 (I2C_REGISTERS_BUS1_BASE_ADDRESS+IICXFRCNT)#define IIC_XTCNTLSS1 (I2C_REGISTERS_BUS1_BASE_ADDRESS+IICXTCNTLSS)
board/sandburst/common/sb_common.c +11 -11
@@ -346,28 +346,28 @@ void pci_target_init(struct pci_controller * hose )/*--------------------------------------------------------------------------+ * Disable everything *--------------------------------------------------------------------------*/ -out32r (PCIX0_PIM0SA ,0 );/* disable */ -out32r (PCIX0_PIM1SA ,0 );/* disable */ -out32r (PCIX0_PIM2SA ,0 );/* disable */ -out32r (PCIX0_EROMBA ,0 );/* disable expansion rom */ +out32r (PCIL0_PIM0SA ,0 );/* disable */ +out32r (PCIL0_PIM1SA ,0 );/* disable */ +out32r (PCIL0_PIM2SA ,0 );/* disable */ +out32r (PCIL0_EROMBA ,0 );/* disable expansion rom */ /*--------------------------------------------------------------------------+ * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440 strapping * options to not support sizes such as 128/256 MB. *--------------------------------------------------------------------------*/ -out32r (PCIX0_PIM0LAL ,CONFIG_SYS_SDRAM_BASE ); -out32r (PCIX0_PIM0LAH ,0 ); -out32r (PCIX0_PIM0SA , ~(gd->ram_size -1 ) |1 ); +out32r (PCIL0_PIM0LAL ,CONFIG_SYS_SDRAM_BASE ); +out32r (PCIL0_PIM0LAH ,0 ); +out32r (PCIL0_PIM0SA , ~(gd->ram_size -1 ) |1 ); -out32r (PCIX0_BAR0 ,0 ); +out32r (PCIL0_BAR0 ,0 );/*--------------------------------------------------------------------------+ * Program the board's subsystem id/vendor id *--------------------------------------------------------------------------*/ -out16r (PCIX0_SBSYSVID ,CONFIG_SYS_PCI_SUBSYS_VENDORID ); -out16r (PCIX0_SBSYSID ,CONFIG_SYS_PCI_SUBSYS_DEVICEID ); +out16r (PCIL0_SBSYSVID ,CONFIG_SYS_PCI_SUBSYS_VENDORID ); +out16r (PCIL0_SBSYSID ,CONFIG_SYS_PCI_SUBSYS_DEVICEID ); - out16r( PCIX0_CMD, in16r(PCIX0_CMD) | PCI_COMMAND_MEMORY ); + out16r( PCIL0_CMD, in16r(PCIL0_CMD) | PCI_COMMAND_MEMORY ); }#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
board/xes/xpedite1000/xpedite1000.c +12 -12
@@ -156,7 +156,7 @@ int pci_pre_init(struct pci_controller * hose)return 0 ;#if defined(CONFIG_SYS_PCI_FORCE_PCI_CONV ) -/* Setup System Device Register PCIX0_XCR */ +/* Setup System Device Register PCIL0_XCR */ mfsdr (SDR0_XCR , strap); strap &=0x0f000000 ;mtsdr (SDR0_XCR , strap);
@@ -175,26 +175,26 @@ int pci_pre_init(struct pci_controller * hose)void pci_target_init (struct pci_controller * hose) {/* Disable everything */ -out32r (PCIX0_PIM0SA ,0 ); -out32r (PCIX0_PIM1SA ,0 ); -out32r (PCIX0_PIM2SA ,0 ); -out32r (PCIX0_EROMBA ,0 );/* disable expansion rom */ +out32r (PCIL0_PIM0SA ,0 ); +out32r (PCIL0_PIM1SA ,0 ); +out32r (PCIL0_PIM2SA ,0 ); +out32r (PCIL0_EROMBA ,0 );/* disable expansion rom */ /* * Map all of SDRAM to PCI address 0x0000_0000. Note that the 440 strapping * options to not support sizes such as 128/256 MB. */ -out32r (PCIX0_PIM0LAL ,CONFIG_SYS_SDRAM_BASE ); -out32r (PCIX0_PIM0LAH ,0 ); -out32r (PCIX0_PIM0SA , ~(gd->ram_size -1 ) |1 ); +out32r (PCIL0_PIM0LAL ,CONFIG_SYS_SDRAM_BASE ); +out32r (PCIL0_PIM0LAH ,0 ); +out32r (PCIL0_PIM0SA , ~(gd->ram_size -1 ) |1 ); -out32r (PCIX0_BAR0 ,0 ); +out32r (PCIL0_BAR0 ,0 );/* Program the board's subsystem id/vendor id */ -out16r (PCIX0_SBSYSVID ,CONFIG_SYS_PCI_SUBSYS_VENDORID ); -out16r (PCIX0_SBSYSID ,CONFIG_SYS_PCI_SUBSYS_DEVICEID ); +out16r (PCIL0_SBSYSVID ,CONFIG_SYS_PCI_SUBSYS_VENDORID ); +out16r (PCIL0_SBSYSID ,CONFIG_SYS_PCI_SUBSYS_DEVICEID ); -out16r (PCIX0_CMD ,in16r (PCIX0_CMD ) |PCI_COMMAND_MEMORY ); +out16r (PCIL0_CMD ,in16r (PCIL0_CMD ) |PCI_COMMAND_MEMORY ); }#endif /* defined(CONFIG_PCI) && defined(CONFIG_SYS_PCI_TARGET_INIT) */
cpu/ppc4xx/4xx_pci.c +24 -24
86 lines not on this page · raw message
cpu/ppc4xx/cpu_init.c +2 -2
@@ -58,13 +58,13 @@ void reconfigure_pll(u32 new_cpu_freq) target_perdv0 =4 ; target_spcid0 =4 ; -mfcpr (CPR0_PRIMBD , reg); +mfcpr (CPR0_PRIMBD0 , reg); temp = (reg &PRBDV_MASK ) >>24 ; prbdv0 = temp ? temp :8 ;if (prbdv0 != target_prbdv0) { reg &= ~PRBDV_MASK ; reg |= ((target_prbdv0 ==8 ?0 : target_prbdv0) <<24 ); -mtcpr (CPR0_PRIMBD , reg); +mtcpr (CPR0_PRIMBD0 , reg); reset_needed =1 ; }
cpu/ppc4xx/miiphy.c +12 -12
@@ -195,7 +195,7 @@ unsigned int miiphy_getemac_offset(u8 addr)unsigned long eoffset;/* Need to find out which mdi port we're using */ - zmii =in_be32 ((void *)ZMII_FER ); + zmii =in_be32 ((void *)ZMII0_FER );if (zmii & (ZMII_FER_MDI <<ZMII_FER_V (0 )))/* using port 0 */
@@ -217,12 +217,12 @@ unsigned int miiphy_getemac_offset(u8 addr)/* None of the mdi ports are enabled! */ /* enable port 0 */ zmii |=ZMII_FER_MDI <<ZMII_FER_V (0 ); -out_be32 ((void *)ZMII_FER , zmii); +out_be32 ((void *)ZMII0_FER , zmii); eoffset =0 ;/* need to soft reset port 0 */ - zmii =in_be32 ((void *)EMAC_M0 ); - zmii |=EMAC_M0_SRST ; -out_be32 ((void *)EMAC_M0 , zmii); + zmii =in_be32 ((void *)EMAC0_MR0 ); + zmii |=EMAC_MR0_SRST ; +out_be32 ((void *)EMAC0_MR0 , zmii); }return (eoffset);
@@ -243,19 +243,19 @@ unsigned int miiphy_getemac_offset(u8 addr)switch (addr) {#if defined(CONFIG_HAS_ETH1 ) && defined(CONFIG_GPCS_PHY1_ADDR )case CONFIG_GPCS_PHY1_ADDR : -if (addr ==EMAC_M1_IPPA_GET (in_be32 ((void *)EMAC_M1 +0x100 ))) +if (addr ==EMAC_MR1_IPPA_GET (in_be32 ((void *)EMAC0_MR1 +0x100 ))) eoffset =0x100 ;break ;#endif #if defined(CONFIG_HAS_ETH2 ) && defined(CONFIG_GPCS_PHY2_ADDR )case CONFIG_GPCS_PHY2_ADDR : -if (addr ==EMAC_M1_IPPA_GET (in_be32 ((void *)EMAC_M1 +0x300 ))) +if (addr ==EMAC_MR1_IPPA_GET (in_be32 ((void *)EMAC0_MR1 +0x300 ))) eoffset =0x300 ;break ;#endif #if defined(CONFIG_HAS_ETH3 ) && defined(CONFIG_GPCS_PHY3_ADDR )case CONFIG_GPCS_PHY3_ADDR : -if (addr ==EMAC_M1_IPPA_GET (in_be32 ((void *)EMAC_M1 +0x400 ))) +if (addr ==EMAC_MR1_IPPA_GET (in_be32 ((void *)EMAC0_MR1 +0x400 ))) eoffset =0x400 ;break ;#endif
@@ -278,9 +278,9 @@ static int emac_miiphy_wait(u32 emac_reg)/* wait for completion */ i =0 ; do { - sta_reg = in_be32((void *)EMAC_STACR + emac_reg); + sta_reg = in_be32((void *)EMAC0_STACR + emac_reg); if (i++ > 5) { - debug("%s [%d]: Timeout! EMAC_STACR=0x%0x\n", __func__, + debug("%s [%d]: Timeout! EMAC0_STACR=0x%0x\n", __func__, __LINE__, sta_reg); return -1; }
@@ -324,7 +324,7 @@ static int emac_miiphy_command(u8 addr, u8 reg, int cmd, u16 value)if (cmd ==EMAC_STACR_WRITE )memcpy (&sta_reg, &value,2 );/* put in data */ -out_be32 ((void *)EMAC_STACR + emac_reg, sta_reg); +out_be32 ((void *)EMAC0_STACR + emac_reg, sta_reg);debug ("%s [%d]: sta_reg=%08x\n" , __func__, __LINE__, sta_reg);/* wait for completion */
@@ -349,7 +349,7 @@ int emac4xx_miiphy_read (char *devname, unsigned char addr, unsigned char reg,if (emac_miiphy_command (addr, reg,EMAC_STACR_READ ,0 ) !=0 )return -1 ; - sta_reg =in_be32 ((void *)EMAC_STACR + emac_reg); + sta_reg =in_be32 ((void *)EMAC0_STACR + emac_reg); *value = sta_reg >>16 ;return 0 ;
cpu/ppc4xx/speed.c +3 -3
@@ -334,7 +334,7 @@ void get_sys_info (sys_info_t *sysInfo) sysInfo->pllFbkDiv = temp ? temp :32 ; lfdiv = reg &PLLD_LFBDV_MASK ; -mfcpr (CPR0_OPBD , reg); +mfcpr (CPR0_OPBD0 , reg); temp = (reg &OPBDDV_MASK ) >>24 ; sysInfo->pllOpbDiv = temp ? temp :4 ;
@@ -342,7 +342,7 @@ void get_sys_info (sys_info_t *sysInfo) temp = (reg &PERDV_MASK ) >>24 ; sysInfo->pllExtBusDiv = temp ? temp :8 ; -mfcpr (CPR0_PRIMBD , reg); +mfcpr (CPR0_PRIMBD0 , reg); temp = (reg &PRBDV_MASK ) >>24 ; prbdv0 = temp ? temp :8 ;
@@ -1050,7 +1050,7 @@ void get_sys_info (sys_info_t * sysInfo)/* * Determine OPBDV0 */ -mfcpr (CPR0_OPBD , tmp); +mfcpr (CPR0_OPBD0 , tmp); tmp = (tmp >>24 ) &0x03 ; sysInfo->pllOpbDiv = (tmp ==0 ) ?4 : tmp;
drivers/net/4xx_enet.c +50 -50
289 lines not on this page · raw message
post/cpu/ppc4xx/ether.c +25 -25
105 lines not on this page · raw message
Signature · 1 line
1.6.3.3
PATCH v2 3/4 ppc4xx: Rework cmd reginfo
The command "reginfo" got an overhaul for the ppc4xx. It dumps all the relevant HW configuration registers (address, symbolic name, content). This allows to easily detect errors in *.h files and changes in the HW configuration.
--- common/cmd_reginfo.c | 158 +--------------------- cpu/ppc4xx/Makefile | 4 + cpu/ppc4xx/reginfo.c | 370 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 378 insertions(+), 154 deletions(-) create mode 100644 cpu/ppc4xx/reginfo.c
common/cmd_reginfo.c +4 -154
@@ -25,8 +25,8 @@#include <command.h> #if defined(CONFIG_8xx)#include <mpc8xx.h> -#elif defined (CONFIG_405GP ) || defined(CONFIG_405EP ) -#include <asm/processor.h> +#elif defined (CONFIG_4xx) +extern void ppc4xx_reginfo (void );#elif defined (CONFIG_5xx)#include <mpc5xx.h> #elif defined (CONFIG_MPC5200 )
@@ -90,158 +90,8 @@ int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])* May be some CPM info here? */ -#elif defined (CONFIG_405GP ) -printf ("\n405GP registers; MSR=%08x\n" ,mfmsr ()); -printf ("\nUniversal Interrupt Controller Regs\n" -"UIC0SR UIC0ER UIC0CR UIC0PR UIC0TR UIC0MSR UIC0VR UIC0VCR" -"\n" -"%08x %08x %08x %08x %08x %08x %08x %08x\n" , -mfdcr (UIC0SR ), -mfdcr (UIC0ER ), -mfdcr (UIC0CR ), -mfdcr (UIC0PR ), -mfdcr (UIC0TR ), -mfdcr (UIC0MSR ), -mfdcr (UIC0VR ), -mfdcr (UIC0VCR )); - -puts ("\nMemory (SDRAM) Configuration\n" -"besra besrsa besrb besrsb bear mcopt1 rtr pmit\n" ); - -mtdcr (SDRAM0_CFGADDR ,SDRAM0_BESR0 );printf ("%08x " ,mfdcr (SDRAM0_CFGDATA )); -mtdcr (SDRAM0_CFGADDR ,SDRAM0_BESRS0 );printf ("%08x " ,mfdcr (SDRAM0_CFGDATA )); -mtdcr (SDRAM0_CFGADDR ,SDRAM0_BESR1 );printf ("%08x " ,mfdcr (SDRAM0_CFGDATA )); -mtdcr (SDRAM0_CFGADDR ,SDRAM0_BESRS1 );printf ("%08x " ,mfdcr (SDRAM0_CFGDATA )); -mtdcr (SDRAM0_CFGADDR ,SDRAM0_BEAR );printf ("%08x " ,mfdcr (SDRAM0_CFGDATA )); -mtdcr (SDRAM0_CFGADDR ,SDRAM0_CFG );printf ("%08x " ,mfdcr (SDRAM0_CFGDATA )); -mtdcr (SDRAM0_CFGADDR ,SDRAM0_RTR );printf ("%08x " ,mfdcr (SDRAM0_CFGDATA )); -mtdcr (SDRAM0_CFGADDR ,SDRAM0_PMIT );printf ("%08x " ,mfdcr (SDRAM0_CFGDATA )); - -puts ("\n" -"mb0cf mb1cf mb2cf mb3cf sdtr1 ecccf eccerr\n" ); -mtdcr (SDRAM0_CFGADDR ,SDRAM0_B0CR );printf ("%08x " ,mfdcr (SDRAM0_CFGDATA )); -mtdcr (SDRAM0_CFGADDR ,SDRAM0_B1CR );printf ("%08x " ,mfdcr (SDRAM0_CFGDATA )); -mtdcr (SDRAM0_CFGADDR ,SDRAM0_B2CR );printf ("%08x " ,mfdcr (SDRAM0_CFGDATA )); -mtdcr (SDRAM0_CFGADDR ,SDRAM0_B3CR );printf ("%08x " ,mfdcr (SDRAM0_CFGDATA )); -mtdcr (SDRAM0_CFGADDR ,SDRAM0_TR );printf ("%08x " ,mfdcr (SDRAM0_CFGDATA )); -mtdcr (SDRAM0_CFGADDR ,SDRAM0_ECCCFG );printf ("%08x " ,mfdcr (SDRAM0_CFGDATA )); -mtdcr (SDRAM0_CFGADDR ,SDRAM0_ECCESR );printf ("%08x " ,mfdcr (SDRAM0_CFGDATA )); - -printf ("\n\n" -"DMA Channels\n" -"DMASR DMASGC DMAADR\n" -"%08x %08x %08x\n" -"dmacr_0 dmact_0 dmada_0 dmasa_0 dmasb_0\n" -"%08x %08x %08x %08x %08x\n" -"dmacr_1 dmact_1 dmada_1 dmasa_1 dmasb_1\n" -"%08x %08x %08x %08x %08x\n" , -mfdcr (DMASR ),mfdcr (DMASGC ),mfdcr (DMAADR ), -mfdcr (DMACR0 ),mfdcr (DMACT0 ),mfdcr (DMADA0 ),mfdcr (DMASA0 ),mfdcr (DMASB0 ), -mfdcr (DMACR1 ),mfdcr (DMACT1 ),mfdcr (DMADA1 ),mfdcr (DMASA1 ),mfdcr (DMASB1 )); - -printf ( -"dmacr_2 dmact_2 dmada_2 dmasa_2 dmasb_2\n" "%08x %08x %08x %08x %08x\n" -"dmacr_3 dmact_3 dmada_3 dmasa_3 dmasb_3\n" "%08x %08x %08x %08x %08x\n" , -mfdcr (DMACR2 ),mfdcr (DMACT2 ),mfdcr (DMADA2 ),mfdcr (DMASA2 ),mfdcr (DMASB2 ), -mfdcr (DMACR3 ),mfdcr (DMACT3 ),mfdcr (DMADA3 ),mfdcr (DMASA3 ),mfdcr (DMASB3 ) ); - -puts ("\n" -"External Bus\n" -"PBEAR PBESR0 PBESR1 EBC0_CFG\n" ); -mtdcr (EBC0_CFGADDR ,PBEAR );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PBESR0 );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PBESR1 );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,EBC0_CFG );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); - -puts ("\n" -"PB0CR PB0AP PB1CR PB1AP PB2CR PB2AP PB3CR PB3AP\n" ); -mtdcr (EBC0_CFGADDR ,PB0CR );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PB0AP );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PB1CR );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PB1AP );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PB2CR );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PB2AP );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PB3CR );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PB3AP );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); - -puts ("\n" -"PB4CR PB4AP PB5CR bp5ap PB6CR PB6AP PB7CR PB7AP\n" ); -mtdcr (EBC0_CFGADDR ,PB4CR );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PB4AP );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PB5CR );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PB5AP );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PB6CR );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PB6AP );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PB7CR );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PB7AP );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); - -puts ("\n\n" ); - -#elif defined(CONFIG_405EP ) -printf ("\n405EP registers; MSR=%08x\n" ,mfmsr ()); -printf ("\nUniversal Interrupt Controller Regs\n" -"UIC0SR UIC0ER UIC0CR UIC0PR UIC0TR UIC0MSR UIC0VR UIC0VCR" -"\n" -"%08x %08x %08x %08x %08x %08x %08x %08x\n" , -mfdcr (UIC0SR ), -mfdcr (UIC0ER ), -mfdcr (UIC0CR ), -mfdcr (UIC0PR ), -mfdcr (UIC0TR ), -mfdcr (UIC0MSR ), -mfdcr (UIC0VR ), -mfdcr (UIC0VCR )); - -puts ("\nMemory (SDRAM) Configuration\n" -"mcopt1 rtr pmit mb0cf mb1cf sdtr1\n" ); - -mtdcr (SDRAM0_CFGADDR ,SDRAM0_CFG );printf ("%08x " ,mfdcr (SDRAM0_CFGDATA )); -mtdcr (SDRAM0_CFGADDR ,SDRAM0_RTR );printf ("%08x " ,mfdcr (SDRAM0_CFGDATA )); -mtdcr (SDRAM0_CFGADDR ,SDRAM0_PMIT );printf ("%08x " ,mfdcr (SDRAM0_CFGDATA )); -mtdcr (SDRAM0_CFGADDR ,SDRAM0_B0CR );printf ("%08x " ,mfdcr (SDRAM0_CFGDATA )); -mtdcr (SDRAM0_CFGADDR ,SDRAM0_B1CR );printf ("%08x " ,mfdcr (SDRAM0_CFGDATA )); -mtdcr (SDRAM0_CFGADDR ,SDRAM0_TR );printf ("%08x " ,mfdcr (SDRAM0_CFGDATA )); - -printf ("\n\n" -"DMA Channels\n" -"DMASR DMASGC DMAADR\n" "%08x %08x %08x\n" -"dmacr_0 dmact_0 dmada_0 dmasa_0 dmasb_0\n" "%08x %08x %08x %08x %08x\n" -"dmacr_1 dmact_1 dmada_1 dmasa_1 dmasb_1\n" "%08x %08x %08x %08x %08x\n" , -mfdcr (DMASR ),mfdcr (DMASGC ),mfdcr (DMAADR ), -mfdcr (DMACR0 ),mfdcr (DMACT0 ),mfdcr (DMADA0 ),mfdcr (DMASA0 ),mfdcr (DMASB0 ), -mfdcr (DMACR1 ),mfdcr (DMACT1 ),mfdcr (DMADA1 ),mfdcr (DMASA1 ),mfdcr (DMASB1 )); - -printf ( -"dmacr_2 dmact_2 dmada_2 dmasa_2 dmasb_2\n" "%08x %08x %08x %08x %08x\n" -"dmacr_3 dmact_3 dmada_3 dmasa_3 dmasb_3\n" "%08x %08x %08x %08x %08x\n" , -mfdcr (DMACR2 ),mfdcr (DMACT2 ),mfdcr (DMADA2 ),mfdcr (DMASA2 ),mfdcr (DMASB2 ), -mfdcr (DMACR3 ),mfdcr (DMACT3 ),mfdcr (DMADA3 ),mfdcr (DMASA3 ),mfdcr (DMASB3 ) ); - -puts ("\n" -"External Bus\n" -"PBEAR PBESR0 PBESR1 EBC0_CFG\n" ); -mtdcr (EBC0_CFGADDR ,PBEAR );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PBESR0 );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PBESR1 );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,EBC0_CFG );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); - -puts ("\n" -"PB0CR PB0AP PB1CR PB1AP PB2CR PB2AP PB3CR PB3AP\n" ); -mtdcr (EBC0_CFGADDR ,PB0CR );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PB0AP );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PB1CR );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PB1AP );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PB2CR );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PB2AP );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PB3CR );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PB3AP );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); - -puts ("\n" -"PB4CR PB4AP\n" ); -mtdcr (EBC0_CFGADDR ,PB4CR );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); -mtdcr (EBC0_CFGADDR ,PB4AP );printf ("%08x " ,mfdcr (EBC0_CFGDATA )); - -puts ("\n\n" ); +#elif defined (CONFIG_4xx) +ppc4xx_reginfo ();#elif defined(CONFIG_5xx)volatile immap_t *immap = (immap_t *)CONFIG_SYS_IMMR ;
cpu/ppc4xx/Makefile +4 -0
@@ -33,6 +33,7 @@ SOBJS += dcr.o SOBJS += kgdb.o COBJS := 40x_spd_sdram.o + COBJS += 44x_spd_ddr.o COBJS += 44x_spd_ddr2.o ifdef CONFIG_PPC4xx_DDR_AUTOCALIBRATION
@@ -54,6 +55,9 @@ COBJS += fdt.o COBJS += i2c.o COBJS += interrupts.o COBJS += iop480_uart.o +ifdef CONFIG_CMD_REGINFO +COBJS += reginfo.o +endif COBJS += sdram.o COBJS += speed.o COBJS += tlb.o
cpu/ppc4xx/reginfo.c new file +370 -0
370 lines not on this page · raw message
Signature · 1 line
1.6.3.3
PATCH v2 4/4 ppc4xx: respect 80-chars per line in ppc*.h files
After running checkstyle.pl on the three previous patches I noted that in the *.h files there were a lot of long lines. This patch solves this problem.
--- include/ppc405.h | 526 +++++++++++----------- include/ppc440.h | 1252 ++++++++++++++++++++++++++++--------------------- include/ppc4xx.h | 36 +- include/ppc4xx_enet.h | 94 ++-- 4 files changed, 1038 insertions(+), 870 deletions(-)
include/ppc405.h +263 -263
@@ -29,9 +29,9 @@#define PPC_128MB_SACR_VALUE (addr) PPC_REG_VAL(PPC_128MB_SACR_BIT(addr),1)#ifndef CONFIG_IOP480 -#define CONFIG_SYS_DCACHE_SIZE (16 << 10)/* For AMCC 405 CPUs */ +#define CONFIG_SYS_DCACHE_SIZE (16 << 10)/* For AMCC 405 CPUs */ #else -#define CONFIG_SYS_DCACHE_SIZE (2 << 10)/* For PLX IOP480 (403) */ +#define CONFIG_SYS_DCACHE_SIZE (2 << 10)/* For PLX IOP480(403)*/ #endif /******************************************************************************
@@ -71,10 +71,10 @@* Decompression Controller ******************************************************************************/ #define DECOMP_DCR_BASE 0x14 -#define KIAR (DECOMP_DCR_BASE+0x0)/* Decompression controller addr reg */ -#define KIDR (DECOMP_DCR_BASE+0x1)/* Decompression controller data reg */ +#define KIAR (DECOMP_DCR_BASE+0x0)/* Decompression controller addr reg */ +#define KIDR (DECOMP_DCR_BASE+0x1)/* Decompression controller data reg */ /* values for kiar register - indirect addressing of these regs */ -#define KCONF 0x40/* decompression core config register */ +#define KCONF 0x40/* decompression core config register */ #endif /******************************************************************************
@@ -85,61 +85,61 @@#else #define POWERMAN_DCR_BASE 0xb8#endif -#define CPMSR (POWERMAN_DCR_BASE+0x0)/* Power management status */ -#define CPMER (POWERMAN_DCR_BASE+0x1)/* Power management enable */ -#define CPMFR (POWERMAN_DCR_BASE+0x2)/* Power management force */ +#define CPMSR (POWERMAN_DCR_BASE+0x0)/* Power management status */ +#define CPMER (POWERMAN_DCR_BASE+0x1)/* Power management enable */ +#define CPMFR (POWERMAN_DCR_BASE+0x2)/* Power management force */ /****************************************************************************** * Extrnal Bus Controller ******************************************************************************/ /* values for EBC0_CFGADDR register - indirect addressing of these regs */ -#define PB0CR 0x00/* periph bank 0 config reg */ -#define PB1CR 0x01/* periph bank 1 config reg */ -#define PB2CR 0x02/* periph bank 2 config reg */ -#define PB3CR 0x03/* periph bank 3 config reg */ -#define PB4CR 0x04/* periph bank 4 config reg */ +#define PB0CR 0x00/* periph bank 0 config reg */ +#define PB1CR 0x01/* periph bank 1 config reg */ +#define PB2CR 0x02/* periph bank 2 config reg */ +#define PB3CR 0x03/* periph bank 3 config reg */ +#define PB4CR 0x04/* periph bank 4 config reg */ #ifndef CONFIG_405EP -#define PB5CR 0x05/* periph bank 5 config reg */ -#define PB6CR 0x06/* periph bank 6 config reg */ -#define PB7CR 0x07/* periph bank 7 config reg */ +#define PB5CR 0x05/* periph bank 5 config reg */ +#define PB6CR 0x06/* periph bank 6 config reg */ +#define PB7CR 0x07/* periph bank 7 config reg */ #endif -#define PB0AP 0x10/* periph bank 0 access parameters */ -#define PB1AP 0x11/* periph bank 1 access parameters */ -#define PB2AP 0x12/* periph bank 2 access parameters */ -#define PB3AP 0x13/* periph bank 3 access parameters */ -#define PB4AP 0x14/* periph bank 4 access parameters */ +#define PB0AP 0x10/* periph bank 0 access parameters */ +#define PB1AP 0x11/* periph bank 1 access parameters */ +#define PB2AP 0x12/* periph bank 2 access parameters */ +#define PB3AP 0x13/* periph bank 3 access parameters */ +#define PB4AP 0x14/* periph bank 4 access parameters */ #ifndef CONFIG_405EP -#define PB5AP 0x15/* periph bank 5 access parameters */ -#define PB6AP 0x16/* periph bank 6 access parameters */ -#define PB7AP 0x17/* periph bank 7 access parameters */ +#define PB5AP 0x15/* periph bank 5 access parameters */ +#define PB6AP 0x16/* periph bank 6 access parameters */ +#define PB7AP 0x17/* periph bank 7 access parameters */ #endif -#define PBEAR 0x20/* periph bus error addr reg */ -#define PBESR0 0x21/* periph bus error status reg 0 */ -#define PBESR1 0x22/* periph bus error status reg 1 */ -#define EBC0_CFG 0x23/* external bus configuration reg */ +#define PBEAR 0x20/* periph bus error addr reg */ +#define PBESR0 0x21/* periph bus error status reg 0 */ +#define PBESR1 0x22/* periph bus error status reg 1 */ +#define EBC0_CFG 0x23/* external bus configuration reg */ #ifdef CONFIG_405EP /****************************************************************************** * Control ******************************************************************************/ #define CNTRL_DCR_BASE 0x0f0 -#define CPC0_PLLMR0 (CNTRL_DCR_BASE+0x0)/* PLL mode register 0 */ -#define CPC0_BOOT (CNTRL_DCR_BASE+0x1)/* Clock status register */ -#define CPC0_EPCTL (CNTRL_DCR_BASE+0x3)/* EMAC to PHY control register */ -#define CPC0_PLLMR1 (CNTRL_DCR_BASE+0x4)/* PLL mode register 1 */ -#define CPC0_UCR (CNTRL_DCR_BASE+0x5)/* UART control register */ -#define CPC0_PCI (CNTRL_DCR_BASE+0x9)/* PCI control register */ - -#define CPC0_PLLMR0 (CNTRL_DCR_BASE+0x0)/* PLL mode 0 register */ -#define CPC0_BOOT (CNTRL_DCR_BASE+0x1)/* Chip Clock Status register */ -#define CPC0_CR1 (CNTRL_DCR_BASE+0x2)/* Chip Control 1 register */ -#define CPC0_EPRCSR (CNTRL_DCR_BASE+0x3)/* EMAC PHY Rcv Clk Src register*/ -#define CPC0_PLLMR1 (CNTRL_DCR_BASE+0x4)/* PLL mode 1 register */ -#define CPC0_UCR (CNTRL_DCR_BASE+0x5)/* UART Control register */ -#define CPC0_SRR (CNTRL_DCR_BASE+0x6)/* Soft Reset register */ -#define CPC0_JTAGID (CNTRL_DCR_BASE+0x7)/* JTAG ID register */ -#define CPC0_SPARE (CNTRL_DCR_BASE+0x8)/* Spare DCR */ -#define CPC0_PCI (CNTRL_DCR_BASE+0x9)/* PCI Control register */ +#define CPC0_PLLMR0 (CNTRL_DCR_BASE+0x0)/* PLL mode register 0 */ +#define CPC0_BOOT (CNTRL_DCR_BASE+0x1)/* Clock status register */ +#define CPC0_EPCTL (CNTRL_DCR_BASE+0x3)/* EMAC to PHY control register */ +#define CPC0_PLLMR1 (CNTRL_DCR_BASE+0x4)/* PLL mode register 1 */ +#define CPC0_UCR (CNTRL_DCR_BASE+0x5)/* UART control register */ +#define CPC0_PCI (CNTRL_DCR_BASE+0x9)/* PCI control register */ + +#define CPC0_PLLMR0 (CNTRL_DCR_BASE+0x0)/* PLL mode 0 register */ +#define CPC0_BOOT (CNTRL_DCR_BASE+0x1)/* Chip Clock Status register */ +#define CPC0_CR1 (CNTRL_DCR_BASE+0x2)/* Chip Control 1 register */ +#define CPC0_EPRCSR (CNTRL_DCR_BASE+0x3)/* EMAC PHY Rcv Clk Src register */ +#define CPC0_PLLMR1 (CNTRL_DCR_BASE+0x4)/* PLL mode 1 register */ +#define CPC0_UCR (CNTRL_DCR_BASE+0x5)/* UART Control register */ +#define CPC0_SRR (CNTRL_DCR_BASE+0x6)/* Soft Reset register */ +#define CPC0_JTAGID (CNTRL_DCR_BASE+0x7)/* JTAG ID register */ +#define CPC0_SPARE (CNTRL_DCR_BASE+0x8)/* Spare DCR */ +#define CPC0_PCI (CNTRL_DCR_BASE+0x9)/* PCI Control register */ /* Bit definitions */ #define PLLMR0_CPU_DIV_MASK 0x00300000/* CPU clock divider */
@@ -160,13 +160,13 @@#define PLLMR0_OPB_PLB_DIV_3 0x00002000#define PLLMR0_OPB_PLB_DIV_4 0x00003000 -#define PLLMR0_EXB_TO_PLB_MASK 0x00000300/* External Bus:PLB Divisor */ +#define PLLMR0_EXB_TO_PLB_MASK 0x00000300/* External Bus:PLB Divisor */ #define PLLMR0_EXB_PLB_DIV_2 0x00000000#define PLLMR0_EXB_PLB_DIV_3 0x00000100#define PLLMR0_EXB_PLB_DIV_4 0x00000200#define PLLMR0_EXB_PLB_DIV_5 0x00000300 -#define PLLMR0_MAL_TO_PLB_MASK 0x00000030/* MAL:PLB Divisor */ +#define PLLMR0_MAL_TO_PLB_MASK 0x00000030/* MAL:PLB Divisor */ #define PLLMR0_MAL_PLB_DIV_1 0x00000000#define PLLMR0_MAL_PLB_DIV_2 0x00000010#define PLLMR0_MAL_PLB_DIV_3 0x00000020
@@ -180,7 +180,7 @@#define PLLMR1_SSCS_MASK 0x80000000/* Select system clock source */ #define PLLMR1_PLLR_MASK 0x40000000/* PLL reset */ -#define PLLMR1_FBMUL_MASK 0x00F00000/* PLL feedback multiplier value */ +#define PLLMR1_FBMUL_MASK 0x00F00000/* PLL feedback multiplier value */ #define PLLMR1_FBMUL_DIV_16 0x00000000#define PLLMR1_FBMUL_DIV_1 0x00100000#define PLLMR1_FBMUL_DIV_2 0x00200000
@@ -198,7 +198,7 @@#define PLLMR1_FBMUL_DIV_14 0x00E00000#define PLLMR1_FBMUL_DIV_15 0x00F00000 -#define PLLMR1_FWDVA_MASK 0x00070000/* PLL forward divider A value */ +#define PLLMR1_FWDVA_MASK 0x00070000/* PLL forward divider A value */ #define PLLMR1_FWDVA_DIV_8 0x00000000#define PLLMR1_FWDVA_DIV_7 0x00010000#define PLLMR1_FWDVA_DIV_6 0x00020000
@@ -207,132 +207,132 @@#define PLLMR1_FWDVA_DIV_3 0x00050000#define PLLMR1_FWDVA_DIV_2 0x00060000#define PLLMR1_FWDVA_DIV_1 0x00070000 -#define PLLMR1_FWDVB_MASK 0x00007000/* PLL forward divider B value */ -#define PLLMR1_TUNING_MASK 0x000003FF/* PLL tune bits */ +#define PLLMR1_FWDVB_MASK 0x00007000/* PLL forward divider B value */ +#define PLLMR1_TUNING_MASK 0x000003FF/* PLL tune bits */ /* Defines for CPC0_EPRCSR register */ -#define CPC0_EPRCSR_E0NFE 0x80000000 -#define CPC0_EPRCSR_E1NFE 0x40000000 -#define CPC0_EPRCSR_E1RPP 0x00000080 -#define CPC0_EPRCSR_E0RPP 0x00000040 -#define CPC0_EPRCSR_E1ERP 0x00000020 -#define CPC0_EPRCSR_E0ERP 0x00000010 -#define CPC0_EPRCSR_E1PCI 0x00000002 -#define CPC0_EPRCSR_E0PCI 0x00000001 +#define CPC0_EPRCSR_E0NFE 0x80000000 +#define CPC0_EPRCSR_E1NFE 0x40000000 +#define CPC0_EPRCSR_E1RPP 0x00000080 +#define CPC0_EPRCSR_E0RPP 0x00000040 +#define CPC0_EPRCSR_E1ERP 0x00000020 +#define CPC0_EPRCSR_E0ERP 0x00000010 +#define CPC0_EPRCSR_E1PCI 0x00000002 +#define CPC0_EPRCSR_E0PCI 0x00000001/* Defines for CPC0_PCI Register */ -#define CPC0_PCI_SPE 0x00000010/* PCIINT/WE select */ -#define CPC0_PCI_HOST_CFG_EN 0x00000008/* PCI host config Enable */ -#define CPC0_PCI_ARBIT_EN 0x00000001/* PCI Internal Arb Enabled*/ +#define CPC0_PCI_SPE 0x00000010/* PCIINT/WE select */ +#define CPC0_PCI_HOST_CFG_EN 0x00000008/* PCI host config Enable */ +#define CPC0_PCI_ARBIT_EN 0x00000001/* PCI Internal Arb Enabled */ /* Defines for CPC0_BOOR Register */ -#define CPC0_BOOT_SEP 0x00000002/* serial EEPROM present */ +#define CPC0_BOOT_SEP 0x00000002/* serial EEPROM present */ /* Defines for CPC0_PLLMR1 Register fields */ -#define PLL_ACTIVE 0x80000000 -#define CPC0_PLLMR1_SSCS 0x80000000 -#define PLL_RESET 0x40000000 -#define CPC0_PLLMR1_PLLR 0x40000000 -/* Feedback multiplier */ -#define PLL_FBKDIV 0x00F00000 -#define CPC0_PLLMR1_FBDV 0x00F00000 -#define PLL_FBKDIV_16 0x00000000 -#define PLL_FBKDIV_1 0x00100000 -#define PLL_FBKDIV_2 0x00200000 -#define PLL_FBKDIV_3 0x00300000 -#define PLL_FBKDIV_4 0x00400000 -#define PLL_FBKDIV_5 0x00500000 -#define PLL_FBKDIV_6 0x00600000 -#define PLL_FBKDIV_7 0x00700000 -#define PLL_FBKDIV_8 0x00800000 -#define PLL_FBKDIV_9 0x00900000 -#define PLL_FBKDIV_10 0x00A00000 -#define PLL_FBKDIV_11 0x00B00000 -#define PLL_FBKDIV_12 0x00C00000 -#define PLL_FBKDIV_13 0x00D00000 -#define PLL_FBKDIV_14 0x00E00000 -#define PLL_FBKDIV_15 0x00F00000 -/* Forward A divisor */ -#define PLL_FWDDIVA 0x00070000 -#define CPC0_PLLMR1_FWDVA 0x00070000 -#define PLL_FWDDIVA_8 0x00000000 -#define PLL_FWDDIVA_7 0x00010000 -#define PLL_FWDDIVA_6 0x00020000 -#define PLL_FWDDIVA_5 0x00030000 -#define PLL_FWDDIVA_4 0x00040000 -#define PLL_FWDDIVA_3 0x00050000 -#define PLL_FWDDIVA_2 0x00060000 -#define PLL_FWDDIVA_1 0x00070000 -/* Forward B divisor */ -#define PLL_FWDDIVB 0x00007000 -#define CPC0_PLLMR1_FWDVB 0x00007000 -#define PLL_FWDDIVB_8 0x00000000 -#define PLL_FWDDIVB_7 0x00001000 -#define PLL_FWDDIVB_6 0x00002000 -#define PLL_FWDDIVB_5 0x00003000 -#define PLL_FWDDIVB_4 0x00004000 -#define PLL_FWDDIVB_3 0x00005000 -#define PLL_FWDDIVB_2 0x00006000 -#define PLL_FWDDIVB_1 0x00007000 -/* PLL tune bits */ +#define PLL_ACTIVE 0x80000000 +#define CPC0_PLLMR1_SSCS 0x80000000 +#define PLL_RESET 0x40000000 +#define CPC0_PLLMR1_PLLR 0x40000000 +/* Feedback multiplier */ +#define PLL_FBKDIV 0x00F00000 +#define CPC0_PLLMR1_FBDV 0x00F00000 +#define PLL_FBKDIV_16 0x00000000 +#define PLL_FBKDIV_1 0x00100000 +#define PLL_FBKDIV_2 0x00200000 +#define PLL_FBKDIV_3 0x00300000 +#define PLL_FBKDIV_4 0x00400000 +#define PLL_FBKDIV_5 0x00500000 +#define PLL_FBKDIV_6 0x00600000 +#define PLL_FBKDIV_7 0x00700000 +#define PLL_FBKDIV_8 0x00800000 +#define PLL_FBKDIV_9 0x00900000 +#define PLL_FBKDIV_10 0x00A00000 +#define PLL_FBKDIV_11 0x00B00000 +#define PLL_FBKDIV_12 0x00C00000 +#define PLL_FBKDIV_13 0x00D00000 +#define PLL_FBKDIV_14 0x00E00000 +#define PLL_FBKDIV_15 0x00F00000 +/* Forward A divisor */ +#define PLL_FWDDIVA 0x00070000 +#define CPC0_PLLMR1_FWDVA 0x00070000 +#define PLL_FWDDIVA_8 0x00000000 +#define PLL_FWDDIVA_7 0x00010000 +#define PLL_FWDDIVA_6 0x00020000 +#define PLL_FWDDIVA_5 0x00030000 +#define PLL_FWDDIVA_4 0x00040000 +#define PLL_FWDDIVA_3 0x00050000 +#define PLL_FWDDIVA_2 0x00060000 +#define PLL_FWDDIVA_1 0x00070000 +/* Forward B divisor */ +#define PLL_FWDDIVB 0x00007000 +#define CPC0_PLLMR1_FWDVB 0x00007000 +#define PLL_FWDDIVB_8 0x00000000 +#define PLL_FWDDIVB_7 0x00001000 +#define PLL_FWDDIVB_6 0x00002000 +#define PLL_FWDDIVB_5 0x00003000 +#define PLL_FWDDIVB_4 0x00004000 +#define PLL_FWDDIVB_3 0x00005000 +#define PLL_FWDDIVB_2 0x00006000 +#define PLL_FWDDIVB_1 0x00007000 +/* PLL tune bits */ #define PLL_TUNE_MASK 0x000003FF -#define PLL_TUNE_2_M_3 0x00000133/* 2 <= M <= 3 */ -#define PLL_TUNE_4_M_6 0x00000134/* 3 < M <= 6 */ -#define PLL_TUNE_7_M_10 0x00000138/* 6 < M <= 10 */ -#define PLL_TUNE_11_M_14 0x0000013C/* 10 < M <= 14 */ -#define PLL_TUNE_15_M_40 0x0000023E/* 14 < M <= 40 */ -#define PLL_TUNE_VCO_LOW 0x00000000/* 500MHz <= VCO <= 800MHz */ -#define PLL_TUNE_VCO_HI 0x00000080/* 800MHz < VCO <= 1000MHz */ +#define PLL_TUNE_2_M_3 0x00000133/* 2 <= M <= 3 */ +#define PLL_TUNE_4_M_6 0x00000134/* 3 < M <= 6 */ +#define PLL_TUNE_7_M_10 0x00000138/* 6 < M <= 10 */ +#define PLL_TUNE_11_M_14 0x0000013C/* 10 < M <= 14 */ +#define PLL_TUNE_15_M_40 0x0000023E/* 14 < M <= 40 */ +#define PLL_TUNE_VCO_LOW 0x00000000/* 500MHz <= VCO <= 800MHz */ +#define PLL_TUNE_VCO_HI 0x00000080/* 800MHz < VCO <= 1000MHz */ /* Defines for CPC0_PLLMR0 Register fields */ -/* CPU divisor */ -#define PLL_CPUDIV 0x00300000 -#define CPC0_PLLMR0_CCDV 0x00300000 -#define PLL_CPUDIV_1 0x00000000 -#define PLL_CPUDIV_2 0x00100000 -#define PLL_CPUDIV_3 0x00200000 -#define PLL_CPUDIV_4 0x00300000 -/* PLB divisor */ -#define PLL_PLBDIV 0x00030000 -#define CPC0_PLLMR0_CBDV 0x00030000 -#define PLL_PLBDIV_1 0x00000000 -#define PLL_PLBDIV_2 0x00010000 -#define PLL_PLBDIV_3 0x00020000 -#define PLL_PLBDIV_4 0x00030000 -/* OPB divisor */ -#define PLL_OPBDIV 0x00003000 -#define CPC0_PLLMR0_OPDV 0x00003000 -#define PLL_OPBDIV_1 0x00000000 -#define PLL_OPBDIV_2 0x00001000 -#define PLL_OPBDIV_3 0x00002000 -#define PLL_OPBDIV_4 0x00003000 -/* EBC divisor */ -#define PLL_EXTBUSDIV 0x00000300 -#define CPC0_PLLMR0_EPDV 0x00000300 -#define PLL_EXTBUSDIV_2 0x00000000 -#define PLL_EXTBUSDIV_3 0x00000100 -#define PLL_EXTBUSDIV_4 0x00000200 -#define PLL_EXTBUSDIV_5 0x00000300 -/* MAL divisor */ -#define PLL_MALDIV 0x00000030 -#define CPC0_PLLMR0_MPDV 0x00000030 -#define PLL_MALDIV_1 0x00000000 -#define PLL_MALDIV_2 0x00000010 -#define PLL_MALDIV_3 0x00000020 -#define PLL_MALDIV_4 0x00000030 -/* PCI divisor */ -#define PLL_PCIDIV 0x00000003 -#define CPC0_PLLMR0_PPFD 0x00000003 -#define PLL_PCIDIV_1 0x00000000 -#define PLL_PCIDIV_2 0x00000001 -#define PLL_PCIDIV_3 0x00000002 -#define PLL_PCIDIV_4 0x00000003 +/* CPU divisor */ +#define PLL_CPUDIV 0x00300000 +#define CPC0_PLLMR0_CCDV 0x00300000 +#define PLL_CPUDIV_1 0x00000000 +#define PLL_CPUDIV_2 0x00100000 +#define PLL_CPUDIV_3 0x00200000 +#define PLL_CPUDIV_4 0x00300000 +/* PLB divisor */ +#define PLL_PLBDIV 0x00030000 +#define CPC0_PLLMR0_CBDV 0x00030000 +#define PLL_PLBDIV_1 0x00000000 +#define PLL_PLBDIV_2 0x00010000 +#define PLL_PLBDIV_3 0x00020000 +#define PLL_PLBDIV_4 0x00030000 +/* OPB divisor */ +#define PLL_OPBDIV 0x00003000 +#define CPC0_PLLMR0_OPDV 0x00003000 +#define PLL_OPBDIV_1 0x00000000 +#define PLL_OPBDIV_2 0x00001000 +#define PLL_OPBDIV_3 0x00002000 +#define PLL_OPBDIV_4 0x00003000 +/* EBC divisor */ +#define PLL_EXTBUSDIV 0x00000300 +#define CPC0_PLLMR0_EPDV 0x00000300 +#define PLL_EXTBUSDIV_2 0x00000000 +#define PLL_EXTBUSDIV_3 0x00000100 +#define PLL_EXTBUSDIV_4 0x00000200 +#define PLL_EXTBUSDIV_5 0x00000300 +/* MAL divisor */ +#define PLL_MALDIV 0x00000030 +#define CPC0_PLLMR0_MPDV 0x00000030 +#define PLL_MALDIV_1 0x00000000 +#define PLL_MALDIV_2 0x00000010 +#define PLL_MALDIV_3 0x00000020 +#define PLL_MALDIV_4 0x00000030 +/* PCI divisor */ +#define PLL_PCIDIV 0x00000003 +#define CPC0_PLLMR0_PPFD 0x00000003 +#define PLL_PCIDIV_1 0x00000000 +#define PLL_PCIDIV_2 0x00000001 +#define PLL_PCIDIV_3 0x00000002 +#define PLL_PCIDIV_4 0x00000003/* -*------------------------------------------------------------------------------- +*------------------------------------------------------------------------------ * PLL settings for 266MHz CPU, 133MHz PLB/SDRAM, 66MHz EBC, 33MHz PCI, * assuming a 33.3MHz input clock to the 405EP. -*------------------------------------------------------------------------------- +*------------------------------------------------------------------------------ */ #define PLLMR0_266_133_66 (PLL_CPUDIV_1 | PLL_PLBDIV_2 | \ PLL_OPBDIV_2 | PLL_EXTBUSDIV_2 | \
@@ -427,25 +427,25 @@#define CPC0_PERD1 0x0e1/* CPR_PERD1 */ #define CPC0_PERC0 0x180/* CPR_PERC0 */ -#define CPR_CLKUPD_ENPLLCH_EN 0x40000000/* Enable CPR PLL Changes */ -#define CPR_CLKUPD_ENDVCH_EN 0x20000000/* Enable CPR Sys. Div. Changes */ -#define CPR_PERD0_SPIDV_MASK 0x000F0000/* SPI Clock Divider */ +#define CPR_CLKUPD_ENPLLCH_EN 0x40000000/* Enable CPR PLL Changes */ +#define CPR_CLKUPD_ENDVCH_EN 0x20000000/* Enable CPR Sys. Div. Changes */ +#define CPR_PERD0_SPIDV_MASK 0x000F0000/* SPI Clock Divider */ -#define PLLC_SRC_MASK 0x20000000/* PLL feedback source */ +#define PLLC_SRC_MASK 0x20000000/* PLL feedback source */ -#define PLLD_FBDV_MASK 0x1F000000/* PLL feedback divider value */ -#define PLLD_FWDVA_MASK 0x000F0000/* PLL forward divider A value */ -#define PLLD_FWDVB_MASK 0x00000700/* PLL forward divider B value */ +#define PLLD_FBDV_MASK 0x1F000000/* PLL feedback divider value */ +#define PLLD_FWDVA_MASK 0x000F0000/* PLL forward divider A value */ +#define PLLD_FWDVB_MASK 0x00000700/* PLL forward divider B value */ -#define PRIMAD_CPUDV_MASK 0x0F000000/* CPU Clock Divisor Mask */ -#define PRIMAD_PLBDV_MASK 0x000F0000/* PLB Clock Divisor Mask */ -#define PRIMAD_OPBDV_MASK 0x00000F00/* OPB Clock Divisor Mask */ -#define PRIMAD_EBCDV_MASK 0x0000000F/* EBC Clock Divisor Mask */ +#define PRIMAD_CPUDV_MASK 0x0F000000/* CPU Clock Divisor Mask */ +#define PRIMAD_PLBDV_MASK 0x000F0000/* PLB Clock Divisor Mask */ +#define PRIMAD_OPBDV_MASK 0x00000F00/* OPB Clock Divisor Mask */ +#define PRIMAD_EBCDV_MASK 0x0000000F/* EBC Clock Divisor Mask */ -#define PERD0_PWMDV_MASK 0xFF000000/* PWM Divider Mask */ -#define PERD0_SPIDV_MASK 0x000F0000/* SPI Divider Mask */ -#define PERD0_U0DV_MASK 0x0000FF00/* UART 0 Divider Mask */ -#define PERD0_U1DV_MASK 0x000000FF/* UART 1 Divider Mask */ +#define PERD0_PWMDV_MASK 0xFF000000/* PWM Divider Mask */ +#define PERD0_SPIDV_MASK 0x000F0000/* SPI Divider Mask */ +#define PERD0_U0DV_MASK 0x0000FF00/* UART 0 Divider Mask */ +#define PERD0_U1DV_MASK 0x000000FF/* UART 1 Divider Mask */ #else /* #ifdef CONFIG_405EP */ /******************************************************************************
@@ -462,13 +462,13 @@#define CPC0_ECR 0xaa/* edge conditioner register */ /* Bit definitions */ -#define PLLMR_FWD_DIV_MASK 0xE0000000/* Forward Divisor */ +#define PLLMR_FWD_DIV_MASK 0xE0000000/* Forward Divisor */ #define PLLMR_FWD_DIV_BYPASS 0xE0000000#define PLLMR_FWD_DIV_3 0xA0000000#define PLLMR_FWD_DIV_4 0x80000000#define PLLMR_FWD_DIV_6 0x40000000 -#define PLLMR_FB_DIV_MASK 0x1E000000/* Feedback Divisor */ +#define PLLMR_FB_DIV_MASK 0x1E000000/* Feedback Divisor */ #define PLLMR_FB_DIV_1 0x02000000#define PLLMR_FB_DIV_2 0x04000000#define PLLMR_FB_DIV_3 0x06000000
@@ -476,32 +476,32 @@#define PLLMR_TUNING_MASK 0x01F80000 -#define PLLMR_CPU_TO_PLB_MASK 0x00060000/* CPU:PLB Frequency Divisor */ +#define PLLMR_CPU_TO_PLB_MASK 0x00060000/* CPU:PLB Frequency Divisor */ #define PLLMR_CPU_PLB_DIV_1 0x00000000#define PLLMR_CPU_PLB_DIV_2 0x00020000#define PLLMR_CPU_PLB_DIV_3 0x00040000#define PLLMR_CPU_PLB_DIV_4 0x00060000 -#define PLLMR_OPB_TO_PLB_MASK 0x00018000/* OPB:PLB Frequency Divisor */ +#define PLLMR_OPB_TO_PLB_MASK 0x00018000/* OPB:PLB Frequency Divisor */ #define PLLMR_OPB_PLB_DIV_1 0x00000000#define PLLMR_OPB_PLB_DIV_2 0x00008000#define PLLMR_OPB_PLB_DIV_3 0x00010000#define PLLMR_OPB_PLB_DIV_4 0x00018000 -#define PLLMR_PCI_TO_PLB_MASK 0x00006000/* PCI:PLB Frequency Divisor */ +#define PLLMR_PCI_TO_PLB_MASK 0x00006000/* PCI:PLB Frequency Divisor */ #define PLLMR_PCI_PLB_DIV_1 0x00000000#define PLLMR_PCI_PLB_DIV_2 0x00002000#define PLLMR_PCI_PLB_DIV_3 0x00004000#define PLLMR_PCI_PLB_DIV_4 0x00006000 -#define PLLMR_EXB_TO_PLB_MASK 0x00001800/* External Bus:PLB Divisor */ +#define PLLMR_EXB_TO_PLB_MASK 0x00001800/* External Bus:PLB Divisor */ #define PLLMR_EXB_PLB_DIV_2 0x00000000#define PLLMR_EXB_PLB_DIV_3 0x00000800#define PLLMR_EXB_PLB_DIV_4 0x00001000#define PLLMR_EXB_PLB_DIV_5 0x00001800/* definitions for PPC405GPr (new mode strapping) */ -#define PLLMR_FWDB_DIV_MASK 0x00000007/* Forward Divisor B */ +#define PLLMR_FWDB_DIV_MASK 0x00000007/* Forward Divisor B */ #define PSR_PLL_FWD_MASK 0xC0000000#define PSR_PLL_FDBACK_MASK 0x30000000
@@ -513,15 +513,15 @@#define PSR_ROM_WIDTH_MASK 0x00018000#define PSR_ROM_LOC 0x00004000#define PSR_PCI_ASYNC_EN 0x00001000 -#define PSR_PERCLK_SYNC_MODE_EN 0x00000800/* PPC405GPr only */ +#define PSR_PERCLK_SYNC_MODE_EN 0x00000800/* PPC405GPr only */ #define PSR_PCI_ARBIT_EN 0x00000400 -#define PSR_NEW_MODE_EN 0x00000020/* PPC405GPr only */ +#define PSR_NEW_MODE_EN 0x00000020/* PPC405GPr only */ #ifndef CONFIG_IOP480 /* * PLL Voltage Controlled Oscillator (VCO) definitions * Maximum and minimum values (in MHz) for correct PLL operation. -*/ +*/ #define VCO_MIN 400#define VCO_MAX 800#endif /* #ifndef CONFIG_IOP480 */
@@ -535,35 +535,35 @@#else #define MAL_DCR_BASE 0x180#endif -#define MAL0_CFG (MAL_DCR_BASE + 0x00)/* MAL Config reg */ -#define MAL0_ESR (MAL_DCR_BASE + 0x01)/* Err Status (Read/Clear)*/ -#define MAL0_IER (MAL_DCR_BASE + 0x02)/* Interrupt enable */ -#define MAL0_TXCASR (MAL_DCR_BASE + 0x04)/* TX Channel active (set)*/ -#define MAL0_TXCARR (MAL_DCR_BASE + 0x05)/* TX Channel active (reset)*/ -#define MAL0_TXEOBISR (MAL_DCR_BASE + 0x06)/* TX End of buffer int status*/ -#define MAL0_TXDEIR (MAL_DCR_BASE + 0x07)/* TX Descr. Error Int reg */ -#define MAL0_RXCASR (MAL_DCR_BASE + 0x10)/* RX Channel active (set) */ -#define MAL0_RXCARR (MAL_DCR_BASE + 0x11)/* RX Channel active (reset) */ -#define MAL0_RXEOBISR (MAL_DCR_BASE + 0x12)/* RX End of buffer int status*/ -#define MAL0_RXDEIR (MAL_DCR_BASE + 0x13)/* RX Descr. Error Int reg */ -#define MAL0_TXCTP0R (MAL_DCR_BASE + 0x20)/* TX 0 Channel table ptr */ -#define MAL0_TXCTP1R (MAL_DCR_BASE + 0x21)/* TX 1 Channel table ptr */ -#define MAL0_TXCTP2R (MAL_DCR_BASE + 0x22)/* TX 2 Channel table ptr */ -#define MAL0_TXCTP3R (MAL_DCR_BASE + 0x23)/* TX 3 Channel table ptr */ -#define MAL0_RXCTP0R (MAL_DCR_BASE + 0x40)/* RX 0 Channel table ptr */ -#define MAL0_RXCTP1R (MAL_DCR_BASE + 0x41)/* RX 1 Channel table ptr */ -#define MAL0_RXCTP2R (MAL_DCR_BASE + 0x42)/* RX 2 Channel table ptr */ -#define MAL0_RXCTP3R (MAL_DCR_BASE + 0x43)/* RX 3 Channel table ptr */ -#define MAL0_RXCTP8R (MAL_DCR_BASE + 0x48)/* RX 8 Channel table ptr */ -#define MAL0_RXCTP16R (MAL_DCR_BASE + 0x50)/* RX 16 Channel table ptr */ -#define MAL0_RXCTP24R (MAL_DCR_BASE + 0x58)/* RX 24 Channel table ptr */ -#define MAL0_RCBS0 (MAL_DCR_BASE + 0x60)/* RX 0 Channel buffer size */ -#define MAL0_RCBS1 (MAL_DCR_BASE + 0x61)/* RX 1 Channel buffer size */ -#define MAL0_RCBS2 (MAL_DCR_BASE + 0x62)/* RX 2 Channel buffer size */ -#define MAL0_RCBS3 (MAL_DCR_BASE + 0x63)/* RX 3 Channel buffer size */ -#define MAL0_RCBS8 (MAL_DCR_BASE + 0x68)/* RX 8 Channel buffer size */ -#define MAL0_RCBS16 (MAL_DCR_BASE + 0x70)/* RX 16 Channel buffer size */ -#define MAL0_RCBS24 (MAL_DCR_BASE + 0x78)/* RX 24 Channel buffer size */ +#define MAL0_CFG (MAL_DCR_BASE + 0x00)/* MAL Config reg */ +#define MAL0_ESR (MAL_DCR_BASE + 0x01)/* Err Status (Read/Clear) */ +#define MAL0_IER (MAL_DCR_BASE + 0x02)/* Interrupt enable */ +#define MAL0_TXCASR (MAL_DCR_BASE + 0x04)/* TX Channel active (set) */ +#define MAL0_TXCARR (MAL_DCR_BASE + 0x05)/* TX Channel active (reset) */ +#define MAL0_TXEOBISR (MAL_DCR_BASE + 0x06)/* TX End of buffer int status */ +#define MAL0_TXDEIR (MAL_DCR_BASE + 0x07)/* TX Descr. Error Int reg */ +#define MAL0_RXCASR (MAL_DCR_BASE + 0x10)/* RX Channel active (set) */ +#define MAL0_RXCARR (MAL_DCR_BASE + 0x11)/* RX Channel active (reset) */ +#define MAL0_RXEOBISR (MAL_DCR_BASE + 0x12)/* RX End of buffer int status */ +#define MAL0_RXDEIR (MAL_DCR_BASE + 0x13)/* RX Descr. Error Int reg */ +#define MAL0_TXCTP0R (MAL_DCR_BASE + 0x20)/* TX 0 Channel table ptr */ +#define MAL0_TXCTP1R (MAL_DCR_BASE + 0x21)/* TX 1 Channel table ptr */ +#define MAL0_TXCTP2R (MAL_DCR_BASE + 0x22)/* TX 2 Channel table ptr */ +#define MAL0_TXCTP3R (MAL_DCR_BASE + 0x23)/* TX 3 Channel table ptr */ +#define MAL0_RXCTP0R (MAL_DCR_BASE + 0x40)/* RX 0 Channel table ptr */ +#define MAL0_RXCTP1R (MAL_DCR_BASE + 0x41)/* RX 1 Channel table ptr */ +#define MAL0_RXCTP2R (MAL_DCR_BASE + 0x42)/* RX 2 Channel table ptr */ +#define MAL0_RXCTP3R (MAL_DCR_BASE + 0x43)/* RX 3 Channel table ptr */ +#define MAL0_RXCTP8R (MAL_DCR_BASE + 0x48)/* RX 8 Channel table ptr */ +#define MAL0_RXCTP16R (MAL_DCR_BASE + 0x50)/* RX 16 Channel table ptr */ +#define MAL0_RXCTP24R (MAL_DCR_BASE + 0x58)/* RX 24 Channel table ptr */ +#define MAL0_RCBS0 (MAL_DCR_BASE + 0x60)/* RX 0 Channel buffer size */ +#define MAL0_RCBS1 (MAL_DCR_BASE + 0x61)/* RX 1 Channel buffer size */ +#define MAL0_RCBS2 (MAL_DCR_BASE + 0x62)/* RX 2 Channel buffer size */ +#define MAL0_RCBS3 (MAL_DCR_BASE + 0x63)/* RX 3 Channel buffer size */ +#define MAL0_RCBS8 (MAL_DCR_BASE + 0x68)/* RX 8 Channel buffer size */ +#define MAL0_RCBS16 (MAL_DCR_BASE + 0x70)/* RX 16 Channel buffer size */ +#define MAL0_RCBS24 (MAL_DCR_BASE + 0x78)/* RX 24 Channel buffer size */ /*----------------------------------------------------------------------------- | IIC Register Offsets
@@ -610,7 +610,7 @@#define OCM0_DSRC2 (OCM_DCR_BASE + 0x09)/* OCM D-side Bank 2 Config */ #define OCM0_ISRC1 (OCM_DCR_BASE + 0x0A)/* OCM I-side Bank 1Config */ #define OCM0_ISRC2 (OCM_DCR_BASE + 0x0B)/* OCM I-side Bank 2 Config */ -#define OCM0_DISDPC (OCM_DCR_BASE + 0x0C)/* OCM D-/I-side Data Par Chk*/ +#define OCM0_DISDPC (OCM_DCR_BASE + 0x0C)/* OCM D-/I-side Data Par Chk */ #else #define OCM_DCR_BASE 0x018#define OCM0_ISCNTL (OCM_DCR_BASE+0x01)/* OCM I-side control reg */
@@ -746,14 +746,14 @@#define SDR0_MFR 0x4300/* SDR0_MFR reg */ /* Defines for CPC0_EPRCSR register */ -#define CPC0_EPRCSR_E0NFE 0x80000000 -#define CPC0_EPRCSR_E1NFE 0x40000000 -#define CPC0_EPRCSR_E1RPP 0x00000080 -#define CPC0_EPRCSR_E0RPP 0x00000040 -#define CPC0_EPRCSR_E1ERP 0x00000020 -#define CPC0_EPRCSR_E0ERP 0x00000010 -#define CPC0_EPRCSR_E1PCI 0x00000002 -#define CPC0_EPRCSR_E0PCI 0x00000001 +#define CPC0_EPRCSR_E0NFE 0x80000000 +#define CPC0_EPRCSR_E1NFE 0x40000000 +#define CPC0_EPRCSR_E1RPP 0x00000080 +#define CPC0_EPRCSR_E0RPP 0x00000040 +#define CPC0_EPRCSR_E1ERP 0x00000020 +#define CPC0_EPRCSR_E0ERP 0x00000010 +#define CPC0_EPRCSR_E1PCI 0x00000002 +#define CPC0_EPRCSR_E0PCI 0x00000001#define CPR0_CLKUPD 0x020#define CPR0_PLLC 0x040
@@ -770,46 +770,46 @@/* CUST0 Customer Configuration Register0 */ #define SDR0_CUST0 0x4000 -#define SDR0_CUST0_MUX_E_N_G_MASK 0xC0000000/* Mux_Emac_NDFC_GPIO */ -#define SDR0_CUST0_MUX_EMAC_SEL 0x40000000/* Emac Selection */ -#define SDR0_CUST0_MUX_NDFC_SEL 0x80000000/* NDFC Selection */ -#define SDR0_CUST0_MUX_GPIO_SEL 0xC0000000/* GPIO Selection */ - -#define SDR0_CUST0_NDFC_EN_MASK 0x20000000/* NDFC Enable Mask */ -#define SDR0_CUST0_NDFC_ENABLE 0x20000000/* NDFC Enable */ -#define SDR0_CUST0_NDFC_DISABLE 0x00000000/* NDFC Disable */ - -#define SDR0_CUST0_NDFC_BW_MASK 0x10000000/* NDFC Boot Width */ -#define SDR0_CUST0_NDFC_BW_16_BIT 0x10000000/* NDFC Boot Width = 16 Bit */ -#define SDR0_CUST0_NDFC_BW_8_BIT 0x00000000/* NDFC Boot Width = 8 Bit */ - -#define SDR0_CUST0_NDFC_BP_MASK 0x0F000000/* NDFC Boot Page */ -#define SDR0_CUST0_NDFC_BP_ENCODE (n) ((((unsigned long)(n))&0xF)<<24) -#define SDR0_CUST0_NDFC_BP_DECODE (n) ((((unsigned long)(n))>>24)&0x0F) - -#define SDR0_CUST0_NDFC_BAC_MASK 0x00C00000/* NDFC Boot Address Cycle */ -#define SDR0_CUST0_NDFC_BAC_ENCODE (n) ((((unsigned long)(n))&0x3)<<22) -#define SDR0_CUST0_NDFC_BAC_DECODE (n) ((((unsigned long)(n))>>22)&0x03) - -#define SDR0_CUST0_NDFC_ARE_MASK 0x00200000/* NDFC Auto Read Enable */ -#define SDR0_CUST0_NDFC_ARE_ENABLE 0x00200000/* NDFC Auto Read Enable */ -#define SDR0_CUST0_NDFC_ARE_DISABLE 0x00000000/* NDFC Auto Read Disable */ - -#define SDR0_CUST0_NRB_MASK 0x00100000/* NDFC Ready / Busy */ -#define SDR0_CUST0_NRB_BUSY 0x00100000/* Busy */ -#define SDR0_CUST0_NRB_READY 0x00000000/* Ready */ - -#define SDR0_CUST0_NDRSC_MASK 0x0000FFF0/* NDFC Device Reset Count Mask */ -#define SDR0_CUST0_NDRSC_ENCODE (n) ((((unsigned long)(n))&0xFFF)<<4) -#define SDR0_CUST0_NDRSC_DECODE (n) ((((unsigned long)(n))>>4)&0xFFF) - -#define SDR0_CUST0_CHIPSELGAT_MASK 0x0000000F/* Chip Select Gating Mask */ -#define SDR0_CUST0_CHIPSELGAT_DIS 0x00000000/* Chip Select Gating Disable */ -#define SDR0_CUST0_CHIPSELGAT_ENALL 0x0000000F/* All Chip Select Gating Enable */ -#define SDR0_CUST0_CHIPSELGAT_EN0 0x00000008/* Chip Select0 Gating Enable */ -#define SDR0_CUST0_CHIPSELGAT_EN1 0x00000004/* Chip Select1 Gating Enable */ -#define SDR0_CUST0_CHIPSELGAT_EN2 0x00000002/* Chip Select2 Gating Enable */ -#define SDR0_CUST0_CHIPSELGAT_EN3 0x00000001/* Chip Select3 Gating Enable */ +#define SDR0_CUST0_MUX_E_N_G_MASK 0xC0000000/* Mux_Emac_NDFC_GPIO */ +#define SDR0_CUST0_MUX_EMAC_SEL 0x40000000/* Emac Selection */ +#define SDR0_CUST0_MUX_NDFC_SEL 0x80000000/* NDFC Selection */ +#define SDR0_CUST0_MUX_GPIO_SEL 0xC0000000/* GPIO Selection */ + +#define SDR0_CUST0_NDFC_EN_MASK 0x20000000/* NDFC Enable Mask */ +#define SDR0_CUST0_NDFC_ENABLE 0x20000000/* NDFC Enable */ +#define SDR0_CUST0_NDFC_DISABLE 0x00000000/* NDFC Disable */ + +#define SDR0_CUST0_NDFC_BW_MASK 0x10000000/* NDFC Boot Width */ +#define SDR0_CUST0_NDFC_BW_16_BIT 0x10000000/* NDFC Boot Width= 16 Bit */ +#define SDR0_CUST0_NDFC_BW_8_BIT 0x00000000/* NDFC Boot Width= 8 Bit */ + +#define SDR0_CUST0_NDFC_BP_MASK 0x0F000000/* NDFC Boot Page */ +#define SDR0_CUST0_NDFC_BP_ENCODE (n) ((((unsigned long)(n))&0xF)<<24) +#define SDR0_CUST0_NDFC_BP_DECODE (n) ((((unsigned long)(n))>>24)&0x0F) + +#define SDR0_CUST0_NDFC_BAC_MASK 0x00C00000/* NDFC Boot Address Cycle */ +#define SDR0_CUST0_NDFC_BAC_ENCODE (n) ((((unsigned long)(n))&0x3)<<22) +#define SDR0_CUST0_NDFC_BAC_DECODE (n) ((((unsigned long)(n))>>22)&0x03) + +#define SDR0_CUST0_NDFC_ARE_MASK 0x00200000/* NDFC Auto Read Enable */ +#define SDR0_CUST0_NDFC_ARE_ENABLE 0x00200000/* NDFC Auto Read Enable */ +#define SDR0_CUST0_NDFC_ARE_DISABLE 0x00000000/* NDFC Auto Read Disable */ + +#define SDR0_CUST0_NRB_MASK 0x00100000/* NDFC Ready / Busy */ +#define SDR0_CUST0_NRB_BUSY 0x00100000/* Busy */ +#define SDR0_CUST0_NRB_READY 0x00000000/* Ready */ + +#define SDR0_CUST0_NDRSC_MASK 0x0000FFF0/* NDFC Device Reset Count Mask */ +#define SDR0_CUST0_NDRSC_ENCODE (n) ((((unsigned long)(n))&0xFFF)<<4) +#define SDR0_CUST0_NDRSC_DECODE (n) ((((unsigned long)(n))>>4)&0xFFF) + +#define SDR0_CUST0_CHIPSELGAT_MASK 0x0000000F/* Chip Sel Gating Mask */ +#define SDR0_CUST0_CHIPSELGAT_DIS 0x00000000/* Chip Sel Gating Disable */ +#define SDR0_CUST0_CHIPSELGAT_ENALL 0x0000000F/* All Chip Sel Gating Enable */ +#define SDR0_CUST0_CHIPSELGAT_EN0 0x00000008/* Chip Sel0 Gating Enable */ +#define SDR0_CUST0_CHIPSELGAT_EN1 0x00000004/* Chip Sel1 Gating Enable */ +#define SDR0_CUST0_CHIPSELGAT_EN2 0x00000002/* Chip Sel2 Gating Enable */ +#define SDR0_CUST0_CHIPSELGAT_EN3 0x00000001/* Chip Sel3 Gating Enable */ #define SDR0_PFC0 0x4100#define SDR0_PFC1 0x4101
include/ppc440.h +706 -546
1,460 lines not on this page · raw message
include/ppc4xx.h +22 -14
@@ -136,12 +136,12 @@* Common stuff for 4xx (405 and 440) */ -#define EXC_OFF_SYS_RESET 0x0100/* System reset */ +#define EXC_OFF_SYS_RESET 0x0100/* System reset */ #define _START_OFFSET (EXC_OFF_SYS_RESET + 0x2000)#define RESET_VECTOR 0xfffffffc -#define CACHELINE_MASK (CONFIG_SYS_CACHELINE_SIZE - 1)/* Address mask for cache -line aligned data. */ +#define CACHELINE_MASK (CONFIG_SYS_CACHELINE_SIZE - 1)/* Address mask for +cache line aligned data. */ #define CPR0_DCR_BASE 0x0C#define CPR0_CFGADDR (CPR0_DCR_BASE + 0x0)
@@ -162,17 +162,25 @@/* * Macros for indirect DCR access */ -#define mtcpr (reg, d) do { mtdcr(CPR0_CFGADDR,reg);mtdcr(CPR0_CFGDATA,d); } while (0) -#define mfcpr (reg, d) do { mtdcr(CPR0_CFGADDR,reg);d = mfdcr(CPR0_CFGDATA); } while (0) - -#define mtebc (reg, d) do { mtdcr(EBC0_CFGADDR,reg);mtdcr(EBC0_CFGDATA,d); } while (0) -#define mfebc (reg, d) do { mtdcr(EBC0_CFGADDR,reg);d = mfdcr(EBC0_CFGDATA); } while (0) - -#define mtsdram (reg, d) do { mtdcr(SDRAM0_CFGADDR,reg);mtdcr(SDRAM0_CFGDATA,d); } while (0) -#define mfsdram (reg, d) do { mtdcr(SDRAM0_CFGADDR,reg);d = mfdcr(SDRAM0_CFGDATA); } while (0) - -#define mtsdr (reg, d) do { mtdcr(SDR0_CFGADDR,reg);mtdcr(SDR0_CFGDATA,d); } while (0) -#define mfsdr (reg, d) do { mtdcr(SDR0_CFGADDR,reg);d = mfdcr(SDR0_CFGDATA); } while (0) +#define mtcpr (reg, d) \ + do { mtdcr(CPR0_CFGADDR, reg); mtdcr(CPR0_CFGDATA, d); } while (0) +#define mfcpr (reg, d) \ + do { mtdcr(CPR0_CFGADDR, reg); d = mfdcr(CPR0_CFGDATA); } while (0) + +#define mtebc (reg, d) \ + do { mtdcr(EBC0_CFGADDR, reg); mtdcr(EBC0_CFGDATA, d); } while (0) +#define mfebc (reg, d) \ + do { mtdcr(EBC0_CFGADDR, reg); d = mfdcr(EBC0_CFGDATA); } while (0) + +#define mtsdram (reg, d) \ + do { mtdcr(SDRAM0_CFGADDR, reg); mtdcr(SDRAM0_CFGDATA, d); } while (0) +#define mfsdram (reg, d) \ + do { mtdcr(SDRAM0_CFGADDR, reg); d = mfdcr(SDRAM0_CFGDATA); } while (0) + +#define mtsdr (reg, d) \ + do { mtdcr(SDR0_CFGADDR, reg); mtdcr(SDR0_CFGDATA, d); } while (0) +#define mfsdr (reg, d) \ + do { mtdcr(SDR0_CFGADDR, reg); d = mfdcr(SDR0_CFGDATA); } while (0)#ifndef __ASSEMBLY__
include/ppc4xx_enet.h +47 -47
119 lines not on this page · raw message
Signature · 1 line
1.6.3.3
PATCH v2 4/4 ppc4xx: respect 80-chars per line in ppc*.h files
Quoted 3 lines · On Sunday 04 October 2009 20:04:22 Niklaus Giger wrote:
After running checkstyle.pl on the three previous patches I noted that in the *.h files there were a lot of long lines. This patch solves this
problem.
Applied to u-boot-ppc4xx. Thanks.
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH v2 3/4 ppc4xx: Rework cmd reginfo
In reply to Niklaus GigerQuoted 4 lines · On Sunday 04 October 2009 20:04:21 Niklaus Giger wrote:
The command "reginfo" got an overhaul for the ppc4xx. It dumps all the relevant HW configuration registers (address, symbolic name, content). This allows to easily detect errors in *.h files and changes in the HW configuration.
Applied to u-boot-ppc4xx. Thanks.
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH v2 2/4 ppc_4xx: Apply new HW register names
In reply to Niklaus GigerQuoted 2 lines · On Sunday 04 October 2009 20:04:20 Niklaus Giger wrote:
Modify all existing *.c files to use the new register names as seen in the AMCC manuals.
Applied to u-boot-ppc4xx. Thanks.
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
PATCH v2 1/4 ppc4xx: Cleanup some HW register names
In reply to Niklaus GigerQuoted 4 lines · On Sunday 04 October 2009 20:04:19 Niklaus Giger wrote:
Here you find all the changes in the include directory for new register
names and adapting other ones to the names used by AMCC in their manuals, e.g. For 440EPx/GRPPC440EPx/GRX, Revision 1.15 ? September 22, 2008
For PPC405GP Embedded Processor, Revision 1.02 ? March 22, 2006
Applied to u-boot-ppc4xx. Thanks.
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de