Cleanup for 8xx and other misc powerpc
Subsystems (4)
v2 cover Cleanup for 8xx and other misc powerpc
This serie makes some cleanup in the powerpc area
following the reintroduction of the 8xx.
v2 takes into account comments from Wolfgang and Tom
Christophe Leroy (14):
powerpc, 8xx: Simplify brgclk calculation and remove get_brgclk()
powerpc: get rid of addr_probe()
powerpc, timer: Does 8xx specific actions in 8xx cpu_init power, timer: reset TBL before TBU
powerpc: move set_msr() and get_msr() into .h
powerpc: Remove unneccessary #ifdefs in reginfo Convert CONFIG_CMD_REGINFO to Kconfig
powerpc, 8xx: Simplifying check_CPU()
powerpc, 8xx: Move cache function into C files powerpc, 8xx: move get_immr() into C
powerpc, 8xx: move cache helper into C
powerpc: move get_pvr() and get_svr() into C
powerpc, 8xx: fix missing function declarations.
powerpc: Remove 8260 remainders
MAINTAINERS | 6 -- README | 1 - arch/powerpc/Kconfig | 3 + arch/powerpc/cpu/mpc83xx/start.S | 10 ---- arch/powerpc/cpu/mpc83xx/traps.c | 27 --------- arch/powerpc/cpu/mpc85xx/cpu.c | 3 +- arch/powerpc/cpu/mpc85xx/start.S | 10 ---- arch/powerpc/cpu/mpc85xx/traps.c | 8 --- arch/powerpc/cpu/mpc86xx/cpu.c | 3 +- arch/powerpc/cpu/mpc86xx/start.S | 10 ---- arch/powerpc/cpu/mpc86xx/traps.c | 10 ---- arch/powerpc/cpu/mpc8xx/Makefile | 1 + arch/powerpc/cpu/mpc8xx/cache.c | 49 ++++++++++++++++ arch/powerpc/cpu/mpc8xx/cpu.c | 39 +++---------- arch/powerpc/cpu/mpc8xx/cpu_init.c | 5 +- arch/powerpc/cpu/mpc8xx/immap.c | 13 +++-- arch/powerpc/cpu/mpc8xx/reginfo.c | 3 +- arch/powerpc/cpu/mpc8xx/speed.c | 25 +------- arch/powerpc/cpu/mpc8xx/start.S | 108 ----------------------------------- arch/powerpc/cpu/mpc8xx/traps.c | 10 +--- arch/powerpc/include/asm/cache.h | 32 +++++++++++ arch/powerpc/include/asm/ppc.h | 49 +++++++++++++--- arch/powerpc/include/asm/processor.h | 14 ----- arch/powerpc/lib/bootm.c | 2 + arch/powerpc/lib/interrupts.c | 17 ------ arch/powerpc/lib/kgdb.c | 14 ----- arch/powerpc/lib/time.c | 13 +---- cmd/Kconfig | 5 ++ cmd/reginfo.c | 20 +------ drivers/i2c/soft_i2c.c | 4 -- drivers/net/mpc8xx_fec.c | 1 + drivers/serial/serial.c | 3 - include/config_cmd_all.h | 1 - include/configs/B4860QDS.h | 2 - include/configs/BSC9131RDB.h | 5 -- include/configs/BSC9132QDS.h | 5 -- include/configs/C29XPCIE.h | 5 -- include/configs/M5208EVBE.h | 3 - include/configs/M52277EVB.h | 3 - include/configs/M5235EVB.h | 1 - include/configs/M53017EVB.h | 3 - include/configs/M5329EVB.h | 2 - include/configs/M5373EVB.h | 2 - include/configs/M54418TWR.h | 1 - include/configs/M54451EVB.h | 3 - include/configs/M54455EVB.h | 1 - include/configs/M5475EVB.h | 1 - include/configs/M5485EVB.h | 1 - include/configs/MCR3000.h | 3 - include/configs/MPC8536DS.h | 2 - include/configs/MPC8541CDS.h | 2 - include/configs/MPC8544DS.h | 2 - include/configs/MPC8548CDS.h | 2 - include/configs/MPC8555CDS.h | 2 - include/configs/MPC8560ADS.h | 2 - include/configs/MPC8568MDS.h | 2 - include/configs/MPC8569MDS.h | 2 - include/configs/MPC8572DS.h | 2 - include/configs/MPC8610HPCD.h | 2 - include/configs/MPC8641HPCN.h | 2 - include/configs/P1010RDB.h | 5 -- include/configs/P1022DS.h | 2 - include/configs/P1023RDB.h | 2 - include/configs/T102xQDS.h | 2 - include/configs/T102xRDB.h | 2 - include/configs/T1040QDS.h | 2 - include/configs/T104xRDB.h | 2 - include/configs/T208xQDS.h | 2 - include/configs/T208xRDB.h | 2 - include/configs/T4240RDB.h | 2 - include/configs/TQM834x.h | 2 - include/configs/UCP1020.h | 5 -- include/configs/astro_mcf5373l.h | 1 - include/configs/controlcenterd.h | 3 - include/configs/corenet_ds.h | 2 - include/configs/cyrus.h | 2 - include/configs/dragonboard410c.h | 1 - include/configs/p1_p2_rdb_pc.h | 5 -- include/configs/p1_twr.h | 5 -- include/configs/qemu-ppce500.h | 2 - include/configs/s5p_goni.h | 1 - include/configs/sbc8548.h | 2 - include/configs/sbc8641d.h | 2 - include/configs/smdkc100.h | 1 - include/configs/socrates.h | 1 - include/configs/t4qds.h | 2 - include/configs/vct.h | 1 - include/configs/xilinx-ppc.h | 1 - include/configs/xpedite517x.h | 1 - include/configs/xpedite520x.h | 1 - include/configs/xpedite537x.h | 1 - include/configs/xpedite550x.h | 1 - include/ioports.h | 7 +-- scripts/config_whitelist.txt | 1 - 94 files changed, 166 insertions(+), 490 deletions(-) create mode 100644 arch/powerpc/cpu/mpc8xx/cache.c
Signature · 1 line
2.12.0
PATCH v2 1/14 powerpc, 8xx: Simplify brgclk calculation and remove get_brgclk()
divider is calculated based on SCCR_DFBRG, with:SCCR_DFBRG 00 => divider 1 = 1 << 0 SCCR_DFBRG 01 => divider 4 = 1 << 2 SCCR_DFBRG 10 => divider 16 = 1 << 4 SCCR_DFBRG 11 => divider 64 = 1 << 6
This can be easily converted to a single shift operation:
divider = 1 << (SCCR_DFBRG * 2)
--- arch/powerpc/cpu/mpc8xx/speed.c | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-)
arch/powerpc/cpu/mpc8xx/speed.c +3 -22
@@ -12,27 +12,6 @@DECLARE_GLOBAL_DATA_PTR ; -void get_brgclk (uint sccr) -{ -uint divider =0 ; - -switch ((sccr &SCCR_DFBRG11 ) >>11 ) { -case 0 : - divider =1 ; -break ; -case 1 : - divider =4 ; -break ; -case 2 : - divider =16 ; -break ; -case 3 : - divider =64 ; -break ; - } - gd->arch.brg_clk = gd->cpu_clk / divider; -} -/* * get_clocks() fills in gd->cpu_clock depending on CONFIG_8xx_GCLK_FREQ */
@@ -41,6 +20,8 @@ int get_clocks(void)uint immr =get_immr (0 );/* Return full IMMR contents */ immap_t __iomem *immap = (immap_t __iomem *)(immr &0xFFFF0000 );uint sccr =in_be32 (&immap->im_clkrst.car_sccr); +uint divider =1 << (((sccr &SCCR_DFBRG11 ) >>11 ) *2 ); +/* * If for some reason measuring the gclk frequency won't * work, we return the hardwired value.
@@ -57,7 +38,7 @@ int get_clocks(void) gd->bus_clk = gd->cpu_clk /2 ; } -get_brgclk (sccr); + gd->arch.brg_clk = gd->cpu_clk / divider;return 0 ; }
Signature · 1 line
2.12.0
PATCH v2 2/14 powerpc: get rid of addr_probe()
In reply to Christophe LeroyThis function has never been used, at least since the beginning of the git repository
--- arch/powerpc/cpu/mpc83xx/traps.c | 27 --------------------------- arch/powerpc/cpu/mpc85xx/traps.c | 8 -------- arch/powerpc/cpu/mpc86xx/traps.c | 10 ---------- arch/powerpc/cpu/mpc8xx/traps.c | 8 -------- 4 files changed, 53 deletions(-)
arch/powerpc/cpu/mpc83xx/traps.c +0 -27
@@ -215,30 +215,3 @@ void DebugException(struct pt_regs *regs)do_bedbug_breakpoint ( regs );#endif } - -/* Probe an address by reading. If not present, return -1, otherwise -* return 0. -*/ -int addr_probe (uint *addr) -{ -#if 0 -int retval; - - __asm__ __volatile__( \ -"1: lwz %0,0(%1)\n" \ -" eieio\n" \ -" li %0,0\n" \ -"2:\n" \ -".section .fixup,\"ax\"\n" \ -"3: li %0,-1\n" \ -" b 2b\n" \ -".section __ex_table,\"a\"\n" \ -" .align 2\n" \ -" .long 1b,3b\n" \ -".text" \ - :"=r" (retval) :"r" (addr)); - -return (retval); -#endif -return 0 ; -}
arch/powerpc/cpu/mpc85xx/traps.c +0 -8
@@ -286,11 +286,3 @@ void DebugException(struct pt_regs *regs)do_bedbug_breakpoint ( regs );#endif } - -/* Probe an address by reading. If not present, return -1, otherwise -* return 0. -*/ -int addr_probe (uint *addr) -{ -return 0 ; -}
arch/powerpc/cpu/mpc86xx/traps.c +0 -10
@@ -195,13 +195,3 @@ void UnknownException(struct pt_regs *regs) regs->nip, regs->msr, regs->trap);_exception (0 , regs); } - -/* -* Probe an address by reading. -* If not present, return -1, -* otherwise return 0. -*/ -int addr_probe (uint *addr) -{ -return 0 ; -}
arch/powerpc/cpu/mpc8xx/traps.c +0 -8
@@ -155,11 +155,3 @@ void DebugException(struct pt_regs *regs)printf ("Debugger trap at @ %lx\n" , regs->nip);show_regs (regs); } - -/* Probe an address by reading. If not present, return -1, otherwise -* return 0. -*/ -int addr_probe (uint *addr) -{ -return 0 ; -}
Signature · 1 line
2.12.0
PATCH v2 3/14 powerpc, timer: Does 8xx specific actions in 8xx cpu_init
In reply to Christophe LeroyThe actions inside #ifdef CONFIG_8xx in arch/powerpc/lib/time.c can be performed before, in a 8xx dedicated function.
--- arch/powerpc/cpu/mpc8xx/cpu_init.c | 5 ++++- arch/powerpc/lib/time.c | 11 ----------- 2 files changed, 4 insertions(+), 12 deletions(-)
arch/powerpc/cpu/mpc8xx/cpu_init.c +4 -1
@@ -38,7 +38,10 @@ void cpu_init_f(immap_t __iomem *immr)/* unlock TBSCRK */ out_be32 (&immr->im_sitk.sitk_tbscrk,KAPWR_KEY ); -out_be16 (&immr->im_sit.sit_tbscr,CONFIG_SYS_TBSCR ); +out_be16 (&immr->im_sit.sit_tbscr,CONFIG_SYS_TBSCR |TBSCR_TBE ); + +/* Unlock timebase register */ +out_be32 (&immr->im_sitk.sitk_tbk,KAPWR_KEY );/* initialize the PIT (11-31) */
arch/powerpc/lib/time.c +0 -11
@@ -65,21 +65,10 @@ int timer_init(void) {unsigned long temp; -#if defined(CONFIG_8xx) -immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR ; - -/* unlock */ -out_be32 (&immap->im_sitk.sitk_tbk,KAPWR_KEY ); -#endif -/* reset */ asmvolatile ("li %0,0 ; mttbu %0 ; mttbl %0;" :"=&r" (temp) ); -#if defined(CONFIG_8xx) -/* enable */ -setbits_be16 (&immap->im_sit.sit_tbscr,TBSCR_TBE ); -#endif return (0 ); }/* ------------------------------------------------------------------------- */
Signature · 1 line
2.12.0
PATCH v2 4/14 power, timer: reset TBL before TBU
In reply to Christophe LeroyIn order to avoid TBU increment due to TBL reaching its max and wrapping, reset TBL before resetting TBU
--- arch/powerpc/lib/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/lib/time.c +1 -1
@@ -66,7 +66,7 @@ int timer_init(void)unsigned long temp;/* reset */ - asmvolatile ("li %0,0 ; mttbu %0 ; mttbl %0;" + asmvolatile ("li %0,0 ; mttbl %0 ; mttbu %0;" :"=&r" (temp) );return (0 );
Signature · 1 line
2.12.0
PATCH v2 5/14 powerpc: move set_msr() and get_msr() into .h
In reply to Christophe Leroyset_msr() and get_msr() are defined and used twice. This patch moves them into ppc.h
--- arch/powerpc/include/asm/ppc.h | 14 ++++++++++++++ arch/powerpc/lib/interrupts.c | 14 -------------- arch/powerpc/lib/kgdb.c | 14 -------------- 3 files changed, 14 insertions(+), 28 deletions(-)
arch/powerpc/include/asm/ppc.h +14 -0
@@ -96,6 +96,20 @@ static inline ulong get_ddr_freq(ulong dummy)ulong get_ddr_freq (ulong );#endif +static inline unsigned long get_msr (void ) +{ +unsigned long msr; + + asmvolatile ("mfmsr %0" :"=r" (msr) : ); + +return msr; +} + +static inline void set_msr (unsigned long msr) +{ + asmvolatile ("mtmsr %0" : :"r" (msr)); +} +#endif /* !__ASSEMBLY__ */ #ifdef CONFIG_PPC
arch/powerpc/lib/interrupts.c +0 -14
@@ -33,20 +33,6 @@ extern void timer_interrupt_cpu (struct pt_regs *);static unsigned decrementer_count;/* count value for 1e6/HZ microseconds */ -static __inline__unsigned long get_msr (void ) -{ -unsigned long msr; - - asmvolatile ("mfmsr %0" :"=r" (msr):); - -return msr; -} - -static __inline__void set_msr (unsigned long msr) -{ - asmvolatile ("mtmsr %0" ::"r" (msr)); -} -static __inline__unsigned long get_dec (void ) {unsigned long val;
arch/powerpc/lib/kgdb.c +0 -14
@@ -38,20 +38,6 @@ kgdb_longjmp(long *buf, int val) : "=&r"(temp) : "r" (buf), "r" (val)); } -static inline unsigned long -get_msr (void ) -{ -unsigned long msr; - asmvolatile ("mfmsr %0" :"=r" (msr):); -return msr; -} - -static inline void -set_msr (unsigned long msr) -{ - asmvolatile ("mtmsr %0" : :"r" (msr)); -} -/* Convert the SPARC hardware trap type code to a unix signal number. */ /* * This table contains the mapping between PowerPC hardware trap types, and
Signature · 1 line
2.12.0
PATCH v2 6/14 powerpc: Remove unneccessary #ifdefs in reginfo
In reply to Christophe Leroyreginfo command is calling mpc8xx_reginfo(), mpc85xx_reginfo() or mpc86xx_reginfo() based on CONFIG_ symbol.
As those 3 functions can't me defined at the same time, let's rename them print_reginfo() to avoid the #ifdefs
The name is kept generic as it is not at all dependent on powerpc arch and any other arch could want to also print such information.
In addition, as the Makefile compiles cmd/reginfo.c only when CONFIG_CMD_REGINFO is set, there is no need to enclose the U_BOOT_CMD definition inside a #ifdef CONFIG_CMD_REGINFO
Lets all remove the #ifdefs around the U_BOOT_CMD as this file is only compiled when CONFIG_CMD_REGINFO is defined
--- arch/powerpc/cpu/mpc85xx/cpu.c | 3 ++- arch/powerpc/cpu/mpc86xx/cpu.c | 3 ++- arch/powerpc/cpu/mpc8xx/reginfo.c | 3 ++- arch/powerpc/include/asm/ppc.h | 4 ++++ cmd/reginfo.c | 20 ++------------------ 5 files changed, 12 insertions(+), 21 deletions(-)
arch/powerpc/cpu/mpc85xx/cpu.c +2 -1
@@ -23,6 +23,7 @@#include <post.h> #include <asm/processor.h> #include <fsl_ddr_sdram.h> +#include <asm/ppc.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -384,7 +385,7 @@ int cpu_mmc_init(bd_t *bis)* Currently prints out LAWs, BR0/OR0 for LBC, CSPR/CSOR/Timing * parameters for IFC and TLBs */ -void mpc85xx_reginfo (void ) +void print_reginfo (void ) {print_tlbcam ();print_laws ();
arch/powerpc/cpu/mpc86xx/cpu.c +2 -1
@@ -13,6 +13,7 @@#include <asm/mmu.h> #include <mpc86xx.h> #include <asm/fsl_law.h> +#include <asm/ppc.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -160,7 +161,7 @@ watchdog_reset(void)* Print out the state of various machine registers. * Currently prints out LAWs, BR0/OR0, and BATs */ -void mpc86xx_reginfo (void ) +void print_reginfo (void ) {print_bats ();print_laws ();
arch/powerpc/cpu/mpc8xx/reginfo.c +2 -1
@@ -8,8 +8,9 @@#include <common.h> #include <mpc8xx.h> #include <asm/io.h> +#include <asm/ppc.h> -void mpc8xx_reginfo (void ) +void print_reginfo (void ) {immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR ;memctl8xx_t __iomem *memctl = &immap->im_memctl;
arch/powerpc/include/asm/ppc.h +4 -0
@@ -110,6 +110,10 @@ static inline void set_msr(unsigned long msr) asm volatile ("mtmsr %0" : : "r" (msr)); } +#ifdef CONFIG_CMD_REGINFO +void print_reginfo (void ); +#endif +#endif /* !__ASSEMBLY__ */ #ifdef CONFIG_PPC
cmd/reginfo.c +2 -18
@@ -7,36 +7,20 @@#include <common.h> #include <command.h> -#if defined(CONFIG_8xx) -void mpc8xx_reginfo (void ); -#elif defined(CONFIG_MPC86xx) -extern void mpc86xx_reginfo (void ); -#elif defined(CONFIG_MPC85xx) -extern void mpc85xx_reginfo (void ); -#endif +#include <asm/ppc.h> static int do_reginfo (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) { -#if defined(CONFIG_8xx) -mpc8xx_reginfo (); - -#elif defined(CONFIG_MPC86xx) -mpc86xx_reginfo (); - -#elif defined(CONFIG_MPC85xx) -mpc85xx_reginfo (); -#endif +print_reginfo ();return 0 ; }/**************************************************/ -#if defined(CONFIG_CMD_REGINFO )U_BOOT_CMD ( reginfo,2 ,1 , do_reginfo,"print register information" ,"" ); -#endif
Signature · 1 line
2.12.0
PATCH v2 7/14 Convert CONFIG_CMD_REGINFO to Kconfig
In reply to Christophe LeroyThis patch converts CONFIG_CMD_REGINFO to Kconfig
--- README | 1 - arch/powerpc/Kconfig | 3 +++ cmd/Kconfig | 5 +++++ include/config_cmd_all.h | 1 - include/configs/B4860QDS.h | 2 -- include/configs/BSC9131RDB.h | 5 ----- include/configs/BSC9132QDS.h | 5 ----- include/configs/C29XPCIE.h | 5 ----- include/configs/M5208EVBE.h | 3 --- include/configs/M52277EVB.h | 3 --- include/configs/M5235EVB.h | 1 - include/configs/M53017EVB.h | 3 --- include/configs/M5329EVB.h | 2 -- include/configs/M5373EVB.h | 2 -- include/configs/M54418TWR.h | 1 - include/configs/M54451EVB.h | 3 --- include/configs/M54455EVB.h | 1 - include/configs/M5475EVB.h | 1 - include/configs/M5485EVB.h | 1 - include/configs/MCR3000.h | 3 --- include/configs/MPC8536DS.h | 2 -- include/configs/MPC8541CDS.h | 2 -- include/configs/MPC8544DS.h | 2 -- include/configs/MPC8548CDS.h | 2 -- include/configs/MPC8555CDS.h | 2 -- include/configs/MPC8560ADS.h | 2 -- include/configs/MPC8568MDS.h | 2 -- include/configs/MPC8569MDS.h | 2 -- include/configs/MPC8572DS.h | 2 -- include/configs/MPC8610HPCD.h | 2 -- include/configs/MPC8641HPCN.h | 2 -- include/configs/P1010RDB.h | 5 ----- include/configs/P1022DS.h | 2 -- include/configs/P1023RDB.h | 2 -- include/configs/T102xQDS.h | 2 -- include/configs/T102xRDB.h | 2 -- include/configs/T1040QDS.h | 2 -- include/configs/T104xRDB.h | 2 -- include/configs/T208xQDS.h | 2 -- include/configs/T208xRDB.h | 2 -- include/configs/T4240RDB.h | 2 -- include/configs/TQM834x.h | 2 -- include/configs/UCP1020.h | 5 ----- include/configs/astro_mcf5373l.h | 1 - include/configs/controlcenterd.h | 3 --- include/configs/corenet_ds.h | 2 -- include/configs/cyrus.h | 2 -- include/configs/dragonboard410c.h | 1 - include/configs/p1_p2_rdb_pc.h | 5 ----- include/configs/p1_twr.h | 5 ----- include/configs/qemu-ppce500.h | 2 -- include/configs/s5p_goni.h | 1 - include/configs/sbc8548.h | 2 -- include/configs/sbc8641d.h | 2 -- include/configs/smdkc100.h | 1 - include/configs/socrates.h | 1 - include/configs/t4qds.h | 2 -- include/configs/vct.h | 1 - include/configs/xilinx-ppc.h | 1 - include/configs/xpedite517x.h | 1 - include/configs/xpedite520x.h | 1 - include/configs/xpedite537x.h | 1 - include/configs/xpedite550x.h | 1 - scripts/config_whitelist.txt | 1 - 64 files changed, 8 insertions(+), 132 deletions(-)
README +0 -1
@@ -822,7 +822,6 @@ The following options need to be configured: host CONFIG_CMD_PORTIO * Port I/O CONFIG_CMD_READ * Read raw data from partition - CONFIG_CMD_REGINFO * Register dump CONFIG_CMD_RUN run command in env variable CONFIG_CMD_SANDBOX * sb command to access sandbox features CONFIG_CMD_SAVES * save S record dump
arch/powerpc/Kconfig +3 -0
@@ -23,14 +23,17 @@ config MPC85xx imply USB_EHCI_HCD if USB imply CMD_HASH imply CMD_IRQ + imply CMD_REGINFO config MPC86xx bool "MPC86xx" select SYS_FSL_DDR select SYS_FSL_DDR_BE + imply CMD_REGINFO config 8xx bool "MPC8xx" + imply CMD_REGINFO endchoice
cmd/Kconfig +5 -0
@@ -158,6 +158,11 @@ config CMD_LICENSE help Print GPL license text +config CMD_REGINFO + bool "reginfo" + help + Register dump + endmenu menu "Boot commands"
include/config_cmd_all.h +0 -1
@@ -20,7 +20,6 @@#define CONFIG_CMD_PCI /* pciinfo */ #define CONFIG_CMD_PCMCIA /* PCMCIA support */ #define CONFIG_CMD_PORTIO /* Port I/O */ -#define CONFIG_CMD_REGINFO /* Register dump */ #define CONFIG_CMD_REISER /* Reiserfs support */ #define CONFIG_CMD_READ /* Read data from partition */ #define CONFIG_CMD_SANDBOX /* sb command to access sandbox features */
include/configs/B4860QDS.h +0 -2
@@ -702,8 +702,6 @@ unsigned long get_board_ddr_clk(void);/* * Command line configuration. */ -#define CONFIG_CMD_REGINFO -#ifdef CONFIG_PCI #define CONFIG_CMD_PCI #endif
include/configs/BSC9131RDB.h +0 -5
@@ -291,11 +291,6 @@ extern unsigned long get_sdram_size(void);#define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */ /* -* Command line configuration. -*/ -#define CONFIG_CMD_REGINFO - -/* * Miscellaneous configurable options */ #define CONFIG_SYS_LONGHELP /* undef to save memory */
include/configs/BSC9132QDS.h +0 -5
@@ -518,11 +518,6 @@ combinations. this should be removed later#define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */ /* -* Command line configuration. -*/ -#define CONFIG_CMD_REGINFO - -/* * Miscellaneous configurable options */ #define CONFIG_SYS_LONGHELP /* undef to save memory */
include/configs/C29XPCIE.h +0 -5
@@ -434,11 +434,6 @@#define CONFIG_SYS_LOADS_BAUD_CHANGE /* -* Command line configuration. -*/ -#define CONFIG_CMD_REGINFO - -/* * Miscellaneous configurable options */ #define CONFIG_SYS_LONGHELP /* undef to save memory */
include/configs/M5208EVBE.h +0 -3
@@ -20,9 +20,6 @@#undef CONFIG_WATCHDOG#define CONFIG_WATCHDOG_TIMEOUT 5000 -/* Command line configuration */ -#define CONFIG_CMD_REGINFO -#define CONFIG_MCFFEC #ifdef CONFIG_MCFFEC # define CONFIG_MII 1
include/configs/M52277EVB.h +0 -3
@@ -35,9 +35,6 @@#define CONFIG_BOOTP_GATEWAY #define CONFIG_BOOTP_HOSTNAME -/* Command line configuration */ -#define CONFIG_CMD_REGINFO -#define CONFIG_HOSTNAME M52277EVB#define CONFIG_SYS_UBOOT_END 0x3FFFF#define CONFIG_SYS_LOAD_ADDR2 0x40010007
include/configs/M5235EVB.h +0 -1
@@ -35,7 +35,6 @@/* Command line configuration */ #define CONFIG_CMD_PCI -#define CONFIG_CMD_REGINFO #define CONFIG_MCFFEC #ifdef CONFIG_MCFFEC
include/configs/M53017EVB.h +0 -3
@@ -25,9 +25,6 @@#undef CONFIG_WATCHDOG#define CONFIG_WATCHDOG_TIMEOUT 5000 -/* Command line configuration */ -#define CONFIG_CMD_REGINFO -#define CONFIG_SYS_UNIFY_CACHE #define CONFIG_MCFFEC
include/configs/M5329EVB.h +0 -2
@@ -26,8 +26,6 @@#define CONFIG_WATCHDOG_TIMEOUT 5000/* timeout in milliseconds, max timeout is 6.71sec */ /* Command line configuration */ -#define CONFIG_CMD_REGINFO -#ifdef CONFIG_NANDFLASH_SIZE # define CONFIG_CMD_NAND #endif
include/configs/M5373EVB.h +0 -2
@@ -26,8 +26,6 @@#define CONFIG_WATCHDOG_TIMEOUT 3360/* timeout in ms, max is 3.36 sec */ /* Command line configuration */ -#define CONFIG_CMD_REGINFO -#ifdef CONFIG_NANDFLASH_SIZE # define CONFIG_CMD_NAND #endif
include/configs/M54418TWR.h +0 -1
@@ -38,7 +38,6 @@/* Command line configuration */ #undef CONFIG_CMD_NAND -#define CONFIG_CMD_REGINFO /* * NAND FLASH
include/configs/M54451EVB.h +0 -3
@@ -35,9 +35,6 @@#define CONFIG_BOOTP_GATEWAY #define CONFIG_BOOTP_HOSTNAME -/* Command line configuration */ -#define CONFIG_CMD_REGINFO -/* Network configuration */ #define CONFIG_MCFFEC #ifdef CONFIG_MCFFEC
include/configs/M54455EVB.h +0 -1
@@ -37,7 +37,6 @@/* Command line configuration */ #undef CONFIG_CMD_PCI -#define CONFIG_CMD_REGINFO /* Network configuration */ #define CONFIG_MCFFEC
include/configs/M5475EVB.h +0 -1
@@ -27,7 +27,6 @@/* Command line configuration */ #define CONFIG_CMD_PCI -#define CONFIG_CMD_REGINFO #define CONFIG_SLTTMR
include/configs/M5485EVB.h +0 -1
@@ -27,7 +27,6 @@/* Command line configuration */ #define CONFIG_CMD_PCI -#define CONFIG_CMD_REGINFO #define CONFIG_SLTTMR
include/configs/MCR3000.h +0 -3
@@ -152,7 +152,4 @@#define BOOTFLAG_COLD 0x01#define BOOTFLAG_WARM 0x02 -/* Misc Settings */ -#define CONFIG_CMD_REGINFO -#endif /* __CONFIG_H */
include/configs/MPC8536DS.h +0 -2
@@ -588,8 +588,6 @@/* * Command line configuration. */ -#define CONFIG_CMD_REGINFO -#if defined(CONFIG_PCI )#define CONFIG_CMD_PCI #endif
include/configs/MPC8541CDS.h +0 -2
@@ -342,8 +342,6 @@ extern unsigned long get_clock_freq(void);/* * Command line configuration. */ -#define CONFIG_CMD_REGINFO -#if defined(CONFIG_PCI )#define CONFIG_CMD_PCI #endif
include/configs/MPC8544DS.h +0 -2
@@ -348,8 +348,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);/* * Command line configuration. */ -#define CONFIG_CMD_REGINFO -#if defined(CONFIG_PCI )#define CONFIG_CMD_PCI #endif
include/configs/MPC8548CDS.h +0 -2
@@ -461,8 +461,6 @@ extern unsigned long get_clock_freq(void);/* * Command line configuration. */ -#define CONFIG_CMD_REGINFO -#if defined(CONFIG_PCI )#define CONFIG_CMD_PCI #endif
include/configs/MPC8555CDS.h +0 -2
@@ -340,8 +340,6 @@ extern unsigned long get_clock_freq(void);/* * Command line configuration. */ -#define CONFIG_CMD_REGINFO -#if defined(CONFIG_PCI )#define CONFIG_CMD_PCI #endif
include/configs/MPC8560ADS.h +0 -2
@@ -354,8 +354,6 @@/* * Command line configuration. */ -#define CONFIG_CMD_REGINFO -#if defined(CONFIG_PCI )#define CONFIG_CMD_PCI #endif
include/configs/MPC8568MDS.h +0 -2
@@ -355,8 +355,6 @@ extern unsigned long get_clock_freq(void);/* * Command line configuration. */ -#define CONFIG_CMD_REGINFO -#if defined(CONFIG_PCI )#define CONFIG_CMD_PCI #endif
include/configs/MPC8569MDS.h +0 -2
@@ -448,8 +448,6 @@ extern unsigned long get_clock_freq(void);/* * Command line configuration. */ -#define CONFIG_CMD_REGINFO -#if defined(CONFIG_PCI )#define CONFIG_CMD_PCI #endif
include/configs/MPC8572DS.h +0 -2
@@ -547,8 +547,6 @@/* * Command line configuration. */ -#define CONFIG_CMD_REGINFO -#if defined(CONFIG_PCI )#define CONFIG_CMD_PCI #endif
include/configs/MPC8610HPCD.h +0 -2
@@ -262,8 +262,6 @@#define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ -#define CONFIG_CMD_REGINFO -#define CONFIG_ULI526X #ifdef CONFIG_ULI526X #endif
include/configs/MPC8641HPCN.h +0 -2
@@ -587,8 +587,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);/* * Command line configuration. */ -#define CONFIG_CMD_REGINFO -#if defined(CONFIG_PCI )#define CONFIG_CMD_PCI #endif
include/configs/P1010RDB.h +0 -5
@@ -720,11 +720,6 @@ extern unsigned long get_sdram_size(void);#define CONFIG_LOADS_ECHO /* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */ -/* -* Command line configuration. -*/ -#define CONFIG_CMD_REGINFO -#undef CONFIG_WATCHDOG/* watchdog disabled */ #if defined(CONFIG_MMC ) || defined(CONFIG_USB_EHCI_HCD ) \
include/configs/P1022DS.h +0 -2
@@ -592,8 +592,6 @@/* * Command line configuration. */ -#define CONFIG_CMD_REGINFO -#ifdef CONFIG_PCI #define CONFIG_CMD_PCI #endif
include/configs/P1023RDB.h +0 -2
@@ -241,8 +241,6 @@ extern unsigned long get_clock_freq(void);/* * Command line configuration. */ -#define CONFIG_CMD_REGINFO -#if defined(CONFIG_PCI )#define CONFIG_CMD_PCI #endif
include/configs/T102xQDS.h +0 -2
@@ -778,8 +778,6 @@ unsigned long get_board_ddr_clk(void);/* * Command line configuration. */ -#define CONFIG_CMD_REGINFO -#ifdef CONFIG_PCI #define CONFIG_CMD_PCI #endif
include/configs/T102xRDB.h +0 -2
@@ -789,8 +789,6 @@ unsigned long get_board_ddr_clk(void);/* * Command line configuration. */ -#define CONFIG_CMD_REGINFO -#ifdef CONFIG_PCI #define CONFIG_CMD_PCI #endif
include/configs/T1040QDS.h +0 -2
@@ -657,8 +657,6 @@ unsigned long get_board_ddr_clk(void);/* * Command line configuration. */ -#define CONFIG_CMD_REGINFO -#ifdef CONFIG_PCI #define CONFIG_CMD_PCI #endif
include/configs/T104xRDB.h +0 -2
@@ -770,8 +770,6 @@ $(SRCTREE)/board/freescale/t104xrdb/t1042d4_sd_rcw.cfg/* * Command line configuration. */ -#define CONFIG_CMD_REGINFO -#ifdef CONFIG_PCI #define CONFIG_CMD_PCI #endif
include/configs/T208xQDS.h +0 -2
@@ -743,8 +743,6 @@ unsigned long get_board_ddr_clk(void);/* * Command line configuration. */ -#define CONFIG_CMD_REGINFO -#ifdef CONFIG_PCI #define CONFIG_CMD_PCI #endif
include/configs/T208xRDB.h +0 -2
@@ -689,8 +689,6 @@ unsigned long get_board_ddr_clk(void);/* * Command line configuration. */ -#define CONFIG_CMD_REGINFO -#ifdef CONFIG_PCI #define CONFIG_CMD_PCI #endif
include/configs/T4240RDB.h +0 -2
@@ -56,8 +56,6 @@#define CONFIG_DDR_ECC -#define CONFIG_CMD_REGINFO -/* High Level Configuration Options */ #define CONFIG_SYS_BOOK3E_HV /* Category E.HV supported */ #define CONFIG_MP /* support multiple processors */
include/configs/TQM834x.h +0 -2
@@ -273,8 +273,6 @@/* * Command line configuration. */ -#define CONFIG_CMD_REGINFO -#if defined(CONFIG_PCI )#define CONFIG_CMD_PCI #endif
include/configs/UCP1020.h +0 -5
@@ -418,11 +418,6 @@#define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */ /* -* Command line configuration. -*/ -#define CONFIG_CMD_REGINFO - -/* * USB */ #define CONFIG_HAS_FSL_DR_USB
include/configs/astro_mcf5373l.h +0 -1
@@ -59,7 +59,6 @@/* Define which commands should be available at u-boot command prompt */ -#define CONFIG_CMD_REGINFO #define CONFIG_CMDLINE_EDITING #define CONFIG_MCFRTC
include/configs/controlcenterd.h +0 -3
@@ -339,9 +339,6 @@#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE#ifndef CONFIG_TRAILBLAZER - -#define CONFIG_CMD_REGINFO -/* * Board initialisation callbacks */
include/configs/corenet_ds.h +0 -2
@@ -592,8 +592,6 @@/* * Command line configuration. */ -#define CONFIG_CMD_REGINFO -#ifdef CONFIG_PCI #define CONFIG_CMD_PCI #endif
include/configs/cyrus.h +0 -2
@@ -410,8 +410,6 @@/* * Command line configuration. */ -#define CONFIG_CMD_REGINFO -#ifdef CONFIG_PCI #define CONFIG_CMD_PCI #endif
include/configs/dragonboard410c.h +0 -1
@@ -49,7 +49,6 @@/* Enable that for switching of boot partitions */ /* Disabled by default as some sub-commands can brick eMMC */ /*#define CONFIG_SUPPORT_EMMC_BOOT */ -#define CONFIG_CMD_REGINFO /* Register dump */ #define CONFIG_CMD_TFTP /* Partition table support */
include/configs/p1_p2_rdb_pc.h +0 -5
@@ -810,11 +810,6 @@#define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */ /* -* Command line configuration. -*/ -#define CONFIG_CMD_REGINFO - -/* * USB */ #define CONFIG_HAS_FSL_DR_USB
include/configs/p1_twr.h +0 -5
@@ -381,11 +381,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);#define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */ /* -* Command line configuration. -*/ -#define CONFIG_CMD_REGINFO - -/* * USB */ #define CONFIG_HAS_FSL_DR_USB
include/configs/qemu-ppce500.h +0 -2
@@ -10,8 +10,6 @@#ifndef __QEMU_PPCE500_H#define __QEMU_PPCE500_H -#define CONFIG_CMD_REGINFO -#undef CONFIG_SYS_TEXT_BASE#define CONFIG_SYS_TEXT_BASE 0xf01000/* 15 MB */
include/configs/s5p_goni.h +0 -1
@@ -51,7 +51,6 @@/* PWM */ #define CONFIG_PWM 1 -#define CONFIG_CMD_REGINFO #define CONFIG_CMD_ONENAND /* USB Composite download gadget - g_dnl */
include/configs/sbc8548.h +0 -2
@@ -511,8 +511,6 @@/* * Command line configuration. */ -#define CONFIG_CMD_REGINFO -#if defined(CONFIG_PCI )#define CONFIG_CMD_PCI #endif
include/configs/sbc8641d.h +0 -2
@@ -451,8 +451,6 @@#define CONFIG_LOADS_ECHO 1/* echo on for serial download */ #define CONFIG_SYS_LOADS_BAUD_CHANGE 1/* allow baudrate change */ -#define CONFIG_CMD_REGINFO -#if defined(CONFIG_PCI )#define CONFIG_CMD_PCI #endif
include/configs/smdkc100.h +0 -1
@@ -61,7 +61,6 @@***********************************************************/ #undef CONFIG_CMD_NAND -#define CONFIG_CMD_REGINFO #define CONFIG_CMD_ONENAND #define CONFIG_CMD_MTDPARTS
include/configs/socrates.h +0 -1
@@ -280,7 +280,6 @@* Command line configuration. */ #define CONFIG_CMD_SDRAM -#define CONFIG_CMD_REGINFO #if defined(CONFIG_PCI )#define CONFIG_CMD_PCI
include/configs/t4qds.h +0 -2
@@ -10,8 +10,6 @@#ifndef __T4QDS_H#define __T4QDS_H -#define CONFIG_CMD_REGINFO -/* High Level Configuration Options */ #define CONFIG_SYS_BOOK3E_HV /* Category E.HV supported */ #define CONFIG_MP /* support multiple processors */
include/configs/vct.h +0 -1
@@ -252,7 +252,6 @@ int vct_gpio_get(int pin);* (NOR/OneNAND) usage and Linux kernel booting. */ #if defined(CONFIG_VCT_SMALL_IMAGE ) -#undef CONFIG_CMD_REGINFO#undef CONFIG_CMD_STRINGS#undef CONFIG_CMD_TERMINAL
include/configs/xilinx-ppc.h +0 -1
@@ -24,7 +24,6 @@#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128 * 1024)/*Cmd*/ -#define CONFIG_CMD_REGINFO #undef CONFIG_CMD_MTDPARTS/*Misc*/
include/configs/xpedite517x.h +0 -1
@@ -489,7 +489,6 @@ extern unsigned long get_board_sys_clk(unsigned long dummy);#define CONFIG_CMD_PCA953X_INFO #define CONFIG_CMD_PCI #define CONFIG_CMD_PCI_ENUM -#define CONFIG_CMD_REGINFO /* * Miscellaneous configurable options
include/configs/xpedite520x.h +0 -1
@@ -292,7 +292,6 @@#define CONFIG_CMD_PCA953X_INFO #define CONFIG_CMD_PCI #define CONFIG_CMD_PCI_ENUM -#define CONFIG_CMD_REGINFO /* * Miscellaneous configurable options
include/configs/xpedite537x.h +0 -1
@@ -342,7 +342,6 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);#define CONFIG_CMD_PCA953X_INFO #define CONFIG_CMD_PCI #define CONFIG_CMD_PCI_ENUM -#define CONFIG_CMD_REGINFO /* * Miscellaneous configurable options
include/configs/xpedite550x.h +0 -1
@@ -341,7 +341,6 @@ extern unsigned long get_board_ddr_clk(unsigned long dummy);#define CONFIG_CMD_PCA953X_INFO #define CONFIG_CMD_PCI #define CONFIG_CMD_PCI_ENUM -#define CONFIG_CMD_REGINFO /* * Miscellaneous configurable options
scripts/config_whitelist.txt +0 -1
@@ -309,7 +309,6 @@ CONFIG_CMD_PCI_ENUM CONFIG_CMD_PCMCIA CONFIG_CMD_PORTIO CONFIG_CMD_READ -CONFIG_CMD_REGINFO CONFIG_CMD_REISER CONFIG_CMD_SANDBOX CONFIG_CMD_SAVES
Signature · 1 line
2.12.0
PATCH v2 8/14 powerpc, 8xx: Simplifying check_CPU()
In reply to Christophe LeroyAll complex case have been removed and we now only support MPC866 and MPC885 families.
So check_CPU() can be made a lot simpler.
--- arch/powerpc/cpu/mpc8xx/cpu.c | 39 +++++++-------------------------------- 1 file changed, 7 insertions(+), 32 deletions(-)
arch/powerpc/cpu/mpc8xx/cpu.c +7 -32
@@ -34,19 +34,11 @@DECLARE_GLOBAL_DATA_PTR ; -static char *cpu_warning ="\n " \ -"*** Warning: CPU Core has Silicon Bugs -- Check the Errata ***" ; -static int check_CPU (long clock,uint pvr,uint immr) { -char *id_str = -NULL ;immap_t __iomem *immap = (immap_t __iomem *)(immr &0xFFFF0000 ); -uint k, m; +uint k;char buf[32 ]; -char pre ='X' ; -char *mid ="xx" ; -char *suf;/* the highest 16 bits should be 0x0050 for a 860 */
@@ -55,8 +47,6 @@ static int check_CPU(long clock, uint pvr, uint immr) k = (immr <<16 ) |in_be16 (&immap->im_cpm.cp_dparam16[PROFF_REVNUM /sizeof (u16)]); - m =0 ; - suf ="" ;/* * Some boards use sockets so different CPUs can be used.
@@ -65,32 +55,20 @@ static int check_CPU(long clock, uint pvr, uint immr)switch (k) {/* MPC866P/MPC866T/MPC859T/MPC859DSL/MPC852T */ case 0x08010004 :/* Rev. A.0 */ - suf ="A" ; -/* fall through */ +printf ("MPC866xxxZPnnA" ); +break ;case 0x08000003 :/* Rev. 0.3 */ - pre ='M' ; m =1 ; -if (id_str ==NULL ) - id_str = -"PC866x" ;/* Unknown chip from MPC866 family */ +printf ("MPC866xxxZPnn" );break ; -case 0x09000000 : - pre ='M' ; mid = suf ="" ; m =1 ; -if (id_str ==NULL ) - id_str ="PC885" ;/* 870/875/880/885 */ +case 0x09000000 :/* 870/875/880/885 */ +puts ("MPC885ZPnn" );break ;default : - suf =NULL ; +printf ("unknown MPC86x (0x%08x)" , k);break ; } -if (id_str ==NULL ) - id_str ="PC86x" ;/* Unknown 86x chip */ -if (suf) -printf ("%c%s%sZPnn%s" , pre, id_str, mid, suf); -else -printf ("unknown M%s (0x%08x)" , id_str, k); -printf (" at %s MHz: " ,strmhz (buf, clock));print_size (checkicache ()," I-Cache " );
@@ -102,9 +80,6 @@ static int check_CPU(long clock, uint pvr, uint immr)if (in_be32 (&immap->im_cpm.cp_fec.fec_addr_low) ==0x12345678 )printf (" FEC present" ); -if (!m) -puts (cpu_warning); -putc ('\n' );return 0 ;
Signature · 1 line
2.12.0
PATCH v2 9/14 powerpc, 8xx: Move cache function into C files
In reply to Christophe LeroyAvoid unnecessary assembly functions when they can easily be written in C.
Also remove dc_read() as it is nowhere referenced
--- arch/powerpc/cpu/mpc8xx/Makefile | 1 + arch/powerpc/cpu/mpc8xx/cache.c | 49 +++++++++++++++++++++++++++++++++++ arch/powerpc/cpu/mpc8xx/start.S | 56 ---------------------------------------- 3 files changed, 50 insertions(+), 56 deletions(-) create mode 100644 arch/powerpc/cpu/mpc8xx/cache.c
arch/powerpc/cpu/mpc8xx/Makefile +1 -0
@@ -14,3 +14,4 @@ obj-$(CONFIG_CMD_IMMAP) += immap.o obj-y += interrupts.o obj-$(CONFIG_CMD_REGINFO) += reginfo.o obj-y += speed.o +obj-y += cache.o
arch/powerpc/cpu/mpc8xx/cache.c new file +49 -0
49 lines not on this page · raw message
arch/powerpc/cpu/mpc8xx/start.S +0 -56
62 lines not on this page · raw message
Signature · 1 line
2.12.0
PATCH v2 10/14 powerpc, 8xx: move get_immr() into C
In reply to Christophe LeroyAvoid unnecessary assembly functions when they can easily be written in C.
--- arch/powerpc/cpu/mpc8xx/start.S | 15 --------------- arch/powerpc/include/asm/ppc.h | 9 ++++++++- 2 files changed, 8 insertions(+), 16 deletions(-)
arch/powerpc/cpu/mpc8xx/start.S +0 -15
@@ -305,21 +305,6 @@ int_return: SYNC rfi -/* - * unsigned int get_immr (unsigned int mask) - * - * return (mask ? (IMMR & mask) : IMMR); - */ - .globl get_immr -get_immr: - mr r4,r3 /* save mask */ - mfspr r3, IMMR /* IMMR */ - cmpwi 0,r4,0 /* mask != 0 ? */ - beq 4f - and r3,r3,r4 /* IMMR & mask */ -4: - blr - .globl get_pvr get_pvr: mfspr r3, PVR
arch/powerpc/include/asm/ppc.h +8 -1
@@ -38,8 +38,15 @@#include <asm/arch/immap_lsch2.h> #endif +#include <asm/processor.h> +#if defined(CONFIG_8xx) -uint get_immr (uint ); +static inline uint get_immr (uint mask) +{ +uint immr =mfspr (SPRN_IMMR ); + +return mask ? (immr & mask) : immr; +}#endif uint get_pvr (void );uint get_svr (void );
Signature · 1 line
2.12.0
PATCH v2 11/14 powerpc, 8xx: move cache helper into C
In reply to Christophe LeroyAvoid unnecessary assembly functions when they can easily be written in C.
--- arch/powerpc/cpu/mpc8xx/start.S | 32 -------------------------------- arch/powerpc/include/asm/cache.h | 32 ++++++++++++++++++++++++++++++++ arch/powerpc/include/asm/ppc.h | 6 ------ 3 files changed, 32 insertions(+), 38 deletions(-)
arch/powerpc/cpu/mpc8xx/start.S +0 -32
@@ -310,38 +310,6 @@ get_pvr: mfspr r3, PVR blr - - .globl wr_ic_cst -wr_ic_cst: - mtspr IC_CST, r3 - blr - - .globl rd_ic_cst -rd_ic_cst: - mfspr r3, IC_CST - blr - - .globl wr_ic_adr -wr_ic_adr: - mtspr IC_ADR, r3 - blr - - - .globl wr_dc_cst -wr_dc_cst: - mtspr DC_CST, r3 - blr - - .globl rd_dc_cst -rd_dc_cst: - mfspr r3, DC_CST - blr - - .globl wr_dc_adr -wr_dc_adr: - mtspr DC_ADR, r3 - blr - /*------------------------------------------------------------------------------*/ /*
arch/powerpc/include/asm/cache.h +32 -0
@@ -107,6 +107,38 @@ void disable_cpc_sram(void);#define DC_DFWT 0x40000000/* Data cache is forced write through */ #define DC_LES 0x20000000/* Caches are little endian mode */ + +#if !defined(__ASSEMBLY__) +static inline uint rd_ic_cst (void ) +{ +return mfspr (IC_CST ); +} + +static inline void wr_ic_cst (uint val) +{ +mtspr (IC_CST , val); +} + +static inline void wr_ic_adr (uint val) +{ +mtspr (IC_ADR , val); +} + +static inline uint rd_dc_cst (void ) +{ +return mfspr (DC_CST ); +} + +static inline void wr_dc_cst (uint val) +{ +mtspr (DC_CST , val); +} + +static inline void wr_dc_adr (uint val) +{ +mtspr (DC_ADR , val); +} +#endif #endif /* CONFIG_8xx */ #endif
arch/powerpc/include/asm/ppc.h +0 -6
@@ -50,12 +50,6 @@ static inline uint get_immr(uint mask)#endif uint get_pvr (void );uint get_svr (void ); -uint rd_ic_cst (void ); -void wr_ic_cst (uint ); -void wr_ic_adr (uint ); -uint rd_dc_cst (void ); -void wr_dc_cst (uint ); -void wr_dc_adr (uint ); #if defined(CONFIG_MPC85xx) || \ defined(CONFIG_MPC86xx) || \
Signature · 1 line
2.12.0
PATCH v2 12/14 powerpc: move get_pvr() and get_svr() into C
In reply to Christophe LeroyAvoid unnecessary assembly functions when they can easily be written in C.
--- arch/powerpc/cpu/mpc83xx/start.S | 10 ---------- arch/powerpc/cpu/mpc85xx/start.S | 10 ---------- arch/powerpc/cpu/mpc86xx/start.S | 10 ---------- arch/powerpc/cpu/mpc8xx/start.S | 5 ----- arch/powerpc/include/asm/ppc.h | 11 +++++++++-- 5 files changed, 9 insertions(+), 37 deletions(-)
arch/powerpc/cpu/mpc83xx/start.S +0 -10
@@ -116,16 +116,6 @@ disable_addr_trans: mtspr SRR1, r3 rfi - .globl get_svr -get_svr: - mfspr r3, SVR - blr - - .globl get_pvr -get_pvr: - mfspr r3, PVR - blr - .globl ppcDWstore ppcDWstore: lfd 1, 0(r4)
arch/powerpc/cpu/mpc85xx/start.S +0 -10
@@ -1427,16 +1427,6 @@ dcache_status: andi. r3,r3,L1CSR0_DCE blr - .globl get_pvr -get_pvr: - mfspr r3,PVR - blr - - .globl get_svr -get_svr: - mfspr r3,SVR - blr - /*------------------------------------------------------------------------------- */ /* Function: in8 */ /* Description: Input 8 bits */
arch/powerpc/cpu/mpc86xx/start.S +0 -10
@@ -545,16 +545,6 @@ int_return: dc_read: blr - .globl get_pvr -get_pvr: - mfspr r3, PVR - blr - - .globl get_svr -get_svr: - mfspr r3, SVR - blr - /* * Function: in8
arch/powerpc/cpu/mpc8xx/start.S +0 -5
@@ -305,11 +305,6 @@ int_return: SYNC rfi - .globl get_pvr -get_pvr: - mfspr r3, PVR - blr - /*------------------------------------------------------------------------------*/ /*
arch/powerpc/include/asm/ppc.h +9 -2
@@ -48,8 +48,15 @@ static inline uint get_immr(uint mask)return mask ? (immr & mask) : immr; }#endif -uint get_pvr (void ); -uint get_svr (void ); +static inline uint get_pvr (void ) +{ +return mfspr (PVR ); +} + +static inline uint get_svr (void ) +{ +return mfspr (SVR ); +} #if defined(CONFIG_MPC85xx) || \ defined(CONFIG_MPC86xx) || \
Signature · 1 line
2.12.0
PATCH v2 13/14 powerpc, 8xx: fix missing function declarations.
In reply to Christophe LeroyAdd missing .h and add missing declarations in .h
Declare local functions as static
Based on warnings reported by 'make C=2'
--- arch/powerpc/cpu/mpc8xx/immap.c | 13 +++++++------ arch/powerpc/cpu/mpc8xx/traps.c | 2 +- arch/powerpc/include/asm/ppc.h | 5 +++++ arch/powerpc/lib/bootm.c | 2 ++ arch/powerpc/lib/interrupts.c | 3 --- drivers/net/mpc8xx_fec.c | 1 + 6 files changed, 16 insertions(+), 10 deletions(-)
arch/powerpc/cpu/mpc8xx/immap.c +7 -6
@@ -19,7 +19,7 @@DECLARE_GLOBAL_DATA_PTR ; -int do_siuinfo (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) +static int do_siuinfo (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) {immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR ;sysconf8xx_t __iomem *sc = &immap->im_siu_conf;
@@ -36,7 +36,8 @@ int do_siuinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])return 0 ; } -int do_memcinfo (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) +static int do_memcinfo (cmd_tbl_t *cmdtp,int flag,int argc, +char *const argv[]) {immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR ;memctl8xx_t __iomem *memctl = &immap->im_memctl;
@@ -58,7 +59,7 @@ int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])return 0 ; } -int do_carinfo (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) +static int do_carinfo (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) {immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR ;car8xx_t __iomem *car = &immap->im_clkrst;
@@ -119,7 +120,7 @@ static void binary(char *label, uint value, int nbits)#define PC_NBITS 12#define PD_NBITS 13 -int do_iopinfo (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) +static int do_iopinfo (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) {immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR ;iop8xx_t __iomem *iop = &immap->im_ioport;
@@ -172,7 +173,7 @@ int do_iopinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])* this needs a clean up for smaller tighter code * use *uint and set the address based on cmd + port */ -int do_iopset (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) +static int do_iopset (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) {uint rcode =0 ;iopin_t iopin;
@@ -328,7 +329,7 @@ static void prbrg(int n, uint val)putc ('\n' ); } -int do_brginfo (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) +static int do_brginfo (cmd_tbl_t *cmdtp,int flag,int argc,char *const argv[]) {immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR ;cpm8xx_t __iomem *cp = &immap->im_cpm;
arch/powerpc/cpu/mpc8xx/traps.c +1 -1
@@ -52,7 +52,7 @@ static void print_backtrace(unsigned long *sp)printf ("\n" ); } -void show_regs (struct pt_regs *regs) +static void show_regs (struct pt_regs *regs) {int i;
arch/powerpc/include/asm/ppc.h +5 -0
@@ -122,6 +122,11 @@ static inline void set_msr(unsigned long msr)void print_reginfo (void );#endif +void cpu_init_f (immap_t __iomem *immr); +int interrupt_init_cpu (unsigned *); +void timer_interrupt_cpu (struct pt_regs *); +unsigned long search_exception_table (unsigned long addr); +#endif /* !__ASSEMBLY__ */ #ifdef CONFIG_PPC
arch/powerpc/lib/bootm.c +2 -0
@@ -18,6 +18,8 @@#include <environment.h> #include <asm/byteorder.h> #include <asm/mp.h> +#include <bootm.h> +#include <vxworks.h> #if defined(CONFIG_OF_LIBFDT )#include <libfdt.h>
arch/powerpc/lib/interrupts.c +0 -3
@@ -28,9 +28,6 @@ void __board_show_activity (ulong dummy)#define CONFIG_SYS_WATCHDOG_FREQ (CONFIG_SYS_HZ / 2)#endif -extern int interrupt_init_cpu (unsigned *); -extern void timer_interrupt_cpu (struct pt_regs *); -static unsigned decrementer_count;/* count value for 1e6/HZ microseconds */ static __inline__unsigned long get_dec (void )
drivers/net/mpc8xx_fec.c +1 -0
@@ -10,6 +10,7 @@#include <commproc.h> #include <malloc.h> #include <net.h> +#include <netdev.h> #include <asm/io.h> #include <phy.h>
Signature · 1 line
2.12.0
PATCH v2 14/14 powerpc: Remove 8260 remainders
In reply to Christophe Leroycommit 2eb48ff7a210d ("powerpc, 8260: remove support for mpc8260") removed support for 8260 CPU.
This patch remove some remainders.
--- MAINTAINERS | 6 ------ arch/powerpc/include/asm/processor.h | 14 -------------- drivers/i2c/soft_i2c.c | 4 ---- drivers/serial/serial.c | 3 --- include/ioports.h | 7 ++----- 5 files changed, 2 insertions(+), 32 deletions(-)
MAINTAINERS +0 -6
@@ -324,12 +324,6 @@ S: Maintained T: git git://git.denx.de/u-boot-mpc8xx.git F: arch/powerpc/cpu/mpc8xx/ -POWERPC MPC82XX -M: Wolfgang Denk <[email protected]> -S: Maintained -T: git git://git.denx.de/u-boot-mpc82xx.git -F: arch/powerpc/cpu/mpc82*/ - POWERPC MPC83XX M: Mario Six <[email protected]> S: Maintained
arch/powerpc/include/asm/processor.h +0 -14
@@ -978,18 +978,6 @@#define PVR_850 PVR_821#define PVR_860 PVR_821#define PVR_7400 0x000C0000 -#define PVR_8240 0x00810100 - -/* -* PowerQUICC II family processors report different PVR values depending -* on silicon process (HiP3, HiP4, HiP7, etc.) -*/ -#define PVR_8260 PVR_8240 -#define PVR_8260_HIP3 0x00810101 -#define PVR_8260_HIP4 0x80811014 -#define PVR_8260_HIP7 0x80822011 -#define PVR_8260_HIP7R1 0x80822013 -#define PVR_8260_HIP7RA 0x80822014/* * MPC 52xx
@@ -1345,8 +1333,6 @@ void ll_puts(const char *);void _nmask_and_or_msr (unsigned long nmask,unsigned long or_val);int prt_83xx_rsr (void ); -int prt_8260_rsr (void ); -int prt_8260_clks (void );#endif /* ndef ASSEMBLY*/
drivers/i2c/soft_i2c.c +0 -4
@@ -17,10 +17,6 @@*/ #include <common.h> -#ifdef CONFIG_MPC8260 /* only valid for MPC8260 */ -#include <ioports.h> -#include <asm/io.h> -#endif #if defined(CONFIG_AT91FAMILY )#include <asm/io.h> #include <asm/arch/hardware.h>
drivers/serial/serial.c +0 -3
@@ -133,9 +133,6 @@ serial_initfunc(marvell_serial_initialize);serial_initfunc (max3100_serial_initialize);serial_initfunc (mcf_serial_initialize);serial_initfunc (ml2_serial_initialize); -serial_initfunc (mpc5xx_serial_initialize); -serial_initfunc (mpc8260_scc_serial_initialize); -serial_initfunc (mpc8260_smc_serial_initialize);serial_initfunc (mpc85xx_serial_initialize);serial_initfunc (mpc8xx_serial_initialize);serial_initfunc (mxc_serial_initialize);
include/ioports.h +2 -5
@@ -1,14 +1,12 @@/* -* definitions for MPC8260 I/O Ports -* -* (in addition to those provided in <asm/immap_8260.h>) +* definitions for MPC8xxx I/O Ports * * Murray.Jensen at cmst.csiro.au, 20-Oct-00 */ /* * this structure mirrors the layout of the five port registers in -* the internal memory map - see iop8260_t in <asm/immap_8260.h> +* the internal memory map */ typedef struct { unsigned int pdir; /* Port Data Direction Register (35-3) */
@@ -46,7 +44,6 @@ typedef struct {/* * a table that contains configuration information for all 32 pins -* of all four MPC8260 I/O ports. * * NOTE: in the second dimension of this table, index 0 refers to pin 31 * and index 31 refers to pin 0. this made the code in the table look more
Signature · 1 line
2.12.0
PATCH v2 1/14 powerpc, 8xx: Simplify brgclk calculation and remove get_brgclk()
In reply to Christophe LeroyQuoted 10 lines · Christophe Leroy
divider is calculated based on
SCCR_DFBRG, with:SCCR_DFBRG00 => divider 1 = 1 << 0SCCR_DFBRG01 => divider 4 = 1 << 2SCCR_DFBRG10 => divider 16 = 1 << 4SCCR_DFBRG11 => divider 64 = 1 << 6This can be easily converted to a single shift operation:
divider = 1 << (SCCR_DFBRG* 2)Signed-off-by Christophe Leroy <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170724/51bbfd1e/attachment.sig>
PATCH v2 2/14 powerpc: get rid of addr_probe()
In reply to Christophe LeroyQuoted 4 lines · Christophe Leroy
This function has never been used, at least since the beginning of the git repository
Signed-off-by Christophe Leroy <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170724/3b41a473/attachment.sig>
PATCH v2 3/14 powerpc, timer: Does 8xx specific actions in 8xx cpu_init
In reply to Christophe LeroyQuoted 4 lines · Christophe Leroy
The actions inside #ifdef
CONFIG_8xxinarch/powerpc/lib/time.ccan be performed before, in a 8xx dedicated function.Signed-off-by Christophe Leroy <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170724/9a8bce7b/attachment.sig>
PATCH v2 4/14 power, timer: reset TBL before TBU
In reply to Christophe LeroyQuoted 4 lines · Christophe Leroy
In order to avoid TBU increment due to TBL reaching its max and wrapping, reset TBL before resetting TBU
Signed-off-by Christophe Leroy <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170724/e950c2ff/attachment.sig>
PATCH v2 5/14 powerpc: move set_msr() and get_msr() into .h
In reply to Christophe LeroyQuoted 4 lines · Christophe Leroy
set_msr()andget_msr()are defined and used twice. This patch moves them intoppc.hSigned-off-by Christophe Leroy <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170724/ff8e1d55/attachment.sig>
PATCH v2 6/14 powerpc: Remove unneccessary #ifdefs in reginfo
In reply to Christophe LeroyQuoted 8 lines · Christophe Leroy
reginfo command is calling
mpc8xx_reginfo(),mpc85xx_reginfo()ormpc86xx_reginfo()based onCONFIG_symbol.
As those 3 functions can't me defined at the same time, let's rename themprint_reginfo()to avoid the #ifdefs
The name is kept generic as it is not at all dependent on powerpc arch and any other arch could want to also print such information.
Quoted 8 lines
In addition, as the
Makefilecompilescmd/reginfo.conly whenCONFIG_CMD_REGINFOis set, there is no need to enclose theU_BOOT_CMDdefinition inside a #ifdefCONFIG_CMD_REGINFOLets all remove the #ifdefs around the
U_BOOT_CMDas this file is only compiled whenCONFIG_CMD_REGINFOis definedSigned-off-by Christophe Leroy <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170724/86d8b1c9/attachment.sig>
PATCH v2 7/14 Convert CONFIG_CMD_REGINFO to Kconfig
In reply to Christophe LeroyQuoted 3 lines · Christophe Leroy
This patch converts
CONFIG_CMD_REGINFOtoKconfigSigned-off-by Christophe Leroy <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170724/b733bf57/attachment.sig>
PATCH v2 8/14 powerpc, 8xx: Simplifying check_CPU()
In reply to Christophe LeroyQuoted 6 lines · Christophe Leroy
All complex case have been removed and we now only support MPC866 and MPC885 families.
So
check_CPU()can be made a lot simpler.Signed-off-by Christophe Leroy <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170724/5ffe7ba0/attachment.sig>
PATCH v2 9/14 powerpc, 8xx: Move cache function into C files
In reply to Christophe LeroyQuoted 6 lines · Christophe Leroy
Avoid unnecessary assembly functions when they can easily be written in C.
Also remove
dc_read()as it is nowhere referencedSigned-off-by Christophe Leroy <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170724/98af012a/attachment.sig>
PATCH v2 10/14 powerpc, 8xx: move get_immr() into C
In reply to Christophe LeroyQuoted 4 lines · Christophe Leroy
Avoid unnecessary assembly functions when they can easily be written in C.
Signed-off-by Christophe Leroy <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170724/c9367df6/attachment.sig>
PATCH v2 11/14 powerpc, 8xx: move cache helper into C
In reply to Christophe LeroyQuoted 4 lines · Christophe Leroy
Avoid unnecessary assembly functions when they can easily be written in C.
Signed-off-by Christophe Leroy <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170724/65de2993/attachment.sig>
PATCH v2 12/14 powerpc: move get_pvr() and get_svr() into C
In reply to Christophe LeroyQuoted 4 lines · Christophe Leroy
Avoid unnecessary assembly functions when they can easily be written in C.
Signed-off-by Christophe Leroy <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170724/cbcfda6f/attachment.sig>
PATCH v2 13/14 powerpc, 8xx: fix missing function declarations.
In reply to Christophe LeroyQuoted 6 lines · Christophe Leroy
Add missing .h and add missing declarations in .h
Declare local functions as staticBased on warnings reported by 'make C=2'
Signed-off-by Christophe Leroy <[email protected]>
Note that when applying I dropped a few of these fixes as we have differing prototypes on other PowerPC platforms. I've addressed those and will post in a separate short series.
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170724/a6618c96/attachment.sig>
PATCH v2 14/14 powerpc: Remove 8260 remainders
In reply to Christophe LeroyQuoted 6 lines · Christophe Leroy
commit
2eb48ff7a210d("powerpc, 8260: remove support for mpc8260") removed support for 8260 CPU.This patch remove some remainders.
Signed-off-by Christophe Leroy <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170724/88931ff7/attachment.sig>
PATCH v2 7/14 Convert CONFIG_CMD_REGINFO to Kconfig
In reply to Tom RiniQuoted 8 lines · Tom Rini
Quoted 3 lines · Christophe Leroy
This patch converts
CONFIG_CMD_REGINFOtoKconfigSigned-off-by Christophe Leroy <[email protected]>Applied to u-boot/master, thanks!
Hi Tom,
It looks like this patch hasn't been applied to u-boot/master yes, has it ?
Christophe
PATCH v2 7/14 Convert CONFIG_CMD_REGINFO to Kconfig
Quoted 7 lines · Christophe LEROY
Quoted 4 lines · Tom Rini
Quoted 2 lines · Christophe Leroy
This patch converts
CONFIG_CMD_REGINFOtoKconfig
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Christophe Leroy <[email protected]>Applied to u-boot/master, thanks!
Hi Tom,
It looks like this patch hasn't been applied to u-boot/master yes, has it ?
Good spotting, sorry about that. I think it got lost a bit somewhere in that when I was doing the conversion I found a handful of non-PowerPC platforms enabled it. I'll things up on top of what's in now via Simon's conversion.
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170731/fb71d4a2/attachment.sig>