The non board-specific mpc82xx_halt and mpc82xx_restart functions are defined
in arch/powerpc/platforms/82xx/mpc82xx_ads.c. This patch moves them to
mpc82xx.c to make them usable by other MPC82xx boards.
Signed-off-by: Laurent Pinchart <redacted>
---
arch/powerpc/platforms/82xx/mpc82xx.c | 33
+++++++++++++++--------------
arch/powerpc/platforms/82xx/mpc82xx.h | 24 +++++++++++++++++++++
arch/powerpc/platforms/82xx/mpc82xx_ads.c | 31 ++++++++++++++-------------
arch/powerpc/platforms/82xx/pq2ads.h | 1 -
4 files changed, 57 insertions(+), 32 deletions(-)
create mode 100644 arch/powerpc/platforms/82xx/mpc82xx.h
@@ -611,25 +612,25 @@ static int __init mpc82xx_ads_probe(void)return1;}-#define RMR_CSRE 0x00000001-staticvoidm82xx_restart(char*cmd)+voidmpc82xx_ads_show_cpuinfo(structseq_file*m){-__volatile__unsignedchardummy;+uintpvid,svid,phid1;+uintmemsize=total_memory;-local_irq_disable();-((cpm2_map_t*)cpm2_immr)->im_clkrst.car_rmr|=RMR_CSRE;+pvid=mfspr(SPRN_PVR);+svid=mfspr(SPRN_SVR);-/* Clear the ME,EE,IR & DR bits in MSR to cause checkstop */-mtmsr(mfmsr()&~(MSR_ME|MSR_EE|MSR_IR|MSR_DR));-dummy=((cpm2_map_t*)cpm2_immr)->im_clkrst.res[0];-printk("Restart failed\n");-while(1);-}+seq_printf(m,"Vendor\t\t: Freescale Semiconductor\n");+seq_printf(m,"Machine\t\t: %s\n",CPUINFO_MACHINE);+seq_printf(m,"PVR\t\t: 0x%x\n",pvid);+seq_printf(m,"SVR\t\t: 0x%x\n",svid);-staticvoidm82xx_halt(void)-{-local_irq_disable();-while(1);+/* Display cpu Pll setting */+phid1=mfspr(SPRN_HID1);+seq_printf(m,"PLL setting\t: 0x%x\n",((phid1>>24)&0x3f));++/* Display the amount of memory */+seq_printf(m,"Memory\t\t: %d MB\n",memsize/(1024*1024));}define_machine(mpc82xx_ads)
diff --git a/arch/powerpc/platforms/82xx/pq2ads.h
b/arch/powerpc/platforms/82xx/pq2ads.h
index 5b5cca6..5056fe5 100644
From: Scott Wood <hidden> Date: 2007-07-10 18:05:35
On Tue, Jul 10, 2007 at 01:12:45PM +0200, Laurent Pinchart wrote:
The non board-specific mpc82xx_halt and mpc82xx_restart functions are defined
in arch/powerpc/platforms/82xx/mpc82xx_ads.c. This patch moves them to
mpc82xx.c to make them usable by other MPC82xx boards.
Why are you also moving mpc82xx_ads_show_cpuinfo() to the board file?
It's not really ADS-specific; it should just be renamed.
-Scott
On Tue, Jul 10, 2007 at 01:12:45PM +0200, Laurent Pinchart wrote:
quoted
The non board-specific mpc82xx_halt and mpc82xx_restart functions are
defined in arch/powerpc/platforms/82xx/mpc82xx_ads.c. This patch moves
them to mpc82xx.c to make them usable by other MPC82xx boards.
Why are you also moving mpc82xx_ads_show_cpuinfo() to the board file?
It's not really ADS-specific; it should just be renamed.
For the MPC82xx ADS boards, mpc82xx_ads_show_cpuinfo() prints
Vendor : Freescale Semiconductor
Machine : PQ2 ADS PowerPC
The vendor string is hardcoded to "Freescale Semiconductor", and the machine
string is defined in pq2ads.h. What should show_cpuinfo() print ? Should the
vendor be the board vendor or the CPU vendor ? What about the machine ?
Laurent Pinchart
From: Scott Wood <hidden> Date: 2007-07-11 15:25:39
Laurent Pinchart wrote:
On Tuesday 10 July 2007 20:05, Scott Wood wrote:
quoted
Why are you also moving mpc82xx_ads_show_cpuinfo() to the board file?
It's not really ADS-specific; it should just be renamed.
For the MPC82xx ADS boards, mpc82xx_ads_show_cpuinfo() prints
Vendor : Freescale Semiconductor
Machine : PQ2 ADS PowerPC
The vendor string is hardcoded to "Freescale Semiconductor", and the machine
string is defined in pq2ads.h. What should show_cpuinfo() print ? Should the
vendor be the board vendor or the CPU vendor ? What about the machine ?
Ah, I missed that. I'd just get rid of "Vendor" altogether, and include
the vendor name in the machine name.
-Scott
Hi Scott,
On Wednesday 11 July 2007 17:25, Scott Wood wrote:
Laurent Pinchart wrote:
quoted
On Tuesday 10 July 2007 20:05, Scott Wood wrote:
quoted
Why are you also moving mpc82xx_ads_show_cpuinfo() to the board file?
It's not really ADS-specific; it should just be renamed.
For the MPC82xx ADS boards, mpc82xx_ads_show_cpuinfo() prints
Vendor : Freescale Semiconductor
Machine : PQ2 ADS PowerPC
The vendor string is hardcoded to "Freescale Semiconductor", and the
machine string is defined in pq2ads.h. What should show_cpuinfo() print ?
Should the vendor be the board vendor or the CPU vendor ? What about the
machine ?
Ah, I missed that. I'd just get rid of "Vendor" altogether, and include
the vendor name in the machine name.
Is there any standard/documentation regarding what show_cpuinfo should print ?
Should it show CPU information only, or board information as well ? What
about the memory size, clock settings, ... ? What are the meanings
of "vendor" and "machine" ?
--
Laurent Pinchart
CSE Semaphore Belgium
Hi Scott,
On Wednesday 11 July 2007 17:25, Scott Wood wrote:
Laurent Pinchart wrote:
quoted
On Tuesday 10 July 2007 20:05, Scott Wood wrote:
quoted
Why are you also moving mpc82xx_ads_show_cpuinfo() to the board file?
It's not really ADS-specific; it should just be renamed.
For the MPC82xx ADS boards, mpc82xx_ads_show_cpuinfo() prints
Vendor : Freescale Semiconductor
Machine : PQ2 ADS PowerPC
The vendor string is hardcoded to "Freescale Semiconductor", and the
machine string is defined in pq2ads.h. What should show_cpuinfo() print ?
Should the vendor be the board vendor or the CPU vendor ? What about the
machine ?
Ah, I missed that. I'd just get rid of "Vendor" altogether, and include
the vendor name in the machine name.
Is there any standard/documentation regarding what show_cpuinfo should print ?
Should it show CPU information only, or board information as well ? What
about the memory size, clock settings, ... ? What are the meanings
of "vendor" and "machine" ?
--
Laurent Pinchart
CSE Semaphore Belgium
Hi Scott,
On Wednesday 11 July 2007 17:25, Scott Wood wrote:
Laurent Pinchart wrote:
quoted
On Tuesday 10 July 2007 20:05, Scott Wood wrote:
quoted
Why are you also moving mpc82xx_ads_show_cpuinfo() to the board file?
It's not really ADS-specific; it should just be renamed.
For the MPC82xx ADS boards, mpc82xx_ads_show_cpuinfo() prints
Vendor : Freescale Semiconductor
Machine : PQ2 ADS PowerPC
The vendor string is hardcoded to "Freescale Semiconductor", and the
machine string is defined in pq2ads.h. What should show_cpuinfo() print ?
Should the vendor be the board vendor or the CPU vendor ? What about the
machine ?
Ah, I missed that. I'd just get rid of "Vendor" altogether, and include
the vendor name in the machine name.
Is there any standard/documentation regarding what show_cpuinfo should print ?
Should it show CPU information only, or board information as well ? What
about the memory size, clock settings, ... ? What are the meanings
of "vendor" and "machine" ?
--
Laurent Pinchart
CSE Semaphore Belgium
Ah, I missed that. =A0I'd just get rid of "Vendor" altogether, and incl=
ude
quoted
the vendor name in the machine name.
=20
Is there any standard/documentation regarding what show_cpuinfo should pr=
int ?=20
Should it show CPU information only, or board information as well ? What=
=20
about the memory size, clock settings, ... ? What are the meanings=20
of "vendor" and "machine" ?
I guess the easiest would be to modify the common show_cpuinfo function
to fall back to just printing the model, if there is no specific function:
=2D-- a/arch/powerpc/kernel/setup-common.c