Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67514
b: refs/heads/master
c: e1c1575
h: refs/heads/master
v: v3
  • Loading branch information
Kumar Gala committed Oct 8, 2007
1 parent 09fd177 commit 924115a
Show file tree
Hide file tree
Showing 14 changed files with 54 additions and 143 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c9438affcb7ac0dda4c6c6961637fb272f7c32d4
refs/heads/master: e1c1575f831ab2165732037e6d664010a0149730
6 changes: 6 additions & 0 deletions trunk/arch/powerpc/boot/dts/mpc8641_hpcn.dts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@
device_type = "open-pic";
big-endian;
};

global-utilities@e0000 {
compatible = "fsl,mpc8641-guts";
reg = <e0000 1000>;
fsl,has-rstcr;
};
};

pcie@f8008000 {
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/powerpc/platforms/85xx/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#
# Makefile for the PowerPC 85xx linux kernel.
#
obj-$(CONFIG_PPC_85xx) += misc.o
obj-$(CONFIG_MPC8540_ADS) += mpc85xx_ads.o
obj-$(CONFIG_MPC8560_ADS) += mpc85xx_ads.o
obj-$(CONFIG_MPC85xx_CDS) += mpc85xx_cds.o
Expand Down
55 changes: 0 additions & 55 deletions trunk/arch/powerpc/platforms/85xx/misc.c

This file was deleted.

17 changes: 0 additions & 17 deletions trunk/arch/powerpc/platforms/85xx/mpc85xx.h

This file was deleted.

3 changes: 1 addition & 2 deletions trunk/arch/powerpc/platforms/85xx/mpc85xx_ads.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
#include "mpc85xx.h"

#ifdef CONFIG_CPM2
#include <linux/fs_enet_pd.h>
Expand Down Expand Up @@ -249,7 +248,7 @@ define_machine(mpc85xx_ads) {
.init_IRQ = mpc85xx_ads_pic_init,
.show_cpuinfo = mpc85xx_ads_show_cpuinfo,
.get_irq = mpic_get_irq,
.restart = mpc85xx_restart,
.restart = fsl_rstcr_restart,
.calibrate_decr = generic_calibrate_decr,
.progress = udbg_progress,
};
5 changes: 2 additions & 3 deletions trunk/arch/powerpc/platforms/85xx/mpc85xx_cds.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@

#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
#include "mpc85xx.h"

static int cds_pci_slot = 2;
static volatile u8 *cadmus;
Expand Down Expand Up @@ -96,7 +95,7 @@ static void mpc85xx_cds_restart(char *cmd)
* If we can't find the VIA chip (maybe the P2P bridge is disabled)
* or the VIA chip reset didn't work, just use the default reset.
*/
mpc85xx_restart(NULL);
fsl_rstcr_restart(NULL);
}

static void __init mpc85xx_cds_pci_irq_fixup(struct pci_dev *dev)
Expand Down Expand Up @@ -343,7 +342,7 @@ define_machine(mpc85xx_cds) {
.restart = mpc85xx_cds_restart,
.pcibios_fixup_bus = fsl_pcibios_fixup_bus,
#else
.restart = mpc85xx_restart,
.restart = fsl_rstcr_restart,
#endif
.calibrate_decr = generic_calibrate_decr,
.progress = udbg_progress,
Expand Down
5 changes: 2 additions & 3 deletions trunk/arch/powerpc/platforms/85xx/mpc85xx_ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
#include "mpc85xx.h"

#undef DEBUG

Expand Down Expand Up @@ -211,7 +210,7 @@ define_machine(mpc8544_ds) {
.pcibios_fixup_bus = fsl_pcibios_fixup_bus,
#endif
.get_irq = mpic_get_irq,
.restart = mpc85xx_restart,
.restart = fsl_rstcr_restart,
.calibrate_decr = generic_calibrate_decr,
.progress = udbg_progress,
};
Expand All @@ -225,7 +224,7 @@ define_machine(mpc8572_ds) {
.pcibios_fixup_bus = fsl_pcibios_fixup_bus,
#endif
.get_irq = mpic_get_irq,
.restart = mpc85xx_restart,
.restart = fsl_rstcr_restart,
.calibrate_decr = generic_calibrate_decr,
.progress = udbg_progress,
};
4 changes: 1 addition & 3 deletions trunk/arch/powerpc/platforms/85xx/mpc85xx_mds.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@
#include <asm/qe_ic.h>
#include <asm/mpic.h>

#include "mpc85xx.h"

#undef DEBUG
#ifdef DEBUG
#define DBG(fmt...) udbg_printf(fmt)
Expand Down Expand Up @@ -200,7 +198,7 @@ define_machine(mpc85xx_mds) {
.setup_arch = mpc85xx_mds_setup_arch,
.init_IRQ = mpc85xx_mds_pic_init,
.get_irq = mpic_get_irq,
.restart = mpc85xx_restart,
.restart = fsl_rstcr_restart,
.calibrate_decr = generic_calibrate_decr,
.progress = udbg_progress,
#ifdef CONFIG_PCI
Expand Down
19 changes: 1 addition & 18 deletions trunk/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@
#include <sysdev/fsl_pci.h>
#include <sysdev/fsl_soc.h>

#define MPC86XX_RSTCR_OFFSET (0xe00b0) /* Reset Control Register */

void __init
mpc86xx_hpcd_init_irq(void)
{
Expand Down Expand Up @@ -187,21 +185,6 @@ static int __init mpc86xx_hpcd_probe(void)
return 0;
}

void
mpc86xx_restart(char *cmd)
{
void __iomem *rstcr;

rstcr = ioremap(get_immrbase() + MPC86XX_RSTCR_OFFSET, 0x100);

local_irq_disable();

/* Assert reset request to Reset Control Register */
out_be32(rstcr, 0x2);

/* not reached */
}

long __init
mpc86xx_time_init(void)
{
Expand All @@ -225,7 +208,7 @@ define_machine(mpc86xx_hpcd) {
.setup_arch = mpc86xx_hpcd_setup_arch,
.init_IRQ = mpc86xx_hpcd_init_irq,
.get_irq = mpic_get_irq,
.restart = mpc86xx_restart,
.restart = fsl_rstcr_restart,
.time_init = mpc86xx_time_init,
.calibrate_decr = generic_calibrate_decr,
.progress = udbg_progress,
Expand Down
21 changes: 0 additions & 21 deletions trunk/arch/powerpc/platforms/86xx/mpc8641_hpcn.h

This file was deleted.

20 changes: 1 addition & 19 deletions trunk/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include <sysdev/fsl_soc.h>

#include "mpc86xx.h"
#include "mpc8641_hpcn.h"

#undef DEBUG

Expand Down Expand Up @@ -196,23 +195,6 @@ static int __init mpc86xx_hpcn_probe(void)
return 0;
}


void
mpc86xx_restart(char *cmd)
{
void __iomem *rstcr;

rstcr = ioremap(get_immrbase() + MPC86XX_RSTCR_OFFSET, 0x100);

local_irq_disable();

/* Assert reset request to Reset Control Register */
out_be32(rstcr, 0x2);

/* not reached */
}


long __init
mpc86xx_time_init(void)
{
Expand All @@ -237,7 +219,7 @@ define_machine(mpc86xx_hpcn) {
.init_IRQ = mpc86xx_hpcn_init_irq,
.show_cpuinfo = mpc86xx_hpcn_show_cpuinfo,
.get_irq = mpic_get_irq,
.restart = mpc86xx_restart,
.restart = fsl_rstcr_restart,
.time_init = mpc86xx_time_init,
.calibrate_decr = generic_calibrate_decr,
.progress = udbg_progress,
Expand Down
38 changes: 38 additions & 0 deletions trunk/arch/powerpc/sysdev/fsl_soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1298,3 +1298,41 @@ int __init fsl_spi_init(struct spi_board_info *board_infos,

return spi_register_board_info(board_infos, num_board_infos);
}

#if defined(CONFIG_PPC_85xx) || defined(CONFIG_PPC_86xx)
static __be32 __iomem *rstcr;

static int __init setup_rstcr(void)
{
struct device_node *np;
np = of_find_node_by_name(NULL, "global-utilities");
if ((np && of_get_property(np, "fsl,has-rstcr", NULL))) {
const u32 *prop = of_get_property(np, "reg", NULL);
if (prop) {
/* map reset control register
* 0xE00B0 is offset of reset control register
*/
rstcr = ioremap(get_immrbase() + *prop + 0xB0, 0xff);
if (!rstcr)
printk (KERN_EMERG "Error: reset control "
"register not mapped!\n");
}
} else
printk (KERN_INFO "rstcr compatible register does not exist!\n");
if (np)
of_node_put(np);
return 0;
}

arch_initcall(setup_rstcr);

void fsl_rstcr_restart(char *cmd)
{
local_irq_disable();
if (rstcr)
/* set reset control register */
out_be32(rstcr, 0x2); /* HRESET_REQ */

while (1) ;
}
#endif
1 change: 1 addition & 0 deletions trunk/arch/powerpc/sysdev/fsl_soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ extern int fsl_spi_init(struct spi_board_info *board_infos,
void (*activate_cs)(u8 cs, u8 polarity),
void (*deactivate_cs)(u8 cs, u8 polarity));

extern void fsl_rstcr_restart(char *cmd);
#endif
#endif

0 comments on commit 924115a

Please sign in to comment.